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/2230 | Keys yielded while generating dataset are not being checked | Thanks a lot @lhoestq. I think I understand what we need to do now. The keys can indeed be used for detecting duplicates in generated examples as well as ensuring the order.
> 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,
I think that checking for duplicates in every batch independently would be sufficient as the probability of collisions using something like `MD5` is very low. I would be opening a draft PR soon. It would be great to have your guidance. 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! | 119 | 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!
Thanks a lot @lhoestq. I think I understand what we need to do now. The keys can indeed be used for detecting duplicates in generated examples as well as ensuring the order.
> 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,
I think that checking for duplicates in every batch independently would be sufficient as the probability of collisions using something like `MD5` is very low. I would be opening a draft PR soon. It would be great to have your guidance. 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/2229 | `xnli` dataset creating a tuple key while yielding instead of `str` or `int` | Hi ! Sure sounds good. Also if you find other datasets that use tuples instead of str/int, you can also fix them !
thanks :) | When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset.
I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple. | 25 | `xnli` dataset creating a tuple key while yielding instead of `str` or `int`
When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset.
I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple.
Hi ! Sure sounds good. Also if you find other datasets that use tuples instead of str/int, you can also fix them !
thanks :) | [
-0.05393849313259125,
0.05097480118274689,
0.04516834393143654,
0.12626633048057556,
0.2513769268989563,
0.017300784587860107,
0.44494616985321045,
0.2987631857395172,
0.6008676290512085,
0.2404712736606598,
0.10923505574464798,
0.4075709283351898,
0.019506890326738358,
0.21599061787128448,
-0.08433044701814651,
-0.0561312660574913,
-0.07853969186544418,
0.23520730435848236,
-0.2244511842727661,
-0.1137271523475647,
-0.5031869411468506,
0.12100477516651154,
0.029401510953903198,
0.2606828212738037,
-0.2010563313961029,
0.04004300385713577,
0.193744957447052,
0.1910863220691681,
-0.0840931385755539,
-0.25254079699516296,
0.4881775379180908,
0.008560340851545334,
0.07568689435720444,
0.18293532729148865,
-0.00011359742347849533,
0.02087051421403885,
0.24970801174640656,
-0.0734923854470253,
-0.4682653248310089,
-0.26293712854385376,
-0.21676120162010193,
0.22867368161678314,
-0.023412905633449554,
-0.24671271443367004,
-0.0012092553079128265,
-0.05693509802222252,
-0.06729970872402191,
-0.2611899971961975,
0.2860364317893982,
0.16017603874206543,
0.14505766332149506,
0.4815439283847809,
0.025098320096731186,
-0.1382390856742859,
0.35160526633262634,
0.24973969161510468,
-0.17869195342063904,
0.18786151707172394,
0.18381112813949585,
-0.2809707820415497,
-0.04798879474401474,
0.215928852558136,
0.20664452016353607,
0.13806167244911194,
0.3269067108631134,
0.271962970495224,
0.08234214037656784,
-0.26231834292411804,
-0.009299904108047485,
0.3619782030582428,
0.14399699866771698,
-0.11133591085672379,
-0.14115184545516968,
0.0992557629942894,
0.19871707260608673,
-0.25806644558906555,
0.18393221497535706,
0.09126215428113937,
-0.44911423325538635,
-0.027262236922979355,
0.1974141001701355,
-0.107029989361763,
-0.25758039951324463,
0.23379726707935333,
0.015442512929439545,
0.017318062484264374,
0.05912923067808151,
0.11510147899389267,
0.0064531005918979645,
-0.39794284105300903,
-0.1829756796360016,
0.08944374322891235,
0.26830771565437317,
0.15568765997886658,
-0.3238304555416107,
-0.031098363921046257,
0.11993943154811859,
-0.3682418465614319,
0.3530474305152893,
-0.021266750991344452,
0.12732887268066406,
0.08932971954345703,
-0.38780221343040466,
0.10404837131500244,
-0.013697654008865356,
0.073767751455307,
0.025656264275312424,
0.006319980137050152,
0.33103108406066895,
-0.13880981504917145,
-0.053821586072444916,
0.03497349098324776,
-0.008226503618061543,
0.04094846919178963,
-0.004141479730606079,
-0.19502532482147217,
0.40941107273101807,
0.01854027435183525,
-0.37560346722602844,
0.20390914380550385,
0.08019910007715225,
-0.009229344315826893,
-0.02600746601819992,
0.3675011098384857,
0.25178617238998413,
0.1281283050775528,
-0.03202597424387932,
0.17923970520496368,
-0.25506794452667236,
-0.40935730934143066,
-0.20634618401527405,
-0.05262118950486183,
-0.01279083639383316,
0.09764884412288666,
0.21076135337352753,
-0.3897717297077179,
0.03929562866687775,
0.3133698105812073,
0.25810426473617554,
-0.05567300692200661,
-0.014775807969272137,
0.0536784864962101,
-0.06912439316511154,
0.22818557918071747,
0.1762596219778061,
0.12927041947841644,
0.29346466064453125,
-0.682852029800415,
-0.004134148359298706,
0.16991069912910461,
-0.5129547715187073,
-0.35250797867774963,
-0.2636779844760895,
0.1806255429983139,
0.10776598751544952,
-0.05867484211921692,
-0.33320850133895874,
-0.07938486337661743,
0.03766702860593796,
0.2584780156612396,
-0.03246328979730606,
-0.37131190299987793,
-0.0931692123413086,
-0.3605383634567261,
0.14319974184036255,
0.3623296916484833,
-0.2543598413467407,
-0.04244738072156906,
0.07290886342525482,
-0.06916983425617218,
0.17767056822776794,
0.6391191482543945,
-0.11219018697738647,
0.14693382382392883,
-0.2595929801464081,
0.2790829539299011,
0.48299795389175415,
-0.23147787153720856,
-0.4842318892478943,
0.45210304856300354,
-0.18904726207256317,
-0.07537314295768738,
0.07647688686847687,
0.3655756413936615,
-0.04174235463142395,
0.007989580743014812,
0.28962934017181396,
0.29734331369400024,
-0.045082129538059235,
0.050268836319446564,
-0.30766722559928894,
-0.21739591658115387,
0.14623847603797913,
0.2962856590747833,
-0.007817819714546204,
0.23044434189796448,
-0.00297439843416214,
0.13353556394577026,
0.22226306796073914,
-0.3926812708377838,
0.13009652495384216,
-0.09812498092651367,
0.42313894629478455,
0.13185235857963562,
0.06934714317321777,
0.15978887677192688,
-0.5406084656715393,
0.21112439036369324,
-0.06025625392794609,
0.18533805012702942,
-0.17591522634029388,
-0.2527042329311371,
-0.2737974524497986,
0.14185048639774323,
-0.3421967923641205,
0.2631458342075348,
0.0014370903372764587,
-0.11178164184093475,
-0.03382096067070961,
-0.0560012087225914,
-0.15304459631443024,
0.172490194439888,
-0.35910362005233765,
0.12865352630615234,
-0.4930762052536011,
0.3700055480003357,
-0.04320233315229416,
-0.0199129655957222,
-0.0034729614853858948,
0.1393667757511139,
-0.0881553664803505,
-0.1522151231765747,
-0.15186673402786255,
0.22244298458099365,
0.008839172311127186,
0.06965278834104538,
0.031562574207782745,
0.13487249612808228,
0.29022833704948425,
-0.2376738339662552,
0.04860907420516014,
0.42671653628349304,
0.07968901842832565,
-0.10213781148195267,
-0.294454962015152,
0.6456999182701111,
-0.2812165915966034,
0.10066540539264679,
0.06808294355869293,
0.1324639618396759,
0.18762606382369995,
-0.030454149469733238,
-0.18109850585460663,
-0.4469126760959625,
0.13749778270721436,
-0.09842708706855774,
0.13337302207946777,
-0.03397542983293533,
-0.5189487338066101,
0.127416729927063,
0.47503775358200073,
0.08383800089359283,
0.18238943815231323,
0.3433336019515991,
-0.03266166150569916,
0.002970561385154724,
-0.2844300866127014,
0.34134477376937866,
0.39744681119918823,
0.05943925678730011,
-0.19568341970443726,
-0.0011277906596660614,
-0.3301287591457367,
-0.2890700101852417,
0.07367166131734848,
-0.31078821420669556,
-0.06801247596740723,
0.17849647998809814,
0.07377572357654572,
-0.0021061738952994347,
-0.33119264245033264,
-0.03818260505795479,
0.06709697097539902,
0.39887377619743347,
-0.4998735189437866,
-0.2168365865945816,
-0.2133769541978836,
-0.6131720542907715,
-0.2112472653388977,
0.010062566958367825,
0.11559614539146423,
-0.38082262873649597,
0.0488857626914978,
0.14386115968227386,
-0.07839096337556839,
-0.08461268246173859,
0.06779274344444275,
0.30794215202331543,
0.12762071192264557,
-0.1672041267156601,
-0.09771964699029922,
-0.15230326354503632,
-0.1734204888343811,
0.03248901292681694,
0.11747142672538757,
-0.01848260499536991,
0.3863336145877838,
-0.09201543033123016,
0.0982087254524231,
-0.49789905548095703,
-0.3933638632297516,
0.021676478907465935,
-0.10796333849430084,
0.11314904689788818,
0.20166650414466858,
0.4266098737716675,
-0.15883997082710266,
-0.3726121187210083,
0.4755401909351349,
-0.0774611234664917,
-0.3099052906036377,
0.24570083618164062,
-0.1300874501466751,
-0.022619936615228653,
-0.22891274094581604,
-0.5481781363487244,
0.09098463505506516,
-0.31405603885650635,
0.16133105754852295,
0.07788312435150146,
0.27374279499053955,
0.1724703460931778,
0.09656667709350586,
0.03703661635518074,
0.4510776102542877,
-0.4143410623073578,
-0.4166816771030426,
-0.16954265534877777,
0.37333211302757263,
-0.3391222655773163,
-0.4973725974559784,
-0.15662966668605804,
-0.0387999452650547,
0.19704733788967133,
0.1855374276638031,
-0.39486825466156006,
0.03661363199353218,
-0.18123871088027954,
0.595068097114563,
-0.05835762619972229,
0.035083282738924026,
0.012482717633247375,
-0.05527419224381447,
-0.0447312593460083,
-0.09646730124950409,
0.12538562715053558,
0.30552250146865845,
0.10563652962446213,
0.11178739368915558,
0.4784656763076782,
0.47965356707572937,
-0.044311217963695526,
0.6656316518783569,
0.3739880621433258,
-0.10234527289867401,
0.4134168326854706,
-0.2668377459049225,
-0.0025654174387454987,
-0.21345561742782593,
-0.1091485321521759,
-0.056578829884529114,
0.06917983293533325,
0.22258175909519196,
0.06345072388648987,
-0.07772541046142578,
0.15105542540550232,
0.06548584997653961,
0.3232293426990509,
0.07222048193216324,
-0.36242085695266724,
0.29066580533981323,
-0.22445672750473022,
0.06275956332683563,
-0.03290265053510666,
-0.08343648910522461,
-0.17260514199733734,
-0.18635603785514832,
0.1566852182149887,
0.2086082398891449,
0.258993923664093,
0.13644753396511078,
-0.24038773775100708,
-0.01657426543533802,
-0.5030443072319031,
0.17785315215587616,
-0.018809394910931587,
0.4084619879722595,
-0.17855997383594513,
-0.05306990444660187,
0.11459681391716003,
0.15558551251888275,
0.4162326455116272,
-0.2936870753765106,
0.07908344268798828,
-0.09316962957382202,
0.0630030706524849,
-0.3420487344264984,
-0.04601499065756798,
-0.16626505553722382,
-0.22941528260707855,
-0.08325353264808655,
0.8664242625236511,
-0.1325514316558838,
-0.1677977591753006,
0.021331027150154114,
-0.05653408169746399,
-0.3647376596927643,
-0.2877303957939148,
-0.17468838393688202,
-0.2655872106552124,
-0.3925243318080902,
-0.15952584147453308,
-0.07596538960933685,
0.055291689932346344,
-0.0399298295378685,
0.04055086150765419,
-0.20767304301261902,
0.13809537887573242,
0.24771462380886078,
0.08245500922203064,
0.1984299123287201,
0.2575536370277405,
0.20181003212928772,
-0.13479091227054596,
0.0796288251876831,
0.15809470415115356,
0.42078298330307007,
-0.03896729275584221,
-0.37207749485969543,
-0.026915457099676132,
-0.32864853739738464,
0.026257984340190887,
0.1238001137971878,
-0.028608914464712143,
0.24143865704536438,
-0.16526880860328674,
0.18636494874954224,
-0.4104512333869934,
0.06240775063633919,
0.30046966671943665,
-0.13259480893611908,
-0.20001006126403809,
-0.3252113163471222,
0.5260789394378662,
-0.04175121709704399,
-0.04460253566503525,
0.3378838896751404,
0.31541165709495544,
-0.13322600722312927,
0.6148613095283508,
0.19299602508544922,
0.7376435399055481,
-0.2670450806617737,
0.1003565862774849,
0.4510694146156311,
0.04719819873571396,
0.622791051864624,
-0.02478737384080887,
-0.15937623381614685,
-0.3689330518245697,
-0.31046193838119507,
-0.09820026904344559,
-0.10371004790067673,
-0.18377342820167542,
0.21037226915359497,
-0.1627420336008072,
0.17809559404850006,
-0.12278462946414948,
-0.031205710023641586,
0.001553553156554699,
0.407597154378891,
-0.09317123889923096,
-0.31379029154777527,
-0.039469800889492035,
0.10438817739486694,
-0.08382150530815125,
0.4041209816932678,
0.011963704600930214,
-0.09123077243566513,
-0.03104718215763569,
-0.2687155604362488,
-0.2670804262161255,
0.11498460918664932,
-0.024971548467874527,
0.27232033014297485,
0.17819394171237946,
-0.3479050397872925,
0.17997361719608307,
0.26160892844200134,
0.5482526421546936,
-0.10156571865081787,
-0.0035116691142320633,
-0.01863570138812065,
0.07238008826971054,
0.18114766478538513,
-0.09542216360569,
0.02401643618941307,
0.47493866086006165,
0.0008447207510471344,
-0.08459880203008652,
-0.0245378315448761,
0.15073926746845245,
-0.17884387075901031,
-0.4634506106376648,
-0.17583279311656952,
-0.4185684323310852,
-0.19694244861602783,
-0.14408330619335175,
-0.18279299139976501,
-0.12117108702659607,
0.01905292645096779,
0.05390890687704086,
-0.020235009491443634,
0.15694037079811096,
0.0018280670046806335,
0.19776538014411926,
-0.3082783818244934,
0.07645848393440247,
0.11606121808290482,
0.19747957587242126,
-0.034911513328552246,
0.5787041187286377,
0.09877926111221313,
0.03427135944366455,
-0.18577656149864197,
-0.022237028926610947,
0.4961247742176056,
-0.4041721522808075,
-0.005991471000015736,
-0.14794327318668365,
0.14369453489780426,
0.13939183950424194,
0.21188007295131683,
0.26551270484924316,
0.19566088914871216,
0.03902403637766838,
-0.4466378092765808,
-0.4397517144680023,
0.19119217991828918,
-0.17759078741073608,
0.09949970245361328,
-0.23707479238510132,
0.14416386187076569,
0.04056808352470398,
0.08927124738693237,
-0.28116440773010254,
0.05478771775960922,
-0.011570034548640251,
-0.08347370475530624,
0.43119242787361145,
0.20894670486450195,
-0.02371402643620968,
0.15461671352386475,
0.08944831788539886,
0.04253750294446945,
-0.2589314579963684,
-0.1430259644985199,
-0.3218599259853363,
0.1314428448677063,
-0.017511755228042603,
0.08006315678358078,
0.010383938439190388,
-0.17219096422195435,
0.017712296918034554,
-0.01196959987282753,
0.30842387676239014,
0.07178628444671631,
-0.25044429302215576,
0.4252159595489502,
-0.16322851181030273,
0.2524294853210449,
-0.06640493124723434,
0.11187189817428589,
0.08729908615350723,
0.42520570755004883,
0.011878686025738716,
0.0856325626373291,
-0.08363319933414459,
-0.05159377306699753,
-0.7974537014961243,
0.1531335860490799,
0.061358336359262466,
-0.16030022501945496,
0.0742032453417778,
-0.32966727018356323,
0.09643338620662689,
-0.1546337753534317,
0.0025848858058452606,
0.10830118507146835,
-0.3812050521373749,
0.011371823027729988,
0.10667518526315689,
0.222042515873909,
-0.12316300719976425,
-0.23367662727832794,
-0.12679646909236908,
0.08275724202394485,
-0.02413800358772278,
0.2546176314353943,
0.11249850690364838,
0.05030851066112518,
-0.24998052418231964,
-0.2119126319885254,
0.189676895737648,
-0.6406250596046448,
-0.018320323899388313,
0.5483766794204712,
-0.11214391887187958,
-0.0709950178861618,
-0.024810614064335823,
0.15575531125068665,
-0.08495459705591202,
0.509319543838501,
-0.11396463960409164,
0.10517043620347977,
0.06733503937721252,
0.24455663561820984,
0.24131664633750916,
-0.1795833855867386,
-0.07908502221107483,
0.598222553730011,
-0.4374118447303772,
0.19139817357063293,
0.3534727394580841,
0.5119321346282959,
-0.039731379598379135,
-0.10672616958618164,
-0.2132660448551178,
-0.06578168272972107,
-0.22112375497817993,
-0.21814270317554474,
-0.44316890835762024,
-0.18132495880126953,
-0.42236649990081787,
0.12164480984210968,
-0.13819900155067444,
0.1312888264656067,
0.060758136212825775,
0.26415324211120605,
-0.03502264618873596,
-0.33204787969589233,
0.016312627121806145,
0.24525463581085205,
0.09977638721466064,
-0.2861544191837311,
0.11456894874572754,
0.1956959217786789,
-0.12539885938167572,
0.2547961473464966,
0.1425398737192154,
0.47786909341812134,
0.4655954837799072,
0.1104244589805603,
0.3127039670944214,
-0.09185783565044403,
-0.11389358341693878,
0.004037797451019287,
0.05014865845441818,
0.2707977890968323,
-0.14460507035255432,
0.37342461943626404,
0.0871923565864563,
-0.08247317373752594,
-0.0947784036397934,
0.12439645826816559,
0.27265316247940063,
-0.1429147720336914,
0.37738025188446045,
-0.16052885353565216,
-0.10439731180667877,
0.06959386169910431,
0.05935550481081009,
-0.21562588214874268,
0.06903555244207382,
0.3900225758552551,
0.33815568685531616,
0.28748995065689087,
-0.10881631076335907,
0.08062499761581421,
-0.1326265037059784,
0.5759508013725281,
0.2976172864437103,
-0.009977944195270538,
-0.28522834181785583,
-0.3854352831840515,
-0.7895962595939636,
0.15840862691402435,
-0.012216690927743912,
-0.05747523158788681,
0.1738661378622055,
0.3346884250640869,
0.17571857571601868,
0.1005631536245346,
-0.14251483976840973,
-0.3924267888069153,
-0.048999372869729996,
0.48837342858314514,
-0.22038555145263672,
-0.06470614671707153,
0.12614405155181885,
-0.04843539744615555,
-0.13267265260219574,
-0.41883862018585205,
0.14042994379997253,
0.20429594814777374,
-0.04214873164892197,
-0.3748365640640259,
0.4626341462135315,
0.12754198908805847,
0.12408565729856491,
0.19362923502922058,
0.23299826681613922,
0.34575825929641724,
0.056012772023677826,
-0.1624624878168106,
-0.10334989428520203,
-0.2894286811351776,
-0.3063623011112213,
0.1979951560497284,
0.12225046753883362,
0.28823617100715637,
0.1899716854095459,
-0.22541444003582,
-0.423966646194458,
0.04423440247774124,
0.10410840809345245,
-0.43730610609054565,
-0.3394854962825775,
0.19279152154922485,
-0.14269039034843445,
-0.10985935479402542,
0.1777239888906479,
0.3548057973384857,
0.17434503138065338,
0.11300314962863922,
-0.00017961859703063965,
-0.4871048927307129,
0.2116996943950653,
-0.29912880063056946,
-0.20278625190258026,
-0.0066583361476659775,
0.2682010531425476,
-0.1667627990245819,
0.005939997732639313,
-0.3672617971897125,
0.12990477681159973,
0.17745383083820343,
-0.22183898091316223,
-0.37015625834465027,
0.15639720857143402,
0.10185915231704712,
0.20225556194782257,
-0.21571533381938934,
0.31825995445251465,
0.1456281989812851,
-0.2757141888141632,
0.17355763912200928,
-0.27157121896743774
] |
https://github.com/huggingface/datasets/issues/2229 | `xnli` dataset creating a tuple key while yielding instead of `str` or `int` | @lhoestq I have sent a PR for fixing the issue. Would be great if you could have a look! Thanks! | When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset.
I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple. | 20 | `xnli` dataset creating a tuple key while yielding instead of `str` or `int`
When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset.
I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple.
@lhoestq I have sent a PR for fixing the issue. Would be great if you could have a look! Thanks! | [
-0.07023052871227264,
0.09619051218032837,
0.07785540819168091,
0.12735694646835327,
0.19009727239608765,
0.012610279023647308,
0.44976550340652466,
0.29945608973503113,
0.6488568782806396,
0.17797209322452545,
0.08786289393901825,
0.44141942262649536,
0.06090162694454193,
0.20753447711467743,
-0.042608585208654404,
-0.003882288932800293,
-0.0590648427605629,
0.24754396080970764,
-0.270088791847229,
-0.14406976103782654,
-0.4942212700843811,
0.1290109008550644,
0.059081852436065674,
0.2485807240009308,
-0.19131898880004883,
0.061956413090229034,
0.2353729009628296,
0.22714155912399292,
-0.057864755392074585,
-0.23145592212677002,
0.5725952982902527,
0.011407645419239998,
0.035113465040922165,
0.221024289727211,
-0.00011821871157735586,
0.005787737667560577,
0.23596572875976562,
-0.0812724307179451,
-0.4586206078529358,
-0.2777388095855713,
-0.1937723159790039,
0.2858187258243561,
-0.01850215159356594,
-0.19567729532718658,
-0.024190464988350868,
-0.03186509385704994,
-0.08902231603860855,
-0.2912682294845581,
0.30454549193382263,
0.14111165702342987,
0.1012161523103714,
0.5076858997344971,
-0.001560363918542862,
-0.10396960377693176,
0.2827215790748596,
0.3210790157318115,
-0.1544622778892517,
0.20941831171512604,
0.18122506141662598,
-0.2964428961277008,
-0.0707191452383995,
0.2409772425889969,
0.23077893257141113,
0.12238359451293945,
0.3430543839931488,
0.26235732436180115,
0.029342982918024063,
-0.2340618371963501,
0.04564930126070976,
0.35613879561424255,
0.15280228853225708,
-0.1587792932987213,
-0.08083488047122955,
0.1110711470246315,
0.18553969264030457,
-0.19129382073879242,
0.21027052402496338,
0.08509223908185959,
-0.4934513568878174,
-0.04505142197012901,
0.17143666744232178,
-0.16580155491828918,
-0.26850950717926025,
0.2046647071838379,
0.03102482110261917,
0.02565837651491165,
0.052260179072618484,
0.1541385054588318,
-0.05378485843539238,
-0.37984687089920044,
-0.18095073103904724,
0.05662274733185768,
0.2785692811012268,
0.1867062896490097,
-0.34620338678359985,
-0.039739593863487244,
0.14260223507881165,
-0.31744691729545593,
0.41027048230171204,
0.02382401004433632,
0.07192173600196838,
0.06563758850097656,
-0.4437948763370514,
0.05652112886309624,
0.018970496952533722,
0.006428329274058342,
0.06348854303359985,
0.025846432894468307,
0.32525789737701416,
-0.14432385563850403,
-0.052167873829603195,
0.06220986694097519,
0.03315285965800285,
0.05489768087863922,
-0.004763869568705559,
-0.23825785517692566,
0.4292411208152771,
-0.005467742681503296,
-0.3453383147716522,
0.22381222248077393,
0.1361614167690277,
-0.034696418792009354,
-0.026523400098085403,
0.3213924169540405,
0.2820683419704437,
0.13555502891540527,
-0.06405070424079895,
0.20143166184425354,
-0.2725865840911865,
-0.43512386083602905,
-0.19451482594013214,
-0.0652184933423996,
-0.020177392289042473,
0.13895513117313385,
0.20192871987819672,
-0.4108029901981354,
0.025599421933293343,
0.3576527237892151,
0.24123594164848328,
-0.062457963824272156,
-0.08544442802667618,
0.06954053044319153,
-0.04390709847211838,
0.20657846331596375,
0.15283749997615814,
0.13274413347244263,
0.2927933633327484,
-0.6724523305892944,
-0.02645614743232727,
0.14883002638816833,
-0.4627384543418884,
-0.3408791124820709,
-0.2876136302947998,
0.1304149180650711,
0.10750524699687958,
-0.03381449729204178,
-0.3273072838783264,
-0.033197809010744095,
0.07683165371417999,
0.3027571439743042,
-0.014591090381145477,
-0.35400885343551636,
-0.1421956568956375,
-0.33907440304756165,
0.13743063807487488,
0.44908881187438965,
-0.302602618932724,
-0.03413676097989082,
0.10840027779340744,
-0.03957657888531685,
0.1453765481710434,
0.6637609601020813,
-0.11321868747472763,
0.15575379133224487,
-0.268851637840271,
0.21698875725269318,
0.46573713421821594,
-0.2953678369522095,
-0.4891293942928314,
0.5142923593521118,
-0.2447420209646225,
-0.09069450944662094,
0.09651720523834229,
0.34137728810310364,
-0.0515388660132885,
0.007289493922144175,
0.28037455677986145,
0.2847389578819275,
-0.07047227770090103,
0.013605428859591484,
-0.27413254976272583,
-0.21104124188423157,
0.13748228549957275,
0.2579408288002014,
0.006383150815963745,
0.257450670003891,
-0.03974243253469467,
0.13185785710811615,
0.2551366984844208,
-0.3740135431289673,
0.16469621658325195,
-0.13877159357070923,
0.4423972964286804,
0.13371893763542175,
0.07546504586935043,
0.16147521138191223,
-0.5667372345924377,
0.20114773511886597,
-0.027150986716151237,
0.18707241117954254,
-0.22953487932682037,
-0.22637642920017242,
-0.3379978537559509,
0.1709313988685608,
-0.3567273020744324,
0.2806508541107178,
-0.06449999660253525,
-0.12053824961185455,
-0.01418549194931984,
-0.05275149270892143,
-0.11957977712154388,
0.21798652410507202,
-0.3730083405971527,
0.1698514074087143,
-0.5135228633880615,
0.3820357918739319,
0.015154123306274414,
-0.0033491821959614754,
-0.009486831724643707,
0.16080866754055023,
-0.09747553616762161,
-0.15287262201309204,
-0.13900026679039001,
0.20451462268829346,
-0.03181565925478935,
0.09982280433177948,
0.07858675718307495,
0.11241859942674637,
0.3132002651691437,
-0.2474362999200821,
0.09738720208406448,
0.4204614460468292,
0.10180845856666565,
-0.10782119631767273,
-0.2806728780269623,
0.6413204073905945,
-0.26553797721862793,
0.14655855298042297,
0.023377232253551483,
0.09971411526203156,
0.14490854740142822,
-0.018335528671741486,
-0.1565014123916626,
-0.456420361995697,
0.07554235309362411,
-0.08659575879573822,
0.1723826825618744,
-0.04150225967168808,
-0.5107375383377075,
0.1601005345582962,
0.46657729148864746,
0.09780088067054749,
0.15034067630767822,
0.3520166575908661,
-0.046125464141368866,
-0.037299349904060364,
-0.2707842290401459,
0.34721243381500244,
0.41867291927337646,
0.006645346060395241,
-0.2218790054321289,
0.02325272746384144,
-0.34469613432884216,
-0.28199487924575806,
0.06179215386509895,
-0.33654874563217163,
-0.08019376546144485,
0.21388480067253113,
0.06408748030662537,
-0.027421988546848297,
-0.33606627583503723,
-0.053580962121486664,
0.06404145061969757,
0.35137543082237244,
-0.5140120983123779,
-0.18347248435020447,
-0.17380928993225098,
-0.6247996687889099,
-0.2197035402059555,
0.06827592104673386,
0.1395660787820816,
-0.341312438249588,
0.04226294159889221,
0.16813306510448456,
-0.027262168005108833,
-0.11991075426340103,
0.057417940348386765,
0.308328241109848,
0.1335734724998474,
-0.1832108199596405,
-0.057921621948480606,
-0.16918283700942993,
-0.15204176306724548,
-0.015569094568490982,
0.11589311063289642,
-0.051890887320041656,
0.33637991547584534,
-0.0917728841304779,
0.05764581263065338,
-0.5386191010475159,
-0.36671212315559387,
0.06299694627523422,
-0.13291610777378082,
0.09669581055641174,
0.1896066516637802,
0.4263232350349426,
-0.14972880482673645,
-0.3702143430709839,
0.4545181095600128,
-0.1328841894865036,
-0.29820558428764343,
0.21089373528957367,
-0.1885073333978653,
0.0058830552734434605,
-0.1925976425409317,
-0.5648372769355774,
0.1293589174747467,
-0.25542837381362915,
0.18411242961883545,
0.10105003416538239,
0.25545576214790344,
0.15736150741577148,
0.059834208339452744,
-0.02135905623435974,
0.432756245136261,
-0.46052131056785583,
-0.4601735770702362,
-0.17894107103347778,
0.3468569219112396,
-0.32066988945007324,
-0.47480520606040955,
-0.16727067530155182,
-0.053693875670433044,
0.24486123025417328,
0.1639300286769867,
-0.37261587381362915,
0.036247845739126205,
-0.14615219831466675,
0.6259244084358215,
-0.07845761626958847,
0.05638720467686653,
0.0033468902111053467,
-0.04540858417749405,
-0.006913762539625168,
-0.10389535874128342,
0.128615602850914,
0.3307229280471802,
0.1364133656024933,
0.12085731327533722,
0.5113130807876587,
0.45780321955680847,
-0.0726824626326561,
0.7307401895523071,
0.387890100479126,
-0.09391121566295624,
0.383921355009079,
-0.2607836425304413,
0.02835797518491745,
-0.18753305077552795,
-0.07718368619680405,
-0.06982722878456116,
0.08935143798589706,
0.22471140325069427,
0.07532493025064468,
-0.056358158588409424,
0.20101384818553925,
0.1043955534696579,
0.32354840636253357,
0.08410469442605972,
-0.36298802495002747,
0.2535824179649353,
-0.22350826859474182,
0.03470541909337044,
-0.002383461222052574,
-0.05879982188344002,
-0.19344498217105865,
-0.19660717248916626,
0.15516257286071777,
0.2092355191707611,
0.26641330122947693,
0.14930814504623413,
-0.2545773386955261,
0.04152853041887283,
-0.5325751304626465,
0.14235402643680573,
-0.03422243520617485,
0.4112561345100403,
-0.19064311683177948,
0.0005641579627990723,
0.10263615846633911,
0.1655982881784439,
0.4364411234855652,
-0.280863881111145,
0.12093392014503479,
-0.10331235826015472,
0.0926191657781601,
-0.3388013243675232,
-0.017609218135476112,
-0.13977091014385223,
-0.2068336457014084,
-0.11034877598285675,
0.8588706254959106,
-0.13478653132915497,
-0.16665968298912048,
0.023816337808966637,
-0.0798940509557724,
-0.3452743589878082,
-0.31797340512275696,
-0.12655776739120483,
-0.26474544405937195,
-0.3410584628582001,
-0.1245569959282875,
-0.07428428530693054,
0.03844147548079491,
-0.04100974649190903,
0.05263524875044823,
-0.12892818450927734,
0.13120925426483154,
0.2488941252231598,
0.07973457872867584,
0.1856541931629181,
0.254916250705719,
0.21639537811279297,
-0.13672712445259094,
0.045827608555555344,
0.18890924751758575,
0.4144461154937744,
-0.007674571126699448,
-0.37830114364624023,
-0.05806785076856613,
-0.29498109221458435,
0.04997967183589935,
0.17437033355236053,
-0.06493344157934189,
0.2576630115509033,
-0.1459156572818756,
0.1320277750492096,
-0.39907893538475037,
0.004097675438970327,
0.27096283435821533,
-0.12036390602588654,
-0.18299539387226105,
-0.3075173795223236,
0.5558342933654785,
-0.04542878270149231,
-0.06114833056926727,
0.34984877705574036,
0.31612080335617065,
-0.14541326463222504,
0.6077870726585388,
0.15573084354400635,
0.7579225897789001,
-0.26643645763397217,
0.08567088842391968,
0.4314408004283905,
0.013101860880851746,
0.6889247298240662,
-0.03329647332429886,
-0.20753233134746552,
-0.3804609477519989,
-0.258282333612442,
-0.11414965242147446,
-0.08925636112689972,
-0.17352697253227234,
0.22378800809383392,
-0.12045243382453918,
0.2171325981616974,
-0.1698046624660492,
0.01644698902964592,
0.006638737861067057,
0.41524967551231384,
-0.12452464550733566,
-0.32070791721343994,
-0.021495260298252106,
0.05655109882354736,
-0.047884657979011536,
0.4819026291370392,
-0.004426330327987671,
-0.07555133104324341,
-0.06198345124721527,
-0.26598548889160156,
-0.3030019700527191,
0.13604962825775146,
-0.006983285304158926,
0.2537103295326233,
0.2293512374162674,
-0.39813774824142456,
0.25833672285079956,
0.2784711420536041,
0.6117492914199829,
-0.14540253579616547,
-0.041295237839221954,
0.005825299769639969,
0.10020175576210022,
0.1814713329076767,
-0.07938039302825928,
0.016511499881744385,
0.452820748090744,
0.03602001070976257,
-0.11769398301839828,
-0.09923840314149857,
0.15856826305389404,
-0.17603540420532227,
-0.4426097571849823,
-0.19192610681056976,
-0.35121768712997437,
-0.23920036852359772,
-0.10008552670478821,
-0.17584514617919922,
-0.09489269554615021,
0.03539925441145897,
0.009158210828900337,
-0.00813543051481247,
0.15504860877990723,
-0.03435710817575455,
0.1885126680135727,
-0.2985709309577942,
0.06549370288848877,
0.09804092347621918,
0.22556820511817932,
-0.0593980997800827,
0.5643970966339111,
0.12395037710666656,
0.06380235403776169,
-0.17367267608642578,
-0.08834311366081238,
0.5117590427398682,
-0.4351978302001953,
-0.015787091106176376,
-0.11681552231311798,
0.13969729840755463,
0.1275130659341812,
0.20934465527534485,
0.27133530378341675,
0.21617552638053894,
0.016828570514917374,
-0.4226858913898468,
-0.4231400191783905,
0.18345466256141663,
-0.23830531537532806,
0.053657978773117065,
-0.21943166851997375,
0.17623350024223328,
0.04672032594680786,
0.13175714015960693,
-0.22713011503219604,
0.011875476688146591,
0.032993756234645844,
-0.08842605352401733,
0.4423236846923828,
0.19746112823486328,
-0.018912285566329956,
0.1438005268573761,
0.041159145534038544,
0.02925954945385456,
-0.2791414260864258,
-0.0926804393529892,
-0.29723671078681946,
0.15767830610275269,
0.0006597284227609634,
0.0654931366443634,
0.004194038920104504,
-0.14795690774917603,
-0.01721140742301941,
-0.01383371651172638,
0.3544199466705322,
0.09508126229047775,
-0.24352841079235077,
0.3452397286891937,
-0.14117825031280518,
0.24810269474983215,
-0.10614380240440369,
0.10935506969690323,
0.09907470643520355,
0.45708775520324707,
-0.0064911916851997375,
0.09784969687461853,
-0.0868634507060051,
-0.057925231754779816,
-0.8441803455352783,
0.18834614753723145,
0.09235185384750366,
-0.14969635009765625,
0.053136393427848816,
-0.3454822897911072,
0.05814487859606743,
-0.1585342139005661,
0.0026860274374485016,
0.1437491923570633,
-0.34737110137939453,
-0.028275664895772934,
0.09612426906824112,
0.16192063689231873,
-0.09173799306154251,
-0.23512092232704163,
-0.1227787435054779,
0.06818672269582748,
-0.04777372255921364,
0.28565990924835205,
0.18952488899230957,
0.049538567662239075,
-0.26131671667099,
-0.2105497419834137,
0.21168437600135803,
-0.6142411828041077,
0.008457181975245476,
0.5428473353385925,
-0.11654634773731232,
-0.019193481653928757,
0.008878419175744057,
0.18177106976509094,
-0.11597395688295364,
0.486844003200531,
-0.05802755802869797,
0.07771589607000351,
0.08646535873413086,
0.2649024426937103,
0.2574901282787323,
-0.1879974752664566,
-0.046661127358675,
0.572647213935852,
-0.4538513422012329,
0.17835357785224915,
0.3731362819671631,
0.5612056851387024,
-0.017750944942235947,
-0.10540793091058731,
-0.23181980848312378,
-0.07125577330589294,
-0.2318294644355774,
-0.2709779441356659,
-0.4251096546649933,
-0.1855175644159317,
-0.37639346718788147,
0.16447247564792633,
-0.14374950528144836,
0.0870300829410553,
0.037990354001522064,
0.22013787925243378,
-0.05084142088890076,
-0.3381512463092804,
0.012977663427591324,
0.22908243536949158,
0.07972249388694763,
-0.24879975616931915,
0.1437990814447403,
0.14672121405601501,
-0.11645327508449554,
0.27594491839408875,
0.12964081764221191,
0.41799554228782654,
0.4494100511074066,
0.1495429426431656,
0.2901522219181061,
-0.06217256560921669,
-0.09720763564109802,
0.03165199235081673,
0.04115807265043259,
0.23377755284309387,
-0.20438607037067413,
0.3510063886642456,
0.04402907192707062,
-0.04713208228349686,
-0.14509063959121704,
0.1875879168510437,
0.25257760286331177,
-0.12958335876464844,
0.35477468371391296,
-0.20983217656612396,
-0.11670250445604324,
0.03160684555768967,
0.08201859146356583,
-0.1671605259180069,
0.056748904287815094,
0.39987435936927795,
0.35467544198036194,
0.2771972119808197,
-0.12190928310155869,
0.05160810053348541,
-0.15295636653900146,
0.5715516209602356,
0.27682819962501526,
-0.043203093111515045,
-0.27892714738845825,
-0.4268174171447754,
-0.7540885806083679,
0.16680459678173065,
-0.0210881344974041,
-0.11928431689739227,
0.1551036238670349,
0.3425880968570709,
0.1806437373161316,
0.09645849466323853,
-0.13031382858753204,
-0.4154455065727234,
-0.07247838377952576,
0.4477211534976959,
-0.17747510969638824,
-0.03888547047972679,
0.07583550363779068,
-0.06118163466453552,
-0.14083026349544525,
-0.41516733169555664,
0.1325242668390274,
0.24366891384124756,
-0.08925026655197144,
-0.36855483055114746,
0.4689706563949585,
0.11933097243309021,
0.08840726315975189,
0.1792704164981842,
0.24489359557628632,
0.36827194690704346,
0.06840412318706512,
-0.204387366771698,
-0.10188812017440796,
-0.26902586221694946,
-0.35083213448524475,
0.2523496747016907,
0.10516330599784851,
0.2737441062927246,
0.16659492254257202,
-0.21776904165744781,
-0.3813335597515106,
0.07669466733932495,
0.15709581971168518,
-0.44206342101097107,
-0.3601761758327484,
0.1697433441877365,
-0.1750991940498352,
-0.101845383644104,
0.1536196917295456,
0.34858909249305725,
0.14362329244613647,
0.13225717842578888,
0.035423651337623596,
-0.5088879466056824,
0.18322618305683136,
-0.3091132938861847,
-0.24313360452651978,
-0.03413867577910423,
0.291481614112854,
-0.19423118233680725,
-0.06351856887340546,
-0.33911222219467163,
0.16032907366752625,
0.14093947410583496,
-0.22604307532310486,
-0.3101966381072998,
0.12646333873271942,
0.06680426746606827,
0.2259739488363266,
-0.24132612347602844,
0.3000391125679016,
0.13779038190841675,
-0.24910102784633636,
0.17467398941516876,
-0.27209967374801636
] |
https://github.com/huggingface/datasets/issues/2226 | Batched map fails when removing all columns | I found the problem. I called `set_format` on some columns before. This makes it crash. Here is a complete example to reproduce:
```python
from datasets import load_dataset
sst = load_dataset("sst")
sst.set_format("torch", columns=["label"], output_all_columns=True)
ds = sst["train"]
# crashes
ds.map(
lambda x: {"a": list(range(20))},
remove_columns=ds.column_names,
load_from_cache_file=False,
num_proc=1,
batched=True,
)
``` | Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_ | 49 | Batched map fails when removing all columns
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_
I found the problem. I called `set_format` on some columns before. This makes it crash. Here is a complete example to reproduce:
```python
from datasets import load_dataset
sst = load_dataset("sst")
sst.set_format("torch", columns=["label"], output_all_columns=True)
ds = sst["train"]
# crashes
ds.map(
lambda x: {"a": list(range(20))},
remove_columns=ds.column_names,
load_from_cache_file=False,
num_proc=1,
batched=True,
)
``` | [
-0.18979878723621368,
0.11866973340511322,
0.016956862062215805,
0.03455599397420883,
0.2957548499107361,
0.19975599646568298,
0.7953289747238159,
0.3469541370868683,
0.26812177896499634,
0.5083369612693787,
0.12785471975803375,
0.398631751537323,
-0.22215960919857025,
-0.14976075291633606,
-0.2561759948730469,
-0.22585457563400269,
0.18031522631645203,
0.19393658638000488,
-0.15434545278549194,
0.11382858455181122,
-0.3259882628917694,
-0.07435615360736847,
-0.5531977415084839,
0.11370562016963959,
0.09986529499292374,
-0.2811594307422638,
-0.24591447412967682,
-0.26074787974357605,
0.040527209639549255,
-0.36175301671028137,
0.09004701673984528,
-0.2502872347831726,
0.11281108856201172,
0.48397859930992126,
-0.00011687954975059256,
0.021830476820468903,
0.17167118191719055,
-0.033469878137111664,
-0.13261573016643524,
0.06407731771469116,
-0.16879600286483765,
-0.1176634132862091,
-0.04967597872018814,
-0.3645479083061218,
0.5358586311340332,
-0.21088403463363647,
-0.3315514326095581,
-0.38117527961730957,
-0.04057256877422333,
0.10075534135103226,
0.16948789358139038,
0.14696469902992249,
-0.02365550398826599,
0.12438398599624634,
0.1997407078742981,
-0.034338340163230896,
-0.10411706566810608,
-0.008293168619275093,
0.4995138347148895,
-0.4657592475414276,
-0.09078357368707657,
0.2961731255054474,
-0.2830583155155182,
-0.02301613986492157,
0.10040740668773651,
-0.04641379043459892,
0.2637532353401184,
-0.4090450704097748,
0.17072486877441406,
0.11647991836071014,
-0.018044553697109222,
-0.32840049266815186,
-0.05480524152517319,
-0.184510737657547,
-0.1374211460351944,
-0.5785285830497742,
-0.1803826093673706,
0.07191245257854462,
-0.291910320520401,
-0.11508792638778687,
-0.4573720693588257,
0.1599920392036438,
0.032621368765830994,
0.17724226415157318,
-0.057801924645900726,
0.30288419127464294,
0.15108835697174072,
0.5388101935386658,
0.013868346810340881,
-0.060308657586574554,
-0.0003700181841850281,
-0.02769305557012558,
0.03298603370785713,
0.36770883202552795,
-0.49318569898605347,
-0.13272728025913239,
-0.03208480775356293,
-0.1082744225859642,
0.28407174348831177,
-0.2979655861854553,
0.09480991214513779,
-0.029226552695035934,
0.5917069315910339,
0.18590644001960754,
0.44408151507377625,
0.2730582058429718,
0.02110413834452629,
0.13221964240074158,
0.09277927875518799,
-0.05320385843515396,
0.06084189936518669,
-0.0009547993540763855,
0.29145851731300354,
-0.08199448138475418,
0.5020077228546143,
0.2725432515144348,
0.02595311775803566,
-0.00721944123506546,
-0.07520709931850433,
-0.15861673653125763,
-0.33841848373413086,
0.20462776720523834,
-0.09116176515817642,
0.06777539104223251,
0.2737884223461151,
0.08788701891899109,
-0.3580183982849121,
0.1353778839111328,
-0.09667571634054184,
-0.19381411373615265,
-0.11332409083843231,
0.11583419144153595,
-0.34515249729156494,
-0.15097886323928833,
0.35294410586357117,
0.10305866599082947,
0.1164730116724968,
-0.00473000667989254,
-0.010748691856861115,
-0.11933321505784988,
-0.24323035776615143,
-0.12899577617645264,
0.22583803534507751,
0.028938651084899902,
0.10470950603485107,
0.16806980967521667,
0.2093173861503601,
0.033626489341259,
-0.013857051730155945,
0.2573040723800659,
-0.053613290190696716,
-0.3020162582397461,
-0.1343100666999817,
0.11983048170804977,
0.09180601686239243,
0.204055055975914,
-0.3438607156276703,
0.03841831535100937,
0.4002183675765991,
0.06123930588364601,
0.0008472278714179993,
-0.2906818985939026,
0.22065728902816772,
-0.2849716246128082,
-0.1069677546620369,
0.25885236263275146,
-0.5109864473342896,
0.15871524810791016,
0.07895604521036148,
0.07717081904411316,
0.23785892128944397,
0.27492624521255493,
-0.228709876537323,
0.11791068315505981,
-0.17853732407093048,
0.2879096269607544,
0.11588110774755478,
-0.12190648913383484,
-0.12918822467327118,
0.258270800113678,
-0.17101062834262848,
0.006178798153996468,
-0.24031230807304382,
-0.1835014820098877,
0.6115529537200928,
-0.2941826581954956,
0.1319783329963684,
-0.0414862334728241,
-0.3053472340106964,
0.1779930591583252,
-0.15822800993919373,
-0.2711122930049896,
-0.047170184552669525,
-0.0894278883934021,
0.1199708878993988,
-0.016976967453956604,
0.30239078402519226,
-0.45130813121795654,
0.22861793637275696,
-0.32650360465049744,
0.33921703696250916,
0.41507136821746826,
0.09180684387683868,
-0.03519337624311447,
0.16639813780784607,
-0.16155308485031128,
-0.7281160950660706,
0.19810721278190613,
0.1456976681947708,
-0.08799800276756287,
-0.35342442989349365,
-0.2648589015007019,
0.07653196901082993,
0.15014243125915527,
0.022683631628751755,
0.1255520135164261,
0.07119554281234741,
-0.20246201753616333,
0.051079053431749344,
-0.3482044041156769,
-0.2364071160554886,
-0.22094173729419708,
-0.13908670842647552,
0.1733427494764328,
-0.1894964873790741,
-0.34416553378105164,
-0.027975423261523247,
-0.35719794034957886,
-0.020404145121574402,
0.1966484636068344,
0.23935627937316895,
-0.13078360259532928,
-0.018650824204087257,
0.4590829908847809,
-0.19795913994312286,
-0.07768841087818146,
-0.42476025223731995,
-0.08108703792095184,
-0.04541448503732681,
-0.04062581807374954,
-0.034259021282196045,
-0.15995043516159058,
0.14245115220546722,
-0.1447393149137497,
-0.3011455535888672,
0.002928897738456726,
-0.23812057077884674,
0.5006269812583923,
-0.14982745051383972,
-0.03738318383693695,
-0.056135788559913635,
0.02313324436545372,
-0.07715516537427902,
-0.15313756465911865,
-0.10967610776424408,
-0.04894715175032616,
-0.2542678117752075,
-0.030523313209414482,
0.026086799800395966,
-0.17734846472740173,
0.2219044268131256,
-0.04198431968688965,
0.03355366364121437,
-0.007362630218267441,
-0.25891774892807007,
0.0027916617691516876,
0.3395202159881592,
-0.08999232947826385,
0.4603513479232788,
0.13658256828784943,
0.0819968432188034,
-0.04187574237585068,
0.19161614775657654,
0.08381590247154236,
0.11060012131929398,
0.2706126868724823,
0.09256718307733536,
0.0756218358874321,
0.398668110370636,
0.016147250309586525,
-0.266187846660614,
-0.35107743740081787,
0.1753145158290863,
0.4957437217235565,
-0.20448249578475952,
-0.04380005598068237,
-0.08302329480648041,
0.0995052233338356,
0.22366540133953094,
-0.1830223798751831,
0.07135304808616638,
-0.4394611716270447,
-0.1476137340068817,
0.1156398206949234,
-0.12647368013858795,
0.25425371527671814,
-0.15952254831790924,
-0.06082169711589813,
0.18766526877880096,
-0.026490183547139168,
-0.14607909321784973,
-0.14952029287815094,
-0.17107713222503662,
0.014662466943264008,
-0.03508308529853821,
-0.14457766711711884,
0.040758270770311356,
0.47899964451789856,
-0.343545138835907,
-0.22553278505802155,
-0.06354400515556335,
-0.00632062554359436,
-0.5026288032531738,
-0.06887480616569519,
0.3389747738838196,
0.20593515038490295,
-0.30359381437301636,
-0.15609943866729736,
0.08317828923463821,
-0.12395375221967697,
0.07857446372509003,
0.2210022509098053,
0.13135841488838196,
-0.10475702583789825,
-0.23363080620765686,
0.1117873340845108,
0.07313431054353714,
-0.284395694732666,
0.1609162837266922,
-0.12004256248474121,
0.23899754881858826,
-0.2521992027759552,
0.22788022458553314,
-0.24727214872837067,
-0.0553632453083992,
-0.4037474989891052,
0.09749740362167358,
-0.010698389261960983,
0.15428481996059418,
0.11200246959924698,
-0.01123281940817833,
0.04519461467862129,
-0.052566900849342346,
0.03299158811569214,
0.33304303884506226,
-0.33552783727645874,
0.04633975774049759,
-0.10269138216972351,
0.13522279262542725,
-0.003296356648206711,
0.23263764381408691,
0.32577037811279297,
0.2052084505558014,
0.0374394953250885,
-0.01692524552345276,
-0.16421352326869965,
0.08178572356700897,
-0.06823144853115082,
-0.003880523145198822,
0.09990613907575607,
0.4984063506126404,
0.2369375228881836,
0.5979440808296204,
0.20428046584129333,
-0.08568271994590759,
0.09482407569885254,
-0.13273559510707855,
0.03994275629520416,
-0.11805140227079391,
-0.34693506360054016,
0.09493277221918106,
-0.3334673047065735,
-0.015374110080301762,
0.09163137525320053,
-0.14291861653327942,
-0.5661893486976624,
0.02627776563167572,
0.31827226281166077,
0.035610049962997437,
-0.27050456404685974,
0.22948844730854034,
-0.242961585521698,
0.23724818229675293,
0.11681273579597473,
0.019995547831058502,
-0.26691487431526184,
-0.11071229726076126,
0.2998274266719818,
-0.3833627700805664,
0.17250952124595642,
-0.21189962327480316,
-0.36502930521965027,
-0.006512852385640144,
-0.744090735912323,
0.45078933238983154,
0.08284284919500351,
0.3523317277431488,
0.17418541014194489,
-0.012168269604444504,
0.020938165485858917,
0.1607968956232071,
0.41664648056030273,
-0.2360406070947647,
-0.18812242150306702,
0.15946604311466217,
0.18267598748207092,
-0.4863574206829071,
-0.05720466747879982,
-0.31454718112945557,
0.18108341097831726,
0.2628195881843567,
0.8223787546157837,
-0.34497857093811035,
-0.07852362096309662,
0.35615310072898865,
0.1908121556043625,
0.08197388052940369,
-0.1069038063287735,
-0.1756308227777481,
-0.29241156578063965,
-0.11214148998260498,
0.13984256982803345,
0.3096798360347748,
0.18819184601306915,
0.1740516871213913,
-0.24823535978794098,
0.017187314108014107,
-0.14493340253829956,
0.10381860285997391,
0.020053796470165253,
-0.05512913316488266,
-0.10259874910116196,
0.07481150329113007,
-0.18758250772953033,
0.019702870398759842,
0.09852291643619537,
0.15182027220726013,
-0.27804815769195557,
-0.11839854717254639,
0.09803898632526398,
-0.16545651853084564,
0.5431217551231384,
0.2424987107515335,
0.01176669355481863,
0.16350868344306946,
-0.3425573408603668,
0.3598185181617737,
0.12241225689649582,
-0.4356710910797119,
0.34943878650665283,
0.03647763282060623,
-0.3460501730442047,
0.11964349448680878,
0.21441739797592163,
0.20633001625537872,
-0.032367460429668427,
0.7606865763664246,
0.013284258544445038,
-0.24127651751041412,
0.7118187546730042,
0.19663015007972717,
0.6759189963340759,
-0.1432671993970871,
-0.07122145593166351,
0.29020771384239197,
0.36088234186172485,
0.28426650166511536,
0.11269688606262207,
0.3811623454093933,
-0.3241284191608429,
-0.060373492538928986,
0.003322763368487358,
-0.035157427191734314,
0.19035080075263977,
0.4072137475013733,
0.029236558824777603,
0.3826393485069275,
-0.1521289050579071,
0.4469076693058014,
-0.025274625048041344,
-0.17739121615886688,
0.12368957698345184,
-0.3599649965763092,
0.08802822977304459,
0.02086815983057022,
0.04612221196293831,
-0.12137874960899353,
-0.08263710141181946,
0.09848273545503616,
0.05943947657942772,
-0.33959221839904785,
-0.1458568274974823,
-0.005959939211606979,
-0.2831456959247589,
0.27958279848098755,
-0.017886146903038025,
-0.02359158545732498,
-0.027655376121401787,
0.18575815856456757,
-0.13755066692829132,
0.023104548454284668,
0.2528838515281677,
-0.023412812501192093,
0.5783452987670898,
0.15323802828788757,
0.07189783453941345,
0.08016087114810944,
-0.34420067071914673,
0.058282844722270966,
-0.05810816213488579,
0.14417006075382233,
-0.26817095279693604,
-0.29177242517471313,
-0.3978099524974823,
0.3020227253437042,
0.22782890498638153,
-0.4201088547706604,
-0.1749856173992157,
-0.18197143077850342,
-0.028987105935811996,
-0.24931156635284424,
0.017911817878484726,
-0.11207316815853119,
-0.10370609164237976,
0.7665063142776489,
-0.19712871313095093,
-0.2018839418888092,
0.00011632591485977173,
0.05428292602300644,
-0.010372389107942581,
-0.007301829755306244,
0.5093961954116821,
0.19330669939517975,
-0.19068530201911926,
-0.14476682245731354,
-0.1147618293762207,
0.22984983026981354,
-0.4227212369441986,
0.14814165234565735,
-0.33450454473495483,
0.3107253313064575,
0.1378767341375351,
0.3870108127593994,
-0.05615440011024475,
0.1035892441868782,
-0.05872917175292969,
-0.13764667510986328,
-0.3454741835594177,
0.22680331766605377,
0.2731829285621643,
0.2479776293039322,
0.009982939809560776,
0.023875445127487183,
-0.2870258688926697,
0.13959403336048126,
-0.23107177019119263,
0.12929481267929077,
0.029675742611289024,
0.4705129563808441,
0.2248266637325287,
0.18418774008750916,
-0.06372099369764328,
0.12226340174674988,
0.1711612045764923,
0.32366085052490234,
0.2282157987356186,
-0.18906012177467346,
0.08714459836483002,
0.08451704680919647,
0.041425954550504684,
-0.04404635727405548,
0.040792178362607956,
-0.1662180870771408,
-0.22589534521102905,
-0.24934527277946472,
0.28349313139915466,
0.20771288871765137,
-0.13485372066497803,
-0.05110098794102669,
0.26740166544914246,
0.09066814184188843,
-0.009100820869207382,
0.11659636348485947,
-0.22739878296852112,
-0.08283966779708862,
0.1396971195936203,
0.33655619621276855,
0.14467753469944,
-0.09222797304391861,
0.0380745492875576,
0.07921785861253738,
-0.18549524247646332,
0.18613773584365845,
0.274154394865036,
-0.3076930046081543,
-0.07418333739042282,
-0.02052895352244377,
0.357176810503006,
0.10771727561950684,
-0.26558563113212585,
-0.15787121653556824,
0.09432877600193024,
0.19320178031921387,
-0.0930132120847702,
0.014783180318772793,
0.3097124993801117,
0.3044719099998474,
0.24030449986457825,
0.4139222502708435,
0.03112933412194252,
-0.4228920340538025,
-0.13559171557426453,
-0.08688489347696304,
0.5410780310630798,
-0.13245907425880432,
-0.2924460172653198,
0.6839472055435181,
-0.14826148748397827,
-0.01082923635840416,
0.2884370982646942,
0.19199484586715698,
0.3235800564289093,
0.5047317743301392,
-0.07149311155080795,
0.08536960184574127,
0.3333711624145508,
0.104234479367733,
-0.282267302274704,
-0.4482131898403168,
0.2085963487625122,
0.23430007696151733,
0.09127594530582428,
0.14383545517921448,
0.17834050953388214,
0.08903360366821289,
-0.0002726772800087929,
-0.216752827167511,
0.21800005435943604,
0.2582811117172241,
-0.3013063073158264,
-0.025725092738866806,
-0.36469846963882446,
-0.07656081020832062,
0.19261139631271362,
-0.051690228283405304,
-0.15792186558246613,
-0.16245988011360168,
0.5937281847000122,
0.06202095001935959,
-0.05641870200634003,
-0.33401811122894287,
-0.1528504192829132,
-0.0166739784181118,
0.35457152128219604,
-0.15175774693489075,
0.1551143229007721,
0.009670250117778778,
0.08955545723438263,
-0.2272726595401764,
0.0879208967089653,
0.4263055920600891,
0.35676637291908264,
0.0829305499792099,
0.047726456075906754,
-0.10911338031291962,
-0.1831456869840622,
-0.030031567439436913,
0.10759298503398895,
0.21640220284461975,
0.3985656797885895,
0.3411513566970825,
0.0027499888092279434,
-0.06748182326555252,
-0.03322713449597359,
0.3050510883331299,
0.13561305403709412,
-0.016414742916822433,
-0.033591292798519135,
0.04039512947201729,
-0.4961535334587097,
-0.12159420549869537,
-0.20806267857551575,
-0.019833307713270187,
-0.2020421326160431,
0.3985046446323395,
-0.147050678730011,
0.23875641822814941,
0.022179260849952698,
0.05887287110090256,
-0.09845839440822601,
0.03655865415930748,
0.49198779463768005,
-0.31340911984443665,
-0.5499471426010132,
-0.20506688952445984,
-0.3719422221183777,
-0.0011592432856559753,
-0.731938362121582,
-0.0049582067877054214,
0.22085753083229065,
0.19440504908561707,
0.12525032460689545,
0.07472439855337143,
0.07634609192609787,
0.16761904954910278,
-0.2411893904209137,
0.8675715923309326,
-0.3371376395225525,
0.08649951219558716,
-0.08162753283977509,
0.011899003759026527,
0.09368686378002167,
-0.5087845921516418,
0.42042773962020874,
0.2190045863389969,
0.01833578199148178,
-0.15650011599063873,
-0.014172397553920746,
0.19349439442157745,
-0.11327119171619415,
0.3862437307834625,
0.04135338217020035,
0.07817909121513367,
0.18506518006324768,
-0.3118220269680023,
-0.3471720218658447,
0.09690792113542557,
-0.1761683225631714,
0.12077992409467697,
0.21304118633270264,
0.18974639475345612,
-0.058404140174388885,
0.020045625045895576,
-0.07977790385484695,
0.05486486107110977,
-0.05496196448802948,
0.05512993782758713,
-0.15366815030574799,
0.1488112062215805,
0.08467740565538406,
0.17721176147460938,
0.0675942674279213,
0.05625345557928085,
0.1116034984588623,
0.2221059799194336,
-0.38740313053131104,
-0.3115001916885376,
0.47522494196891785,
-0.7607836127281189,
-0.6713260412216187,
-0.08754003047943115,
0.06659846752882004,
0.09032490849494934,
-0.15698955953121185,
-0.3100396990776062,
-0.020097263157367706,
0.2628043591976166,
-0.19319233298301697,
-0.1906292587518692,
-0.005261490121483803,
-0.3285938799381256,
0.007253795862197876,
-0.01651875488460064,
0.07770062237977982,
0.0896192118525505,
-0.1323934942483902,
-0.002824649214744568,
-0.39927035570144653
] |
https://github.com/huggingface/datasets/issues/2226 | Batched map fails when removing all columns | Thanks for reporting and for providing this code to reproduce the issue, this is really helpful ! | Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_ | 17 | Batched map fails when removing all columns
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_
Thanks for reporting and for providing this code to reproduce the issue, this is really helpful ! | [
-0.18979878723621368,
0.11866973340511322,
0.016956862062215805,
0.03455599397420883,
0.2957548499107361,
0.19975599646568298,
0.7953289747238159,
0.3469541370868683,
0.26812177896499634,
0.5083369612693787,
0.12785471975803375,
0.398631751537323,
-0.22215960919857025,
-0.14976075291633606,
-0.2561759948730469,
-0.22585457563400269,
0.18031522631645203,
0.19393658638000488,
-0.15434545278549194,
0.11382858455181122,
-0.3259882628917694,
-0.07435615360736847,
-0.5531977415084839,
0.11370562016963959,
0.09986529499292374,
-0.2811594307422638,
-0.24591447412967682,
-0.26074787974357605,
0.040527209639549255,
-0.36175301671028137,
0.09004701673984528,
-0.2502872347831726,
0.11281108856201172,
0.48397859930992126,
-0.00011687954975059256,
0.021830476820468903,
0.17167118191719055,
-0.033469878137111664,
-0.13261573016643524,
0.06407731771469116,
-0.16879600286483765,
-0.1176634132862091,
-0.04967597872018814,
-0.3645479083061218,
0.5358586311340332,
-0.21088403463363647,
-0.3315514326095581,
-0.38117527961730957,
-0.04057256877422333,
0.10075534135103226,
0.16948789358139038,
0.14696469902992249,
-0.02365550398826599,
0.12438398599624634,
0.1997407078742981,
-0.034338340163230896,
-0.10411706566810608,
-0.008293168619275093,
0.4995138347148895,
-0.4657592475414276,
-0.09078357368707657,
0.2961731255054474,
-0.2830583155155182,
-0.02301613986492157,
0.10040740668773651,
-0.04641379043459892,
0.2637532353401184,
-0.4090450704097748,
0.17072486877441406,
0.11647991836071014,
-0.018044553697109222,
-0.32840049266815186,
-0.05480524152517319,
-0.184510737657547,
-0.1374211460351944,
-0.5785285830497742,
-0.1803826093673706,
0.07191245257854462,
-0.291910320520401,
-0.11508792638778687,
-0.4573720693588257,
0.1599920392036438,
0.032621368765830994,
0.17724226415157318,
-0.057801924645900726,
0.30288419127464294,
0.15108835697174072,
0.5388101935386658,
0.013868346810340881,
-0.060308657586574554,
-0.0003700181841850281,
-0.02769305557012558,
0.03298603370785713,
0.36770883202552795,
-0.49318569898605347,
-0.13272728025913239,
-0.03208480775356293,
-0.1082744225859642,
0.28407174348831177,
-0.2979655861854553,
0.09480991214513779,
-0.029226552695035934,
0.5917069315910339,
0.18590644001960754,
0.44408151507377625,
0.2730582058429718,
0.02110413834452629,
0.13221964240074158,
0.09277927875518799,
-0.05320385843515396,
0.06084189936518669,
-0.0009547993540763855,
0.29145851731300354,
-0.08199448138475418,
0.5020077228546143,
0.2725432515144348,
0.02595311775803566,
-0.00721944123506546,
-0.07520709931850433,
-0.15861673653125763,
-0.33841848373413086,
0.20462776720523834,
-0.09116176515817642,
0.06777539104223251,
0.2737884223461151,
0.08788701891899109,
-0.3580183982849121,
0.1353778839111328,
-0.09667571634054184,
-0.19381411373615265,
-0.11332409083843231,
0.11583419144153595,
-0.34515249729156494,
-0.15097886323928833,
0.35294410586357117,
0.10305866599082947,
0.1164730116724968,
-0.00473000667989254,
-0.010748691856861115,
-0.11933321505784988,
-0.24323035776615143,
-0.12899577617645264,
0.22583803534507751,
0.028938651084899902,
0.10470950603485107,
0.16806980967521667,
0.2093173861503601,
0.033626489341259,
-0.013857051730155945,
0.2573040723800659,
-0.053613290190696716,
-0.3020162582397461,
-0.1343100666999817,
0.11983048170804977,
0.09180601686239243,
0.204055055975914,
-0.3438607156276703,
0.03841831535100937,
0.4002183675765991,
0.06123930588364601,
0.0008472278714179993,
-0.2906818985939026,
0.22065728902816772,
-0.2849716246128082,
-0.1069677546620369,
0.25885236263275146,
-0.5109864473342896,
0.15871524810791016,
0.07895604521036148,
0.07717081904411316,
0.23785892128944397,
0.27492624521255493,
-0.228709876537323,
0.11791068315505981,
-0.17853732407093048,
0.2879096269607544,
0.11588110774755478,
-0.12190648913383484,
-0.12918822467327118,
0.258270800113678,
-0.17101062834262848,
0.006178798153996468,
-0.24031230807304382,
-0.1835014820098877,
0.6115529537200928,
-0.2941826581954956,
0.1319783329963684,
-0.0414862334728241,
-0.3053472340106964,
0.1779930591583252,
-0.15822800993919373,
-0.2711122930049896,
-0.047170184552669525,
-0.0894278883934021,
0.1199708878993988,
-0.016976967453956604,
0.30239078402519226,
-0.45130813121795654,
0.22861793637275696,
-0.32650360465049744,
0.33921703696250916,
0.41507136821746826,
0.09180684387683868,
-0.03519337624311447,
0.16639813780784607,
-0.16155308485031128,
-0.7281160950660706,
0.19810721278190613,
0.1456976681947708,
-0.08799800276756287,
-0.35342442989349365,
-0.2648589015007019,
0.07653196901082993,
0.15014243125915527,
0.022683631628751755,
0.1255520135164261,
0.07119554281234741,
-0.20246201753616333,
0.051079053431749344,
-0.3482044041156769,
-0.2364071160554886,
-0.22094173729419708,
-0.13908670842647552,
0.1733427494764328,
-0.1894964873790741,
-0.34416553378105164,
-0.027975423261523247,
-0.35719794034957886,
-0.020404145121574402,
0.1966484636068344,
0.23935627937316895,
-0.13078360259532928,
-0.018650824204087257,
0.4590829908847809,
-0.19795913994312286,
-0.07768841087818146,
-0.42476025223731995,
-0.08108703792095184,
-0.04541448503732681,
-0.04062581807374954,
-0.034259021282196045,
-0.15995043516159058,
0.14245115220546722,
-0.1447393149137497,
-0.3011455535888672,
0.002928897738456726,
-0.23812057077884674,
0.5006269812583923,
-0.14982745051383972,
-0.03738318383693695,
-0.056135788559913635,
0.02313324436545372,
-0.07715516537427902,
-0.15313756465911865,
-0.10967610776424408,
-0.04894715175032616,
-0.2542678117752075,
-0.030523313209414482,
0.026086799800395966,
-0.17734846472740173,
0.2219044268131256,
-0.04198431968688965,
0.03355366364121437,
-0.007362630218267441,
-0.25891774892807007,
0.0027916617691516876,
0.3395202159881592,
-0.08999232947826385,
0.4603513479232788,
0.13658256828784943,
0.0819968432188034,
-0.04187574237585068,
0.19161614775657654,
0.08381590247154236,
0.11060012131929398,
0.2706126868724823,
0.09256718307733536,
0.0756218358874321,
0.398668110370636,
0.016147250309586525,
-0.266187846660614,
-0.35107743740081787,
0.1753145158290863,
0.4957437217235565,
-0.20448249578475952,
-0.04380005598068237,
-0.08302329480648041,
0.0995052233338356,
0.22366540133953094,
-0.1830223798751831,
0.07135304808616638,
-0.4394611716270447,
-0.1476137340068817,
0.1156398206949234,
-0.12647368013858795,
0.25425371527671814,
-0.15952254831790924,
-0.06082169711589813,
0.18766526877880096,
-0.026490183547139168,
-0.14607909321784973,
-0.14952029287815094,
-0.17107713222503662,
0.014662466943264008,
-0.03508308529853821,
-0.14457766711711884,
0.040758270770311356,
0.47899964451789856,
-0.343545138835907,
-0.22553278505802155,
-0.06354400515556335,
-0.00632062554359436,
-0.5026288032531738,
-0.06887480616569519,
0.3389747738838196,
0.20593515038490295,
-0.30359381437301636,
-0.15609943866729736,
0.08317828923463821,
-0.12395375221967697,
0.07857446372509003,
0.2210022509098053,
0.13135841488838196,
-0.10475702583789825,
-0.23363080620765686,
0.1117873340845108,
0.07313431054353714,
-0.284395694732666,
0.1609162837266922,
-0.12004256248474121,
0.23899754881858826,
-0.2521992027759552,
0.22788022458553314,
-0.24727214872837067,
-0.0553632453083992,
-0.4037474989891052,
0.09749740362167358,
-0.010698389261960983,
0.15428481996059418,
0.11200246959924698,
-0.01123281940817833,
0.04519461467862129,
-0.052566900849342346,
0.03299158811569214,
0.33304303884506226,
-0.33552783727645874,
0.04633975774049759,
-0.10269138216972351,
0.13522279262542725,
-0.003296356648206711,
0.23263764381408691,
0.32577037811279297,
0.2052084505558014,
0.0374394953250885,
-0.01692524552345276,
-0.16421352326869965,
0.08178572356700897,
-0.06823144853115082,
-0.003880523145198822,
0.09990613907575607,
0.4984063506126404,
0.2369375228881836,
0.5979440808296204,
0.20428046584129333,
-0.08568271994590759,
0.09482407569885254,
-0.13273559510707855,
0.03994275629520416,
-0.11805140227079391,
-0.34693506360054016,
0.09493277221918106,
-0.3334673047065735,
-0.015374110080301762,
0.09163137525320053,
-0.14291861653327942,
-0.5661893486976624,
0.02627776563167572,
0.31827226281166077,
0.035610049962997437,
-0.27050456404685974,
0.22948844730854034,
-0.242961585521698,
0.23724818229675293,
0.11681273579597473,
0.019995547831058502,
-0.26691487431526184,
-0.11071229726076126,
0.2998274266719818,
-0.3833627700805664,
0.17250952124595642,
-0.21189962327480316,
-0.36502930521965027,
-0.006512852385640144,
-0.744090735912323,
0.45078933238983154,
0.08284284919500351,
0.3523317277431488,
0.17418541014194489,
-0.012168269604444504,
0.020938165485858917,
0.1607968956232071,
0.41664648056030273,
-0.2360406070947647,
-0.18812242150306702,
0.15946604311466217,
0.18267598748207092,
-0.4863574206829071,
-0.05720466747879982,
-0.31454718112945557,
0.18108341097831726,
0.2628195881843567,
0.8223787546157837,
-0.34497857093811035,
-0.07852362096309662,
0.35615310072898865,
0.1908121556043625,
0.08197388052940369,
-0.1069038063287735,
-0.1756308227777481,
-0.29241156578063965,
-0.11214148998260498,
0.13984256982803345,
0.3096798360347748,
0.18819184601306915,
0.1740516871213913,
-0.24823535978794098,
0.017187314108014107,
-0.14493340253829956,
0.10381860285997391,
0.020053796470165253,
-0.05512913316488266,
-0.10259874910116196,
0.07481150329113007,
-0.18758250772953033,
0.019702870398759842,
0.09852291643619537,
0.15182027220726013,
-0.27804815769195557,
-0.11839854717254639,
0.09803898632526398,
-0.16545651853084564,
0.5431217551231384,
0.2424987107515335,
0.01176669355481863,
0.16350868344306946,
-0.3425573408603668,
0.3598185181617737,
0.12241225689649582,
-0.4356710910797119,
0.34943878650665283,
0.03647763282060623,
-0.3460501730442047,
0.11964349448680878,
0.21441739797592163,
0.20633001625537872,
-0.032367460429668427,
0.7606865763664246,
0.013284258544445038,
-0.24127651751041412,
0.7118187546730042,
0.19663015007972717,
0.6759189963340759,
-0.1432671993970871,
-0.07122145593166351,
0.29020771384239197,
0.36088234186172485,
0.28426650166511536,
0.11269688606262207,
0.3811623454093933,
-0.3241284191608429,
-0.060373492538928986,
0.003322763368487358,
-0.035157427191734314,
0.19035080075263977,
0.4072137475013733,
0.029236558824777603,
0.3826393485069275,
-0.1521289050579071,
0.4469076693058014,
-0.025274625048041344,
-0.17739121615886688,
0.12368957698345184,
-0.3599649965763092,
0.08802822977304459,
0.02086815983057022,
0.04612221196293831,
-0.12137874960899353,
-0.08263710141181946,
0.09848273545503616,
0.05943947657942772,
-0.33959221839904785,
-0.1458568274974823,
-0.005959939211606979,
-0.2831456959247589,
0.27958279848098755,
-0.017886146903038025,
-0.02359158545732498,
-0.027655376121401787,
0.18575815856456757,
-0.13755066692829132,
0.023104548454284668,
0.2528838515281677,
-0.023412812501192093,
0.5783452987670898,
0.15323802828788757,
0.07189783453941345,
0.08016087114810944,
-0.34420067071914673,
0.058282844722270966,
-0.05810816213488579,
0.14417006075382233,
-0.26817095279693604,
-0.29177242517471313,
-0.3978099524974823,
0.3020227253437042,
0.22782890498638153,
-0.4201088547706604,
-0.1749856173992157,
-0.18197143077850342,
-0.028987105935811996,
-0.24931156635284424,
0.017911817878484726,
-0.11207316815853119,
-0.10370609164237976,
0.7665063142776489,
-0.19712871313095093,
-0.2018839418888092,
0.00011632591485977173,
0.05428292602300644,
-0.010372389107942581,
-0.007301829755306244,
0.5093961954116821,
0.19330669939517975,
-0.19068530201911926,
-0.14476682245731354,
-0.1147618293762207,
0.22984983026981354,
-0.4227212369441986,
0.14814165234565735,
-0.33450454473495483,
0.3107253313064575,
0.1378767341375351,
0.3870108127593994,
-0.05615440011024475,
0.1035892441868782,
-0.05872917175292969,
-0.13764667510986328,
-0.3454741835594177,
0.22680331766605377,
0.2731829285621643,
0.2479776293039322,
0.009982939809560776,
0.023875445127487183,
-0.2870258688926697,
0.13959403336048126,
-0.23107177019119263,
0.12929481267929077,
0.029675742611289024,
0.4705129563808441,
0.2248266637325287,
0.18418774008750916,
-0.06372099369764328,
0.12226340174674988,
0.1711612045764923,
0.32366085052490234,
0.2282157987356186,
-0.18906012177467346,
0.08714459836483002,
0.08451704680919647,
0.041425954550504684,
-0.04404635727405548,
0.040792178362607956,
-0.1662180870771408,
-0.22589534521102905,
-0.24934527277946472,
0.28349313139915466,
0.20771288871765137,
-0.13485372066497803,
-0.05110098794102669,
0.26740166544914246,
0.09066814184188843,
-0.009100820869207382,
0.11659636348485947,
-0.22739878296852112,
-0.08283966779708862,
0.1396971195936203,
0.33655619621276855,
0.14467753469944,
-0.09222797304391861,
0.0380745492875576,
0.07921785861253738,
-0.18549524247646332,
0.18613773584365845,
0.274154394865036,
-0.3076930046081543,
-0.07418333739042282,
-0.02052895352244377,
0.357176810503006,
0.10771727561950684,
-0.26558563113212585,
-0.15787121653556824,
0.09432877600193024,
0.19320178031921387,
-0.0930132120847702,
0.014783180318772793,
0.3097124993801117,
0.3044719099998474,
0.24030449986457825,
0.4139222502708435,
0.03112933412194252,
-0.4228920340538025,
-0.13559171557426453,
-0.08688489347696304,
0.5410780310630798,
-0.13245907425880432,
-0.2924460172653198,
0.6839472055435181,
-0.14826148748397827,
-0.01082923635840416,
0.2884370982646942,
0.19199484586715698,
0.3235800564289093,
0.5047317743301392,
-0.07149311155080795,
0.08536960184574127,
0.3333711624145508,
0.104234479367733,
-0.282267302274704,
-0.4482131898403168,
0.2085963487625122,
0.23430007696151733,
0.09127594530582428,
0.14383545517921448,
0.17834050953388214,
0.08903360366821289,
-0.0002726772800087929,
-0.216752827167511,
0.21800005435943604,
0.2582811117172241,
-0.3013063073158264,
-0.025725092738866806,
-0.36469846963882446,
-0.07656081020832062,
0.19261139631271362,
-0.051690228283405304,
-0.15792186558246613,
-0.16245988011360168,
0.5937281847000122,
0.06202095001935959,
-0.05641870200634003,
-0.33401811122894287,
-0.1528504192829132,
-0.0166739784181118,
0.35457152128219604,
-0.15175774693489075,
0.1551143229007721,
0.009670250117778778,
0.08955545723438263,
-0.2272726595401764,
0.0879208967089653,
0.4263055920600891,
0.35676637291908264,
0.0829305499792099,
0.047726456075906754,
-0.10911338031291962,
-0.1831456869840622,
-0.030031567439436913,
0.10759298503398895,
0.21640220284461975,
0.3985656797885895,
0.3411513566970825,
0.0027499888092279434,
-0.06748182326555252,
-0.03322713449597359,
0.3050510883331299,
0.13561305403709412,
-0.016414742916822433,
-0.033591292798519135,
0.04039512947201729,
-0.4961535334587097,
-0.12159420549869537,
-0.20806267857551575,
-0.019833307713270187,
-0.2020421326160431,
0.3985046446323395,
-0.147050678730011,
0.23875641822814941,
0.022179260849952698,
0.05887287110090256,
-0.09845839440822601,
0.03655865415930748,
0.49198779463768005,
-0.31340911984443665,
-0.5499471426010132,
-0.20506688952445984,
-0.3719422221183777,
-0.0011592432856559753,
-0.731938362121582,
-0.0049582067877054214,
0.22085753083229065,
0.19440504908561707,
0.12525032460689545,
0.07472439855337143,
0.07634609192609787,
0.16761904954910278,
-0.2411893904209137,
0.8675715923309326,
-0.3371376395225525,
0.08649951219558716,
-0.08162753283977509,
0.011899003759026527,
0.09368686378002167,
-0.5087845921516418,
0.42042773962020874,
0.2190045863389969,
0.01833578199148178,
-0.15650011599063873,
-0.014172397553920746,
0.19349439442157745,
-0.11327119171619415,
0.3862437307834625,
0.04135338217020035,
0.07817909121513367,
0.18506518006324768,
-0.3118220269680023,
-0.3471720218658447,
0.09690792113542557,
-0.1761683225631714,
0.12077992409467697,
0.21304118633270264,
0.18974639475345612,
-0.058404140174388885,
0.020045625045895576,
-0.07977790385484695,
0.05486486107110977,
-0.05496196448802948,
0.05512993782758713,
-0.15366815030574799,
0.1488112062215805,
0.08467740565538406,
0.17721176147460938,
0.0675942674279213,
0.05625345557928085,
0.1116034984588623,
0.2221059799194336,
-0.38740313053131104,
-0.3115001916885376,
0.47522494196891785,
-0.7607836127281189,
-0.6713260412216187,
-0.08754003047943115,
0.06659846752882004,
0.09032490849494934,
-0.15698955953121185,
-0.3100396990776062,
-0.020097263157367706,
0.2628043591976166,
-0.19319233298301697,
-0.1906292587518692,
-0.005261490121483803,
-0.3285938799381256,
0.007253795862197876,
-0.01651875488460064,
0.07770062237977982,
0.0896192118525505,
-0.1323934942483902,
-0.002824649214744568,
-0.39927035570144653
] |
https://github.com/huggingface/datasets/issues/2226 | Batched map fails when removing all columns | I merged a fix, it should work on `master` now :)
We'll do a new release soon ! | Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_ | 18 | Batched map fails when removing all columns
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_
I merged a fix, it should work on `master` now :)
We'll do a new release soon ! | [
-0.18979878723621368,
0.11866973340511322,
0.016956862062215805,
0.03455599397420883,
0.2957548499107361,
0.19975599646568298,
0.7953289747238159,
0.3469541370868683,
0.26812177896499634,
0.5083369612693787,
0.12785471975803375,
0.398631751537323,
-0.22215960919857025,
-0.14976075291633606,
-0.2561759948730469,
-0.22585457563400269,
0.18031522631645203,
0.19393658638000488,
-0.15434545278549194,
0.11382858455181122,
-0.3259882628917694,
-0.07435615360736847,
-0.5531977415084839,
0.11370562016963959,
0.09986529499292374,
-0.2811594307422638,
-0.24591447412967682,
-0.26074787974357605,
0.040527209639549255,
-0.36175301671028137,
0.09004701673984528,
-0.2502872347831726,
0.11281108856201172,
0.48397859930992126,
-0.00011687954975059256,
0.021830476820468903,
0.17167118191719055,
-0.033469878137111664,
-0.13261573016643524,
0.06407731771469116,
-0.16879600286483765,
-0.1176634132862091,
-0.04967597872018814,
-0.3645479083061218,
0.5358586311340332,
-0.21088403463363647,
-0.3315514326095581,
-0.38117527961730957,
-0.04057256877422333,
0.10075534135103226,
0.16948789358139038,
0.14696469902992249,
-0.02365550398826599,
0.12438398599624634,
0.1997407078742981,
-0.034338340163230896,
-0.10411706566810608,
-0.008293168619275093,
0.4995138347148895,
-0.4657592475414276,
-0.09078357368707657,
0.2961731255054474,
-0.2830583155155182,
-0.02301613986492157,
0.10040740668773651,
-0.04641379043459892,
0.2637532353401184,
-0.4090450704097748,
0.17072486877441406,
0.11647991836071014,
-0.018044553697109222,
-0.32840049266815186,
-0.05480524152517319,
-0.184510737657547,
-0.1374211460351944,
-0.5785285830497742,
-0.1803826093673706,
0.07191245257854462,
-0.291910320520401,
-0.11508792638778687,
-0.4573720693588257,
0.1599920392036438,
0.032621368765830994,
0.17724226415157318,
-0.057801924645900726,
0.30288419127464294,
0.15108835697174072,
0.5388101935386658,
0.013868346810340881,
-0.060308657586574554,
-0.0003700181841850281,
-0.02769305557012558,
0.03298603370785713,
0.36770883202552795,
-0.49318569898605347,
-0.13272728025913239,
-0.03208480775356293,
-0.1082744225859642,
0.28407174348831177,
-0.2979655861854553,
0.09480991214513779,
-0.029226552695035934,
0.5917069315910339,
0.18590644001960754,
0.44408151507377625,
0.2730582058429718,
0.02110413834452629,
0.13221964240074158,
0.09277927875518799,
-0.05320385843515396,
0.06084189936518669,
-0.0009547993540763855,
0.29145851731300354,
-0.08199448138475418,
0.5020077228546143,
0.2725432515144348,
0.02595311775803566,
-0.00721944123506546,
-0.07520709931850433,
-0.15861673653125763,
-0.33841848373413086,
0.20462776720523834,
-0.09116176515817642,
0.06777539104223251,
0.2737884223461151,
0.08788701891899109,
-0.3580183982849121,
0.1353778839111328,
-0.09667571634054184,
-0.19381411373615265,
-0.11332409083843231,
0.11583419144153595,
-0.34515249729156494,
-0.15097886323928833,
0.35294410586357117,
0.10305866599082947,
0.1164730116724968,
-0.00473000667989254,
-0.010748691856861115,
-0.11933321505784988,
-0.24323035776615143,
-0.12899577617645264,
0.22583803534507751,
0.028938651084899902,
0.10470950603485107,
0.16806980967521667,
0.2093173861503601,
0.033626489341259,
-0.013857051730155945,
0.2573040723800659,
-0.053613290190696716,
-0.3020162582397461,
-0.1343100666999817,
0.11983048170804977,
0.09180601686239243,
0.204055055975914,
-0.3438607156276703,
0.03841831535100937,
0.4002183675765991,
0.06123930588364601,
0.0008472278714179993,
-0.2906818985939026,
0.22065728902816772,
-0.2849716246128082,
-0.1069677546620369,
0.25885236263275146,
-0.5109864473342896,
0.15871524810791016,
0.07895604521036148,
0.07717081904411316,
0.23785892128944397,
0.27492624521255493,
-0.228709876537323,
0.11791068315505981,
-0.17853732407093048,
0.2879096269607544,
0.11588110774755478,
-0.12190648913383484,
-0.12918822467327118,
0.258270800113678,
-0.17101062834262848,
0.006178798153996468,
-0.24031230807304382,
-0.1835014820098877,
0.6115529537200928,
-0.2941826581954956,
0.1319783329963684,
-0.0414862334728241,
-0.3053472340106964,
0.1779930591583252,
-0.15822800993919373,
-0.2711122930049896,
-0.047170184552669525,
-0.0894278883934021,
0.1199708878993988,
-0.016976967453956604,
0.30239078402519226,
-0.45130813121795654,
0.22861793637275696,
-0.32650360465049744,
0.33921703696250916,
0.41507136821746826,
0.09180684387683868,
-0.03519337624311447,
0.16639813780784607,
-0.16155308485031128,
-0.7281160950660706,
0.19810721278190613,
0.1456976681947708,
-0.08799800276756287,
-0.35342442989349365,
-0.2648589015007019,
0.07653196901082993,
0.15014243125915527,
0.022683631628751755,
0.1255520135164261,
0.07119554281234741,
-0.20246201753616333,
0.051079053431749344,
-0.3482044041156769,
-0.2364071160554886,
-0.22094173729419708,
-0.13908670842647552,
0.1733427494764328,
-0.1894964873790741,
-0.34416553378105164,
-0.027975423261523247,
-0.35719794034957886,
-0.020404145121574402,
0.1966484636068344,
0.23935627937316895,
-0.13078360259532928,
-0.018650824204087257,
0.4590829908847809,
-0.19795913994312286,
-0.07768841087818146,
-0.42476025223731995,
-0.08108703792095184,
-0.04541448503732681,
-0.04062581807374954,
-0.034259021282196045,
-0.15995043516159058,
0.14245115220546722,
-0.1447393149137497,
-0.3011455535888672,
0.002928897738456726,
-0.23812057077884674,
0.5006269812583923,
-0.14982745051383972,
-0.03738318383693695,
-0.056135788559913635,
0.02313324436545372,
-0.07715516537427902,
-0.15313756465911865,
-0.10967610776424408,
-0.04894715175032616,
-0.2542678117752075,
-0.030523313209414482,
0.026086799800395966,
-0.17734846472740173,
0.2219044268131256,
-0.04198431968688965,
0.03355366364121437,
-0.007362630218267441,
-0.25891774892807007,
0.0027916617691516876,
0.3395202159881592,
-0.08999232947826385,
0.4603513479232788,
0.13658256828784943,
0.0819968432188034,
-0.04187574237585068,
0.19161614775657654,
0.08381590247154236,
0.11060012131929398,
0.2706126868724823,
0.09256718307733536,
0.0756218358874321,
0.398668110370636,
0.016147250309586525,
-0.266187846660614,
-0.35107743740081787,
0.1753145158290863,
0.4957437217235565,
-0.20448249578475952,
-0.04380005598068237,
-0.08302329480648041,
0.0995052233338356,
0.22366540133953094,
-0.1830223798751831,
0.07135304808616638,
-0.4394611716270447,
-0.1476137340068817,
0.1156398206949234,
-0.12647368013858795,
0.25425371527671814,
-0.15952254831790924,
-0.06082169711589813,
0.18766526877880096,
-0.026490183547139168,
-0.14607909321784973,
-0.14952029287815094,
-0.17107713222503662,
0.014662466943264008,
-0.03508308529853821,
-0.14457766711711884,
0.040758270770311356,
0.47899964451789856,
-0.343545138835907,
-0.22553278505802155,
-0.06354400515556335,
-0.00632062554359436,
-0.5026288032531738,
-0.06887480616569519,
0.3389747738838196,
0.20593515038490295,
-0.30359381437301636,
-0.15609943866729736,
0.08317828923463821,
-0.12395375221967697,
0.07857446372509003,
0.2210022509098053,
0.13135841488838196,
-0.10475702583789825,
-0.23363080620765686,
0.1117873340845108,
0.07313431054353714,
-0.284395694732666,
0.1609162837266922,
-0.12004256248474121,
0.23899754881858826,
-0.2521992027759552,
0.22788022458553314,
-0.24727214872837067,
-0.0553632453083992,
-0.4037474989891052,
0.09749740362167358,
-0.010698389261960983,
0.15428481996059418,
0.11200246959924698,
-0.01123281940817833,
0.04519461467862129,
-0.052566900849342346,
0.03299158811569214,
0.33304303884506226,
-0.33552783727645874,
0.04633975774049759,
-0.10269138216972351,
0.13522279262542725,
-0.003296356648206711,
0.23263764381408691,
0.32577037811279297,
0.2052084505558014,
0.0374394953250885,
-0.01692524552345276,
-0.16421352326869965,
0.08178572356700897,
-0.06823144853115082,
-0.003880523145198822,
0.09990613907575607,
0.4984063506126404,
0.2369375228881836,
0.5979440808296204,
0.20428046584129333,
-0.08568271994590759,
0.09482407569885254,
-0.13273559510707855,
0.03994275629520416,
-0.11805140227079391,
-0.34693506360054016,
0.09493277221918106,
-0.3334673047065735,
-0.015374110080301762,
0.09163137525320053,
-0.14291861653327942,
-0.5661893486976624,
0.02627776563167572,
0.31827226281166077,
0.035610049962997437,
-0.27050456404685974,
0.22948844730854034,
-0.242961585521698,
0.23724818229675293,
0.11681273579597473,
0.019995547831058502,
-0.26691487431526184,
-0.11071229726076126,
0.2998274266719818,
-0.3833627700805664,
0.17250952124595642,
-0.21189962327480316,
-0.36502930521965027,
-0.006512852385640144,
-0.744090735912323,
0.45078933238983154,
0.08284284919500351,
0.3523317277431488,
0.17418541014194489,
-0.012168269604444504,
0.020938165485858917,
0.1607968956232071,
0.41664648056030273,
-0.2360406070947647,
-0.18812242150306702,
0.15946604311466217,
0.18267598748207092,
-0.4863574206829071,
-0.05720466747879982,
-0.31454718112945557,
0.18108341097831726,
0.2628195881843567,
0.8223787546157837,
-0.34497857093811035,
-0.07852362096309662,
0.35615310072898865,
0.1908121556043625,
0.08197388052940369,
-0.1069038063287735,
-0.1756308227777481,
-0.29241156578063965,
-0.11214148998260498,
0.13984256982803345,
0.3096798360347748,
0.18819184601306915,
0.1740516871213913,
-0.24823535978794098,
0.017187314108014107,
-0.14493340253829956,
0.10381860285997391,
0.020053796470165253,
-0.05512913316488266,
-0.10259874910116196,
0.07481150329113007,
-0.18758250772953033,
0.019702870398759842,
0.09852291643619537,
0.15182027220726013,
-0.27804815769195557,
-0.11839854717254639,
0.09803898632526398,
-0.16545651853084564,
0.5431217551231384,
0.2424987107515335,
0.01176669355481863,
0.16350868344306946,
-0.3425573408603668,
0.3598185181617737,
0.12241225689649582,
-0.4356710910797119,
0.34943878650665283,
0.03647763282060623,
-0.3460501730442047,
0.11964349448680878,
0.21441739797592163,
0.20633001625537872,
-0.032367460429668427,
0.7606865763664246,
0.013284258544445038,
-0.24127651751041412,
0.7118187546730042,
0.19663015007972717,
0.6759189963340759,
-0.1432671993970871,
-0.07122145593166351,
0.29020771384239197,
0.36088234186172485,
0.28426650166511536,
0.11269688606262207,
0.3811623454093933,
-0.3241284191608429,
-0.060373492538928986,
0.003322763368487358,
-0.035157427191734314,
0.19035080075263977,
0.4072137475013733,
0.029236558824777603,
0.3826393485069275,
-0.1521289050579071,
0.4469076693058014,
-0.025274625048041344,
-0.17739121615886688,
0.12368957698345184,
-0.3599649965763092,
0.08802822977304459,
0.02086815983057022,
0.04612221196293831,
-0.12137874960899353,
-0.08263710141181946,
0.09848273545503616,
0.05943947657942772,
-0.33959221839904785,
-0.1458568274974823,
-0.005959939211606979,
-0.2831456959247589,
0.27958279848098755,
-0.017886146903038025,
-0.02359158545732498,
-0.027655376121401787,
0.18575815856456757,
-0.13755066692829132,
0.023104548454284668,
0.2528838515281677,
-0.023412812501192093,
0.5783452987670898,
0.15323802828788757,
0.07189783453941345,
0.08016087114810944,
-0.34420067071914673,
0.058282844722270966,
-0.05810816213488579,
0.14417006075382233,
-0.26817095279693604,
-0.29177242517471313,
-0.3978099524974823,
0.3020227253437042,
0.22782890498638153,
-0.4201088547706604,
-0.1749856173992157,
-0.18197143077850342,
-0.028987105935811996,
-0.24931156635284424,
0.017911817878484726,
-0.11207316815853119,
-0.10370609164237976,
0.7665063142776489,
-0.19712871313095093,
-0.2018839418888092,
0.00011632591485977173,
0.05428292602300644,
-0.010372389107942581,
-0.007301829755306244,
0.5093961954116821,
0.19330669939517975,
-0.19068530201911926,
-0.14476682245731354,
-0.1147618293762207,
0.22984983026981354,
-0.4227212369441986,
0.14814165234565735,
-0.33450454473495483,
0.3107253313064575,
0.1378767341375351,
0.3870108127593994,
-0.05615440011024475,
0.1035892441868782,
-0.05872917175292969,
-0.13764667510986328,
-0.3454741835594177,
0.22680331766605377,
0.2731829285621643,
0.2479776293039322,
0.009982939809560776,
0.023875445127487183,
-0.2870258688926697,
0.13959403336048126,
-0.23107177019119263,
0.12929481267929077,
0.029675742611289024,
0.4705129563808441,
0.2248266637325287,
0.18418774008750916,
-0.06372099369764328,
0.12226340174674988,
0.1711612045764923,
0.32366085052490234,
0.2282157987356186,
-0.18906012177467346,
0.08714459836483002,
0.08451704680919647,
0.041425954550504684,
-0.04404635727405548,
0.040792178362607956,
-0.1662180870771408,
-0.22589534521102905,
-0.24934527277946472,
0.28349313139915466,
0.20771288871765137,
-0.13485372066497803,
-0.05110098794102669,
0.26740166544914246,
0.09066814184188843,
-0.009100820869207382,
0.11659636348485947,
-0.22739878296852112,
-0.08283966779708862,
0.1396971195936203,
0.33655619621276855,
0.14467753469944,
-0.09222797304391861,
0.0380745492875576,
0.07921785861253738,
-0.18549524247646332,
0.18613773584365845,
0.274154394865036,
-0.3076930046081543,
-0.07418333739042282,
-0.02052895352244377,
0.357176810503006,
0.10771727561950684,
-0.26558563113212585,
-0.15787121653556824,
0.09432877600193024,
0.19320178031921387,
-0.0930132120847702,
0.014783180318772793,
0.3097124993801117,
0.3044719099998474,
0.24030449986457825,
0.4139222502708435,
0.03112933412194252,
-0.4228920340538025,
-0.13559171557426453,
-0.08688489347696304,
0.5410780310630798,
-0.13245907425880432,
-0.2924460172653198,
0.6839472055435181,
-0.14826148748397827,
-0.01082923635840416,
0.2884370982646942,
0.19199484586715698,
0.3235800564289093,
0.5047317743301392,
-0.07149311155080795,
0.08536960184574127,
0.3333711624145508,
0.104234479367733,
-0.282267302274704,
-0.4482131898403168,
0.2085963487625122,
0.23430007696151733,
0.09127594530582428,
0.14383545517921448,
0.17834050953388214,
0.08903360366821289,
-0.0002726772800087929,
-0.216752827167511,
0.21800005435943604,
0.2582811117172241,
-0.3013063073158264,
-0.025725092738866806,
-0.36469846963882446,
-0.07656081020832062,
0.19261139631271362,
-0.051690228283405304,
-0.15792186558246613,
-0.16245988011360168,
0.5937281847000122,
0.06202095001935959,
-0.05641870200634003,
-0.33401811122894287,
-0.1528504192829132,
-0.0166739784181118,
0.35457152128219604,
-0.15175774693489075,
0.1551143229007721,
0.009670250117778778,
0.08955545723438263,
-0.2272726595401764,
0.0879208967089653,
0.4263055920600891,
0.35676637291908264,
0.0829305499792099,
0.047726456075906754,
-0.10911338031291962,
-0.1831456869840622,
-0.030031567439436913,
0.10759298503398895,
0.21640220284461975,
0.3985656797885895,
0.3411513566970825,
0.0027499888092279434,
-0.06748182326555252,
-0.03322713449597359,
0.3050510883331299,
0.13561305403709412,
-0.016414742916822433,
-0.033591292798519135,
0.04039512947201729,
-0.4961535334587097,
-0.12159420549869537,
-0.20806267857551575,
-0.019833307713270187,
-0.2020421326160431,
0.3985046446323395,
-0.147050678730011,
0.23875641822814941,
0.022179260849952698,
0.05887287110090256,
-0.09845839440822601,
0.03655865415930748,
0.49198779463768005,
-0.31340911984443665,
-0.5499471426010132,
-0.20506688952445984,
-0.3719422221183777,
-0.0011592432856559753,
-0.731938362121582,
-0.0049582067877054214,
0.22085753083229065,
0.19440504908561707,
0.12525032460689545,
0.07472439855337143,
0.07634609192609787,
0.16761904954910278,
-0.2411893904209137,
0.8675715923309326,
-0.3371376395225525,
0.08649951219558716,
-0.08162753283977509,
0.011899003759026527,
0.09368686378002167,
-0.5087845921516418,
0.42042773962020874,
0.2190045863389969,
0.01833578199148178,
-0.15650011599063873,
-0.014172397553920746,
0.19349439442157745,
-0.11327119171619415,
0.3862437307834625,
0.04135338217020035,
0.07817909121513367,
0.18506518006324768,
-0.3118220269680023,
-0.3471720218658447,
0.09690792113542557,
-0.1761683225631714,
0.12077992409467697,
0.21304118633270264,
0.18974639475345612,
-0.058404140174388885,
0.020045625045895576,
-0.07977790385484695,
0.05486486107110977,
-0.05496196448802948,
0.05512993782758713,
-0.15366815030574799,
0.1488112062215805,
0.08467740565538406,
0.17721176147460938,
0.0675942674279213,
0.05625345557928085,
0.1116034984588623,
0.2221059799194336,
-0.38740313053131104,
-0.3115001916885376,
0.47522494196891785,
-0.7607836127281189,
-0.6713260412216187,
-0.08754003047943115,
0.06659846752882004,
0.09032490849494934,
-0.15698955953121185,
-0.3100396990776062,
-0.020097263157367706,
0.2628043591976166,
-0.19319233298301697,
-0.1906292587518692,
-0.005261490121483803,
-0.3285938799381256,
0.007253795862197876,
-0.01651875488460064,
0.07770062237977982,
0.0896192118525505,
-0.1323934942483902,
-0.002824649214744568,
-0.39927035570144653
] |
https://github.com/huggingface/datasets/issues/2218 | Duplicates in the LAMA dataset | Hi,
currently the datasets API doesn't have a dedicated function to remove duplicate rows, but since the LAMA dataset is not too big (it fits in RAM), we can leverage pandas to help us remove duplicates:
```python
>>> from datasets import load_dataset, Dataset
>>> dataset = load_dataset('lama', split='train')
>>> dataset = Dataset.from_pandas(dataset.to_pandas().drop_duplicates(subset=...)) # specify a subset of the columns to consider in a list or use all of the columns if None
```
Note that the same can be achieved with the `Dataset.filter` method but this would requrie some extra work (filter function, speed?). | I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA? | 94 | Duplicates in the LAMA dataset
I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA?
Hi,
currently the datasets API doesn't have a dedicated function to remove duplicate rows, but since the LAMA dataset is not too big (it fits in RAM), we can leverage pandas to help us remove duplicates:
```python
>>> from datasets import load_dataset, Dataset
>>> dataset = load_dataset('lama', split='train')
>>> dataset = Dataset.from_pandas(dataset.to_pandas().drop_duplicates(subset=...)) # specify a subset of the columns to consider in a list or use all of the columns if None
```
Note that the same can be achieved with the `Dataset.filter` method but this would requrie some extra work (filter function, speed?). | [
0.26157328486442566,
-0.3211714029312134,
-0.030378006398677826,
0.6542940139770508,
0.31745362281799316,
-0.13887424767017365,
0.31275230646133423,
0.3269728124141693,
-0.5472854971885681,
0.3365437984466553,
-0.345426082611084,
0.3600650727748871,
0.08196303248405457,
-0.2813018560409546,
0.1604105830192566,
-0.1338142454624176,
0.02549462765455246,
-0.16616976261138916,
-0.20456314086914062,
-0.20634040236473083,
-0.1825977861881256,
0.33954787254333496,
0.037247367203235626,
0.08386006206274033,
-0.14086736738681793,
0.1054261103272438,
-0.14082258939743042,
0.26964783668518066,
0.021122198551893234,
-0.27218198776245117,
0.13598528504371643,
0.11956562101840973,
-0.04239588975906372,
0.4986018240451813,
-0.00010625526192598045,
0.026655197143554688,
-0.1191423088312149,
-0.05169885605573654,
-0.14893226325511932,
-0.030792057514190674,
-0.02810090221464634,
-0.020673207938671112,
-0.004479846451431513,
-0.26242056488990784,
-0.30851244926452637,
-0.06798579543828964,
-0.0779155045747757,
-0.11037740111351013,
0.4661048650741577,
0.20960064232349396,
0.26725295186042786,
0.34897613525390625,
-0.2831970155239105,
-0.15893393754959106,
0.2227594256401062,
-0.18369315564632416,
-0.08663272857666016,
0.4994787573814392,
0.183348149061203,
0.6046417951583862,
-0.06693492084741592,
0.568586528301239,
0.0555703267455101,
-0.07701154053211212,
-0.28067198395729065,
-0.3192391097545624,
0.31820452213287354,
-0.11157457530498505,
0.3222728371620178,
0.3282352387905121,
-0.009144783020019531,
-0.24006125330924988,
-0.19547602534294128,
-0.12311358004808426,
-0.02792849764227867,
-0.1791887730360031,
0.0652221292257309,
0.13542018830776215,
0.061883967369794846,
0.14554138481616974,
0.1373833417892456,
0.02526128850877285,
0.23217812180519104,
-0.1204138696193695,
-0.146145761013031,
-0.1684124767780304,
-0.020073629915714264,
0.11560642719268799,
0.16728053987026215,
-0.15831923484802246,
0.20287463068962097,
-0.1564391702413559,
-0.17289504408836365,
0.049389876425266266,
-0.22320957481861115,
-0.13471956551074982,
0.001867242157459259,
-0.10566449910402298,
0.1160551980137825,
0.5150150060653687,
0.23398619890213013,
0.34655383229255676,
-0.13079482316970825,
0.02399817854166031,
0.15421552956104279,
0.07063432037830353,
-0.050043441355228424,
0.06458129733800888,
-0.17592577636241913,
0.021891430020332336,
-0.316541850566864,
0.0213836207985878,
-0.34171777963638306,
-0.16918723285198212,
0.07730434834957123,
-0.011414937674999237,
0.054341450333595276,
-0.10627097636461258,
-0.08382465690374374,
-0.23075082898139954,
-0.403702050447464,
-0.10849177837371826,
0.060547009110450745,
0.15021002292633057,
0.1372217983007431,
0.2108774483203888,
-0.3826010823249817,
0.01596812903881073,
-0.2030605673789978,
-0.1918773055076599,
-0.3366513252258301,
0.1416359841823578,
-0.1806386262178421,
0.07943274080753326,
-0.004610173404216766,
-0.7226566672325134,
0.4088577628135681,
0.09007225930690765,
-0.1415320634841919,
-0.26926249265670776,
0.43663185834884644,
-0.21643030643463135,
0.15831157565116882,
0.011138875037431717,
-0.16881945729255676,
0.12734033167362213,
-0.018623877316713333,
-0.021823231130838394,
-0.1080177053809166,
0.023868560791015625,
-0.14053252339363098,
-0.09069615602493286,
-0.1264304220676422,
0.29382461309432983,
0.19993536174297333,
0.2575151324272156,
0.31681540608406067,
0.3918619453907013,
-0.03176192194223404,
0.03564568981528282,
0.0930773913860321,
0.01823599450290203,
-0.3235776722431183,
-0.13110485672950745,
0.08142589777708054,
0.2557786703109741,
-0.08448665589094162,
-0.03427233546972275,
0.012946877628564835,
0.005958288908004761,
0.2059478610754013,
0.527009904384613,
-0.1314258873462677,
0.2728060483932495,
-0.3161911368370056,
0.3068464994430542,
0.17531484365463257,
-0.48836562037467957,
-0.005070814862847328,
-0.1671351194381714,
0.034287311136722565,
0.10375437885522842,
0.22805583477020264,
0.025739656761288643,
0.28746747970581055,
-0.10209603607654572,
0.22066457569599152,
-0.11895038187503815,
0.2129843533039093,
-0.19902460277080536,
-0.22436992824077606,
-0.02178131602704525,
-0.04410070925951004,
-0.11158671975135803,
-0.12241071462631226,
-0.24075832962989807,
0.023219436407089233,
-0.026447702199220657,
0.16337282955646515,
-0.08747868239879608,
-0.16334842145442963,
-0.028717465698719025,
0.03826025500893593,
-0.0036897584795951843,
0.06438242644071579,
0.03419863432645798,
-0.14613279700279236,
0.20150259137153625,
-0.1772346943616867,
0.3269670307636261,
0.030266426503658295,
-0.18393786251544952,
-0.26156675815582275,
-0.09595779329538345,
-0.2973305583000183,
-0.1768953651189804,
0.2863490581512451,
0.27370184659957886,
0.017678789794445038,
0.14256933331489563,
0.007925696671009064,
0.11064698547124863,
-0.03687099739909172,
0.19083185493946075,
-0.508858323097229,
0.08024828135967255,
-0.18475240468978882,
0.06039983779191971,
0.1334294229745865,
0.2846054434776306,
0.17894592881202698,
0.015614748932421207,
0.22257012128829956,
0.009297575801610947,
0.31258729100227356,
0.02752450853586197,
0.2928507328033447,
-0.14915435016155243,
0.023394059389829636,
-0.17078717052936554,
-0.09262417256832123,
0.08331079035997391,
0.18655391037464142,
-0.05468565225601196,
-0.037961192429065704,
0.4738602042198181,
0.5330001711845398,
-0.2722347676753998,
0.10202109813690186,
-0.13029731810092926,
0.27947112917900085,
-0.13579769432544708,
-0.07294219732284546,
-0.49294939637184143,
0.06695341318845749,
0.5568975806236267,
0.24027277529239655,
0.4626103341579437,
-0.24201498925685883,
0.08918992429971695,
0.13075073063373566,
-0.17546509206295013,
0.028033055365085602,
-0.18901389837265015,
-0.21372997760772705,
-0.11184507608413696,
0.12909235060214996,
0.35541021823883057,
0.01492803543806076,
0.27378302812576294,
0.5646851062774658,
0.12184616923332214,
-0.15246932208538055,
-0.2303454726934433,
0.19027788937091827,
-0.06282326579093933,
-0.12230177223682404,
0.12477576732635498,
0.10891332477331161,
-0.017405617982149124,
-0.7163099050521851,
0.1091497540473938,
0.06749671697616577,
0.17828288674354553,
-0.10402214527130127,
0.045826271176338196,
-0.518665075302124,
-0.27920880913734436,
-0.34234580397605896,
0.11616301536560059,
-0.21410419046878815,
-0.21022799611091614,
0.2235586941242218,
0.08338290452957153,
-0.07916710525751114,
0.2216530740261078,
-0.05872887372970581,
0.464363157749176,
-0.14143148064613342,
0.19015145301818848,
-0.2832051217556,
0.062185708433389664,
-0.2202778458595276,
0.2213904857635498,
0.15733470022678375,
-0.011641500517725945,
0.3668324947357178,
-0.14533445239067078,
-0.00917566567659378,
-0.40531954169273376,
-0.5439638495445251,
0.15485310554504395,
0.16202476620674133,
0.16634619235992432,
-0.015046201646327972,
-0.22846771776676178,
-0.0598769411444664,
-0.22877372801303864,
-0.09263643622398376,
0.2382824420928955,
-0.4187103509902954,
-0.05883491039276123,
-0.1609436273574829,
0.3222581148147583,
-0.1648002713918686,
-0.35690951347351074,
0.13334247469902039,
-0.1296953558921814,
0.11318708956241608,
0.09489713609218597,
0.2506996989250183,
0.1955593377351761,
-0.09626231342554092,
0.17080186307430267,
-0.43862390518188477,
0.011402420699596405,
-0.5250067114830017,
-0.33476191759109497,
0.12830446660518646,
-0.12212561815977097,
-0.07739849388599396,
-0.12652646005153656,
-0.4503447413444519,
0.5347149968147278,
-0.20437122881412506,
-0.38080739974975586,
-0.10400055348873138,
0.0391998328268528,
0.005205262452363968,
0.3159894347190857,
-0.07294732332229614,
-0.05240103602409363,
0.29546108841896057,
-0.3133579194545746,
-0.057294685393571854,
0.0053227245807647705,
0.05347619205713272,
0.056747689843177795,
0.19195908308029175,
-0.3597271740436554,
-0.02720675617456436,
0.12685252726078033,
0.17695219814777374,
0.4423532783985138,
-0.057804208248853683,
0.27113020420074463,
0.1016455888748169,
0.41492176055908203,
-0.035089120268821716,
-0.0963190570473671,
-0.13745969533920288,
-0.15808051824569702,
0.14631883800029755,
0.5981575846672058,
0.19859498739242554,
0.09290023893117905,
-0.019227836281061172,
0.023038499057292938,
-0.13445791602134705,
-0.3823532164096832,
-0.20871484279632568,
-0.263679176568985,
-0.006935916841030121,
0.21163590252399445,
-0.18117070198059082,
0.1093776524066925,
0.16076144576072693,
0.15939344465732574,
0.07278846204280853,
-0.14980915188789368,
-0.09680324047803879,
-0.0381268709897995,
0.5167209506034851,
-0.6166171431541443,
0.180210143327713,
0.06245938688516617,
-0.011382910422980785,
0.04615269973874092,
-0.01882784254848957,
0.15723983943462372,
-0.010098259896039963,
0.49224019050598145,
-0.3488263487815857,
0.04431223124265671,
0.033238716423511505,
-0.1674066185951233,
-0.31141194701194763,
0.12246285378932953,
-0.2982158362865448,
-0.12193703651428223,
0.17314568161964417,
0.5565636157989502,
-0.251090407371521,
-0.03450660780072212,
0.22944217920303345,
0.1539779156446457,
-0.2126266211271286,
0.08748561143875122,
-0.23984499275684357,
-0.4762766361236572,
-0.1906108856201172,
-0.06752841919660568,
-0.0483936108648777,
0.08470159769058228,
0.13939015567302704,
-0.30798500776290894,
-0.14034798741340637,
0.08059479296207428,
0.38623446226119995,
0.18304169178009033,
0.0926789939403534,
0.299274206161499,
0.21683228015899658,
0.05385749787092209,
0.2178729772567749,
0.03343347832560539,
0.7148376107215881,
-0.33417585492134094,
-0.2698463201522827,
-0.2647649645805359,
-0.07538425177335739,
0.02122309058904648,
0.31664901971817017,
0.03913140669465065,
0.4542924761772156,
-0.06192044913768768,
-0.040319666266441345,
0.01175006479024887,
0.11068117618560791,
0.4621827006340027,
0.09560397267341614,
-0.21270354092121124,
-0.3641098141670227,
0.029923658818006516,
-0.007128353230655193,
-0.25798624753952026,
0.3333193361759186,
-0.16122211515903473,
-0.06048726290464401,
0.020855575799942017,
0.030193664133548737,
1.0644150972366333,
-0.2760583758354187,
0.09285139292478561,
0.3648732602596283,
-0.20551857352256775,
0.25768429040908813,
0.13360901176929474,
-0.08889733999967575,
-0.15763987600803375,
0.24091944098472595,
0.09591250866651535,
0.1458931565284729,
0.0026948973536491394,
0.2030567079782486,
-0.20644064247608185,
0.06624633818864822,
0.17709143459796906,
-0.1697538048028946,
-0.03329998254776001,
0.033907726407051086,
0.05571875721216202,
0.17882663011550903,
0.13617464900016785,
0.20647521317005157,
0.11012979596853256,
-0.027351971715688705,
0.05675279349088669,
-0.0005138516426086426,
0.11920873820781708,
-0.194210022687912,
0.06874755024909973,
0.01994416117668152,
-0.18549446761608124,
0.28355973958969116,
-0.1523345410823822,
-0.4586697816848755,
-0.14041918516159058,
-0.2169038951396942,
0.1928531527519226,
-0.09086781740188599,
0.07770204544067383,
0.17058907449245453,
0.31588372588157654,
0.18215343356132507,
-0.12965422868728638,
-0.047868143767118454,
0.335863322019577,
-0.010548671707510948,
-0.25024110078811646,
0.08275771886110306,
0.2837600111961365,
0.048686593770980835,
0.03483016788959503,
0.28017744421958923,
-0.321169912815094,
-0.0737144947052002,
0.08340807259082794,
0.20970045030117035,
-0.29656532406806946,
-0.4031594693660736,
0.2004607617855072,
-0.163279190659523,
-0.23334671556949615,
-0.1487855315208435,
0.0982617735862732,
-0.2829053997993469,
-0.006263997405767441,
0.191360205411911,
0.42265504598617554,
-0.08677402138710022,
0.13246768712997437,
0.0786747932434082,
-0.08913779258728027,
-0.25607427954673767,
0.13181918859481812,
0.14670367538928986,
-0.5616844296455383,
0.1952316164970398,
-0.13072402775287628,
0.019607767462730408,
0.11532402783632278,
0.13145937025547028,
-0.017000071704387665,
-0.2400071918964386,
-0.20578883588314056,
0.0706406831741333,
-0.3164933919906616,
0.09774987399578094,
-0.07166045904159546,
0.3519405722618103,
-0.19706016778945923,
0.022794287651777267,
-0.12801474332809448,
0.2551703453063965,
-0.4023962616920471,
0.3481813669204712,
-0.2751215398311615,
0.2651206851005554,
-0.22752144932746887,
-0.07377686351537704,
-0.1020166426897049,
0.3335077464580536,
0.22485680878162384,
-0.09671537578105927,
-0.400473415851593,
-0.3237605392932892,
-0.24507808685302734,
0.0638764277100563,
-0.11135271936655045,
-0.044341638684272766,
-0.018642913550138474,
0.12417471408843994,
0.2122276872396469,
-0.16700045764446259,
0.13507278263568878,
0.1513063609600067,
0.2527487277984619,
0.14515478909015656,
0.10049845278263092,
-0.08073516935110092,
-0.23170559108257294,
-0.09620159864425659,
0.1128525659441948,
0.0605735182762146,
0.3657432198524475,
-0.2195557951927185,
-0.2831236720085144,
-0.23714599013328552,
-0.020008420571684837,
0.008632339537143707,
0.17307095229625702,
-0.1621912121772766,
-0.09648840874433517,
0.15781456232070923,
-0.2682707607746124,
-0.010404001921415329,
0.24864721298217773,
-0.00599294900894165,
-0.21938057243824005,
-0.21799130737781525,
0.11546873301267624,
0.24306628108024597,
-0.5087183713912964,
-0.10433071106672287,
0.002925494685769081,
-0.30916398763656616,
0.24557900428771973,
0.18040570616722107,
0.00813617929816246,
-0.0319938026368618,
0.09107986092567444,
-0.2570302486419678,
0.0060196202248334885,
-0.1729642152786255,
0.37359818816185,
0.35422632098197937,
0.05480600520968437,
-0.12565962970256805,
0.5434410572052002,
0.009239071980118752,
0.2257671356201172,
0.47703444957733154,
-0.08595392853021622,
0.568511426448822,
-0.3942364752292633,
0.16004042327404022,
0.2826440930366516,
-0.04596765339374542,
0.15939119458198547,
0.2637462913990021,
-0.059422567486763,
0.01692027598619461,
0.08369176089763641,
0.11439363658428192,
0.24951602518558502,
0.012552686035633087,
-0.20262759923934937,
0.17792385816574097,
-0.18747490644454956,
-0.31938743591308594,
0.10669080913066864,
-0.23204845190048218,
-0.09013974666595459,
0.14819595217704773,
0.04132027179002762,
-0.08482441306114197,
0.019077643752098083,
0.20856529474258423,
-0.06766773760318756,
0.038226887583732605,
-0.34845346212387085,
-0.1815468668937683,
0.10497357696294785,
-0.11333714425563812,
0.385199636220932,
0.43692898750305176,
-0.03771926462650299,
-0.07440313696861267,
0.30428752303123474,
0.34925219416618347,
-0.35132211446762085,
0.14083313941955566,
-0.04860536754131317,
-0.3223835527896881,
0.0016424041241407394,
-0.18934564292430878,
0.17489631474018097,
0.0700877234339714,
-0.07692119479179382,
0.2669951319694519,
0.13558177649974823,
-0.23198673129081726,
-0.23276685178279877,
0.42527323961257935,
-0.06952908635139465,
-0.41115933656692505,
0.43126821517944336,
-0.3308848440647125,
-0.04598284512758255,
-0.06971855461597443,
0.21325194835662842,
-0.4768785536289215,
0.38992756605148315,
0.42169496417045593,
-0.15981733798980713,
0.060774438083171844,
-0.08128662407398224,
0.1262681484222412,
0.014322741888463497,
0.5851631164550781,
0.12671928107738495,
0.07228972762823105,
-0.212663471698761,
-0.3589537739753723,
-0.559165358543396,
0.34652912616729736,
-0.3802586793899536,
0.013184109702706337,
0.012630562297999859,
0.06811469793319702,
0.0360700748860836,
0.19308894872665405,
-0.04757849872112274,
0.19639530777931213,
0.12659567594528198,
-0.24348223209381104,
-0.4807628095149994,
-0.021408360451459885,
0.01137905940413475,
-0.17530420422554016,
0.014731548726558685,
-0.28259220719337463,
0.09515221416950226,
-0.412732869386673,
0.06457127630710602,
0.19243620336055756,
-0.12411049008369446,
0.23144325613975525,
0.25647830963134766,
0.2895270586013794,
0.1387012004852295,
0.2878734767436981,
0.010629400610923767,
0.030480416491627693,
0.07766257226467133,
-0.17014262080192566,
0.12272830307483673,
0.28525274991989136,
0.163818821310997,
-0.05948517844080925,
0.006194178014993668,
-0.23016737401485443,
0.1879751831293106,
0.3709399104118347,
0.2256375104188919,
0.10165265202522278,
-0.09824643284082413,
0.14547620713710785,
0.17427456378936768,
-0.14926296472549438,
-0.08820126205682755,
0.3099319636821747,
0.09100086987018585,
-0.046499840915203094,
-0.2668628692626953,
-0.518770694732666,
0.550489068031311,
-0.3391307592391968,
-0.05770137906074524,
-0.3835507333278656,
0.2319302260875702,
-0.12726208567619324,
0.07668083906173706,
-0.7147968411445618,
0.20140719413757324,
0.3444116711616516,
0.08441394567489624,
-0.20336145162582397,
0.2627137303352356,
-0.22237996757030487,
0.007198698818683624,
0.005952697247266769,
0.011704549193382263,
0.21939459443092346,
-0.05408361554145813,
0.10596407949924469,
-0.2452145367860794
] |
https://github.com/huggingface/datasets/issues/2218 | Duplicates in the LAMA dataset | Oh, seems like my question wasn't specified well. I'm _not_ asking how to remove duplicates, but whether duplicates should be removed if I want to do the evaluation on the LAMA dataset as it was proposed in the original paper/repository? In other words, will I get the same result if evaluate on the de-duplicated dataset loaded from HF's `datasets` as the results I'd get if I use the original data format and data processing script in https://github.com/facebookresearch/LAMA? | I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA? | 77 | Duplicates in the LAMA dataset
I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA?
Oh, seems like my question wasn't specified well. I'm _not_ asking how to remove duplicates, but whether duplicates should be removed if I want to do the evaluation on the LAMA dataset as it was proposed in the original paper/repository? In other words, will I get the same result if evaluate on the de-duplicated dataset loaded from HF's `datasets` as the results I'd get if I use the original data format and data processing script in https://github.com/facebookresearch/LAMA? | [
0.26157328486442566,
-0.3211714029312134,
-0.030378006398677826,
0.6542940139770508,
0.31745362281799316,
-0.13887424767017365,
0.31275230646133423,
0.3269728124141693,
-0.5472854971885681,
0.3365437984466553,
-0.345426082611084,
0.3600650727748871,
0.08196303248405457,
-0.2813018560409546,
0.1604105830192566,
-0.1338142454624176,
0.02549462765455246,
-0.16616976261138916,
-0.20456314086914062,
-0.20634040236473083,
-0.1825977861881256,
0.33954787254333496,
0.037247367203235626,
0.08386006206274033,
-0.14086736738681793,
0.1054261103272438,
-0.14082258939743042,
0.26964783668518066,
0.021122198551893234,
-0.27218198776245117,
0.13598528504371643,
0.11956562101840973,
-0.04239588975906372,
0.4986018240451813,
-0.00010625526192598045,
0.026655197143554688,
-0.1191423088312149,
-0.05169885605573654,
-0.14893226325511932,
-0.030792057514190674,
-0.02810090221464634,
-0.020673207938671112,
-0.004479846451431513,
-0.26242056488990784,
-0.30851244926452637,
-0.06798579543828964,
-0.0779155045747757,
-0.11037740111351013,
0.4661048650741577,
0.20960064232349396,
0.26725295186042786,
0.34897613525390625,
-0.2831970155239105,
-0.15893393754959106,
0.2227594256401062,
-0.18369315564632416,
-0.08663272857666016,
0.4994787573814392,
0.183348149061203,
0.6046417951583862,
-0.06693492084741592,
0.568586528301239,
0.0555703267455101,
-0.07701154053211212,
-0.28067198395729065,
-0.3192391097545624,
0.31820452213287354,
-0.11157457530498505,
0.3222728371620178,
0.3282352387905121,
-0.009144783020019531,
-0.24006125330924988,
-0.19547602534294128,
-0.12311358004808426,
-0.02792849764227867,
-0.1791887730360031,
0.0652221292257309,
0.13542018830776215,
0.061883967369794846,
0.14554138481616974,
0.1373833417892456,
0.02526128850877285,
0.23217812180519104,
-0.1204138696193695,
-0.146145761013031,
-0.1684124767780304,
-0.020073629915714264,
0.11560642719268799,
0.16728053987026215,
-0.15831923484802246,
0.20287463068962097,
-0.1564391702413559,
-0.17289504408836365,
0.049389876425266266,
-0.22320957481861115,
-0.13471956551074982,
0.001867242157459259,
-0.10566449910402298,
0.1160551980137825,
0.5150150060653687,
0.23398619890213013,
0.34655383229255676,
-0.13079482316970825,
0.02399817854166031,
0.15421552956104279,
0.07063432037830353,
-0.050043441355228424,
0.06458129733800888,
-0.17592577636241913,
0.021891430020332336,
-0.316541850566864,
0.0213836207985878,
-0.34171777963638306,
-0.16918723285198212,
0.07730434834957123,
-0.011414937674999237,
0.054341450333595276,
-0.10627097636461258,
-0.08382465690374374,
-0.23075082898139954,
-0.403702050447464,
-0.10849177837371826,
0.060547009110450745,
0.15021002292633057,
0.1372217983007431,
0.2108774483203888,
-0.3826010823249817,
0.01596812903881073,
-0.2030605673789978,
-0.1918773055076599,
-0.3366513252258301,
0.1416359841823578,
-0.1806386262178421,
0.07943274080753326,
-0.004610173404216766,
-0.7226566672325134,
0.4088577628135681,
0.09007225930690765,
-0.1415320634841919,
-0.26926249265670776,
0.43663185834884644,
-0.21643030643463135,
0.15831157565116882,
0.011138875037431717,
-0.16881945729255676,
0.12734033167362213,
-0.018623877316713333,
-0.021823231130838394,
-0.1080177053809166,
0.023868560791015625,
-0.14053252339363098,
-0.09069615602493286,
-0.1264304220676422,
0.29382461309432983,
0.19993536174297333,
0.2575151324272156,
0.31681540608406067,
0.3918619453907013,
-0.03176192194223404,
0.03564568981528282,
0.0930773913860321,
0.01823599450290203,
-0.3235776722431183,
-0.13110485672950745,
0.08142589777708054,
0.2557786703109741,
-0.08448665589094162,
-0.03427233546972275,
0.012946877628564835,
0.005958288908004761,
0.2059478610754013,
0.527009904384613,
-0.1314258873462677,
0.2728060483932495,
-0.3161911368370056,
0.3068464994430542,
0.17531484365463257,
-0.48836562037467957,
-0.005070814862847328,
-0.1671351194381714,
0.034287311136722565,
0.10375437885522842,
0.22805583477020264,
0.025739656761288643,
0.28746747970581055,
-0.10209603607654572,
0.22066457569599152,
-0.11895038187503815,
0.2129843533039093,
-0.19902460277080536,
-0.22436992824077606,
-0.02178131602704525,
-0.04410070925951004,
-0.11158671975135803,
-0.12241071462631226,
-0.24075832962989807,
0.023219436407089233,
-0.026447702199220657,
0.16337282955646515,
-0.08747868239879608,
-0.16334842145442963,
-0.028717465698719025,
0.03826025500893593,
-0.0036897584795951843,
0.06438242644071579,
0.03419863432645798,
-0.14613279700279236,
0.20150259137153625,
-0.1772346943616867,
0.3269670307636261,
0.030266426503658295,
-0.18393786251544952,
-0.26156675815582275,
-0.09595779329538345,
-0.2973305583000183,
-0.1768953651189804,
0.2863490581512451,
0.27370184659957886,
0.017678789794445038,
0.14256933331489563,
0.007925696671009064,
0.11064698547124863,
-0.03687099739909172,
0.19083185493946075,
-0.508858323097229,
0.08024828135967255,
-0.18475240468978882,
0.06039983779191971,
0.1334294229745865,
0.2846054434776306,
0.17894592881202698,
0.015614748932421207,
0.22257012128829956,
0.009297575801610947,
0.31258729100227356,
0.02752450853586197,
0.2928507328033447,
-0.14915435016155243,
0.023394059389829636,
-0.17078717052936554,
-0.09262417256832123,
0.08331079035997391,
0.18655391037464142,
-0.05468565225601196,
-0.037961192429065704,
0.4738602042198181,
0.5330001711845398,
-0.2722347676753998,
0.10202109813690186,
-0.13029731810092926,
0.27947112917900085,
-0.13579769432544708,
-0.07294219732284546,
-0.49294939637184143,
0.06695341318845749,
0.5568975806236267,
0.24027277529239655,
0.4626103341579437,
-0.24201498925685883,
0.08918992429971695,
0.13075073063373566,
-0.17546509206295013,
0.028033055365085602,
-0.18901389837265015,
-0.21372997760772705,
-0.11184507608413696,
0.12909235060214996,
0.35541021823883057,
0.01492803543806076,
0.27378302812576294,
0.5646851062774658,
0.12184616923332214,
-0.15246932208538055,
-0.2303454726934433,
0.19027788937091827,
-0.06282326579093933,
-0.12230177223682404,
0.12477576732635498,
0.10891332477331161,
-0.017405617982149124,
-0.7163099050521851,
0.1091497540473938,
0.06749671697616577,
0.17828288674354553,
-0.10402214527130127,
0.045826271176338196,
-0.518665075302124,
-0.27920880913734436,
-0.34234580397605896,
0.11616301536560059,
-0.21410419046878815,
-0.21022799611091614,
0.2235586941242218,
0.08338290452957153,
-0.07916710525751114,
0.2216530740261078,
-0.05872887372970581,
0.464363157749176,
-0.14143148064613342,
0.19015145301818848,
-0.2832051217556,
0.062185708433389664,
-0.2202778458595276,
0.2213904857635498,
0.15733470022678375,
-0.011641500517725945,
0.3668324947357178,
-0.14533445239067078,
-0.00917566567659378,
-0.40531954169273376,
-0.5439638495445251,
0.15485310554504395,
0.16202476620674133,
0.16634619235992432,
-0.015046201646327972,
-0.22846771776676178,
-0.0598769411444664,
-0.22877372801303864,
-0.09263643622398376,
0.2382824420928955,
-0.4187103509902954,
-0.05883491039276123,
-0.1609436273574829,
0.3222581148147583,
-0.1648002713918686,
-0.35690951347351074,
0.13334247469902039,
-0.1296953558921814,
0.11318708956241608,
0.09489713609218597,
0.2506996989250183,
0.1955593377351761,
-0.09626231342554092,
0.17080186307430267,
-0.43862390518188477,
0.011402420699596405,
-0.5250067114830017,
-0.33476191759109497,
0.12830446660518646,
-0.12212561815977097,
-0.07739849388599396,
-0.12652646005153656,
-0.4503447413444519,
0.5347149968147278,
-0.20437122881412506,
-0.38080739974975586,
-0.10400055348873138,
0.0391998328268528,
0.005205262452363968,
0.3159894347190857,
-0.07294732332229614,
-0.05240103602409363,
0.29546108841896057,
-0.3133579194545746,
-0.057294685393571854,
0.0053227245807647705,
0.05347619205713272,
0.056747689843177795,
0.19195908308029175,
-0.3597271740436554,
-0.02720675617456436,
0.12685252726078033,
0.17695219814777374,
0.4423532783985138,
-0.057804208248853683,
0.27113020420074463,
0.1016455888748169,
0.41492176055908203,
-0.035089120268821716,
-0.0963190570473671,
-0.13745969533920288,
-0.15808051824569702,
0.14631883800029755,
0.5981575846672058,
0.19859498739242554,
0.09290023893117905,
-0.019227836281061172,
0.023038499057292938,
-0.13445791602134705,
-0.3823532164096832,
-0.20871484279632568,
-0.263679176568985,
-0.006935916841030121,
0.21163590252399445,
-0.18117070198059082,
0.1093776524066925,
0.16076144576072693,
0.15939344465732574,
0.07278846204280853,
-0.14980915188789368,
-0.09680324047803879,
-0.0381268709897995,
0.5167209506034851,
-0.6166171431541443,
0.180210143327713,
0.06245938688516617,
-0.011382910422980785,
0.04615269973874092,
-0.01882784254848957,
0.15723983943462372,
-0.010098259896039963,
0.49224019050598145,
-0.3488263487815857,
0.04431223124265671,
0.033238716423511505,
-0.1674066185951233,
-0.31141194701194763,
0.12246285378932953,
-0.2982158362865448,
-0.12193703651428223,
0.17314568161964417,
0.5565636157989502,
-0.251090407371521,
-0.03450660780072212,
0.22944217920303345,
0.1539779156446457,
-0.2126266211271286,
0.08748561143875122,
-0.23984499275684357,
-0.4762766361236572,
-0.1906108856201172,
-0.06752841919660568,
-0.0483936108648777,
0.08470159769058228,
0.13939015567302704,
-0.30798500776290894,
-0.14034798741340637,
0.08059479296207428,
0.38623446226119995,
0.18304169178009033,
0.0926789939403534,
0.299274206161499,
0.21683228015899658,
0.05385749787092209,
0.2178729772567749,
0.03343347832560539,
0.7148376107215881,
-0.33417585492134094,
-0.2698463201522827,
-0.2647649645805359,
-0.07538425177335739,
0.02122309058904648,
0.31664901971817017,
0.03913140669465065,
0.4542924761772156,
-0.06192044913768768,
-0.040319666266441345,
0.01175006479024887,
0.11068117618560791,
0.4621827006340027,
0.09560397267341614,
-0.21270354092121124,
-0.3641098141670227,
0.029923658818006516,
-0.007128353230655193,
-0.25798624753952026,
0.3333193361759186,
-0.16122211515903473,
-0.06048726290464401,
0.020855575799942017,
0.030193664133548737,
1.0644150972366333,
-0.2760583758354187,
0.09285139292478561,
0.3648732602596283,
-0.20551857352256775,
0.25768429040908813,
0.13360901176929474,
-0.08889733999967575,
-0.15763987600803375,
0.24091944098472595,
0.09591250866651535,
0.1458931565284729,
0.0026948973536491394,
0.2030567079782486,
-0.20644064247608185,
0.06624633818864822,
0.17709143459796906,
-0.1697538048028946,
-0.03329998254776001,
0.033907726407051086,
0.05571875721216202,
0.17882663011550903,
0.13617464900016785,
0.20647521317005157,
0.11012979596853256,
-0.027351971715688705,
0.05675279349088669,
-0.0005138516426086426,
0.11920873820781708,
-0.194210022687912,
0.06874755024909973,
0.01994416117668152,
-0.18549446761608124,
0.28355973958969116,
-0.1523345410823822,
-0.4586697816848755,
-0.14041918516159058,
-0.2169038951396942,
0.1928531527519226,
-0.09086781740188599,
0.07770204544067383,
0.17058907449245453,
0.31588372588157654,
0.18215343356132507,
-0.12965422868728638,
-0.047868143767118454,
0.335863322019577,
-0.010548671707510948,
-0.25024110078811646,
0.08275771886110306,
0.2837600111961365,
0.048686593770980835,
0.03483016788959503,
0.28017744421958923,
-0.321169912815094,
-0.0737144947052002,
0.08340807259082794,
0.20970045030117035,
-0.29656532406806946,
-0.4031594693660736,
0.2004607617855072,
-0.163279190659523,
-0.23334671556949615,
-0.1487855315208435,
0.0982617735862732,
-0.2829053997993469,
-0.006263997405767441,
0.191360205411911,
0.42265504598617554,
-0.08677402138710022,
0.13246768712997437,
0.0786747932434082,
-0.08913779258728027,
-0.25607427954673767,
0.13181918859481812,
0.14670367538928986,
-0.5616844296455383,
0.1952316164970398,
-0.13072402775287628,
0.019607767462730408,
0.11532402783632278,
0.13145937025547028,
-0.017000071704387665,
-0.2400071918964386,
-0.20578883588314056,
0.0706406831741333,
-0.3164933919906616,
0.09774987399578094,
-0.07166045904159546,
0.3519405722618103,
-0.19706016778945923,
0.022794287651777267,
-0.12801474332809448,
0.2551703453063965,
-0.4023962616920471,
0.3481813669204712,
-0.2751215398311615,
0.2651206851005554,
-0.22752144932746887,
-0.07377686351537704,
-0.1020166426897049,
0.3335077464580536,
0.22485680878162384,
-0.09671537578105927,
-0.400473415851593,
-0.3237605392932892,
-0.24507808685302734,
0.0638764277100563,
-0.11135271936655045,
-0.044341638684272766,
-0.018642913550138474,
0.12417471408843994,
0.2122276872396469,
-0.16700045764446259,
0.13507278263568878,
0.1513063609600067,
0.2527487277984619,
0.14515478909015656,
0.10049845278263092,
-0.08073516935110092,
-0.23170559108257294,
-0.09620159864425659,
0.1128525659441948,
0.0605735182762146,
0.3657432198524475,
-0.2195557951927185,
-0.2831236720085144,
-0.23714599013328552,
-0.020008420571684837,
0.008632339537143707,
0.17307095229625702,
-0.1621912121772766,
-0.09648840874433517,
0.15781456232070923,
-0.2682707607746124,
-0.010404001921415329,
0.24864721298217773,
-0.00599294900894165,
-0.21938057243824005,
-0.21799130737781525,
0.11546873301267624,
0.24306628108024597,
-0.5087183713912964,
-0.10433071106672287,
0.002925494685769081,
-0.30916398763656616,
0.24557900428771973,
0.18040570616722107,
0.00813617929816246,
-0.0319938026368618,
0.09107986092567444,
-0.2570302486419678,
0.0060196202248334885,
-0.1729642152786255,
0.37359818816185,
0.35422632098197937,
0.05480600520968437,
-0.12565962970256805,
0.5434410572052002,
0.009239071980118752,
0.2257671356201172,
0.47703444957733154,
-0.08595392853021622,
0.568511426448822,
-0.3942364752292633,
0.16004042327404022,
0.2826440930366516,
-0.04596765339374542,
0.15939119458198547,
0.2637462913990021,
-0.059422567486763,
0.01692027598619461,
0.08369176089763641,
0.11439363658428192,
0.24951602518558502,
0.012552686035633087,
-0.20262759923934937,
0.17792385816574097,
-0.18747490644454956,
-0.31938743591308594,
0.10669080913066864,
-0.23204845190048218,
-0.09013974666595459,
0.14819595217704773,
0.04132027179002762,
-0.08482441306114197,
0.019077643752098083,
0.20856529474258423,
-0.06766773760318756,
0.038226887583732605,
-0.34845346212387085,
-0.1815468668937683,
0.10497357696294785,
-0.11333714425563812,
0.385199636220932,
0.43692898750305176,
-0.03771926462650299,
-0.07440313696861267,
0.30428752303123474,
0.34925219416618347,
-0.35132211446762085,
0.14083313941955566,
-0.04860536754131317,
-0.3223835527896881,
0.0016424041241407394,
-0.18934564292430878,
0.17489631474018097,
0.0700877234339714,
-0.07692119479179382,
0.2669951319694519,
0.13558177649974823,
-0.23198673129081726,
-0.23276685178279877,
0.42527323961257935,
-0.06952908635139465,
-0.41115933656692505,
0.43126821517944336,
-0.3308848440647125,
-0.04598284512758255,
-0.06971855461597443,
0.21325194835662842,
-0.4768785536289215,
0.38992756605148315,
0.42169496417045593,
-0.15981733798980713,
0.060774438083171844,
-0.08128662407398224,
0.1262681484222412,
0.014322741888463497,
0.5851631164550781,
0.12671928107738495,
0.07228972762823105,
-0.212663471698761,
-0.3589537739753723,
-0.559165358543396,
0.34652912616729736,
-0.3802586793899536,
0.013184109702706337,
0.012630562297999859,
0.06811469793319702,
0.0360700748860836,
0.19308894872665405,
-0.04757849872112274,
0.19639530777931213,
0.12659567594528198,
-0.24348223209381104,
-0.4807628095149994,
-0.021408360451459885,
0.01137905940413475,
-0.17530420422554016,
0.014731548726558685,
-0.28259220719337463,
0.09515221416950226,
-0.412732869386673,
0.06457127630710602,
0.19243620336055756,
-0.12411049008369446,
0.23144325613975525,
0.25647830963134766,
0.2895270586013794,
0.1387012004852295,
0.2878734767436981,
0.010629400610923767,
0.030480416491627693,
0.07766257226467133,
-0.17014262080192566,
0.12272830307483673,
0.28525274991989136,
0.163818821310997,
-0.05948517844080925,
0.006194178014993668,
-0.23016737401485443,
0.1879751831293106,
0.3709399104118347,
0.2256375104188919,
0.10165265202522278,
-0.09824643284082413,
0.14547620713710785,
0.17427456378936768,
-0.14926296472549438,
-0.08820126205682755,
0.3099319636821747,
0.09100086987018585,
-0.046499840915203094,
-0.2668628692626953,
-0.518770694732666,
0.550489068031311,
-0.3391307592391968,
-0.05770137906074524,
-0.3835507333278656,
0.2319302260875702,
-0.12726208567619324,
0.07668083906173706,
-0.7147968411445618,
0.20140719413757324,
0.3444116711616516,
0.08441394567489624,
-0.20336145162582397,
0.2627137303352356,
-0.22237996757030487,
0.007198698818683624,
0.005952697247266769,
0.011704549193382263,
0.21939459443092346,
-0.05408361554145813,
0.10596407949924469,
-0.2452145367860794
] |
https://github.com/huggingface/datasets/issues/2218 | Duplicates in the LAMA dataset | So it looks like the person who added LAMA to the library chose to have one item per piece of evidence rather than one per relation - and in this case, there are duplicate pieces of evidence for the target relation
If I understand correctly, to reproduce reported results, you would have to aggregate predictions for the several pieces of evidence provided for each relation (each unique `uuid`), but the original authors will know better
cc @fabiopetroni | I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA? | 77 | Duplicates in the LAMA dataset
I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi Κyl tΚΙΚy]; 12 March 1815 β 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA?
So it looks like the person who added LAMA to the library chose to have one item per piece of evidence rather than one per relation - and in this case, there are duplicate pieces of evidence for the target relation
If I understand correctly, to reproduce reported results, you would have to aggregate predictions for the several pieces of evidence provided for each relation (each unique `uuid`), but the original authors will know better
cc @fabiopetroni | [
0.26157328486442566,
-0.3211714029312134,
-0.030378006398677826,
0.6542940139770508,
0.31745362281799316,
-0.13887424767017365,
0.31275230646133423,
0.3269728124141693,
-0.5472854971885681,
0.3365437984466553,
-0.345426082611084,
0.3600650727748871,
0.08196303248405457,
-0.2813018560409546,
0.1604105830192566,
-0.1338142454624176,
0.02549462765455246,
-0.16616976261138916,
-0.20456314086914062,
-0.20634040236473083,
-0.1825977861881256,
0.33954787254333496,
0.037247367203235626,
0.08386006206274033,
-0.14086736738681793,
0.1054261103272438,
-0.14082258939743042,
0.26964783668518066,
0.021122198551893234,
-0.27218198776245117,
0.13598528504371643,
0.11956562101840973,
-0.04239588975906372,
0.4986018240451813,
-0.00010625526192598045,
0.026655197143554688,
-0.1191423088312149,
-0.05169885605573654,
-0.14893226325511932,
-0.030792057514190674,
-0.02810090221464634,
-0.020673207938671112,
-0.004479846451431513,
-0.26242056488990784,
-0.30851244926452637,
-0.06798579543828964,
-0.0779155045747757,
-0.11037740111351013,
0.4661048650741577,
0.20960064232349396,
0.26725295186042786,
0.34897613525390625,
-0.2831970155239105,
-0.15893393754959106,
0.2227594256401062,
-0.18369315564632416,
-0.08663272857666016,
0.4994787573814392,
0.183348149061203,
0.6046417951583862,
-0.06693492084741592,
0.568586528301239,
0.0555703267455101,
-0.07701154053211212,
-0.28067198395729065,
-0.3192391097545624,
0.31820452213287354,
-0.11157457530498505,
0.3222728371620178,
0.3282352387905121,
-0.009144783020019531,
-0.24006125330924988,
-0.19547602534294128,
-0.12311358004808426,
-0.02792849764227867,
-0.1791887730360031,
0.0652221292257309,
0.13542018830776215,
0.061883967369794846,
0.14554138481616974,
0.1373833417892456,
0.02526128850877285,
0.23217812180519104,
-0.1204138696193695,
-0.146145761013031,
-0.1684124767780304,
-0.020073629915714264,
0.11560642719268799,
0.16728053987026215,
-0.15831923484802246,
0.20287463068962097,
-0.1564391702413559,
-0.17289504408836365,
0.049389876425266266,
-0.22320957481861115,
-0.13471956551074982,
0.001867242157459259,
-0.10566449910402298,
0.1160551980137825,
0.5150150060653687,
0.23398619890213013,
0.34655383229255676,
-0.13079482316970825,
0.02399817854166031,
0.15421552956104279,
0.07063432037830353,
-0.050043441355228424,
0.06458129733800888,
-0.17592577636241913,
0.021891430020332336,
-0.316541850566864,
0.0213836207985878,
-0.34171777963638306,
-0.16918723285198212,
0.07730434834957123,
-0.011414937674999237,
0.054341450333595276,
-0.10627097636461258,
-0.08382465690374374,
-0.23075082898139954,
-0.403702050447464,
-0.10849177837371826,
0.060547009110450745,
0.15021002292633057,
0.1372217983007431,
0.2108774483203888,
-0.3826010823249817,
0.01596812903881073,
-0.2030605673789978,
-0.1918773055076599,
-0.3366513252258301,
0.1416359841823578,
-0.1806386262178421,
0.07943274080753326,
-0.004610173404216766,
-0.7226566672325134,
0.4088577628135681,
0.09007225930690765,
-0.1415320634841919,
-0.26926249265670776,
0.43663185834884644,
-0.21643030643463135,
0.15831157565116882,
0.011138875037431717,
-0.16881945729255676,
0.12734033167362213,
-0.018623877316713333,
-0.021823231130838394,
-0.1080177053809166,
0.023868560791015625,
-0.14053252339363098,
-0.09069615602493286,
-0.1264304220676422,
0.29382461309432983,
0.19993536174297333,
0.2575151324272156,
0.31681540608406067,
0.3918619453907013,
-0.03176192194223404,
0.03564568981528282,
0.0930773913860321,
0.01823599450290203,
-0.3235776722431183,
-0.13110485672950745,
0.08142589777708054,
0.2557786703109741,
-0.08448665589094162,
-0.03427233546972275,
0.012946877628564835,
0.005958288908004761,
0.2059478610754013,
0.527009904384613,
-0.1314258873462677,
0.2728060483932495,
-0.3161911368370056,
0.3068464994430542,
0.17531484365463257,
-0.48836562037467957,
-0.005070814862847328,
-0.1671351194381714,
0.034287311136722565,
0.10375437885522842,
0.22805583477020264,
0.025739656761288643,
0.28746747970581055,
-0.10209603607654572,
0.22066457569599152,
-0.11895038187503815,
0.2129843533039093,
-0.19902460277080536,
-0.22436992824077606,
-0.02178131602704525,
-0.04410070925951004,
-0.11158671975135803,
-0.12241071462631226,
-0.24075832962989807,
0.023219436407089233,
-0.026447702199220657,
0.16337282955646515,
-0.08747868239879608,
-0.16334842145442963,
-0.028717465698719025,
0.03826025500893593,
-0.0036897584795951843,
0.06438242644071579,
0.03419863432645798,
-0.14613279700279236,
0.20150259137153625,
-0.1772346943616867,
0.3269670307636261,
0.030266426503658295,
-0.18393786251544952,
-0.26156675815582275,
-0.09595779329538345,
-0.2973305583000183,
-0.1768953651189804,
0.2863490581512451,
0.27370184659957886,
0.017678789794445038,
0.14256933331489563,
0.007925696671009064,
0.11064698547124863,
-0.03687099739909172,
0.19083185493946075,
-0.508858323097229,
0.08024828135967255,
-0.18475240468978882,
0.06039983779191971,
0.1334294229745865,
0.2846054434776306,
0.17894592881202698,
0.015614748932421207,
0.22257012128829956,
0.009297575801610947,
0.31258729100227356,
0.02752450853586197,
0.2928507328033447,
-0.14915435016155243,
0.023394059389829636,
-0.17078717052936554,
-0.09262417256832123,
0.08331079035997391,
0.18655391037464142,
-0.05468565225601196,
-0.037961192429065704,
0.4738602042198181,
0.5330001711845398,
-0.2722347676753998,
0.10202109813690186,
-0.13029731810092926,
0.27947112917900085,
-0.13579769432544708,
-0.07294219732284546,
-0.49294939637184143,
0.06695341318845749,
0.5568975806236267,
0.24027277529239655,
0.4626103341579437,
-0.24201498925685883,
0.08918992429971695,
0.13075073063373566,
-0.17546509206295013,
0.028033055365085602,
-0.18901389837265015,
-0.21372997760772705,
-0.11184507608413696,
0.12909235060214996,
0.35541021823883057,
0.01492803543806076,
0.27378302812576294,
0.5646851062774658,
0.12184616923332214,
-0.15246932208538055,
-0.2303454726934433,
0.19027788937091827,
-0.06282326579093933,
-0.12230177223682404,
0.12477576732635498,
0.10891332477331161,
-0.017405617982149124,
-0.7163099050521851,
0.1091497540473938,
0.06749671697616577,
0.17828288674354553,
-0.10402214527130127,
0.045826271176338196,
-0.518665075302124,
-0.27920880913734436,
-0.34234580397605896,
0.11616301536560059,
-0.21410419046878815,
-0.21022799611091614,
0.2235586941242218,
0.08338290452957153,
-0.07916710525751114,
0.2216530740261078,
-0.05872887372970581,
0.464363157749176,
-0.14143148064613342,
0.19015145301818848,
-0.2832051217556,
0.062185708433389664,
-0.2202778458595276,
0.2213904857635498,
0.15733470022678375,
-0.011641500517725945,
0.3668324947357178,
-0.14533445239067078,
-0.00917566567659378,
-0.40531954169273376,
-0.5439638495445251,
0.15485310554504395,
0.16202476620674133,
0.16634619235992432,
-0.015046201646327972,
-0.22846771776676178,
-0.0598769411444664,
-0.22877372801303864,
-0.09263643622398376,
0.2382824420928955,
-0.4187103509902954,
-0.05883491039276123,
-0.1609436273574829,
0.3222581148147583,
-0.1648002713918686,
-0.35690951347351074,
0.13334247469902039,
-0.1296953558921814,
0.11318708956241608,
0.09489713609218597,
0.2506996989250183,
0.1955593377351761,
-0.09626231342554092,
0.17080186307430267,
-0.43862390518188477,
0.011402420699596405,
-0.5250067114830017,
-0.33476191759109497,
0.12830446660518646,
-0.12212561815977097,
-0.07739849388599396,
-0.12652646005153656,
-0.4503447413444519,
0.5347149968147278,
-0.20437122881412506,
-0.38080739974975586,
-0.10400055348873138,
0.0391998328268528,
0.005205262452363968,
0.3159894347190857,
-0.07294732332229614,
-0.05240103602409363,
0.29546108841896057,
-0.3133579194545746,
-0.057294685393571854,
0.0053227245807647705,
0.05347619205713272,
0.056747689843177795,
0.19195908308029175,
-0.3597271740436554,
-0.02720675617456436,
0.12685252726078033,
0.17695219814777374,
0.4423532783985138,
-0.057804208248853683,
0.27113020420074463,
0.1016455888748169,
0.41492176055908203,
-0.035089120268821716,
-0.0963190570473671,
-0.13745969533920288,
-0.15808051824569702,
0.14631883800029755,
0.5981575846672058,
0.19859498739242554,
0.09290023893117905,
-0.019227836281061172,
0.023038499057292938,
-0.13445791602134705,
-0.3823532164096832,
-0.20871484279632568,
-0.263679176568985,
-0.006935916841030121,
0.21163590252399445,
-0.18117070198059082,
0.1093776524066925,
0.16076144576072693,
0.15939344465732574,
0.07278846204280853,
-0.14980915188789368,
-0.09680324047803879,
-0.0381268709897995,
0.5167209506034851,
-0.6166171431541443,
0.180210143327713,
0.06245938688516617,
-0.011382910422980785,
0.04615269973874092,
-0.01882784254848957,
0.15723983943462372,
-0.010098259896039963,
0.49224019050598145,
-0.3488263487815857,
0.04431223124265671,
0.033238716423511505,
-0.1674066185951233,
-0.31141194701194763,
0.12246285378932953,
-0.2982158362865448,
-0.12193703651428223,
0.17314568161964417,
0.5565636157989502,
-0.251090407371521,
-0.03450660780072212,
0.22944217920303345,
0.1539779156446457,
-0.2126266211271286,
0.08748561143875122,
-0.23984499275684357,
-0.4762766361236572,
-0.1906108856201172,
-0.06752841919660568,
-0.0483936108648777,
0.08470159769058228,
0.13939015567302704,
-0.30798500776290894,
-0.14034798741340637,
0.08059479296207428,
0.38623446226119995,
0.18304169178009033,
0.0926789939403534,
0.299274206161499,
0.21683228015899658,
0.05385749787092209,
0.2178729772567749,
0.03343347832560539,
0.7148376107215881,
-0.33417585492134094,
-0.2698463201522827,
-0.2647649645805359,
-0.07538425177335739,
0.02122309058904648,
0.31664901971817017,
0.03913140669465065,
0.4542924761772156,
-0.06192044913768768,
-0.040319666266441345,
0.01175006479024887,
0.11068117618560791,
0.4621827006340027,
0.09560397267341614,
-0.21270354092121124,
-0.3641098141670227,
0.029923658818006516,
-0.007128353230655193,
-0.25798624753952026,
0.3333193361759186,
-0.16122211515903473,
-0.06048726290464401,
0.020855575799942017,
0.030193664133548737,
1.0644150972366333,
-0.2760583758354187,
0.09285139292478561,
0.3648732602596283,
-0.20551857352256775,
0.25768429040908813,
0.13360901176929474,
-0.08889733999967575,
-0.15763987600803375,
0.24091944098472595,
0.09591250866651535,
0.1458931565284729,
0.0026948973536491394,
0.2030567079782486,
-0.20644064247608185,
0.06624633818864822,
0.17709143459796906,
-0.1697538048028946,
-0.03329998254776001,
0.033907726407051086,
0.05571875721216202,
0.17882663011550903,
0.13617464900016785,
0.20647521317005157,
0.11012979596853256,
-0.027351971715688705,
0.05675279349088669,
-0.0005138516426086426,
0.11920873820781708,
-0.194210022687912,
0.06874755024909973,
0.01994416117668152,
-0.18549446761608124,
0.28355973958969116,
-0.1523345410823822,
-0.4586697816848755,
-0.14041918516159058,
-0.2169038951396942,
0.1928531527519226,
-0.09086781740188599,
0.07770204544067383,
0.17058907449245453,
0.31588372588157654,
0.18215343356132507,
-0.12965422868728638,
-0.047868143767118454,
0.335863322019577,
-0.010548671707510948,
-0.25024110078811646,
0.08275771886110306,
0.2837600111961365,
0.048686593770980835,
0.03483016788959503,
0.28017744421958923,
-0.321169912815094,
-0.0737144947052002,
0.08340807259082794,
0.20970045030117035,
-0.29656532406806946,
-0.4031594693660736,
0.2004607617855072,
-0.163279190659523,
-0.23334671556949615,
-0.1487855315208435,
0.0982617735862732,
-0.2829053997993469,
-0.006263997405767441,
0.191360205411911,
0.42265504598617554,
-0.08677402138710022,
0.13246768712997437,
0.0786747932434082,
-0.08913779258728027,
-0.25607427954673767,
0.13181918859481812,
0.14670367538928986,
-0.5616844296455383,
0.1952316164970398,
-0.13072402775287628,
0.019607767462730408,
0.11532402783632278,
0.13145937025547028,
-0.017000071704387665,
-0.2400071918964386,
-0.20578883588314056,
0.0706406831741333,
-0.3164933919906616,
0.09774987399578094,
-0.07166045904159546,
0.3519405722618103,
-0.19706016778945923,
0.022794287651777267,
-0.12801474332809448,
0.2551703453063965,
-0.4023962616920471,
0.3481813669204712,
-0.2751215398311615,
0.2651206851005554,
-0.22752144932746887,
-0.07377686351537704,
-0.1020166426897049,
0.3335077464580536,
0.22485680878162384,
-0.09671537578105927,
-0.400473415851593,
-0.3237605392932892,
-0.24507808685302734,
0.0638764277100563,
-0.11135271936655045,
-0.044341638684272766,
-0.018642913550138474,
0.12417471408843994,
0.2122276872396469,
-0.16700045764446259,
0.13507278263568878,
0.1513063609600067,
0.2527487277984619,
0.14515478909015656,
0.10049845278263092,
-0.08073516935110092,
-0.23170559108257294,
-0.09620159864425659,
0.1128525659441948,
0.0605735182762146,
0.3657432198524475,
-0.2195557951927185,
-0.2831236720085144,
-0.23714599013328552,
-0.020008420571684837,
0.008632339537143707,
0.17307095229625702,
-0.1621912121772766,
-0.09648840874433517,
0.15781456232070923,
-0.2682707607746124,
-0.010404001921415329,
0.24864721298217773,
-0.00599294900894165,
-0.21938057243824005,
-0.21799130737781525,
0.11546873301267624,
0.24306628108024597,
-0.5087183713912964,
-0.10433071106672287,
0.002925494685769081,
-0.30916398763656616,
0.24557900428771973,
0.18040570616722107,
0.00813617929816246,
-0.0319938026368618,
0.09107986092567444,
-0.2570302486419678,
0.0060196202248334885,
-0.1729642152786255,
0.37359818816185,
0.35422632098197937,
0.05480600520968437,
-0.12565962970256805,
0.5434410572052002,
0.009239071980118752,
0.2257671356201172,
0.47703444957733154,
-0.08595392853021622,
0.568511426448822,
-0.3942364752292633,
0.16004042327404022,
0.2826440930366516,
-0.04596765339374542,
0.15939119458198547,
0.2637462913990021,
-0.059422567486763,
0.01692027598619461,
0.08369176089763641,
0.11439363658428192,
0.24951602518558502,
0.012552686035633087,
-0.20262759923934937,
0.17792385816574097,
-0.18747490644454956,
-0.31938743591308594,
0.10669080913066864,
-0.23204845190048218,
-0.09013974666595459,
0.14819595217704773,
0.04132027179002762,
-0.08482441306114197,
0.019077643752098083,
0.20856529474258423,
-0.06766773760318756,
0.038226887583732605,
-0.34845346212387085,
-0.1815468668937683,
0.10497357696294785,
-0.11333714425563812,
0.385199636220932,
0.43692898750305176,
-0.03771926462650299,
-0.07440313696861267,
0.30428752303123474,
0.34925219416618347,
-0.35132211446762085,
0.14083313941955566,
-0.04860536754131317,
-0.3223835527896881,
0.0016424041241407394,
-0.18934564292430878,
0.17489631474018097,
0.0700877234339714,
-0.07692119479179382,
0.2669951319694519,
0.13558177649974823,
-0.23198673129081726,
-0.23276685178279877,
0.42527323961257935,
-0.06952908635139465,
-0.41115933656692505,
0.43126821517944336,
-0.3308848440647125,
-0.04598284512758255,
-0.06971855461597443,
0.21325194835662842,
-0.4768785536289215,
0.38992756605148315,
0.42169496417045593,
-0.15981733798980713,
0.060774438083171844,
-0.08128662407398224,
0.1262681484222412,
0.014322741888463497,
0.5851631164550781,
0.12671928107738495,
0.07228972762823105,
-0.212663471698761,
-0.3589537739753723,
-0.559165358543396,
0.34652912616729736,
-0.3802586793899536,
0.013184109702706337,
0.012630562297999859,
0.06811469793319702,
0.0360700748860836,
0.19308894872665405,
-0.04757849872112274,
0.19639530777931213,
0.12659567594528198,
-0.24348223209381104,
-0.4807628095149994,
-0.021408360451459885,
0.01137905940413475,
-0.17530420422554016,
0.014731548726558685,
-0.28259220719337463,
0.09515221416950226,
-0.412732869386673,
0.06457127630710602,
0.19243620336055756,
-0.12411049008369446,
0.23144325613975525,
0.25647830963134766,
0.2895270586013794,
0.1387012004852295,
0.2878734767436981,
0.010629400610923767,
0.030480416491627693,
0.07766257226467133,
-0.17014262080192566,
0.12272830307483673,
0.28525274991989136,
0.163818821310997,
-0.05948517844080925,
0.006194178014993668,
-0.23016737401485443,
0.1879751831293106,
0.3709399104118347,
0.2256375104188919,
0.10165265202522278,
-0.09824643284082413,
0.14547620713710785,
0.17427456378936768,
-0.14926296472549438,
-0.08820126205682755,
0.3099319636821747,
0.09100086987018585,
-0.046499840915203094,
-0.2668628692626953,
-0.518770694732666,
0.550489068031311,
-0.3391307592391968,
-0.05770137906074524,
-0.3835507333278656,
0.2319302260875702,
-0.12726208567619324,
0.07668083906173706,
-0.7147968411445618,
0.20140719413757324,
0.3444116711616516,
0.08441394567489624,
-0.20336145162582397,
0.2627137303352356,
-0.22237996757030487,
0.007198698818683624,
0.005952697247266769,
0.011704549193382263,
0.21939459443092346,
-0.05408361554145813,
0.10596407949924469,
-0.2452145367860794
] |
https://github.com/huggingface/datasets/issues/2214 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings' | Hi @nsaphra, thanks for reporting.
This issue was fixed in `datasets` version 1.3.0. Could you please update `datasets` and tell me if the problem persists?
```shell
pip install -U datasets
``` | I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
``` | 31 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
Hi @nsaphra, thanks for reporting.
This issue was fixed in `datasets` version 1.3.0. Could you please update `datasets` and tell me if the problem persists?
```shell
pip install -U datasets
``` | [
-0.27232426404953003,
-0.21355824172496796,
0.019322574138641357,
0.18529212474822998,
0.4195103049278259,
0.06305492669343948,
0.27295348048210144,
0.18010608851909637,
0.07569603621959686,
-0.05244581401348114,
-0.19403764605522156,
0.154596209526062,
-0.07444863766431808,
0.29741495847702026,
0.06521449238061905,
-0.047137342393398285,
-0.031500689685344696,
0.015083104372024536,
-0.2626020610332489,
0.029681958258152008,
-0.3187803030014038,
0.293637752532959,
-0.1672728955745697,
-0.17640335857868195,
-0.40212157368659973,
-0.010555801913142204,
0.04374728351831436,
0.24411502480506897,
-0.28627052903175354,
-0.5002133846282959,
0.20559975504875183,
0.04620346426963806,
0.29634377360343933,
0.3439410328865051,
-0.00011626121704466641,
-0.08408615738153458,
0.21465162932872772,
-0.02799481898546219,
-0.5544193983078003,
-0.1524081975221634,
0.05280157923698425,
-0.29944172501564026,
0.2512984275817871,
-0.10539600253105164,
-0.026472069323062897,
-0.1421283483505249,
-0.09652097523212433,
-0.29812896251678467,
0.32095569372177124,
0.29845723509788513,
0.2062050700187683,
0.6519036293029785,
0.11260800063610077,
-0.32463452219963074,
0.07565456628799438,
-0.1170935183763504,
-0.13894528150558472,
0.5830134749412537,
0.21556608378887177,
-0.29701530933380127,
0.005557045340538025,
0.1997518092393875,
-0.0833815261721611,
0.29603809118270874,
0.5132630467414856,
0.007255026139318943,
0.09399664402008057,
-0.055888764560222626,
0.10158753395080566,
0.0599488690495491,
0.48482462763786316,
-0.3377358019351959,
-0.3453688323497772,
-0.28764158487319946,
0.15713371336460114,
-0.3172512352466583,
0.22588077187538147,
-0.12669479846954346,
0.061191629618406296,
0.1738772839307785,
-0.14253796637058258,
-0.274617999792099,
0.027385741472244263,
0.2549826204776764,
-0.05663599818944931,
-0.13257521390914917,
-0.328805148601532,
-0.02926618605852127,
0.39935481548309326,
0.0067998431622982025,
0.006115119904279709,
0.11064083129167557,
0.0018890760838985443,
0.24544838070869446,
-0.2312646061182022,
0.16040469706058502,
0.22106009721755981,
0.06388594210147858,
0.1995057761669159,
0.11695577949285507,
0.138536274433136,
-0.10912027209997177,
0.2827873229980469,
0.14451244473457336,
0.04511501267552376,
0.45530563592910767,
0.4384199380874634,
0.05012613534927368,
0.27277809381484985,
0.38317522406578064,
0.22833994030952454,
-0.10320786386728287,
-0.00015429011546075344,
-0.41937482357025146,
-0.13960814476013184,
-0.16963815689086914,
0.31455540657043457,
-0.04376218095421791,
-0.3397487998008728,
0.2789822518825531,
0.22503337264060974,
-0.11003255844116211,
0.05597826838493347,
0.16666890680789948,
0.03895699605345726,
0.06807209551334381,
0.37976956367492676,
0.18045613169670105,
-0.25676003098487854,
0.06953626126050949,
-0.2539497911930084,
0.01920962519943714,
-0.22047822177410126,
0.27433428168296814,
0.23876570165157318,
-0.176583394408226,
0.26924729347229004,
0.1394808441400528,
0.08101913332939148,
0.013113491237163544,
-0.14234845340251923,
0.14122191071510315,
-0.2486167550086975,
0.2955056130886078,
0.013345275074243546,
0.1941344439983368,
0.3053654730319977,
-0.33897489309310913,
-0.0738554298877716,
-0.24839338660240173,
-0.24579325318336487,
-0.09133324027061462,
-0.24657635390758514,
0.16072574257850647,
-0.377799928188324,
0.10188458859920502,
-0.15487411618232727,
0.0269366055727005,
0.11587677150964737,
0.09552560746669769,
-0.053369052708148956,
-0.021909914910793304,
-0.41262727975845337,
-0.05376540124416351,
0.33980792760849,
0.407076895236969,
-0.24711191654205322,
-0.40578269958496094,
0.1503964215517044,
-0.13889780640602112,
-0.21141451597213745,
0.03923768177628517,
0.08538834750652313,
0.2430647909641266,
-0.22631198167800903,
0.0026319772005081177,
0.13704434037208557,
-0.513792872428894,
-0.420465350151062,
0.13967682421207428,
-0.14877493679523468,
0.08273012936115265,
0.07508595287799835,
-0.171453595161438,
0.11462191492319107,
0.18305446207523346,
0.4504915177822113,
0.09141518920660019,
0.11674764007329941,
-0.1548793613910675,
-0.29082515835762024,
-0.18380698561668396,
-0.2629745602607727,
0.2544322907924652,
0.1082778126001358,
0.05198538303375244,
0.17583492398262024,
0.16976748406887054,
0.06789019703865051,
-0.07989299297332764,
0.01129468996077776,
0.493267297744751,
0.15437355637550354,
-0.0364748015999794,
0.1711864173412323,
-0.20084097981452942,
-0.5201353430747986,
0.21568414568901062,
-0.018396060913801193,
0.09934313595294952,
-0.08999378979206085,
-0.06688566505908966,
-0.3745590150356293,
-0.046378955245018005,
-0.07533055543899536,
-0.17654113471508026,
0.04527098685503006,
-0.010936900973320007,
-0.1645415723323822,
0.32875025272369385,
-0.14200329780578613,
0.29803094267845154,
-0.30875229835510254,
0.3473667800426483,
-0.3626067340373993,
0.2142394334077835,
0.09710907936096191,
-0.16834835708141327,
0.1748620867729187,
0.15773478150367737,
0.11031119525432587,
-0.17727123200893402,
-0.07180102169513702,
0.4855264127254486,
0.15050961077213287,
0.06297735869884491,
-0.02851148694753647,
0.21652847528457642,
0.19156543910503387,
-0.14212360978126526,
-0.16675373911857605,
-0.0733659416437149,
0.03507013991475105,
-0.0022644251585006714,
-0.01862412691116333,
0.16038787364959717,
-0.1758863478899002,
0.059526823461055756,
0.11239919066429138,
0.16880223155021667,
0.04887932538986206,
-0.07789573073387146,
-0.18806572258472443,
-0.38395288586616516,
0.4798426330089569,
-0.018093038350343704,
0.3275279402732849,
-0.03157909959554672,
0.17372609674930573,
-0.11271249502897263,
0.3555792570114136,
0.009692512452602386,
0.08774123340845108,
0.11627070605754852,
-0.30880096554756165,
0.13704311847686768,
-0.003653150051832199,
0.011657539755105972,
0.46932488679885864,
0.20064876973628998,
-0.004576060920953751,
0.2940475642681122,
0.008987518958747387,
-0.09641172736883163,
0.12861406803131104,
0.017879389226436615,
-0.17447882890701294,
0.2901948094367981,
-0.0639035701751709,
-0.059552501887083054,
-0.3733409345149994,
0.15492169559001923,
-0.07914410531520844,
0.2749669849872589,
-0.5363033413887024,
-0.17576508224010468,
-0.1411076933145523,
0.02963975816965103,
0.02772822231054306,
-0.076767198741436,
-0.20039640367031097,
-0.24406729638576508,
-0.02924880012869835,
0.3258098065853119,
0.19553141295909882,
0.3660382926464081,
0.21527554094791412,
0.42110154032707214,
-0.03846706449985504,
0.08466803282499313,
-0.1243116557598114,
-0.2874589264392853,
-0.07853762060403824,
0.008165072649717331,
0.16573123633861542,
-0.03350351005792618,
0.13872522115707397,
-0.6127303242683411,
0.06443667411804199,
-0.23628506064414978,
-0.3688502013683319,
0.0849086120724678,
-0.004737783223390579,
0.6359251737594604,
0.32058238983154297,
0.1494530439376831,
-0.09610152244567871,
0.02799799293279648,
0.3684043288230896,
0.024266662076115608,
-0.2071205973625183,
0.06811565160751343,
-0.08576276898384094,
-0.23365575075149536,
-0.30433791875839233,
-0.10473933070898056,
0.018632207065820694,
-0.5030640363693237,
0.38760966062545776,
0.04028525575995445,
-0.23369456827640533,
0.337319552898407,
0.07952380180358887,
0.2915131747722626,
0.05230235680937767,
0.24168989062309265,
-0.2613460123538971,
-0.3416885733604431,
0.2696044445037842,
-0.2346160113811493,
-0.4145873486995697,
-0.03776581957936287,
0.13731549680233002,
0.1808703988790512,
-0.04528948664665222,
-0.46276187896728516,
-0.41088300943374634,
-0.11433747410774231,
0.15989497303962708,
-0.11948135495185852,
0.38862407207489014,
0.1906861662864685,
0.03574704751372337,
0.03537202626466751,
-0.33285069465637207,
-0.17451472580432892,
0.054735973477363586,
-0.19600367546081543,
0.01675041764974594,
-0.26099729537963867,
0.11863129585981369,
0.06034630909562111,
0.3715049624443054,
0.24245348572731018,
-0.05807860568165779,
0.2844278812408447,
-0.15216517448425293,
0.6900770664215088,
-0.11715502291917801,
-0.5205391049385071,
0.07094860821962357,
0.003251999616622925,
0.20664571225643158,
0.294349730014801,
0.06839576363563538,
0.33576446771621704,
-0.20865797996520996,
0.07997801899909973,
-0.10744917392730713,
-0.19851960241794586,
-0.1780720055103302,
0.057530876249074936,
0.2056671679019928,
0.043477896600961685,
0.2509680688381195,
-0.1185467541217804,
0.054649583995342255,
0.11909231543540955,
0.4457845091819763,
-0.05822538584470749,
0.024806728586554527,
-0.396876722574234,
0.15303988754749298,
-0.4186132550239563,
0.31142836809158325,
-0.023341087624430656,
0.2591668963432312,
-0.21170981228351593,
-0.18549346923828125,
0.0008127838373184204,
0.00039881630800664425,
0.4743218421936035,
-0.023287935182452202,
-0.1957426816225052,
0.20031800866127014,
-0.06901001930236816,
-0.6852123737335205,
-0.005271557718515396,
-0.04174007475376129,
-0.07898464053869247,
0.1828620284795761,
0.7977380752563477,
-0.26251021027565,
-0.301401823759079,
0.1301293671131134,
0.10239294916391373,
-0.004375215619802475,
-0.09994743019342422,
-0.3193714916706085,
-0.3368155360221863,
-0.13781104981899261,
-0.09169263392686844,
-0.02760152705013752,
0.2983660399913788,
0.15824149549007416,
0.20910577476024628,
-0.11443912982940674,
-0.2217675745487213,
0.1712341010570526,
0.1866384595632553,
0.19433045387268066,
-0.023447087034583092,
0.39470139145851135,
0.32027801871299744,
-0.07636028528213501,
0.42501237988471985,
0.40379929542541504,
-0.43098917603492737,
-0.6466449499130249,
0.1787407398223877,
-0.05354400351643562,
0.12022995948791504,
0.15749873220920563,
-0.2035825550556183,
0.03604981303215027,
-0.0532161146402359,
0.22049947082996368,
-0.4408127963542938,
0.2652895748615265,
0.4414025843143463,
0.18727847933769226,
-0.08702941983938217,
-0.17267514765262604,
0.3064501881599426,
0.08707240223884583,
0.009993456304073334,
0.43084457516670227,
0.06345615535974503,
-0.2938775420188904,
-0.0701918676495552,
-0.23052439093589783,
0.594043493270874,
0.02900899574160576,
0.17296038568019867,
0.2764143943786621,
-0.18541786074638367,
0.42180493474006653,
-0.03934195265173912,
-0.0951729416847229,
-0.2183060199022293,
-0.4836227595806122,
0.04054533690214157,
-0.041395023465156555,
0.28081175684928894,
-0.21434201300144196,
-0.1116681769490242,
0.09509548544883728,
-0.23732464015483856,
0.0704357922077179,
-0.05630335211753845,
0.22771388292312622,
-0.26614248752593994,
-0.1809368133544922,
-0.22177930176258087,
0.1224248856306076,
-0.14089366793632507,
0.23098649084568024,
-0.12563392519950867,
0.12106853723526001,
-0.06978197395801544,
-0.2212691754102707,
-0.12273231893777847,
-0.12914392352104187,
-0.28008538484573364,
0.14427243173122406,
0.23741042613983154,
-0.16325466334819794,
-0.027361514046788216,
0.3203980326652527,
0.4834206700325012,
0.07305271178483963,
-0.37009134888648987,
0.20750315487384796,
-0.3207896649837494,
-0.09732026606798172,
-0.04249231144785881,
0.07156132906675339,
0.201394185423851,
0.053096890449523926,
0.05956513434648514,
-0.16890516877174377,
0.06452340632677078,
0.203184112906456,
0.017467647790908813,
-0.045606449246406555,
-0.0876970887184143,
-0.4919412434101105,
-0.12463827431201935,
-0.05102220177650452,
0.28364506363868713,
-0.32754525542259216,
0.09811513125896454,
0.05626603588461876,
0.01476425863802433,
0.10472296178340912,
-0.03318050131201744,
-0.2428843379020691,
-0.07332795858383179,
0.6832268238067627,
-0.36139461398124695,
-0.14145562052726746,
0.1263992190361023,
0.10180813074111938,
-0.3189939260482788,
-0.14064249396324158,
0.2113712728023529,
0.2389923632144928,
-0.34339362382888794,
0.27780067920684814,
0.5266766548156738,
0.04350341856479645,
-0.06370368599891663,
0.43698155879974365,
0.23574458062648773,
-0.35354653000831604,
0.12694963812828064,
-0.22125981748104095,
-0.36774006485939026,
0.28037673234939575,
-0.16610728204250336,
0.1610449254512787,
0.0869787260890007,
0.19429230690002441,
-0.10505517572164536,
-0.014805817976593971,
-0.27938008308410645,
0.21167652308940887,
-0.09933700412511826,
-0.14080123603343964,
0.6002426147460938,
-0.24477791786193848,
0.28168126940727234,
-0.17560553550720215,
0.07717087864875793,
0.015653349459171295,
-0.3317781984806061,
-0.1820967197418213,
-0.4139861762523651,
0.10642526298761368,
-0.05384756624698639,
-0.13002759218215942,
0.29562392830848694,
0.002888726070523262,
-0.09222298860549927,
-0.29342785477638245,
0.19351162016391754,
0.45340949296951294,
-0.04622241109609604,
0.2377132624387741,
-0.12274947762489319,
0.2323916256427765,
0.1859104037284851,
0.14011387526988983,
-0.10080204904079437,
0.09975781291723251,
-0.06069193407893181,
0.041276246309280396,
-0.18473312258720398,
0.20283415913581848,
0.02226709946990013,
0.23726797103881836,
0.16150394082069397,
-0.1148734912276268,
0.154619038105011,
-0.13805660605430603,
0.01132412999868393,
-0.016845272853970528,
0.33679723739624023,
0.2945954203605652,
-0.28813636302948,
-0.06674693524837494,
0.10502050817012787,
0.18739460408687592,
-0.2524312138557434,
-0.2942764461040497,
0.05935877189040184,
0.020650258287787437,
0.11276589334011078,
0.15405502915382385,
0.15361501276493073,
-0.14554369449615479,
0.09441117197275162,
0.092318594455719,
0.3824132978916168,
0.11056088656187057,
0.17026522755622864,
0.1636682003736496,
0.1364784985780716,
-0.024405252188444138,
0.3797612488269806,
0.09760524332523346,
0.22294244170188904,
0.06889787316322327,
-0.4428272843360901,
0.08823759108781815,
-0.26417142152786255,
0.383926123380661,
-0.2432175874710083,
-0.4694572687149048,
0.07811008393764496,
0.07458647340536118,
-0.06888073682785034,
-0.03256668895483017,
-0.3320100009441376,
0.7181389927864075,
-0.3015744388103485,
-0.059684138745069504,
-0.04678048938512802,
0.0559416338801384,
-0.11778298765420914,
-0.19379141926765442,
-0.0985109955072403,
-0.10235434770584106,
-0.05811497941613197,
-0.05942990258336067,
-0.04676679149270058,
-0.14594534039497375,
0.3599129319190979,
-0.1085798591375351,
-0.033628880977630615,
-0.331072598695755,
-0.3075087368488312,
0.25926849246025085,
-0.1198570653796196,
-0.1322980523109436,
0.23399917781352997,
-0.11175952851772308,
0.23954012989997864,
0.00960373505949974,
0.6236208081245422,
0.48616722226142883,
0.057834502309560776,
0.16422663629055023,
-0.12707769870758057,
-0.11826592683792114,
0.03694924712181091,
-0.08208957314491272,
0.4027971625328064,
0.016809314489364624,
0.14492933452129364,
0.18286070227622986,
0.13656257092952728,
-0.21189630031585693,
0.15290869772434235,
-0.22817610204219818,
-0.32242128252983093,
-0.3317995071411133,
0.06269621849060059,
-0.26739224791526794,
-0.022548574954271317,
-0.13091468811035156,
0.11406175792217255,
-0.32428333163261414,
0.11545199155807495,
0.4083702266216278,
0.1985120177268982,
0.08757106959819794,
-0.15233710408210754,
0.08687271922826767,
-0.05349872633814812,
0.1909271627664566,
0.4000779092311859,
0.03674712032079697,
-0.2721698582172394,
-0.273440957069397,
-0.6236268877983093,
0.009913638234138489,
0.12167689204216003,
-0.05707515776157379,
0.12043008953332901,
-0.034865763038396835,
0.06107769161462784,
-0.03910032659769058,
0.1405399739742279,
0.10271747410297394,
-0.004131843335926533,
-0.29520660638809204,
-0.44082003831863403,
0.019726699218153954,
-0.2038559466600418,
-0.10177342593669891,
0.06709599494934082,
-0.22939419746398926,
-0.04360489174723625,
-0.18301761150360107,
-0.020756401121616364,
-0.13455721735954285,
0.2511403560638428,
0.06606994569301605,
0.003556329756975174,
0.4722619354724884,
-0.0868726447224617,
0.35990047454833984,
-0.052292462438344955,
-0.07280037552118301,
-0.16375403106212616,
-0.4566643238067627,
-0.016127411276102066,
0.1952700912952423,
-0.06646981835365295,
0.28879308700561523,
-0.4623144268989563,
-0.3876185715198517,
-0.2914838492870331,
0.5101402997970581,
0.25183284282684326,
-0.09214933961629868,
-0.22702479362487793,
0.33755192160606384,
-0.17081201076507568,
0.06625039875507355,
0.19814762473106384,
0.330905944108963,
-0.181021049618721,
0.3260754942893982,
-0.11891434341669083,
-0.5026894807815552,
0.6233596801757812,
-0.35658183693885803,
-0.09963594377040863,
0.22452722489833832,
0.288562148809433,
0.32775136828422546,
-0.356094092130661,
-0.6024032831192017,
-0.05772722512483597,
0.3717494010925293,
0.028431013226509094,
-0.5067505240440369,
0.5917938947677612,
-0.2716614305973053,
0.10352198779582977,
-0.05430541932582855,
0.14745542407035828,
0.24779897928237915,
-0.20050445199012756,
0.2222827970981598,
-0.24247825145721436
] |
https://github.com/huggingface/datasets/issues/2214 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings' | There might be a bug in the conda version of `datasets` 1.2.1 where the datasets/metric scripts are downloaded from `master` instead of the `1.2.1` repo.
You can try setting the env var `HF_SCRIPTS_VERSION="1.2.1"` as a workaround. Let me know if that helps. | I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
``` | 42 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
There might be a bug in the conda version of `datasets` 1.2.1 where the datasets/metric scripts are downloaded from `master` instead of the `1.2.1` repo.
You can try setting the env var `HF_SCRIPTS_VERSION="1.2.1"` as a workaround. Let me know if that helps. | [
-0.27232426404953003,
-0.21355824172496796,
0.019322574138641357,
0.18529212474822998,
0.4195103049278259,
0.06305492669343948,
0.27295348048210144,
0.18010608851909637,
0.07569603621959686,
-0.05244581401348114,
-0.19403764605522156,
0.154596209526062,
-0.07444863766431808,
0.29741495847702026,
0.06521449238061905,
-0.047137342393398285,
-0.031500689685344696,
0.015083104372024536,
-0.2626020610332489,
0.029681958258152008,
-0.3187803030014038,
0.293637752532959,
-0.1672728955745697,
-0.17640335857868195,
-0.40212157368659973,
-0.010555801913142204,
0.04374728351831436,
0.24411502480506897,
-0.28627052903175354,
-0.5002133846282959,
0.20559975504875183,
0.04620346426963806,
0.29634377360343933,
0.3439410328865051,
-0.00011626121704466641,
-0.08408615738153458,
0.21465162932872772,
-0.02799481898546219,
-0.5544193983078003,
-0.1524081975221634,
0.05280157923698425,
-0.29944172501564026,
0.2512984275817871,
-0.10539600253105164,
-0.026472069323062897,
-0.1421283483505249,
-0.09652097523212433,
-0.29812896251678467,
0.32095569372177124,
0.29845723509788513,
0.2062050700187683,
0.6519036293029785,
0.11260800063610077,
-0.32463452219963074,
0.07565456628799438,
-0.1170935183763504,
-0.13894528150558472,
0.5830134749412537,
0.21556608378887177,
-0.29701530933380127,
0.005557045340538025,
0.1997518092393875,
-0.0833815261721611,
0.29603809118270874,
0.5132630467414856,
0.007255026139318943,
0.09399664402008057,
-0.055888764560222626,
0.10158753395080566,
0.0599488690495491,
0.48482462763786316,
-0.3377358019351959,
-0.3453688323497772,
-0.28764158487319946,
0.15713371336460114,
-0.3172512352466583,
0.22588077187538147,
-0.12669479846954346,
0.061191629618406296,
0.1738772839307785,
-0.14253796637058258,
-0.274617999792099,
0.027385741472244263,
0.2549826204776764,
-0.05663599818944931,
-0.13257521390914917,
-0.328805148601532,
-0.02926618605852127,
0.39935481548309326,
0.0067998431622982025,
0.006115119904279709,
0.11064083129167557,
0.0018890760838985443,
0.24544838070869446,
-0.2312646061182022,
0.16040469706058502,
0.22106009721755981,
0.06388594210147858,
0.1995057761669159,
0.11695577949285507,
0.138536274433136,
-0.10912027209997177,
0.2827873229980469,
0.14451244473457336,
0.04511501267552376,
0.45530563592910767,
0.4384199380874634,
0.05012613534927368,
0.27277809381484985,
0.38317522406578064,
0.22833994030952454,
-0.10320786386728287,
-0.00015429011546075344,
-0.41937482357025146,
-0.13960814476013184,
-0.16963815689086914,
0.31455540657043457,
-0.04376218095421791,
-0.3397487998008728,
0.2789822518825531,
0.22503337264060974,
-0.11003255844116211,
0.05597826838493347,
0.16666890680789948,
0.03895699605345726,
0.06807209551334381,
0.37976956367492676,
0.18045613169670105,
-0.25676003098487854,
0.06953626126050949,
-0.2539497911930084,
0.01920962519943714,
-0.22047822177410126,
0.27433428168296814,
0.23876570165157318,
-0.176583394408226,
0.26924729347229004,
0.1394808441400528,
0.08101913332939148,
0.013113491237163544,
-0.14234845340251923,
0.14122191071510315,
-0.2486167550086975,
0.2955056130886078,
0.013345275074243546,
0.1941344439983368,
0.3053654730319977,
-0.33897489309310913,
-0.0738554298877716,
-0.24839338660240173,
-0.24579325318336487,
-0.09133324027061462,
-0.24657635390758514,
0.16072574257850647,
-0.377799928188324,
0.10188458859920502,
-0.15487411618232727,
0.0269366055727005,
0.11587677150964737,
0.09552560746669769,
-0.053369052708148956,
-0.021909914910793304,
-0.41262727975845337,
-0.05376540124416351,
0.33980792760849,
0.407076895236969,
-0.24711191654205322,
-0.40578269958496094,
0.1503964215517044,
-0.13889780640602112,
-0.21141451597213745,
0.03923768177628517,
0.08538834750652313,
0.2430647909641266,
-0.22631198167800903,
0.0026319772005081177,
0.13704434037208557,
-0.513792872428894,
-0.420465350151062,
0.13967682421207428,
-0.14877493679523468,
0.08273012936115265,
0.07508595287799835,
-0.171453595161438,
0.11462191492319107,
0.18305446207523346,
0.4504915177822113,
0.09141518920660019,
0.11674764007329941,
-0.1548793613910675,
-0.29082515835762024,
-0.18380698561668396,
-0.2629745602607727,
0.2544322907924652,
0.1082778126001358,
0.05198538303375244,
0.17583492398262024,
0.16976748406887054,
0.06789019703865051,
-0.07989299297332764,
0.01129468996077776,
0.493267297744751,
0.15437355637550354,
-0.0364748015999794,
0.1711864173412323,
-0.20084097981452942,
-0.5201353430747986,
0.21568414568901062,
-0.018396060913801193,
0.09934313595294952,
-0.08999378979206085,
-0.06688566505908966,
-0.3745590150356293,
-0.046378955245018005,
-0.07533055543899536,
-0.17654113471508026,
0.04527098685503006,
-0.010936900973320007,
-0.1645415723323822,
0.32875025272369385,
-0.14200329780578613,
0.29803094267845154,
-0.30875229835510254,
0.3473667800426483,
-0.3626067340373993,
0.2142394334077835,
0.09710907936096191,
-0.16834835708141327,
0.1748620867729187,
0.15773478150367737,
0.11031119525432587,
-0.17727123200893402,
-0.07180102169513702,
0.4855264127254486,
0.15050961077213287,
0.06297735869884491,
-0.02851148694753647,
0.21652847528457642,
0.19156543910503387,
-0.14212360978126526,
-0.16675373911857605,
-0.0733659416437149,
0.03507013991475105,
-0.0022644251585006714,
-0.01862412691116333,
0.16038787364959717,
-0.1758863478899002,
0.059526823461055756,
0.11239919066429138,
0.16880223155021667,
0.04887932538986206,
-0.07789573073387146,
-0.18806572258472443,
-0.38395288586616516,
0.4798426330089569,
-0.018093038350343704,
0.3275279402732849,
-0.03157909959554672,
0.17372609674930573,
-0.11271249502897263,
0.3555792570114136,
0.009692512452602386,
0.08774123340845108,
0.11627070605754852,
-0.30880096554756165,
0.13704311847686768,
-0.003653150051832199,
0.011657539755105972,
0.46932488679885864,
0.20064876973628998,
-0.004576060920953751,
0.2940475642681122,
0.008987518958747387,
-0.09641172736883163,
0.12861406803131104,
0.017879389226436615,
-0.17447882890701294,
0.2901948094367981,
-0.0639035701751709,
-0.059552501887083054,
-0.3733409345149994,
0.15492169559001923,
-0.07914410531520844,
0.2749669849872589,
-0.5363033413887024,
-0.17576508224010468,
-0.1411076933145523,
0.02963975816965103,
0.02772822231054306,
-0.076767198741436,
-0.20039640367031097,
-0.24406729638576508,
-0.02924880012869835,
0.3258098065853119,
0.19553141295909882,
0.3660382926464081,
0.21527554094791412,
0.42110154032707214,
-0.03846706449985504,
0.08466803282499313,
-0.1243116557598114,
-0.2874589264392853,
-0.07853762060403824,
0.008165072649717331,
0.16573123633861542,
-0.03350351005792618,
0.13872522115707397,
-0.6127303242683411,
0.06443667411804199,
-0.23628506064414978,
-0.3688502013683319,
0.0849086120724678,
-0.004737783223390579,
0.6359251737594604,
0.32058238983154297,
0.1494530439376831,
-0.09610152244567871,
0.02799799293279648,
0.3684043288230896,
0.024266662076115608,
-0.2071205973625183,
0.06811565160751343,
-0.08576276898384094,
-0.23365575075149536,
-0.30433791875839233,
-0.10473933070898056,
0.018632207065820694,
-0.5030640363693237,
0.38760966062545776,
0.04028525575995445,
-0.23369456827640533,
0.337319552898407,
0.07952380180358887,
0.2915131747722626,
0.05230235680937767,
0.24168989062309265,
-0.2613460123538971,
-0.3416885733604431,
0.2696044445037842,
-0.2346160113811493,
-0.4145873486995697,
-0.03776581957936287,
0.13731549680233002,
0.1808703988790512,
-0.04528948664665222,
-0.46276187896728516,
-0.41088300943374634,
-0.11433747410774231,
0.15989497303962708,
-0.11948135495185852,
0.38862407207489014,
0.1906861662864685,
0.03574704751372337,
0.03537202626466751,
-0.33285069465637207,
-0.17451472580432892,
0.054735973477363586,
-0.19600367546081543,
0.01675041764974594,
-0.26099729537963867,
0.11863129585981369,
0.06034630909562111,
0.3715049624443054,
0.24245348572731018,
-0.05807860568165779,
0.2844278812408447,
-0.15216517448425293,
0.6900770664215088,
-0.11715502291917801,
-0.5205391049385071,
0.07094860821962357,
0.003251999616622925,
0.20664571225643158,
0.294349730014801,
0.06839576363563538,
0.33576446771621704,
-0.20865797996520996,
0.07997801899909973,
-0.10744917392730713,
-0.19851960241794586,
-0.1780720055103302,
0.057530876249074936,
0.2056671679019928,
0.043477896600961685,
0.2509680688381195,
-0.1185467541217804,
0.054649583995342255,
0.11909231543540955,
0.4457845091819763,
-0.05822538584470749,
0.024806728586554527,
-0.396876722574234,
0.15303988754749298,
-0.4186132550239563,
0.31142836809158325,
-0.023341087624430656,
0.2591668963432312,
-0.21170981228351593,
-0.18549346923828125,
0.0008127838373184204,
0.00039881630800664425,
0.4743218421936035,
-0.023287935182452202,
-0.1957426816225052,
0.20031800866127014,
-0.06901001930236816,
-0.6852123737335205,
-0.005271557718515396,
-0.04174007475376129,
-0.07898464053869247,
0.1828620284795761,
0.7977380752563477,
-0.26251021027565,
-0.301401823759079,
0.1301293671131134,
0.10239294916391373,
-0.004375215619802475,
-0.09994743019342422,
-0.3193714916706085,
-0.3368155360221863,
-0.13781104981899261,
-0.09169263392686844,
-0.02760152705013752,
0.2983660399913788,
0.15824149549007416,
0.20910577476024628,
-0.11443912982940674,
-0.2217675745487213,
0.1712341010570526,
0.1866384595632553,
0.19433045387268066,
-0.023447087034583092,
0.39470139145851135,
0.32027801871299744,
-0.07636028528213501,
0.42501237988471985,
0.40379929542541504,
-0.43098917603492737,
-0.6466449499130249,
0.1787407398223877,
-0.05354400351643562,
0.12022995948791504,
0.15749873220920563,
-0.2035825550556183,
0.03604981303215027,
-0.0532161146402359,
0.22049947082996368,
-0.4408127963542938,
0.2652895748615265,
0.4414025843143463,
0.18727847933769226,
-0.08702941983938217,
-0.17267514765262604,
0.3064501881599426,
0.08707240223884583,
0.009993456304073334,
0.43084457516670227,
0.06345615535974503,
-0.2938775420188904,
-0.0701918676495552,
-0.23052439093589783,
0.594043493270874,
0.02900899574160576,
0.17296038568019867,
0.2764143943786621,
-0.18541786074638367,
0.42180493474006653,
-0.03934195265173912,
-0.0951729416847229,
-0.2183060199022293,
-0.4836227595806122,
0.04054533690214157,
-0.041395023465156555,
0.28081175684928894,
-0.21434201300144196,
-0.1116681769490242,
0.09509548544883728,
-0.23732464015483856,
0.0704357922077179,
-0.05630335211753845,
0.22771388292312622,
-0.26614248752593994,
-0.1809368133544922,
-0.22177930176258087,
0.1224248856306076,
-0.14089366793632507,
0.23098649084568024,
-0.12563392519950867,
0.12106853723526001,
-0.06978197395801544,
-0.2212691754102707,
-0.12273231893777847,
-0.12914392352104187,
-0.28008538484573364,
0.14427243173122406,
0.23741042613983154,
-0.16325466334819794,
-0.027361514046788216,
0.3203980326652527,
0.4834206700325012,
0.07305271178483963,
-0.37009134888648987,
0.20750315487384796,
-0.3207896649837494,
-0.09732026606798172,
-0.04249231144785881,
0.07156132906675339,
0.201394185423851,
0.053096890449523926,
0.05956513434648514,
-0.16890516877174377,
0.06452340632677078,
0.203184112906456,
0.017467647790908813,
-0.045606449246406555,
-0.0876970887184143,
-0.4919412434101105,
-0.12463827431201935,
-0.05102220177650452,
0.28364506363868713,
-0.32754525542259216,
0.09811513125896454,
0.05626603588461876,
0.01476425863802433,
0.10472296178340912,
-0.03318050131201744,
-0.2428843379020691,
-0.07332795858383179,
0.6832268238067627,
-0.36139461398124695,
-0.14145562052726746,
0.1263992190361023,
0.10180813074111938,
-0.3189939260482788,
-0.14064249396324158,
0.2113712728023529,
0.2389923632144928,
-0.34339362382888794,
0.27780067920684814,
0.5266766548156738,
0.04350341856479645,
-0.06370368599891663,
0.43698155879974365,
0.23574458062648773,
-0.35354653000831604,
0.12694963812828064,
-0.22125981748104095,
-0.36774006485939026,
0.28037673234939575,
-0.16610728204250336,
0.1610449254512787,
0.0869787260890007,
0.19429230690002441,
-0.10505517572164536,
-0.014805817976593971,
-0.27938008308410645,
0.21167652308940887,
-0.09933700412511826,
-0.14080123603343964,
0.6002426147460938,
-0.24477791786193848,
0.28168126940727234,
-0.17560553550720215,
0.07717087864875793,
0.015653349459171295,
-0.3317781984806061,
-0.1820967197418213,
-0.4139861762523651,
0.10642526298761368,
-0.05384756624698639,
-0.13002759218215942,
0.29562392830848694,
0.002888726070523262,
-0.09222298860549927,
-0.29342785477638245,
0.19351162016391754,
0.45340949296951294,
-0.04622241109609604,
0.2377132624387741,
-0.12274947762489319,
0.2323916256427765,
0.1859104037284851,
0.14011387526988983,
-0.10080204904079437,
0.09975781291723251,
-0.06069193407893181,
0.041276246309280396,
-0.18473312258720398,
0.20283415913581848,
0.02226709946990013,
0.23726797103881836,
0.16150394082069397,
-0.1148734912276268,
0.154619038105011,
-0.13805660605430603,
0.01132412999868393,
-0.016845272853970528,
0.33679723739624023,
0.2945954203605652,
-0.28813636302948,
-0.06674693524837494,
0.10502050817012787,
0.18739460408687592,
-0.2524312138557434,
-0.2942764461040497,
0.05935877189040184,
0.020650258287787437,
0.11276589334011078,
0.15405502915382385,
0.15361501276493073,
-0.14554369449615479,
0.09441117197275162,
0.092318594455719,
0.3824132978916168,
0.11056088656187057,
0.17026522755622864,
0.1636682003736496,
0.1364784985780716,
-0.024405252188444138,
0.3797612488269806,
0.09760524332523346,
0.22294244170188904,
0.06889787316322327,
-0.4428272843360901,
0.08823759108781815,
-0.26417142152786255,
0.383926123380661,
-0.2432175874710083,
-0.4694572687149048,
0.07811008393764496,
0.07458647340536118,
-0.06888073682785034,
-0.03256668895483017,
-0.3320100009441376,
0.7181389927864075,
-0.3015744388103485,
-0.059684138745069504,
-0.04678048938512802,
0.0559416338801384,
-0.11778298765420914,
-0.19379141926765442,
-0.0985109955072403,
-0.10235434770584106,
-0.05811497941613197,
-0.05942990258336067,
-0.04676679149270058,
-0.14594534039497375,
0.3599129319190979,
-0.1085798591375351,
-0.033628880977630615,
-0.331072598695755,
-0.3075087368488312,
0.25926849246025085,
-0.1198570653796196,
-0.1322980523109436,
0.23399917781352997,
-0.11175952851772308,
0.23954012989997864,
0.00960373505949974,
0.6236208081245422,
0.48616722226142883,
0.057834502309560776,
0.16422663629055023,
-0.12707769870758057,
-0.11826592683792114,
0.03694924712181091,
-0.08208957314491272,
0.4027971625328064,
0.016809314489364624,
0.14492933452129364,
0.18286070227622986,
0.13656257092952728,
-0.21189630031585693,
0.15290869772434235,
-0.22817610204219818,
-0.32242128252983093,
-0.3317995071411133,
0.06269621849060059,
-0.26739224791526794,
-0.022548574954271317,
-0.13091468811035156,
0.11406175792217255,
-0.32428333163261414,
0.11545199155807495,
0.4083702266216278,
0.1985120177268982,
0.08757106959819794,
-0.15233710408210754,
0.08687271922826767,
-0.05349872633814812,
0.1909271627664566,
0.4000779092311859,
0.03674712032079697,
-0.2721698582172394,
-0.273440957069397,
-0.6236268877983093,
0.009913638234138489,
0.12167689204216003,
-0.05707515776157379,
0.12043008953332901,
-0.034865763038396835,
0.06107769161462784,
-0.03910032659769058,
0.1405399739742279,
0.10271747410297394,
-0.004131843335926533,
-0.29520660638809204,
-0.44082003831863403,
0.019726699218153954,
-0.2038559466600418,
-0.10177342593669891,
0.06709599494934082,
-0.22939419746398926,
-0.04360489174723625,
-0.18301761150360107,
-0.020756401121616364,
-0.13455721735954285,
0.2511403560638428,
0.06606994569301605,
0.003556329756975174,
0.4722619354724884,
-0.0868726447224617,
0.35990047454833984,
-0.052292462438344955,
-0.07280037552118301,
-0.16375403106212616,
-0.4566643238067627,
-0.016127411276102066,
0.1952700912952423,
-0.06646981835365295,
0.28879308700561523,
-0.4623144268989563,
-0.3876185715198517,
-0.2914838492870331,
0.5101402997970581,
0.25183284282684326,
-0.09214933961629868,
-0.22702479362487793,
0.33755192160606384,
-0.17081201076507568,
0.06625039875507355,
0.19814762473106384,
0.330905944108963,
-0.181021049618721,
0.3260754942893982,
-0.11891434341669083,
-0.5026894807815552,
0.6233596801757812,
-0.35658183693885803,
-0.09963594377040863,
0.22452722489833832,
0.288562148809433,
0.32775136828422546,
-0.356094092130661,
-0.6024032831192017,
-0.05772722512483597,
0.3717494010925293,
0.028431013226509094,
-0.5067505240440369,
0.5917938947677612,
-0.2716614305973053,
0.10352198779582977,
-0.05430541932582855,
0.14745542407035828,
0.24779897928237915,
-0.20050445199012756,
0.2222827970981598,
-0.24247825145721436
] |
https://github.com/huggingface/datasets/issues/2214 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings' | I just faced the same issue. I was using 1.2.1 from conda and received the same AttributeError complaining about 'add_start_docstrings'. Uninstalling the conda installed datasets and then installing the latest datasets (version 1.5.0) using pip install solved the issue for me. I don't like mixing up conda and pip installs in the same environments but this will have to do for now, until 1.5.0 is made available through conda. | I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
``` | 69 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
I just faced the same issue. I was using 1.2.1 from conda and received the same AttributeError complaining about 'add_start_docstrings'. Uninstalling the conda installed datasets and then installing the latest datasets (version 1.5.0) using pip install solved the issue for me. I don't like mixing up conda and pip installs in the same environments but this will have to do for now, until 1.5.0 is made available through conda. | [
-0.27232426404953003,
-0.21355824172496796,
0.019322574138641357,
0.18529212474822998,
0.4195103049278259,
0.06305492669343948,
0.27295348048210144,
0.18010608851909637,
0.07569603621959686,
-0.05244581401348114,
-0.19403764605522156,
0.154596209526062,
-0.07444863766431808,
0.29741495847702026,
0.06521449238061905,
-0.047137342393398285,
-0.031500689685344696,
0.015083104372024536,
-0.2626020610332489,
0.029681958258152008,
-0.3187803030014038,
0.293637752532959,
-0.1672728955745697,
-0.17640335857868195,
-0.40212157368659973,
-0.010555801913142204,
0.04374728351831436,
0.24411502480506897,
-0.28627052903175354,
-0.5002133846282959,
0.20559975504875183,
0.04620346426963806,
0.29634377360343933,
0.3439410328865051,
-0.00011626121704466641,
-0.08408615738153458,
0.21465162932872772,
-0.02799481898546219,
-0.5544193983078003,
-0.1524081975221634,
0.05280157923698425,
-0.29944172501564026,
0.2512984275817871,
-0.10539600253105164,
-0.026472069323062897,
-0.1421283483505249,
-0.09652097523212433,
-0.29812896251678467,
0.32095569372177124,
0.29845723509788513,
0.2062050700187683,
0.6519036293029785,
0.11260800063610077,
-0.32463452219963074,
0.07565456628799438,
-0.1170935183763504,
-0.13894528150558472,
0.5830134749412537,
0.21556608378887177,
-0.29701530933380127,
0.005557045340538025,
0.1997518092393875,
-0.0833815261721611,
0.29603809118270874,
0.5132630467414856,
0.007255026139318943,
0.09399664402008057,
-0.055888764560222626,
0.10158753395080566,
0.0599488690495491,
0.48482462763786316,
-0.3377358019351959,
-0.3453688323497772,
-0.28764158487319946,
0.15713371336460114,
-0.3172512352466583,
0.22588077187538147,
-0.12669479846954346,
0.061191629618406296,
0.1738772839307785,
-0.14253796637058258,
-0.274617999792099,
0.027385741472244263,
0.2549826204776764,
-0.05663599818944931,
-0.13257521390914917,
-0.328805148601532,
-0.02926618605852127,
0.39935481548309326,
0.0067998431622982025,
0.006115119904279709,
0.11064083129167557,
0.0018890760838985443,
0.24544838070869446,
-0.2312646061182022,
0.16040469706058502,
0.22106009721755981,
0.06388594210147858,
0.1995057761669159,
0.11695577949285507,
0.138536274433136,
-0.10912027209997177,
0.2827873229980469,
0.14451244473457336,
0.04511501267552376,
0.45530563592910767,
0.4384199380874634,
0.05012613534927368,
0.27277809381484985,
0.38317522406578064,
0.22833994030952454,
-0.10320786386728287,
-0.00015429011546075344,
-0.41937482357025146,
-0.13960814476013184,
-0.16963815689086914,
0.31455540657043457,
-0.04376218095421791,
-0.3397487998008728,
0.2789822518825531,
0.22503337264060974,
-0.11003255844116211,
0.05597826838493347,
0.16666890680789948,
0.03895699605345726,
0.06807209551334381,
0.37976956367492676,
0.18045613169670105,
-0.25676003098487854,
0.06953626126050949,
-0.2539497911930084,
0.01920962519943714,
-0.22047822177410126,
0.27433428168296814,
0.23876570165157318,
-0.176583394408226,
0.26924729347229004,
0.1394808441400528,
0.08101913332939148,
0.013113491237163544,
-0.14234845340251923,
0.14122191071510315,
-0.2486167550086975,
0.2955056130886078,
0.013345275074243546,
0.1941344439983368,
0.3053654730319977,
-0.33897489309310913,
-0.0738554298877716,
-0.24839338660240173,
-0.24579325318336487,
-0.09133324027061462,
-0.24657635390758514,
0.16072574257850647,
-0.377799928188324,
0.10188458859920502,
-0.15487411618232727,
0.0269366055727005,
0.11587677150964737,
0.09552560746669769,
-0.053369052708148956,
-0.021909914910793304,
-0.41262727975845337,
-0.05376540124416351,
0.33980792760849,
0.407076895236969,
-0.24711191654205322,
-0.40578269958496094,
0.1503964215517044,
-0.13889780640602112,
-0.21141451597213745,
0.03923768177628517,
0.08538834750652313,
0.2430647909641266,
-0.22631198167800903,
0.0026319772005081177,
0.13704434037208557,
-0.513792872428894,
-0.420465350151062,
0.13967682421207428,
-0.14877493679523468,
0.08273012936115265,
0.07508595287799835,
-0.171453595161438,
0.11462191492319107,
0.18305446207523346,
0.4504915177822113,
0.09141518920660019,
0.11674764007329941,
-0.1548793613910675,
-0.29082515835762024,
-0.18380698561668396,
-0.2629745602607727,
0.2544322907924652,
0.1082778126001358,
0.05198538303375244,
0.17583492398262024,
0.16976748406887054,
0.06789019703865051,
-0.07989299297332764,
0.01129468996077776,
0.493267297744751,
0.15437355637550354,
-0.0364748015999794,
0.1711864173412323,
-0.20084097981452942,
-0.5201353430747986,
0.21568414568901062,
-0.018396060913801193,
0.09934313595294952,
-0.08999378979206085,
-0.06688566505908966,
-0.3745590150356293,
-0.046378955245018005,
-0.07533055543899536,
-0.17654113471508026,
0.04527098685503006,
-0.010936900973320007,
-0.1645415723323822,
0.32875025272369385,
-0.14200329780578613,
0.29803094267845154,
-0.30875229835510254,
0.3473667800426483,
-0.3626067340373993,
0.2142394334077835,
0.09710907936096191,
-0.16834835708141327,
0.1748620867729187,
0.15773478150367737,
0.11031119525432587,
-0.17727123200893402,
-0.07180102169513702,
0.4855264127254486,
0.15050961077213287,
0.06297735869884491,
-0.02851148694753647,
0.21652847528457642,
0.19156543910503387,
-0.14212360978126526,
-0.16675373911857605,
-0.0733659416437149,
0.03507013991475105,
-0.0022644251585006714,
-0.01862412691116333,
0.16038787364959717,
-0.1758863478899002,
0.059526823461055756,
0.11239919066429138,
0.16880223155021667,
0.04887932538986206,
-0.07789573073387146,
-0.18806572258472443,
-0.38395288586616516,
0.4798426330089569,
-0.018093038350343704,
0.3275279402732849,
-0.03157909959554672,
0.17372609674930573,
-0.11271249502897263,
0.3555792570114136,
0.009692512452602386,
0.08774123340845108,
0.11627070605754852,
-0.30880096554756165,
0.13704311847686768,
-0.003653150051832199,
0.011657539755105972,
0.46932488679885864,
0.20064876973628998,
-0.004576060920953751,
0.2940475642681122,
0.008987518958747387,
-0.09641172736883163,
0.12861406803131104,
0.017879389226436615,
-0.17447882890701294,
0.2901948094367981,
-0.0639035701751709,
-0.059552501887083054,
-0.3733409345149994,
0.15492169559001923,
-0.07914410531520844,
0.2749669849872589,
-0.5363033413887024,
-0.17576508224010468,
-0.1411076933145523,
0.02963975816965103,
0.02772822231054306,
-0.076767198741436,
-0.20039640367031097,
-0.24406729638576508,
-0.02924880012869835,
0.3258098065853119,
0.19553141295909882,
0.3660382926464081,
0.21527554094791412,
0.42110154032707214,
-0.03846706449985504,
0.08466803282499313,
-0.1243116557598114,
-0.2874589264392853,
-0.07853762060403824,
0.008165072649717331,
0.16573123633861542,
-0.03350351005792618,
0.13872522115707397,
-0.6127303242683411,
0.06443667411804199,
-0.23628506064414978,
-0.3688502013683319,
0.0849086120724678,
-0.004737783223390579,
0.6359251737594604,
0.32058238983154297,
0.1494530439376831,
-0.09610152244567871,
0.02799799293279648,
0.3684043288230896,
0.024266662076115608,
-0.2071205973625183,
0.06811565160751343,
-0.08576276898384094,
-0.23365575075149536,
-0.30433791875839233,
-0.10473933070898056,
0.018632207065820694,
-0.5030640363693237,
0.38760966062545776,
0.04028525575995445,
-0.23369456827640533,
0.337319552898407,
0.07952380180358887,
0.2915131747722626,
0.05230235680937767,
0.24168989062309265,
-0.2613460123538971,
-0.3416885733604431,
0.2696044445037842,
-0.2346160113811493,
-0.4145873486995697,
-0.03776581957936287,
0.13731549680233002,
0.1808703988790512,
-0.04528948664665222,
-0.46276187896728516,
-0.41088300943374634,
-0.11433747410774231,
0.15989497303962708,
-0.11948135495185852,
0.38862407207489014,
0.1906861662864685,
0.03574704751372337,
0.03537202626466751,
-0.33285069465637207,
-0.17451472580432892,
0.054735973477363586,
-0.19600367546081543,
0.01675041764974594,
-0.26099729537963867,
0.11863129585981369,
0.06034630909562111,
0.3715049624443054,
0.24245348572731018,
-0.05807860568165779,
0.2844278812408447,
-0.15216517448425293,
0.6900770664215088,
-0.11715502291917801,
-0.5205391049385071,
0.07094860821962357,
0.003251999616622925,
0.20664571225643158,
0.294349730014801,
0.06839576363563538,
0.33576446771621704,
-0.20865797996520996,
0.07997801899909973,
-0.10744917392730713,
-0.19851960241794586,
-0.1780720055103302,
0.057530876249074936,
0.2056671679019928,
0.043477896600961685,
0.2509680688381195,
-0.1185467541217804,
0.054649583995342255,
0.11909231543540955,
0.4457845091819763,
-0.05822538584470749,
0.024806728586554527,
-0.396876722574234,
0.15303988754749298,
-0.4186132550239563,
0.31142836809158325,
-0.023341087624430656,
0.2591668963432312,
-0.21170981228351593,
-0.18549346923828125,
0.0008127838373184204,
0.00039881630800664425,
0.4743218421936035,
-0.023287935182452202,
-0.1957426816225052,
0.20031800866127014,
-0.06901001930236816,
-0.6852123737335205,
-0.005271557718515396,
-0.04174007475376129,
-0.07898464053869247,
0.1828620284795761,
0.7977380752563477,
-0.26251021027565,
-0.301401823759079,
0.1301293671131134,
0.10239294916391373,
-0.004375215619802475,
-0.09994743019342422,
-0.3193714916706085,
-0.3368155360221863,
-0.13781104981899261,
-0.09169263392686844,
-0.02760152705013752,
0.2983660399913788,
0.15824149549007416,
0.20910577476024628,
-0.11443912982940674,
-0.2217675745487213,
0.1712341010570526,
0.1866384595632553,
0.19433045387268066,
-0.023447087034583092,
0.39470139145851135,
0.32027801871299744,
-0.07636028528213501,
0.42501237988471985,
0.40379929542541504,
-0.43098917603492737,
-0.6466449499130249,
0.1787407398223877,
-0.05354400351643562,
0.12022995948791504,
0.15749873220920563,
-0.2035825550556183,
0.03604981303215027,
-0.0532161146402359,
0.22049947082996368,
-0.4408127963542938,
0.2652895748615265,
0.4414025843143463,
0.18727847933769226,
-0.08702941983938217,
-0.17267514765262604,
0.3064501881599426,
0.08707240223884583,
0.009993456304073334,
0.43084457516670227,
0.06345615535974503,
-0.2938775420188904,
-0.0701918676495552,
-0.23052439093589783,
0.594043493270874,
0.02900899574160576,
0.17296038568019867,
0.2764143943786621,
-0.18541786074638367,
0.42180493474006653,
-0.03934195265173912,
-0.0951729416847229,
-0.2183060199022293,
-0.4836227595806122,
0.04054533690214157,
-0.041395023465156555,
0.28081175684928894,
-0.21434201300144196,
-0.1116681769490242,
0.09509548544883728,
-0.23732464015483856,
0.0704357922077179,
-0.05630335211753845,
0.22771388292312622,
-0.26614248752593994,
-0.1809368133544922,
-0.22177930176258087,
0.1224248856306076,
-0.14089366793632507,
0.23098649084568024,
-0.12563392519950867,
0.12106853723526001,
-0.06978197395801544,
-0.2212691754102707,
-0.12273231893777847,
-0.12914392352104187,
-0.28008538484573364,
0.14427243173122406,
0.23741042613983154,
-0.16325466334819794,
-0.027361514046788216,
0.3203980326652527,
0.4834206700325012,
0.07305271178483963,
-0.37009134888648987,
0.20750315487384796,
-0.3207896649837494,
-0.09732026606798172,
-0.04249231144785881,
0.07156132906675339,
0.201394185423851,
0.053096890449523926,
0.05956513434648514,
-0.16890516877174377,
0.06452340632677078,
0.203184112906456,
0.017467647790908813,
-0.045606449246406555,
-0.0876970887184143,
-0.4919412434101105,
-0.12463827431201935,
-0.05102220177650452,
0.28364506363868713,
-0.32754525542259216,
0.09811513125896454,
0.05626603588461876,
0.01476425863802433,
0.10472296178340912,
-0.03318050131201744,
-0.2428843379020691,
-0.07332795858383179,
0.6832268238067627,
-0.36139461398124695,
-0.14145562052726746,
0.1263992190361023,
0.10180813074111938,
-0.3189939260482788,
-0.14064249396324158,
0.2113712728023529,
0.2389923632144928,
-0.34339362382888794,
0.27780067920684814,
0.5266766548156738,
0.04350341856479645,
-0.06370368599891663,
0.43698155879974365,
0.23574458062648773,
-0.35354653000831604,
0.12694963812828064,
-0.22125981748104095,
-0.36774006485939026,
0.28037673234939575,
-0.16610728204250336,
0.1610449254512787,
0.0869787260890007,
0.19429230690002441,
-0.10505517572164536,
-0.014805817976593971,
-0.27938008308410645,
0.21167652308940887,
-0.09933700412511826,
-0.14080123603343964,
0.6002426147460938,
-0.24477791786193848,
0.28168126940727234,
-0.17560553550720215,
0.07717087864875793,
0.015653349459171295,
-0.3317781984806061,
-0.1820967197418213,
-0.4139861762523651,
0.10642526298761368,
-0.05384756624698639,
-0.13002759218215942,
0.29562392830848694,
0.002888726070523262,
-0.09222298860549927,
-0.29342785477638245,
0.19351162016391754,
0.45340949296951294,
-0.04622241109609604,
0.2377132624387741,
-0.12274947762489319,
0.2323916256427765,
0.1859104037284851,
0.14011387526988983,
-0.10080204904079437,
0.09975781291723251,
-0.06069193407893181,
0.041276246309280396,
-0.18473312258720398,
0.20283415913581848,
0.02226709946990013,
0.23726797103881836,
0.16150394082069397,
-0.1148734912276268,
0.154619038105011,
-0.13805660605430603,
0.01132412999868393,
-0.016845272853970528,
0.33679723739624023,
0.2945954203605652,
-0.28813636302948,
-0.06674693524837494,
0.10502050817012787,
0.18739460408687592,
-0.2524312138557434,
-0.2942764461040497,
0.05935877189040184,
0.020650258287787437,
0.11276589334011078,
0.15405502915382385,
0.15361501276493073,
-0.14554369449615479,
0.09441117197275162,
0.092318594455719,
0.3824132978916168,
0.11056088656187057,
0.17026522755622864,
0.1636682003736496,
0.1364784985780716,
-0.024405252188444138,
0.3797612488269806,
0.09760524332523346,
0.22294244170188904,
0.06889787316322327,
-0.4428272843360901,
0.08823759108781815,
-0.26417142152786255,
0.383926123380661,
-0.2432175874710083,
-0.4694572687149048,
0.07811008393764496,
0.07458647340536118,
-0.06888073682785034,
-0.03256668895483017,
-0.3320100009441376,
0.7181389927864075,
-0.3015744388103485,
-0.059684138745069504,
-0.04678048938512802,
0.0559416338801384,
-0.11778298765420914,
-0.19379141926765442,
-0.0985109955072403,
-0.10235434770584106,
-0.05811497941613197,
-0.05942990258336067,
-0.04676679149270058,
-0.14594534039497375,
0.3599129319190979,
-0.1085798591375351,
-0.033628880977630615,
-0.331072598695755,
-0.3075087368488312,
0.25926849246025085,
-0.1198570653796196,
-0.1322980523109436,
0.23399917781352997,
-0.11175952851772308,
0.23954012989997864,
0.00960373505949974,
0.6236208081245422,
0.48616722226142883,
0.057834502309560776,
0.16422663629055023,
-0.12707769870758057,
-0.11826592683792114,
0.03694924712181091,
-0.08208957314491272,
0.4027971625328064,
0.016809314489364624,
0.14492933452129364,
0.18286070227622986,
0.13656257092952728,
-0.21189630031585693,
0.15290869772434235,
-0.22817610204219818,
-0.32242128252983093,
-0.3317995071411133,
0.06269621849060059,
-0.26739224791526794,
-0.022548574954271317,
-0.13091468811035156,
0.11406175792217255,
-0.32428333163261414,
0.11545199155807495,
0.4083702266216278,
0.1985120177268982,
0.08757106959819794,
-0.15233710408210754,
0.08687271922826767,
-0.05349872633814812,
0.1909271627664566,
0.4000779092311859,
0.03674712032079697,
-0.2721698582172394,
-0.273440957069397,
-0.6236268877983093,
0.009913638234138489,
0.12167689204216003,
-0.05707515776157379,
0.12043008953332901,
-0.034865763038396835,
0.06107769161462784,
-0.03910032659769058,
0.1405399739742279,
0.10271747410297394,
-0.004131843335926533,
-0.29520660638809204,
-0.44082003831863403,
0.019726699218153954,
-0.2038559466600418,
-0.10177342593669891,
0.06709599494934082,
-0.22939419746398926,
-0.04360489174723625,
-0.18301761150360107,
-0.020756401121616364,
-0.13455721735954285,
0.2511403560638428,
0.06606994569301605,
0.003556329756975174,
0.4722619354724884,
-0.0868726447224617,
0.35990047454833984,
-0.052292462438344955,
-0.07280037552118301,
-0.16375403106212616,
-0.4566643238067627,
-0.016127411276102066,
0.1952700912952423,
-0.06646981835365295,
0.28879308700561523,
-0.4623144268989563,
-0.3876185715198517,
-0.2914838492870331,
0.5101402997970581,
0.25183284282684326,
-0.09214933961629868,
-0.22702479362487793,
0.33755192160606384,
-0.17081201076507568,
0.06625039875507355,
0.19814762473106384,
0.330905944108963,
-0.181021049618721,
0.3260754942893982,
-0.11891434341669083,
-0.5026894807815552,
0.6233596801757812,
-0.35658183693885803,
-0.09963594377040863,
0.22452722489833832,
0.288562148809433,
0.32775136828422546,
-0.356094092130661,
-0.6024032831192017,
-0.05772722512483597,
0.3717494010925293,
0.028431013226509094,
-0.5067505240440369,
0.5917938947677612,
-0.2716614305973053,
0.10352198779582977,
-0.05430541932582855,
0.14745542407035828,
0.24779897928237915,
-0.20050445199012756,
0.2222827970981598,
-0.24247825145721436
] |
https://github.com/huggingface/datasets/issues/2214 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings' | Yep, seems to have fixed things! The conda package could really do with an update. Thanks! | I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
``` | 16 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
Yep, seems to have fixed things! The conda package could really do with an update. Thanks! | [
-0.27232426404953003,
-0.21355824172496796,
0.019322574138641357,
0.18529212474822998,
0.4195103049278259,
0.06305492669343948,
0.27295348048210144,
0.18010608851909637,
0.07569603621959686,
-0.05244581401348114,
-0.19403764605522156,
0.154596209526062,
-0.07444863766431808,
0.29741495847702026,
0.06521449238061905,
-0.047137342393398285,
-0.031500689685344696,
0.015083104372024536,
-0.2626020610332489,
0.029681958258152008,
-0.3187803030014038,
0.293637752532959,
-0.1672728955745697,
-0.17640335857868195,
-0.40212157368659973,
-0.010555801913142204,
0.04374728351831436,
0.24411502480506897,
-0.28627052903175354,
-0.5002133846282959,
0.20559975504875183,
0.04620346426963806,
0.29634377360343933,
0.3439410328865051,
-0.00011626121704466641,
-0.08408615738153458,
0.21465162932872772,
-0.02799481898546219,
-0.5544193983078003,
-0.1524081975221634,
0.05280157923698425,
-0.29944172501564026,
0.2512984275817871,
-0.10539600253105164,
-0.026472069323062897,
-0.1421283483505249,
-0.09652097523212433,
-0.29812896251678467,
0.32095569372177124,
0.29845723509788513,
0.2062050700187683,
0.6519036293029785,
0.11260800063610077,
-0.32463452219963074,
0.07565456628799438,
-0.1170935183763504,
-0.13894528150558472,
0.5830134749412537,
0.21556608378887177,
-0.29701530933380127,
0.005557045340538025,
0.1997518092393875,
-0.0833815261721611,
0.29603809118270874,
0.5132630467414856,
0.007255026139318943,
0.09399664402008057,
-0.055888764560222626,
0.10158753395080566,
0.0599488690495491,
0.48482462763786316,
-0.3377358019351959,
-0.3453688323497772,
-0.28764158487319946,
0.15713371336460114,
-0.3172512352466583,
0.22588077187538147,
-0.12669479846954346,
0.061191629618406296,
0.1738772839307785,
-0.14253796637058258,
-0.274617999792099,
0.027385741472244263,
0.2549826204776764,
-0.05663599818944931,
-0.13257521390914917,
-0.328805148601532,
-0.02926618605852127,
0.39935481548309326,
0.0067998431622982025,
0.006115119904279709,
0.11064083129167557,
0.0018890760838985443,
0.24544838070869446,
-0.2312646061182022,
0.16040469706058502,
0.22106009721755981,
0.06388594210147858,
0.1995057761669159,
0.11695577949285507,
0.138536274433136,
-0.10912027209997177,
0.2827873229980469,
0.14451244473457336,
0.04511501267552376,
0.45530563592910767,
0.4384199380874634,
0.05012613534927368,
0.27277809381484985,
0.38317522406578064,
0.22833994030952454,
-0.10320786386728287,
-0.00015429011546075344,
-0.41937482357025146,
-0.13960814476013184,
-0.16963815689086914,
0.31455540657043457,
-0.04376218095421791,
-0.3397487998008728,
0.2789822518825531,
0.22503337264060974,
-0.11003255844116211,
0.05597826838493347,
0.16666890680789948,
0.03895699605345726,
0.06807209551334381,
0.37976956367492676,
0.18045613169670105,
-0.25676003098487854,
0.06953626126050949,
-0.2539497911930084,
0.01920962519943714,
-0.22047822177410126,
0.27433428168296814,
0.23876570165157318,
-0.176583394408226,
0.26924729347229004,
0.1394808441400528,
0.08101913332939148,
0.013113491237163544,
-0.14234845340251923,
0.14122191071510315,
-0.2486167550086975,
0.2955056130886078,
0.013345275074243546,
0.1941344439983368,
0.3053654730319977,
-0.33897489309310913,
-0.0738554298877716,
-0.24839338660240173,
-0.24579325318336487,
-0.09133324027061462,
-0.24657635390758514,
0.16072574257850647,
-0.377799928188324,
0.10188458859920502,
-0.15487411618232727,
0.0269366055727005,
0.11587677150964737,
0.09552560746669769,
-0.053369052708148956,
-0.021909914910793304,
-0.41262727975845337,
-0.05376540124416351,
0.33980792760849,
0.407076895236969,
-0.24711191654205322,
-0.40578269958496094,
0.1503964215517044,
-0.13889780640602112,
-0.21141451597213745,
0.03923768177628517,
0.08538834750652313,
0.2430647909641266,
-0.22631198167800903,
0.0026319772005081177,
0.13704434037208557,
-0.513792872428894,
-0.420465350151062,
0.13967682421207428,
-0.14877493679523468,
0.08273012936115265,
0.07508595287799835,
-0.171453595161438,
0.11462191492319107,
0.18305446207523346,
0.4504915177822113,
0.09141518920660019,
0.11674764007329941,
-0.1548793613910675,
-0.29082515835762024,
-0.18380698561668396,
-0.2629745602607727,
0.2544322907924652,
0.1082778126001358,
0.05198538303375244,
0.17583492398262024,
0.16976748406887054,
0.06789019703865051,
-0.07989299297332764,
0.01129468996077776,
0.493267297744751,
0.15437355637550354,
-0.0364748015999794,
0.1711864173412323,
-0.20084097981452942,
-0.5201353430747986,
0.21568414568901062,
-0.018396060913801193,
0.09934313595294952,
-0.08999378979206085,
-0.06688566505908966,
-0.3745590150356293,
-0.046378955245018005,
-0.07533055543899536,
-0.17654113471508026,
0.04527098685503006,
-0.010936900973320007,
-0.1645415723323822,
0.32875025272369385,
-0.14200329780578613,
0.29803094267845154,
-0.30875229835510254,
0.3473667800426483,
-0.3626067340373993,
0.2142394334077835,
0.09710907936096191,
-0.16834835708141327,
0.1748620867729187,
0.15773478150367737,
0.11031119525432587,
-0.17727123200893402,
-0.07180102169513702,
0.4855264127254486,
0.15050961077213287,
0.06297735869884491,
-0.02851148694753647,
0.21652847528457642,
0.19156543910503387,
-0.14212360978126526,
-0.16675373911857605,
-0.0733659416437149,
0.03507013991475105,
-0.0022644251585006714,
-0.01862412691116333,
0.16038787364959717,
-0.1758863478899002,
0.059526823461055756,
0.11239919066429138,
0.16880223155021667,
0.04887932538986206,
-0.07789573073387146,
-0.18806572258472443,
-0.38395288586616516,
0.4798426330089569,
-0.018093038350343704,
0.3275279402732849,
-0.03157909959554672,
0.17372609674930573,
-0.11271249502897263,
0.3555792570114136,
0.009692512452602386,
0.08774123340845108,
0.11627070605754852,
-0.30880096554756165,
0.13704311847686768,
-0.003653150051832199,
0.011657539755105972,
0.46932488679885864,
0.20064876973628998,
-0.004576060920953751,
0.2940475642681122,
0.008987518958747387,
-0.09641172736883163,
0.12861406803131104,
0.017879389226436615,
-0.17447882890701294,
0.2901948094367981,
-0.0639035701751709,
-0.059552501887083054,
-0.3733409345149994,
0.15492169559001923,
-0.07914410531520844,
0.2749669849872589,
-0.5363033413887024,
-0.17576508224010468,
-0.1411076933145523,
0.02963975816965103,
0.02772822231054306,
-0.076767198741436,
-0.20039640367031097,
-0.24406729638576508,
-0.02924880012869835,
0.3258098065853119,
0.19553141295909882,
0.3660382926464081,
0.21527554094791412,
0.42110154032707214,
-0.03846706449985504,
0.08466803282499313,
-0.1243116557598114,
-0.2874589264392853,
-0.07853762060403824,
0.008165072649717331,
0.16573123633861542,
-0.03350351005792618,
0.13872522115707397,
-0.6127303242683411,
0.06443667411804199,
-0.23628506064414978,
-0.3688502013683319,
0.0849086120724678,
-0.004737783223390579,
0.6359251737594604,
0.32058238983154297,
0.1494530439376831,
-0.09610152244567871,
0.02799799293279648,
0.3684043288230896,
0.024266662076115608,
-0.2071205973625183,
0.06811565160751343,
-0.08576276898384094,
-0.23365575075149536,
-0.30433791875839233,
-0.10473933070898056,
0.018632207065820694,
-0.5030640363693237,
0.38760966062545776,
0.04028525575995445,
-0.23369456827640533,
0.337319552898407,
0.07952380180358887,
0.2915131747722626,
0.05230235680937767,
0.24168989062309265,
-0.2613460123538971,
-0.3416885733604431,
0.2696044445037842,
-0.2346160113811493,
-0.4145873486995697,
-0.03776581957936287,
0.13731549680233002,
0.1808703988790512,
-0.04528948664665222,
-0.46276187896728516,
-0.41088300943374634,
-0.11433747410774231,
0.15989497303962708,
-0.11948135495185852,
0.38862407207489014,
0.1906861662864685,
0.03574704751372337,
0.03537202626466751,
-0.33285069465637207,
-0.17451472580432892,
0.054735973477363586,
-0.19600367546081543,
0.01675041764974594,
-0.26099729537963867,
0.11863129585981369,
0.06034630909562111,
0.3715049624443054,
0.24245348572731018,
-0.05807860568165779,
0.2844278812408447,
-0.15216517448425293,
0.6900770664215088,
-0.11715502291917801,
-0.5205391049385071,
0.07094860821962357,
0.003251999616622925,
0.20664571225643158,
0.294349730014801,
0.06839576363563538,
0.33576446771621704,
-0.20865797996520996,
0.07997801899909973,
-0.10744917392730713,
-0.19851960241794586,
-0.1780720055103302,
0.057530876249074936,
0.2056671679019928,
0.043477896600961685,
0.2509680688381195,
-0.1185467541217804,
0.054649583995342255,
0.11909231543540955,
0.4457845091819763,
-0.05822538584470749,
0.024806728586554527,
-0.396876722574234,
0.15303988754749298,
-0.4186132550239563,
0.31142836809158325,
-0.023341087624430656,
0.2591668963432312,
-0.21170981228351593,
-0.18549346923828125,
0.0008127838373184204,
0.00039881630800664425,
0.4743218421936035,
-0.023287935182452202,
-0.1957426816225052,
0.20031800866127014,
-0.06901001930236816,
-0.6852123737335205,
-0.005271557718515396,
-0.04174007475376129,
-0.07898464053869247,
0.1828620284795761,
0.7977380752563477,
-0.26251021027565,
-0.301401823759079,
0.1301293671131134,
0.10239294916391373,
-0.004375215619802475,
-0.09994743019342422,
-0.3193714916706085,
-0.3368155360221863,
-0.13781104981899261,
-0.09169263392686844,
-0.02760152705013752,
0.2983660399913788,
0.15824149549007416,
0.20910577476024628,
-0.11443912982940674,
-0.2217675745487213,
0.1712341010570526,
0.1866384595632553,
0.19433045387268066,
-0.023447087034583092,
0.39470139145851135,
0.32027801871299744,
-0.07636028528213501,
0.42501237988471985,
0.40379929542541504,
-0.43098917603492737,
-0.6466449499130249,
0.1787407398223877,
-0.05354400351643562,
0.12022995948791504,
0.15749873220920563,
-0.2035825550556183,
0.03604981303215027,
-0.0532161146402359,
0.22049947082996368,
-0.4408127963542938,
0.2652895748615265,
0.4414025843143463,
0.18727847933769226,
-0.08702941983938217,
-0.17267514765262604,
0.3064501881599426,
0.08707240223884583,
0.009993456304073334,
0.43084457516670227,
0.06345615535974503,
-0.2938775420188904,
-0.0701918676495552,
-0.23052439093589783,
0.594043493270874,
0.02900899574160576,
0.17296038568019867,
0.2764143943786621,
-0.18541786074638367,
0.42180493474006653,
-0.03934195265173912,
-0.0951729416847229,
-0.2183060199022293,
-0.4836227595806122,
0.04054533690214157,
-0.041395023465156555,
0.28081175684928894,
-0.21434201300144196,
-0.1116681769490242,
0.09509548544883728,
-0.23732464015483856,
0.0704357922077179,
-0.05630335211753845,
0.22771388292312622,
-0.26614248752593994,
-0.1809368133544922,
-0.22177930176258087,
0.1224248856306076,
-0.14089366793632507,
0.23098649084568024,
-0.12563392519950867,
0.12106853723526001,
-0.06978197395801544,
-0.2212691754102707,
-0.12273231893777847,
-0.12914392352104187,
-0.28008538484573364,
0.14427243173122406,
0.23741042613983154,
-0.16325466334819794,
-0.027361514046788216,
0.3203980326652527,
0.4834206700325012,
0.07305271178483963,
-0.37009134888648987,
0.20750315487384796,
-0.3207896649837494,
-0.09732026606798172,
-0.04249231144785881,
0.07156132906675339,
0.201394185423851,
0.053096890449523926,
0.05956513434648514,
-0.16890516877174377,
0.06452340632677078,
0.203184112906456,
0.017467647790908813,
-0.045606449246406555,
-0.0876970887184143,
-0.4919412434101105,
-0.12463827431201935,
-0.05102220177650452,
0.28364506363868713,
-0.32754525542259216,
0.09811513125896454,
0.05626603588461876,
0.01476425863802433,
0.10472296178340912,
-0.03318050131201744,
-0.2428843379020691,
-0.07332795858383179,
0.6832268238067627,
-0.36139461398124695,
-0.14145562052726746,
0.1263992190361023,
0.10180813074111938,
-0.3189939260482788,
-0.14064249396324158,
0.2113712728023529,
0.2389923632144928,
-0.34339362382888794,
0.27780067920684814,
0.5266766548156738,
0.04350341856479645,
-0.06370368599891663,
0.43698155879974365,
0.23574458062648773,
-0.35354653000831604,
0.12694963812828064,
-0.22125981748104095,
-0.36774006485939026,
0.28037673234939575,
-0.16610728204250336,
0.1610449254512787,
0.0869787260890007,
0.19429230690002441,
-0.10505517572164536,
-0.014805817976593971,
-0.27938008308410645,
0.21167652308940887,
-0.09933700412511826,
-0.14080123603343964,
0.6002426147460938,
-0.24477791786193848,
0.28168126940727234,
-0.17560553550720215,
0.07717087864875793,
0.015653349459171295,
-0.3317781984806061,
-0.1820967197418213,
-0.4139861762523651,
0.10642526298761368,
-0.05384756624698639,
-0.13002759218215942,
0.29562392830848694,
0.002888726070523262,
-0.09222298860549927,
-0.29342785477638245,
0.19351162016391754,
0.45340949296951294,
-0.04622241109609604,
0.2377132624387741,
-0.12274947762489319,
0.2323916256427765,
0.1859104037284851,
0.14011387526988983,
-0.10080204904079437,
0.09975781291723251,
-0.06069193407893181,
0.041276246309280396,
-0.18473312258720398,
0.20283415913581848,
0.02226709946990013,
0.23726797103881836,
0.16150394082069397,
-0.1148734912276268,
0.154619038105011,
-0.13805660605430603,
0.01132412999868393,
-0.016845272853970528,
0.33679723739624023,
0.2945954203605652,
-0.28813636302948,
-0.06674693524837494,
0.10502050817012787,
0.18739460408687592,
-0.2524312138557434,
-0.2942764461040497,
0.05935877189040184,
0.020650258287787437,
0.11276589334011078,
0.15405502915382385,
0.15361501276493073,
-0.14554369449615479,
0.09441117197275162,
0.092318594455719,
0.3824132978916168,
0.11056088656187057,
0.17026522755622864,
0.1636682003736496,
0.1364784985780716,
-0.024405252188444138,
0.3797612488269806,
0.09760524332523346,
0.22294244170188904,
0.06889787316322327,
-0.4428272843360901,
0.08823759108781815,
-0.26417142152786255,
0.383926123380661,
-0.2432175874710083,
-0.4694572687149048,
0.07811008393764496,
0.07458647340536118,
-0.06888073682785034,
-0.03256668895483017,
-0.3320100009441376,
0.7181389927864075,
-0.3015744388103485,
-0.059684138745069504,
-0.04678048938512802,
0.0559416338801384,
-0.11778298765420914,
-0.19379141926765442,
-0.0985109955072403,
-0.10235434770584106,
-0.05811497941613197,
-0.05942990258336067,
-0.04676679149270058,
-0.14594534039497375,
0.3599129319190979,
-0.1085798591375351,
-0.033628880977630615,
-0.331072598695755,
-0.3075087368488312,
0.25926849246025085,
-0.1198570653796196,
-0.1322980523109436,
0.23399917781352997,
-0.11175952851772308,
0.23954012989997864,
0.00960373505949974,
0.6236208081245422,
0.48616722226142883,
0.057834502309560776,
0.16422663629055023,
-0.12707769870758057,
-0.11826592683792114,
0.03694924712181091,
-0.08208957314491272,
0.4027971625328064,
0.016809314489364624,
0.14492933452129364,
0.18286070227622986,
0.13656257092952728,
-0.21189630031585693,
0.15290869772434235,
-0.22817610204219818,
-0.32242128252983093,
-0.3317995071411133,
0.06269621849060059,
-0.26739224791526794,
-0.022548574954271317,
-0.13091468811035156,
0.11406175792217255,
-0.32428333163261414,
0.11545199155807495,
0.4083702266216278,
0.1985120177268982,
0.08757106959819794,
-0.15233710408210754,
0.08687271922826767,
-0.05349872633814812,
0.1909271627664566,
0.4000779092311859,
0.03674712032079697,
-0.2721698582172394,
-0.273440957069397,
-0.6236268877983093,
0.009913638234138489,
0.12167689204216003,
-0.05707515776157379,
0.12043008953332901,
-0.034865763038396835,
0.06107769161462784,
-0.03910032659769058,
0.1405399739742279,
0.10271747410297394,
-0.004131843335926533,
-0.29520660638809204,
-0.44082003831863403,
0.019726699218153954,
-0.2038559466600418,
-0.10177342593669891,
0.06709599494934082,
-0.22939419746398926,
-0.04360489174723625,
-0.18301761150360107,
-0.020756401121616364,
-0.13455721735954285,
0.2511403560638428,
0.06606994569301605,
0.003556329756975174,
0.4722619354724884,
-0.0868726447224617,
0.35990047454833984,
-0.052292462438344955,
-0.07280037552118301,
-0.16375403106212616,
-0.4566643238067627,
-0.016127411276102066,
0.1952700912952423,
-0.06646981835365295,
0.28879308700561523,
-0.4623144268989563,
-0.3876185715198517,
-0.2914838492870331,
0.5101402997970581,
0.25183284282684326,
-0.09214933961629868,
-0.22702479362487793,
0.33755192160606384,
-0.17081201076507568,
0.06625039875507355,
0.19814762473106384,
0.330905944108963,
-0.181021049618721,
0.3260754942893982,
-0.11891434341669083,
-0.5026894807815552,
0.6233596801757812,
-0.35658183693885803,
-0.09963594377040863,
0.22452722489833832,
0.288562148809433,
0.32775136828422546,
-0.356094092130661,
-0.6024032831192017,
-0.05772722512483597,
0.3717494010925293,
0.028431013226509094,
-0.5067505240440369,
0.5917938947677612,
-0.2716614305973053,
0.10352198779582977,
-0.05430541932582855,
0.14745542407035828,
0.24779897928237915,
-0.20050445199012756,
0.2222827970981598,
-0.24247825145721436
] |
https://github.com/huggingface/datasets/issues/2212 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset | Hi ! Apparently the data are not available from this url anymore. We'll replace it with the new url when it's available | I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it? | 22 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
Hi ! Apparently the data are not available from this url anymore. We'll replace it with the new url when it's available | [
-0.3520764112472534,
0.18505176901817322,
-0.10664549469947815,
0.24557921290397644,
0.39981645345687866,
0.03360738605260849,
0.3876356780529022,
0.20610381662845612,
0.30574971437454224,
0.14539270102977753,
-0.2683600187301636,
-0.19080856442451477,
0.28275156021118164,
0.017551591619849205,
0.027606971561908722,
0.07144854217767715,
-0.07178155332803726,
-0.044094160199165344,
-0.1596582680940628,
0.07088194787502289,
-0.354216605424881,
0.37045252323150635,
-0.1904582381248474,
0.1628842055797577,
-0.3339346945285797,
0.06337472796440125,
0.005579506978392601,
0.3590937554836273,
-0.3199554979801178,
-0.10791010409593582,
0.28620901703834534,
0.04162744805216789,
0.004150869324803352,
0.48521897196769714,
-0.0001157214937848039,
0.16606418788433075,
0.35862886905670166,
-0.031764693558216095,
-0.42981839179992676,
-0.563239574432373,
-0.30456510186195374,
-0.07257100194692612,
0.21531851589679718,
-0.20878669619560242,
-0.1616281270980835,
-0.029034771025180817,
0.11961807310581207,
-0.41987720131874084,
0.2603788673877716,
0.49189552664756775,
0.18429121375083923,
-0.04725004360079765,
0.2975515127182007,
-0.18032628297805786,
-0.05913744121789932,
-0.1362893134355545,
-0.0200079083442688,
0.6450533270835876,
-0.014042727649211884,
-0.20452798902988434,
-0.05082765966653824,
0.028619039803743362,
0.11825598776340485,
0.17265865206718445,
0.15859419107437134,
0.20119042694568634,
-0.3372359871864319,
-0.1506725251674652,
0.2118363082408905,
0.014688707888126373,
0.5337821245193481,
-0.2849700152873993,
-0.47233492136001587,
-0.12331397831439972,
-0.04912043735384941,
-0.37672069668769836,
0.5024482607841492,
0.09251543134450912,
-0.2628638446331024,
0.1907123327255249,
-0.4664979577064514,
-0.2508745789527893,
-0.19971585273742676,
0.36781740188598633,
-0.3860653042793274,
0.2701283097267151,
-0.1864977926015854,
0.2325517237186432,
0.277029812335968,
-0.15579374134540558,
-0.25939667224884033,
0.10985643416643143,
0.15275323390960693,
0.31869569420814514,
-0.31410926580429077,
0.10229797661304474,
-0.04402436316013336,
-0.28300940990448,
0.1964608132839203,
0.3815690875053406,
-0.015078159980475903,
0.00763772614300251,
-0.0969405397772789,
0.16452768445014954,
0.4020113945007324,
0.31891897320747375,
-0.11205392330884933,
0.20878060162067413,
0.18734225630760193,
0.6325328350067139,
-0.131130188703537,
-0.17701879143714905,
-0.13781128823757172,
-0.08137211203575134,
-0.16582493484020233,
-0.18351471424102783,
0.15377585589885712,
-0.1985757201910019,
-0.1576271951198578,
0.17403492331504822,
-0.26248839497566223,
-0.0844816192984581,
0.03549616411328316,
0.302487313747406,
-0.08979489654302597,
0.10918660461902618,
0.018498186022043228,
0.24559442698955536,
-0.10065408051013947,
0.163845494389534,
-0.16440317034721375,
0.24796287715435028,
-0.21821577847003937,
0.23155902326107025,
0.2416774481534958,
0.12468481063842773,
0.3092523217201233,
-0.3974607586860657,
0.07094468176364899,
-0.09545132517814636,
0.22119387984275818,
-0.24541400372982025,
-0.1564025580883026,
0.32481858134269714,
0.13616198301315308,
-0.01933150552213192,
0.18925169110298157,
-0.0819874182343483,
-0.12034984678030014,
-0.05912710726261139,
-0.23807895183563232,
-0.2690151631832123,
-0.16108158230781555,
0.16931003332138062,
-0.18221956491470337,
0.04406850039958954,
-0.31805655360221863,
0.021141065284609795,
-0.16301476955413818,
-0.2929227948188782,
-0.026491887867450714,
0.13830474019050598,
-0.13173867762088776,
-0.12480989098548889,
0.36892035603523254,
0.5510039329528809,
-0.2626013457775116,
-0.06616011261940002,
-0.20782041549682617,
-0.09954707324504852,
-0.014675237238407135,
0.42443159222602844,
-0.17439179122447968,
0.203556627035141,
-0.4347250461578369,
0.23821084201335907,
0.47839316725730896,
-0.24729813635349274,
-0.8428887724876404,
0.42797502875328064,
-0.24504666030406952,
0.14191384613513947,
-0.09193252772092819,
0.03228088840842247,
-0.035839226096868515,
0.1951988786458969,
0.631169319152832,
0.2926331162452698,
-0.06613072752952576,
-0.1279311627149582,
-0.0659746453166008,
-0.30872440338134766,
-0.057388752698898315,
0.2728065848350525,
-0.007247962057590485,
0.1732919067144394,
0.20289002358913422,
-0.11355862021446228,
0.20320448279380798,
0.1464848667383194,
-0.12947538495063782,
0.29840368032455444,
0.06549050658941269,
0.05014314129948616,
-0.13331423699855804,
-0.052926309406757355,
-0.6362524032592773,
0.24126672744750977,
-0.21722248196601868,
-0.03100980818271637,
-0.5615535378456116,
0.24953125417232513,
-0.44750675559043884,
0.03811182081699371,
-0.07190084457397461,
0.01713101752102375,
0.0995740294456482,
0.07932397723197937,
0.16756288707256317,
0.1997748762369156,
-0.2326558530330658,
0.3575585186481476,
0.05935373157262802,
0.22857734560966492,
-0.4177792966365814,
0.30382803082466125,
-0.06860316544771194,
-0.012873471714556217,
-0.04017037898302078,
0.0375097393989563,
0.08760623633861542,
-0.190719872713089,
-0.17235183715820312,
0.3521069288253784,
-0.09816087782382965,
0.1596621572971344,
0.3979540467262268,
0.4166021943092346,
0.15923044085502625,
-0.04197373986244202,
0.09670029580593109,
-0.1133250743150711,
0.0562816746532917,
-0.08738845586776733,
-0.18062248826026917,
0.18240705132484436,
0.12263509631156921,
0.30230095982551575,
0.14029653370380402,
0.03363804519176483,
0.3656933903694153,
0.11800533533096313,
-0.08331338316202164,
-0.15439945459365845,
0.15414130687713623,
0.46647942066192627,
0.21700750291347504,
0.05570659413933754,
-0.13877633213996887,
-0.049420855939388275,
0.381987988948822,
-0.2163211554288864,
0.013387639075517654,
0.28999051451683044,
0.041351139545440674,
-0.2723267376422882,
0.1269235610961914,
0.0862024575471878,
0.49157363176345825,
0.058633990585803986,
0.14298893511295319,
0.13873907923698425,
-0.24696564674377441,
-0.16380684077739716,
0.07847729325294495,
0.008731439709663391,
0.03820112347602844,
0.059525154531002045,
0.16665150225162506,
-0.02069324254989624,
-0.10888870805501938,
-0.3694198429584503,
0.04725605994462967,
0.17836418747901917,
-0.12225756049156189,
0.3422808051109314,
-0.11954733729362488,
-0.15238067507743835,
0.10463068634271622,
-0.32310354709625244,
-0.24559855461120605,
-0.48348763585090637,
-0.12514688074588776,
0.2941144108772278,
0.0920698493719101,
0.048825375735759735,
-0.33122727274894714,
0.09847110509872437,
0.18569733202457428,
-0.5195732712745667,
-0.1338461935520172,
-0.15138784050941467,
-0.1231953576207161,
0.056357014924287796,
0.3074066936969757,
-0.200678750872612,
0.2499469518661499,
-0.22966422140598297,
-0.10089456290006638,
-0.47252506017684937,
-0.17009906470775604,
0.08984331786632538,
-0.031245388090610504,
0.4079280197620392,
0.24472348392009735,
0.3579796552658081,
-0.06744830310344696,
-0.023289194330573082,
0.456180214881897,
0.07289693504571915,
-0.0803322046995163,
-0.038970522582530975,
-0.10589826107025146,
0.14109179377555847,
0.054669398814439774,
-0.26380255818367004,
-0.2067803293466568,
-0.35875529050827026,
0.4501703381538391,
0.03361405059695244,
0.06965303421020508,
0.13065339624881744,
0.15993733704090118,
0.20071707665920258,
0.16087450087070465,
-0.14960581064224243,
-0.35808679461479187,
-0.5675960779190063,
0.42163804173469543,
-0.22524911165237427,
-0.06296080350875854,
0.09545578062534332,
0.12602663040161133,
0.4072682857513428,
0.31080424785614014,
-0.5964599847793579,
-0.4336870312690735,
-0.24412624537944794,
0.24386891722679138,
-0.0759848952293396,
-0.28418341279029846,
0.20593565702438354,
-0.2813446521759033,
-0.04551234841346741,
0.07952351123094559,
-0.34358879923820496,
0.10722679644823074,
0.0380033403635025,
0.42180612683296204,
0.1905357539653778,
0.5441442131996155,
-0.1006031483411789,
0.5965806245803833,
0.050675880163908005,
0.11187970638275146,
0.3819423019886017,
-0.13115806877613068,
0.23935537040233612,
-0.436882883310318,
-0.2892049551010132,
0.13548852503299713,
-0.07353606820106506,
-0.31998157501220703,
-0.10109499096870422,
0.16100361943244934,
-0.06676536053419113,
-0.243223175406456,
0.25786828994750977,
-0.4428742825984955,
-0.2013869285583496,
0.04355057328939438,
-0.022995077073574066,
0.03929583355784416,
0.17480266094207764,
0.06318406760692596,
-0.18400689959526062,
-0.051339395344257355,
-0.049590613692998886,
0.18982335925102234,
0.08145307004451752,
0.1691625714302063,
-0.00577506422996521,
-0.38050606846809387,
-0.5242766737937927,
0.40868282318115234,
0.06882627308368683,
0.3191048800945282,
-0.23434968292713165,
0.09018514305353165,
0.1599833071231842,
-0.07143860310316086,
0.5216057896614075,
0.04385683685541153,
-0.02426869422197342,
0.22607465088367462,
-0.06399987637996674,
-0.2260831892490387,
0.04083360359072685,
0.1604548543691635,
0.287671834230423,
0.27843934297561646,
0.5854117274284363,
-0.4355757534503937,
-0.02235965058207512,
0.27368059754371643,
0.049244366586208344,
-0.08570893853902817,
-0.05197741463780403,
-0.196357861161232,
-0.49268838763237,
-0.34592700004577637,
-0.23090681433677673,
0.05837678909301758,
0.3225264549255371,
0.2719907760620117,
-0.1396181583404541,
0.19850493967533112,
-0.2339981496334076,
-0.12379255890846252,
0.08564239740371704,
0.2614714503288269,
-0.1848340630531311,
-0.07219789922237396,
0.4461749494075775,
0.05517605319619179,
0.062596395611763,
0.9526379704475403,
0.23097673058509827,
-0.1918453574180603,
0.35304221510887146,
0.204108327627182,
-0.04707714170217514,
0.23355987668037415,
-0.05444170534610748,
-0.2276650369167328,
0.04754690080881119,
0.3281216621398926,
-0.07012537121772766,
0.31384268403053284,
0.3014741837978363,
-0.03414949029684067,
-0.21832427382469177,
-0.3774328827857971,
0.5831078290939331,
-0.0610891617834568,
0.07160452008247375,
0.5631735324859619,
-0.003104276955127716,
-0.1457768827676773,
-0.028285913169384003,
-0.11133789271116257,
0.8322317004203796,
-0.2192075401544571,
0.13965527713298798,
0.32371121644973755,
-0.22581501305103302,
0.2849930226802826,
-0.36263108253479004,
0.18152496218681335,
-0.19024868309497833,
0.055939432233572006,
-0.10273108631372452,
-0.1027689203619957,
0.01693163439631462,
0.22920848429203033,
0.14003491401672363,
0.47013959288597107,
-0.06229569762945175,
-0.041358936578035355,
0.20221345126628876,
0.2214941680431366,
-0.1957225501537323,
-0.03502523899078369,
-0.4555773437023163,
0.15096065402030945,
-0.06350087374448776,
0.3048476278781891,
0.00435064360499382,
-0.04043480381369591,
-0.2007138729095459,
-0.17689262330532074,
-0.3790901303291321,
0.10399778932332993,
-0.44501596689224243,
0.3993920087814331,
0.06487195193767548,
-0.11941727995872498,
-0.33233487606048584,
0.13310666382312775,
-0.17189502716064453,
0.03747769817709923,
-0.3774072229862213,
0.2002425640821457,
-0.2505827844142914,
-0.1914519965648651,
0.0667511373758316,
0.2090216726064682,
0.16726641356945038,
-0.028622273355722427,
-0.10821253061294556,
0.2219361960887909,
-0.1580401062965393,
-0.4935774803161621,
-0.08612353354692459,
-0.02701014280319214,
0.13421860337257385,
-0.11370471119880676,
-0.12502580881118774,
-0.33865344524383545,
-0.20431619882583618,
-0.05277862399816513,
0.08084909617900848,
0.02885863557457924,
0.25234824419021606,
-0.20699605345726013,
0.002637188881635666,
-0.29183146357536316,
-0.1399933397769928,
0.5058479309082031,
-0.2566274106502533,
-0.33747851848602295,
0.463157594203949,
0.09772656857967377,
-0.09070710837841034,
-0.14748725295066833,
-0.18635156750679016,
-0.013412018306553364,
-0.14560595154762268,
0.09082380682229996,
0.011975142173469067,
0.1186041384935379,
-0.2104351818561554,
-0.02443285658955574,
0.254863440990448,
-0.16837963461875916,
0.04672449454665184,
-0.5118242502212524,
-0.40717101097106934,
0.27180010080337524,
-0.2288029044866562,
0.19139236211776733,
0.0034555047750473022,
-0.08716949820518494,
0.17305608093738556,
-0.26812490820884705,
-0.25922277569770813,
0.14714011549949646,
-0.442264199256897,
-0.2400079369544983,
0.24118012189865112,
-0.19608306884765625,
0.43214887380599976,
0.0995832234621048,
0.19839414954185486,
-0.03726053237915039,
-0.22936490178108215,
-0.18169766664505005,
0.07836614549160004,
0.1327115297317505,
0.1031489148736,
-0.40426310896873474,
0.06594603508710861,
-0.09052810817956924,
-0.10134287178516388,
-0.14431683719158173,
0.014554157853126526,
0.2522517740726471,
0.14825546741485596,
-0.27150943875312805,
0.14246535301208496,
0.04337535798549652,
-0.1513761579990387,
0.03128477931022644,
0.15409480035305023,
0.38584059476852417,
0.10714744031429291,
0.03854021430015564,
-0.012002618052065372,
0.042149901390075684,
-0.194707989692688,
0.028846032917499542,
0.03667205199599266,
0.11144018918275833,
0.5246021151542664,
-0.263003945350647,
0.06884430348873138,
0.17333504557609558,
0.2766213119029999,
0.3434120714664459,
-0.39332282543182373,
-0.050462447106838226,
0.08611129224300385,
0.18868626654148102,
-0.10052578151226044,
-0.040939126163721085,
0.11581335961818695,
-0.020030487328767776,
-0.05304324999451637,
0.07526391744613647,
0.02758491411805153,
0.026258297264575958,
0.19388318061828613,
0.030388426035642624,
0.4034171402454376,
0.013263821601867676,
0.01824124902486801,
-0.06863729655742645,
-0.1445126235485077,
0.0048209428787231445,
0.3360903859138489,
0.13439348340034485,
0.3272196054458618,
0.4190324544906616,
-0.1450161635875702,
-0.09873633086681366,
-0.38559234142303467,
0.2788905203342438,
-0.2114676535129547,
-0.43355175852775574,
-0.2508142590522766,
0.2423277497291565,
-0.3047327399253845,
0.22477781772613525,
-0.24355798959732056,
0.23780879378318787,
-0.41409552097320557,
0.2134465128183365,
-0.2503338158130646,
0.013956332579255104,
-0.03813739866018295,
-0.12027345597743988,
0.04608584940433502,
-0.19289946556091309,
-0.1554577648639679,
0.02922510728240013,
-0.07733030617237091,
-0.1959446519613266,
0.16730882227420807,
-0.10129855573177338,
-0.1600542813539505,
-0.2908317446708679,
0.14891499280929565,
0.058504894375801086,
0.10585543513298035,
-0.25690850615501404,
0.5002363920211792,
0.1337183713912964,
-0.12366890907287598,
0.2592601180076599,
0.254757821559906,
0.39218273758888245,
0.23541787266731262,
-0.05636172369122505,
0.11878132820129395,
-0.15208156406879425,
-0.1580701619386673,
-0.16493827104568481,
0.22200588881969452,
0.2826266586780548,
-0.23992641270160675,
0.4083402156829834,
0.2201502025127411,
-0.1681927591562271,
0.3380623757839203,
-0.019094835966825485,
0.43724319338798523,
-0.21333234012126923,
0.319217711687088,
-0.37805837392807007,
0.0575314536690712,
-0.31014955043792725,
-0.08322782069444656,
-0.576059103012085,
-0.25307270884513855,
-0.163516566157341,
-0.10167232900857925,
0.16173803806304932,
-0.013818803243339062,
0.0595092698931694,
0.04802851378917694,
0.3779023587703705,
0.4761713743209839,
0.19667765498161316,
-0.2976576089859009,
-0.2617686986923218,
-0.5369642972946167,
0.08451207727193832,
-0.07444266974925995,
0.04078644514083862,
-0.012641666457057,
0.32527604699134827,
-0.14348599314689636,
0.11793257296085358,
0.17049771547317505,
0.17507021129131317,
-0.20177465677261353,
0.11899743229150772,
-0.2758837342262268,
-0.4163702726364136,
-0.035489730536937714,
0.12372905761003494,
-0.09251052886247635,
-0.16201399266719818,
0.18151171505451202,
-0.28842291235923767,
-0.007548607885837555,
0.006305234506726265,
0.12648995220661163,
0.03038402646780014,
-0.027979500591754913,
0.46885207295417786,
0.17193691432476044,
0.4205750524997711,
0.10914292186498642,
-0.25002989172935486,
-0.32995495200157166,
-0.19939890503883362,
-0.028910785913467407,
0.011775635182857513,
-0.05939042195677757,
0.45646893978118896,
-0.029386702924966812,
0.02858826518058777,
-0.2617824673652649,
0.1135849878191948,
-0.07305807620286942,
-0.16770794987678528,
0.018492838367819786,
-0.10896595567464828,
0.02204107493162155,
0.1403104066848755,
-0.0012171855196356773,
0.35014772415161133,
0.05030624568462372,
0.22214259207248688,
-0.09469525516033173,
-0.15746229887008667,
0.5106205940246582,
-0.07122857123613358,
-0.2704927623271942,
0.21544703841209412,
0.005209967494010925,
-0.061778388917446136,
-0.002032337710261345,
-0.36094000935554504,
0.20563599467277527,
0.4209411144256592,
0.07986575365066528,
-0.15651051700115204,
0.07978782057762146,
-0.1106192022562027,
-0.06912760436534882,
-0.11450421810150146,
0.22457343339920044,
-0.10460538417100906,
-0.11415310204029083,
0.05216267332434654,
0.07297991216182709
] |
https://github.com/huggingface/datasets/issues/2212 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset | I saw this on their website when we request to download the dataset:

Can we still request them link for the dataset and make a PR? @lhoestq @yjernite | I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it? | 29 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
I saw this on their website when we request to download the dataset:

Can we still request them link for the dataset and make a PR? @lhoestq @yjernite | [
-0.3520764112472534,
0.18505176901817322,
-0.10664549469947815,
0.24557921290397644,
0.39981645345687866,
0.03360738605260849,
0.3876356780529022,
0.20610381662845612,
0.30574971437454224,
0.14539270102977753,
-0.2683600187301636,
-0.19080856442451477,
0.28275156021118164,
0.017551591619849205,
0.027606971561908722,
0.07144854217767715,
-0.07178155332803726,
-0.044094160199165344,
-0.1596582680940628,
0.07088194787502289,
-0.354216605424881,
0.37045252323150635,
-0.1904582381248474,
0.1628842055797577,
-0.3339346945285797,
0.06337472796440125,
0.005579506978392601,
0.3590937554836273,
-0.3199554979801178,
-0.10791010409593582,
0.28620901703834534,
0.04162744805216789,
0.004150869324803352,
0.48521897196769714,
-0.0001157214937848039,
0.16606418788433075,
0.35862886905670166,
-0.031764693558216095,
-0.42981839179992676,
-0.563239574432373,
-0.30456510186195374,
-0.07257100194692612,
0.21531851589679718,
-0.20878669619560242,
-0.1616281270980835,
-0.029034771025180817,
0.11961807310581207,
-0.41987720131874084,
0.2603788673877716,
0.49189552664756775,
0.18429121375083923,
-0.04725004360079765,
0.2975515127182007,
-0.18032628297805786,
-0.05913744121789932,
-0.1362893134355545,
-0.0200079083442688,
0.6450533270835876,
-0.014042727649211884,
-0.20452798902988434,
-0.05082765966653824,
0.028619039803743362,
0.11825598776340485,
0.17265865206718445,
0.15859419107437134,
0.20119042694568634,
-0.3372359871864319,
-0.1506725251674652,
0.2118363082408905,
0.014688707888126373,
0.5337821245193481,
-0.2849700152873993,
-0.47233492136001587,
-0.12331397831439972,
-0.04912043735384941,
-0.37672069668769836,
0.5024482607841492,
0.09251543134450912,
-0.2628638446331024,
0.1907123327255249,
-0.4664979577064514,
-0.2508745789527893,
-0.19971585273742676,
0.36781740188598633,
-0.3860653042793274,
0.2701283097267151,
-0.1864977926015854,
0.2325517237186432,
0.277029812335968,
-0.15579374134540558,
-0.25939667224884033,
0.10985643416643143,
0.15275323390960693,
0.31869569420814514,
-0.31410926580429077,
0.10229797661304474,
-0.04402436316013336,
-0.28300940990448,
0.1964608132839203,
0.3815690875053406,
-0.015078159980475903,
0.00763772614300251,
-0.0969405397772789,
0.16452768445014954,
0.4020113945007324,
0.31891897320747375,
-0.11205392330884933,
0.20878060162067413,
0.18734225630760193,
0.6325328350067139,
-0.131130188703537,
-0.17701879143714905,
-0.13781128823757172,
-0.08137211203575134,
-0.16582493484020233,
-0.18351471424102783,
0.15377585589885712,
-0.1985757201910019,
-0.1576271951198578,
0.17403492331504822,
-0.26248839497566223,
-0.0844816192984581,
0.03549616411328316,
0.302487313747406,
-0.08979489654302597,
0.10918660461902618,
0.018498186022043228,
0.24559442698955536,
-0.10065408051013947,
0.163845494389534,
-0.16440317034721375,
0.24796287715435028,
-0.21821577847003937,
0.23155902326107025,
0.2416774481534958,
0.12468481063842773,
0.3092523217201233,
-0.3974607586860657,
0.07094468176364899,
-0.09545132517814636,
0.22119387984275818,
-0.24541400372982025,
-0.1564025580883026,
0.32481858134269714,
0.13616198301315308,
-0.01933150552213192,
0.18925169110298157,
-0.0819874182343483,
-0.12034984678030014,
-0.05912710726261139,
-0.23807895183563232,
-0.2690151631832123,
-0.16108158230781555,
0.16931003332138062,
-0.18221956491470337,
0.04406850039958954,
-0.31805655360221863,
0.021141065284609795,
-0.16301476955413818,
-0.2929227948188782,
-0.026491887867450714,
0.13830474019050598,
-0.13173867762088776,
-0.12480989098548889,
0.36892035603523254,
0.5510039329528809,
-0.2626013457775116,
-0.06616011261940002,
-0.20782041549682617,
-0.09954707324504852,
-0.014675237238407135,
0.42443159222602844,
-0.17439179122447968,
0.203556627035141,
-0.4347250461578369,
0.23821084201335907,
0.47839316725730896,
-0.24729813635349274,
-0.8428887724876404,
0.42797502875328064,
-0.24504666030406952,
0.14191384613513947,
-0.09193252772092819,
0.03228088840842247,
-0.035839226096868515,
0.1951988786458969,
0.631169319152832,
0.2926331162452698,
-0.06613072752952576,
-0.1279311627149582,
-0.0659746453166008,
-0.30872440338134766,
-0.057388752698898315,
0.2728065848350525,
-0.007247962057590485,
0.1732919067144394,
0.20289002358913422,
-0.11355862021446228,
0.20320448279380798,
0.1464848667383194,
-0.12947538495063782,
0.29840368032455444,
0.06549050658941269,
0.05014314129948616,
-0.13331423699855804,
-0.052926309406757355,
-0.6362524032592773,
0.24126672744750977,
-0.21722248196601868,
-0.03100980818271637,
-0.5615535378456116,
0.24953125417232513,
-0.44750675559043884,
0.03811182081699371,
-0.07190084457397461,
0.01713101752102375,
0.0995740294456482,
0.07932397723197937,
0.16756288707256317,
0.1997748762369156,
-0.2326558530330658,
0.3575585186481476,
0.05935373157262802,
0.22857734560966492,
-0.4177792966365814,
0.30382803082466125,
-0.06860316544771194,
-0.012873471714556217,
-0.04017037898302078,
0.0375097393989563,
0.08760623633861542,
-0.190719872713089,
-0.17235183715820312,
0.3521069288253784,
-0.09816087782382965,
0.1596621572971344,
0.3979540467262268,
0.4166021943092346,
0.15923044085502625,
-0.04197373986244202,
0.09670029580593109,
-0.1133250743150711,
0.0562816746532917,
-0.08738845586776733,
-0.18062248826026917,
0.18240705132484436,
0.12263509631156921,
0.30230095982551575,
0.14029653370380402,
0.03363804519176483,
0.3656933903694153,
0.11800533533096313,
-0.08331338316202164,
-0.15439945459365845,
0.15414130687713623,
0.46647942066192627,
0.21700750291347504,
0.05570659413933754,
-0.13877633213996887,
-0.049420855939388275,
0.381987988948822,
-0.2163211554288864,
0.013387639075517654,
0.28999051451683044,
0.041351139545440674,
-0.2723267376422882,
0.1269235610961914,
0.0862024575471878,
0.49157363176345825,
0.058633990585803986,
0.14298893511295319,
0.13873907923698425,
-0.24696564674377441,
-0.16380684077739716,
0.07847729325294495,
0.008731439709663391,
0.03820112347602844,
0.059525154531002045,
0.16665150225162506,
-0.02069324254989624,
-0.10888870805501938,
-0.3694198429584503,
0.04725605994462967,
0.17836418747901917,
-0.12225756049156189,
0.3422808051109314,
-0.11954733729362488,
-0.15238067507743835,
0.10463068634271622,
-0.32310354709625244,
-0.24559855461120605,
-0.48348763585090637,
-0.12514688074588776,
0.2941144108772278,
0.0920698493719101,
0.048825375735759735,
-0.33122727274894714,
0.09847110509872437,
0.18569733202457428,
-0.5195732712745667,
-0.1338461935520172,
-0.15138784050941467,
-0.1231953576207161,
0.056357014924287796,
0.3074066936969757,
-0.200678750872612,
0.2499469518661499,
-0.22966422140598297,
-0.10089456290006638,
-0.47252506017684937,
-0.17009906470775604,
0.08984331786632538,
-0.031245388090610504,
0.4079280197620392,
0.24472348392009735,
0.3579796552658081,
-0.06744830310344696,
-0.023289194330573082,
0.456180214881897,
0.07289693504571915,
-0.0803322046995163,
-0.038970522582530975,
-0.10589826107025146,
0.14109179377555847,
0.054669398814439774,
-0.26380255818367004,
-0.2067803293466568,
-0.35875529050827026,
0.4501703381538391,
0.03361405059695244,
0.06965303421020508,
0.13065339624881744,
0.15993733704090118,
0.20071707665920258,
0.16087450087070465,
-0.14960581064224243,
-0.35808679461479187,
-0.5675960779190063,
0.42163804173469543,
-0.22524911165237427,
-0.06296080350875854,
0.09545578062534332,
0.12602663040161133,
0.4072682857513428,
0.31080424785614014,
-0.5964599847793579,
-0.4336870312690735,
-0.24412624537944794,
0.24386891722679138,
-0.0759848952293396,
-0.28418341279029846,
0.20593565702438354,
-0.2813446521759033,
-0.04551234841346741,
0.07952351123094559,
-0.34358879923820496,
0.10722679644823074,
0.0380033403635025,
0.42180612683296204,
0.1905357539653778,
0.5441442131996155,
-0.1006031483411789,
0.5965806245803833,
0.050675880163908005,
0.11187970638275146,
0.3819423019886017,
-0.13115806877613068,
0.23935537040233612,
-0.436882883310318,
-0.2892049551010132,
0.13548852503299713,
-0.07353606820106506,
-0.31998157501220703,
-0.10109499096870422,
0.16100361943244934,
-0.06676536053419113,
-0.243223175406456,
0.25786828994750977,
-0.4428742825984955,
-0.2013869285583496,
0.04355057328939438,
-0.022995077073574066,
0.03929583355784416,
0.17480266094207764,
0.06318406760692596,
-0.18400689959526062,
-0.051339395344257355,
-0.049590613692998886,
0.18982335925102234,
0.08145307004451752,
0.1691625714302063,
-0.00577506422996521,
-0.38050606846809387,
-0.5242766737937927,
0.40868282318115234,
0.06882627308368683,
0.3191048800945282,
-0.23434968292713165,
0.09018514305353165,
0.1599833071231842,
-0.07143860310316086,
0.5216057896614075,
0.04385683685541153,
-0.02426869422197342,
0.22607465088367462,
-0.06399987637996674,
-0.2260831892490387,
0.04083360359072685,
0.1604548543691635,
0.287671834230423,
0.27843934297561646,
0.5854117274284363,
-0.4355757534503937,
-0.02235965058207512,
0.27368059754371643,
0.049244366586208344,
-0.08570893853902817,
-0.05197741463780403,
-0.196357861161232,
-0.49268838763237,
-0.34592700004577637,
-0.23090681433677673,
0.05837678909301758,
0.3225264549255371,
0.2719907760620117,
-0.1396181583404541,
0.19850493967533112,
-0.2339981496334076,
-0.12379255890846252,
0.08564239740371704,
0.2614714503288269,
-0.1848340630531311,
-0.07219789922237396,
0.4461749494075775,
0.05517605319619179,
0.062596395611763,
0.9526379704475403,
0.23097673058509827,
-0.1918453574180603,
0.35304221510887146,
0.204108327627182,
-0.04707714170217514,
0.23355987668037415,
-0.05444170534610748,
-0.2276650369167328,
0.04754690080881119,
0.3281216621398926,
-0.07012537121772766,
0.31384268403053284,
0.3014741837978363,
-0.03414949029684067,
-0.21832427382469177,
-0.3774328827857971,
0.5831078290939331,
-0.0610891617834568,
0.07160452008247375,
0.5631735324859619,
-0.003104276955127716,
-0.1457768827676773,
-0.028285913169384003,
-0.11133789271116257,
0.8322317004203796,
-0.2192075401544571,
0.13965527713298798,
0.32371121644973755,
-0.22581501305103302,
0.2849930226802826,
-0.36263108253479004,
0.18152496218681335,
-0.19024868309497833,
0.055939432233572006,
-0.10273108631372452,
-0.1027689203619957,
0.01693163439631462,
0.22920848429203033,
0.14003491401672363,
0.47013959288597107,
-0.06229569762945175,
-0.041358936578035355,
0.20221345126628876,
0.2214941680431366,
-0.1957225501537323,
-0.03502523899078369,
-0.4555773437023163,
0.15096065402030945,
-0.06350087374448776,
0.3048476278781891,
0.00435064360499382,
-0.04043480381369591,
-0.2007138729095459,
-0.17689262330532074,
-0.3790901303291321,
0.10399778932332993,
-0.44501596689224243,
0.3993920087814331,
0.06487195193767548,
-0.11941727995872498,
-0.33233487606048584,
0.13310666382312775,
-0.17189502716064453,
0.03747769817709923,
-0.3774072229862213,
0.2002425640821457,
-0.2505827844142914,
-0.1914519965648651,
0.0667511373758316,
0.2090216726064682,
0.16726641356945038,
-0.028622273355722427,
-0.10821253061294556,
0.2219361960887909,
-0.1580401062965393,
-0.4935774803161621,
-0.08612353354692459,
-0.02701014280319214,
0.13421860337257385,
-0.11370471119880676,
-0.12502580881118774,
-0.33865344524383545,
-0.20431619882583618,
-0.05277862399816513,
0.08084909617900848,
0.02885863557457924,
0.25234824419021606,
-0.20699605345726013,
0.002637188881635666,
-0.29183146357536316,
-0.1399933397769928,
0.5058479309082031,
-0.2566274106502533,
-0.33747851848602295,
0.463157594203949,
0.09772656857967377,
-0.09070710837841034,
-0.14748725295066833,
-0.18635156750679016,
-0.013412018306553364,
-0.14560595154762268,
0.09082380682229996,
0.011975142173469067,
0.1186041384935379,
-0.2104351818561554,
-0.02443285658955574,
0.254863440990448,
-0.16837963461875916,
0.04672449454665184,
-0.5118242502212524,
-0.40717101097106934,
0.27180010080337524,
-0.2288029044866562,
0.19139236211776733,
0.0034555047750473022,
-0.08716949820518494,
0.17305608093738556,
-0.26812490820884705,
-0.25922277569770813,
0.14714011549949646,
-0.442264199256897,
-0.2400079369544983,
0.24118012189865112,
-0.19608306884765625,
0.43214887380599976,
0.0995832234621048,
0.19839414954185486,
-0.03726053237915039,
-0.22936490178108215,
-0.18169766664505005,
0.07836614549160004,
0.1327115297317505,
0.1031489148736,
-0.40426310896873474,
0.06594603508710861,
-0.09052810817956924,
-0.10134287178516388,
-0.14431683719158173,
0.014554157853126526,
0.2522517740726471,
0.14825546741485596,
-0.27150943875312805,
0.14246535301208496,
0.04337535798549652,
-0.1513761579990387,
0.03128477931022644,
0.15409480035305023,
0.38584059476852417,
0.10714744031429291,
0.03854021430015564,
-0.012002618052065372,
0.042149901390075684,
-0.194707989692688,
0.028846032917499542,
0.03667205199599266,
0.11144018918275833,
0.5246021151542664,
-0.263003945350647,
0.06884430348873138,
0.17333504557609558,
0.2766213119029999,
0.3434120714664459,
-0.39332282543182373,
-0.050462447106838226,
0.08611129224300385,
0.18868626654148102,
-0.10052578151226044,
-0.040939126163721085,
0.11581335961818695,
-0.020030487328767776,
-0.05304324999451637,
0.07526391744613647,
0.02758491411805153,
0.026258297264575958,
0.19388318061828613,
0.030388426035642624,
0.4034171402454376,
0.013263821601867676,
0.01824124902486801,
-0.06863729655742645,
-0.1445126235485077,
0.0048209428787231445,
0.3360903859138489,
0.13439348340034485,
0.3272196054458618,
0.4190324544906616,
-0.1450161635875702,
-0.09873633086681366,
-0.38559234142303467,
0.2788905203342438,
-0.2114676535129547,
-0.43355175852775574,
-0.2508142590522766,
0.2423277497291565,
-0.3047327399253845,
0.22477781772613525,
-0.24355798959732056,
0.23780879378318787,
-0.41409552097320557,
0.2134465128183365,
-0.2503338158130646,
0.013956332579255104,
-0.03813739866018295,
-0.12027345597743988,
0.04608584940433502,
-0.19289946556091309,
-0.1554577648639679,
0.02922510728240013,
-0.07733030617237091,
-0.1959446519613266,
0.16730882227420807,
-0.10129855573177338,
-0.1600542813539505,
-0.2908317446708679,
0.14891499280929565,
0.058504894375801086,
0.10585543513298035,
-0.25690850615501404,
0.5002363920211792,
0.1337183713912964,
-0.12366890907287598,
0.2592601180076599,
0.254757821559906,
0.39218273758888245,
0.23541787266731262,
-0.05636172369122505,
0.11878132820129395,
-0.15208156406879425,
-0.1580701619386673,
-0.16493827104568481,
0.22200588881969452,
0.2826266586780548,
-0.23992641270160675,
0.4083402156829834,
0.2201502025127411,
-0.1681927591562271,
0.3380623757839203,
-0.019094835966825485,
0.43724319338798523,
-0.21333234012126923,
0.319217711687088,
-0.37805837392807007,
0.0575314536690712,
-0.31014955043792725,
-0.08322782069444656,
-0.576059103012085,
-0.25307270884513855,
-0.163516566157341,
-0.10167232900857925,
0.16173803806304932,
-0.013818803243339062,
0.0595092698931694,
0.04802851378917694,
0.3779023587703705,
0.4761713743209839,
0.19667765498161316,
-0.2976576089859009,
-0.2617686986923218,
-0.5369642972946167,
0.08451207727193832,
-0.07444266974925995,
0.04078644514083862,
-0.012641666457057,
0.32527604699134827,
-0.14348599314689636,
0.11793257296085358,
0.17049771547317505,
0.17507021129131317,
-0.20177465677261353,
0.11899743229150772,
-0.2758837342262268,
-0.4163702726364136,
-0.035489730536937714,
0.12372905761003494,
-0.09251052886247635,
-0.16201399266719818,
0.18151171505451202,
-0.28842291235923767,
-0.007548607885837555,
0.006305234506726265,
0.12648995220661163,
0.03038402646780014,
-0.027979500591754913,
0.46885207295417786,
0.17193691432476044,
0.4205750524997711,
0.10914292186498642,
-0.25002989172935486,
-0.32995495200157166,
-0.19939890503883362,
-0.028910785913467407,
0.011775635182857513,
-0.05939042195677757,
0.45646893978118896,
-0.029386702924966812,
0.02858826518058777,
-0.2617824673652649,
0.1135849878191948,
-0.07305807620286942,
-0.16770794987678528,
0.018492838367819786,
-0.10896595567464828,
0.02204107493162155,
0.1403104066848755,
-0.0012171855196356773,
0.35014772415161133,
0.05030624568462372,
0.22214259207248688,
-0.09469525516033173,
-0.15746229887008667,
0.5106205940246582,
-0.07122857123613358,
-0.2704927623271942,
0.21544703841209412,
0.005209967494010925,
-0.061778388917446136,
-0.002032337710261345,
-0.36094000935554504,
0.20563599467277527,
0.4209411144256592,
0.07986575365066528,
-0.15651051700115204,
0.07978782057762146,
-0.1106192022562027,
-0.06912760436534882,
-0.11450421810150146,
0.22457343339920044,
-0.10460538417100906,
-0.11415310204029083,
0.05216267332434654,
0.07297991216182709
] |
https://github.com/huggingface/datasets/issues/2212 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset | I've contacted Martin (first author of the fquad paper) regarding a possible new url. Hopefully we can get one soon ! | I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it? | 21 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
I've contacted Martin (first author of the fquad paper) regarding a possible new url. Hopefully we can get one soon ! | [
-0.3520764112472534,
0.18505176901817322,
-0.10664549469947815,
0.24557921290397644,
0.39981645345687866,
0.03360738605260849,
0.3876356780529022,
0.20610381662845612,
0.30574971437454224,
0.14539270102977753,
-0.2683600187301636,
-0.19080856442451477,
0.28275156021118164,
0.017551591619849205,
0.027606971561908722,
0.07144854217767715,
-0.07178155332803726,
-0.044094160199165344,
-0.1596582680940628,
0.07088194787502289,
-0.354216605424881,
0.37045252323150635,
-0.1904582381248474,
0.1628842055797577,
-0.3339346945285797,
0.06337472796440125,
0.005579506978392601,
0.3590937554836273,
-0.3199554979801178,
-0.10791010409593582,
0.28620901703834534,
0.04162744805216789,
0.004150869324803352,
0.48521897196769714,
-0.0001157214937848039,
0.16606418788433075,
0.35862886905670166,
-0.031764693558216095,
-0.42981839179992676,
-0.563239574432373,
-0.30456510186195374,
-0.07257100194692612,
0.21531851589679718,
-0.20878669619560242,
-0.1616281270980835,
-0.029034771025180817,
0.11961807310581207,
-0.41987720131874084,
0.2603788673877716,
0.49189552664756775,
0.18429121375083923,
-0.04725004360079765,
0.2975515127182007,
-0.18032628297805786,
-0.05913744121789932,
-0.1362893134355545,
-0.0200079083442688,
0.6450533270835876,
-0.014042727649211884,
-0.20452798902988434,
-0.05082765966653824,
0.028619039803743362,
0.11825598776340485,
0.17265865206718445,
0.15859419107437134,
0.20119042694568634,
-0.3372359871864319,
-0.1506725251674652,
0.2118363082408905,
0.014688707888126373,
0.5337821245193481,
-0.2849700152873993,
-0.47233492136001587,
-0.12331397831439972,
-0.04912043735384941,
-0.37672069668769836,
0.5024482607841492,
0.09251543134450912,
-0.2628638446331024,
0.1907123327255249,
-0.4664979577064514,
-0.2508745789527893,
-0.19971585273742676,
0.36781740188598633,
-0.3860653042793274,
0.2701283097267151,
-0.1864977926015854,
0.2325517237186432,
0.277029812335968,
-0.15579374134540558,
-0.25939667224884033,
0.10985643416643143,
0.15275323390960693,
0.31869569420814514,
-0.31410926580429077,
0.10229797661304474,
-0.04402436316013336,
-0.28300940990448,
0.1964608132839203,
0.3815690875053406,
-0.015078159980475903,
0.00763772614300251,
-0.0969405397772789,
0.16452768445014954,
0.4020113945007324,
0.31891897320747375,
-0.11205392330884933,
0.20878060162067413,
0.18734225630760193,
0.6325328350067139,
-0.131130188703537,
-0.17701879143714905,
-0.13781128823757172,
-0.08137211203575134,
-0.16582493484020233,
-0.18351471424102783,
0.15377585589885712,
-0.1985757201910019,
-0.1576271951198578,
0.17403492331504822,
-0.26248839497566223,
-0.0844816192984581,
0.03549616411328316,
0.302487313747406,
-0.08979489654302597,
0.10918660461902618,
0.018498186022043228,
0.24559442698955536,
-0.10065408051013947,
0.163845494389534,
-0.16440317034721375,
0.24796287715435028,
-0.21821577847003937,
0.23155902326107025,
0.2416774481534958,
0.12468481063842773,
0.3092523217201233,
-0.3974607586860657,
0.07094468176364899,
-0.09545132517814636,
0.22119387984275818,
-0.24541400372982025,
-0.1564025580883026,
0.32481858134269714,
0.13616198301315308,
-0.01933150552213192,
0.18925169110298157,
-0.0819874182343483,
-0.12034984678030014,
-0.05912710726261139,
-0.23807895183563232,
-0.2690151631832123,
-0.16108158230781555,
0.16931003332138062,
-0.18221956491470337,
0.04406850039958954,
-0.31805655360221863,
0.021141065284609795,
-0.16301476955413818,
-0.2929227948188782,
-0.026491887867450714,
0.13830474019050598,
-0.13173867762088776,
-0.12480989098548889,
0.36892035603523254,
0.5510039329528809,
-0.2626013457775116,
-0.06616011261940002,
-0.20782041549682617,
-0.09954707324504852,
-0.014675237238407135,
0.42443159222602844,
-0.17439179122447968,
0.203556627035141,
-0.4347250461578369,
0.23821084201335907,
0.47839316725730896,
-0.24729813635349274,
-0.8428887724876404,
0.42797502875328064,
-0.24504666030406952,
0.14191384613513947,
-0.09193252772092819,
0.03228088840842247,
-0.035839226096868515,
0.1951988786458969,
0.631169319152832,
0.2926331162452698,
-0.06613072752952576,
-0.1279311627149582,
-0.0659746453166008,
-0.30872440338134766,
-0.057388752698898315,
0.2728065848350525,
-0.007247962057590485,
0.1732919067144394,
0.20289002358913422,
-0.11355862021446228,
0.20320448279380798,
0.1464848667383194,
-0.12947538495063782,
0.29840368032455444,
0.06549050658941269,
0.05014314129948616,
-0.13331423699855804,
-0.052926309406757355,
-0.6362524032592773,
0.24126672744750977,
-0.21722248196601868,
-0.03100980818271637,
-0.5615535378456116,
0.24953125417232513,
-0.44750675559043884,
0.03811182081699371,
-0.07190084457397461,
0.01713101752102375,
0.0995740294456482,
0.07932397723197937,
0.16756288707256317,
0.1997748762369156,
-0.2326558530330658,
0.3575585186481476,
0.05935373157262802,
0.22857734560966492,
-0.4177792966365814,
0.30382803082466125,
-0.06860316544771194,
-0.012873471714556217,
-0.04017037898302078,
0.0375097393989563,
0.08760623633861542,
-0.190719872713089,
-0.17235183715820312,
0.3521069288253784,
-0.09816087782382965,
0.1596621572971344,
0.3979540467262268,
0.4166021943092346,
0.15923044085502625,
-0.04197373986244202,
0.09670029580593109,
-0.1133250743150711,
0.0562816746532917,
-0.08738845586776733,
-0.18062248826026917,
0.18240705132484436,
0.12263509631156921,
0.30230095982551575,
0.14029653370380402,
0.03363804519176483,
0.3656933903694153,
0.11800533533096313,
-0.08331338316202164,
-0.15439945459365845,
0.15414130687713623,
0.46647942066192627,
0.21700750291347504,
0.05570659413933754,
-0.13877633213996887,
-0.049420855939388275,
0.381987988948822,
-0.2163211554288864,
0.013387639075517654,
0.28999051451683044,
0.041351139545440674,
-0.2723267376422882,
0.1269235610961914,
0.0862024575471878,
0.49157363176345825,
0.058633990585803986,
0.14298893511295319,
0.13873907923698425,
-0.24696564674377441,
-0.16380684077739716,
0.07847729325294495,
0.008731439709663391,
0.03820112347602844,
0.059525154531002045,
0.16665150225162506,
-0.02069324254989624,
-0.10888870805501938,
-0.3694198429584503,
0.04725605994462967,
0.17836418747901917,
-0.12225756049156189,
0.3422808051109314,
-0.11954733729362488,
-0.15238067507743835,
0.10463068634271622,
-0.32310354709625244,
-0.24559855461120605,
-0.48348763585090637,
-0.12514688074588776,
0.2941144108772278,
0.0920698493719101,
0.048825375735759735,
-0.33122727274894714,
0.09847110509872437,
0.18569733202457428,
-0.5195732712745667,
-0.1338461935520172,
-0.15138784050941467,
-0.1231953576207161,
0.056357014924287796,
0.3074066936969757,
-0.200678750872612,
0.2499469518661499,
-0.22966422140598297,
-0.10089456290006638,
-0.47252506017684937,
-0.17009906470775604,
0.08984331786632538,
-0.031245388090610504,
0.4079280197620392,
0.24472348392009735,
0.3579796552658081,
-0.06744830310344696,
-0.023289194330573082,
0.456180214881897,
0.07289693504571915,
-0.0803322046995163,
-0.038970522582530975,
-0.10589826107025146,
0.14109179377555847,
0.054669398814439774,
-0.26380255818367004,
-0.2067803293466568,
-0.35875529050827026,
0.4501703381538391,
0.03361405059695244,
0.06965303421020508,
0.13065339624881744,
0.15993733704090118,
0.20071707665920258,
0.16087450087070465,
-0.14960581064224243,
-0.35808679461479187,
-0.5675960779190063,
0.42163804173469543,
-0.22524911165237427,
-0.06296080350875854,
0.09545578062534332,
0.12602663040161133,
0.4072682857513428,
0.31080424785614014,
-0.5964599847793579,
-0.4336870312690735,
-0.24412624537944794,
0.24386891722679138,
-0.0759848952293396,
-0.28418341279029846,
0.20593565702438354,
-0.2813446521759033,
-0.04551234841346741,
0.07952351123094559,
-0.34358879923820496,
0.10722679644823074,
0.0380033403635025,
0.42180612683296204,
0.1905357539653778,
0.5441442131996155,
-0.1006031483411789,
0.5965806245803833,
0.050675880163908005,
0.11187970638275146,
0.3819423019886017,
-0.13115806877613068,
0.23935537040233612,
-0.436882883310318,
-0.2892049551010132,
0.13548852503299713,
-0.07353606820106506,
-0.31998157501220703,
-0.10109499096870422,
0.16100361943244934,
-0.06676536053419113,
-0.243223175406456,
0.25786828994750977,
-0.4428742825984955,
-0.2013869285583496,
0.04355057328939438,
-0.022995077073574066,
0.03929583355784416,
0.17480266094207764,
0.06318406760692596,
-0.18400689959526062,
-0.051339395344257355,
-0.049590613692998886,
0.18982335925102234,
0.08145307004451752,
0.1691625714302063,
-0.00577506422996521,
-0.38050606846809387,
-0.5242766737937927,
0.40868282318115234,
0.06882627308368683,
0.3191048800945282,
-0.23434968292713165,
0.09018514305353165,
0.1599833071231842,
-0.07143860310316086,
0.5216057896614075,
0.04385683685541153,
-0.02426869422197342,
0.22607465088367462,
-0.06399987637996674,
-0.2260831892490387,
0.04083360359072685,
0.1604548543691635,
0.287671834230423,
0.27843934297561646,
0.5854117274284363,
-0.4355757534503937,
-0.02235965058207512,
0.27368059754371643,
0.049244366586208344,
-0.08570893853902817,
-0.05197741463780403,
-0.196357861161232,
-0.49268838763237,
-0.34592700004577637,
-0.23090681433677673,
0.05837678909301758,
0.3225264549255371,
0.2719907760620117,
-0.1396181583404541,
0.19850493967533112,
-0.2339981496334076,
-0.12379255890846252,
0.08564239740371704,
0.2614714503288269,
-0.1848340630531311,
-0.07219789922237396,
0.4461749494075775,
0.05517605319619179,
0.062596395611763,
0.9526379704475403,
0.23097673058509827,
-0.1918453574180603,
0.35304221510887146,
0.204108327627182,
-0.04707714170217514,
0.23355987668037415,
-0.05444170534610748,
-0.2276650369167328,
0.04754690080881119,
0.3281216621398926,
-0.07012537121772766,
0.31384268403053284,
0.3014741837978363,
-0.03414949029684067,
-0.21832427382469177,
-0.3774328827857971,
0.5831078290939331,
-0.0610891617834568,
0.07160452008247375,
0.5631735324859619,
-0.003104276955127716,
-0.1457768827676773,
-0.028285913169384003,
-0.11133789271116257,
0.8322317004203796,
-0.2192075401544571,
0.13965527713298798,
0.32371121644973755,
-0.22581501305103302,
0.2849930226802826,
-0.36263108253479004,
0.18152496218681335,
-0.19024868309497833,
0.055939432233572006,
-0.10273108631372452,
-0.1027689203619957,
0.01693163439631462,
0.22920848429203033,
0.14003491401672363,
0.47013959288597107,
-0.06229569762945175,
-0.041358936578035355,
0.20221345126628876,
0.2214941680431366,
-0.1957225501537323,
-0.03502523899078369,
-0.4555773437023163,
0.15096065402030945,
-0.06350087374448776,
0.3048476278781891,
0.00435064360499382,
-0.04043480381369591,
-0.2007138729095459,
-0.17689262330532074,
-0.3790901303291321,
0.10399778932332993,
-0.44501596689224243,
0.3993920087814331,
0.06487195193767548,
-0.11941727995872498,
-0.33233487606048584,
0.13310666382312775,
-0.17189502716064453,
0.03747769817709923,
-0.3774072229862213,
0.2002425640821457,
-0.2505827844142914,
-0.1914519965648651,
0.0667511373758316,
0.2090216726064682,
0.16726641356945038,
-0.028622273355722427,
-0.10821253061294556,
0.2219361960887909,
-0.1580401062965393,
-0.4935774803161621,
-0.08612353354692459,
-0.02701014280319214,
0.13421860337257385,
-0.11370471119880676,
-0.12502580881118774,
-0.33865344524383545,
-0.20431619882583618,
-0.05277862399816513,
0.08084909617900848,
0.02885863557457924,
0.25234824419021606,
-0.20699605345726013,
0.002637188881635666,
-0.29183146357536316,
-0.1399933397769928,
0.5058479309082031,
-0.2566274106502533,
-0.33747851848602295,
0.463157594203949,
0.09772656857967377,
-0.09070710837841034,
-0.14748725295066833,
-0.18635156750679016,
-0.013412018306553364,
-0.14560595154762268,
0.09082380682229996,
0.011975142173469067,
0.1186041384935379,
-0.2104351818561554,
-0.02443285658955574,
0.254863440990448,
-0.16837963461875916,
0.04672449454665184,
-0.5118242502212524,
-0.40717101097106934,
0.27180010080337524,
-0.2288029044866562,
0.19139236211776733,
0.0034555047750473022,
-0.08716949820518494,
0.17305608093738556,
-0.26812490820884705,
-0.25922277569770813,
0.14714011549949646,
-0.442264199256897,
-0.2400079369544983,
0.24118012189865112,
-0.19608306884765625,
0.43214887380599976,
0.0995832234621048,
0.19839414954185486,
-0.03726053237915039,
-0.22936490178108215,
-0.18169766664505005,
0.07836614549160004,
0.1327115297317505,
0.1031489148736,
-0.40426310896873474,
0.06594603508710861,
-0.09052810817956924,
-0.10134287178516388,
-0.14431683719158173,
0.014554157853126526,
0.2522517740726471,
0.14825546741485596,
-0.27150943875312805,
0.14246535301208496,
0.04337535798549652,
-0.1513761579990387,
0.03128477931022644,
0.15409480035305023,
0.38584059476852417,
0.10714744031429291,
0.03854021430015564,
-0.012002618052065372,
0.042149901390075684,
-0.194707989692688,
0.028846032917499542,
0.03667205199599266,
0.11144018918275833,
0.5246021151542664,
-0.263003945350647,
0.06884430348873138,
0.17333504557609558,
0.2766213119029999,
0.3434120714664459,
-0.39332282543182373,
-0.050462447106838226,
0.08611129224300385,
0.18868626654148102,
-0.10052578151226044,
-0.040939126163721085,
0.11581335961818695,
-0.020030487328767776,
-0.05304324999451637,
0.07526391744613647,
0.02758491411805153,
0.026258297264575958,
0.19388318061828613,
0.030388426035642624,
0.4034171402454376,
0.013263821601867676,
0.01824124902486801,
-0.06863729655742645,
-0.1445126235485077,
0.0048209428787231445,
0.3360903859138489,
0.13439348340034485,
0.3272196054458618,
0.4190324544906616,
-0.1450161635875702,
-0.09873633086681366,
-0.38559234142303467,
0.2788905203342438,
-0.2114676535129547,
-0.43355175852775574,
-0.2508142590522766,
0.2423277497291565,
-0.3047327399253845,
0.22477781772613525,
-0.24355798959732056,
0.23780879378318787,
-0.41409552097320557,
0.2134465128183365,
-0.2503338158130646,
0.013956332579255104,
-0.03813739866018295,
-0.12027345597743988,
0.04608584940433502,
-0.19289946556091309,
-0.1554577648639679,
0.02922510728240013,
-0.07733030617237091,
-0.1959446519613266,
0.16730882227420807,
-0.10129855573177338,
-0.1600542813539505,
-0.2908317446708679,
0.14891499280929565,
0.058504894375801086,
0.10585543513298035,
-0.25690850615501404,
0.5002363920211792,
0.1337183713912964,
-0.12366890907287598,
0.2592601180076599,
0.254757821559906,
0.39218273758888245,
0.23541787266731262,
-0.05636172369122505,
0.11878132820129395,
-0.15208156406879425,
-0.1580701619386673,
-0.16493827104568481,
0.22200588881969452,
0.2826266586780548,
-0.23992641270160675,
0.4083402156829834,
0.2201502025127411,
-0.1681927591562271,
0.3380623757839203,
-0.019094835966825485,
0.43724319338798523,
-0.21333234012126923,
0.319217711687088,
-0.37805837392807007,
0.0575314536690712,
-0.31014955043792725,
-0.08322782069444656,
-0.576059103012085,
-0.25307270884513855,
-0.163516566157341,
-0.10167232900857925,
0.16173803806304932,
-0.013818803243339062,
0.0595092698931694,
0.04802851378917694,
0.3779023587703705,
0.4761713743209839,
0.19667765498161316,
-0.2976576089859009,
-0.2617686986923218,
-0.5369642972946167,
0.08451207727193832,
-0.07444266974925995,
0.04078644514083862,
-0.012641666457057,
0.32527604699134827,
-0.14348599314689636,
0.11793257296085358,
0.17049771547317505,
0.17507021129131317,
-0.20177465677261353,
0.11899743229150772,
-0.2758837342262268,
-0.4163702726364136,
-0.035489730536937714,
0.12372905761003494,
-0.09251052886247635,
-0.16201399266719818,
0.18151171505451202,
-0.28842291235923767,
-0.007548607885837555,
0.006305234506726265,
0.12648995220661163,
0.03038402646780014,
-0.027979500591754913,
0.46885207295417786,
0.17193691432476044,
0.4205750524997711,
0.10914292186498642,
-0.25002989172935486,
-0.32995495200157166,
-0.19939890503883362,
-0.028910785913467407,
0.011775635182857513,
-0.05939042195677757,
0.45646893978118896,
-0.029386702924966812,
0.02858826518058777,
-0.2617824673652649,
0.1135849878191948,
-0.07305807620286942,
-0.16770794987678528,
0.018492838367819786,
-0.10896595567464828,
0.02204107493162155,
0.1403104066848755,
-0.0012171855196356773,
0.35014772415161133,
0.05030624568462372,
0.22214259207248688,
-0.09469525516033173,
-0.15746229887008667,
0.5106205940246582,
-0.07122857123613358,
-0.2704927623271942,
0.21544703841209412,
0.005209967494010925,
-0.061778388917446136,
-0.002032337710261345,
-0.36094000935554504,
0.20563599467277527,
0.4209411144256592,
0.07986575365066528,
-0.15651051700115204,
0.07978782057762146,
-0.1106192022562027,
-0.06912760436534882,
-0.11450421810150146,
0.22457343339920044,
-0.10460538417100906,
-0.11415310204029083,
0.05216267332434654,
0.07297991216182709
] |
https://github.com/huggingface/datasets/issues/2212 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset | They now made a website to force people who want to use the dataset for commercial purposes to seek a commercial license from them ... | I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it? | 25 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
They now made a website to force people who want to use the dataset for commercial purposes to seek a commercial license from them ... | [
-0.3520764112472534,
0.18505176901817322,
-0.10664549469947815,
0.24557921290397644,
0.39981645345687866,
0.03360738605260849,
0.3876356780529022,
0.20610381662845612,
0.30574971437454224,
0.14539270102977753,
-0.2683600187301636,
-0.19080856442451477,
0.28275156021118164,
0.017551591619849205,
0.027606971561908722,
0.07144854217767715,
-0.07178155332803726,
-0.044094160199165344,
-0.1596582680940628,
0.07088194787502289,
-0.354216605424881,
0.37045252323150635,
-0.1904582381248474,
0.1628842055797577,
-0.3339346945285797,
0.06337472796440125,
0.005579506978392601,
0.3590937554836273,
-0.3199554979801178,
-0.10791010409593582,
0.28620901703834534,
0.04162744805216789,
0.004150869324803352,
0.48521897196769714,
-0.0001157214937848039,
0.16606418788433075,
0.35862886905670166,
-0.031764693558216095,
-0.42981839179992676,
-0.563239574432373,
-0.30456510186195374,
-0.07257100194692612,
0.21531851589679718,
-0.20878669619560242,
-0.1616281270980835,
-0.029034771025180817,
0.11961807310581207,
-0.41987720131874084,
0.2603788673877716,
0.49189552664756775,
0.18429121375083923,
-0.04725004360079765,
0.2975515127182007,
-0.18032628297805786,
-0.05913744121789932,
-0.1362893134355545,
-0.0200079083442688,
0.6450533270835876,
-0.014042727649211884,
-0.20452798902988434,
-0.05082765966653824,
0.028619039803743362,
0.11825598776340485,
0.17265865206718445,
0.15859419107437134,
0.20119042694568634,
-0.3372359871864319,
-0.1506725251674652,
0.2118363082408905,
0.014688707888126373,
0.5337821245193481,
-0.2849700152873993,
-0.47233492136001587,
-0.12331397831439972,
-0.04912043735384941,
-0.37672069668769836,
0.5024482607841492,
0.09251543134450912,
-0.2628638446331024,
0.1907123327255249,
-0.4664979577064514,
-0.2508745789527893,
-0.19971585273742676,
0.36781740188598633,
-0.3860653042793274,
0.2701283097267151,
-0.1864977926015854,
0.2325517237186432,
0.277029812335968,
-0.15579374134540558,
-0.25939667224884033,
0.10985643416643143,
0.15275323390960693,
0.31869569420814514,
-0.31410926580429077,
0.10229797661304474,
-0.04402436316013336,
-0.28300940990448,
0.1964608132839203,
0.3815690875053406,
-0.015078159980475903,
0.00763772614300251,
-0.0969405397772789,
0.16452768445014954,
0.4020113945007324,
0.31891897320747375,
-0.11205392330884933,
0.20878060162067413,
0.18734225630760193,
0.6325328350067139,
-0.131130188703537,
-0.17701879143714905,
-0.13781128823757172,
-0.08137211203575134,
-0.16582493484020233,
-0.18351471424102783,
0.15377585589885712,
-0.1985757201910019,
-0.1576271951198578,
0.17403492331504822,
-0.26248839497566223,
-0.0844816192984581,
0.03549616411328316,
0.302487313747406,
-0.08979489654302597,
0.10918660461902618,
0.018498186022043228,
0.24559442698955536,
-0.10065408051013947,
0.163845494389534,
-0.16440317034721375,
0.24796287715435028,
-0.21821577847003937,
0.23155902326107025,
0.2416774481534958,
0.12468481063842773,
0.3092523217201233,
-0.3974607586860657,
0.07094468176364899,
-0.09545132517814636,
0.22119387984275818,
-0.24541400372982025,
-0.1564025580883026,
0.32481858134269714,
0.13616198301315308,
-0.01933150552213192,
0.18925169110298157,
-0.0819874182343483,
-0.12034984678030014,
-0.05912710726261139,
-0.23807895183563232,
-0.2690151631832123,
-0.16108158230781555,
0.16931003332138062,
-0.18221956491470337,
0.04406850039958954,
-0.31805655360221863,
0.021141065284609795,
-0.16301476955413818,
-0.2929227948188782,
-0.026491887867450714,
0.13830474019050598,
-0.13173867762088776,
-0.12480989098548889,
0.36892035603523254,
0.5510039329528809,
-0.2626013457775116,
-0.06616011261940002,
-0.20782041549682617,
-0.09954707324504852,
-0.014675237238407135,
0.42443159222602844,
-0.17439179122447968,
0.203556627035141,
-0.4347250461578369,
0.23821084201335907,
0.47839316725730896,
-0.24729813635349274,
-0.8428887724876404,
0.42797502875328064,
-0.24504666030406952,
0.14191384613513947,
-0.09193252772092819,
0.03228088840842247,
-0.035839226096868515,
0.1951988786458969,
0.631169319152832,
0.2926331162452698,
-0.06613072752952576,
-0.1279311627149582,
-0.0659746453166008,
-0.30872440338134766,
-0.057388752698898315,
0.2728065848350525,
-0.007247962057590485,
0.1732919067144394,
0.20289002358913422,
-0.11355862021446228,
0.20320448279380798,
0.1464848667383194,
-0.12947538495063782,
0.29840368032455444,
0.06549050658941269,
0.05014314129948616,
-0.13331423699855804,
-0.052926309406757355,
-0.6362524032592773,
0.24126672744750977,
-0.21722248196601868,
-0.03100980818271637,
-0.5615535378456116,
0.24953125417232513,
-0.44750675559043884,
0.03811182081699371,
-0.07190084457397461,
0.01713101752102375,
0.0995740294456482,
0.07932397723197937,
0.16756288707256317,
0.1997748762369156,
-0.2326558530330658,
0.3575585186481476,
0.05935373157262802,
0.22857734560966492,
-0.4177792966365814,
0.30382803082466125,
-0.06860316544771194,
-0.012873471714556217,
-0.04017037898302078,
0.0375097393989563,
0.08760623633861542,
-0.190719872713089,
-0.17235183715820312,
0.3521069288253784,
-0.09816087782382965,
0.1596621572971344,
0.3979540467262268,
0.4166021943092346,
0.15923044085502625,
-0.04197373986244202,
0.09670029580593109,
-0.1133250743150711,
0.0562816746532917,
-0.08738845586776733,
-0.18062248826026917,
0.18240705132484436,
0.12263509631156921,
0.30230095982551575,
0.14029653370380402,
0.03363804519176483,
0.3656933903694153,
0.11800533533096313,
-0.08331338316202164,
-0.15439945459365845,
0.15414130687713623,
0.46647942066192627,
0.21700750291347504,
0.05570659413933754,
-0.13877633213996887,
-0.049420855939388275,
0.381987988948822,
-0.2163211554288864,
0.013387639075517654,
0.28999051451683044,
0.041351139545440674,
-0.2723267376422882,
0.1269235610961914,
0.0862024575471878,
0.49157363176345825,
0.058633990585803986,
0.14298893511295319,
0.13873907923698425,
-0.24696564674377441,
-0.16380684077739716,
0.07847729325294495,
0.008731439709663391,
0.03820112347602844,
0.059525154531002045,
0.16665150225162506,
-0.02069324254989624,
-0.10888870805501938,
-0.3694198429584503,
0.04725605994462967,
0.17836418747901917,
-0.12225756049156189,
0.3422808051109314,
-0.11954733729362488,
-0.15238067507743835,
0.10463068634271622,
-0.32310354709625244,
-0.24559855461120605,
-0.48348763585090637,
-0.12514688074588776,
0.2941144108772278,
0.0920698493719101,
0.048825375735759735,
-0.33122727274894714,
0.09847110509872437,
0.18569733202457428,
-0.5195732712745667,
-0.1338461935520172,
-0.15138784050941467,
-0.1231953576207161,
0.056357014924287796,
0.3074066936969757,
-0.200678750872612,
0.2499469518661499,
-0.22966422140598297,
-0.10089456290006638,
-0.47252506017684937,
-0.17009906470775604,
0.08984331786632538,
-0.031245388090610504,
0.4079280197620392,
0.24472348392009735,
0.3579796552658081,
-0.06744830310344696,
-0.023289194330573082,
0.456180214881897,
0.07289693504571915,
-0.0803322046995163,
-0.038970522582530975,
-0.10589826107025146,
0.14109179377555847,
0.054669398814439774,
-0.26380255818367004,
-0.2067803293466568,
-0.35875529050827026,
0.4501703381538391,
0.03361405059695244,
0.06965303421020508,
0.13065339624881744,
0.15993733704090118,
0.20071707665920258,
0.16087450087070465,
-0.14960581064224243,
-0.35808679461479187,
-0.5675960779190063,
0.42163804173469543,
-0.22524911165237427,
-0.06296080350875854,
0.09545578062534332,
0.12602663040161133,
0.4072682857513428,
0.31080424785614014,
-0.5964599847793579,
-0.4336870312690735,
-0.24412624537944794,
0.24386891722679138,
-0.0759848952293396,
-0.28418341279029846,
0.20593565702438354,
-0.2813446521759033,
-0.04551234841346741,
0.07952351123094559,
-0.34358879923820496,
0.10722679644823074,
0.0380033403635025,
0.42180612683296204,
0.1905357539653778,
0.5441442131996155,
-0.1006031483411789,
0.5965806245803833,
0.050675880163908005,
0.11187970638275146,
0.3819423019886017,
-0.13115806877613068,
0.23935537040233612,
-0.436882883310318,
-0.2892049551010132,
0.13548852503299713,
-0.07353606820106506,
-0.31998157501220703,
-0.10109499096870422,
0.16100361943244934,
-0.06676536053419113,
-0.243223175406456,
0.25786828994750977,
-0.4428742825984955,
-0.2013869285583496,
0.04355057328939438,
-0.022995077073574066,
0.03929583355784416,
0.17480266094207764,
0.06318406760692596,
-0.18400689959526062,
-0.051339395344257355,
-0.049590613692998886,
0.18982335925102234,
0.08145307004451752,
0.1691625714302063,
-0.00577506422996521,
-0.38050606846809387,
-0.5242766737937927,
0.40868282318115234,
0.06882627308368683,
0.3191048800945282,
-0.23434968292713165,
0.09018514305353165,
0.1599833071231842,
-0.07143860310316086,
0.5216057896614075,
0.04385683685541153,
-0.02426869422197342,
0.22607465088367462,
-0.06399987637996674,
-0.2260831892490387,
0.04083360359072685,
0.1604548543691635,
0.287671834230423,
0.27843934297561646,
0.5854117274284363,
-0.4355757534503937,
-0.02235965058207512,
0.27368059754371643,
0.049244366586208344,
-0.08570893853902817,
-0.05197741463780403,
-0.196357861161232,
-0.49268838763237,
-0.34592700004577637,
-0.23090681433677673,
0.05837678909301758,
0.3225264549255371,
0.2719907760620117,
-0.1396181583404541,
0.19850493967533112,
-0.2339981496334076,
-0.12379255890846252,
0.08564239740371704,
0.2614714503288269,
-0.1848340630531311,
-0.07219789922237396,
0.4461749494075775,
0.05517605319619179,
0.062596395611763,
0.9526379704475403,
0.23097673058509827,
-0.1918453574180603,
0.35304221510887146,
0.204108327627182,
-0.04707714170217514,
0.23355987668037415,
-0.05444170534610748,
-0.2276650369167328,
0.04754690080881119,
0.3281216621398926,
-0.07012537121772766,
0.31384268403053284,
0.3014741837978363,
-0.03414949029684067,
-0.21832427382469177,
-0.3774328827857971,
0.5831078290939331,
-0.0610891617834568,
0.07160452008247375,
0.5631735324859619,
-0.003104276955127716,
-0.1457768827676773,
-0.028285913169384003,
-0.11133789271116257,
0.8322317004203796,
-0.2192075401544571,
0.13965527713298798,
0.32371121644973755,
-0.22581501305103302,
0.2849930226802826,
-0.36263108253479004,
0.18152496218681335,
-0.19024868309497833,
0.055939432233572006,
-0.10273108631372452,
-0.1027689203619957,
0.01693163439631462,
0.22920848429203033,
0.14003491401672363,
0.47013959288597107,
-0.06229569762945175,
-0.041358936578035355,
0.20221345126628876,
0.2214941680431366,
-0.1957225501537323,
-0.03502523899078369,
-0.4555773437023163,
0.15096065402030945,
-0.06350087374448776,
0.3048476278781891,
0.00435064360499382,
-0.04043480381369591,
-0.2007138729095459,
-0.17689262330532074,
-0.3790901303291321,
0.10399778932332993,
-0.44501596689224243,
0.3993920087814331,
0.06487195193767548,
-0.11941727995872498,
-0.33233487606048584,
0.13310666382312775,
-0.17189502716064453,
0.03747769817709923,
-0.3774072229862213,
0.2002425640821457,
-0.2505827844142914,
-0.1914519965648651,
0.0667511373758316,
0.2090216726064682,
0.16726641356945038,
-0.028622273355722427,
-0.10821253061294556,
0.2219361960887909,
-0.1580401062965393,
-0.4935774803161621,
-0.08612353354692459,
-0.02701014280319214,
0.13421860337257385,
-0.11370471119880676,
-0.12502580881118774,
-0.33865344524383545,
-0.20431619882583618,
-0.05277862399816513,
0.08084909617900848,
0.02885863557457924,
0.25234824419021606,
-0.20699605345726013,
0.002637188881635666,
-0.29183146357536316,
-0.1399933397769928,
0.5058479309082031,
-0.2566274106502533,
-0.33747851848602295,
0.463157594203949,
0.09772656857967377,
-0.09070710837841034,
-0.14748725295066833,
-0.18635156750679016,
-0.013412018306553364,
-0.14560595154762268,
0.09082380682229996,
0.011975142173469067,
0.1186041384935379,
-0.2104351818561554,
-0.02443285658955574,
0.254863440990448,
-0.16837963461875916,
0.04672449454665184,
-0.5118242502212524,
-0.40717101097106934,
0.27180010080337524,
-0.2288029044866562,
0.19139236211776733,
0.0034555047750473022,
-0.08716949820518494,
0.17305608093738556,
-0.26812490820884705,
-0.25922277569770813,
0.14714011549949646,
-0.442264199256897,
-0.2400079369544983,
0.24118012189865112,
-0.19608306884765625,
0.43214887380599976,
0.0995832234621048,
0.19839414954185486,
-0.03726053237915039,
-0.22936490178108215,
-0.18169766664505005,
0.07836614549160004,
0.1327115297317505,
0.1031489148736,
-0.40426310896873474,
0.06594603508710861,
-0.09052810817956924,
-0.10134287178516388,
-0.14431683719158173,
0.014554157853126526,
0.2522517740726471,
0.14825546741485596,
-0.27150943875312805,
0.14246535301208496,
0.04337535798549652,
-0.1513761579990387,
0.03128477931022644,
0.15409480035305023,
0.38584059476852417,
0.10714744031429291,
0.03854021430015564,
-0.012002618052065372,
0.042149901390075684,
-0.194707989692688,
0.028846032917499542,
0.03667205199599266,
0.11144018918275833,
0.5246021151542664,
-0.263003945350647,
0.06884430348873138,
0.17333504557609558,
0.2766213119029999,
0.3434120714664459,
-0.39332282543182373,
-0.050462447106838226,
0.08611129224300385,
0.18868626654148102,
-0.10052578151226044,
-0.040939126163721085,
0.11581335961818695,
-0.020030487328767776,
-0.05304324999451637,
0.07526391744613647,
0.02758491411805153,
0.026258297264575958,
0.19388318061828613,
0.030388426035642624,
0.4034171402454376,
0.013263821601867676,
0.01824124902486801,
-0.06863729655742645,
-0.1445126235485077,
0.0048209428787231445,
0.3360903859138489,
0.13439348340034485,
0.3272196054458618,
0.4190324544906616,
-0.1450161635875702,
-0.09873633086681366,
-0.38559234142303467,
0.2788905203342438,
-0.2114676535129547,
-0.43355175852775574,
-0.2508142590522766,
0.2423277497291565,
-0.3047327399253845,
0.22477781772613525,
-0.24355798959732056,
0.23780879378318787,
-0.41409552097320557,
0.2134465128183365,
-0.2503338158130646,
0.013956332579255104,
-0.03813739866018295,
-0.12027345597743988,
0.04608584940433502,
-0.19289946556091309,
-0.1554577648639679,
0.02922510728240013,
-0.07733030617237091,
-0.1959446519613266,
0.16730882227420807,
-0.10129855573177338,
-0.1600542813539505,
-0.2908317446708679,
0.14891499280929565,
0.058504894375801086,
0.10585543513298035,
-0.25690850615501404,
0.5002363920211792,
0.1337183713912964,
-0.12366890907287598,
0.2592601180076599,
0.254757821559906,
0.39218273758888245,
0.23541787266731262,
-0.05636172369122505,
0.11878132820129395,
-0.15208156406879425,
-0.1580701619386673,
-0.16493827104568481,
0.22200588881969452,
0.2826266586780548,
-0.23992641270160675,
0.4083402156829834,
0.2201502025127411,
-0.1681927591562271,
0.3380623757839203,
-0.019094835966825485,
0.43724319338798523,
-0.21333234012126923,
0.319217711687088,
-0.37805837392807007,
0.0575314536690712,
-0.31014955043792725,
-0.08322782069444656,
-0.576059103012085,
-0.25307270884513855,
-0.163516566157341,
-0.10167232900857925,
0.16173803806304932,
-0.013818803243339062,
0.0595092698931694,
0.04802851378917694,
0.3779023587703705,
0.4761713743209839,
0.19667765498161316,
-0.2976576089859009,
-0.2617686986923218,
-0.5369642972946167,
0.08451207727193832,
-0.07444266974925995,
0.04078644514083862,
-0.012641666457057,
0.32527604699134827,
-0.14348599314689636,
0.11793257296085358,
0.17049771547317505,
0.17507021129131317,
-0.20177465677261353,
0.11899743229150772,
-0.2758837342262268,
-0.4163702726364136,
-0.035489730536937714,
0.12372905761003494,
-0.09251052886247635,
-0.16201399266719818,
0.18151171505451202,
-0.28842291235923767,
-0.007548607885837555,
0.006305234506726265,
0.12648995220661163,
0.03038402646780014,
-0.027979500591754913,
0.46885207295417786,
0.17193691432476044,
0.4205750524997711,
0.10914292186498642,
-0.25002989172935486,
-0.32995495200157166,
-0.19939890503883362,
-0.028910785913467407,
0.011775635182857513,
-0.05939042195677757,
0.45646893978118896,
-0.029386702924966812,
0.02858826518058777,
-0.2617824673652649,
0.1135849878191948,
-0.07305807620286942,
-0.16770794987678528,
0.018492838367819786,
-0.10896595567464828,
0.02204107493162155,
0.1403104066848755,
-0.0012171855196356773,
0.35014772415161133,
0.05030624568462372,
0.22214259207248688,
-0.09469525516033173,
-0.15746229887008667,
0.5106205940246582,
-0.07122857123613358,
-0.2704927623271942,
0.21544703841209412,
0.005209967494010925,
-0.061778388917446136,
-0.002032337710261345,
-0.36094000935554504,
0.20563599467277527,
0.4209411144256592,
0.07986575365066528,
-0.15651051700115204,
0.07978782057762146,
-0.1106192022562027,
-0.06912760436534882,
-0.11450421810150146,
0.22457343339920044,
-0.10460538417100906,
-0.11415310204029083,
0.05216267332434654,
0.07297991216182709
] |
https://github.com/huggingface/datasets/issues/2212 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset | The script has been adopted to support manual download from the website, so I'm closing this issue. | I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it? | 17 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
The script has been adopted to support manual download from the website, so I'm closing this issue. | [
-0.3520764112472534,
0.18505176901817322,
-0.10664549469947815,
0.24557921290397644,
0.39981645345687866,
0.03360738605260849,
0.3876356780529022,
0.20610381662845612,
0.30574971437454224,
0.14539270102977753,
-0.2683600187301636,
-0.19080856442451477,
0.28275156021118164,
0.017551591619849205,
0.027606971561908722,
0.07144854217767715,
-0.07178155332803726,
-0.044094160199165344,
-0.1596582680940628,
0.07088194787502289,
-0.354216605424881,
0.37045252323150635,
-0.1904582381248474,
0.1628842055797577,
-0.3339346945285797,
0.06337472796440125,
0.005579506978392601,
0.3590937554836273,
-0.3199554979801178,
-0.10791010409593582,
0.28620901703834534,
0.04162744805216789,
0.004150869324803352,
0.48521897196769714,
-0.0001157214937848039,
0.16606418788433075,
0.35862886905670166,
-0.031764693558216095,
-0.42981839179992676,
-0.563239574432373,
-0.30456510186195374,
-0.07257100194692612,
0.21531851589679718,
-0.20878669619560242,
-0.1616281270980835,
-0.029034771025180817,
0.11961807310581207,
-0.41987720131874084,
0.2603788673877716,
0.49189552664756775,
0.18429121375083923,
-0.04725004360079765,
0.2975515127182007,
-0.18032628297805786,
-0.05913744121789932,
-0.1362893134355545,
-0.0200079083442688,
0.6450533270835876,
-0.014042727649211884,
-0.20452798902988434,
-0.05082765966653824,
0.028619039803743362,
0.11825598776340485,
0.17265865206718445,
0.15859419107437134,
0.20119042694568634,
-0.3372359871864319,
-0.1506725251674652,
0.2118363082408905,
0.014688707888126373,
0.5337821245193481,
-0.2849700152873993,
-0.47233492136001587,
-0.12331397831439972,
-0.04912043735384941,
-0.37672069668769836,
0.5024482607841492,
0.09251543134450912,
-0.2628638446331024,
0.1907123327255249,
-0.4664979577064514,
-0.2508745789527893,
-0.19971585273742676,
0.36781740188598633,
-0.3860653042793274,
0.2701283097267151,
-0.1864977926015854,
0.2325517237186432,
0.277029812335968,
-0.15579374134540558,
-0.25939667224884033,
0.10985643416643143,
0.15275323390960693,
0.31869569420814514,
-0.31410926580429077,
0.10229797661304474,
-0.04402436316013336,
-0.28300940990448,
0.1964608132839203,
0.3815690875053406,
-0.015078159980475903,
0.00763772614300251,
-0.0969405397772789,
0.16452768445014954,
0.4020113945007324,
0.31891897320747375,
-0.11205392330884933,
0.20878060162067413,
0.18734225630760193,
0.6325328350067139,
-0.131130188703537,
-0.17701879143714905,
-0.13781128823757172,
-0.08137211203575134,
-0.16582493484020233,
-0.18351471424102783,
0.15377585589885712,
-0.1985757201910019,
-0.1576271951198578,
0.17403492331504822,
-0.26248839497566223,
-0.0844816192984581,
0.03549616411328316,
0.302487313747406,
-0.08979489654302597,
0.10918660461902618,
0.018498186022043228,
0.24559442698955536,
-0.10065408051013947,
0.163845494389534,
-0.16440317034721375,
0.24796287715435028,
-0.21821577847003937,
0.23155902326107025,
0.2416774481534958,
0.12468481063842773,
0.3092523217201233,
-0.3974607586860657,
0.07094468176364899,
-0.09545132517814636,
0.22119387984275818,
-0.24541400372982025,
-0.1564025580883026,
0.32481858134269714,
0.13616198301315308,
-0.01933150552213192,
0.18925169110298157,
-0.0819874182343483,
-0.12034984678030014,
-0.05912710726261139,
-0.23807895183563232,
-0.2690151631832123,
-0.16108158230781555,
0.16931003332138062,
-0.18221956491470337,
0.04406850039958954,
-0.31805655360221863,
0.021141065284609795,
-0.16301476955413818,
-0.2929227948188782,
-0.026491887867450714,
0.13830474019050598,
-0.13173867762088776,
-0.12480989098548889,
0.36892035603523254,
0.5510039329528809,
-0.2626013457775116,
-0.06616011261940002,
-0.20782041549682617,
-0.09954707324504852,
-0.014675237238407135,
0.42443159222602844,
-0.17439179122447968,
0.203556627035141,
-0.4347250461578369,
0.23821084201335907,
0.47839316725730896,
-0.24729813635349274,
-0.8428887724876404,
0.42797502875328064,
-0.24504666030406952,
0.14191384613513947,
-0.09193252772092819,
0.03228088840842247,
-0.035839226096868515,
0.1951988786458969,
0.631169319152832,
0.2926331162452698,
-0.06613072752952576,
-0.1279311627149582,
-0.0659746453166008,
-0.30872440338134766,
-0.057388752698898315,
0.2728065848350525,
-0.007247962057590485,
0.1732919067144394,
0.20289002358913422,
-0.11355862021446228,
0.20320448279380798,
0.1464848667383194,
-0.12947538495063782,
0.29840368032455444,
0.06549050658941269,
0.05014314129948616,
-0.13331423699855804,
-0.052926309406757355,
-0.6362524032592773,
0.24126672744750977,
-0.21722248196601868,
-0.03100980818271637,
-0.5615535378456116,
0.24953125417232513,
-0.44750675559043884,
0.03811182081699371,
-0.07190084457397461,
0.01713101752102375,
0.0995740294456482,
0.07932397723197937,
0.16756288707256317,
0.1997748762369156,
-0.2326558530330658,
0.3575585186481476,
0.05935373157262802,
0.22857734560966492,
-0.4177792966365814,
0.30382803082466125,
-0.06860316544771194,
-0.012873471714556217,
-0.04017037898302078,
0.0375097393989563,
0.08760623633861542,
-0.190719872713089,
-0.17235183715820312,
0.3521069288253784,
-0.09816087782382965,
0.1596621572971344,
0.3979540467262268,
0.4166021943092346,
0.15923044085502625,
-0.04197373986244202,
0.09670029580593109,
-0.1133250743150711,
0.0562816746532917,
-0.08738845586776733,
-0.18062248826026917,
0.18240705132484436,
0.12263509631156921,
0.30230095982551575,
0.14029653370380402,
0.03363804519176483,
0.3656933903694153,
0.11800533533096313,
-0.08331338316202164,
-0.15439945459365845,
0.15414130687713623,
0.46647942066192627,
0.21700750291347504,
0.05570659413933754,
-0.13877633213996887,
-0.049420855939388275,
0.381987988948822,
-0.2163211554288864,
0.013387639075517654,
0.28999051451683044,
0.041351139545440674,
-0.2723267376422882,
0.1269235610961914,
0.0862024575471878,
0.49157363176345825,
0.058633990585803986,
0.14298893511295319,
0.13873907923698425,
-0.24696564674377441,
-0.16380684077739716,
0.07847729325294495,
0.008731439709663391,
0.03820112347602844,
0.059525154531002045,
0.16665150225162506,
-0.02069324254989624,
-0.10888870805501938,
-0.3694198429584503,
0.04725605994462967,
0.17836418747901917,
-0.12225756049156189,
0.3422808051109314,
-0.11954733729362488,
-0.15238067507743835,
0.10463068634271622,
-0.32310354709625244,
-0.24559855461120605,
-0.48348763585090637,
-0.12514688074588776,
0.2941144108772278,
0.0920698493719101,
0.048825375735759735,
-0.33122727274894714,
0.09847110509872437,
0.18569733202457428,
-0.5195732712745667,
-0.1338461935520172,
-0.15138784050941467,
-0.1231953576207161,
0.056357014924287796,
0.3074066936969757,
-0.200678750872612,
0.2499469518661499,
-0.22966422140598297,
-0.10089456290006638,
-0.47252506017684937,
-0.17009906470775604,
0.08984331786632538,
-0.031245388090610504,
0.4079280197620392,
0.24472348392009735,
0.3579796552658081,
-0.06744830310344696,
-0.023289194330573082,
0.456180214881897,
0.07289693504571915,
-0.0803322046995163,
-0.038970522582530975,
-0.10589826107025146,
0.14109179377555847,
0.054669398814439774,
-0.26380255818367004,
-0.2067803293466568,
-0.35875529050827026,
0.4501703381538391,
0.03361405059695244,
0.06965303421020508,
0.13065339624881744,
0.15993733704090118,
0.20071707665920258,
0.16087450087070465,
-0.14960581064224243,
-0.35808679461479187,
-0.5675960779190063,
0.42163804173469543,
-0.22524911165237427,
-0.06296080350875854,
0.09545578062534332,
0.12602663040161133,
0.4072682857513428,
0.31080424785614014,
-0.5964599847793579,
-0.4336870312690735,
-0.24412624537944794,
0.24386891722679138,
-0.0759848952293396,
-0.28418341279029846,
0.20593565702438354,
-0.2813446521759033,
-0.04551234841346741,
0.07952351123094559,
-0.34358879923820496,
0.10722679644823074,
0.0380033403635025,
0.42180612683296204,
0.1905357539653778,
0.5441442131996155,
-0.1006031483411789,
0.5965806245803833,
0.050675880163908005,
0.11187970638275146,
0.3819423019886017,
-0.13115806877613068,
0.23935537040233612,
-0.436882883310318,
-0.2892049551010132,
0.13548852503299713,
-0.07353606820106506,
-0.31998157501220703,
-0.10109499096870422,
0.16100361943244934,
-0.06676536053419113,
-0.243223175406456,
0.25786828994750977,
-0.4428742825984955,
-0.2013869285583496,
0.04355057328939438,
-0.022995077073574066,
0.03929583355784416,
0.17480266094207764,
0.06318406760692596,
-0.18400689959526062,
-0.051339395344257355,
-0.049590613692998886,
0.18982335925102234,
0.08145307004451752,
0.1691625714302063,
-0.00577506422996521,
-0.38050606846809387,
-0.5242766737937927,
0.40868282318115234,
0.06882627308368683,
0.3191048800945282,
-0.23434968292713165,
0.09018514305353165,
0.1599833071231842,
-0.07143860310316086,
0.5216057896614075,
0.04385683685541153,
-0.02426869422197342,
0.22607465088367462,
-0.06399987637996674,
-0.2260831892490387,
0.04083360359072685,
0.1604548543691635,
0.287671834230423,
0.27843934297561646,
0.5854117274284363,
-0.4355757534503937,
-0.02235965058207512,
0.27368059754371643,
0.049244366586208344,
-0.08570893853902817,
-0.05197741463780403,
-0.196357861161232,
-0.49268838763237,
-0.34592700004577637,
-0.23090681433677673,
0.05837678909301758,
0.3225264549255371,
0.2719907760620117,
-0.1396181583404541,
0.19850493967533112,
-0.2339981496334076,
-0.12379255890846252,
0.08564239740371704,
0.2614714503288269,
-0.1848340630531311,
-0.07219789922237396,
0.4461749494075775,
0.05517605319619179,
0.062596395611763,
0.9526379704475403,
0.23097673058509827,
-0.1918453574180603,
0.35304221510887146,
0.204108327627182,
-0.04707714170217514,
0.23355987668037415,
-0.05444170534610748,
-0.2276650369167328,
0.04754690080881119,
0.3281216621398926,
-0.07012537121772766,
0.31384268403053284,
0.3014741837978363,
-0.03414949029684067,
-0.21832427382469177,
-0.3774328827857971,
0.5831078290939331,
-0.0610891617834568,
0.07160452008247375,
0.5631735324859619,
-0.003104276955127716,
-0.1457768827676773,
-0.028285913169384003,
-0.11133789271116257,
0.8322317004203796,
-0.2192075401544571,
0.13965527713298798,
0.32371121644973755,
-0.22581501305103302,
0.2849930226802826,
-0.36263108253479004,
0.18152496218681335,
-0.19024868309497833,
0.055939432233572006,
-0.10273108631372452,
-0.1027689203619957,
0.01693163439631462,
0.22920848429203033,
0.14003491401672363,
0.47013959288597107,
-0.06229569762945175,
-0.041358936578035355,
0.20221345126628876,
0.2214941680431366,
-0.1957225501537323,
-0.03502523899078369,
-0.4555773437023163,
0.15096065402030945,
-0.06350087374448776,
0.3048476278781891,
0.00435064360499382,
-0.04043480381369591,
-0.2007138729095459,
-0.17689262330532074,
-0.3790901303291321,
0.10399778932332993,
-0.44501596689224243,
0.3993920087814331,
0.06487195193767548,
-0.11941727995872498,
-0.33233487606048584,
0.13310666382312775,
-0.17189502716064453,
0.03747769817709923,
-0.3774072229862213,
0.2002425640821457,
-0.2505827844142914,
-0.1914519965648651,
0.0667511373758316,
0.2090216726064682,
0.16726641356945038,
-0.028622273355722427,
-0.10821253061294556,
0.2219361960887909,
-0.1580401062965393,
-0.4935774803161621,
-0.08612353354692459,
-0.02701014280319214,
0.13421860337257385,
-0.11370471119880676,
-0.12502580881118774,
-0.33865344524383545,
-0.20431619882583618,
-0.05277862399816513,
0.08084909617900848,
0.02885863557457924,
0.25234824419021606,
-0.20699605345726013,
0.002637188881635666,
-0.29183146357536316,
-0.1399933397769928,
0.5058479309082031,
-0.2566274106502533,
-0.33747851848602295,
0.463157594203949,
0.09772656857967377,
-0.09070710837841034,
-0.14748725295066833,
-0.18635156750679016,
-0.013412018306553364,
-0.14560595154762268,
0.09082380682229996,
0.011975142173469067,
0.1186041384935379,
-0.2104351818561554,
-0.02443285658955574,
0.254863440990448,
-0.16837963461875916,
0.04672449454665184,
-0.5118242502212524,
-0.40717101097106934,
0.27180010080337524,
-0.2288029044866562,
0.19139236211776733,
0.0034555047750473022,
-0.08716949820518494,
0.17305608093738556,
-0.26812490820884705,
-0.25922277569770813,
0.14714011549949646,
-0.442264199256897,
-0.2400079369544983,
0.24118012189865112,
-0.19608306884765625,
0.43214887380599976,
0.0995832234621048,
0.19839414954185486,
-0.03726053237915039,
-0.22936490178108215,
-0.18169766664505005,
0.07836614549160004,
0.1327115297317505,
0.1031489148736,
-0.40426310896873474,
0.06594603508710861,
-0.09052810817956924,
-0.10134287178516388,
-0.14431683719158173,
0.014554157853126526,
0.2522517740726471,
0.14825546741485596,
-0.27150943875312805,
0.14246535301208496,
0.04337535798549652,
-0.1513761579990387,
0.03128477931022644,
0.15409480035305023,
0.38584059476852417,
0.10714744031429291,
0.03854021430015564,
-0.012002618052065372,
0.042149901390075684,
-0.194707989692688,
0.028846032917499542,
0.03667205199599266,
0.11144018918275833,
0.5246021151542664,
-0.263003945350647,
0.06884430348873138,
0.17333504557609558,
0.2766213119029999,
0.3434120714664459,
-0.39332282543182373,
-0.050462447106838226,
0.08611129224300385,
0.18868626654148102,
-0.10052578151226044,
-0.040939126163721085,
0.11581335961818695,
-0.020030487328767776,
-0.05304324999451637,
0.07526391744613647,
0.02758491411805153,
0.026258297264575958,
0.19388318061828613,
0.030388426035642624,
0.4034171402454376,
0.013263821601867676,
0.01824124902486801,
-0.06863729655742645,
-0.1445126235485077,
0.0048209428787231445,
0.3360903859138489,
0.13439348340034485,
0.3272196054458618,
0.4190324544906616,
-0.1450161635875702,
-0.09873633086681366,
-0.38559234142303467,
0.2788905203342438,
-0.2114676535129547,
-0.43355175852775574,
-0.2508142590522766,
0.2423277497291565,
-0.3047327399253845,
0.22477781772613525,
-0.24355798959732056,
0.23780879378318787,
-0.41409552097320557,
0.2134465128183365,
-0.2503338158130646,
0.013956332579255104,
-0.03813739866018295,
-0.12027345597743988,
0.04608584940433502,
-0.19289946556091309,
-0.1554577648639679,
0.02922510728240013,
-0.07733030617237091,
-0.1959446519613266,
0.16730882227420807,
-0.10129855573177338,
-0.1600542813539505,
-0.2908317446708679,
0.14891499280929565,
0.058504894375801086,
0.10585543513298035,
-0.25690850615501404,
0.5002363920211792,
0.1337183713912964,
-0.12366890907287598,
0.2592601180076599,
0.254757821559906,
0.39218273758888245,
0.23541787266731262,
-0.05636172369122505,
0.11878132820129395,
-0.15208156406879425,
-0.1580701619386673,
-0.16493827104568481,
0.22200588881969452,
0.2826266586780548,
-0.23992641270160675,
0.4083402156829834,
0.2201502025127411,
-0.1681927591562271,
0.3380623757839203,
-0.019094835966825485,
0.43724319338798523,
-0.21333234012126923,
0.319217711687088,
-0.37805837392807007,
0.0575314536690712,
-0.31014955043792725,
-0.08322782069444656,
-0.576059103012085,
-0.25307270884513855,
-0.163516566157341,
-0.10167232900857925,
0.16173803806304932,
-0.013818803243339062,
0.0595092698931694,
0.04802851378917694,
0.3779023587703705,
0.4761713743209839,
0.19667765498161316,
-0.2976576089859009,
-0.2617686986923218,
-0.5369642972946167,
0.08451207727193832,
-0.07444266974925995,
0.04078644514083862,
-0.012641666457057,
0.32527604699134827,
-0.14348599314689636,
0.11793257296085358,
0.17049771547317505,
0.17507021129131317,
-0.20177465677261353,
0.11899743229150772,
-0.2758837342262268,
-0.4163702726364136,
-0.035489730536937714,
0.12372905761003494,
-0.09251052886247635,
-0.16201399266719818,
0.18151171505451202,
-0.28842291235923767,
-0.007548607885837555,
0.006305234506726265,
0.12648995220661163,
0.03038402646780014,
-0.027979500591754913,
0.46885207295417786,
0.17193691432476044,
0.4205750524997711,
0.10914292186498642,
-0.25002989172935486,
-0.32995495200157166,
-0.19939890503883362,
-0.028910785913467407,
0.011775635182857513,
-0.05939042195677757,
0.45646893978118896,
-0.029386702924966812,
0.02858826518058777,
-0.2617824673652649,
0.1135849878191948,
-0.07305807620286942,
-0.16770794987678528,
0.018492838367819786,
-0.10896595567464828,
0.02204107493162155,
0.1403104066848755,
-0.0012171855196356773,
0.35014772415161133,
0.05030624568462372,
0.22214259207248688,
-0.09469525516033173,
-0.15746229887008667,
0.5106205940246582,
-0.07122857123613358,
-0.2704927623271942,
0.21544703841209412,
0.005209967494010925,
-0.061778388917446136,
-0.002032337710261345,
-0.36094000935554504,
0.20563599467277527,
0.4209411144256592,
0.07986575365066528,
-0.15651051700115204,
0.07978782057762146,
-0.1106192022562027,
-0.06912760436534882,
-0.11450421810150146,
0.22457343339920044,
-0.10460538417100906,
-0.11415310204029083,
0.05216267332434654,
0.07297991216182709
] |
https://github.com/huggingface/datasets/issues/2211 | Getting checksum error when trying to load lc_quad dataset | Hi,
I've already opened a PR with the fix. If you are in a hurry, just build the project from source and run:
```bash
datasets-cli test datasets/lc_quad --save_infos --all_configs --ignore_verifications
```
| I'm having issues loading the [lc_quad](https://huggingface.co/datasets/fquad) dataset by running:
```Python
lc_quad = load_dataset("lc_quad")
```
which is giving me the following error:
```
Using custom data configuration default
Downloading and preparing dataset lc_quad/default (download: 3.69 MiB, generated: 19.77 MiB, post-processed: Unknown size, total: 23.46 MiB) to /root/.cache/huggingface/datasets/lc_quad/default/2.0.0/5a98fe174603f5dec6df07edf1c2b4d2317210d2ad61f5a393839bca4d64e5a7...
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-42-404ace83f73c> in <module>()
----> 1 lc_quad = load_dataset("lc_quad")
3 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
37 if len(bad_urls) > 0:
38 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls))
40 logger.info("All the checksums matched successfully" + for_verification_name)
41
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/AskNowQA/LC-QuAD2.0/archive/master.zip']
```
Does anyone know why this could be and how I fix it? | 31 | Getting checksum error when trying to load lc_quad dataset
I'm having issues loading the [lc_quad](https://huggingface.co/datasets/fquad) dataset by running:
```Python
lc_quad = load_dataset("lc_quad")
```
which is giving me the following error:
```
Using custom data configuration default
Downloading and preparing dataset lc_quad/default (download: 3.69 MiB, generated: 19.77 MiB, post-processed: Unknown size, total: 23.46 MiB) to /root/.cache/huggingface/datasets/lc_quad/default/2.0.0/5a98fe174603f5dec6df07edf1c2b4d2317210d2ad61f5a393839bca4d64e5a7...
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-42-404ace83f73c> in <module>()
----> 1 lc_quad = load_dataset("lc_quad")
3 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
37 if len(bad_urls) > 0:
38 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls))
40 logger.info("All the checksums matched successfully" + for_verification_name)
41
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/AskNowQA/LC-QuAD2.0/archive/master.zip']
```
Does anyone know why this could be and how I fix it?
Hi,
I've already opened a PR with the fix. If you are in a hurry, just build the project from source and run:
```bash
datasets-cli test datasets/lc_quad --save_infos --all_configs --ignore_verifications
```
| [
-0.15864749252796173,
0.04307924211025238,
-0.03402415290474892,
0.3563593626022339,
0.26776695251464844,
0.01472889631986618,
0.0714033916592598,
0.24690215289592743,
0.3710915744304657,
-0.042273297905921936,
-0.10491635650396347,
0.06774535775184631,
-0.037776172161102295,
0.07531483471393585,
-0.22802816331386566,
0.2225683480501175,
0.05363490805029869,
0.04276230186223984,
-0.07529731094837189,
0.06355094909667969,
-0.2016301304101944,
0.2370712012052536,
-0.08427439630031586,
-0.2540155053138733,
-0.22986556589603424,
0.022695042192935944,
0.20535817742347717,
0.45230770111083984,
-0.2846861183643341,
-0.23421989381313324,
0.29580023884773254,
0.2990629971027374,
0.1777927279472351,
0.3523063063621521,
-0.00011558787809917703,
0.10171738266944885,
0.3779892921447754,
-0.1899462193250656,
-0.3943248689174652,
-0.07758647203445435,
-0.2616366446018219,
-0.10559771955013275,
0.10519062727689743,
-0.17571520805358887,
0.06756854057312012,
0.3183242678642273,
-0.17553496360778809,
-0.18608146905899048,
0.12014716863632202,
0.03136555477976799,
0.2525502145290375,
0.6949156522750854,
0.07699161767959595,
0.08213229477405548,
-0.017310939729213715,
-0.06658835709095001,
0.018137330189347267,
0.6490389108657837,
0.20403467118740082,
-0.1024489551782608,
-0.043926335871219635,
0.1912635713815689,
-0.053561463952064514,
0.11197629570960999,
0.17166918516159058,
-0.1965046226978302,
-0.0742645338177681,
-0.0029104948043823242,
0.20490595698356628,
0.2949051260948181,
0.41160261631011963,
-0.3542962074279785,
-0.41427889466285706,
-0.05785161256790161,
0.06588906049728394,
-0.19240997731685638,
0.3854559659957886,
0.21963629126548767,
-0.20246556401252747,
-0.10568146407604218,
-0.3435884714126587,
0.005774966441094875,
0.11718586087226868,
0.14375901222229004,
0.027493134140968323,
0.013322986662387848,
0.011992188170552254,
0.04334805905818939,
0.17419148981571198,
-0.14445729553699493,
-0.18357567489147186,
-0.01993432641029358,
-0.20334486663341522,
0.22623752057552338,
-0.44415199756622314,
-0.02807399071753025,
-0.05383717268705368,
0.5078673362731934,
0.16149696707725525,
0.5987933874130249,
0.11146387457847595,
0.23445183038711548,
-0.11417590081691742,
0.13113923370838165,
0.06411078572273254,
0.17645879089832306,
0.08138612657785416,
0.2512378990650177,
0.10253798216581345,
0.5696992874145508,
-0.11246612668037415,
-0.016184791922569275,
-0.1434006541967392,
-0.06700798124074936,
0.020458873361349106,
0.0047424547374248505,
0.16832983493804932,
-0.5566786527633667,
-0.2990567982196808,
0.41568613052368164,
0.1240060105919838,
-0.04894969239830971,
0.4083915650844574,
0.4536544978618622,
-0.11488142609596252,
0.07885396480560303,
0.02557973563671112,
0.059211649000644684,
-0.2122119665145874,
0.0015809517353773117,
-0.20949189364910126,
0.09504924714565277,
-0.109906405210495,
0.17470766603946686,
0.33242160081863403,
-0.21246545016765594,
0.39456772804260254,
-0.12542428076267242,
0.554668664932251,
-0.08241045475006104,
0.01684410683810711,
-0.07951478660106659,
-0.21769759058952332,
0.3631320595741272,
-0.12681593000888824,
0.009950665757060051,
0.40289294719696045,
-0.07561508566141129,
-0.23881253600120544,
-0.08738010376691818,
-0.18640166521072388,
-0.18965087831020355,
-0.24780090153217316,
0.14766891300678253,
-0.44576042890548706,
-0.007319319993257523,
-0.10046356171369553,
-0.43108072876930237,
0.3045097291469574,
-0.3342055082321167,
0.023388691246509552,
-0.12735356390476227,
-0.12987130880355835,
-0.19213862717151642,
0.2523179054260254,
0.3476816415786743,
-0.2570973038673401,
-0.042105160653591156,
0.0052067372016608715,
-0.28238123655319214,
0.19144997000694275,
0.2836832106113434,
-0.08533614873886108,
0.018048107624053955,
-0.2128903865814209,
-0.11548921465873718,
0.044089265167713165,
-0.31359928846359253,
-0.6612858176231384,
0.10548515617847443,
0.20836345851421356,
0.2534277141094208,
-0.16292786598205566,
0.07606576383113861,
-0.1316620111465454,
-0.07557730376720428,
0.027635350823402405,
-0.0193062424659729,
0.0347144678235054,
0.014775363728404045,
-0.2605694830417633,
-0.17140749096870422,
0.12948864698410034,
0.27030259370803833,
-0.09755788743495941,
-0.07966475933790207,
0.09135708957910538,
0.026903003454208374,
0.195573091506958,
-0.08155639469623566,
-0.12714636325836182,
0.141021728515625,
0.4066483676433563,
0.008842505514621735,
0.012413255870342255,
-0.1226477399468422,
-0.5203521847724915,
0.41840860247612,
-0.17589835822582245,
0.10549919307231903,
-0.3010838031768799,
0.012375608086585999,
-0.39932888746261597,
-0.007708186283707619,
-0.25256815552711487,
0.04247192293405533,
0.09123249351978302,
0.1547878384590149,
0.1401318907737732,
-0.01843162626028061,
-0.2219923883676529,
0.1539941281080246,
-0.402622789144516,
0.1927552968263626,
-0.4083479046821594,
0.43890252709388733,
0.14841578900814056,
-0.08117265999317169,
0.06491559743881226,
0.29873985052108765,
0.044004954397678375,
0.06888553500175476,
-0.18301358819007874,
0.3952319920063019,
0.32929086685180664,
-0.004688888788223267,
0.16856038570404053,
0.26852548122406006,
-0.025805199518799782,
-0.17212750017642975,
-0.05558878183364868,
0.217535600066185,
0.1912802755832672,
-0.03387212008237839,
-0.03837718814611435,
0.4533184766769409,
-0.14716953039169312,
0.08755849301815033,
-0.04939156398177147,
0.019879037514328957,
0.21208545565605164,
-0.03754853457212448,
-0.24793994426727295,
-0.2896394729614258,
0.35427308082580566,
0.3663351535797119,
0.23949302732944489,
0.0791933536529541,
-0.03664055094122887,
-0.27232393622398376,
-0.03872689977288246,
0.03693554177880287,
-0.05355219542980194,
0.003364168107509613,
0.21768343448638916,
0.053117215633392334,
0.16531191766262054,
0.31183886528015137,
0.3474901616573334,
-0.009286225773394108,
-0.05353930965065956,
0.2015192210674286,
-0.3057135343551636,
-0.012072712182998657,
-0.06082829087972641,
0.0010351911187171936,
0.08913532644510269,
0.295710027217865,
0.023562762886285782,
-0.025752712041139603,
-0.3373190760612488,
-0.11051240563392639,
0.025347722694277763,
0.32050621509552,
-0.3456208407878876,
0.07413548976182938,
-0.3163040280342102,
-0.197553813457489,
-0.1722879856824875,
-0.2486700564622879,
-0.49376118183135986,
-0.45429420471191406,
-0.16397583484649658,
0.28791332244873047,
0.025969602167606354,
0.13995453715324402,
-0.5169955492019653,
0.13624699413776398,
0.09005403518676758,
-0.512043297290802,
0.09272196888923645,
-0.1727410852909088,
-0.02364698424935341,
0.014102522283792496,
0.5645958781242371,
0.02056308463215828,
0.4354996383190155,
-0.16276110708713531,
-0.027611196041107178,
-0.34283238649368286,
-0.16819502413272858,
-0.03287936747074127,
-0.11444167792797089,
0.24179454147815704,
0.2336488515138626,
0.24277284741401672,
-0.12691336870193481,
-0.21963495016098022,
0.3777877986431122,
0.13189734518527985,
-0.23115263879299164,
0.12861469388008118,
-0.16106054186820984,
-0.13134866952896118,
-0.06049443781375885,
0.27557966113090515,
-0.10980398207902908,
-0.30194738507270813,
-0.0892820805311203,
0.17581452429294586,
0.09269250929355621,
-0.04394104704260826,
-0.08295714855194092,
0.12235377728939056,
-0.04655856639146805,
0.08103957772254944,
-0.3157860338687897,
-0.6449921131134033,
0.3277231752872467,
-0.04724990203976631,
-0.32491567730903625,
0.002267889678478241,
-0.05872290953993797,
0.49907568097114563,
0.05362894758582115,
-0.43974143266677856,
-0.34549134969711304,
-0.17742283642292023,
0.24910587072372437,
0.08348546922206879,
-0.00038454681634902954,
0.08181245625019073,
-0.16770678758621216,
0.054743848741054535,
-0.09448733925819397,
-0.2528228759765625,
-0.11471646279096603,
-0.05077704042196274,
0.5432263016700745,
-0.10264433175325394,
0.215241938829422,
-0.10300415754318237,
0.6116772294044495,
0.4520658254623413,
-0.07814021408557892,
0.37940698862075806,
0.045016296207904816,
0.4519749879837036,
-0.11605352908372879,
-0.33573925495147705,
0.09716533869504929,
-0.16121616959571838,
-0.08479966223239899,
0.025214850902557373,
0.02927122823894024,
0.02473454549908638,
-0.25151339173316956,
0.15191586315631866,
-0.25038376450538635,
-0.2537183463573456,
0.04101134091615677,
-0.16209669411182404,
0.12883824110031128,
-0.0400337353348732,
0.08692807704210281,
-0.038005031645298004,
-0.3001149296760559,
0.09179668128490448,
0.41216617822647095,
-0.10287722200155258,
-0.12346187978982925,
-0.4588959813117981,
-0.2496635764837265,
-0.26859068870544434,
0.32703518867492676,
0.21616128087043762,
0.4495322108268738,
-0.015047825872898102,
-0.20563066005706787,
-0.0443214476108551,
-0.1235327199101448,
0.1489134430885315,
0.039037592709064484,
0.08330903947353363,
0.2485014796257019,
-0.14710643887519836,
-0.3670145869255066,
-0.15970079600811005,
0.03441573306918144,
0.18187206983566284,
0.17988695204257965,
0.3147478699684143,
-0.4724257290363312,
0.06753166764974594,
-0.04333747923374176,
0.2448166161775589,
-0.21455973386764526,
-0.31092703342437744,
-0.5248871445655823,
-0.2773878872394562,
-0.5080868601799011,
-0.06729734688997269,
-0.24000686407089233,
0.43258580565452576,
0.10744190961122513,
0.3124436140060425,
0.23488633334636688,
-0.1548350751399994,
0.381173312664032,
0.2378399521112442,
0.326514333486557,
0.13570162653923035,
0.17444664239883423,
0.04112813249230385,
-0.02493482083082199,
0.062266379594802856,
0.9562075138092041,
-0.21174432337284088,
-0.2108049988746643,
-0.035291071981191635,
0.12483488023281097,
-0.08984638005495071,
0.14835873246192932,
-0.019494201987981796,
-0.016093753278255463,
0.4172474443912506,
-0.02262890338897705,
-0.21425554156303406,
0.02405107393860817,
-0.10161406546831131,
-0.04306724667549133,
-0.3212282061576843,
-0.12703195214271545,
0.16379326581954956,
-0.24818123877048492,
0.10208176076412201,
0.5275672674179077,
0.12733791768550873,
-0.001774572767317295,
0.010643770918250084,
0.19589319825172424,
0.7999646663665771,
-0.06796756386756897,
0.04869142547249794,
0.4638364613056183,
-0.09422916173934937,
0.12788835167884827,
0.26727283000946045,
-0.16252730786800385,
-0.3938177525997162,
-0.29190728068351746,
-0.0014132186770439148,
-0.12527695298194885,
0.18841351568698883,
-0.15738971531391144,
0.034952934831380844,
0.2362203299999237,
-0.1836351901292801,
0.03611498698592186,
0.052051231265068054,
0.22758466005325317,
-0.27099645137786865,
-0.21567825973033905,
-0.34387272596359253,
0.1822005808353424,
-0.11963391304016113,
0.2140205204486847,
-0.20560848712921143,
0.13369756937026978,
-0.08458283543586731,
-0.24328115582466125,
-0.4584518074989319,
0.08267048746347427,
-0.1393231451511383,
0.24792958796024323,
0.5432109236717224,
-0.011649928987026215,
-0.11050882935523987,
0.05106860771775246,
0.13976657390594482,
0.17088888585567474,
-0.32022425532341003,
0.17600017786026,
0.20947536826133728,
-0.02659446932375431,
0.004473268520087004,
-0.010837549343705177,
0.3899160325527191,
-0.1165587306022644,
-0.11281008273363113,
0.031387027353048325,
0.05394062399864197,
-0.4626781940460205,
0.15814071893692017,
-0.1413085162639618,
-0.13398435711860657,
-0.41257426142692566,
-0.31863847374916077,
-0.20783337950706482,
0.0848618894815445,
-0.10352262854576111,
0.11939094960689545,
0.41593772172927856,
-0.07391394674777985,
0.05337432399392128,
0.15962572395801544,
-0.24783486127853394,
-0.10746602714061737,
0.40956801176071167,
-0.24467742443084717,
-0.31351783871650696,
0.4543261229991913,
0.07231946289539337,
-0.17845109105110168,
-0.1679847240447998,
-0.020406026393175125,
-0.04499305412173271,
-0.37314707040786743,
0.06168096140027046,
-0.02452326938509941,
-0.04044235497713089,
-0.1267801970243454,
0.3055098056793213,
0.4896070957183838,
-0.009683318436145782,
0.28475338220596313,
-0.7144518494606018,
-0.3556798994541168,
0.23667758703231812,
-0.054641205817461014,
0.2952449917793274,
-0.25261160731315613,
0.13853424787521362,
-0.2104964405298233,
0.0593770369887352,
-0.281697154045105,
0.02307872287929058,
-0.4564668834209442,
-0.08378806710243225,
0.1001635491847992,
-0.012725070118904114,
0.2614644765853882,
0.03498516604304314,
0.17425546050071716,
0.05477799475193024,
-0.3107985258102417,
-0.1835143268108368,
-0.2588793635368347,
0.11224252730607986,
0.12092802673578262,
-0.2806803584098816,
0.13476689159870148,
0.032040853053331375,
0.0065013449639081955,
-0.18691913783550262,
-0.041054993867874146,
0.10591665655374527,
-0.10526877641677856,
0.24432514607906342,
0.2662097215652466,
-0.044394560158252716,
-0.2006896585226059,
0.16063758730888367,
-0.0766751617193222,
0.07617010921239853,
0.2360353171825409,
-0.07328888028860092,
-0.10391480475664139,
0.006203308701515198,
0.09631695598363876,
0.18534952402114868,
0.001875370740890503,
-0.15336716175079346,
0.3341060280799866,
-0.14588448405265808,
0.06895230710506439,
0.21386513113975525,
0.36722278594970703,
0.23465661704540253,
-0.3093518614768982,
0.0030955076217651367,
0.27685895562171936,
0.15737177431583405,
-0.22052915394306183,
0.015506244264543056,
0.28035926818847656,
0.22460593283176422,
0.022531654685735703,
0.22795894742012024,
0.03566129878163338,
-0.2950283885002136,
0.3212127089500427,
-0.07227356731891632,
0.2576579451560974,
-0.19078576564788818,
0.15275731682777405,
-0.006317663937807083,
-0.05565274879336357,
-0.0287509523332119,
0.10480160266160965,
-0.1620068997144699,
-0.04598730057477951,
-0.03544384986162186,
-0.13784363865852356,
0.17576450109481812,
-0.2960182726383209,
0.1769876480102539,
-0.1391240358352661,
-0.6813552379608154,
0.3512978255748749,
0.14528225362300873,
0.00031711161136627197,
0.08171528577804565,
-0.033792756497859955,
0.3823232650756836,
-0.24430198967456818,
0.1538819521665573,
-0.45365387201309204,
0.11969782412052155,
-0.13721010088920593,
-0.15358954668045044,
-0.2521292269229889,
-0.2382505238056183,
0.104942187666893,
0.12020869553089142,
-0.015179213136434555,
-0.10482361912727356,
0.10127069801092148,
0.09775905311107635,
-0.1928470879793167,
-0.46560922265052795,
-0.19103571772575378,
0.1723296046257019,
-0.07449766248464584,
-0.17905370891094208,
0.3651692271232605,
0.25013893842697144,
0.055122144520282745,
0.3380270302295685,
0.1576622873544693,
0.4646582305431366,
0.3421230912208557,
0.1389380544424057,
-0.027324743568897247,
-0.13920380175113678,
0.169789120554924,
-0.049210283905267715,
0.6106898188591003,
0.11711175739765167,
0.0790216326713562,
0.47969120740890503,
0.1567838490009308,
-0.12005597352981567,
-0.1497461199760437,
-0.20362673699855804,
0.045873887836933136,
-0.053659625351428986,
0.32993102073669434,
-0.16484829783439636,
0.2859272062778473,
-0.23207798600196838,
0.28326818346977234,
-0.4769470989704132,
-0.13199551403522491,
-0.005283378064632416,
0.1365714818239212,
0.2171821892261505,
0.0867338478565216,
0.05269543081521988,
-0.12518803775310516,
0.6108254790306091,
0.4797273576259613,
0.21954649686813354,
-0.2921738922595978,
-0.3415738344192505,
-0.8700946569442749,
0.3062993288040161,
0.00011589750647544861,
-0.29730141162872314,
0.1456144005060196,
0.16201962530612946,
0.02356889843940735,
0.2645163834095001,
0.213107168674469,
-0.17989806830883026,
-0.03520921990275383,
-0.19011838734149933,
-0.10124132037162781,
-0.11033475399017334,
-0.10843658447265625,
-0.2594901919364929,
-0.15121164917945862,
-0.2713238000869751,
0.06400343775749207,
0.1597411334514618,
0.07733812183141708,
0.05114694684743881,
-0.31963640451431274,
-0.18656860291957855,
0.24595798552036285,
0.03649520501494408,
0.14742982387542725,
0.7800112962722778,
0.054971322417259216,
-0.1918807178735733,
-0.1947786808013916,
-0.15341193974018097,
0.05712943151593208,
0.12692615389823914,
-0.13366125524044037,
0.5662147998809814,
0.12439019232988358,
0.1683935821056366,
-0.29833102226257324,
0.7553343176841736,
0.1155049055814743,
-0.461426317691803,
-0.29761090874671936,
0.10960663855075836,
-0.025911688804626465,
0.0050340876914560795,
0.014806817285716534,
0.3162670433521271,
0.02501026913523674,
0.5059559345245361,
0.005406387150287628,
-0.14605924487113953,
0.709022045135498,
-0.3143613040447235,
-0.14430731534957886,
0.027750711888074875,
0.1365537941455841,
-0.29226306080818176,
-0.14829027652740479,
-0.7186961770057678,
0.12364613264799118,
0.1957414597272873,
0.023848488926887512,
-0.13058573007583618,
0.2036418616771698,
-0.18526461720466614,
0.1725730150938034,
-0.099489726126194,
0.1660660356283188,
-0.16302672028541565,
-0.15235961973667145,
0.027093950659036636,
-0.04991847276687622
] |
https://github.com/huggingface/datasets/issues/2210 | dataloading slow when using HUGE dataset | Hi ! Yes this is an issue with `datasets<=1.5.0`
This issue has been fixed by #2122 , we'll do a new release soon :)
For now you can test it on the `master` branch. | Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
| 34 | dataloading slow when using HUGE dataset
Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
Hi ! Yes this is an issue with `datasets<=1.5.0`
This issue has been fixed by #2122 , we'll do a new release soon :)
For now you can test it on the `master` branch. | [
-0.525672197341919,
-0.21354715526103973,
-0.06311195343732834,
0.28325048089027405,
0.1389210969209671,
-0.027784332633018494,
0.15010304749011993,
0.23279769718647003,
-0.15769286453723907,
-0.09218953549861908,
-0.11914964020252228,
0.14390546083450317,
-0.14865955710411072,
-0.182308167219162,
-0.02395903319120407,
-0.1902337521314621,
-0.035115666687488556,
0.04410814121365547,
-0.3937166929244995,
-0.09542110562324524,
0.16099989414215088,
-0.35501834750175476,
-0.035187773406505585,
-0.19418402016162872,
-0.5536121726036072,
-0.09152237325906754,
0.14960364997386932,
0.10789340734481812,
-0.03397803753614426,
-0.10500682145357132,
0.2057129293680191,
0.09889793395996094,
0.22475410997867584,
0.5077370405197144,
-0.00011809993884526193,
-0.024402495473623276,
0.276843786239624,
0.11527955532073975,
-0.3997972309589386,
0.32425135374069214,
-0.16002428531646729,
-0.4594142735004425,
-0.05355764925479889,
-0.062167249619960785,
0.09568094462156296,
-0.1884867250919342,
-0.183047354221344,
-0.09938731044530869,
0.17568626999855042,
0.21296007931232452,
0.11890695989131927,
0.15777787566184998,
-0.5473755598068237,
-0.0984988585114479,
0.2143142819404602,
0.25669580698013306,
-0.07037436962127686,
0.48078909516334534,
0.5785632133483887,
-0.1316341906785965,
-0.4877018332481384,
0.027680372819304466,
-0.10571274906396866,
0.2025335133075714,
0.1750495284795761,
-0.14795032143592834,
-0.015790000557899475,
-0.01792227104306221,
0.3070146143436432,
0.30414241552352905,
0.574791669845581,
-0.06303555518388748,
-0.03416139632463455,
-0.4913969039916992,
-0.18593288958072662,
-0.14629647135734558,
-0.16166725754737854,
0.11838015913963318,
-0.2198842316865921,
-0.10530045628547668,
-0.5135319232940674,
-0.029087498784065247,
-0.14251956343650818,
-0.07439731061458588,
-0.11103348433971405,
0.15625163912773132,
0.08465759456157684,
0.1382816731929779,
0.1856726109981537,
-0.08276677876710892,
0.2695870101451874,
-0.25616639852523804,
0.14055505394935608,
0.07538124173879623,
-0.43881332874298096,
-0.07287730276584625,
0.0968034416437149,
-0.16860568523406982,
0.14574593305587769,
0.18577739596366882,
-0.001971515826880932,
0.11452456563711166,
0.3466458022594452,
-0.15272784233093262,
0.3864690065383911,
0.2220081090927124,
-0.28230947256088257,
0.1429654061794281,
0.2121453732252121,
-0.11112359911203384,
-0.08883237838745117,
0.18051353096961975,
-0.13737750053405762,
-0.07155833393335342,
0.2868856191635132,
-0.3479175865650177,
-0.24488398432731628,
-0.03685386851429939,
-0.13117247819900513,
-0.1438368558883667,
-0.021616196259856224,
-0.07310646027326584,
0.3328079879283905,
0.3250093162059784,
-0.27696967124938965,
0.19848647713661194,
-0.3478924036026001,
-0.09236931055784225,
-0.14563637971878052,
-0.03978343307971954,
-0.2537195682525635,
-0.3621108829975128,
-0.22694292664527893,
0.13697358965873718,
0.3024577498435974,
0.2183675765991211,
0.08347634226083755,
0.11285626143217087,
0.03929784148931503,
0.03822620213031769,
-0.0897478237748146,
-0.23229007422924042,
-0.14282923936843872,
0.18948307633399963,
-0.25748705863952637,
0.172670379281044,
-0.128473162651062,
0.5436839461326599,
-0.1996116042137146,
0.4038343131542206,
-0.3958272337913513,
-0.503907322883606,
-0.09045489877462387,
0.1511756181716919,
-0.11054747551679611,
-0.09730030596256256,
-0.43316999077796936,
0.1526714712381363,
0.08729647099971771,
-0.13162708282470703,
-0.06762316077947617,
-0.3260263204574585,
-0.06060654670000076,
0.0065886834636330605,
0.10860910266637802,
0.2436363399028778,
-0.1952826827764511,
-0.11479480564594269,
0.3166126608848572,
0.1327330321073532,
0.28608813881874084,
0.505369246006012,
-0.5788225531578064,
0.3097115755081177,
-0.06627128273248672,
-0.41815996170043945,
0.35170361399650574,
-0.22869516909122467,
-0.7667884230613708,
0.4073597192764282,
-0.29224729537963867,
0.11289583891630173,
0.34798312187194824,
0.3371129631996155,
0.46918317675590515,
-0.17388135194778442,
0.30767956376075745,
0.6321916580200195,
-0.03911568224430084,
0.2640082836151123,
-0.27447184920310974,
0.06764107942581177,
0.07707129418849945,
0.4343068301677704,
0.04854367673397064,
-0.05261247605085373,
0.14569419622421265,
0.3421172797679901,
0.3252030611038208,
-0.048441920429468155,
-0.18155324459075928,
0.23155002295970917,
-0.1892007738351822,
-0.07104335725307465,
0.07501406222581863,
0.09524490684270859,
-0.5350973010063171,
0.3407515585422516,
-0.1621401309967041,
-0.3661986291408539,
0.04734645038843155,
-0.03978249430656433,
0.011851578950881958,
-0.014292033389210701,
-0.23459939658641815,
-0.012934226542711258,
-0.09385032951831818,
0.03166374936699867,
0.3591996133327484,
-0.024713706225156784,
0.25862452387809753,
0.15601849555969238,
-0.3389984965324402,
0.016394227743148804,
-0.01876271888613701,
0.01163855753839016,
0.3819456696510315,
0.03316948935389519,
-0.09020312130451202,
0.13164947926998138,
0.01780829206109047,
-0.1747743934392929,
-0.14382869005203247,
0.012032918632030487,
0.05681765452027321,
0.021133489906787872,
-0.017480798065662384,
0.2743740975856781,
0.1342589110136032,
0.13596434891223907,
0.3300762474536896,
-0.12672722339630127,
0.11509295552968979,
-0.39053449034690857,
-0.25075024366378784,
0.26842373609542847,
0.050588615238666534,
0.37142229080200195,
0.21743245422840118,
-0.44886258244514465,
0.19811536371707916,
0.03610086068511009,
0.25605180859565735,
0.30126282572746277,
0.3356688320636749,
0.03939623385667801,
0.6574735045433044,
0.2751370072364807,
-0.08018714934587479,
-0.022825509309768677,
0.15762333571910858,
-0.40384989976882935,
-0.15377876162528992,
0.17299622297286987,
-0.3585532605648041,
-0.32928335666656494,
0.051967889070510864,
0.03205901011824608,
0.47859054803848267,
0.24947069585323334,
0.22822323441505432,
-0.3006324768066406,
0.22242233157157898,
-0.2358570247888565,
0.11768190562725067,
0.1153726652264595,
0.18143099546432495,
0.11380520462989807,
0.3615714907646179,
-0.08311575651168823,
-0.18523594737052917,
-0.15500780940055847,
0.27033114433288574,
0.2636871933937073,
0.04844913259148598,
0.3658839464187622,
-0.0708063393831253,
-0.13363966345787048,
-0.19875837862491608,
0.08706210553646088,
-0.0340278260409832,
-0.1547110229730606,
-0.04230918735265732,
0.29431629180908203,
0.114670529961586,
-0.04283387213945389,
0.05742514505982399,
0.30877119302749634,
0.1741381138563156,
-0.5386884212493896,
-0.03884590417146683,
-0.20468688011169434,
-0.3223606050014496,
0.06532999873161316,
0.19158786535263062,
-0.3348333239555359,
0.3808289170265198,
0.21251104772090912,
0.018071889877319336,
-0.11696261912584305,
-0.12107031792402267,
0.09962041676044464,
0.13401997089385986,
-0.1610570251941681,
-0.37776175141334534,
-0.013924859464168549,
0.24446146190166473,
0.13102369010448456,
0.13978509604930878,
-0.22432047128677368,
0.056504540145397186,
0.1865105926990509,
-0.18615998327732086,
0.0061065424233675,
0.27056869864463806,
0.020120635628700256,
-0.22995352745056152,
-0.2449505627155304,
-0.0008153468370437622,
-0.2585439682006836,
0.11991611123085022,
0.16379691660404205,
0.029889870434999466,
0.17768727242946625,
0.07020793110132217,
0.04825715720653534,
0.016748014837503433,
-0.28873059153556824,
0.17606818675994873,
0.01772918365895748,
-0.24482060968875885,
-0.4982014000415802,
0.022596172988414764,
-0.10012035071849823,
0.5587283968925476,
-0.6936107277870178,
-0.007341997232288122,
-0.4541681110858917,
0.2404499650001526,
-0.1954777091741562,
-0.007244819775223732,
0.0014594942331314087,
-0.27851375937461853,
-0.03013988956809044,
0.1731695532798767,
0.07414063811302185,
-0.16011199355125427,
0.055285535752773285,
0.3070281744003296,
-0.20379355549812317,
0.13712303340435028,
0.20462653040885925,
0.862328827381134,
-0.059799712151288986,
-0.31367141008377075,
0.023449573665857315,
0.05801328271627426,
0.33835676312446594,
-0.1843934953212738,
-0.1994635909795761,
0.27403777837753296,
-0.1152116060256958,
-0.11370128393173218,
0.2909389138221741,
-0.09394793957471848,
-0.37446117401123047,
0.059838876128196716,
-0.19984355568885803,
0.3293922245502472,
-0.09316284209489822,
0.3659176230430603,
-0.2859899699687958,
-0.050608597695827484,
0.034272003918886185,
0.16682901978492737,
-0.1679101139307022,
-0.26019132137298584,
-0.010064198635518551,
-0.22338898479938507,
-0.02593672275543213,
-0.02588600292801857,
0.028082694858312607,
0.18186822533607483,
-0.5656907558441162,
0.15885086357593536,
0.06702402234077454,
0.2626861035823822,
0.1121222972869873,
-0.04086194559931755,
0.3483414053916931,
0.13534341752529144,
0.6014814376831055,
0.2783258557319641,
0.28701311349868774,
-0.17280039191246033,
-0.40355437994003296,
-0.20812049508094788,
-0.07470397651195526,
-0.3570011854171753,
0.30957555770874023,
0.4312022626399994,
0.20414632558822632,
-0.19001504778862,
-0.20054931938648224,
0.08624535799026489,
0.21990655362606049,
-0.16661754250526428,
-0.352946937084198,
-0.1158728301525116,
-0.19159981608390808,
-0.011994422413408756,
0.3463250696659088,
-0.004401929676532745,
0.17427748441696167,
-0.05111408233642578,
-0.05733180791139603,
-0.15156394243240356,
0.2218332588672638,
0.1605648696422577,
0.04362988844513893,
-0.10918091237545013,
0.10684073716402054,
0.1961916983127594,
-0.01221969723701477,
0.3635070025920868,
0.4482749104499817,
0.3003790080547333,
0.026680124923586845,
-0.23496752977371216,
0.1634903848171234,
0.27170345187187195,
0.20007365942001343,
0.3689035177230835,
0.22226910293102264,
-0.08286789804697037,
-0.2962099611759186,
0.2456643432378769,
-0.18497151136398315,
0.23919682204723358,
0.3851581811904907,
-0.020075712352991104,
-0.6416813135147095,
-0.4975689947605133,
0.511085033416748,
0.004521379247307777,
0.019801065325737,
0.22929023206233978,
-0.44144970178604126,
0.012996584177017212,
-0.044841866940259933,
0.019172877073287964,
0.6361576318740845,
-0.1764858216047287,
0.3652835190296173,
-0.012575257569551468,
0.11913932859897614,
0.32684779167175293,
-0.026046793907880783,
0.062402088195085526,
-0.18568086624145508,
-0.05369143933057785,
0.22758494317531586,
-0.26062801480293274,
-0.067839615046978,
0.2028578668832779,
0.33170777559280396,
0.18821819126605988,
-0.13137705624103546,
0.18025726079940796,
0.012878330424427986,
0.4488939344882965,
0.08710484206676483,
-0.21772824227809906,
-0.09229989349842072,
0.14615322649478912,
-0.32340365648269653,
0.04333273321390152,
-0.10081332176923752,
0.03519938141107559,
-0.010129623115062714,
0.028897494077682495,
-0.22352983057498932,
0.10351075977087021,
-0.23099924623966217,
0.4225999712944031,
-0.25150954723358154,
-0.521324634552002,
-0.027056362479925156,
0.07129612565040588,
-0.5702288746833801,
-0.027721945196390152,
-0.06561611592769623,
0.36501508951187134,
-0.2758778929710388,
0.28039416670799255,
0.3480326533317566,
-0.2569480538368225,
0.24516674876213074,
0.010214854031801224,
0.11872398108243942,
0.008951302617788315,
-0.022971706464886665,
-0.33960074186325073,
-0.02721209079027176,
0.36412179470062256,
0.2775535583496094,
-0.07987527549266815,
-0.22563622891902924,
0.012686304748058319,
0.017424214631319046,
-0.09718900173902512,
0.03633469343185425,
0.1916297972202301,
0.012324344366788864,
0.3834533989429474,
-0.030107300728559494,
-0.5099639892578125,
-0.05534755066037178,
0.3252412676811218,
0.20709800720214844,
-0.21568019688129425,
0.3971478044986725,
0.03249901905655861,
-0.19320398569107056,
-0.037440378218889236,
0.24771511554718018,
0.14957694709300995,
-0.3545181155204773,
0.1787433624267578,
-0.06001628562808037,
0.13706190884113312,
0.19398513436317444,
-0.1866597682237625,
-0.08864961564540863,
-0.3123489320278168,
-0.270084023475647,
-0.09554684162139893,
-0.38725417852401733,
-0.15039224922657013,
-0.03669700399041176,
0.0782165452837944,
0.0422225296497345,
-0.12615643441677094,
-0.03742414712905884,
0.43408843874931335,
-0.21029987931251526,
-0.054922282695770264,
0.23920047283172607,
0.05853113532066345,
-0.026586923748254776,
-0.25053632259368896,
0.21385550498962402,
0.004571263678371906,
-0.05615449696779251,
-0.051630787551403046,
0.040830980986356735,
-0.251209557056427,
-0.04737728461623192,
0.1242968812584877,
-0.0042891185730695724,
-0.12024315446615219,
-0.2368970811367035,
-0.3456609845161438,
0.05481189861893654,
-0.2050172984600067,
0.4311218559741974,
0.21758192777633667,
0.01572553813457489,
-0.31404227018356323,
0.30397191643714905,
0.025225304067134857,
-0.026906410232186317,
0.44634610414505005,
-0.14778105914592743,
0.22234338521957397,
0.13586489856243134,
0.06776784360408783,
0.28769657015800476,
-0.24940326809883118,
-0.21286891400814056,
0.011677078902721405,
0.5909909605979919,
-0.1453074812889099,
0.1489439308643341,
-0.30751121044158936,
0.16735219955444336,
-0.0027910424396395683,
0.07255076617002487,
0.3108547031879425,
0.013528093695640564,
-0.41406407952308655,
0.17855232954025269,
0.08687448501586914,
0.039348602294921875,
-0.3019309341907501,
-0.09451209008693695,
-0.03713506832718849,
-0.07661925256252289,
0.13344672322273254,
0.05689200386404991,
0.21924707293510437,
-0.13085636496543884,
-0.130697101354599,
0.26964646577835083,
0.12581536173820496,
-0.047835756093263626,
0.38822704553604126,
0.27315694093704224,
-0.1047925353050232,
0.48768940567970276,
0.3903232216835022,
0.2716769576072693,
0.3355734944343567,
0.10206232219934464,
0.6923543214797974,
0.10553867369890213,
-0.07999400794506073,
0.010803788900375366,
-0.3727954030036926,
-0.15482141077518463,
0.26382386684417725,
-0.16665014624595642,
0.13434439897537231,
-0.19493535161018372,
0.009124122560024261,
-0.19124670326709747,
-0.0653577521443367,
-0.35578039288520813,
-0.026423003524541855,
-0.2079644501209259,
0.005379736423492432,
0.1997799128293991,
0.055140234529972076,
0.21861743927001953,
0.326170414686203,
-0.39420291781425476,
-0.11470414698123932,
-0.05180272459983826,
0.031050659716129303,
-0.1218373030424118,
-0.04921051859855652,
-0.009888272732496262,
0.14167334139347076,
-0.023809269070625305,
-0.11519373953342438,
0.06471266597509384,
-0.0013874396681785583,
-0.07610760629177094,
0.03744152560830116,
0.14948153495788574,
0.2420554757118225,
0.3533019423484802,
0.05890931561589241,
-0.04466903209686279,
0.1265292763710022,
-0.006266815587878227,
-0.18606537580490112,
0.5170601010322571,
0.013847269117832184,
-0.009150363504886627,
0.15258373320102692,
0.0038942471146583557,
-0.21964803338050842,
-0.056968096643686295,
0.02334744483232498,
-0.20859314501285553,
0.03472096472978592,
0.18918198347091675,
0.1516200453042984,
-0.20490270853042603,
-0.2619215250015259,
0.14312882721424103,
-0.20221030712127686,
-0.2747012972831726,
0.38933518528938293,
-0.25304412841796875,
-0.014834216795861721,
-0.007804247550666332,
0.028169341385364532,
-0.30484288930892944,
0.9071149826049805,
0.2623470425605774,
0.3463221490383148,
-0.356427401304245,
0.18675895035266876,
-0.4191631078720093,
0.02399265766143799,
-0.518704354763031,
0.20211873948574066,
0.10430072247982025,
0.23137101531028748,
-0.015256620943546295,
0.137782484292984,
-0.11818040907382965,
0.08121446520090103,
0.012907176278531551,
-0.2207528054714203,
-0.2550099492073059,
-0.0874239057302475,
-0.15494194626808167,
0.07520364224910736,
-0.048137642443180084,
-0.6022772789001465,
0.34467989206314087,
-0.012461556121706963,
-0.015062261372804642,
-0.23600904643535614,
0.040871649980545044,
0.1365882158279419,
0.18097522854804993,
0.24684391915798187,
0.1607687622308731,
0.5449453592300415,
0.22689250111579895,
-0.020175963640213013,
-0.13966085016727448,
0.03068927675485611,
-0.14916087687015533,
0.021876338869333267,
0.028308719396591187,
-0.014898326247930527,
0.03557982295751572,
-0.0963345617055893,
0.10792914777994156,
0.4588613212108612,
-0.04293288290500641,
-0.23952677845954895,
-0.03266846388578415,
-0.3271839916706085,
-0.019035298377275467,
0.2352491170167923,
0.28456389904022217,
0.29601597785949707,
-0.07428033649921417,
-0.18761838972568512,
-0.25344011187553406,
-0.10826003551483154,
0.3916228711605072,
-0.4769769310951233,
-0.22052432596683502,
-0.20208387076854706,
0.3011839985847473,
0.15237632393836975,
0.12600508332252502,
-0.11142441630363464,
0.09430167824029922,
0.18437804281711578,
-0.06396239995956421,
0.0038855671882629395,
0.378155380487442,
-0.2533891499042511,
0.17322446405887604,
-0.1296791285276413,
0.5012323260307312,
-0.16710901260375977,
-0.3956725597381592,
-0.09555286914110184,
-0.13953067362308502
] |
https://github.com/huggingface/datasets/issues/2210 | dataloading slow when using HUGE dataset | Hi, thank you for your answer. I did not realize that my issue stems from the same problem. | Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
| 18 | dataloading slow when using HUGE dataset
Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
Hi, thank you for your answer. I did not realize that my issue stems from the same problem. | [
-0.525672197341919,
-0.21354715526103973,
-0.06311195343732834,
0.28325048089027405,
0.1389210969209671,
-0.027784332633018494,
0.15010304749011993,
0.23279769718647003,
-0.15769286453723907,
-0.09218953549861908,
-0.11914964020252228,
0.14390546083450317,
-0.14865955710411072,
-0.182308167219162,
-0.02395903319120407,
-0.1902337521314621,
-0.035115666687488556,
0.04410814121365547,
-0.3937166929244995,
-0.09542110562324524,
0.16099989414215088,
-0.35501834750175476,
-0.035187773406505585,
-0.19418402016162872,
-0.5536121726036072,
-0.09152237325906754,
0.14960364997386932,
0.10789340734481812,
-0.03397803753614426,
-0.10500682145357132,
0.2057129293680191,
0.09889793395996094,
0.22475410997867584,
0.5077370405197144,
-0.00011809993884526193,
-0.024402495473623276,
0.276843786239624,
0.11527955532073975,
-0.3997972309589386,
0.32425135374069214,
-0.16002428531646729,
-0.4594142735004425,
-0.05355764925479889,
-0.062167249619960785,
0.09568094462156296,
-0.1884867250919342,
-0.183047354221344,
-0.09938731044530869,
0.17568626999855042,
0.21296007931232452,
0.11890695989131927,
0.15777787566184998,
-0.5473755598068237,
-0.0984988585114479,
0.2143142819404602,
0.25669580698013306,
-0.07037436962127686,
0.48078909516334534,
0.5785632133483887,
-0.1316341906785965,
-0.4877018332481384,
0.027680372819304466,
-0.10571274906396866,
0.2025335133075714,
0.1750495284795761,
-0.14795032143592834,
-0.015790000557899475,
-0.01792227104306221,
0.3070146143436432,
0.30414241552352905,
0.574791669845581,
-0.06303555518388748,
-0.03416139632463455,
-0.4913969039916992,
-0.18593288958072662,
-0.14629647135734558,
-0.16166725754737854,
0.11838015913963318,
-0.2198842316865921,
-0.10530045628547668,
-0.5135319232940674,
-0.029087498784065247,
-0.14251956343650818,
-0.07439731061458588,
-0.11103348433971405,
0.15625163912773132,
0.08465759456157684,
0.1382816731929779,
0.1856726109981537,
-0.08276677876710892,
0.2695870101451874,
-0.25616639852523804,
0.14055505394935608,
0.07538124173879623,
-0.43881332874298096,
-0.07287730276584625,
0.0968034416437149,
-0.16860568523406982,
0.14574593305587769,
0.18577739596366882,
-0.001971515826880932,
0.11452456563711166,
0.3466458022594452,
-0.15272784233093262,
0.3864690065383911,
0.2220081090927124,
-0.28230947256088257,
0.1429654061794281,
0.2121453732252121,
-0.11112359911203384,
-0.08883237838745117,
0.18051353096961975,
-0.13737750053405762,
-0.07155833393335342,
0.2868856191635132,
-0.3479175865650177,
-0.24488398432731628,
-0.03685386851429939,
-0.13117247819900513,
-0.1438368558883667,
-0.021616196259856224,
-0.07310646027326584,
0.3328079879283905,
0.3250093162059784,
-0.27696967124938965,
0.19848647713661194,
-0.3478924036026001,
-0.09236931055784225,
-0.14563637971878052,
-0.03978343307971954,
-0.2537195682525635,
-0.3621108829975128,
-0.22694292664527893,
0.13697358965873718,
0.3024577498435974,
0.2183675765991211,
0.08347634226083755,
0.11285626143217087,
0.03929784148931503,
0.03822620213031769,
-0.0897478237748146,
-0.23229007422924042,
-0.14282923936843872,
0.18948307633399963,
-0.25748705863952637,
0.172670379281044,
-0.128473162651062,
0.5436839461326599,
-0.1996116042137146,
0.4038343131542206,
-0.3958272337913513,
-0.503907322883606,
-0.09045489877462387,
0.1511756181716919,
-0.11054747551679611,
-0.09730030596256256,
-0.43316999077796936,
0.1526714712381363,
0.08729647099971771,
-0.13162708282470703,
-0.06762316077947617,
-0.3260263204574585,
-0.06060654670000076,
0.0065886834636330605,
0.10860910266637802,
0.2436363399028778,
-0.1952826827764511,
-0.11479480564594269,
0.3166126608848572,
0.1327330321073532,
0.28608813881874084,
0.505369246006012,
-0.5788225531578064,
0.3097115755081177,
-0.06627128273248672,
-0.41815996170043945,
0.35170361399650574,
-0.22869516909122467,
-0.7667884230613708,
0.4073597192764282,
-0.29224729537963867,
0.11289583891630173,
0.34798312187194824,
0.3371129631996155,
0.46918317675590515,
-0.17388135194778442,
0.30767956376075745,
0.6321916580200195,
-0.03911568224430084,
0.2640082836151123,
-0.27447184920310974,
0.06764107942581177,
0.07707129418849945,
0.4343068301677704,
0.04854367673397064,
-0.05261247605085373,
0.14569419622421265,
0.3421172797679901,
0.3252030611038208,
-0.048441920429468155,
-0.18155324459075928,
0.23155002295970917,
-0.1892007738351822,
-0.07104335725307465,
0.07501406222581863,
0.09524490684270859,
-0.5350973010063171,
0.3407515585422516,
-0.1621401309967041,
-0.3661986291408539,
0.04734645038843155,
-0.03978249430656433,
0.011851578950881958,
-0.014292033389210701,
-0.23459939658641815,
-0.012934226542711258,
-0.09385032951831818,
0.03166374936699867,
0.3591996133327484,
-0.024713706225156784,
0.25862452387809753,
0.15601849555969238,
-0.3389984965324402,
0.016394227743148804,
-0.01876271888613701,
0.01163855753839016,
0.3819456696510315,
0.03316948935389519,
-0.09020312130451202,
0.13164947926998138,
0.01780829206109047,
-0.1747743934392929,
-0.14382869005203247,
0.012032918632030487,
0.05681765452027321,
0.021133489906787872,
-0.017480798065662384,
0.2743740975856781,
0.1342589110136032,
0.13596434891223907,
0.3300762474536896,
-0.12672722339630127,
0.11509295552968979,
-0.39053449034690857,
-0.25075024366378784,
0.26842373609542847,
0.050588615238666534,
0.37142229080200195,
0.21743245422840118,
-0.44886258244514465,
0.19811536371707916,
0.03610086068511009,
0.25605180859565735,
0.30126282572746277,
0.3356688320636749,
0.03939623385667801,
0.6574735045433044,
0.2751370072364807,
-0.08018714934587479,
-0.022825509309768677,
0.15762333571910858,
-0.40384989976882935,
-0.15377876162528992,
0.17299622297286987,
-0.3585532605648041,
-0.32928335666656494,
0.051967889070510864,
0.03205901011824608,
0.47859054803848267,
0.24947069585323334,
0.22822323441505432,
-0.3006324768066406,
0.22242233157157898,
-0.2358570247888565,
0.11768190562725067,
0.1153726652264595,
0.18143099546432495,
0.11380520462989807,
0.3615714907646179,
-0.08311575651168823,
-0.18523594737052917,
-0.15500780940055847,
0.27033114433288574,
0.2636871933937073,
0.04844913259148598,
0.3658839464187622,
-0.0708063393831253,
-0.13363966345787048,
-0.19875837862491608,
0.08706210553646088,
-0.0340278260409832,
-0.1547110229730606,
-0.04230918735265732,
0.29431629180908203,
0.114670529961586,
-0.04283387213945389,
0.05742514505982399,
0.30877119302749634,
0.1741381138563156,
-0.5386884212493896,
-0.03884590417146683,
-0.20468688011169434,
-0.3223606050014496,
0.06532999873161316,
0.19158786535263062,
-0.3348333239555359,
0.3808289170265198,
0.21251104772090912,
0.018071889877319336,
-0.11696261912584305,
-0.12107031792402267,
0.09962041676044464,
0.13401997089385986,
-0.1610570251941681,
-0.37776175141334534,
-0.013924859464168549,
0.24446146190166473,
0.13102369010448456,
0.13978509604930878,
-0.22432047128677368,
0.056504540145397186,
0.1865105926990509,
-0.18615998327732086,
0.0061065424233675,
0.27056869864463806,
0.020120635628700256,
-0.22995352745056152,
-0.2449505627155304,
-0.0008153468370437622,
-0.2585439682006836,
0.11991611123085022,
0.16379691660404205,
0.029889870434999466,
0.17768727242946625,
0.07020793110132217,
0.04825715720653534,
0.016748014837503433,
-0.28873059153556824,
0.17606818675994873,
0.01772918365895748,
-0.24482060968875885,
-0.4982014000415802,
0.022596172988414764,
-0.10012035071849823,
0.5587283968925476,
-0.6936107277870178,
-0.007341997232288122,
-0.4541681110858917,
0.2404499650001526,
-0.1954777091741562,
-0.007244819775223732,
0.0014594942331314087,
-0.27851375937461853,
-0.03013988956809044,
0.1731695532798767,
0.07414063811302185,
-0.16011199355125427,
0.055285535752773285,
0.3070281744003296,
-0.20379355549812317,
0.13712303340435028,
0.20462653040885925,
0.862328827381134,
-0.059799712151288986,
-0.31367141008377075,
0.023449573665857315,
0.05801328271627426,
0.33835676312446594,
-0.1843934953212738,
-0.1994635909795761,
0.27403777837753296,
-0.1152116060256958,
-0.11370128393173218,
0.2909389138221741,
-0.09394793957471848,
-0.37446117401123047,
0.059838876128196716,
-0.19984355568885803,
0.3293922245502472,
-0.09316284209489822,
0.3659176230430603,
-0.2859899699687958,
-0.050608597695827484,
0.034272003918886185,
0.16682901978492737,
-0.1679101139307022,
-0.26019132137298584,
-0.010064198635518551,
-0.22338898479938507,
-0.02593672275543213,
-0.02588600292801857,
0.028082694858312607,
0.18186822533607483,
-0.5656907558441162,
0.15885086357593536,
0.06702402234077454,
0.2626861035823822,
0.1121222972869873,
-0.04086194559931755,
0.3483414053916931,
0.13534341752529144,
0.6014814376831055,
0.2783258557319641,
0.28701311349868774,
-0.17280039191246033,
-0.40355437994003296,
-0.20812049508094788,
-0.07470397651195526,
-0.3570011854171753,
0.30957555770874023,
0.4312022626399994,
0.20414632558822632,
-0.19001504778862,
-0.20054931938648224,
0.08624535799026489,
0.21990655362606049,
-0.16661754250526428,
-0.352946937084198,
-0.1158728301525116,
-0.19159981608390808,
-0.011994422413408756,
0.3463250696659088,
-0.004401929676532745,
0.17427748441696167,
-0.05111408233642578,
-0.05733180791139603,
-0.15156394243240356,
0.2218332588672638,
0.1605648696422577,
0.04362988844513893,
-0.10918091237545013,
0.10684073716402054,
0.1961916983127594,
-0.01221969723701477,
0.3635070025920868,
0.4482749104499817,
0.3003790080547333,
0.026680124923586845,
-0.23496752977371216,
0.1634903848171234,
0.27170345187187195,
0.20007365942001343,
0.3689035177230835,
0.22226910293102264,
-0.08286789804697037,
-0.2962099611759186,
0.2456643432378769,
-0.18497151136398315,
0.23919682204723358,
0.3851581811904907,
-0.020075712352991104,
-0.6416813135147095,
-0.4975689947605133,
0.511085033416748,
0.004521379247307777,
0.019801065325737,
0.22929023206233978,
-0.44144970178604126,
0.012996584177017212,
-0.044841866940259933,
0.019172877073287964,
0.6361576318740845,
-0.1764858216047287,
0.3652835190296173,
-0.012575257569551468,
0.11913932859897614,
0.32684779167175293,
-0.026046793907880783,
0.062402088195085526,
-0.18568086624145508,
-0.05369143933057785,
0.22758494317531586,
-0.26062801480293274,
-0.067839615046978,
0.2028578668832779,
0.33170777559280396,
0.18821819126605988,
-0.13137705624103546,
0.18025726079940796,
0.012878330424427986,
0.4488939344882965,
0.08710484206676483,
-0.21772824227809906,
-0.09229989349842072,
0.14615322649478912,
-0.32340365648269653,
0.04333273321390152,
-0.10081332176923752,
0.03519938141107559,
-0.010129623115062714,
0.028897494077682495,
-0.22352983057498932,
0.10351075977087021,
-0.23099924623966217,
0.4225999712944031,
-0.25150954723358154,
-0.521324634552002,
-0.027056362479925156,
0.07129612565040588,
-0.5702288746833801,
-0.027721945196390152,
-0.06561611592769623,
0.36501508951187134,
-0.2758778929710388,
0.28039416670799255,
0.3480326533317566,
-0.2569480538368225,
0.24516674876213074,
0.010214854031801224,
0.11872398108243942,
0.008951302617788315,
-0.022971706464886665,
-0.33960074186325073,
-0.02721209079027176,
0.36412179470062256,
0.2775535583496094,
-0.07987527549266815,
-0.22563622891902924,
0.012686304748058319,
0.017424214631319046,
-0.09718900173902512,
0.03633469343185425,
0.1916297972202301,
0.012324344366788864,
0.3834533989429474,
-0.030107300728559494,
-0.5099639892578125,
-0.05534755066037178,
0.3252412676811218,
0.20709800720214844,
-0.21568019688129425,
0.3971478044986725,
0.03249901905655861,
-0.19320398569107056,
-0.037440378218889236,
0.24771511554718018,
0.14957694709300995,
-0.3545181155204773,
0.1787433624267578,
-0.06001628562808037,
0.13706190884113312,
0.19398513436317444,
-0.1866597682237625,
-0.08864961564540863,
-0.3123489320278168,
-0.270084023475647,
-0.09554684162139893,
-0.38725417852401733,
-0.15039224922657013,
-0.03669700399041176,
0.0782165452837944,
0.0422225296497345,
-0.12615643441677094,
-0.03742414712905884,
0.43408843874931335,
-0.21029987931251526,
-0.054922282695770264,
0.23920047283172607,
0.05853113532066345,
-0.026586923748254776,
-0.25053632259368896,
0.21385550498962402,
0.004571263678371906,
-0.05615449696779251,
-0.051630787551403046,
0.040830980986356735,
-0.251209557056427,
-0.04737728461623192,
0.1242968812584877,
-0.0042891185730695724,
-0.12024315446615219,
-0.2368970811367035,
-0.3456609845161438,
0.05481189861893654,
-0.2050172984600067,
0.4311218559741974,
0.21758192777633667,
0.01572553813457489,
-0.31404227018356323,
0.30397191643714905,
0.025225304067134857,
-0.026906410232186317,
0.44634610414505005,
-0.14778105914592743,
0.22234338521957397,
0.13586489856243134,
0.06776784360408783,
0.28769657015800476,
-0.24940326809883118,
-0.21286891400814056,
0.011677078902721405,
0.5909909605979919,
-0.1453074812889099,
0.1489439308643341,
-0.30751121044158936,
0.16735219955444336,
-0.0027910424396395683,
0.07255076617002487,
0.3108547031879425,
0.013528093695640564,
-0.41406407952308655,
0.17855232954025269,
0.08687448501586914,
0.039348602294921875,
-0.3019309341907501,
-0.09451209008693695,
-0.03713506832718849,
-0.07661925256252289,
0.13344672322273254,
0.05689200386404991,
0.21924707293510437,
-0.13085636496543884,
-0.130697101354599,
0.26964646577835083,
0.12581536173820496,
-0.047835756093263626,
0.38822704553604126,
0.27315694093704224,
-0.1047925353050232,
0.48768940567970276,
0.3903232216835022,
0.2716769576072693,
0.3355734944343567,
0.10206232219934464,
0.6923543214797974,
0.10553867369890213,
-0.07999400794506073,
0.010803788900375366,
-0.3727954030036926,
-0.15482141077518463,
0.26382386684417725,
-0.16665014624595642,
0.13434439897537231,
-0.19493535161018372,
0.009124122560024261,
-0.19124670326709747,
-0.0653577521443367,
-0.35578039288520813,
-0.026423003524541855,
-0.2079644501209259,
0.005379736423492432,
0.1997799128293991,
0.055140234529972076,
0.21861743927001953,
0.326170414686203,
-0.39420291781425476,
-0.11470414698123932,
-0.05180272459983826,
0.031050659716129303,
-0.1218373030424118,
-0.04921051859855652,
-0.009888272732496262,
0.14167334139347076,
-0.023809269070625305,
-0.11519373953342438,
0.06471266597509384,
-0.0013874396681785583,
-0.07610760629177094,
0.03744152560830116,
0.14948153495788574,
0.2420554757118225,
0.3533019423484802,
0.05890931561589241,
-0.04466903209686279,
0.1265292763710022,
-0.006266815587878227,
-0.18606537580490112,
0.5170601010322571,
0.013847269117832184,
-0.009150363504886627,
0.15258373320102692,
0.0038942471146583557,
-0.21964803338050842,
-0.056968096643686295,
0.02334744483232498,
-0.20859314501285553,
0.03472096472978592,
0.18918198347091675,
0.1516200453042984,
-0.20490270853042603,
-0.2619215250015259,
0.14312882721424103,
-0.20221030712127686,
-0.2747012972831726,
0.38933518528938293,
-0.25304412841796875,
-0.014834216795861721,
-0.007804247550666332,
0.028169341385364532,
-0.30484288930892944,
0.9071149826049805,
0.2623470425605774,
0.3463221490383148,
-0.356427401304245,
0.18675895035266876,
-0.4191631078720093,
0.02399265766143799,
-0.518704354763031,
0.20211873948574066,
0.10430072247982025,
0.23137101531028748,
-0.015256620943546295,
0.137782484292984,
-0.11818040907382965,
0.08121446520090103,
0.012907176278531551,
-0.2207528054714203,
-0.2550099492073059,
-0.0874239057302475,
-0.15494194626808167,
0.07520364224910736,
-0.048137642443180084,
-0.6022772789001465,
0.34467989206314087,
-0.012461556121706963,
-0.015062261372804642,
-0.23600904643535614,
0.040871649980545044,
0.1365882158279419,
0.18097522854804993,
0.24684391915798187,
0.1607687622308731,
0.5449453592300415,
0.22689250111579895,
-0.020175963640213013,
-0.13966085016727448,
0.03068927675485611,
-0.14916087687015533,
0.021876338869333267,
0.028308719396591187,
-0.014898326247930527,
0.03557982295751572,
-0.0963345617055893,
0.10792914777994156,
0.4588613212108612,
-0.04293288290500641,
-0.23952677845954895,
-0.03266846388578415,
-0.3271839916706085,
-0.019035298377275467,
0.2352491170167923,
0.28456389904022217,
0.29601597785949707,
-0.07428033649921417,
-0.18761838972568512,
-0.25344011187553406,
-0.10826003551483154,
0.3916228711605072,
-0.4769769310951233,
-0.22052432596683502,
-0.20208387076854706,
0.3011839985847473,
0.15237632393836975,
0.12600508332252502,
-0.11142441630363464,
0.09430167824029922,
0.18437804281711578,
-0.06396239995956421,
0.0038855671882629395,
0.378155380487442,
-0.2533891499042511,
0.17322446405887604,
-0.1296791285276413,
0.5012323260307312,
-0.16710901260375977,
-0.3956725597381592,
-0.09555286914110184,
-0.13953067362308502
] |
https://github.com/huggingface/datasets/issues/2207 | making labels consistent across the datasets | Hi ! The ClassLabel feature type encodes the labels as integers.
The integer corresponds to the index of the label name in the `names` list of the ClassLabel.
Here that means that the labels are 'entailment' (0), 'neutral' (1), 'contradiction' (2).
You can get the label names back by using `a.features['label'].int2str(i)`.
| Hi
For accessing the labels one can type
```
>>> a.features['label']
ClassLabel(num_classes=3, names=['entailment', 'neutral', 'contradiction'], names_file=None, id=None)
```
The labels however are not consistent with the actual labels sometimes, for instance in case of XNLI, the actual labels are 0,1,2, but if one try to access as above they are entailment, neutral,contradiction,
it would be great to have the labels consistent.
thanks
| 51 | making labels consistent across the datasets
Hi
For accessing the labels one can type
```
>>> a.features['label']
ClassLabel(num_classes=3, names=['entailment', 'neutral', 'contradiction'], names_file=None, id=None)
```
The labels however are not consistent with the actual labels sometimes, for instance in case of XNLI, the actual labels are 0,1,2, but if one try to access as above they are entailment, neutral,contradiction,
it would be great to have the labels consistent.
thanks
Hi ! The ClassLabel feature type encodes the labels as integers.
The integer corresponds to the index of the label name in the `names` list of the ClassLabel.
Here that means that the labels are 'entailment' (0), 'neutral' (1), 'contradiction' (2).
You can get the label names back by using `a.features['label'].int2str(i)`.
| [
0.016260463744401932,
-0.12873660027980804,
-0.06999024748802185,
0.4029694199562073,
0.38271331787109375,
-0.13002780079841614,
0.426028311252594,
0.023417027667164803,
0.08527474105358124,
0.27108514308929443,
-0.23050187528133392,
0.5326734781265259,
-0.015341478399932384,
0.4047871232032776,
-0.307892769575119,
0.015472151339054108,
-0.1154663935303688,
0.10157167911529541,
0.12495872378349304,
-0.3230442404747009,
-0.22132495045661926,
-0.13159948587417603,
0.015208631753921509,
0.33488351106643677,
-0.4379478693008423,
-0.14168229699134827,
0.027872184291481972,
-0.1909618079662323,
0.07415444403886795,
-0.4989106059074402,
0.1208871603012085,
0.3788156509399414,
0.0031806733459234238,
0.1615453064441681,
-0.00009597143798600882,
-0.2662475109100342,
0.1202937439084053,
0.02777373231947422,
-0.07654310762882233,
0.05074242502450943,
-0.2216128408908844,
-0.1730421781539917,
0.08331389725208282,
-0.43077027797698975,
-0.20847398042678833,
0.023829422891139984,
-0.1198960691690445,
-0.2397073656320572,
-0.15907199680805206,
-0.07101339846849442,
0.29252758622169495,
0.004053844138979912,
0.12891440093517303,
0.17186836898326874,
0.4010021388530731,
-0.008078351616859436,
0.041616395115852356,
0.14944042265415192,
0.3026367425918579,
0.12901759147644043,
0.051060307770967484,
0.5405576229095459,
-0.0356166809797287,
-0.06225081905722618,
0.32847604155540466,
0.14247016608715057,
0.0399959534406662,
-0.34657901525497437,
0.0029804371297359467,
0.4912869334220886,
0.5845724940299988,
-0.24949437379837036,
-0.4491058886051178,
-0.13937541842460632,
0.11239870637655258,
-0.2547757923603058,
-0.14366015791893005,
0.07087156176567078,
0.21493950486183167,
0.042106080800294876,
0.053967710584402084,
-0.051985301077365875,
-0.2780492305755615,
0.14982570707798004,
0.018788695335388184,
0.46954411268234253,
0.01715051755309105,
0.20288163423538208,
-0.08873610198497772,
-0.45773226022720337,
0.03764548897743225,
-0.007666865363717079,
0.003877893090248108,
0.2679314613342285,
-0.1903163343667984,
0.0004926398396492004,
-0.12860095500946045,
0.003397807478904724,
0.08202287554740906,
0.15134043991565704,
-0.2002423107624054,
0.15165826678276062,
-0.2954197824001312,
0.12941786646842957,
0.006737818941473961,
0.3571251630783081,
0.5226079821586609,
0.2573031485080719,
0.3497833013534546,
-0.025537611916661263,
-0.34299683570861816,
-0.07797695696353912,
-0.12893736362457275,
0.1174951046705246,
0.3556326925754547,
-0.03927082568407059,
0.016016945242881775,
-0.34009259939193726,
-0.3314756155014038,
0.050884149968624115,
-0.17542466521263123,
-0.05318232253193855,
0.1985357105731964,
0.2774687707424164,
0.17589730024337769,
0.3547518849372864,
0.1141958087682724,
-0.06791074573993683,
-0.12916110455989838,
-0.3238433301448822,
-0.2257990837097168,
-0.0322754792869091,
-0.06642471253871918,
-0.17214733362197876,
-0.045196644961833954,
0.20577199757099152,
0.26544609665870667,
-0.12709572911262512,
0.01779744029045105,
-0.12218397110700607,
-0.021327432245016098,
-0.12470634281635284,
0.013071537017822266,
-0.1685440093278885,
-0.31942737102508545,
0.04383336752653122,
0.0006258264183998108,
-0.11083023250102997,
-0.2505708336830139,
-0.2797503173351288,
-0.2588023245334625,
0.030497539788484573,
0.23047956824302673,
0.36596205830574036,
0.17011725902557373,
-0.10801082849502563,
0.343567818403244,
0.11858364939689636,
-0.11111477762460709,
-0.10164079815149307,
0.1304861307144165,
-0.31758981943130493,
0.18817681074142456,
-0.16732625663280487,
-0.06163817644119263,
0.056199416518211365,
-0.301107794046402,
-0.1929352879524231,
0.32348012924194336,
-0.19578666985034943,
-0.16054219007492065,
0.03981156647205353,
-0.004343893378973007,
-0.16163113713264465,
-0.009783104993402958,
0.0813342034816742,
0.42606690526008606,
-0.48900192975997925,
-0.34552961587905884,
-0.21518050134181976,
0.1158951073884964,
-0.12085143476724625,
0.2246495485305786,
0.4517965316772461,
0.09260875731706619,
0.00978139415383339,
0.16289882361888885,
0.07398134469985962,
0.1442050039768219,
-0.026806719601154327,
-0.12957274913787842,
-0.08364742249250412,
0.030337531119585037,
0.10094963014125824,
-0.2006153017282486,
-0.23477178812026978,
0.1300799548625946,
-0.03636498004198074,
0.2824647128582001,
-0.4692777693271637,
0.08495448529720306,
0.10948189347982407,
0.40024659037590027,
0.2273932844400406,
-0.0841674953699112,
-0.2679440677165985,
-0.2897006571292877,
0.2414548695087433,
-0.07374869287014008,
0.2531750798225403,
0.29524120688438416,
-0.4176499843597412,
-0.03341883048415184,
-0.11409465968608856,
-0.2889355719089508,
-0.08004492521286011,
0.325217068195343,
0.30397701263427734,
-0.11580418050289154,
-0.06967110931873322,
-0.1151365265250206,
-0.05040682107210159,
-0.1801474690437317,
0.03856545314192772,
-0.10429947078227997,
-0.1267307847738266,
0.04505951702594757,
0.1728132963180542,
-0.13243436813354492,
0.4198813736438751,
0.25453993678092957,
0.015063133090734482,
-0.07204824686050415,
0.22071430087089539,
0.24668104946613312,
-0.19871698319911957,
0.06284085661172867,
0.3595350682735443,
0.24185015261173248,
-0.22250430285930634,
0.04424054175615311,
0.10107995569705963,
0.1455688178539276,
0.10020516067743301,
-0.14734455943107605,
0.505487322807312,
-0.014054033905267715,
0.07404366880655289,
0.055841073393821716,
0.077627032995224,
0.2117098867893219,
-0.060762710869312286,
-0.31355518102645874,
-0.12978124618530273,
0.023537177592515945,
-0.08028125762939453,
0.08916398882865906,
0.1970619559288025,
-0.6030899882316589,
0.5452008247375488,
0.6344433426856995,
0.028505239635705948,
0.13034456968307495,
-0.20166423916816711,
-0.2598123848438263,
0.2631831765174866,
0.13788653910160065,
0.17437051236629486,
-0.0918094664812088,
0.3492026925086975,
0.0007842853665351868,
-0.12694141268730164,
-0.27251553535461426,
-0.03516681492328644,
0.032810792326927185,
-0.15604710578918457,
0.12337999045848846,
-0.0666254386305809,
0.10523872822523117,
-0.13279493153095245,
0.01848408207297325,
-0.4001695215702057,
-0.18001966178417206,
-0.04067814350128174,
-0.3130127787590027,
0.16597424447536469,
-0.10163827985525131,
-0.26824793219566345,
-0.3333456218242645,
-0.40441685914993286,
-0.3766966462135315,
-0.42875099182128906,
0.08144716918468475,
-0.0757485032081604,
-0.2525368630886078,
0.2243504524230957,
-0.07169176638126373,
0.25794264674186707,
0.03259942680597305,
-0.041878484189510345,
0.2593667805194855,
-0.4869861602783203,
-0.44486144185066223,
0.10944557189941406,
-0.04746490716934204,
0.07811923325061798,
0.2551839053630829,
-0.10097707062959671,
0.1930423378944397,
-0.08530984818935394,
-0.4455028772354126,
-0.05693791061639786,
-0.17423579096794128,
0.1129002794623375,
0.12111184000968933,
-0.029921412467956543,
0.07454035431146622,
0.030451681464910507,
0.1996329128742218,
-0.1402622014284134,
0.009762194007635117,
-0.021120484918355942,
-0.007549072615802288,
-0.34364980459213257,
-0.06611059606075287,
-0.6197522878646851,
-0.39257413148880005,
-0.2936832010746002,
0.06882763653993607,
-0.09807983040809631,
0.0955125093460083,
0.06040574610233307,
-0.25496959686279297,
0.05367507413029671,
0.0824275016784668,
0.5573015213012695,
-0.29655155539512634,
-0.10413108021020889,
0.15208157896995544,
-0.14413365721702576,
-0.19980263710021973,
0.07793064415454865,
-0.09332454204559326,
0.12999729812145233,
-0.08590462058782578,
0.018262386322021484,
-0.38701197504997253,
-0.09601905941963196,
0.2507856488227844,
0.1855878084897995,
0.22574886679649353,
0.018049269914627075,
0.2406851202249527,
-0.159356951713562,
-0.11467054486274719,
-0.13401855528354645,
0.36968597769737244,
0.05922814458608627,
0.2220907062292099,
0.044347815215587616,
-0.1700190305709839,
-0.21309161186218262,
0.029903870075941086,
0.14494213461875916,
-0.13076286017894745,
0.05541340261697769,
-0.09906765073537827,
0.1191021278500557,
0.2825278639793396,
-0.05185353755950928,
0.05314823240041733,
0.09075374156236649,
-0.018769139423966408,
0.13280700147151947,
-0.12425263971090317,
-0.135236456990242,
-0.1660636067390442,
0.06719760596752167,
-0.16853870451450348,
-0.23145422339439392,
-0.09489087760448456,
0.14990019798278809,
0.06344668567180634,
-0.0005059186369180679,
0.14746537804603577,
-0.1570693850517273,
-0.11219912022352219,
0.018888110294938087,
-0.00857429951429367,
-0.3010183572769165,
0.08638130873441696,
-0.6687086820602417,
-0.37009233236312866,
0.13028067350387573,
0.3246816396713257,
0.1557057946920395,
0.00922761857509613,
0.10744117200374603,
-0.16059786081314087,
0.05265846475958824,
0.10924689471721649,
0.3452030420303345,
-0.12319562584161758,
0.05973462760448456,
0.15645693242549896,
-0.037414293736219406,
-0.13184694945812225,
-0.03173051029443741,
-0.3407367169857025,
-0.41240862011909485,
0.25615090131759644,
0.17574739456176758,
-0.4678798317909241,
-0.17385999858379364,
0.032206468284130096,
0.04178385064005852,
-0.3526409864425659,
0.1511850506067276,
0.01656891033053398,
0.17027461528778076,
-0.10635291039943695,
-0.11029449850320816,
-0.2012554556131363,
0.26189762353897095,
-0.30111920833587646,
0.13900981843471527,
-0.11005981266498566,
0.12073678523302078,
0.3727039694786072,
0.5779052972793579,
0.45398852229118347,
-0.0533270500600338,
-0.17637889087200165,
0.13682863116264343,
0.3725430369377136,
0.10782286524772644,
0.5516908168792725,
-0.3065680265426636,
-0.3936006426811218,
-0.14715084433555603,
-0.3717603385448456,
0.4085087180137634,
0.26498299837112427,
0.23471981287002563,
-0.048217736184597015,
-0.4544082581996918,
-0.03396551311016083,
-0.182452991604805,
0.09026291966438293,
0.08341344445943832,
0.2831939458847046,
-0.10055022686719894,
-0.354797899723053,
0.4368866980075836,
-0.016723280772566795,
-0.2030838280916214,
-0.0688423439860344,
0.394805371761322,
-0.39775991439819336,
0.2816140055656433,
0.3006320893764496,
0.8588833212852478,
0.17094652354717255,
0.21710975468158722,
0.1895439326763153,
-0.0330892913043499,
0.7430710792541504,
0.038473643362522125,
0.2951505780220032,
-0.3186832666397095,
-0.17286013066768646,
0.022072723135352135,
0.1678132265806198,
-0.28424522280693054,
0.11175207793712616,
-0.020485691726207733,
0.5322527885437012,
-0.0484970360994339,
-0.040795158594846725,
-0.20195597410202026,
0.038586437702178955,
0.15541121363639832,
-0.04934615269303322,
-0.06135176122188568,
0.18770919740200043,
-0.24767453968524933,
0.02279827371239662,
-0.09179885685443878,
-0.11118476837873459,
-0.23356115818023682,
0.0792326033115387,
0.15052783489227295,
-0.015057277865707874,
0.14520609378814697,
0.028763147071003914,
0.06813271343708038,
0.0846668928861618,
-0.21425096690654755,
-0.01438126340508461,
0.4202452301979065,
0.10512813925743103,
-0.12288640439510345,
-0.0165364071726799,
0.20231106877326965,
0.3643653094768524,
-0.01719343662261963,
0.07002968341112137,
0.5418530106544495,
0.17441663146018982,
-0.3010494112968445,
0.16529309749603271,
0.11612072587013245,
0.051867060363292694,
-0.37057915329933167,
-0.21097643673419952,
-0.027045413851737976,
-0.17383994162082672,
0.12715423107147217,
0.13003581762313843,
-0.013936987146735191,
-0.16725946962833405,
0.21072188019752502,
-0.02898707240819931,
-0.22169151902198792,
0.1587173044681549,
0.306765079498291,
-0.10296733677387238,
-0.0033235885202884674,
-0.04948075860738754,
0.0802810788154602,
0.258499413728714,
0.1753513514995575,
-0.06182337924838066,
-0.12463635206222534,
-0.1845168173313141,
0.03509354591369629,
0.3228170871734619,
-0.17749039828777313,
0.01419918891042471,
-0.0346614308655262,
-0.2759723663330078,
0.03705953434109688,
0.3660198450088501,
0.17674057185649872,
0.4073537588119507,
-0.13625411689281464,
-0.33467942476272583,
-0.2940625548362732,
0.20530381798744202,
0.10358479619026184,
0.5411198735237122,
-0.10212422907352448,
0.0035160724073648453,
-0.08468825370073318,
0.03620853275060654,
-0.4692041575908661,
-0.17882928252220154,
-0.26438385248184204,
0.03002641163766384,
0.2223580926656723,
0.19431054592132568,
-0.061618395149707794,
0.1931774765253067,
0.18475447595119476,
-0.10036090016365051,
-0.07638154178857803,
-0.2584421634674072,
-0.25803452730178833,
0.03725697100162506,
-0.07248254120349884,
0.26782694458961487,
-0.18986836075782776,
-0.2380989044904709,
0.36341413855552673,
-0.26723453402519226,
0.0849275290966034,
0.033490754663944244,
0.016058918088674545,
0.669937252998352,
-0.27461719512939453,
0.19062504172325134,
-0.016132503747940063,
0.29236605763435364,
0.2016667276620865,
-0.29454857110977173,
0.24628280103206635,
0.024508921429514885,
-0.2802991271018982,
-0.08783356845378876,
-0.09123943746089935,
0.1401887685060501,
-0.17393849790096283,
0.08009594678878784,
-0.11579055339097977,
-0.040433675050735474,
0.23266321420669556,
0.31981122493743896,
0.19121316075325012,
0.28330254554748535,
-0.07967909425497055,
-0.11353816092014313,
0.0008902158588171005,
0.402662456035614,
-0.2881115674972534,
-0.1653481423854828,
-0.016035553067922592,
-0.060730598866939545,
0.19939181208610535,
0.3537397086620331,
0.1719893217086792,
0.14717334508895874,
0.036823734641075134,
-0.1169242188334465,
0.15647292137145996,
-0.15898066759109497,
0.17279565334320068,
0.22960621118545532,
-0.06634686887264252,
0.015355929732322693,
0.5013176798820496,
0.13843297958374023,
0.19897708296775818,
0.35267817974090576,
0.0669984221458435,
0.2979583144187927,
0.05305231735110283,
0.03184032440185547,
0.154814675450325,
0.2173381894826889,
-0.0670630931854248,
0.13440395891666412,
-0.10779860615730286,
0.11498011648654938,
-0.0083509162068367,
-0.10650942474603653,
-0.3142518997192383,
-0.45290952920913696,
0.00836133025586605,
0.24756069481372833,
-0.11060222238302231,
-0.25845760107040405,
-0.3169402480125427,
-0.3145022392272949,
0.029548995196819305,
-0.20207415521144867,
0.020411916077136993,
-0.164225772023201,
0.2425479292869568,
0.010401401668787003,
0.05829451605677605,
-0.6072800755500793,
-0.11589118093252182,
0.20096415281295776,
0.4825262129306793,
-0.0470442920923233,
-0.04515467584133148,
0.25416338443756104,
-0.10452967882156372,
0.29593631625175476,
0.17691662907600403,
-0.01018279418349266,
0.16732320189476013,
-0.06323421001434326,
-0.04424101114273071,
-0.1472974270582199,
-0.27323922514915466,
-0.019754642620682716,
-0.2685239315032959,
0.06551884859800339,
-0.2591524124145508,
0.42734411358833313,
0.19679446518421173,
-0.1959589570760727,
0.2888394296169281,
-0.26894840598106384,
0.24709786474704742,
-0.09671463072299957,
0.39380061626434326,
0.24821709096431732,
-0.08349895477294922,
-0.16376756131649017,
-0.20747488737106323,
-0.41890838742256165,
-0.03375421091914177,
0.17358018457889557,
0.11901606619358063,
0.32949140667915344,
-0.23045288026332855,
0.1744326949119568,
0.04677131026983261,
0.10161804407835007,
0.06560037285089493,
-0.10121942311525345,
-0.04205136373639107,
0.17754243314266205,
-0.5969786643981934,
0.09862487018108368,
0.1457090973854065,
-0.48831161856651306,
-0.003901616670191288,
0.06890708208084106,
0.007640570402145386,
-0.3794313669204712,
0.24871674180030823,
-0.175659641623497,
0.3450995683670044,
-0.11838050186634064,
-0.5937592387199402,
-0.1662169098854065,
0.1165788322687149,
-0.09162133932113647,
0.16755536198616028,
-0.1217336505651474,
-0.018830958753824234,
-0.24356696009635925,
0.10328959673643112,
0.09160038828849792,
0.22221815586090088,
0.1852477490901947,
0.21976211667060852,
0.09751947969198227,
0.00698870699852705,
0.35065537691116333,
0.05573461204767227,
0.04389738291501999,
-0.04334903135895729,
-0.06686342507600784,
-0.29035913944244385,
0.04025629907846451,
0.022058526054024696,
0.45267197489738464,
-0.010134636424481869,
0.19194383919239044,
-0.12982948124408722,
0.012570368126034737,
0.12134760618209839,
-0.20204558968544006,
-0.0882042869925499,
0.29740747809410095,
-0.03488016128540039,
-0.20182594656944275,
0.23519325256347656,
0.37499457597732544,
0.12045100331306458,
0.022713618353009224,
0.09161104261875153,
-0.35578814148902893,
0.45791083574295044,
-0.07420502603054047,
-0.29126930236816406,
0.011748737655580044,
0.20517340302467346,
0.21388432383537292,
-0.012811543419957161,
-0.45687881112098694,
0.0492444708943367,
0.3367871940135956,
-0.14349821209907532,
-0.43879714608192444,
0.127961665391922,
0.1306617707014084,
0.0891052782535553,
-0.15945222973823547,
0.004114121198654175,
0.1579315960407257,
0.05436599999666214,
-0.14196808636188507,
-0.1255163848400116
] |
https://github.com/huggingface/datasets/issues/2206 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer | Hi,
the output of the tokenizers is treated specially in the lib to optimize the dataset size (see the code [here](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L138-L141)). It looks like that one of the values in a dictionary returned by the tokenizer is out of the assumed range.
Can you please provide a minimal reproducible example for more help? | I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it? | 53 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
Hi,
the output of the tokenizers is treated specially in the lib to optimize the dataset size (see the code [here](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L138-L141)). It looks like that one of the values in a dictionary returned by the tokenizer is out of the assumed range.
Can you please provide a minimal reproducible example for more help? | [
-0.23382806777954102,
0.29218754172325134,
-0.05882902815937996,
0.0690961554646492,
0.2734430730342865,
-0.08607131987810135,
0.183644101023674,
0.30556368827819824,
-0.5368507504463196,
-0.19321997463703156,
-0.04617111384868622,
0.4354694187641144,
-0.0010598590597510338,
-0.23817452788352966,
0.2536689043045044,
-0.09952966868877411,
0.04302576929330826,
0.2507619857788086,
0.26054781675338745,
0.13173149526119232,
-0.03214319050312042,
0.11182644218206406,
-0.14896172285079956,
0.5977945327758789,
-0.3350472152233124,
-0.12702304124832153,
0.09436842799186707,
0.06016158685088158,
-0.000636054202914238,
-0.7611904144287109,
0.036195479333400726,
0.07673604786396027,
0.2579457759857178,
0.1267624795436859,
-0.00011337600881233811,
0.08206740021705627,
0.306107759475708,
0.03466664254665375,
-0.03521796315908432,
0.04710453748703003,
0.19803065061569214,
-0.03412481024861336,
0.28386926651000977,
-0.24474084377288818,
0.04184143990278244,
-1.0216339826583862,
-0.09206410497426987,
0.17482104897499084,
0.49703657627105713,
0.2085009217262268,
0.22488632798194885,
0.20165270566940308,
0.4208301305770874,
0.04459817707538605,
0.4089099168777466,
0.04634864628314972,
0.11875737458467484,
0.21017467975616455,
0.06483953446149826,
-0.07449466735124588,
-0.008271276950836182,
-0.11885485053062439,
-0.3061370551586151,
0.222259521484375,
0.08198634535074234,
0.042217645794153214,
-0.012898564338684082,
-0.07670848816633224,
-0.07849353551864624,
-0.031129129230976105,
0.46162593364715576,
-0.4693734347820282,
-0.19589510560035706,
-0.09231960773468018,
0.018317367881536484,
-0.4163800776004791,
0.11079199612140656,
0.11426181346178055,
-0.21715883910655975,
0.0793030858039856,
0.11941884458065033,
-0.02175184153020382,
-0.2067582756280899,
0.1848452091217041,
-0.06624195724725723,
0.35413599014282227,
0.030877012759447098,
0.24332645535469055,
-0.00985347107052803,
0.017106961458921432,
0.2675448954105377,
0.13623282313346863,
-0.20636534690856934,
0.33366432785987854,
-0.3007293939590454,
0.06952766329050064,
-0.02754581719636917,
-0.21591341495513916,
0.13060250878334045,
0.17485982179641724,
0.1709090620279312,
0.10446508973836899,
0.1628209501504898,
0.07622087746858597,
-0.129957914352417,
0.1835838407278061,
-0.16275250911712646,
0.23255252838134766,
0.15856808423995972,
-0.31490907073020935,
0.03707870468497276,
-0.1459878385066986,
-0.3320128321647644,
-0.23848667740821838,
0.33299219608306885,
0.14776906371116638,
0.3388667702674866,
-0.009366385638713837,
-0.14679215848445892,
0.09477508068084717,
-0.4526159167289734,
-0.1450774073600769,
0.006100613623857498,
0.24553051590919495,
0.21822774410247803,
-0.22719824314117432,
-0.15378138422966003,
0.20555001497268677,
-0.10033335536718369,
-0.23287537693977356,
-0.1099831759929657,
-0.04150383546948433,
-0.01821993663907051,
0.18741515278816223,
0.20107434689998627,
0.028640948235988617,
0.25266024470329285,
0.1917855441570282,
-0.06186212599277496,
0.015293814241886139,
0.3261609971523285,
-0.17746852338314056,
0.00584769994020462,
0.353584885597229,
0.06309448182582855,
0.34277990460395813,
0.015878772363066673,
-0.07270483672618866,
-0.03578253835439682,
0.2693835496902466,
-0.3565315306186676,
-0.4401063024997711,
-0.27939093112945557,
0.16003826260566711,
-0.10129045695066452,
0.0013683363795280457,
-0.2858612537384033,
-0.03209057077765465,
0.42169639468193054,
-0.3251369893550873,
-0.1027347519993782,
-0.3298664093017578,
0.03377959504723549,
-0.36525553464889526,
0.3561749756336212,
-0.09025092422962189,
-0.5666176676750183,
0.13392388820648193,
-0.02298639342188835,
-0.1644708663225174,
0.1516377478837967,
0.3593241274356842,
-0.3796888589859009,
0.6116592288017273,
-0.36053726077079773,
0.6695793271064758,
0.23129120469093323,
-0.0378577820956707,
-0.266708642244339,
-0.1009032279253006,
-0.10926123708486557,
0.03141885995864868,
-0.1686679720878601,
-0.11117596924304962,
0.15045881271362305,
-0.07621381431818008,
-0.1399540901184082,
0.06321269273757935,
0.028835799545049667,
0.034126266837120056,
-0.16934333741664886,
-0.09713651239871979,
0.29929178953170776,
0.11675174534320831,
0.03255586698651314,
-0.13184982538223267,
0.015645019710063934,
-0.24720114469528198,
0.05634412169456482,
-0.3048321604728699,
0.13518445193767548,
0.07594861090183258,
0.2232835292816162,
-0.05525881052017212,
0.08947677165269852,
-0.119825579226017,
-0.24982523918151855,
0.005044281482696533,
-0.5045511722564697,
-0.05296720564365387,
-0.39332717657089233,
-0.009788481518626213,
-0.2112288773059845,
0.08801601082086563,
-0.19892971217632294,
0.10718382894992828,
0.19840624928474426,
0.10604358464479446,
0.004400860518217087,
0.15056349337100983,
0.036057572811841965,
-0.12745799124240875,
0.11764305830001831,
0.11948083341121674,
0.09447106719017029,
0.2554818093776703,
-0.20536577701568604,
-0.6145573854446411,
0.1276678442955017,
-0.036282122135162354,
0.21265515685081482,
-0.023284297436475754,
-0.07313452661037445,
0.2727454602718353,
-0.12844935059547424,
0.07189113646745682,
-0.29815351963043213,
0.0743245854973793,
0.026683460921049118,
-0.4504474103450775,
-0.12937100231647491,
-0.05122019723057747,
0.11518544703722,
-0.01850775256752968,
0.45642992854118347,
0.36567962169647217,
0.23420929908752441,
-0.06999119371175766,
-0.15629413723945618,
-0.21497036516666412,
0.20211350917816162,
0.03265215829014778,
0.28476500511169434,
0.15732374787330627,
0.07475346326828003,
0.32215458154678345,
0.16280977427959442,
-0.00371544249355793,
-0.06721457839012146,
0.10726244747638702,
0.3034680485725403,
-0.10845077037811279,
0.07636643201112747,
0.04729701206088066,
-0.10526692122220993,
-0.10092775523662567,
0.05442681163549423,
-0.4296983480453491,
0.20587456226348877,
0.16280077397823334,
-0.33975034952163696,
0.013967443257570267,
-0.07337872684001923,
-0.13702839612960815,
0.15539564192295074,
0.06317305564880371,
0.38423219323158264,
0.3814515769481659,
0.2945331335067749,
0.07297220826148987,
-0.1637675166130066,
0.01703604683279991,
0.2265654057264328,
0.36002805829048157,
-0.45546066761016846,
-0.0783180296421051,
-0.1630181521177292,
-0.050847843289375305,
0.1702338010072708,
-0.32162952423095703,
-0.048630211502313614,
-0.15233057737350464,
0.02683030441403389,
0.08648470044136047,
-0.051729921251535416,
0.20238439738750458,
0.06737677752971649,
0.04597216844558716,
0.19582095742225647,
-0.02316112630069256,
-0.39776501059532166,
-0.2804776728153229,
-0.21865418553352356,
0.0824890285730362,
0.30155497789382935,
0.04037821292877197,
0.2039320319890976,
0.23747305572032928,
0.0278315506875515,
-0.1771768480539322,
-0.33922290802001953,
0.04295198619365692,
-0.07369707524776459,
0.2346137911081314,
0.0524713471531868,
-0.03117230534553528,
-0.08038944005966187,
-0.47517797350883484,
0.22250890731811523,
-0.23647165298461914,
-0.29547956585884094,
0.16463789343833923,
-0.1729840785264969,
-0.000473765772767365,
-0.008544739335775375,
-0.05600110441446304,
-0.224429190158844,
-0.11343076825141907,
0.12823325395584106,
0.08391819894313812,
0.1650998443365097,
-0.24483250081539154,
-0.0034247832372784615,
0.173871248960495,
-0.20329082012176514,
-0.19707073271274567,
-0.1134401485323906,
0.04536687955260277,
0.35198071599006653,
-0.19461874663829803,
-0.22353674471378326,
-0.1290646493434906,
-0.0890226885676384,
0.33350303769111633,
0.10649638622999191,
-0.26847460865974426,
0.13664039969444275,
-0.03243846446275711,
0.4266340136528015,
-0.32160723209381104,
-0.3929843604564667,
0.38265475630760193,
0.0959019586443901,
-0.11605901271104813,
0.02036081999540329,
-0.009244993329048157,
0.035899803042411804,
-0.19529682397842407,
-0.12220079451799393,
-0.04957282543182373,
0.3201511800289154,
-0.12643323838710785,
0.8966099619865417,
-0.277832567691803,
-0.11232572793960571,
0.476563036441803,
-0.058532580733299255,
-0.04927957430481911,
-0.11971405893564224,
-0.11733191460371017,
-0.10538358986377716,
-0.12198132276535034,
0.15857596695423126,
0.041514091193675995,
-0.3985210061073303,
-0.3152049779891968,
0.117641881108284,
-0.0033426377922296524,
-0.4849431812763214,
-0.1623237431049347,
0.024830402806401253,
-0.006015263497829437,
0.3399604558944702,
0.08089430630207062,
-0.1960049569606781,
-0.23497210443019867,
-0.10445483773946762,
0.10025160014629364,
-0.09644277393817902,
0.14609797298908234,
-0.0823536068201065,
-0.6153334379196167,
-0.0263248048722744,
-0.3447530269622803,
0.35089802742004395,
0.23034390807151794,
0.2787732183933258,
-0.025200653821229935,
0.05465894937515259,
0.15544474124908447,
-0.26453521847724915,
0.3481025695800781,
0.046081334352493286,
-0.07931284606456757,
0.37789058685302734,
0.06736503541469574,
-0.4065197706222534,
-0.25913822650909424,
-0.1735212504863739,
0.2162076085805893,
0.17352797091007233,
0.2088097780942917,
-0.3339238464832306,
-0.1532547026872635,
0.14592823386192322,
0.03174818307161331,
-0.07581911236047745,
-0.16073624789714813,
-0.24237842857837677,
-0.3862485885620117,
-0.27525433897972107,
0.07773531973361969,
0.09059811383485794,
0.2722553014755249,
-0.19242654740810394,
-0.02512616477906704,
-0.17413824796676636,
-0.10111153870820999,
-0.13570736348628998,
-0.023022359237074852,
0.22618505358695984,
-0.05084039643406868,
0.010964516550302505,
0.0407169908285141,
-0.0713447779417038,
0.5171346664428711,
-0.01051286980509758,
0.6572526693344116,
-0.32707464694976807,
0.014612910337746143,
0.035802192986011505,
0.31063583493232727,
-0.10369458794593811,
-0.27226606011390686,
0.45531630516052246,
-0.22562198340892792,
0.08862704783678055,
0.014384791254997253,
0.24329136312007904,
0.3678913414478302,
-0.2389952689409256,
-0.354692280292511,
-0.028596870601177216,
0.2601584196090698,
0.06814691424369812,
-0.13545596599578857,
0.33132871985435486,
-0.11814132332801819,
-0.319192111492157,
0.33941876888275146,
0.29600679874420166,
0.7895691990852356,
-0.1261400729417801,
0.15476928651332855,
0.5485853552818298,
-0.2694834768772125,
0.3345361649990082,
-0.17980143427848816,
0.035976242274045944,
-0.44158127903938293,
-0.006323901005089283,
0.07517459988594055,
-0.32066354155540466,
0.059069424867630005,
0.13494625687599182,
-0.13401922583580017,
-0.16228777170181274,
-0.13212524354457855,
0.34389370679855347,
0.34005001187324524,
0.33289942145347595,
0.1474965661764145,
-0.017819836735725403,
0.09483049809932709,
0.13080395758152008,
-0.4046940207481384,
-0.13410775363445282,
-0.22592979669570923,
-0.1723214089870453,
-0.033579595386981964,
-0.12218773365020752,
-0.1576714813709259,
0.01731967180967331,
-0.45613980293273926,
0.3478037118911743,
0.08491653203964233,
-0.31622034311294556,
0.16103094816207886,
-0.04743874445557594,
0.10190485417842865,
0.1037970781326294,
-0.1716717928647995,
0.15282464027404785,
-0.08265716582536697,
-0.14299537241458893,
-0.21423080563545227,
-0.24958443641662598,
0.03752274811267853,
-0.08661285787820816,
-0.2825958728790283,
0.432239294052124,
-0.11398009210824966,
-0.21027109026908875,
-0.17286749184131622,
0.012537039816379547,
0.31191521883010864,
-0.2836610674858093,
0.20267798006534576,
-0.23008230328559875,
0.03160623833537102,
-0.19420965015888214,
0.12119497358798981,
0.03953561186790466,
-0.03126790001988411,
0.01405203714966774,
-0.22412319481372833,
-0.05337683483958244,
-0.0647389143705368,
0.10199794918298721,
0.1302523910999298,
0.07190026342868805,
0.852497935295105,
-0.011723604053258896,
-0.016146136447787285,
-0.13193276524543762,
-0.027851726859807968,
0.14472785592079163,
-0.692668616771698,
0.2088911086320877,
0.18934568762779236,
0.1745970994234085,
-0.036252379417419434,
0.21444009244441986,
-0.06015298515558243,
0.15398716926574707,
0.11375638842582703,
-0.2568928003311157,
-0.3925023376941681,
0.10094808042049408,
-0.01556326076388359,
0.17327846586704254,
0.22804173827171326,
0.4849223494529724,
-0.2576967179775238,
0.24411825835704803,
-0.2813732624053955,
0.213856503367424,
-0.12691959738731384,
0.18813148140907288,
-0.3539939224720001,
-0.245778888463974,
-0.24187257885932922,
0.12090343236923218,
0.18275031447410583,
0.22708481550216675,
-0.08800061792135239,
-0.26218506693840027,
-0.06284231692552567,
0.1547938734292984,
0.10439615696668625,
-0.4758484661579132,
0.13845907151699066,
-0.07764919847249985,
0.08564816415309906,
0.04432769492268562,
0.14141088724136353,
0.008313976228237152,
-0.02389524132013321,
-0.029442433267831802,
0.6121736764907837,
0.033385440707206726,
-0.17803049087524414,
0.17458808422088623,
-0.32527977228164673,
-0.03555823862552643,
0.09403122216463089,
0.4215209186077118,
-0.07841598242521286,
0.040830813348293304,
0.07821924239397049,
0.033282577991485596,
0.26589909195899963,
-0.1068006083369255,
0.10577089339494705,
-0.514942467212677,
-0.3337250351905823,
-0.2798561453819275,
0.2233312875032425,
0.09471333026885986,
-0.31389427185058594,
-0.2480108141899109,
0.28715193271636963,
0.21261052787303925,
-0.2153720259666443,
-0.011920600198209286,
0.15171772241592407,
-0.05331400781869888,
-0.24991482496261597,
-0.018037132918834686,
0.3401537835597992,
-0.1459801346063614,
0.014054305851459503,
0.04994598776102066,
0.5240614414215088,
0.16422775387763977,
-0.1419709324836731,
0.06783637404441833,
-0.149908185005188,
-0.13437926769256592,
0.3621259331703186,
0.0754968598484993,
0.05894123390316963,
0.07912304997444153,
-0.21448299288749695,
0.10446847230195999,
0.20812702178955078,
0.18392908573150635,
0.011675752699375153,
-0.41322439908981323,
-0.2656545639038086,
0.25235283374786377,
0.054742325097322464,
-0.07374658435583115,
-0.004985228180885315,
0.33774465322494507,
0.6447908878326416,
-0.14229832589626312,
-0.09684479981660843,
0.5756675004959106,
-0.23292171955108643,
0.0020323507487773895,
-0.375676691532135,
-0.14658939838409424,
0.07459151744842529,
-0.035997677594423294,
-0.10463777184486389,
-0.18386928737163544,
-0.018551431596279144,
0.22492291033267975,
-0.36631494760513306,
-0.3276275098323822,
0.5081472992897034,
0.2541375756263733,
-0.08476156741380692,
-0.1901150494813919,
0.36026373505592346,
0.18093085289001465,
-0.24437272548675537,
0.02193962037563324,
0.41663649678230286,
0.698130190372467,
0.38446635007858276,
-0.26210933923721313,
0.06619031727313995,
-0.15172307193279266,
0.1134638786315918,
0.1007222831249237,
0.2648787498474121,
0.35648539662361145,
0.19966869056224823,
0.08501605689525604,
0.14053520560264587,
-0.1578916311264038,
-0.23459582030773163,
0.3939749300479889,
0.058213986456394196,
-0.031515780836343765,
-0.06184064596891403,
-0.21309028565883636,
-0.41257795691490173,
0.07717838883399963,
0.21824470162391663,
-0.09157699346542358,
0.23038677871227264,
0.33853811025619507,
0.0952061265707016,
-0.009405594319105148,
-0.043818674981594086,
0.09800031036138535,
-0.16319184005260468,
0.5890393853187561,
0.365780234336853,
0.29439777135849,
-0.47266632318496704,
-0.4595133662223816,
-0.43187978863716125,
0.4607594609260559,
-0.12002648413181305,
0.132616326212883,
0.23355597257614136,
0.17432528734207153,
0.058635588735342026,
0.06161138042807579,
0.1084991991519928,
0.4466966986656189,
-0.2370329648256302,
0.2657867670059204,
-0.3800933361053467,
0.4180727005004883,
0.01499650627374649,
-0.03603719174861908,
-0.1832066774368286,
-0.21836385130882263,
0.31003236770629883,
-0.2936552166938782,
0.1718757450580597,
-0.18044845759868622,
-0.15505263209342957,
0.2990252673625946,
0.17784638702869415,
0.5840935707092285,
0.02026558481156826,
0.3855084776878357,
0.043358273804187775,
0.32655277848243713,
-0.08953961730003357,
-0.33819782733917236,
-0.19214023649692535,
0.3090170919895172,
-0.03293270990252495,
0.19288307428359985,
0.14078302681446075,
0.034765973687171936,
-0.30306708812713623,
0.02477317303419113,
-0.20387262105941772,
0.15293651819229126,
-0.11741871386766434,
0.12560738623142242,
-0.1389215737581253,
-0.010225278325378895,
-0.020186739042401314,
-0.10736792534589767,
0.1551193743944168,
0.3255603015422821,
-0.5399783849716187,
-0.3889174461364746,
0.5106252431869507,
-0.3500750660896301,
-0.10789385437965393,
0.003339686430990696,
0.12971056997776031,
0.13026587665081024,
-0.004221692681312561,
-0.14214274287223816,
-0.058534685522317886,
0.7115306258201599,
-0.03090665116906166,
-0.2054668813943863,
0.300883948802948,
0.08334578573703766,
0.06466826796531677,
-0.08426870405673981,
0.2101767212152481,
0.09094908833503723,
-0.12346518039703369,
-0.23704077303409576,
-0.22667506337165833
] |
https://github.com/huggingface/datasets/issues/2206 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer | Hi @yana-xuyan, thanks for reporting.
As clearly @mariosasko explained, `datasets` performs some optimizations in order to reduce the size of the dataset cache files. And one of them is storing the field `special_tokens_mask` as `int8`, which means that this field can only contain integers between `-128` to `127`. As your message error states, one of the values of this field is `50259`, and therefore it cannot be stored as an `int8`.
Maybe we could implement a way to disable this optimization and allow using any integer value; although the size of the cache files would be much larger. | I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it? | 98 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
Hi @yana-xuyan, thanks for reporting.
As clearly @mariosasko explained, `datasets` performs some optimizations in order to reduce the size of the dataset cache files. And one of them is storing the field `special_tokens_mask` as `int8`, which means that this field can only contain integers between `-128` to `127`. As your message error states, one of the values of this field is `50259`, and therefore it cannot be stored as an `int8`.
Maybe we could implement a way to disable this optimization and allow using any integer value; although the size of the cache files would be much larger. | [
-0.23382806777954102,
0.29218754172325134,
-0.05882902815937996,
0.0690961554646492,
0.2734430730342865,
-0.08607131987810135,
0.183644101023674,
0.30556368827819824,
-0.5368507504463196,
-0.19321997463703156,
-0.04617111384868622,
0.4354694187641144,
-0.0010598590597510338,
-0.23817452788352966,
0.2536689043045044,
-0.09952966868877411,
0.04302576929330826,
0.2507619857788086,
0.26054781675338745,
0.13173149526119232,
-0.03214319050312042,
0.11182644218206406,
-0.14896172285079956,
0.5977945327758789,
-0.3350472152233124,
-0.12702304124832153,
0.09436842799186707,
0.06016158685088158,
-0.000636054202914238,
-0.7611904144287109,
0.036195479333400726,
0.07673604786396027,
0.2579457759857178,
0.1267624795436859,
-0.00011337600881233811,
0.08206740021705627,
0.306107759475708,
0.03466664254665375,
-0.03521796315908432,
0.04710453748703003,
0.19803065061569214,
-0.03412481024861336,
0.28386926651000977,
-0.24474084377288818,
0.04184143990278244,
-1.0216339826583862,
-0.09206410497426987,
0.17482104897499084,
0.49703657627105713,
0.2085009217262268,
0.22488632798194885,
0.20165270566940308,
0.4208301305770874,
0.04459817707538605,
0.4089099168777466,
0.04634864628314972,
0.11875737458467484,
0.21017467975616455,
0.06483953446149826,
-0.07449466735124588,
-0.008271276950836182,
-0.11885485053062439,
-0.3061370551586151,
0.222259521484375,
0.08198634535074234,
0.042217645794153214,
-0.012898564338684082,
-0.07670848816633224,
-0.07849353551864624,
-0.031129129230976105,
0.46162593364715576,
-0.4693734347820282,
-0.19589510560035706,
-0.09231960773468018,
0.018317367881536484,
-0.4163800776004791,
0.11079199612140656,
0.11426181346178055,
-0.21715883910655975,
0.0793030858039856,
0.11941884458065033,
-0.02175184153020382,
-0.2067582756280899,
0.1848452091217041,
-0.06624195724725723,
0.35413599014282227,
0.030877012759447098,
0.24332645535469055,
-0.00985347107052803,
0.017106961458921432,
0.2675448954105377,
0.13623282313346863,
-0.20636534690856934,
0.33366432785987854,
-0.3007293939590454,
0.06952766329050064,
-0.02754581719636917,
-0.21591341495513916,
0.13060250878334045,
0.17485982179641724,
0.1709090620279312,
0.10446508973836899,
0.1628209501504898,
0.07622087746858597,
-0.129957914352417,
0.1835838407278061,
-0.16275250911712646,
0.23255252838134766,
0.15856808423995972,
-0.31490907073020935,
0.03707870468497276,
-0.1459878385066986,
-0.3320128321647644,
-0.23848667740821838,
0.33299219608306885,
0.14776906371116638,
0.3388667702674866,
-0.009366385638713837,
-0.14679215848445892,
0.09477508068084717,
-0.4526159167289734,
-0.1450774073600769,
0.006100613623857498,
0.24553051590919495,
0.21822774410247803,
-0.22719824314117432,
-0.15378138422966003,
0.20555001497268677,
-0.10033335536718369,
-0.23287537693977356,
-0.1099831759929657,
-0.04150383546948433,
-0.01821993663907051,
0.18741515278816223,
0.20107434689998627,
0.028640948235988617,
0.25266024470329285,
0.1917855441570282,
-0.06186212599277496,
0.015293814241886139,
0.3261609971523285,
-0.17746852338314056,
0.00584769994020462,
0.353584885597229,
0.06309448182582855,
0.34277990460395813,
0.015878772363066673,
-0.07270483672618866,
-0.03578253835439682,
0.2693835496902466,
-0.3565315306186676,
-0.4401063024997711,
-0.27939093112945557,
0.16003826260566711,
-0.10129045695066452,
0.0013683363795280457,
-0.2858612537384033,
-0.03209057077765465,
0.42169639468193054,
-0.3251369893550873,
-0.1027347519993782,
-0.3298664093017578,
0.03377959504723549,
-0.36525553464889526,
0.3561749756336212,
-0.09025092422962189,
-0.5666176676750183,
0.13392388820648193,
-0.02298639342188835,
-0.1644708663225174,
0.1516377478837967,
0.3593241274356842,
-0.3796888589859009,
0.6116592288017273,
-0.36053726077079773,
0.6695793271064758,
0.23129120469093323,
-0.0378577820956707,
-0.266708642244339,
-0.1009032279253006,
-0.10926123708486557,
0.03141885995864868,
-0.1686679720878601,
-0.11117596924304962,
0.15045881271362305,
-0.07621381431818008,
-0.1399540901184082,
0.06321269273757935,
0.028835799545049667,
0.034126266837120056,
-0.16934333741664886,
-0.09713651239871979,
0.29929178953170776,
0.11675174534320831,
0.03255586698651314,
-0.13184982538223267,
0.015645019710063934,
-0.24720114469528198,
0.05634412169456482,
-0.3048321604728699,
0.13518445193767548,
0.07594861090183258,
0.2232835292816162,
-0.05525881052017212,
0.08947677165269852,
-0.119825579226017,
-0.24982523918151855,
0.005044281482696533,
-0.5045511722564697,
-0.05296720564365387,
-0.39332717657089233,
-0.009788481518626213,
-0.2112288773059845,
0.08801601082086563,
-0.19892971217632294,
0.10718382894992828,
0.19840624928474426,
0.10604358464479446,
0.004400860518217087,
0.15056349337100983,
0.036057572811841965,
-0.12745799124240875,
0.11764305830001831,
0.11948083341121674,
0.09447106719017029,
0.2554818093776703,
-0.20536577701568604,
-0.6145573854446411,
0.1276678442955017,
-0.036282122135162354,
0.21265515685081482,
-0.023284297436475754,
-0.07313452661037445,
0.2727454602718353,
-0.12844935059547424,
0.07189113646745682,
-0.29815351963043213,
0.0743245854973793,
0.026683460921049118,
-0.4504474103450775,
-0.12937100231647491,
-0.05122019723057747,
0.11518544703722,
-0.01850775256752968,
0.45642992854118347,
0.36567962169647217,
0.23420929908752441,
-0.06999119371175766,
-0.15629413723945618,
-0.21497036516666412,
0.20211350917816162,
0.03265215829014778,
0.28476500511169434,
0.15732374787330627,
0.07475346326828003,
0.32215458154678345,
0.16280977427959442,
-0.00371544249355793,
-0.06721457839012146,
0.10726244747638702,
0.3034680485725403,
-0.10845077037811279,
0.07636643201112747,
0.04729701206088066,
-0.10526692122220993,
-0.10092775523662567,
0.05442681163549423,
-0.4296983480453491,
0.20587456226348877,
0.16280077397823334,
-0.33975034952163696,
0.013967443257570267,
-0.07337872684001923,
-0.13702839612960815,
0.15539564192295074,
0.06317305564880371,
0.38423219323158264,
0.3814515769481659,
0.2945331335067749,
0.07297220826148987,
-0.1637675166130066,
0.01703604683279991,
0.2265654057264328,
0.36002805829048157,
-0.45546066761016846,
-0.0783180296421051,
-0.1630181521177292,
-0.050847843289375305,
0.1702338010072708,
-0.32162952423095703,
-0.048630211502313614,
-0.15233057737350464,
0.02683030441403389,
0.08648470044136047,
-0.051729921251535416,
0.20238439738750458,
0.06737677752971649,
0.04597216844558716,
0.19582095742225647,
-0.02316112630069256,
-0.39776501059532166,
-0.2804776728153229,
-0.21865418553352356,
0.0824890285730362,
0.30155497789382935,
0.04037821292877197,
0.2039320319890976,
0.23747305572032928,
0.0278315506875515,
-0.1771768480539322,
-0.33922290802001953,
0.04295198619365692,
-0.07369707524776459,
0.2346137911081314,
0.0524713471531868,
-0.03117230534553528,
-0.08038944005966187,
-0.47517797350883484,
0.22250890731811523,
-0.23647165298461914,
-0.29547956585884094,
0.16463789343833923,
-0.1729840785264969,
-0.000473765772767365,
-0.008544739335775375,
-0.05600110441446304,
-0.224429190158844,
-0.11343076825141907,
0.12823325395584106,
0.08391819894313812,
0.1650998443365097,
-0.24483250081539154,
-0.0034247832372784615,
0.173871248960495,
-0.20329082012176514,
-0.19707073271274567,
-0.1134401485323906,
0.04536687955260277,
0.35198071599006653,
-0.19461874663829803,
-0.22353674471378326,
-0.1290646493434906,
-0.0890226885676384,
0.33350303769111633,
0.10649638622999191,
-0.26847460865974426,
0.13664039969444275,
-0.03243846446275711,
0.4266340136528015,
-0.32160723209381104,
-0.3929843604564667,
0.38265475630760193,
0.0959019586443901,
-0.11605901271104813,
0.02036081999540329,
-0.009244993329048157,
0.035899803042411804,
-0.19529682397842407,
-0.12220079451799393,
-0.04957282543182373,
0.3201511800289154,
-0.12643323838710785,
0.8966099619865417,
-0.277832567691803,
-0.11232572793960571,
0.476563036441803,
-0.058532580733299255,
-0.04927957430481911,
-0.11971405893564224,
-0.11733191460371017,
-0.10538358986377716,
-0.12198132276535034,
0.15857596695423126,
0.041514091193675995,
-0.3985210061073303,
-0.3152049779891968,
0.117641881108284,
-0.0033426377922296524,
-0.4849431812763214,
-0.1623237431049347,
0.024830402806401253,
-0.006015263497829437,
0.3399604558944702,
0.08089430630207062,
-0.1960049569606781,
-0.23497210443019867,
-0.10445483773946762,
0.10025160014629364,
-0.09644277393817902,
0.14609797298908234,
-0.0823536068201065,
-0.6153334379196167,
-0.0263248048722744,
-0.3447530269622803,
0.35089802742004395,
0.23034390807151794,
0.2787732183933258,
-0.025200653821229935,
0.05465894937515259,
0.15544474124908447,
-0.26453521847724915,
0.3481025695800781,
0.046081334352493286,
-0.07931284606456757,
0.37789058685302734,
0.06736503541469574,
-0.4065197706222534,
-0.25913822650909424,
-0.1735212504863739,
0.2162076085805893,
0.17352797091007233,
0.2088097780942917,
-0.3339238464832306,
-0.1532547026872635,
0.14592823386192322,
0.03174818307161331,
-0.07581911236047745,
-0.16073624789714813,
-0.24237842857837677,
-0.3862485885620117,
-0.27525433897972107,
0.07773531973361969,
0.09059811383485794,
0.2722553014755249,
-0.19242654740810394,
-0.02512616477906704,
-0.17413824796676636,
-0.10111153870820999,
-0.13570736348628998,
-0.023022359237074852,
0.22618505358695984,
-0.05084039643406868,
0.010964516550302505,
0.0407169908285141,
-0.0713447779417038,
0.5171346664428711,
-0.01051286980509758,
0.6572526693344116,
-0.32707464694976807,
0.014612910337746143,
0.035802192986011505,
0.31063583493232727,
-0.10369458794593811,
-0.27226606011390686,
0.45531630516052246,
-0.22562198340892792,
0.08862704783678055,
0.014384791254997253,
0.24329136312007904,
0.3678913414478302,
-0.2389952689409256,
-0.354692280292511,
-0.028596870601177216,
0.2601584196090698,
0.06814691424369812,
-0.13545596599578857,
0.33132871985435486,
-0.11814132332801819,
-0.319192111492157,
0.33941876888275146,
0.29600679874420166,
0.7895691990852356,
-0.1261400729417801,
0.15476928651332855,
0.5485853552818298,
-0.2694834768772125,
0.3345361649990082,
-0.17980143427848816,
0.035976242274045944,
-0.44158127903938293,
-0.006323901005089283,
0.07517459988594055,
-0.32066354155540466,
0.059069424867630005,
0.13494625687599182,
-0.13401922583580017,
-0.16228777170181274,
-0.13212524354457855,
0.34389370679855347,
0.34005001187324524,
0.33289942145347595,
0.1474965661764145,
-0.017819836735725403,
0.09483049809932709,
0.13080395758152008,
-0.4046940207481384,
-0.13410775363445282,
-0.22592979669570923,
-0.1723214089870453,
-0.033579595386981964,
-0.12218773365020752,
-0.1576714813709259,
0.01731967180967331,
-0.45613980293273926,
0.3478037118911743,
0.08491653203964233,
-0.31622034311294556,
0.16103094816207886,
-0.04743874445557594,
0.10190485417842865,
0.1037970781326294,
-0.1716717928647995,
0.15282464027404785,
-0.08265716582536697,
-0.14299537241458893,
-0.21423080563545227,
-0.24958443641662598,
0.03752274811267853,
-0.08661285787820816,
-0.2825958728790283,
0.432239294052124,
-0.11398009210824966,
-0.21027109026908875,
-0.17286749184131622,
0.012537039816379547,
0.31191521883010864,
-0.2836610674858093,
0.20267798006534576,
-0.23008230328559875,
0.03160623833537102,
-0.19420965015888214,
0.12119497358798981,
0.03953561186790466,
-0.03126790001988411,
0.01405203714966774,
-0.22412319481372833,
-0.05337683483958244,
-0.0647389143705368,
0.10199794918298721,
0.1302523910999298,
0.07190026342868805,
0.852497935295105,
-0.011723604053258896,
-0.016146136447787285,
-0.13193276524543762,
-0.027851726859807968,
0.14472785592079163,
-0.692668616771698,
0.2088911086320877,
0.18934568762779236,
0.1745970994234085,
-0.036252379417419434,
0.21444009244441986,
-0.06015298515558243,
0.15398716926574707,
0.11375638842582703,
-0.2568928003311157,
-0.3925023376941681,
0.10094808042049408,
-0.01556326076388359,
0.17327846586704254,
0.22804173827171326,
0.4849223494529724,
-0.2576967179775238,
0.24411825835704803,
-0.2813732624053955,
0.213856503367424,
-0.12691959738731384,
0.18813148140907288,
-0.3539939224720001,
-0.245778888463974,
-0.24187257885932922,
0.12090343236923218,
0.18275031447410583,
0.22708481550216675,
-0.08800061792135239,
-0.26218506693840027,
-0.06284231692552567,
0.1547938734292984,
0.10439615696668625,
-0.4758484661579132,
0.13845907151699066,
-0.07764919847249985,
0.08564816415309906,
0.04432769492268562,
0.14141088724136353,
0.008313976228237152,
-0.02389524132013321,
-0.029442433267831802,
0.6121736764907837,
0.033385440707206726,
-0.17803049087524414,
0.17458808422088623,
-0.32527977228164673,
-0.03555823862552643,
0.09403122216463089,
0.4215209186077118,
-0.07841598242521286,
0.040830813348293304,
0.07821924239397049,
0.033282577991485596,
0.26589909195899963,
-0.1068006083369255,
0.10577089339494705,
-0.514942467212677,
-0.3337250351905823,
-0.2798561453819275,
0.2233312875032425,
0.09471333026885986,
-0.31389427185058594,
-0.2480108141899109,
0.28715193271636963,
0.21261052787303925,
-0.2153720259666443,
-0.011920600198209286,
0.15171772241592407,
-0.05331400781869888,
-0.24991482496261597,
-0.018037132918834686,
0.3401537835597992,
-0.1459801346063614,
0.014054305851459503,
0.04994598776102066,
0.5240614414215088,
0.16422775387763977,
-0.1419709324836731,
0.06783637404441833,
-0.149908185005188,
-0.13437926769256592,
0.3621259331703186,
0.0754968598484993,
0.05894123390316963,
0.07912304997444153,
-0.21448299288749695,
0.10446847230195999,
0.20812702178955078,
0.18392908573150635,
0.011675752699375153,
-0.41322439908981323,
-0.2656545639038086,
0.25235283374786377,
0.054742325097322464,
-0.07374658435583115,
-0.004985228180885315,
0.33774465322494507,
0.6447908878326416,
-0.14229832589626312,
-0.09684479981660843,
0.5756675004959106,
-0.23292171955108643,
0.0020323507487773895,
-0.375676691532135,
-0.14658939838409424,
0.07459151744842529,
-0.035997677594423294,
-0.10463777184486389,
-0.18386928737163544,
-0.018551431596279144,
0.22492291033267975,
-0.36631494760513306,
-0.3276275098323822,
0.5081472992897034,
0.2541375756263733,
-0.08476156741380692,
-0.1901150494813919,
0.36026373505592346,
0.18093085289001465,
-0.24437272548675537,
0.02193962037563324,
0.41663649678230286,
0.698130190372467,
0.38446635007858276,
-0.26210933923721313,
0.06619031727313995,
-0.15172307193279266,
0.1134638786315918,
0.1007222831249237,
0.2648787498474121,
0.35648539662361145,
0.19966869056224823,
0.08501605689525604,
0.14053520560264587,
-0.1578916311264038,
-0.23459582030773163,
0.3939749300479889,
0.058213986456394196,
-0.031515780836343765,
-0.06184064596891403,
-0.21309028565883636,
-0.41257795691490173,
0.07717838883399963,
0.21824470162391663,
-0.09157699346542358,
0.23038677871227264,
0.33853811025619507,
0.0952061265707016,
-0.009405594319105148,
-0.043818674981594086,
0.09800031036138535,
-0.16319184005260468,
0.5890393853187561,
0.365780234336853,
0.29439777135849,
-0.47266632318496704,
-0.4595133662223816,
-0.43187978863716125,
0.4607594609260559,
-0.12002648413181305,
0.132616326212883,
0.23355597257614136,
0.17432528734207153,
0.058635588735342026,
0.06161138042807579,
0.1084991991519928,
0.4466966986656189,
-0.2370329648256302,
0.2657867670059204,
-0.3800933361053467,
0.4180727005004883,
0.01499650627374649,
-0.03603719174861908,
-0.1832066774368286,
-0.21836385130882263,
0.31003236770629883,
-0.2936552166938782,
0.1718757450580597,
-0.18044845759868622,
-0.15505263209342957,
0.2990252673625946,
0.17784638702869415,
0.5840935707092285,
0.02026558481156826,
0.3855084776878357,
0.043358273804187775,
0.32655277848243713,
-0.08953961730003357,
-0.33819782733917236,
-0.19214023649692535,
0.3090170919895172,
-0.03293270990252495,
0.19288307428359985,
0.14078302681446075,
0.034765973687171936,
-0.30306708812713623,
0.02477317303419113,
-0.20387262105941772,
0.15293651819229126,
-0.11741871386766434,
0.12560738623142242,
-0.1389215737581253,
-0.010225278325378895,
-0.020186739042401314,
-0.10736792534589767,
0.1551193743944168,
0.3255603015422821,
-0.5399783849716187,
-0.3889174461364746,
0.5106252431869507,
-0.3500750660896301,
-0.10789385437965393,
0.003339686430990696,
0.12971056997776031,
0.13026587665081024,
-0.004221692681312561,
-0.14214274287223816,
-0.058534685522317886,
0.7115306258201599,
-0.03090665116906166,
-0.2054668813943863,
0.300883948802948,
0.08334578573703766,
0.06466826796531677,
-0.08426870405673981,
0.2101767212152481,
0.09094908833503723,
-0.12346518039703369,
-0.23704077303409576,
-0.22667506337165833
] |
https://github.com/huggingface/datasets/issues/2206 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer | I'm facing same issue @mariosasko @albertvillanova
```
ArrowInvalid: Integer value 50260 not in range: -128 to 127
```
To reproduce:
```python
SPECIAL_TOKENS = ['<bos>','<eos>','<speaker1>','<speaker2>','<pad>']
ATTR_TO_SPECIAL_TOKEN = {
'bos_token': '<bos>',
'eos_token': '<eos>',
'pad_token': '<pad>',
'additional_special_tokens': ['<speaker1>', '<speaker2>']
}
tokenizer = AutoTokenizer.from_pretrained("gpt2", use_fast=False)
num_added_tokens =tokenizer.add_special_tokens(ATTR_TO_SPECIAL_TOKEN)
vocab_size = len(self.tokenizer.encoder) + num_added_tokens
vocab =tokenizer.get_vocab()
pad_index = tokenizer.pad_token_id
eos_index = tokenizer.eos_token_id
bos_index = tokenizer.bos_token_id
speaker1_index = vocab["<speaker1>"]
speaker2_index = vocab["<speaker2>"]
```
```python
tokenizer.decode(['50260'])
'<speaker1>'
``` | I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it? | 70 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
I'm facing same issue @mariosasko @albertvillanova
```
ArrowInvalid: Integer value 50260 not in range: -128 to 127
```
To reproduce:
```python
SPECIAL_TOKENS = ['<bos>','<eos>','<speaker1>','<speaker2>','<pad>']
ATTR_TO_SPECIAL_TOKEN = {
'bos_token': '<bos>',
'eos_token': '<eos>',
'pad_token': '<pad>',
'additional_special_tokens': ['<speaker1>', '<speaker2>']
}
tokenizer = AutoTokenizer.from_pretrained("gpt2", use_fast=False)
num_added_tokens =tokenizer.add_special_tokens(ATTR_TO_SPECIAL_TOKEN)
vocab_size = len(self.tokenizer.encoder) + num_added_tokens
vocab =tokenizer.get_vocab()
pad_index = tokenizer.pad_token_id
eos_index = tokenizer.eos_token_id
bos_index = tokenizer.bos_token_id
speaker1_index = vocab["<speaker1>"]
speaker2_index = vocab["<speaker2>"]
```
```python
tokenizer.decode(['50260'])
'<speaker1>'
``` | [
-0.23382806777954102,
0.29218754172325134,
-0.05882902815937996,
0.0690961554646492,
0.2734430730342865,
-0.08607131987810135,
0.183644101023674,
0.30556368827819824,
-0.5368507504463196,
-0.19321997463703156,
-0.04617111384868622,
0.4354694187641144,
-0.0010598590597510338,
-0.23817452788352966,
0.2536689043045044,
-0.09952966868877411,
0.04302576929330826,
0.2507619857788086,
0.26054781675338745,
0.13173149526119232,
-0.03214319050312042,
0.11182644218206406,
-0.14896172285079956,
0.5977945327758789,
-0.3350472152233124,
-0.12702304124832153,
0.09436842799186707,
0.06016158685088158,
-0.000636054202914238,
-0.7611904144287109,
0.036195479333400726,
0.07673604786396027,
0.2579457759857178,
0.1267624795436859,
-0.00011337600881233811,
0.08206740021705627,
0.306107759475708,
0.03466664254665375,
-0.03521796315908432,
0.04710453748703003,
0.19803065061569214,
-0.03412481024861336,
0.28386926651000977,
-0.24474084377288818,
0.04184143990278244,
-1.0216339826583862,
-0.09206410497426987,
0.17482104897499084,
0.49703657627105713,
0.2085009217262268,
0.22488632798194885,
0.20165270566940308,
0.4208301305770874,
0.04459817707538605,
0.4089099168777466,
0.04634864628314972,
0.11875737458467484,
0.21017467975616455,
0.06483953446149826,
-0.07449466735124588,
-0.008271276950836182,
-0.11885485053062439,
-0.3061370551586151,
0.222259521484375,
0.08198634535074234,
0.042217645794153214,
-0.012898564338684082,
-0.07670848816633224,
-0.07849353551864624,
-0.031129129230976105,
0.46162593364715576,
-0.4693734347820282,
-0.19589510560035706,
-0.09231960773468018,
0.018317367881536484,
-0.4163800776004791,
0.11079199612140656,
0.11426181346178055,
-0.21715883910655975,
0.0793030858039856,
0.11941884458065033,
-0.02175184153020382,
-0.2067582756280899,
0.1848452091217041,
-0.06624195724725723,
0.35413599014282227,
0.030877012759447098,
0.24332645535469055,
-0.00985347107052803,
0.017106961458921432,
0.2675448954105377,
0.13623282313346863,
-0.20636534690856934,
0.33366432785987854,
-0.3007293939590454,
0.06952766329050064,
-0.02754581719636917,
-0.21591341495513916,
0.13060250878334045,
0.17485982179641724,
0.1709090620279312,
0.10446508973836899,
0.1628209501504898,
0.07622087746858597,
-0.129957914352417,
0.1835838407278061,
-0.16275250911712646,
0.23255252838134766,
0.15856808423995972,
-0.31490907073020935,
0.03707870468497276,
-0.1459878385066986,
-0.3320128321647644,
-0.23848667740821838,
0.33299219608306885,
0.14776906371116638,
0.3388667702674866,
-0.009366385638713837,
-0.14679215848445892,
0.09477508068084717,
-0.4526159167289734,
-0.1450774073600769,
0.006100613623857498,
0.24553051590919495,
0.21822774410247803,
-0.22719824314117432,
-0.15378138422966003,
0.20555001497268677,
-0.10033335536718369,
-0.23287537693977356,
-0.1099831759929657,
-0.04150383546948433,
-0.01821993663907051,
0.18741515278816223,
0.20107434689998627,
0.028640948235988617,
0.25266024470329285,
0.1917855441570282,
-0.06186212599277496,
0.015293814241886139,
0.3261609971523285,
-0.17746852338314056,
0.00584769994020462,
0.353584885597229,
0.06309448182582855,
0.34277990460395813,
0.015878772363066673,
-0.07270483672618866,
-0.03578253835439682,
0.2693835496902466,
-0.3565315306186676,
-0.4401063024997711,
-0.27939093112945557,
0.16003826260566711,
-0.10129045695066452,
0.0013683363795280457,
-0.2858612537384033,
-0.03209057077765465,
0.42169639468193054,
-0.3251369893550873,
-0.1027347519993782,
-0.3298664093017578,
0.03377959504723549,
-0.36525553464889526,
0.3561749756336212,
-0.09025092422962189,
-0.5666176676750183,
0.13392388820648193,
-0.02298639342188835,
-0.1644708663225174,
0.1516377478837967,
0.3593241274356842,
-0.3796888589859009,
0.6116592288017273,
-0.36053726077079773,
0.6695793271064758,
0.23129120469093323,
-0.0378577820956707,
-0.266708642244339,
-0.1009032279253006,
-0.10926123708486557,
0.03141885995864868,
-0.1686679720878601,
-0.11117596924304962,
0.15045881271362305,
-0.07621381431818008,
-0.1399540901184082,
0.06321269273757935,
0.028835799545049667,
0.034126266837120056,
-0.16934333741664886,
-0.09713651239871979,
0.29929178953170776,
0.11675174534320831,
0.03255586698651314,
-0.13184982538223267,
0.015645019710063934,
-0.24720114469528198,
0.05634412169456482,
-0.3048321604728699,
0.13518445193767548,
0.07594861090183258,
0.2232835292816162,
-0.05525881052017212,
0.08947677165269852,
-0.119825579226017,
-0.24982523918151855,
0.005044281482696533,
-0.5045511722564697,
-0.05296720564365387,
-0.39332717657089233,
-0.009788481518626213,
-0.2112288773059845,
0.08801601082086563,
-0.19892971217632294,
0.10718382894992828,
0.19840624928474426,
0.10604358464479446,
0.004400860518217087,
0.15056349337100983,
0.036057572811841965,
-0.12745799124240875,
0.11764305830001831,
0.11948083341121674,
0.09447106719017029,
0.2554818093776703,
-0.20536577701568604,
-0.6145573854446411,
0.1276678442955017,
-0.036282122135162354,
0.21265515685081482,
-0.023284297436475754,
-0.07313452661037445,
0.2727454602718353,
-0.12844935059547424,
0.07189113646745682,
-0.29815351963043213,
0.0743245854973793,
0.026683460921049118,
-0.4504474103450775,
-0.12937100231647491,
-0.05122019723057747,
0.11518544703722,
-0.01850775256752968,
0.45642992854118347,
0.36567962169647217,
0.23420929908752441,
-0.06999119371175766,
-0.15629413723945618,
-0.21497036516666412,
0.20211350917816162,
0.03265215829014778,
0.28476500511169434,
0.15732374787330627,
0.07475346326828003,
0.32215458154678345,
0.16280977427959442,
-0.00371544249355793,
-0.06721457839012146,
0.10726244747638702,
0.3034680485725403,
-0.10845077037811279,
0.07636643201112747,
0.04729701206088066,
-0.10526692122220993,
-0.10092775523662567,
0.05442681163549423,
-0.4296983480453491,
0.20587456226348877,
0.16280077397823334,
-0.33975034952163696,
0.013967443257570267,
-0.07337872684001923,
-0.13702839612960815,
0.15539564192295074,
0.06317305564880371,
0.38423219323158264,
0.3814515769481659,
0.2945331335067749,
0.07297220826148987,
-0.1637675166130066,
0.01703604683279991,
0.2265654057264328,
0.36002805829048157,
-0.45546066761016846,
-0.0783180296421051,
-0.1630181521177292,
-0.050847843289375305,
0.1702338010072708,
-0.32162952423095703,
-0.048630211502313614,
-0.15233057737350464,
0.02683030441403389,
0.08648470044136047,
-0.051729921251535416,
0.20238439738750458,
0.06737677752971649,
0.04597216844558716,
0.19582095742225647,
-0.02316112630069256,
-0.39776501059532166,
-0.2804776728153229,
-0.21865418553352356,
0.0824890285730362,
0.30155497789382935,
0.04037821292877197,
0.2039320319890976,
0.23747305572032928,
0.0278315506875515,
-0.1771768480539322,
-0.33922290802001953,
0.04295198619365692,
-0.07369707524776459,
0.2346137911081314,
0.0524713471531868,
-0.03117230534553528,
-0.08038944005966187,
-0.47517797350883484,
0.22250890731811523,
-0.23647165298461914,
-0.29547956585884094,
0.16463789343833923,
-0.1729840785264969,
-0.000473765772767365,
-0.008544739335775375,
-0.05600110441446304,
-0.224429190158844,
-0.11343076825141907,
0.12823325395584106,
0.08391819894313812,
0.1650998443365097,
-0.24483250081539154,
-0.0034247832372784615,
0.173871248960495,
-0.20329082012176514,
-0.19707073271274567,
-0.1134401485323906,
0.04536687955260277,
0.35198071599006653,
-0.19461874663829803,
-0.22353674471378326,
-0.1290646493434906,
-0.0890226885676384,
0.33350303769111633,
0.10649638622999191,
-0.26847460865974426,
0.13664039969444275,
-0.03243846446275711,
0.4266340136528015,
-0.32160723209381104,
-0.3929843604564667,
0.38265475630760193,
0.0959019586443901,
-0.11605901271104813,
0.02036081999540329,
-0.009244993329048157,
0.035899803042411804,
-0.19529682397842407,
-0.12220079451799393,
-0.04957282543182373,
0.3201511800289154,
-0.12643323838710785,
0.8966099619865417,
-0.277832567691803,
-0.11232572793960571,
0.476563036441803,
-0.058532580733299255,
-0.04927957430481911,
-0.11971405893564224,
-0.11733191460371017,
-0.10538358986377716,
-0.12198132276535034,
0.15857596695423126,
0.041514091193675995,
-0.3985210061073303,
-0.3152049779891968,
0.117641881108284,
-0.0033426377922296524,
-0.4849431812763214,
-0.1623237431049347,
0.024830402806401253,
-0.006015263497829437,
0.3399604558944702,
0.08089430630207062,
-0.1960049569606781,
-0.23497210443019867,
-0.10445483773946762,
0.10025160014629364,
-0.09644277393817902,
0.14609797298908234,
-0.0823536068201065,
-0.6153334379196167,
-0.0263248048722744,
-0.3447530269622803,
0.35089802742004395,
0.23034390807151794,
0.2787732183933258,
-0.025200653821229935,
0.05465894937515259,
0.15544474124908447,
-0.26453521847724915,
0.3481025695800781,
0.046081334352493286,
-0.07931284606456757,
0.37789058685302734,
0.06736503541469574,
-0.4065197706222534,
-0.25913822650909424,
-0.1735212504863739,
0.2162076085805893,
0.17352797091007233,
0.2088097780942917,
-0.3339238464832306,
-0.1532547026872635,
0.14592823386192322,
0.03174818307161331,
-0.07581911236047745,
-0.16073624789714813,
-0.24237842857837677,
-0.3862485885620117,
-0.27525433897972107,
0.07773531973361969,
0.09059811383485794,
0.2722553014755249,
-0.19242654740810394,
-0.02512616477906704,
-0.17413824796676636,
-0.10111153870820999,
-0.13570736348628998,
-0.023022359237074852,
0.22618505358695984,
-0.05084039643406868,
0.010964516550302505,
0.0407169908285141,
-0.0713447779417038,
0.5171346664428711,
-0.01051286980509758,
0.6572526693344116,
-0.32707464694976807,
0.014612910337746143,
0.035802192986011505,
0.31063583493232727,
-0.10369458794593811,
-0.27226606011390686,
0.45531630516052246,
-0.22562198340892792,
0.08862704783678055,
0.014384791254997253,
0.24329136312007904,
0.3678913414478302,
-0.2389952689409256,
-0.354692280292511,
-0.028596870601177216,
0.2601584196090698,
0.06814691424369812,
-0.13545596599578857,
0.33132871985435486,
-0.11814132332801819,
-0.319192111492157,
0.33941876888275146,
0.29600679874420166,
0.7895691990852356,
-0.1261400729417801,
0.15476928651332855,
0.5485853552818298,
-0.2694834768772125,
0.3345361649990082,
-0.17980143427848816,
0.035976242274045944,
-0.44158127903938293,
-0.006323901005089283,
0.07517459988594055,
-0.32066354155540466,
0.059069424867630005,
0.13494625687599182,
-0.13401922583580017,
-0.16228777170181274,
-0.13212524354457855,
0.34389370679855347,
0.34005001187324524,
0.33289942145347595,
0.1474965661764145,
-0.017819836735725403,
0.09483049809932709,
0.13080395758152008,
-0.4046940207481384,
-0.13410775363445282,
-0.22592979669570923,
-0.1723214089870453,
-0.033579595386981964,
-0.12218773365020752,
-0.1576714813709259,
0.01731967180967331,
-0.45613980293273926,
0.3478037118911743,
0.08491653203964233,
-0.31622034311294556,
0.16103094816207886,
-0.04743874445557594,
0.10190485417842865,
0.1037970781326294,
-0.1716717928647995,
0.15282464027404785,
-0.08265716582536697,
-0.14299537241458893,
-0.21423080563545227,
-0.24958443641662598,
0.03752274811267853,
-0.08661285787820816,
-0.2825958728790283,
0.432239294052124,
-0.11398009210824966,
-0.21027109026908875,
-0.17286749184131622,
0.012537039816379547,
0.31191521883010864,
-0.2836610674858093,
0.20267798006534576,
-0.23008230328559875,
0.03160623833537102,
-0.19420965015888214,
0.12119497358798981,
0.03953561186790466,
-0.03126790001988411,
0.01405203714966774,
-0.22412319481372833,
-0.05337683483958244,
-0.0647389143705368,
0.10199794918298721,
0.1302523910999298,
0.07190026342868805,
0.852497935295105,
-0.011723604053258896,
-0.016146136447787285,
-0.13193276524543762,
-0.027851726859807968,
0.14472785592079163,
-0.692668616771698,
0.2088911086320877,
0.18934568762779236,
0.1745970994234085,
-0.036252379417419434,
0.21444009244441986,
-0.06015298515558243,
0.15398716926574707,
0.11375638842582703,
-0.2568928003311157,
-0.3925023376941681,
0.10094808042049408,
-0.01556326076388359,
0.17327846586704254,
0.22804173827171326,
0.4849223494529724,
-0.2576967179775238,
0.24411825835704803,
-0.2813732624053955,
0.213856503367424,
-0.12691959738731384,
0.18813148140907288,
-0.3539939224720001,
-0.245778888463974,
-0.24187257885932922,
0.12090343236923218,
0.18275031447410583,
0.22708481550216675,
-0.08800061792135239,
-0.26218506693840027,
-0.06284231692552567,
0.1547938734292984,
0.10439615696668625,
-0.4758484661579132,
0.13845907151699066,
-0.07764919847249985,
0.08564816415309906,
0.04432769492268562,
0.14141088724136353,
0.008313976228237152,
-0.02389524132013321,
-0.029442433267831802,
0.6121736764907837,
0.033385440707206726,
-0.17803049087524414,
0.17458808422088623,
-0.32527977228164673,
-0.03555823862552643,
0.09403122216463089,
0.4215209186077118,
-0.07841598242521286,
0.040830813348293304,
0.07821924239397049,
0.033282577991485596,
0.26589909195899963,
-0.1068006083369255,
0.10577089339494705,
-0.514942467212677,
-0.3337250351905823,
-0.2798561453819275,
0.2233312875032425,
0.09471333026885986,
-0.31389427185058594,
-0.2480108141899109,
0.28715193271636963,
0.21261052787303925,
-0.2153720259666443,
-0.011920600198209286,
0.15171772241592407,
-0.05331400781869888,
-0.24991482496261597,
-0.018037132918834686,
0.3401537835597992,
-0.1459801346063614,
0.014054305851459503,
0.04994598776102066,
0.5240614414215088,
0.16422775387763977,
-0.1419709324836731,
0.06783637404441833,
-0.149908185005188,
-0.13437926769256592,
0.3621259331703186,
0.0754968598484993,
0.05894123390316963,
0.07912304997444153,
-0.21448299288749695,
0.10446847230195999,
0.20812702178955078,
0.18392908573150635,
0.011675752699375153,
-0.41322439908981323,
-0.2656545639038086,
0.25235283374786377,
0.054742325097322464,
-0.07374658435583115,
-0.004985228180885315,
0.33774465322494507,
0.6447908878326416,
-0.14229832589626312,
-0.09684479981660843,
0.5756675004959106,
-0.23292171955108643,
0.0020323507487773895,
-0.375676691532135,
-0.14658939838409424,
0.07459151744842529,
-0.035997677594423294,
-0.10463777184486389,
-0.18386928737163544,
-0.018551431596279144,
0.22492291033267975,
-0.36631494760513306,
-0.3276275098323822,
0.5081472992897034,
0.2541375756263733,
-0.08476156741380692,
-0.1901150494813919,
0.36026373505592346,
0.18093085289001465,
-0.24437272548675537,
0.02193962037563324,
0.41663649678230286,
0.698130190372467,
0.38446635007858276,
-0.26210933923721313,
0.06619031727313995,
-0.15172307193279266,
0.1134638786315918,
0.1007222831249237,
0.2648787498474121,
0.35648539662361145,
0.19966869056224823,
0.08501605689525604,
0.14053520560264587,
-0.1578916311264038,
-0.23459582030773163,
0.3939749300479889,
0.058213986456394196,
-0.031515780836343765,
-0.06184064596891403,
-0.21309028565883636,
-0.41257795691490173,
0.07717838883399963,
0.21824470162391663,
-0.09157699346542358,
0.23038677871227264,
0.33853811025619507,
0.0952061265707016,
-0.009405594319105148,
-0.043818674981594086,
0.09800031036138535,
-0.16319184005260468,
0.5890393853187561,
0.365780234336853,
0.29439777135849,
-0.47266632318496704,
-0.4595133662223816,
-0.43187978863716125,
0.4607594609260559,
-0.12002648413181305,
0.132616326212883,
0.23355597257614136,
0.17432528734207153,
0.058635588735342026,
0.06161138042807579,
0.1084991991519928,
0.4466966986656189,
-0.2370329648256302,
0.2657867670059204,
-0.3800933361053467,
0.4180727005004883,
0.01499650627374649,
-0.03603719174861908,
-0.1832066774368286,
-0.21836385130882263,
0.31003236770629883,
-0.2936552166938782,
0.1718757450580597,
-0.18044845759868622,
-0.15505263209342957,
0.2990252673625946,
0.17784638702869415,
0.5840935707092285,
0.02026558481156826,
0.3855084776878357,
0.043358273804187775,
0.32655277848243713,
-0.08953961730003357,
-0.33819782733917236,
-0.19214023649692535,
0.3090170919895172,
-0.03293270990252495,
0.19288307428359985,
0.14078302681446075,
0.034765973687171936,
-0.30306708812713623,
0.02477317303419113,
-0.20387262105941772,
0.15293651819229126,
-0.11741871386766434,
0.12560738623142242,
-0.1389215737581253,
-0.010225278325378895,
-0.020186739042401314,
-0.10736792534589767,
0.1551193743944168,
0.3255603015422821,
-0.5399783849716187,
-0.3889174461364746,
0.5106252431869507,
-0.3500750660896301,
-0.10789385437965393,
0.003339686430990696,
0.12971056997776031,
0.13026587665081024,
-0.004221692681312561,
-0.14214274287223816,
-0.058534685522317886,
0.7115306258201599,
-0.03090665116906166,
-0.2054668813943863,
0.300883948802948,
0.08334578573703766,
0.06466826796531677,
-0.08426870405673981,
0.2101767212152481,
0.09094908833503723,
-0.12346518039703369,
-0.23704077303409576,
-0.22667506337165833
] |
https://github.com/huggingface/datasets/issues/2206 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer | @mariosasko
I am hitting this bug in the Bert tokenizer too. I see that @albertvillanova labeled this as a bug back in April. Has there been a fix released yet?
What I did for now is to just disable the optimization in the HF library. @yana-xuyan and @thomas-happify, is that what you did and did that work for you?
| I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it? | 59 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
@mariosasko
I am hitting this bug in the Bert tokenizer too. I see that @albertvillanova labeled this as a bug back in April. Has there been a fix released yet?
What I did for now is to just disable the optimization in the HF library. @yana-xuyan and @thomas-happify, is that what you did and did that work for you?
| [
-0.23382806777954102,
0.29218754172325134,
-0.05882902815937996,
0.0690961554646492,
0.2734430730342865,
-0.08607131987810135,
0.183644101023674,
0.30556368827819824,
-0.5368507504463196,
-0.19321997463703156,
-0.04617111384868622,
0.4354694187641144,
-0.0010598590597510338,
-0.23817452788352966,
0.2536689043045044,
-0.09952966868877411,
0.04302576929330826,
0.2507619857788086,
0.26054781675338745,
0.13173149526119232,
-0.03214319050312042,
0.11182644218206406,
-0.14896172285079956,
0.5977945327758789,
-0.3350472152233124,
-0.12702304124832153,
0.09436842799186707,
0.06016158685088158,
-0.000636054202914238,
-0.7611904144287109,
0.036195479333400726,
0.07673604786396027,
0.2579457759857178,
0.1267624795436859,
-0.00011337600881233811,
0.08206740021705627,
0.306107759475708,
0.03466664254665375,
-0.03521796315908432,
0.04710453748703003,
0.19803065061569214,
-0.03412481024861336,
0.28386926651000977,
-0.24474084377288818,
0.04184143990278244,
-1.0216339826583862,
-0.09206410497426987,
0.17482104897499084,
0.49703657627105713,
0.2085009217262268,
0.22488632798194885,
0.20165270566940308,
0.4208301305770874,
0.04459817707538605,
0.4089099168777466,
0.04634864628314972,
0.11875737458467484,
0.21017467975616455,
0.06483953446149826,
-0.07449466735124588,
-0.008271276950836182,
-0.11885485053062439,
-0.3061370551586151,
0.222259521484375,
0.08198634535074234,
0.042217645794153214,
-0.012898564338684082,
-0.07670848816633224,
-0.07849353551864624,
-0.031129129230976105,
0.46162593364715576,
-0.4693734347820282,
-0.19589510560035706,
-0.09231960773468018,
0.018317367881536484,
-0.4163800776004791,
0.11079199612140656,
0.11426181346178055,
-0.21715883910655975,
0.0793030858039856,
0.11941884458065033,
-0.02175184153020382,
-0.2067582756280899,
0.1848452091217041,
-0.06624195724725723,
0.35413599014282227,
0.030877012759447098,
0.24332645535469055,
-0.00985347107052803,
0.017106961458921432,
0.2675448954105377,
0.13623282313346863,
-0.20636534690856934,
0.33366432785987854,
-0.3007293939590454,
0.06952766329050064,
-0.02754581719636917,
-0.21591341495513916,
0.13060250878334045,
0.17485982179641724,
0.1709090620279312,
0.10446508973836899,
0.1628209501504898,
0.07622087746858597,
-0.129957914352417,
0.1835838407278061,
-0.16275250911712646,
0.23255252838134766,
0.15856808423995972,
-0.31490907073020935,
0.03707870468497276,
-0.1459878385066986,
-0.3320128321647644,
-0.23848667740821838,
0.33299219608306885,
0.14776906371116638,
0.3388667702674866,
-0.009366385638713837,
-0.14679215848445892,
0.09477508068084717,
-0.4526159167289734,
-0.1450774073600769,
0.006100613623857498,
0.24553051590919495,
0.21822774410247803,
-0.22719824314117432,
-0.15378138422966003,
0.20555001497268677,
-0.10033335536718369,
-0.23287537693977356,
-0.1099831759929657,
-0.04150383546948433,
-0.01821993663907051,
0.18741515278816223,
0.20107434689998627,
0.028640948235988617,
0.25266024470329285,
0.1917855441570282,
-0.06186212599277496,
0.015293814241886139,
0.3261609971523285,
-0.17746852338314056,
0.00584769994020462,
0.353584885597229,
0.06309448182582855,
0.34277990460395813,
0.015878772363066673,
-0.07270483672618866,
-0.03578253835439682,
0.2693835496902466,
-0.3565315306186676,
-0.4401063024997711,
-0.27939093112945557,
0.16003826260566711,
-0.10129045695066452,
0.0013683363795280457,
-0.2858612537384033,
-0.03209057077765465,
0.42169639468193054,
-0.3251369893550873,
-0.1027347519993782,
-0.3298664093017578,
0.03377959504723549,
-0.36525553464889526,
0.3561749756336212,
-0.09025092422962189,
-0.5666176676750183,
0.13392388820648193,
-0.02298639342188835,
-0.1644708663225174,
0.1516377478837967,
0.3593241274356842,
-0.3796888589859009,
0.6116592288017273,
-0.36053726077079773,
0.6695793271064758,
0.23129120469093323,
-0.0378577820956707,
-0.266708642244339,
-0.1009032279253006,
-0.10926123708486557,
0.03141885995864868,
-0.1686679720878601,
-0.11117596924304962,
0.15045881271362305,
-0.07621381431818008,
-0.1399540901184082,
0.06321269273757935,
0.028835799545049667,
0.034126266837120056,
-0.16934333741664886,
-0.09713651239871979,
0.29929178953170776,
0.11675174534320831,
0.03255586698651314,
-0.13184982538223267,
0.015645019710063934,
-0.24720114469528198,
0.05634412169456482,
-0.3048321604728699,
0.13518445193767548,
0.07594861090183258,
0.2232835292816162,
-0.05525881052017212,
0.08947677165269852,
-0.119825579226017,
-0.24982523918151855,
0.005044281482696533,
-0.5045511722564697,
-0.05296720564365387,
-0.39332717657089233,
-0.009788481518626213,
-0.2112288773059845,
0.08801601082086563,
-0.19892971217632294,
0.10718382894992828,
0.19840624928474426,
0.10604358464479446,
0.004400860518217087,
0.15056349337100983,
0.036057572811841965,
-0.12745799124240875,
0.11764305830001831,
0.11948083341121674,
0.09447106719017029,
0.2554818093776703,
-0.20536577701568604,
-0.6145573854446411,
0.1276678442955017,
-0.036282122135162354,
0.21265515685081482,
-0.023284297436475754,
-0.07313452661037445,
0.2727454602718353,
-0.12844935059547424,
0.07189113646745682,
-0.29815351963043213,
0.0743245854973793,
0.026683460921049118,
-0.4504474103450775,
-0.12937100231647491,
-0.05122019723057747,
0.11518544703722,
-0.01850775256752968,
0.45642992854118347,
0.36567962169647217,
0.23420929908752441,
-0.06999119371175766,
-0.15629413723945618,
-0.21497036516666412,
0.20211350917816162,
0.03265215829014778,
0.28476500511169434,
0.15732374787330627,
0.07475346326828003,
0.32215458154678345,
0.16280977427959442,
-0.00371544249355793,
-0.06721457839012146,
0.10726244747638702,
0.3034680485725403,
-0.10845077037811279,
0.07636643201112747,
0.04729701206088066,
-0.10526692122220993,
-0.10092775523662567,
0.05442681163549423,
-0.4296983480453491,
0.20587456226348877,
0.16280077397823334,
-0.33975034952163696,
0.013967443257570267,
-0.07337872684001923,
-0.13702839612960815,
0.15539564192295074,
0.06317305564880371,
0.38423219323158264,
0.3814515769481659,
0.2945331335067749,
0.07297220826148987,
-0.1637675166130066,
0.01703604683279991,
0.2265654057264328,
0.36002805829048157,
-0.45546066761016846,
-0.0783180296421051,
-0.1630181521177292,
-0.050847843289375305,
0.1702338010072708,
-0.32162952423095703,
-0.048630211502313614,
-0.15233057737350464,
0.02683030441403389,
0.08648470044136047,
-0.051729921251535416,
0.20238439738750458,
0.06737677752971649,
0.04597216844558716,
0.19582095742225647,
-0.02316112630069256,
-0.39776501059532166,
-0.2804776728153229,
-0.21865418553352356,
0.0824890285730362,
0.30155497789382935,
0.04037821292877197,
0.2039320319890976,
0.23747305572032928,
0.0278315506875515,
-0.1771768480539322,
-0.33922290802001953,
0.04295198619365692,
-0.07369707524776459,
0.2346137911081314,
0.0524713471531868,
-0.03117230534553528,
-0.08038944005966187,
-0.47517797350883484,
0.22250890731811523,
-0.23647165298461914,
-0.29547956585884094,
0.16463789343833923,
-0.1729840785264969,
-0.000473765772767365,
-0.008544739335775375,
-0.05600110441446304,
-0.224429190158844,
-0.11343076825141907,
0.12823325395584106,
0.08391819894313812,
0.1650998443365097,
-0.24483250081539154,
-0.0034247832372784615,
0.173871248960495,
-0.20329082012176514,
-0.19707073271274567,
-0.1134401485323906,
0.04536687955260277,
0.35198071599006653,
-0.19461874663829803,
-0.22353674471378326,
-0.1290646493434906,
-0.0890226885676384,
0.33350303769111633,
0.10649638622999191,
-0.26847460865974426,
0.13664039969444275,
-0.03243846446275711,
0.4266340136528015,
-0.32160723209381104,
-0.3929843604564667,
0.38265475630760193,
0.0959019586443901,
-0.11605901271104813,
0.02036081999540329,
-0.009244993329048157,
0.035899803042411804,
-0.19529682397842407,
-0.12220079451799393,
-0.04957282543182373,
0.3201511800289154,
-0.12643323838710785,
0.8966099619865417,
-0.277832567691803,
-0.11232572793960571,
0.476563036441803,
-0.058532580733299255,
-0.04927957430481911,
-0.11971405893564224,
-0.11733191460371017,
-0.10538358986377716,
-0.12198132276535034,
0.15857596695423126,
0.041514091193675995,
-0.3985210061073303,
-0.3152049779891968,
0.117641881108284,
-0.0033426377922296524,
-0.4849431812763214,
-0.1623237431049347,
0.024830402806401253,
-0.006015263497829437,
0.3399604558944702,
0.08089430630207062,
-0.1960049569606781,
-0.23497210443019867,
-0.10445483773946762,
0.10025160014629364,
-0.09644277393817902,
0.14609797298908234,
-0.0823536068201065,
-0.6153334379196167,
-0.0263248048722744,
-0.3447530269622803,
0.35089802742004395,
0.23034390807151794,
0.2787732183933258,
-0.025200653821229935,
0.05465894937515259,
0.15544474124908447,
-0.26453521847724915,
0.3481025695800781,
0.046081334352493286,
-0.07931284606456757,
0.37789058685302734,
0.06736503541469574,
-0.4065197706222534,
-0.25913822650909424,
-0.1735212504863739,
0.2162076085805893,
0.17352797091007233,
0.2088097780942917,
-0.3339238464832306,
-0.1532547026872635,
0.14592823386192322,
0.03174818307161331,
-0.07581911236047745,
-0.16073624789714813,
-0.24237842857837677,
-0.3862485885620117,
-0.27525433897972107,
0.07773531973361969,
0.09059811383485794,
0.2722553014755249,
-0.19242654740810394,
-0.02512616477906704,
-0.17413824796676636,
-0.10111153870820999,
-0.13570736348628998,
-0.023022359237074852,
0.22618505358695984,
-0.05084039643406868,
0.010964516550302505,
0.0407169908285141,
-0.0713447779417038,
0.5171346664428711,
-0.01051286980509758,
0.6572526693344116,
-0.32707464694976807,
0.014612910337746143,
0.035802192986011505,
0.31063583493232727,
-0.10369458794593811,
-0.27226606011390686,
0.45531630516052246,
-0.22562198340892792,
0.08862704783678055,
0.014384791254997253,
0.24329136312007904,
0.3678913414478302,
-0.2389952689409256,
-0.354692280292511,
-0.028596870601177216,
0.2601584196090698,
0.06814691424369812,
-0.13545596599578857,
0.33132871985435486,
-0.11814132332801819,
-0.319192111492157,
0.33941876888275146,
0.29600679874420166,
0.7895691990852356,
-0.1261400729417801,
0.15476928651332855,
0.5485853552818298,
-0.2694834768772125,
0.3345361649990082,
-0.17980143427848816,
0.035976242274045944,
-0.44158127903938293,
-0.006323901005089283,
0.07517459988594055,
-0.32066354155540466,
0.059069424867630005,
0.13494625687599182,
-0.13401922583580017,
-0.16228777170181274,
-0.13212524354457855,
0.34389370679855347,
0.34005001187324524,
0.33289942145347595,
0.1474965661764145,
-0.017819836735725403,
0.09483049809932709,
0.13080395758152008,
-0.4046940207481384,
-0.13410775363445282,
-0.22592979669570923,
-0.1723214089870453,
-0.033579595386981964,
-0.12218773365020752,
-0.1576714813709259,
0.01731967180967331,
-0.45613980293273926,
0.3478037118911743,
0.08491653203964233,
-0.31622034311294556,
0.16103094816207886,
-0.04743874445557594,
0.10190485417842865,
0.1037970781326294,
-0.1716717928647995,
0.15282464027404785,
-0.08265716582536697,
-0.14299537241458893,
-0.21423080563545227,
-0.24958443641662598,
0.03752274811267853,
-0.08661285787820816,
-0.2825958728790283,
0.432239294052124,
-0.11398009210824966,
-0.21027109026908875,
-0.17286749184131622,
0.012537039816379547,
0.31191521883010864,
-0.2836610674858093,
0.20267798006534576,
-0.23008230328559875,
0.03160623833537102,
-0.19420965015888214,
0.12119497358798981,
0.03953561186790466,
-0.03126790001988411,
0.01405203714966774,
-0.22412319481372833,
-0.05337683483958244,
-0.0647389143705368,
0.10199794918298721,
0.1302523910999298,
0.07190026342868805,
0.852497935295105,
-0.011723604053258896,
-0.016146136447787285,
-0.13193276524543762,
-0.027851726859807968,
0.14472785592079163,
-0.692668616771698,
0.2088911086320877,
0.18934568762779236,
0.1745970994234085,
-0.036252379417419434,
0.21444009244441986,
-0.06015298515558243,
0.15398716926574707,
0.11375638842582703,
-0.2568928003311157,
-0.3925023376941681,
0.10094808042049408,
-0.01556326076388359,
0.17327846586704254,
0.22804173827171326,
0.4849223494529724,
-0.2576967179775238,
0.24411825835704803,
-0.2813732624053955,
0.213856503367424,
-0.12691959738731384,
0.18813148140907288,
-0.3539939224720001,
-0.245778888463974,
-0.24187257885932922,
0.12090343236923218,
0.18275031447410583,
0.22708481550216675,
-0.08800061792135239,
-0.26218506693840027,
-0.06284231692552567,
0.1547938734292984,
0.10439615696668625,
-0.4758484661579132,
0.13845907151699066,
-0.07764919847249985,
0.08564816415309906,
0.04432769492268562,
0.14141088724136353,
0.008313976228237152,
-0.02389524132013321,
-0.029442433267831802,
0.6121736764907837,
0.033385440707206726,
-0.17803049087524414,
0.17458808422088623,
-0.32527977228164673,
-0.03555823862552643,
0.09403122216463089,
0.4215209186077118,
-0.07841598242521286,
0.040830813348293304,
0.07821924239397049,
0.033282577991485596,
0.26589909195899963,
-0.1068006083369255,
0.10577089339494705,
-0.514942467212677,
-0.3337250351905823,
-0.2798561453819275,
0.2233312875032425,
0.09471333026885986,
-0.31389427185058594,
-0.2480108141899109,
0.28715193271636963,
0.21261052787303925,
-0.2153720259666443,
-0.011920600198209286,
0.15171772241592407,
-0.05331400781869888,
-0.24991482496261597,
-0.018037132918834686,
0.3401537835597992,
-0.1459801346063614,
0.014054305851459503,
0.04994598776102066,
0.5240614414215088,
0.16422775387763977,
-0.1419709324836731,
0.06783637404441833,
-0.149908185005188,
-0.13437926769256592,
0.3621259331703186,
0.0754968598484993,
0.05894123390316963,
0.07912304997444153,
-0.21448299288749695,
0.10446847230195999,
0.20812702178955078,
0.18392908573150635,
0.011675752699375153,
-0.41322439908981323,
-0.2656545639038086,
0.25235283374786377,
0.054742325097322464,
-0.07374658435583115,
-0.004985228180885315,
0.33774465322494507,
0.6447908878326416,
-0.14229832589626312,
-0.09684479981660843,
0.5756675004959106,
-0.23292171955108643,
0.0020323507487773895,
-0.375676691532135,
-0.14658939838409424,
0.07459151744842529,
-0.035997677594423294,
-0.10463777184486389,
-0.18386928737163544,
-0.018551431596279144,
0.22492291033267975,
-0.36631494760513306,
-0.3276275098323822,
0.5081472992897034,
0.2541375756263733,
-0.08476156741380692,
-0.1901150494813919,
0.36026373505592346,
0.18093085289001465,
-0.24437272548675537,
0.02193962037563324,
0.41663649678230286,
0.698130190372467,
0.38446635007858276,
-0.26210933923721313,
0.06619031727313995,
-0.15172307193279266,
0.1134638786315918,
0.1007222831249237,
0.2648787498474121,
0.35648539662361145,
0.19966869056224823,
0.08501605689525604,
0.14053520560264587,
-0.1578916311264038,
-0.23459582030773163,
0.3939749300479889,
0.058213986456394196,
-0.031515780836343765,
-0.06184064596891403,
-0.21309028565883636,
-0.41257795691490173,
0.07717838883399963,
0.21824470162391663,
-0.09157699346542358,
0.23038677871227264,
0.33853811025619507,
0.0952061265707016,
-0.009405594319105148,
-0.043818674981594086,
0.09800031036138535,
-0.16319184005260468,
0.5890393853187561,
0.365780234336853,
0.29439777135849,
-0.47266632318496704,
-0.4595133662223816,
-0.43187978863716125,
0.4607594609260559,
-0.12002648413181305,
0.132616326212883,
0.23355597257614136,
0.17432528734207153,
0.058635588735342026,
0.06161138042807579,
0.1084991991519928,
0.4466966986656189,
-0.2370329648256302,
0.2657867670059204,
-0.3800933361053467,
0.4180727005004883,
0.01499650627374649,
-0.03603719174861908,
-0.1832066774368286,
-0.21836385130882263,
0.31003236770629883,
-0.2936552166938782,
0.1718757450580597,
-0.18044845759868622,
-0.15505263209342957,
0.2990252673625946,
0.17784638702869415,
0.5840935707092285,
0.02026558481156826,
0.3855084776878357,
0.043358273804187775,
0.32655277848243713,
-0.08953961730003357,
-0.33819782733917236,
-0.19214023649692535,
0.3090170919895172,
-0.03293270990252495,
0.19288307428359985,
0.14078302681446075,
0.034765973687171936,
-0.30306708812713623,
0.02477317303419113,
-0.20387262105941772,
0.15293651819229126,
-0.11741871386766434,
0.12560738623142242,
-0.1389215737581253,
-0.010225278325378895,
-0.020186739042401314,
-0.10736792534589767,
0.1551193743944168,
0.3255603015422821,
-0.5399783849716187,
-0.3889174461364746,
0.5106252431869507,
-0.3500750660896301,
-0.10789385437965393,
0.003339686430990696,
0.12971056997776031,
0.13026587665081024,
-0.004221692681312561,
-0.14214274287223816,
-0.058534685522317886,
0.7115306258201599,
-0.03090665116906166,
-0.2054668813943863,
0.300883948802948,
0.08334578573703766,
0.06466826796531677,
-0.08426870405673981,
0.2101767212152481,
0.09094908833503723,
-0.12346518039703369,
-0.23704077303409576,
-0.22667506337165833
] |
https://github.com/huggingface/datasets/issues/2206 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer | Hi @gregg-ADP,
This is still a bug.
As @albertvillanova has suggested, maybe it's indeed worth adding a variable to `config.py` to have a way to disable this behavior.
In the meantime, this forced optimization can be disabled by specifying `features` (of the returned examples) in the `map` call:
```python
from datasets import *
... # dataset init
ds.map(process_example, features=Features({"special_tokens_mask": Sequence(Value("int32")), ... rest of the features})
```
cc @lhoestq so he is also aware of this issue | I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it? | 76 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
Hi @gregg-ADP,
This is still a bug.
As @albertvillanova has suggested, maybe it's indeed worth adding a variable to `config.py` to have a way to disable this behavior.
In the meantime, this forced optimization can be disabled by specifying `features` (of the returned examples) in the `map` call:
```python
from datasets import *
... # dataset init
ds.map(process_example, features=Features({"special_tokens_mask": Sequence(Value("int32")), ... rest of the features})
```
cc @lhoestq so he is also aware of this issue | [
-0.23382806777954102,
0.29218754172325134,
-0.05882902815937996,
0.0690961554646492,
0.2734430730342865,
-0.08607131987810135,
0.183644101023674,
0.30556368827819824,
-0.5368507504463196,
-0.19321997463703156,
-0.04617111384868622,
0.4354694187641144,
-0.0010598590597510338,
-0.23817452788352966,
0.2536689043045044,
-0.09952966868877411,
0.04302576929330826,
0.2507619857788086,
0.26054781675338745,
0.13173149526119232,
-0.03214319050312042,
0.11182644218206406,
-0.14896172285079956,
0.5977945327758789,
-0.3350472152233124,
-0.12702304124832153,
0.09436842799186707,
0.06016158685088158,
-0.000636054202914238,
-0.7611904144287109,
0.036195479333400726,
0.07673604786396027,
0.2579457759857178,
0.1267624795436859,
-0.00011337600881233811,
0.08206740021705627,
0.306107759475708,
0.03466664254665375,
-0.03521796315908432,
0.04710453748703003,
0.19803065061569214,
-0.03412481024861336,
0.28386926651000977,
-0.24474084377288818,
0.04184143990278244,
-1.0216339826583862,
-0.09206410497426987,
0.17482104897499084,
0.49703657627105713,
0.2085009217262268,
0.22488632798194885,
0.20165270566940308,
0.4208301305770874,
0.04459817707538605,
0.4089099168777466,
0.04634864628314972,
0.11875737458467484,
0.21017467975616455,
0.06483953446149826,
-0.07449466735124588,
-0.008271276950836182,
-0.11885485053062439,
-0.3061370551586151,
0.222259521484375,
0.08198634535074234,
0.042217645794153214,
-0.012898564338684082,
-0.07670848816633224,
-0.07849353551864624,
-0.031129129230976105,
0.46162593364715576,
-0.4693734347820282,
-0.19589510560035706,
-0.09231960773468018,
0.018317367881536484,
-0.4163800776004791,
0.11079199612140656,
0.11426181346178055,
-0.21715883910655975,
0.0793030858039856,
0.11941884458065033,
-0.02175184153020382,
-0.2067582756280899,
0.1848452091217041,
-0.06624195724725723,
0.35413599014282227,
0.030877012759447098,
0.24332645535469055,
-0.00985347107052803,
0.017106961458921432,
0.2675448954105377,
0.13623282313346863,
-0.20636534690856934,
0.33366432785987854,
-0.3007293939590454,
0.06952766329050064,
-0.02754581719636917,
-0.21591341495513916,
0.13060250878334045,
0.17485982179641724,
0.1709090620279312,
0.10446508973836899,
0.1628209501504898,
0.07622087746858597,
-0.129957914352417,
0.1835838407278061,
-0.16275250911712646,
0.23255252838134766,
0.15856808423995972,
-0.31490907073020935,
0.03707870468497276,
-0.1459878385066986,
-0.3320128321647644,
-0.23848667740821838,
0.33299219608306885,
0.14776906371116638,
0.3388667702674866,
-0.009366385638713837,
-0.14679215848445892,
0.09477508068084717,
-0.4526159167289734,
-0.1450774073600769,
0.006100613623857498,
0.24553051590919495,
0.21822774410247803,
-0.22719824314117432,
-0.15378138422966003,
0.20555001497268677,
-0.10033335536718369,
-0.23287537693977356,
-0.1099831759929657,
-0.04150383546948433,
-0.01821993663907051,
0.18741515278816223,
0.20107434689998627,
0.028640948235988617,
0.25266024470329285,
0.1917855441570282,
-0.06186212599277496,
0.015293814241886139,
0.3261609971523285,
-0.17746852338314056,
0.00584769994020462,
0.353584885597229,
0.06309448182582855,
0.34277990460395813,
0.015878772363066673,
-0.07270483672618866,
-0.03578253835439682,
0.2693835496902466,
-0.3565315306186676,
-0.4401063024997711,
-0.27939093112945557,
0.16003826260566711,
-0.10129045695066452,
0.0013683363795280457,
-0.2858612537384033,
-0.03209057077765465,
0.42169639468193054,
-0.3251369893550873,
-0.1027347519993782,
-0.3298664093017578,
0.03377959504723549,
-0.36525553464889526,
0.3561749756336212,
-0.09025092422962189,
-0.5666176676750183,
0.13392388820648193,
-0.02298639342188835,
-0.1644708663225174,
0.1516377478837967,
0.3593241274356842,
-0.3796888589859009,
0.6116592288017273,
-0.36053726077079773,
0.6695793271064758,
0.23129120469093323,
-0.0378577820956707,
-0.266708642244339,
-0.1009032279253006,
-0.10926123708486557,
0.03141885995864868,
-0.1686679720878601,
-0.11117596924304962,
0.15045881271362305,
-0.07621381431818008,
-0.1399540901184082,
0.06321269273757935,
0.028835799545049667,
0.034126266837120056,
-0.16934333741664886,
-0.09713651239871979,
0.29929178953170776,
0.11675174534320831,
0.03255586698651314,
-0.13184982538223267,
0.015645019710063934,
-0.24720114469528198,
0.05634412169456482,
-0.3048321604728699,
0.13518445193767548,
0.07594861090183258,
0.2232835292816162,
-0.05525881052017212,
0.08947677165269852,
-0.119825579226017,
-0.24982523918151855,
0.005044281482696533,
-0.5045511722564697,
-0.05296720564365387,
-0.39332717657089233,
-0.009788481518626213,
-0.2112288773059845,
0.08801601082086563,
-0.19892971217632294,
0.10718382894992828,
0.19840624928474426,
0.10604358464479446,
0.004400860518217087,
0.15056349337100983,
0.036057572811841965,
-0.12745799124240875,
0.11764305830001831,
0.11948083341121674,
0.09447106719017029,
0.2554818093776703,
-0.20536577701568604,
-0.6145573854446411,
0.1276678442955017,
-0.036282122135162354,
0.21265515685081482,
-0.023284297436475754,
-0.07313452661037445,
0.2727454602718353,
-0.12844935059547424,
0.07189113646745682,
-0.29815351963043213,
0.0743245854973793,
0.026683460921049118,
-0.4504474103450775,
-0.12937100231647491,
-0.05122019723057747,
0.11518544703722,
-0.01850775256752968,
0.45642992854118347,
0.36567962169647217,
0.23420929908752441,
-0.06999119371175766,
-0.15629413723945618,
-0.21497036516666412,
0.20211350917816162,
0.03265215829014778,
0.28476500511169434,
0.15732374787330627,
0.07475346326828003,
0.32215458154678345,
0.16280977427959442,
-0.00371544249355793,
-0.06721457839012146,
0.10726244747638702,
0.3034680485725403,
-0.10845077037811279,
0.07636643201112747,
0.04729701206088066,
-0.10526692122220993,
-0.10092775523662567,
0.05442681163549423,
-0.4296983480453491,
0.20587456226348877,
0.16280077397823334,
-0.33975034952163696,
0.013967443257570267,
-0.07337872684001923,
-0.13702839612960815,
0.15539564192295074,
0.06317305564880371,
0.38423219323158264,
0.3814515769481659,
0.2945331335067749,
0.07297220826148987,
-0.1637675166130066,
0.01703604683279991,
0.2265654057264328,
0.36002805829048157,
-0.45546066761016846,
-0.0783180296421051,
-0.1630181521177292,
-0.050847843289375305,
0.1702338010072708,
-0.32162952423095703,
-0.048630211502313614,
-0.15233057737350464,
0.02683030441403389,
0.08648470044136047,
-0.051729921251535416,
0.20238439738750458,
0.06737677752971649,
0.04597216844558716,
0.19582095742225647,
-0.02316112630069256,
-0.39776501059532166,
-0.2804776728153229,
-0.21865418553352356,
0.0824890285730362,
0.30155497789382935,
0.04037821292877197,
0.2039320319890976,
0.23747305572032928,
0.0278315506875515,
-0.1771768480539322,
-0.33922290802001953,
0.04295198619365692,
-0.07369707524776459,
0.2346137911081314,
0.0524713471531868,
-0.03117230534553528,
-0.08038944005966187,
-0.47517797350883484,
0.22250890731811523,
-0.23647165298461914,
-0.29547956585884094,
0.16463789343833923,
-0.1729840785264969,
-0.000473765772767365,
-0.008544739335775375,
-0.05600110441446304,
-0.224429190158844,
-0.11343076825141907,
0.12823325395584106,
0.08391819894313812,
0.1650998443365097,
-0.24483250081539154,
-0.0034247832372784615,
0.173871248960495,
-0.20329082012176514,
-0.19707073271274567,
-0.1134401485323906,
0.04536687955260277,
0.35198071599006653,
-0.19461874663829803,
-0.22353674471378326,
-0.1290646493434906,
-0.0890226885676384,
0.33350303769111633,
0.10649638622999191,
-0.26847460865974426,
0.13664039969444275,
-0.03243846446275711,
0.4266340136528015,
-0.32160723209381104,
-0.3929843604564667,
0.38265475630760193,
0.0959019586443901,
-0.11605901271104813,
0.02036081999540329,
-0.009244993329048157,
0.035899803042411804,
-0.19529682397842407,
-0.12220079451799393,
-0.04957282543182373,
0.3201511800289154,
-0.12643323838710785,
0.8966099619865417,
-0.277832567691803,
-0.11232572793960571,
0.476563036441803,
-0.058532580733299255,
-0.04927957430481911,
-0.11971405893564224,
-0.11733191460371017,
-0.10538358986377716,
-0.12198132276535034,
0.15857596695423126,
0.041514091193675995,
-0.3985210061073303,
-0.3152049779891968,
0.117641881108284,
-0.0033426377922296524,
-0.4849431812763214,
-0.1623237431049347,
0.024830402806401253,
-0.006015263497829437,
0.3399604558944702,
0.08089430630207062,
-0.1960049569606781,
-0.23497210443019867,
-0.10445483773946762,
0.10025160014629364,
-0.09644277393817902,
0.14609797298908234,
-0.0823536068201065,
-0.6153334379196167,
-0.0263248048722744,
-0.3447530269622803,
0.35089802742004395,
0.23034390807151794,
0.2787732183933258,
-0.025200653821229935,
0.05465894937515259,
0.15544474124908447,
-0.26453521847724915,
0.3481025695800781,
0.046081334352493286,
-0.07931284606456757,
0.37789058685302734,
0.06736503541469574,
-0.4065197706222534,
-0.25913822650909424,
-0.1735212504863739,
0.2162076085805893,
0.17352797091007233,
0.2088097780942917,
-0.3339238464832306,
-0.1532547026872635,
0.14592823386192322,
0.03174818307161331,
-0.07581911236047745,
-0.16073624789714813,
-0.24237842857837677,
-0.3862485885620117,
-0.27525433897972107,
0.07773531973361969,
0.09059811383485794,
0.2722553014755249,
-0.19242654740810394,
-0.02512616477906704,
-0.17413824796676636,
-0.10111153870820999,
-0.13570736348628998,
-0.023022359237074852,
0.22618505358695984,
-0.05084039643406868,
0.010964516550302505,
0.0407169908285141,
-0.0713447779417038,
0.5171346664428711,
-0.01051286980509758,
0.6572526693344116,
-0.32707464694976807,
0.014612910337746143,
0.035802192986011505,
0.31063583493232727,
-0.10369458794593811,
-0.27226606011390686,
0.45531630516052246,
-0.22562198340892792,
0.08862704783678055,
0.014384791254997253,
0.24329136312007904,
0.3678913414478302,
-0.2389952689409256,
-0.354692280292511,
-0.028596870601177216,
0.2601584196090698,
0.06814691424369812,
-0.13545596599578857,
0.33132871985435486,
-0.11814132332801819,
-0.319192111492157,
0.33941876888275146,
0.29600679874420166,
0.7895691990852356,
-0.1261400729417801,
0.15476928651332855,
0.5485853552818298,
-0.2694834768772125,
0.3345361649990082,
-0.17980143427848816,
0.035976242274045944,
-0.44158127903938293,
-0.006323901005089283,
0.07517459988594055,
-0.32066354155540466,
0.059069424867630005,
0.13494625687599182,
-0.13401922583580017,
-0.16228777170181274,
-0.13212524354457855,
0.34389370679855347,
0.34005001187324524,
0.33289942145347595,
0.1474965661764145,
-0.017819836735725403,
0.09483049809932709,
0.13080395758152008,
-0.4046940207481384,
-0.13410775363445282,
-0.22592979669570923,
-0.1723214089870453,
-0.033579595386981964,
-0.12218773365020752,
-0.1576714813709259,
0.01731967180967331,
-0.45613980293273926,
0.3478037118911743,
0.08491653203964233,
-0.31622034311294556,
0.16103094816207886,
-0.04743874445557594,
0.10190485417842865,
0.1037970781326294,
-0.1716717928647995,
0.15282464027404785,
-0.08265716582536697,
-0.14299537241458893,
-0.21423080563545227,
-0.24958443641662598,
0.03752274811267853,
-0.08661285787820816,
-0.2825958728790283,
0.432239294052124,
-0.11398009210824966,
-0.21027109026908875,
-0.17286749184131622,
0.012537039816379547,
0.31191521883010864,
-0.2836610674858093,
0.20267798006534576,
-0.23008230328559875,
0.03160623833537102,
-0.19420965015888214,
0.12119497358798981,
0.03953561186790466,
-0.03126790001988411,
0.01405203714966774,
-0.22412319481372833,
-0.05337683483958244,
-0.0647389143705368,
0.10199794918298721,
0.1302523910999298,
0.07190026342868805,
0.852497935295105,
-0.011723604053258896,
-0.016146136447787285,
-0.13193276524543762,
-0.027851726859807968,
0.14472785592079163,
-0.692668616771698,
0.2088911086320877,
0.18934568762779236,
0.1745970994234085,
-0.036252379417419434,
0.21444009244441986,
-0.06015298515558243,
0.15398716926574707,
0.11375638842582703,
-0.2568928003311157,
-0.3925023376941681,
0.10094808042049408,
-0.01556326076388359,
0.17327846586704254,
0.22804173827171326,
0.4849223494529724,
-0.2576967179775238,
0.24411825835704803,
-0.2813732624053955,
0.213856503367424,
-0.12691959738731384,
0.18813148140907288,
-0.3539939224720001,
-0.245778888463974,
-0.24187257885932922,
0.12090343236923218,
0.18275031447410583,
0.22708481550216675,
-0.08800061792135239,
-0.26218506693840027,
-0.06284231692552567,
0.1547938734292984,
0.10439615696668625,
-0.4758484661579132,
0.13845907151699066,
-0.07764919847249985,
0.08564816415309906,
0.04432769492268562,
0.14141088724136353,
0.008313976228237152,
-0.02389524132013321,
-0.029442433267831802,
0.6121736764907837,
0.033385440707206726,
-0.17803049087524414,
0.17458808422088623,
-0.32527977228164673,
-0.03555823862552643,
0.09403122216463089,
0.4215209186077118,
-0.07841598242521286,
0.040830813348293304,
0.07821924239397049,
0.033282577991485596,
0.26589909195899963,
-0.1068006083369255,
0.10577089339494705,
-0.514942467212677,
-0.3337250351905823,
-0.2798561453819275,
0.2233312875032425,
0.09471333026885986,
-0.31389427185058594,
-0.2480108141899109,
0.28715193271636963,
0.21261052787303925,
-0.2153720259666443,
-0.011920600198209286,
0.15171772241592407,
-0.05331400781869888,
-0.24991482496261597,
-0.018037132918834686,
0.3401537835597992,
-0.1459801346063614,
0.014054305851459503,
0.04994598776102066,
0.5240614414215088,
0.16422775387763977,
-0.1419709324836731,
0.06783637404441833,
-0.149908185005188,
-0.13437926769256592,
0.3621259331703186,
0.0754968598484993,
0.05894123390316963,
0.07912304997444153,
-0.21448299288749695,
0.10446847230195999,
0.20812702178955078,
0.18392908573150635,
0.011675752699375153,
-0.41322439908981323,
-0.2656545639038086,
0.25235283374786377,
0.054742325097322464,
-0.07374658435583115,
-0.004985228180885315,
0.33774465322494507,
0.6447908878326416,
-0.14229832589626312,
-0.09684479981660843,
0.5756675004959106,
-0.23292171955108643,
0.0020323507487773895,
-0.375676691532135,
-0.14658939838409424,
0.07459151744842529,
-0.035997677594423294,
-0.10463777184486389,
-0.18386928737163544,
-0.018551431596279144,
0.22492291033267975,
-0.36631494760513306,
-0.3276275098323822,
0.5081472992897034,
0.2541375756263733,
-0.08476156741380692,
-0.1901150494813919,
0.36026373505592346,
0.18093085289001465,
-0.24437272548675537,
0.02193962037563324,
0.41663649678230286,
0.698130190372467,
0.38446635007858276,
-0.26210933923721313,
0.06619031727313995,
-0.15172307193279266,
0.1134638786315918,
0.1007222831249237,
0.2648787498474121,
0.35648539662361145,
0.19966869056224823,
0.08501605689525604,
0.14053520560264587,
-0.1578916311264038,
-0.23459582030773163,
0.3939749300479889,
0.058213986456394196,
-0.031515780836343765,
-0.06184064596891403,
-0.21309028565883636,
-0.41257795691490173,
0.07717838883399963,
0.21824470162391663,
-0.09157699346542358,
0.23038677871227264,
0.33853811025619507,
0.0952061265707016,
-0.009405594319105148,
-0.043818674981594086,
0.09800031036138535,
-0.16319184005260468,
0.5890393853187561,
0.365780234336853,
0.29439777135849,
-0.47266632318496704,
-0.4595133662223816,
-0.43187978863716125,
0.4607594609260559,
-0.12002648413181305,
0.132616326212883,
0.23355597257614136,
0.17432528734207153,
0.058635588735342026,
0.06161138042807579,
0.1084991991519928,
0.4466966986656189,
-0.2370329648256302,
0.2657867670059204,
-0.3800933361053467,
0.4180727005004883,
0.01499650627374649,
-0.03603719174861908,
-0.1832066774368286,
-0.21836385130882263,
0.31003236770629883,
-0.2936552166938782,
0.1718757450580597,
-0.18044845759868622,
-0.15505263209342957,
0.2990252673625946,
0.17784638702869415,
0.5840935707092285,
0.02026558481156826,
0.3855084776878357,
0.043358273804187775,
0.32655277848243713,
-0.08953961730003357,
-0.33819782733917236,
-0.19214023649692535,
0.3090170919895172,
-0.03293270990252495,
0.19288307428359985,
0.14078302681446075,
0.034765973687171936,
-0.30306708812713623,
0.02477317303419113,
-0.20387262105941772,
0.15293651819229126,
-0.11741871386766434,
0.12560738623142242,
-0.1389215737581253,
-0.010225278325378895,
-0.020186739042401314,
-0.10736792534589767,
0.1551193743944168,
0.3255603015422821,
-0.5399783849716187,
-0.3889174461364746,
0.5106252431869507,
-0.3500750660896301,
-0.10789385437965393,
0.003339686430990696,
0.12971056997776031,
0.13026587665081024,
-0.004221692681312561,
-0.14214274287223816,
-0.058534685522317886,
0.7115306258201599,
-0.03090665116906166,
-0.2054668813943863,
0.300883948802948,
0.08334578573703766,
0.06466826796531677,
-0.08426870405673981,
0.2101767212152481,
0.09094908833503723,
-0.12346518039703369,
-0.23704077303409576,
-0.22667506337165833
] |
https://github.com/huggingface/datasets/issues/2206 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer | Thanks for the quick reply @mariosasko. What I did was to changed the optimizer to use int32 instead of int8.
What you're suggesting specifies the type for each feature explicitly without changing the HF code. This is definitely a better option. However, we are hitting a new error later:
```
File "/Users/ccccc/PycharmProjects/aaaa-ml/venv-source/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
TypeError: forward() got an unexpected keyword argument 'pos'
```
Where 'pos' is the name of a new feature we added. Do you agree that your way of fixing the optimizer issue will not fix our new issue? If not, I will continue with this optimizer fix until we resolve our other issue.
| I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it? | 111 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
Thanks for the quick reply @mariosasko. What I did was to changed the optimizer to use int32 instead of int8.
What you're suggesting specifies the type for each feature explicitly without changing the HF code. This is definitely a better option. However, we are hitting a new error later:
```
File "/Users/ccccc/PycharmProjects/aaaa-ml/venv-source/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
TypeError: forward() got an unexpected keyword argument 'pos'
```
Where 'pos' is the name of a new feature we added. Do you agree that your way of fixing the optimizer issue will not fix our new issue? If not, I will continue with this optimizer fix until we resolve our other issue.
| [
-0.23382806777954102,
0.29218754172325134,
-0.05882902815937996,
0.0690961554646492,
0.2734430730342865,
-0.08607131987810135,
0.183644101023674,
0.30556368827819824,
-0.5368507504463196,
-0.19321997463703156,
-0.04617111384868622,
0.4354694187641144,
-0.0010598590597510338,
-0.23817452788352966,
0.2536689043045044,
-0.09952966868877411,
0.04302576929330826,
0.2507619857788086,
0.26054781675338745,
0.13173149526119232,
-0.03214319050312042,
0.11182644218206406,
-0.14896172285079956,
0.5977945327758789,
-0.3350472152233124,
-0.12702304124832153,
0.09436842799186707,
0.06016158685088158,
-0.000636054202914238,
-0.7611904144287109,
0.036195479333400726,
0.07673604786396027,
0.2579457759857178,
0.1267624795436859,
-0.00011337600881233811,
0.08206740021705627,
0.306107759475708,
0.03466664254665375,
-0.03521796315908432,
0.04710453748703003,
0.19803065061569214,
-0.03412481024861336,
0.28386926651000977,
-0.24474084377288818,
0.04184143990278244,
-1.0216339826583862,
-0.09206410497426987,
0.17482104897499084,
0.49703657627105713,
0.2085009217262268,
0.22488632798194885,
0.20165270566940308,
0.4208301305770874,
0.04459817707538605,
0.4089099168777466,
0.04634864628314972,
0.11875737458467484,
0.21017467975616455,
0.06483953446149826,
-0.07449466735124588,
-0.008271276950836182,
-0.11885485053062439,
-0.3061370551586151,
0.222259521484375,
0.08198634535074234,
0.042217645794153214,
-0.012898564338684082,
-0.07670848816633224,
-0.07849353551864624,
-0.031129129230976105,
0.46162593364715576,
-0.4693734347820282,
-0.19589510560035706,
-0.09231960773468018,
0.018317367881536484,
-0.4163800776004791,
0.11079199612140656,
0.11426181346178055,
-0.21715883910655975,
0.0793030858039856,
0.11941884458065033,
-0.02175184153020382,
-0.2067582756280899,
0.1848452091217041,
-0.06624195724725723,
0.35413599014282227,
0.030877012759447098,
0.24332645535469055,
-0.00985347107052803,
0.017106961458921432,
0.2675448954105377,
0.13623282313346863,
-0.20636534690856934,
0.33366432785987854,
-0.3007293939590454,
0.06952766329050064,
-0.02754581719636917,
-0.21591341495513916,
0.13060250878334045,
0.17485982179641724,
0.1709090620279312,
0.10446508973836899,
0.1628209501504898,
0.07622087746858597,
-0.129957914352417,
0.1835838407278061,
-0.16275250911712646,
0.23255252838134766,
0.15856808423995972,
-0.31490907073020935,
0.03707870468497276,
-0.1459878385066986,
-0.3320128321647644,
-0.23848667740821838,
0.33299219608306885,
0.14776906371116638,
0.3388667702674866,
-0.009366385638713837,
-0.14679215848445892,
0.09477508068084717,
-0.4526159167289734,
-0.1450774073600769,
0.006100613623857498,
0.24553051590919495,
0.21822774410247803,
-0.22719824314117432,
-0.15378138422966003,
0.20555001497268677,
-0.10033335536718369,
-0.23287537693977356,
-0.1099831759929657,
-0.04150383546948433,
-0.01821993663907051,
0.18741515278816223,
0.20107434689998627,
0.028640948235988617,
0.25266024470329285,
0.1917855441570282,
-0.06186212599277496,
0.015293814241886139,
0.3261609971523285,
-0.17746852338314056,
0.00584769994020462,
0.353584885597229,
0.06309448182582855,
0.34277990460395813,
0.015878772363066673,
-0.07270483672618866,
-0.03578253835439682,
0.2693835496902466,
-0.3565315306186676,
-0.4401063024997711,
-0.27939093112945557,
0.16003826260566711,
-0.10129045695066452,
0.0013683363795280457,
-0.2858612537384033,
-0.03209057077765465,
0.42169639468193054,
-0.3251369893550873,
-0.1027347519993782,
-0.3298664093017578,
0.03377959504723549,
-0.36525553464889526,
0.3561749756336212,
-0.09025092422962189,
-0.5666176676750183,
0.13392388820648193,
-0.02298639342188835,
-0.1644708663225174,
0.1516377478837967,
0.3593241274356842,
-0.3796888589859009,
0.6116592288017273,
-0.36053726077079773,
0.6695793271064758,
0.23129120469093323,
-0.0378577820956707,
-0.266708642244339,
-0.1009032279253006,
-0.10926123708486557,
0.03141885995864868,
-0.1686679720878601,
-0.11117596924304962,
0.15045881271362305,
-0.07621381431818008,
-0.1399540901184082,
0.06321269273757935,
0.028835799545049667,
0.034126266837120056,
-0.16934333741664886,
-0.09713651239871979,
0.29929178953170776,
0.11675174534320831,
0.03255586698651314,
-0.13184982538223267,
0.015645019710063934,
-0.24720114469528198,
0.05634412169456482,
-0.3048321604728699,
0.13518445193767548,
0.07594861090183258,
0.2232835292816162,
-0.05525881052017212,
0.08947677165269852,
-0.119825579226017,
-0.24982523918151855,
0.005044281482696533,
-0.5045511722564697,
-0.05296720564365387,
-0.39332717657089233,
-0.009788481518626213,
-0.2112288773059845,
0.08801601082086563,
-0.19892971217632294,
0.10718382894992828,
0.19840624928474426,
0.10604358464479446,
0.004400860518217087,
0.15056349337100983,
0.036057572811841965,
-0.12745799124240875,
0.11764305830001831,
0.11948083341121674,
0.09447106719017029,
0.2554818093776703,
-0.20536577701568604,
-0.6145573854446411,
0.1276678442955017,
-0.036282122135162354,
0.21265515685081482,
-0.023284297436475754,
-0.07313452661037445,
0.2727454602718353,
-0.12844935059547424,
0.07189113646745682,
-0.29815351963043213,
0.0743245854973793,
0.026683460921049118,
-0.4504474103450775,
-0.12937100231647491,
-0.05122019723057747,
0.11518544703722,
-0.01850775256752968,
0.45642992854118347,
0.36567962169647217,
0.23420929908752441,
-0.06999119371175766,
-0.15629413723945618,
-0.21497036516666412,
0.20211350917816162,
0.03265215829014778,
0.28476500511169434,
0.15732374787330627,
0.07475346326828003,
0.32215458154678345,
0.16280977427959442,
-0.00371544249355793,
-0.06721457839012146,
0.10726244747638702,
0.3034680485725403,
-0.10845077037811279,
0.07636643201112747,
0.04729701206088066,
-0.10526692122220993,
-0.10092775523662567,
0.05442681163549423,
-0.4296983480453491,
0.20587456226348877,
0.16280077397823334,
-0.33975034952163696,
0.013967443257570267,
-0.07337872684001923,
-0.13702839612960815,
0.15539564192295074,
0.06317305564880371,
0.38423219323158264,
0.3814515769481659,
0.2945331335067749,
0.07297220826148987,
-0.1637675166130066,
0.01703604683279991,
0.2265654057264328,
0.36002805829048157,
-0.45546066761016846,
-0.0783180296421051,
-0.1630181521177292,
-0.050847843289375305,
0.1702338010072708,
-0.32162952423095703,
-0.048630211502313614,
-0.15233057737350464,
0.02683030441403389,
0.08648470044136047,
-0.051729921251535416,
0.20238439738750458,
0.06737677752971649,
0.04597216844558716,
0.19582095742225647,
-0.02316112630069256,
-0.39776501059532166,
-0.2804776728153229,
-0.21865418553352356,
0.0824890285730362,
0.30155497789382935,
0.04037821292877197,
0.2039320319890976,
0.23747305572032928,
0.0278315506875515,
-0.1771768480539322,
-0.33922290802001953,
0.04295198619365692,
-0.07369707524776459,
0.2346137911081314,
0.0524713471531868,
-0.03117230534553528,
-0.08038944005966187,
-0.47517797350883484,
0.22250890731811523,
-0.23647165298461914,
-0.29547956585884094,
0.16463789343833923,
-0.1729840785264969,
-0.000473765772767365,
-0.008544739335775375,
-0.05600110441446304,
-0.224429190158844,
-0.11343076825141907,
0.12823325395584106,
0.08391819894313812,
0.1650998443365097,
-0.24483250081539154,
-0.0034247832372784615,
0.173871248960495,
-0.20329082012176514,
-0.19707073271274567,
-0.1134401485323906,
0.04536687955260277,
0.35198071599006653,
-0.19461874663829803,
-0.22353674471378326,
-0.1290646493434906,
-0.0890226885676384,
0.33350303769111633,
0.10649638622999191,
-0.26847460865974426,
0.13664039969444275,
-0.03243846446275711,
0.4266340136528015,
-0.32160723209381104,
-0.3929843604564667,
0.38265475630760193,
0.0959019586443901,
-0.11605901271104813,
0.02036081999540329,
-0.009244993329048157,
0.035899803042411804,
-0.19529682397842407,
-0.12220079451799393,
-0.04957282543182373,
0.3201511800289154,
-0.12643323838710785,
0.8966099619865417,
-0.277832567691803,
-0.11232572793960571,
0.476563036441803,
-0.058532580733299255,
-0.04927957430481911,
-0.11971405893564224,
-0.11733191460371017,
-0.10538358986377716,
-0.12198132276535034,
0.15857596695423126,
0.041514091193675995,
-0.3985210061073303,
-0.3152049779891968,
0.117641881108284,
-0.0033426377922296524,
-0.4849431812763214,
-0.1623237431049347,
0.024830402806401253,
-0.006015263497829437,
0.3399604558944702,
0.08089430630207062,
-0.1960049569606781,
-0.23497210443019867,
-0.10445483773946762,
0.10025160014629364,
-0.09644277393817902,
0.14609797298908234,
-0.0823536068201065,
-0.6153334379196167,
-0.0263248048722744,
-0.3447530269622803,
0.35089802742004395,
0.23034390807151794,
0.2787732183933258,
-0.025200653821229935,
0.05465894937515259,
0.15544474124908447,
-0.26453521847724915,
0.3481025695800781,
0.046081334352493286,
-0.07931284606456757,
0.37789058685302734,
0.06736503541469574,
-0.4065197706222534,
-0.25913822650909424,
-0.1735212504863739,
0.2162076085805893,
0.17352797091007233,
0.2088097780942917,
-0.3339238464832306,
-0.1532547026872635,
0.14592823386192322,
0.03174818307161331,
-0.07581911236047745,
-0.16073624789714813,
-0.24237842857837677,
-0.3862485885620117,
-0.27525433897972107,
0.07773531973361969,
0.09059811383485794,
0.2722553014755249,
-0.19242654740810394,
-0.02512616477906704,
-0.17413824796676636,
-0.10111153870820999,
-0.13570736348628998,
-0.023022359237074852,
0.22618505358695984,
-0.05084039643406868,
0.010964516550302505,
0.0407169908285141,
-0.0713447779417038,
0.5171346664428711,
-0.01051286980509758,
0.6572526693344116,
-0.32707464694976807,
0.014612910337746143,
0.035802192986011505,
0.31063583493232727,
-0.10369458794593811,
-0.27226606011390686,
0.45531630516052246,
-0.22562198340892792,
0.08862704783678055,
0.014384791254997253,
0.24329136312007904,
0.3678913414478302,
-0.2389952689409256,
-0.354692280292511,
-0.028596870601177216,
0.2601584196090698,
0.06814691424369812,
-0.13545596599578857,
0.33132871985435486,
-0.11814132332801819,
-0.319192111492157,
0.33941876888275146,
0.29600679874420166,
0.7895691990852356,
-0.1261400729417801,
0.15476928651332855,
0.5485853552818298,
-0.2694834768772125,
0.3345361649990082,
-0.17980143427848816,
0.035976242274045944,
-0.44158127903938293,
-0.006323901005089283,
0.07517459988594055,
-0.32066354155540466,
0.059069424867630005,
0.13494625687599182,
-0.13401922583580017,
-0.16228777170181274,
-0.13212524354457855,
0.34389370679855347,
0.34005001187324524,
0.33289942145347595,
0.1474965661764145,
-0.017819836735725403,
0.09483049809932709,
0.13080395758152008,
-0.4046940207481384,
-0.13410775363445282,
-0.22592979669570923,
-0.1723214089870453,
-0.033579595386981964,
-0.12218773365020752,
-0.1576714813709259,
0.01731967180967331,
-0.45613980293273926,
0.3478037118911743,
0.08491653203964233,
-0.31622034311294556,
0.16103094816207886,
-0.04743874445557594,
0.10190485417842865,
0.1037970781326294,
-0.1716717928647995,
0.15282464027404785,
-0.08265716582536697,
-0.14299537241458893,
-0.21423080563545227,
-0.24958443641662598,
0.03752274811267853,
-0.08661285787820816,
-0.2825958728790283,
0.432239294052124,
-0.11398009210824966,
-0.21027109026908875,
-0.17286749184131622,
0.012537039816379547,
0.31191521883010864,
-0.2836610674858093,
0.20267798006534576,
-0.23008230328559875,
0.03160623833537102,
-0.19420965015888214,
0.12119497358798981,
0.03953561186790466,
-0.03126790001988411,
0.01405203714966774,
-0.22412319481372833,
-0.05337683483958244,
-0.0647389143705368,
0.10199794918298721,
0.1302523910999298,
0.07190026342868805,
0.852497935295105,
-0.011723604053258896,
-0.016146136447787285,
-0.13193276524543762,
-0.027851726859807968,
0.14472785592079163,
-0.692668616771698,
0.2088911086320877,
0.18934568762779236,
0.1745970994234085,
-0.036252379417419434,
0.21444009244441986,
-0.06015298515558243,
0.15398716926574707,
0.11375638842582703,
-0.2568928003311157,
-0.3925023376941681,
0.10094808042049408,
-0.01556326076388359,
0.17327846586704254,
0.22804173827171326,
0.4849223494529724,
-0.2576967179775238,
0.24411825835704803,
-0.2813732624053955,
0.213856503367424,
-0.12691959738731384,
0.18813148140907288,
-0.3539939224720001,
-0.245778888463974,
-0.24187257885932922,
0.12090343236923218,
0.18275031447410583,
0.22708481550216675,
-0.08800061792135239,
-0.26218506693840027,
-0.06284231692552567,
0.1547938734292984,
0.10439615696668625,
-0.4758484661579132,
0.13845907151699066,
-0.07764919847249985,
0.08564816415309906,
0.04432769492268562,
0.14141088724136353,
0.008313976228237152,
-0.02389524132013321,
-0.029442433267831802,
0.6121736764907837,
0.033385440707206726,
-0.17803049087524414,
0.17458808422088623,
-0.32527977228164673,
-0.03555823862552643,
0.09403122216463089,
0.4215209186077118,
-0.07841598242521286,
0.040830813348293304,
0.07821924239397049,
0.033282577991485596,
0.26589909195899963,
-0.1068006083369255,
0.10577089339494705,
-0.514942467212677,
-0.3337250351905823,
-0.2798561453819275,
0.2233312875032425,
0.09471333026885986,
-0.31389427185058594,
-0.2480108141899109,
0.28715193271636963,
0.21261052787303925,
-0.2153720259666443,
-0.011920600198209286,
0.15171772241592407,
-0.05331400781869888,
-0.24991482496261597,
-0.018037132918834686,
0.3401537835597992,
-0.1459801346063614,
0.014054305851459503,
0.04994598776102066,
0.5240614414215088,
0.16422775387763977,
-0.1419709324836731,
0.06783637404441833,
-0.149908185005188,
-0.13437926769256592,
0.3621259331703186,
0.0754968598484993,
0.05894123390316963,
0.07912304997444153,
-0.21448299288749695,
0.10446847230195999,
0.20812702178955078,
0.18392908573150635,
0.011675752699375153,
-0.41322439908981323,
-0.2656545639038086,
0.25235283374786377,
0.054742325097322464,
-0.07374658435583115,
-0.004985228180885315,
0.33774465322494507,
0.6447908878326416,
-0.14229832589626312,
-0.09684479981660843,
0.5756675004959106,
-0.23292171955108643,
0.0020323507487773895,
-0.375676691532135,
-0.14658939838409424,
0.07459151744842529,
-0.035997677594423294,
-0.10463777184486389,
-0.18386928737163544,
-0.018551431596279144,
0.22492291033267975,
-0.36631494760513306,
-0.3276275098323822,
0.5081472992897034,
0.2541375756263733,
-0.08476156741380692,
-0.1901150494813919,
0.36026373505592346,
0.18093085289001465,
-0.24437272548675537,
0.02193962037563324,
0.41663649678230286,
0.698130190372467,
0.38446635007858276,
-0.26210933923721313,
0.06619031727313995,
-0.15172307193279266,
0.1134638786315918,
0.1007222831249237,
0.2648787498474121,
0.35648539662361145,
0.19966869056224823,
0.08501605689525604,
0.14053520560264587,
-0.1578916311264038,
-0.23459582030773163,
0.3939749300479889,
0.058213986456394196,
-0.031515780836343765,
-0.06184064596891403,
-0.21309028565883636,
-0.41257795691490173,
0.07717838883399963,
0.21824470162391663,
-0.09157699346542358,
0.23038677871227264,
0.33853811025619507,
0.0952061265707016,
-0.009405594319105148,
-0.043818674981594086,
0.09800031036138535,
-0.16319184005260468,
0.5890393853187561,
0.365780234336853,
0.29439777135849,
-0.47266632318496704,
-0.4595133662223816,
-0.43187978863716125,
0.4607594609260559,
-0.12002648413181305,
0.132616326212883,
0.23355597257614136,
0.17432528734207153,
0.058635588735342026,
0.06161138042807579,
0.1084991991519928,
0.4466966986656189,
-0.2370329648256302,
0.2657867670059204,
-0.3800933361053467,
0.4180727005004883,
0.01499650627374649,
-0.03603719174861908,
-0.1832066774368286,
-0.21836385130882263,
0.31003236770629883,
-0.2936552166938782,
0.1718757450580597,
-0.18044845759868622,
-0.15505263209342957,
0.2990252673625946,
0.17784638702869415,
0.5840935707092285,
0.02026558481156826,
0.3855084776878357,
0.043358273804187775,
0.32655277848243713,
-0.08953961730003357,
-0.33819782733917236,
-0.19214023649692535,
0.3090170919895172,
-0.03293270990252495,
0.19288307428359985,
0.14078302681446075,
0.034765973687171936,
-0.30306708812713623,
0.02477317303419113,
-0.20387262105941772,
0.15293651819229126,
-0.11741871386766434,
0.12560738623142242,
-0.1389215737581253,
-0.010225278325378895,
-0.020186739042401314,
-0.10736792534589767,
0.1551193743944168,
0.3255603015422821,
-0.5399783849716187,
-0.3889174461364746,
0.5106252431869507,
-0.3500750660896301,
-0.10789385437965393,
0.003339686430990696,
0.12971056997776031,
0.13026587665081024,
-0.004221692681312561,
-0.14214274287223816,
-0.058534685522317886,
0.7115306258201599,
-0.03090665116906166,
-0.2054668813943863,
0.300883948802948,
0.08334578573703766,
0.06466826796531677,
-0.08426870405673981,
0.2101767212152481,
0.09094908833503723,
-0.12346518039703369,
-0.23704077303409576,
-0.22667506337165833
] |
https://github.com/huggingface/datasets/issues/2206 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer | Hi @gwc4github,
the fix was merged a few minutes ago, and it doesn't require any changes on the user side (e.g. no need for specifying `features`). If you find time, feel free to install `datasets` from master with:
```
pip install git+https://github.com/huggingface/datasets.git
```
and let us know if it works for your use case! | I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it? | 54 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
Hi @gwc4github,
the fix was merged a few minutes ago, and it doesn't require any changes on the user side (e.g. no need for specifying `features`). If you find time, feel free to install `datasets` from master with:
```
pip install git+https://github.com/huggingface/datasets.git
```
and let us know if it works for your use case! | [
-0.23382806777954102,
0.29218754172325134,
-0.05882902815937996,
0.0690961554646492,
0.2734430730342865,
-0.08607131987810135,
0.183644101023674,
0.30556368827819824,
-0.5368507504463196,
-0.19321997463703156,
-0.04617111384868622,
0.4354694187641144,
-0.0010598590597510338,
-0.23817452788352966,
0.2536689043045044,
-0.09952966868877411,
0.04302576929330826,
0.2507619857788086,
0.26054781675338745,
0.13173149526119232,
-0.03214319050312042,
0.11182644218206406,
-0.14896172285079956,
0.5977945327758789,
-0.3350472152233124,
-0.12702304124832153,
0.09436842799186707,
0.06016158685088158,
-0.000636054202914238,
-0.7611904144287109,
0.036195479333400726,
0.07673604786396027,
0.2579457759857178,
0.1267624795436859,
-0.00011337600881233811,
0.08206740021705627,
0.306107759475708,
0.03466664254665375,
-0.03521796315908432,
0.04710453748703003,
0.19803065061569214,
-0.03412481024861336,
0.28386926651000977,
-0.24474084377288818,
0.04184143990278244,
-1.0216339826583862,
-0.09206410497426987,
0.17482104897499084,
0.49703657627105713,
0.2085009217262268,
0.22488632798194885,
0.20165270566940308,
0.4208301305770874,
0.04459817707538605,
0.4089099168777466,
0.04634864628314972,
0.11875737458467484,
0.21017467975616455,
0.06483953446149826,
-0.07449466735124588,
-0.008271276950836182,
-0.11885485053062439,
-0.3061370551586151,
0.222259521484375,
0.08198634535074234,
0.042217645794153214,
-0.012898564338684082,
-0.07670848816633224,
-0.07849353551864624,
-0.031129129230976105,
0.46162593364715576,
-0.4693734347820282,
-0.19589510560035706,
-0.09231960773468018,
0.018317367881536484,
-0.4163800776004791,
0.11079199612140656,
0.11426181346178055,
-0.21715883910655975,
0.0793030858039856,
0.11941884458065033,
-0.02175184153020382,
-0.2067582756280899,
0.1848452091217041,
-0.06624195724725723,
0.35413599014282227,
0.030877012759447098,
0.24332645535469055,
-0.00985347107052803,
0.017106961458921432,
0.2675448954105377,
0.13623282313346863,
-0.20636534690856934,
0.33366432785987854,
-0.3007293939590454,
0.06952766329050064,
-0.02754581719636917,
-0.21591341495513916,
0.13060250878334045,
0.17485982179641724,
0.1709090620279312,
0.10446508973836899,
0.1628209501504898,
0.07622087746858597,
-0.129957914352417,
0.1835838407278061,
-0.16275250911712646,
0.23255252838134766,
0.15856808423995972,
-0.31490907073020935,
0.03707870468497276,
-0.1459878385066986,
-0.3320128321647644,
-0.23848667740821838,
0.33299219608306885,
0.14776906371116638,
0.3388667702674866,
-0.009366385638713837,
-0.14679215848445892,
0.09477508068084717,
-0.4526159167289734,
-0.1450774073600769,
0.006100613623857498,
0.24553051590919495,
0.21822774410247803,
-0.22719824314117432,
-0.15378138422966003,
0.20555001497268677,
-0.10033335536718369,
-0.23287537693977356,
-0.1099831759929657,
-0.04150383546948433,
-0.01821993663907051,
0.18741515278816223,
0.20107434689998627,
0.028640948235988617,
0.25266024470329285,
0.1917855441570282,
-0.06186212599277496,
0.015293814241886139,
0.3261609971523285,
-0.17746852338314056,
0.00584769994020462,
0.353584885597229,
0.06309448182582855,
0.34277990460395813,
0.015878772363066673,
-0.07270483672618866,
-0.03578253835439682,
0.2693835496902466,
-0.3565315306186676,
-0.4401063024997711,
-0.27939093112945557,
0.16003826260566711,
-0.10129045695066452,
0.0013683363795280457,
-0.2858612537384033,
-0.03209057077765465,
0.42169639468193054,
-0.3251369893550873,
-0.1027347519993782,
-0.3298664093017578,
0.03377959504723549,
-0.36525553464889526,
0.3561749756336212,
-0.09025092422962189,
-0.5666176676750183,
0.13392388820648193,
-0.02298639342188835,
-0.1644708663225174,
0.1516377478837967,
0.3593241274356842,
-0.3796888589859009,
0.6116592288017273,
-0.36053726077079773,
0.6695793271064758,
0.23129120469093323,
-0.0378577820956707,
-0.266708642244339,
-0.1009032279253006,
-0.10926123708486557,
0.03141885995864868,
-0.1686679720878601,
-0.11117596924304962,
0.15045881271362305,
-0.07621381431818008,
-0.1399540901184082,
0.06321269273757935,
0.028835799545049667,
0.034126266837120056,
-0.16934333741664886,
-0.09713651239871979,
0.29929178953170776,
0.11675174534320831,
0.03255586698651314,
-0.13184982538223267,
0.015645019710063934,
-0.24720114469528198,
0.05634412169456482,
-0.3048321604728699,
0.13518445193767548,
0.07594861090183258,
0.2232835292816162,
-0.05525881052017212,
0.08947677165269852,
-0.119825579226017,
-0.24982523918151855,
0.005044281482696533,
-0.5045511722564697,
-0.05296720564365387,
-0.39332717657089233,
-0.009788481518626213,
-0.2112288773059845,
0.08801601082086563,
-0.19892971217632294,
0.10718382894992828,
0.19840624928474426,
0.10604358464479446,
0.004400860518217087,
0.15056349337100983,
0.036057572811841965,
-0.12745799124240875,
0.11764305830001831,
0.11948083341121674,
0.09447106719017029,
0.2554818093776703,
-0.20536577701568604,
-0.6145573854446411,
0.1276678442955017,
-0.036282122135162354,
0.21265515685081482,
-0.023284297436475754,
-0.07313452661037445,
0.2727454602718353,
-0.12844935059547424,
0.07189113646745682,
-0.29815351963043213,
0.0743245854973793,
0.026683460921049118,
-0.4504474103450775,
-0.12937100231647491,
-0.05122019723057747,
0.11518544703722,
-0.01850775256752968,
0.45642992854118347,
0.36567962169647217,
0.23420929908752441,
-0.06999119371175766,
-0.15629413723945618,
-0.21497036516666412,
0.20211350917816162,
0.03265215829014778,
0.28476500511169434,
0.15732374787330627,
0.07475346326828003,
0.32215458154678345,
0.16280977427959442,
-0.00371544249355793,
-0.06721457839012146,
0.10726244747638702,
0.3034680485725403,
-0.10845077037811279,
0.07636643201112747,
0.04729701206088066,
-0.10526692122220993,
-0.10092775523662567,
0.05442681163549423,
-0.4296983480453491,
0.20587456226348877,
0.16280077397823334,
-0.33975034952163696,
0.013967443257570267,
-0.07337872684001923,
-0.13702839612960815,
0.15539564192295074,
0.06317305564880371,
0.38423219323158264,
0.3814515769481659,
0.2945331335067749,
0.07297220826148987,
-0.1637675166130066,
0.01703604683279991,
0.2265654057264328,
0.36002805829048157,
-0.45546066761016846,
-0.0783180296421051,
-0.1630181521177292,
-0.050847843289375305,
0.1702338010072708,
-0.32162952423095703,
-0.048630211502313614,
-0.15233057737350464,
0.02683030441403389,
0.08648470044136047,
-0.051729921251535416,
0.20238439738750458,
0.06737677752971649,
0.04597216844558716,
0.19582095742225647,
-0.02316112630069256,
-0.39776501059532166,
-0.2804776728153229,
-0.21865418553352356,
0.0824890285730362,
0.30155497789382935,
0.04037821292877197,
0.2039320319890976,
0.23747305572032928,
0.0278315506875515,
-0.1771768480539322,
-0.33922290802001953,
0.04295198619365692,
-0.07369707524776459,
0.2346137911081314,
0.0524713471531868,
-0.03117230534553528,
-0.08038944005966187,
-0.47517797350883484,
0.22250890731811523,
-0.23647165298461914,
-0.29547956585884094,
0.16463789343833923,
-0.1729840785264969,
-0.000473765772767365,
-0.008544739335775375,
-0.05600110441446304,
-0.224429190158844,
-0.11343076825141907,
0.12823325395584106,
0.08391819894313812,
0.1650998443365097,
-0.24483250081539154,
-0.0034247832372784615,
0.173871248960495,
-0.20329082012176514,
-0.19707073271274567,
-0.1134401485323906,
0.04536687955260277,
0.35198071599006653,
-0.19461874663829803,
-0.22353674471378326,
-0.1290646493434906,
-0.0890226885676384,
0.33350303769111633,
0.10649638622999191,
-0.26847460865974426,
0.13664039969444275,
-0.03243846446275711,
0.4266340136528015,
-0.32160723209381104,
-0.3929843604564667,
0.38265475630760193,
0.0959019586443901,
-0.11605901271104813,
0.02036081999540329,
-0.009244993329048157,
0.035899803042411804,
-0.19529682397842407,
-0.12220079451799393,
-0.04957282543182373,
0.3201511800289154,
-0.12643323838710785,
0.8966099619865417,
-0.277832567691803,
-0.11232572793960571,
0.476563036441803,
-0.058532580733299255,
-0.04927957430481911,
-0.11971405893564224,
-0.11733191460371017,
-0.10538358986377716,
-0.12198132276535034,
0.15857596695423126,
0.041514091193675995,
-0.3985210061073303,
-0.3152049779891968,
0.117641881108284,
-0.0033426377922296524,
-0.4849431812763214,
-0.1623237431049347,
0.024830402806401253,
-0.006015263497829437,
0.3399604558944702,
0.08089430630207062,
-0.1960049569606781,
-0.23497210443019867,
-0.10445483773946762,
0.10025160014629364,
-0.09644277393817902,
0.14609797298908234,
-0.0823536068201065,
-0.6153334379196167,
-0.0263248048722744,
-0.3447530269622803,
0.35089802742004395,
0.23034390807151794,
0.2787732183933258,
-0.025200653821229935,
0.05465894937515259,
0.15544474124908447,
-0.26453521847724915,
0.3481025695800781,
0.046081334352493286,
-0.07931284606456757,
0.37789058685302734,
0.06736503541469574,
-0.4065197706222534,
-0.25913822650909424,
-0.1735212504863739,
0.2162076085805893,
0.17352797091007233,
0.2088097780942917,
-0.3339238464832306,
-0.1532547026872635,
0.14592823386192322,
0.03174818307161331,
-0.07581911236047745,
-0.16073624789714813,
-0.24237842857837677,
-0.3862485885620117,
-0.27525433897972107,
0.07773531973361969,
0.09059811383485794,
0.2722553014755249,
-0.19242654740810394,
-0.02512616477906704,
-0.17413824796676636,
-0.10111153870820999,
-0.13570736348628998,
-0.023022359237074852,
0.22618505358695984,
-0.05084039643406868,
0.010964516550302505,
0.0407169908285141,
-0.0713447779417038,
0.5171346664428711,
-0.01051286980509758,
0.6572526693344116,
-0.32707464694976807,
0.014612910337746143,
0.035802192986011505,
0.31063583493232727,
-0.10369458794593811,
-0.27226606011390686,
0.45531630516052246,
-0.22562198340892792,
0.08862704783678055,
0.014384791254997253,
0.24329136312007904,
0.3678913414478302,
-0.2389952689409256,
-0.354692280292511,
-0.028596870601177216,
0.2601584196090698,
0.06814691424369812,
-0.13545596599578857,
0.33132871985435486,
-0.11814132332801819,
-0.319192111492157,
0.33941876888275146,
0.29600679874420166,
0.7895691990852356,
-0.1261400729417801,
0.15476928651332855,
0.5485853552818298,
-0.2694834768772125,
0.3345361649990082,
-0.17980143427848816,
0.035976242274045944,
-0.44158127903938293,
-0.006323901005089283,
0.07517459988594055,
-0.32066354155540466,
0.059069424867630005,
0.13494625687599182,
-0.13401922583580017,
-0.16228777170181274,
-0.13212524354457855,
0.34389370679855347,
0.34005001187324524,
0.33289942145347595,
0.1474965661764145,
-0.017819836735725403,
0.09483049809932709,
0.13080395758152008,
-0.4046940207481384,
-0.13410775363445282,
-0.22592979669570923,
-0.1723214089870453,
-0.033579595386981964,
-0.12218773365020752,
-0.1576714813709259,
0.01731967180967331,
-0.45613980293273926,
0.3478037118911743,
0.08491653203964233,
-0.31622034311294556,
0.16103094816207886,
-0.04743874445557594,
0.10190485417842865,
0.1037970781326294,
-0.1716717928647995,
0.15282464027404785,
-0.08265716582536697,
-0.14299537241458893,
-0.21423080563545227,
-0.24958443641662598,
0.03752274811267853,
-0.08661285787820816,
-0.2825958728790283,
0.432239294052124,
-0.11398009210824966,
-0.21027109026908875,
-0.17286749184131622,
0.012537039816379547,
0.31191521883010864,
-0.2836610674858093,
0.20267798006534576,
-0.23008230328559875,
0.03160623833537102,
-0.19420965015888214,
0.12119497358798981,
0.03953561186790466,
-0.03126790001988411,
0.01405203714966774,
-0.22412319481372833,
-0.05337683483958244,
-0.0647389143705368,
0.10199794918298721,
0.1302523910999298,
0.07190026342868805,
0.852497935295105,
-0.011723604053258896,
-0.016146136447787285,
-0.13193276524543762,
-0.027851726859807968,
0.14472785592079163,
-0.692668616771698,
0.2088911086320877,
0.18934568762779236,
0.1745970994234085,
-0.036252379417419434,
0.21444009244441986,
-0.06015298515558243,
0.15398716926574707,
0.11375638842582703,
-0.2568928003311157,
-0.3925023376941681,
0.10094808042049408,
-0.01556326076388359,
0.17327846586704254,
0.22804173827171326,
0.4849223494529724,
-0.2576967179775238,
0.24411825835704803,
-0.2813732624053955,
0.213856503367424,
-0.12691959738731384,
0.18813148140907288,
-0.3539939224720001,
-0.245778888463974,
-0.24187257885932922,
0.12090343236923218,
0.18275031447410583,
0.22708481550216675,
-0.08800061792135239,
-0.26218506693840027,
-0.06284231692552567,
0.1547938734292984,
0.10439615696668625,
-0.4758484661579132,
0.13845907151699066,
-0.07764919847249985,
0.08564816415309906,
0.04432769492268562,
0.14141088724136353,
0.008313976228237152,
-0.02389524132013321,
-0.029442433267831802,
0.6121736764907837,
0.033385440707206726,
-0.17803049087524414,
0.17458808422088623,
-0.32527977228164673,
-0.03555823862552643,
0.09403122216463089,
0.4215209186077118,
-0.07841598242521286,
0.040830813348293304,
0.07821924239397049,
0.033282577991485596,
0.26589909195899963,
-0.1068006083369255,
0.10577089339494705,
-0.514942467212677,
-0.3337250351905823,
-0.2798561453819275,
0.2233312875032425,
0.09471333026885986,
-0.31389427185058594,
-0.2480108141899109,
0.28715193271636963,
0.21261052787303925,
-0.2153720259666443,
-0.011920600198209286,
0.15171772241592407,
-0.05331400781869888,
-0.24991482496261597,
-0.018037132918834686,
0.3401537835597992,
-0.1459801346063614,
0.014054305851459503,
0.04994598776102066,
0.5240614414215088,
0.16422775387763977,
-0.1419709324836731,
0.06783637404441833,
-0.149908185005188,
-0.13437926769256592,
0.3621259331703186,
0.0754968598484993,
0.05894123390316963,
0.07912304997444153,
-0.21448299288749695,
0.10446847230195999,
0.20812702178955078,
0.18392908573150635,
0.011675752699375153,
-0.41322439908981323,
-0.2656545639038086,
0.25235283374786377,
0.054742325097322464,
-0.07374658435583115,
-0.004985228180885315,
0.33774465322494507,
0.6447908878326416,
-0.14229832589626312,
-0.09684479981660843,
0.5756675004959106,
-0.23292171955108643,
0.0020323507487773895,
-0.375676691532135,
-0.14658939838409424,
0.07459151744842529,
-0.035997677594423294,
-0.10463777184486389,
-0.18386928737163544,
-0.018551431596279144,
0.22492291033267975,
-0.36631494760513306,
-0.3276275098323822,
0.5081472992897034,
0.2541375756263733,
-0.08476156741380692,
-0.1901150494813919,
0.36026373505592346,
0.18093085289001465,
-0.24437272548675537,
0.02193962037563324,
0.41663649678230286,
0.698130190372467,
0.38446635007858276,
-0.26210933923721313,
0.06619031727313995,
-0.15172307193279266,
0.1134638786315918,
0.1007222831249237,
0.2648787498474121,
0.35648539662361145,
0.19966869056224823,
0.08501605689525604,
0.14053520560264587,
-0.1578916311264038,
-0.23459582030773163,
0.3939749300479889,
0.058213986456394196,
-0.031515780836343765,
-0.06184064596891403,
-0.21309028565883636,
-0.41257795691490173,
0.07717838883399963,
0.21824470162391663,
-0.09157699346542358,
0.23038677871227264,
0.33853811025619507,
0.0952061265707016,
-0.009405594319105148,
-0.043818674981594086,
0.09800031036138535,
-0.16319184005260468,
0.5890393853187561,
0.365780234336853,
0.29439777135849,
-0.47266632318496704,
-0.4595133662223816,
-0.43187978863716125,
0.4607594609260559,
-0.12002648413181305,
0.132616326212883,
0.23355597257614136,
0.17432528734207153,
0.058635588735342026,
0.06161138042807579,
0.1084991991519928,
0.4466966986656189,
-0.2370329648256302,
0.2657867670059204,
-0.3800933361053467,
0.4180727005004883,
0.01499650627374649,
-0.03603719174861908,
-0.1832066774368286,
-0.21836385130882263,
0.31003236770629883,
-0.2936552166938782,
0.1718757450580597,
-0.18044845759868622,
-0.15505263209342957,
0.2990252673625946,
0.17784638702869415,
0.5840935707092285,
0.02026558481156826,
0.3855084776878357,
0.043358273804187775,
0.32655277848243713,
-0.08953961730003357,
-0.33819782733917236,
-0.19214023649692535,
0.3090170919895172,
-0.03293270990252495,
0.19288307428359985,
0.14078302681446075,
0.034765973687171936,
-0.30306708812713623,
0.02477317303419113,
-0.20387262105941772,
0.15293651819229126,
-0.11741871386766434,
0.12560738623142242,
-0.1389215737581253,
-0.010225278325378895,
-0.020186739042401314,
-0.10736792534589767,
0.1551193743944168,
0.3255603015422821,
-0.5399783849716187,
-0.3889174461364746,
0.5106252431869507,
-0.3500750660896301,
-0.10789385437965393,
0.003339686430990696,
0.12971056997776031,
0.13026587665081024,
-0.004221692681312561,
-0.14214274287223816,
-0.058534685522317886,
0.7115306258201599,
-0.03090665116906166,
-0.2054668813943863,
0.300883948802948,
0.08334578573703766,
0.06466826796531677,
-0.08426870405673981,
0.2101767212152481,
0.09094908833503723,
-0.12346518039703369,
-0.23704077303409576,
-0.22667506337165833
] |
https://github.com/huggingface/datasets/issues/2200 | _prepare_split will overwrite DatasetBuilder.info.features | Hi ! This might be related to #2153
You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
I'm opening a PR to fix this and also to figure out how it was not caught in the tests
EDIT: opened #2201 | Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function? | 43 | _prepare_split will overwrite DatasetBuilder.info.features
Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function?
Hi ! This might be related to #2153
You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
I'm opening a PR to fix this and also to figure out how it was not caught in the tests
EDIT: opened #2201 | [
-0.24060216546058655,
-0.038291364908218384,
-0.10776728391647339,
0.17833736538887024,
0.2982977628707886,
0.21979227662086487,
0.45460864901542664,
0.2158689796924591,
-0.3327541649341583,
0.1149650365114212,
0.12917597591876984,
0.17151249945163727,
0.08633501082658768,
0.48735350370407104,
-0.12150144577026367,
0.0767410397529602,
0.08312056213617325,
0.2866104245185852,
0.16980859637260437,
-0.07321629673242569,
-0.21611282229423523,
0.10394074022769928,
-0.2604140043258667,
0.07809656113386154,
-0.4611603319644928,
0.006831463426351547,
0.07384902983903885,
0.18308493494987488,
0.11157247424125671,
-0.42157188057899475,
0.12789633870124817,
0.19315454363822937,
-0.002451208420097828,
0.013577833771705627,
-0.00011652835382847115,
0.09213995933532715,
0.05311974510550499,
-0.049067940562963486,
-0.3561665713787079,
0.15062667429447174,
-0.32601264119148254,
-0.2654626965522766,
-0.01115478202700615,
-0.2360556423664093,
-0.1424904465675354,
-0.3270661234855652,
-0.3870326280593872,
0.1431453675031662,
0.2141009420156479,
0.22665448486804962,
0.17739810049533844,
-0.25645047426223755,
0.11652684211730957,
0.1099400669336319,
0.31276848912239075,
0.19727101922035217,
-0.07306329160928726,
-0.269554078578949,
-0.2947530150413513,
0.11499544978141785,
-0.17808613181114197,
0.40796536207199097,
-0.18797451257705688,
-0.02448336035013199,
0.10678380727767944,
0.05013524740934372,
-0.07201751321554184,
-0.13271208107471466,
0.09064598381519318,
-0.32220613956451416,
0.29726308584213257,
0.003161102533340454,
-0.07459567487239838,
-0.5507103800773621,
-0.17567814886569977,
-0.37267786264419556,
0.127729594707489,
-0.16728462278842926,
0.17684650421142578,
0.11452879011631012,
-0.1069573163986206,
-0.3455783426761627,
0.13359859585762024,
-0.09069885313510895,
-0.03783196955919266,
0.3073062300682068,
-0.4004642069339752,
0.3126069903373718,
-0.1145925521850586,
0.07007573544979095,
0.29579436779022217,
-0.2810830771923065,
-0.2957591116428375,
-0.11585500836372375,
-0.14130769670009613,
-0.12717851996421814,
0.12061800062656403,
-0.11354216188192368,
-0.020488234236836433,
0.039194222539663315,
-0.18337050080299377,
0.16961669921875,
-0.06260399520397186,
-0.05791255831718445,
0.2710880935192108,
0.3043968975543976,
0.2000660002231598,
0.133272185921669,
-0.01484871655702591,
0.3680330514907837,
-0.30290907621383667,
-0.11207929998636246,
0.31965380907058716,
-0.18998564779758453,
0.3789293169975281,
0.3041919767856598,
0.5231932401657104,
-0.19122560322284698,
-0.28405988216400146,
0.2589047849178314,
0.30415499210357666,
-0.04768059030175209,
-0.020729243755340576,
0.10266081988811493,
0.012863651849329472,
0.23221012949943542,
-0.2137506604194641,
0.073148712515831,
-0.302154004573822,
-0.177946075797081,
-0.2684745192527771,
-0.20204401016235352,
-0.014317847788333893,
0.1958017200231552,
-0.016258325427770615,
-0.02894246205687523,
0.4025154411792755,
0.1338062435388565,
0.05936282500624657,
-0.5640696287155151,
-0.07866639643907547,
-0.14140890538692474,
0.24539390206336975,
0.23722407221794128,
0.006359968334436417,
0.2979843020439148,
0.3453563451766968,
-0.10867871344089508,
0.04231972247362137,
0.09289140999317169,
-0.4464726448059082,
-0.38184037804603577,
0.024693407118320465,
0.20491750538349152,
-0.03876597434282303,
0.23182757198810577,
0.005633793771266937,
0.06745671480894089,
0.3656391203403473,
-0.0792345479130745,
-0.010258413851261139,
-0.18437670171260834,
-0.42820677161216736,
-0.08582351356744766,
0.06893126666545868,
0.3378705382347107,
-0.3634487986564636,
0.027050890028476715,
-0.03746064007282257,
-0.0010611750185489655,
0.23436594009399414,
0.0017080157995224,
-0.04729248955845833,
0.2207319140434265,
-0.29238685965538025,
-0.15388059616088867,
0.4493566155433655,
0.04224337264895439,
-0.2183953821659088,
0.4702950417995453,
-0.05127369984984398,
0.1960456371307373,
0.0978575274348259,
-0.15733902156352997,
0.31252309679985046,
0.05696487054228783,
-0.04474024474620819,
0.0004950687289237976,
-0.13558261096477509,
-0.04609365016222,
-0.26121407747268677,
-0.2650538384914398,
-0.008414939045906067,
-0.2596244215965271,
0.048457834869623184,
0.25204938650131226,
-0.1498364508152008,
-0.20657344162464142,
0.213838130235672,
0.12789608538150787,
0.0759674683213234,
0.23893730342388153,
-0.02741832658648491,
0.46940314769744873,
0.14477203786373138,
-0.14961302280426025,
-0.2516558766365051,
-0.02566242776811123,
-0.006286703050136566,
-0.22661280632019043,
-0.1490032821893692,
-0.5273104906082153,
-0.4477548599243164,
-0.07098786532878876,
-0.37621885538101196,
-0.26452818512916565,
0.08485227823257446,
0.17116376757621765,
-0.028718002140522003,
-0.14552491903305054,
0.010661307722330093,
0.07436598837375641,
-0.1461336314678192,
0.15968598425388336,
-0.07710528373718262,
0.04083961248397827,
-0.02788330428302288,
0.0059104664251208305,
-0.05083462595939636,
0.31374332308769226,
0.24227777123451233,
-0.16154246032238007,
-0.3486567437648773,
0.5029208064079285,
0.12959131598472595,
0.025356806814670563,
-0.3426888585090637,
-0.3701826333999634,
0.12297118455171585,
-0.012664884328842163,
-0.07516825199127197,
-0.08875557780265808,
0.05403449386358261,
-0.09738630801439285,
-0.08298797160387039,
0.4442039728164673,
-0.1351921558380127,
0.27277687191963196,
0.06331486254930496,
-0.04582585021853447,
0.14291393756866455,
-0.005107603967189789,
0.2960255742073059,
-0.47521236538887024,
-0.43013617396354675,
-0.1807938665151596,
-0.193378746509552,
0.1361900418996811,
-0.05686727911233902,
0.416186660528183,
0.7362261414527893,
0.09127487242221832,
-0.2430431842803955,
-0.0015032961964607239,
-0.15856966376304626,
-0.08492784947156906,
0.1719685047864914,
-0.12115685641765594,
0.388658344745636,
0.02817319706082344,
0.005669601261615753,
0.004892071709036827,
-0.032395437359809875,
0.027955759316682816,
0.23691409826278687,
0.19520851969718933,
0.1960088312625885,
0.2906233072280884,
0.09946552664041519,
-0.050844889134168625,
-0.3068086504936218,
0.2607761025428772,
0.10120821744203568,
0.13466477394104004,
-0.35499343276023865,
0.3007315695285797,
-0.3476017117500305,
0.1741189956665039,
-0.31987759470939636,
-0.001528492197394371,
-0.06863570213317871,
-0.44446733593940735,
0.008516225963830948,
0.32516416907310486,
-0.04318414628505707,
0.12858088314533234,
-0.12872381508350372,
-0.11169703304767609,
0.04614606499671936,
-0.22269347310066223,
0.18011316657066345,
-0.05275462195277214,
-0.311284601688385,
0.022123955190181732,
-0.09146066009998322,
0.15102450549602509,
0.06817616522312164,
0.01830063946545124,
-0.27345067262649536,
-0.2057696431875229,
-0.3139708340167999,
0.12979313731193542,
-0.22001127898693085,
0.1257249414920807,
0.15592384338378906,
-0.23142288625240326,
0.33516132831573486,
-0.37644118070602417,
0.11059680581092834,
0.17459377646446228,
-0.030335858464241028,
-0.07319784164428711,
0.13762034475803375,
0.005976282060146332,
-0.11901970207691193,
-0.5209412574768066,
0.0441722646355629,
-0.2698727250099182,
-0.033681415021419525,
0.21642832458019257,
0.0426514707505703,
0.04960839822888374,
0.011808645911514759,
-0.17669248580932617,
0.1792866438627243,
0.004938334692269564,
-0.4112117886543274,
-0.20428375899791718,
-0.07250645756721497,
-0.16243994235992432,
0.20037440955638885,
0.0314185805618763,
-0.18699000775814056,
0.01074570044875145,
-0.014178026467561722,
-0.38924527168273926,
0.06282815337181091,
-0.2297629565000534,
0.18301884829998016,
-0.03133934736251831,
-0.06541670858860016,
0.07154810428619385,
0.3412659764289856,
-0.03531408682465553,
0.06446582823991776,
-0.20308126509189606,
0.21940390765666962,
-0.05488929897546768,
0.05210940167307854,
-0.18998092412948608,
0.33458879590034485,
-0.19680865108966827,
0.7819843888282776,
-0.03700742870569229,
0.10004791617393494,
0.08152929693460464,
-0.041602686047554016,
0.25049126148223877,
-0.25914764404296875,
-0.39879971742630005,
0.16458341479301453,
-0.1963438093662262,
-0.07284888625144958,
0.3796069025993347,
-0.09907341748476028,
0.14795219898223877,
0.21290016174316406,
0.036954063922166824,
-0.14474695920944214,
-0.38775894045829773,
-0.03823532164096832,
-0.13390430808067322,
0.40467748045921326,
0.1702881008386612,
0.12266135960817337,
-0.2520205080509186,
-0.08099865913391113,
-0.11482734978199005,
0.24349942803382874,
0.2173372209072113,
-0.2415083646774292,
-0.4367237091064453,
-0.047751206904649734,
0.1094469353556633,
0.11420580744743347,
0.145228311419487,
0.18011197447776794,
-0.06918703019618988,
-0.2261052131652832,
0.14699199795722961,
0.06638225167989731,
0.6020611524581909,
-0.0015930123627185822,
0.0893498957157135,
0.2863384187221527,
0.1414213329553604,
0.43946120142936707,
-0.38563117384910583,
-0.02638155221939087,
0.6457605361938477,
0.046683743596076965,
0.34401360154151917,
0.05702207237482071,
-0.35744237899780273,
0.7359840869903564,
0.22378891706466675,
-0.4519290626049042,
0.14091618359088898,
-0.16480790078639984,
0.01556956022977829,
-0.13262704014778137,
0.04587261378765106,
-0.0465162917971611,
0.01821001246571541,
-0.3915722966194153,
-0.20239554345607758,
-0.24151711165905,
-0.18709981441497803,
-0.0574110746383667,
0.009859573096036911,
0.21200644969940186,
-0.04191111400723457,
0.027300238609313965,
-0.03040245920419693,
0.10452760756015778,
0.10137559473514557,
0.6346026062965393,
-0.12188123166561127,
-0.6454026699066162,
0.05263233184814453,
-0.27991023659706116,
0.3864445388317108,
0.27805763483047485,
-0.1979077160358429,
0.34600919485092163,
-0.047818660736083984,
0.29400545358657837,
-0.5682278275489807,
0.2830224931240082,
0.4415433704853058,
0.09933340549468994,
-0.3798826336860657,
-0.5284827351570129,
0.3364790976047516,
-0.19910591840744019,
-0.1632905751466751,
-0.1263376772403717,
0.1568221151828766,
-0.5815489888191223,
0.5029462575912476,
-0.04809842258691788,
0.5525761246681213,
0.28178009390830994,
0.1456727683544159,
-0.05962149798870087,
0.4062950611114502,
0.5035845041275024,
-0.27152931690216064,
0.24688291549682617,
-0.3581908941268921,
-0.40226808190345764,
-0.023456204682588577,
0.12497057020664215,
0.2654756009578705,
0.10909917205572128,
-0.277691125869751,
0.49313676357269287,
-0.36405372619628906,
0.29842814803123474,
-0.14345601201057434,
0.09931708872318268,
0.11481358855962753,
-0.10048645734786987,
0.28878089785575867,
0.07114078104496002,
0.059428371489048004,
0.07692323625087738,
0.19411617517471313,
-0.0005980702117085457,
0.3359726369380951,
-0.04023124650120735,
-0.05447356030344963,
0.03353298082947731,
-0.06116366758942604,
0.15005828440189362,
0.013336479663848877,
-0.27649152278900146,
0.3465045690536499,
-0.35102882981300354,
0.3947286605834961,
0.21728089451789856,
0.28506699204444885,
0.09149807691574097,
0.32426297664642334,
0.286818265914917,
-0.1777196228504181,
0.2628844678401947,
0.2786635160446167,
0.3406606614589691,
-0.19537481665611267,
0.1444915533065796,
-0.13671651482582092,
0.04139505326747894,
-0.23232048749923706,
-0.10369883477687836,
0.28276997804641724,
-0.883576512336731,
-0.0947827398777008,
0.014664188027381897,
0.13246828317642212,
-0.39698758721351624,
0.05649999901652336,
-0.3819340467453003,
-0.26222506165504456,
0.16419444978237152,
-0.06800097227096558,
-0.30619150400161743,
-0.0870293378829956,
-0.11333204060792923,
0.37267085909843445,
0.17117899656295776,
0.6264431476593018,
-0.09857965260744095,
-0.15768125653266907,
-0.24501684308052063,
-0.005984894931316376,
-0.12315868586301804,
-0.2279708981513977,
0.15673620998859406,
0.015592791140079498,
-0.07094959169626236,
0.07962412387132645,
0.154298797249794,
-0.15638968348503113,
0.3370622992515564,
-0.3017416298389435,
-0.2852936089038849,
-0.3449868857860565,
-0.2147878259420395,
-0.03389618173241615,
0.08692637830972672,
0.16023191809654236,
0.18538983166217804,
-0.20842991769313812,
0.4056217074394226,
-0.26191431283950806,
-0.031498901546001434,
-0.03642543777823448,
0.395621657371521,
0.06569181382656097,
0.08699850738048553,
-0.01815330982208252,
-0.026214897632598877,
0.12157613039016724,
-0.10063250362873077,
0.26803508400917053,
-0.2361128032207489,
-0.3126170337200165,
0.13826510310173035,
-0.1827715039253235,
0.05447765439748764,
-0.15907669067382812,
0.05786357820034027,
0.02182389795780182,
-0.10354218631982803,
0.3592784106731415,
-0.14120644330978394,
0.32386088371276855,
0.40831342339515686,
-0.27500367164611816,
0.06520983576774597,
-0.07851772755384445,
-0.0183330737054348,
-0.12258200347423553,
0.3001948595046997,
0.11980469524860382,
0.25104373693466187,
-0.13646191358566284,
0.010737493634223938,
0.010519725270569324,
-0.06303960829973221,
-0.23603461682796478,
0.012677574530243874,
0.2943055033683777,
-0.18880173563957214,
0.14147387444972992,
0.16357207298278809,
0.2870689332485199,
0.4440115988254547,
0.1440836489200592,
-0.2544999122619629,
0.22384631633758545,
0.184512197971344,
-0.15949150919914246,
-0.17983241379261017,
0.24539463222026825,
-0.22760216891765594,
0.22113734483718872,
0.4496665596961975,
0.2195439636707306,
0.25324246287345886,
0.11809166520833969,
0.21867522597312927,
0.11861276626586914,
-0.060295164585113525,
0.40329214930534363,
0.6268618106842041,
0.10837680101394653,
0.1862613558769226,
0.3067200183868408,
0.009624918922781944,
0.1607290804386139,
0.4856563210487366,
0.13089635968208313,
0.2337169051170349,
0.10214608162641525,
-0.12549330294132233,
-0.04294317215681076,
-0.5238932967185974,
0.01892874576151371,
0.10901841521263123,
-0.2705443799495697,
0.3666854500770569,
0.056468889117240906,
0.33654019236564636,
-0.2169646918773651,
-0.3691892921924591,
0.01425728015601635,
0.23992162942886353,
-0.2655659019947052,
-0.33887872099876404,
0.22853359580039978,
-0.13353535532951355,
-0.40655606985092163,
0.14068567752838135,
0.017898384481668472,
-0.08670133352279663,
0.35170501470565796,
-0.23028947412967682,
-0.2614567279815674,
-0.21536219120025635,
0.13520942628383636,
-0.14171165227890015,
0.1342935860157013,
-0.05786680057644844,
0.24235084652900696,
-0.0093197301030159,
0.1342032551765442,
0.09532757848501205,
0.11122654378414154,
0.28079667687416077,
0.10068727284669876,
-0.0732279121875763,
-0.207986518740654,
0.007702324539422989,
-0.15289460122585297,
-0.16085943579673767,
-0.07769656181335449,
-0.2984027862548828,
0.12028971314430237,
0.13772207498550415,
0.1062910407781601,
-0.15416739881038666,
-0.0458698533475399,
0.4999832212924957,
-0.22377637028694153,
-0.24732276797294617,
0.4840559959411621,
0.42175087332725525,
-0.1941651701927185,
-0.01583745703101158,
0.01705031841993332,
-0.22401836514472961,
-0.3644660711288452,
0.6477416753768921,
0.0759233757853508,
0.4203595817089081,
0.22168947756290436,
0.06393718719482422,
-0.04004066064953804,
0.24551768600940704,
-0.05337463691830635,
-0.21084442734718323,
-0.40877479314804077,
0.17883546650409698,
-0.30576059222221375,
0.016772165894508362,
0.13036060333251953,
-0.13147571682929993,
0.22770169377326965,
0.007714800536632538,
-0.1295633316040039,
-0.10216116905212402,
-0.029392749071121216,
-0.3368745446205139,
0.4206034541130066,
-0.07286505401134491,
-0.14661510288715363,
-0.123078852891922,
-0.21908871829509735,
-0.0881381407380104,
-0.07748296856880188,
-0.3402247130870819,
0.17504598200321198,
0.22173641622066498,
-0.08229787647724152,
0.1343102604150772,
-0.008388172835111618,
0.2225126326084137,
-0.33184584975242615,
0.043351881206035614,
0.14470617473125458,
0.15119002759456635,
-0.26091647148132324,
0.29264751076698303,
-0.07691912353038788,
-0.20040786266326904,
-0.3502562344074249,
0.28794488310813904,
0.0859965905547142,
0.394464373588562,
-0.1279839426279068,
0.16408582031726837,
-0.31713172793388367,
0.03401554375886917,
0.36501753330230713,
-0.16813619434833527,
-0.3235810697078705,
0.4275165796279907,
-0.039536572992801666,
0.2235415279865265,
0.6821811199188232,
0.36312028765678406,
-0.02853957563638687,
0.21058234572410583,
-0.15860673785209656,
-0.31867533922195435,
0.45950210094451904,
0.27657076716423035,
-0.45519569516181946,
-0.19831636548042297,
0.28258198499679565,
0.47004228830337524,
-0.2568913996219635,
-0.42213499546051025,
-0.2443164587020874,
0.4609530568122864,
-0.19224876165390015,
0.027660291641950607,
0.21455836296081543,
0.09450168907642365,
-0.09905214607715607,
-0.04574033245444298,
0.009597159922122955,
0.17807331681251526,
-0.21739956736564636,
0.19888116419315338,
-0.16165488958358765
] |
https://github.com/huggingface/datasets/issues/2200 | _prepare_split will overwrite DatasetBuilder.info.features | > Hi ! This might be related to #2153
>
> You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
> I'm opening a PR to fix this and also to figure out how it was not caught in the tests
>
> EDIT: opened #2201
Glad to hear that! Thank you for your fix, I'm new to huggingface, it's a fantastic project π | Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function? | 67 | _prepare_split will overwrite DatasetBuilder.info.features
Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function?
> Hi ! This might be related to #2153
>
> You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
> I'm opening a PR to fix this and also to figure out how it was not caught in the tests
>
> EDIT: opened #2201
Glad to hear that! Thank you for your fix, I'm new to huggingface, it's a fantastic project π | [
-0.24060216546058655,
-0.038291364908218384,
-0.10776728391647339,
0.17833736538887024,
0.2982977628707886,
0.21979227662086487,
0.45460864901542664,
0.2158689796924591,
-0.3327541649341583,
0.1149650365114212,
0.12917597591876984,
0.17151249945163727,
0.08633501082658768,
0.48735350370407104,
-0.12150144577026367,
0.0767410397529602,
0.08312056213617325,
0.2866104245185852,
0.16980859637260437,
-0.07321629673242569,
-0.21611282229423523,
0.10394074022769928,
-0.2604140043258667,
0.07809656113386154,
-0.4611603319644928,
0.006831463426351547,
0.07384902983903885,
0.18308493494987488,
0.11157247424125671,
-0.42157188057899475,
0.12789633870124817,
0.19315454363822937,
-0.002451208420097828,
0.013577833771705627,
-0.00011652835382847115,
0.09213995933532715,
0.05311974510550499,
-0.049067940562963486,
-0.3561665713787079,
0.15062667429447174,
-0.32601264119148254,
-0.2654626965522766,
-0.01115478202700615,
-0.2360556423664093,
-0.1424904465675354,
-0.3270661234855652,
-0.3870326280593872,
0.1431453675031662,
0.2141009420156479,
0.22665448486804962,
0.17739810049533844,
-0.25645047426223755,
0.11652684211730957,
0.1099400669336319,
0.31276848912239075,
0.19727101922035217,
-0.07306329160928726,
-0.269554078578949,
-0.2947530150413513,
0.11499544978141785,
-0.17808613181114197,
0.40796536207199097,
-0.18797451257705688,
-0.02448336035013199,
0.10678380727767944,
0.05013524740934372,
-0.07201751321554184,
-0.13271208107471466,
0.09064598381519318,
-0.32220613956451416,
0.29726308584213257,
0.003161102533340454,
-0.07459567487239838,
-0.5507103800773621,
-0.17567814886569977,
-0.37267786264419556,
0.127729594707489,
-0.16728462278842926,
0.17684650421142578,
0.11452879011631012,
-0.1069573163986206,
-0.3455783426761627,
0.13359859585762024,
-0.09069885313510895,
-0.03783196955919266,
0.3073062300682068,
-0.4004642069339752,
0.3126069903373718,
-0.1145925521850586,
0.07007573544979095,
0.29579436779022217,
-0.2810830771923065,
-0.2957591116428375,
-0.11585500836372375,
-0.14130769670009613,
-0.12717851996421814,
0.12061800062656403,
-0.11354216188192368,
-0.020488234236836433,
0.039194222539663315,
-0.18337050080299377,
0.16961669921875,
-0.06260399520397186,
-0.05791255831718445,
0.2710880935192108,
0.3043968975543976,
0.2000660002231598,
0.133272185921669,
-0.01484871655702591,
0.3680330514907837,
-0.30290907621383667,
-0.11207929998636246,
0.31965380907058716,
-0.18998564779758453,
0.3789293169975281,
0.3041919767856598,
0.5231932401657104,
-0.19122560322284698,
-0.28405988216400146,
0.2589047849178314,
0.30415499210357666,
-0.04768059030175209,
-0.020729243755340576,
0.10266081988811493,
0.012863651849329472,
0.23221012949943542,
-0.2137506604194641,
0.073148712515831,
-0.302154004573822,
-0.177946075797081,
-0.2684745192527771,
-0.20204401016235352,
-0.014317847788333893,
0.1958017200231552,
-0.016258325427770615,
-0.02894246205687523,
0.4025154411792755,
0.1338062435388565,
0.05936282500624657,
-0.5640696287155151,
-0.07866639643907547,
-0.14140890538692474,
0.24539390206336975,
0.23722407221794128,
0.006359968334436417,
0.2979843020439148,
0.3453563451766968,
-0.10867871344089508,
0.04231972247362137,
0.09289140999317169,
-0.4464726448059082,
-0.38184037804603577,
0.024693407118320465,
0.20491750538349152,
-0.03876597434282303,
0.23182757198810577,
0.005633793771266937,
0.06745671480894089,
0.3656391203403473,
-0.0792345479130745,
-0.010258413851261139,
-0.18437670171260834,
-0.42820677161216736,
-0.08582351356744766,
0.06893126666545868,
0.3378705382347107,
-0.3634487986564636,
0.027050890028476715,
-0.03746064007282257,
-0.0010611750185489655,
0.23436594009399414,
0.0017080157995224,
-0.04729248955845833,
0.2207319140434265,
-0.29238685965538025,
-0.15388059616088867,
0.4493566155433655,
0.04224337264895439,
-0.2183953821659088,
0.4702950417995453,
-0.05127369984984398,
0.1960456371307373,
0.0978575274348259,
-0.15733902156352997,
0.31252309679985046,
0.05696487054228783,
-0.04474024474620819,
0.0004950687289237976,
-0.13558261096477509,
-0.04609365016222,
-0.26121407747268677,
-0.2650538384914398,
-0.008414939045906067,
-0.2596244215965271,
0.048457834869623184,
0.25204938650131226,
-0.1498364508152008,
-0.20657344162464142,
0.213838130235672,
0.12789608538150787,
0.0759674683213234,
0.23893730342388153,
-0.02741832658648491,
0.46940314769744873,
0.14477203786373138,
-0.14961302280426025,
-0.2516558766365051,
-0.02566242776811123,
-0.006286703050136566,
-0.22661280632019043,
-0.1490032821893692,
-0.5273104906082153,
-0.4477548599243164,
-0.07098786532878876,
-0.37621885538101196,
-0.26452818512916565,
0.08485227823257446,
0.17116376757621765,
-0.028718002140522003,
-0.14552491903305054,
0.010661307722330093,
0.07436598837375641,
-0.1461336314678192,
0.15968598425388336,
-0.07710528373718262,
0.04083961248397827,
-0.02788330428302288,
0.0059104664251208305,
-0.05083462595939636,
0.31374332308769226,
0.24227777123451233,
-0.16154246032238007,
-0.3486567437648773,
0.5029208064079285,
0.12959131598472595,
0.025356806814670563,
-0.3426888585090637,
-0.3701826333999634,
0.12297118455171585,
-0.012664884328842163,
-0.07516825199127197,
-0.08875557780265808,
0.05403449386358261,
-0.09738630801439285,
-0.08298797160387039,
0.4442039728164673,
-0.1351921558380127,
0.27277687191963196,
0.06331486254930496,
-0.04582585021853447,
0.14291393756866455,
-0.005107603967189789,
0.2960255742073059,
-0.47521236538887024,
-0.43013617396354675,
-0.1807938665151596,
-0.193378746509552,
0.1361900418996811,
-0.05686727911233902,
0.416186660528183,
0.7362261414527893,
0.09127487242221832,
-0.2430431842803955,
-0.0015032961964607239,
-0.15856966376304626,
-0.08492784947156906,
0.1719685047864914,
-0.12115685641765594,
0.388658344745636,
0.02817319706082344,
0.005669601261615753,
0.004892071709036827,
-0.032395437359809875,
0.027955759316682816,
0.23691409826278687,
0.19520851969718933,
0.1960088312625885,
0.2906233072280884,
0.09946552664041519,
-0.050844889134168625,
-0.3068086504936218,
0.2607761025428772,
0.10120821744203568,
0.13466477394104004,
-0.35499343276023865,
0.3007315695285797,
-0.3476017117500305,
0.1741189956665039,
-0.31987759470939636,
-0.001528492197394371,
-0.06863570213317871,
-0.44446733593940735,
0.008516225963830948,
0.32516416907310486,
-0.04318414628505707,
0.12858088314533234,
-0.12872381508350372,
-0.11169703304767609,
0.04614606499671936,
-0.22269347310066223,
0.18011316657066345,
-0.05275462195277214,
-0.311284601688385,
0.022123955190181732,
-0.09146066009998322,
0.15102450549602509,
0.06817616522312164,
0.01830063946545124,
-0.27345067262649536,
-0.2057696431875229,
-0.3139708340167999,
0.12979313731193542,
-0.22001127898693085,
0.1257249414920807,
0.15592384338378906,
-0.23142288625240326,
0.33516132831573486,
-0.37644118070602417,
0.11059680581092834,
0.17459377646446228,
-0.030335858464241028,
-0.07319784164428711,
0.13762034475803375,
0.005976282060146332,
-0.11901970207691193,
-0.5209412574768066,
0.0441722646355629,
-0.2698727250099182,
-0.033681415021419525,
0.21642832458019257,
0.0426514707505703,
0.04960839822888374,
0.011808645911514759,
-0.17669248580932617,
0.1792866438627243,
0.004938334692269564,
-0.4112117886543274,
-0.20428375899791718,
-0.07250645756721497,
-0.16243994235992432,
0.20037440955638885,
0.0314185805618763,
-0.18699000775814056,
0.01074570044875145,
-0.014178026467561722,
-0.38924527168273926,
0.06282815337181091,
-0.2297629565000534,
0.18301884829998016,
-0.03133934736251831,
-0.06541670858860016,
0.07154810428619385,
0.3412659764289856,
-0.03531408682465553,
0.06446582823991776,
-0.20308126509189606,
0.21940390765666962,
-0.05488929897546768,
0.05210940167307854,
-0.18998092412948608,
0.33458879590034485,
-0.19680865108966827,
0.7819843888282776,
-0.03700742870569229,
0.10004791617393494,
0.08152929693460464,
-0.041602686047554016,
0.25049126148223877,
-0.25914764404296875,
-0.39879971742630005,
0.16458341479301453,
-0.1963438093662262,
-0.07284888625144958,
0.3796069025993347,
-0.09907341748476028,
0.14795219898223877,
0.21290016174316406,
0.036954063922166824,
-0.14474695920944214,
-0.38775894045829773,
-0.03823532164096832,
-0.13390430808067322,
0.40467748045921326,
0.1702881008386612,
0.12266135960817337,
-0.2520205080509186,
-0.08099865913391113,
-0.11482734978199005,
0.24349942803382874,
0.2173372209072113,
-0.2415083646774292,
-0.4367237091064453,
-0.047751206904649734,
0.1094469353556633,
0.11420580744743347,
0.145228311419487,
0.18011197447776794,
-0.06918703019618988,
-0.2261052131652832,
0.14699199795722961,
0.06638225167989731,
0.6020611524581909,
-0.0015930123627185822,
0.0893498957157135,
0.2863384187221527,
0.1414213329553604,
0.43946120142936707,
-0.38563117384910583,
-0.02638155221939087,
0.6457605361938477,
0.046683743596076965,
0.34401360154151917,
0.05702207237482071,
-0.35744237899780273,
0.7359840869903564,
0.22378891706466675,
-0.4519290626049042,
0.14091618359088898,
-0.16480790078639984,
0.01556956022977829,
-0.13262704014778137,
0.04587261378765106,
-0.0465162917971611,
0.01821001246571541,
-0.3915722966194153,
-0.20239554345607758,
-0.24151711165905,
-0.18709981441497803,
-0.0574110746383667,
0.009859573096036911,
0.21200644969940186,
-0.04191111400723457,
0.027300238609313965,
-0.03040245920419693,
0.10452760756015778,
0.10137559473514557,
0.6346026062965393,
-0.12188123166561127,
-0.6454026699066162,
0.05263233184814453,
-0.27991023659706116,
0.3864445388317108,
0.27805763483047485,
-0.1979077160358429,
0.34600919485092163,
-0.047818660736083984,
0.29400545358657837,
-0.5682278275489807,
0.2830224931240082,
0.4415433704853058,
0.09933340549468994,
-0.3798826336860657,
-0.5284827351570129,
0.3364790976047516,
-0.19910591840744019,
-0.1632905751466751,
-0.1263376772403717,
0.1568221151828766,
-0.5815489888191223,
0.5029462575912476,
-0.04809842258691788,
0.5525761246681213,
0.28178009390830994,
0.1456727683544159,
-0.05962149798870087,
0.4062950611114502,
0.5035845041275024,
-0.27152931690216064,
0.24688291549682617,
-0.3581908941268921,
-0.40226808190345764,
-0.023456204682588577,
0.12497057020664215,
0.2654756009578705,
0.10909917205572128,
-0.277691125869751,
0.49313676357269287,
-0.36405372619628906,
0.29842814803123474,
-0.14345601201057434,
0.09931708872318268,
0.11481358855962753,
-0.10048645734786987,
0.28878089785575867,
0.07114078104496002,
0.059428371489048004,
0.07692323625087738,
0.19411617517471313,
-0.0005980702117085457,
0.3359726369380951,
-0.04023124650120735,
-0.05447356030344963,
0.03353298082947731,
-0.06116366758942604,
0.15005828440189362,
0.013336479663848877,
-0.27649152278900146,
0.3465045690536499,
-0.35102882981300354,
0.3947286605834961,
0.21728089451789856,
0.28506699204444885,
0.09149807691574097,
0.32426297664642334,
0.286818265914917,
-0.1777196228504181,
0.2628844678401947,
0.2786635160446167,
0.3406606614589691,
-0.19537481665611267,
0.1444915533065796,
-0.13671651482582092,
0.04139505326747894,
-0.23232048749923706,
-0.10369883477687836,
0.28276997804641724,
-0.883576512336731,
-0.0947827398777008,
0.014664188027381897,
0.13246828317642212,
-0.39698758721351624,
0.05649999901652336,
-0.3819340467453003,
-0.26222506165504456,
0.16419444978237152,
-0.06800097227096558,
-0.30619150400161743,
-0.0870293378829956,
-0.11333204060792923,
0.37267085909843445,
0.17117899656295776,
0.6264431476593018,
-0.09857965260744095,
-0.15768125653266907,
-0.24501684308052063,
-0.005984894931316376,
-0.12315868586301804,
-0.2279708981513977,
0.15673620998859406,
0.015592791140079498,
-0.07094959169626236,
0.07962412387132645,
0.154298797249794,
-0.15638968348503113,
0.3370622992515564,
-0.3017416298389435,
-0.2852936089038849,
-0.3449868857860565,
-0.2147878259420395,
-0.03389618173241615,
0.08692637830972672,
0.16023191809654236,
0.18538983166217804,
-0.20842991769313812,
0.4056217074394226,
-0.26191431283950806,
-0.031498901546001434,
-0.03642543777823448,
0.395621657371521,
0.06569181382656097,
0.08699850738048553,
-0.01815330982208252,
-0.026214897632598877,
0.12157613039016724,
-0.10063250362873077,
0.26803508400917053,
-0.2361128032207489,
-0.3126170337200165,
0.13826510310173035,
-0.1827715039253235,
0.05447765439748764,
-0.15907669067382812,
0.05786357820034027,
0.02182389795780182,
-0.10354218631982803,
0.3592784106731415,
-0.14120644330978394,
0.32386088371276855,
0.40831342339515686,
-0.27500367164611816,
0.06520983576774597,
-0.07851772755384445,
-0.0183330737054348,
-0.12258200347423553,
0.3001948595046997,
0.11980469524860382,
0.25104373693466187,
-0.13646191358566284,
0.010737493634223938,
0.010519725270569324,
-0.06303960829973221,
-0.23603461682796478,
0.012677574530243874,
0.2943055033683777,
-0.18880173563957214,
0.14147387444972992,
0.16357207298278809,
0.2870689332485199,
0.4440115988254547,
0.1440836489200592,
-0.2544999122619629,
0.22384631633758545,
0.184512197971344,
-0.15949150919914246,
-0.17983241379261017,
0.24539463222026825,
-0.22760216891765594,
0.22113734483718872,
0.4496665596961975,
0.2195439636707306,
0.25324246287345886,
0.11809166520833969,
0.21867522597312927,
0.11861276626586914,
-0.060295164585113525,
0.40329214930534363,
0.6268618106842041,
0.10837680101394653,
0.1862613558769226,
0.3067200183868408,
0.009624918922781944,
0.1607290804386139,
0.4856563210487366,
0.13089635968208313,
0.2337169051170349,
0.10214608162641525,
-0.12549330294132233,
-0.04294317215681076,
-0.5238932967185974,
0.01892874576151371,
0.10901841521263123,
-0.2705443799495697,
0.3666854500770569,
0.056468889117240906,
0.33654019236564636,
-0.2169646918773651,
-0.3691892921924591,
0.01425728015601635,
0.23992162942886353,
-0.2655659019947052,
-0.33887872099876404,
0.22853359580039978,
-0.13353535532951355,
-0.40655606985092163,
0.14068567752838135,
0.017898384481668472,
-0.08670133352279663,
0.35170501470565796,
-0.23028947412967682,
-0.2614567279815674,
-0.21536219120025635,
0.13520942628383636,
-0.14171165227890015,
0.1342935860157013,
-0.05786680057644844,
0.24235084652900696,
-0.0093197301030159,
0.1342032551765442,
0.09532757848501205,
0.11122654378414154,
0.28079667687416077,
0.10068727284669876,
-0.0732279121875763,
-0.207986518740654,
0.007702324539422989,
-0.15289460122585297,
-0.16085943579673767,
-0.07769656181335449,
-0.2984027862548828,
0.12028971314430237,
0.13772207498550415,
0.1062910407781601,
-0.15416739881038666,
-0.0458698533475399,
0.4999832212924957,
-0.22377637028694153,
-0.24732276797294617,
0.4840559959411621,
0.42175087332725525,
-0.1941651701927185,
-0.01583745703101158,
0.01705031841993332,
-0.22401836514472961,
-0.3644660711288452,
0.6477416753768921,
0.0759233757853508,
0.4203595817089081,
0.22168947756290436,
0.06393718719482422,
-0.04004066064953804,
0.24551768600940704,
-0.05337463691830635,
-0.21084442734718323,
-0.40877479314804077,
0.17883546650409698,
-0.30576059222221375,
0.016772165894508362,
0.13036060333251953,
-0.13147571682929993,
0.22770169377326965,
0.007714800536632538,
-0.1295633316040039,
-0.10216116905212402,
-0.029392749071121216,
-0.3368745446205139,
0.4206034541130066,
-0.07286505401134491,
-0.14661510288715363,
-0.123078852891922,
-0.21908871829509735,
-0.0881381407380104,
-0.07748296856880188,
-0.3402247130870819,
0.17504598200321198,
0.22173641622066498,
-0.08229787647724152,
0.1343102604150772,
-0.008388172835111618,
0.2225126326084137,
-0.33184584975242615,
0.043351881206035614,
0.14470617473125458,
0.15119002759456635,
-0.26091647148132324,
0.29264751076698303,
-0.07691912353038788,
-0.20040786266326904,
-0.3502562344074249,
0.28794488310813904,
0.0859965905547142,
0.394464373588562,
-0.1279839426279068,
0.16408582031726837,
-0.31713172793388367,
0.03401554375886917,
0.36501753330230713,
-0.16813619434833527,
-0.3235810697078705,
0.4275165796279907,
-0.039536572992801666,
0.2235415279865265,
0.6821811199188232,
0.36312028765678406,
-0.02853957563638687,
0.21058234572410583,
-0.15860673785209656,
-0.31867533922195435,
0.45950210094451904,
0.27657076716423035,
-0.45519569516181946,
-0.19831636548042297,
0.28258198499679565,
0.47004228830337524,
-0.2568913996219635,
-0.42213499546051025,
-0.2443164587020874,
0.4609530568122864,
-0.19224876165390015,
0.027660291641950607,
0.21455836296081543,
0.09450168907642365,
-0.09905214607715607,
-0.04574033245444298,
0.009597159922122955,
0.17807331681251526,
-0.21739956736564636,
0.19888116419315338,
-0.16165488958358765
] |
https://github.com/huggingface/datasets/issues/2196 | `load_dataset` caches two arrow files? | Hi ! Files that starts with `cache-*` are cached computation files, i.e. they are the cached results of map/filter/cast/etc. operations. For example if you used `map` on your dataset to transform it, then the resulting dataset is going to be stored and cached in a `cache-*` file. These files are used to avoid having to load the dataset in RAM, even after many transforms | Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`? | 64 | `load_dataset` caches two arrow files?
Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`?
Hi ! Files that starts with `cache-*` are cached computation files, i.e. they are the cached results of map/filter/cast/etc. operations. For example if you used `map` on your dataset to transform it, then the resulting dataset is going to be stored and cached in a `cache-*` file. These files are used to avoid having to load the dataset in RAM, even after many transforms | [
-0.020623739808797836,
-0.1851755678653717,
-0.13287153840065002,
0.6645820736885071,
-0.08110929280519485,
0.3052114248275757,
0.17529577016830444,
0.25648143887519836,
0.28745037317276,
-0.1578645557165146,
-0.009086295031011105,
0.1946638524532318,
0.08018272370100021,
-0.51300048828125,
0.1924159675836563,
0.16866251826286316,
0.15846434235572815,
0.03571534901857376,
-0.16096295416355133,
-0.1386406421661377,
-0.1706290990114212,
0.15845409035682678,
0.2008032649755478,
0.1132957860827446,
-0.4863937497138977,
-0.1746705025434494,
0.11408950388431549,
0.26215043663978577,
-0.04643377661705017,
-0.3418194055557251,
0.2564127743244171,
-0.04936985298991203,
0.054010726511478424,
0.35619673132896423,
-0.00011984205775661394,
0.010195724666118622,
0.36063188314437866,
0.12771110236644745,
-0.48099008202552795,
0.015386916697025299,
-0.3229595720767975,
-0.0753125250339508,
0.19523000717163086,
-0.2579166293144226,
0.4584204852581024,
-0.18724118173122406,
-0.06950491666793823,
-0.7284275889396667,
0.5684512853622437,
0.13730023801326752,
0.16736572980880737,
-0.18361735343933105,
-0.43649980425834656,
0.1170692965388298,
0.242715984582901,
0.08627046644687653,
0.034821465611457825,
-0.027412831783294678,
-0.11529730260372162,
0.25508490204811096,
0.008478574454784393,
0.06545989215373993,
-0.14096084237098694,
-0.0061694420874118805,
0.43151310086250305,
0.10025602579116821,
-0.03363771736621857,
-0.2234603464603424,
0.2855518162250519,
0.09021680802106857,
0.8578149080276489,
-0.29794928431510925,
0.03924573212862015,
-0.34732329845428467,
-0.23567762970924377,
-0.14435361325740814,
0.28231966495513916,
0.3157086968421936,
0.15565481781959534,
-0.0248255617916584,
-0.13941748440265656,
-0.44678592681884766,
0.09900066256523132,
-0.13303935527801514,
0.19850018620491028,
-0.3570917844772339,
-0.17043684422969818,
0.32121551036834717,
0.30467551946640015,
0.30515754222869873,
0.3443062901496887,
-0.4836413860321045,
-0.2567692697048187,
0.3919183015823364,
-0.1676270067691803,
0.1453922539949417,
-0.12167982012033463,
0.019767384976148605,
-0.08455023169517517,
0.32444387674331665,
0.3523721694946289,
-0.21217525005340576,
-0.18885964155197144,
0.16814467310905457,
0.13988833129405975,
0.39886918663978577,
0.18356670439243317,
-0.002278801053762436,
0.011346954852342606,
-0.35710233449935913,
-0.010840065777301788,
-0.2608303129673004,
-0.08439650386571884,
-0.13457702100276947,
0.3956591784954071,
-0.3732517957687378,
-0.07119326293468475,
-0.10048307478427887,
0.015776364132761955,
0.003189976792782545,
0.0849958285689354,
-0.34674227237701416,
0.10406316816806793,
0.053809139877557755,
0.27543404698371887,
0.27596184611320496,
-0.15322193503379822,
0.03804686293005943,
-0.04844824969768524,
-0.05276221036911011,
-0.17661596834659576,
-0.017260171473026276,
-0.17006276547908783,
0.27044978737831116,
0.26555824279785156,
0.0037331879138946533,
0.254567950963974,
0.09160063415765762,
-0.060862571001052856,
-0.05438926815986633,
0.38624873757362366,
-0.2153562307357788,
0.15292078256607056,
0.438342809677124,
-0.17375406622886658,
0.42749881744384766,
0.019022000953555107,
-0.016985632479190826,
-0.1211497113108635,
0.47243425250053406,
-0.4885587692260742,
-0.15910600125789642,
0.1287665218114853,
0.14240171015262604,
-0.055195391178131104,
0.316466748714447,
-0.8082443475723267,
-0.0007384046912193298,
0.26450809836387634,
-0.16773457825183868,
0.251205176115036,
0.04917575418949127,
-0.1883520781993866,
-0.35808342695236206,
-0.20170266926288605,
0.27322691679000854,
-0.4757978618144989,
-0.13440057635307312,
-0.2125520259141922,
-0.18470147252082825,
-0.1997341513633728,
0.3478359282016754,
-0.5759471654891968,
0.34535694122314453,
-0.5347442626953125,
0.16647206246852875,
0.5266284942626953,
-0.3847641348838806,
-0.36059826612472534,
0.2506014108657837,
-0.038081347942352295,
0.16634464263916016,
0.2721288204193115,
0.21820122003555298,
-0.1023307517170906,
-0.2018231898546219,
-0.10415221750736237,
-0.08610455691814423,
0.16614699363708496,
-0.3134888708591461,
-0.14342544972896576,
0.019095251336693764,
0.08977632224559784,
-0.06635966897010803,
-0.18786463141441345,
0.035438280552625656,
0.06995813548564911,
-0.058033280074596405,
0.21700862050056458,
0.0795837789773941,
0.1795777529478073,
0.18917733430862427,
-0.14367586374282837,
-0.2049158662557602,
0.23984356224536896,
0.10600408166646957,
-0.6893285512924194,
0.2930280268192291,
-0.10433964431285858,
-0.7563844323158264,
-0.09236067533493042,
-0.07575293630361557,
-0.12007300555706024,
-0.06502395123243332,
-0.21570463478565216,
0.07060503959655762,
-0.04740816354751587,
0.1403089016675949,
0.133889302611351,
-0.24367466568946838,
-0.32523056864738464,
0.7150179743766785,
-0.06514385342597961,
-0.03197459131479263,
-0.4741213321685791,
0.08188784867525101,
0.19557537138462067,
0.2808516025543213,
-0.36934247612953186,
-0.1733143925666809,
0.06160499528050423,
-0.1553860604763031,
-0.08729954063892365,
0.34238237142562866,
0.15873627364635468,
0.08163776993751526,
0.15973031520843506,
0.33736497163772583,
0.05287453904747963,
-0.09450206160545349,
0.2905019521713257,
-0.10880599915981293,
0.20447902381420135,
-0.38207852840423584,
-0.153561532497406,
0.07645042985677719,
-0.23781101405620575,
0.10044446587562561,
-0.09446954727172852,
-0.31203699111938477,
0.18673263490200043,
0.06750163435935974,
-0.025065958499908447,
-0.1098620742559433,
0.1858588308095932,
0.3055253028869629,
0.4112282693386078,
0.43381890654563904,
0.13136129081249237,
-0.00532812625169754,
0.41128554940223694,
-0.23733225464820862,
-0.18872281908988953,
0.18680942058563232,
-0.3113766610622406,
-0.3228854537010193,
-0.19124233722686768,
0.47352108359336853,
0.6378601789474487,
0.056369177997112274,
0.17542479932308197,
0.0024435855448246002,
0.12581443786621094,
-0.16205929219722748,
0.20270004868507385,
-0.06227976083755493,
0.3740920126438141,
0.06547717750072479,
-0.15279200673103333,
-0.1322552114725113,
-0.34984251856803894,
-0.0258127823472023,
0.23696166276931763,
0.0013321302831172943,
-0.26128584146499634,
0.171042799949646,
-0.030158018693327904,
-0.07665745168924332,
-0.2585291862487793,
0.1396569311618805,
-0.1742328256368637,
-0.12375173717737198,
-0.08334706723690033,
0.1740722954273224,
0.3223651051521301,
-0.11560335010290146,
-0.3016851544380188,
0.5464683771133423,
-0.044139377772808075,
0.020582683384418488,
-0.48920387029647827,
-0.1473875790834427,
-0.047474347054958344,
0.00604073703289032,
0.09296627342700958,
-0.1244916096329689,
0.09716132283210754,
-0.13767337799072266,
0.26252007484436035,
-0.2510240972042084,
0.15073135495185852,
-0.013511225581169128,
0.15466736257076263,
-0.0067824311554431915,
-0.19832006096839905,
0.02101285755634308,
-0.35042935609817505,
0.04311834275722504,
-0.11276233941316605,
0.02847135253250599,
-0.29040536284446716,
-0.053298719227313995,
-0.08403994888067245,
0.06280212849378586,
-0.08759666979312897,
-0.0336909219622612,
0.07177078723907471,
0.00211198627948761,
0.2212621420621872,
-0.05485079437494278,
0.1340092420578003,
-0.032885510474443436,
-0.3017033040523529,
0.15397049486637115,
0.14450618624687195,
0.10829872637987137,
-0.4748568534851074,
-0.7183316349983215,
0.25798341631889343,
-0.15958698093891144,
0.02169574797153473,
0.14409513771533966,
0.0385780930519104,
0.22801828384399414,
0.05141599476337433,
-0.562880277633667,
0.1586025506258011,
-0.10189320147037506,
0.15480686724185944,
-0.4036144018173218,
-0.020119810476899147,
0.164602130651474,
0.13998781144618988,
0.011777868494391441,
-0.20707091689109802,
-0.07902845740318298,
0.14125356078147888,
0.023842085152864456,
0.2856884002685547,
-0.003913870081305504,
0.26028627157211304,
-0.17354947328567505,
0.6865372657775879,
0.0560431145131588,
0.2372025102376938,
0.2109367549419403,
0.414929062128067,
0.4307760000228882,
-0.21596240997314453,
0.0449298694729805,
-0.15970571339130402,
-0.15572643280029297,
-0.12057071924209595,
0.13860958814620972,
0.1522234082221985,
-0.13581036031246185,
0.14980706572532654,
0.11566096544265747,
-0.18902352452278137,
0.16381289064884186,
0.12857495248317719,
-0.5458725094795227,
-0.09366754442453384,
0.0829506367444992,
-0.20284795761108398,
-0.11220857501029968,
0.10433205962181091,
-0.06373916566371918,
0.11979611217975616,
0.3924950659275055,
0.024591907858848572,
-0.3626146912574768,
0.04187687858939171,
-0.1019604429602623,
0.17042292654514313,
-0.12766413390636444,
-0.12413306534290314,
0.04663382098078728,
0.14567196369171143,
0.1839401125907898,
0.11732803285121918,
0.7556933760643005,
0.06890913844108582,
-0.0042753666639328,
0.25041690468788147,
0.16357985138893127,
-0.3476664423942566,
0.05618594214320183,
0.10120895504951477,
0.31558263301849365,
-0.07249386608600616,
0.3185843229293823,
-0.07026305794715881,
-0.08725980669260025,
-0.42805102467536926,
0.44143015146255493,
-0.37936946749687195,
-0.22844305634498596,
-0.17631374299526215,
-0.16610153019428253,
-0.006511332467198372,
-0.23667439818382263,
-0.03726775571703911,
-0.06896940618753433,
-0.12202242016792297,
0.030786264687776566,
-0.26091068983078003,
-0.21926355361938477,
-0.004181697964668274,
-0.18287888169288635,
0.41644832491874695,
0.06281804293394089,
-0.016330130398273468,
0.313546746969223,
0.41705965995788574,
0.17987895011901855,
0.518049955368042,
-0.08442971110343933,
-0.04021492600440979,
-0.034347884356975555,
-0.029848653823137283,
0.01059509813785553,
0.012034580111503601,
-0.15210379660129547,
-0.000046990811824798584,
0.028830699622631073,
-0.22539488971233368,
0.019068509340286255,
-0.03893604502081871,
0.047870978713035583,
-0.016706615686416626,
-0.26922523975372314,
-0.5570718050003052,
0.5188215970993042,
0.2009652853012085,
-0.32995736598968506,
0.5775395631790161,
-0.1945192962884903,
-0.2601769268512726,
0.19050881266593933,
-0.1797516942024231,
0.857518196105957,
-0.23200581967830658,
0.15307006239891052,
-0.09315089881420135,
-0.335807740688324,
0.279990553855896,
-0.43253159523010254,
-0.013661321252584457,
-0.06867870688438416,
0.014207187108695507,
-0.06392267346382141,
-0.3193734288215637,
0.10749468952417374,
0.5550761222839355,
0.03917397931218147,
0.05684592202305794,
-0.19039121270179749,
-0.09591343998908997,
0.025477323681116104,
0.23497235774993896,
0.11440004408359528,
-0.1327078491449356,
-0.006607439368963242,
0.08582533895969391,
-0.1981869488954544,
-0.19619159400463104,
-0.0707826167345047,
0.1385369598865509,
0.13344693183898926,
-0.14676383137702942,
0.13824361562728882,
-0.0539935901761055,
-0.05694834142923355,
0.5380522012710571,
-0.17394070327281952,
-0.29692214727401733,
-0.13230253756046295,
0.45976123213768005,
0.0470263846218586,
-0.38159415125846863,
-0.01401212252676487,
0.4528038799762726,
0.2481701672077179,
0.13520903885364532,
-0.349324107170105,
-0.19705143570899963,
0.11520323902368546,
-0.06264297664165497,
-0.03313291072845459,
0.1704404503107071,
-0.39076316356658936,
-0.5202928781509399,
0.07586251199245453,
0.38394397497177124,
0.044073861092329025,
0.07006612420082092,
-0.23381654918193817,
0.19253310561180115,
-0.03938011825084686,
0.12211880087852478,
0.03894280642271042,
0.3972512483596802,
0.07539860904216766,
0.017465848475694656,
-0.01094236969947815,
-0.4464409053325653,
0.019786905497312546,
0.25379425287246704,
0.3440074920654297,
-0.26852163672447205,
0.4966942369937897,
-0.29441359639167786,
-0.2041378915309906,
-0.09060130268335342,
0.14101189374923706,
0.31319525837898254,
-0.4004877507686615,
0.300701379776001,
0.06997737288475037,
0.2724120616912842,
-0.08758652210235596,
-0.14746779203414917,
0.223004549741745,
0.18060488998889923,
-0.07792191207408905,
-0.27577072381973267,
-0.34091949462890625,
0.06476560980081558,
-0.25186872482299805,
0.15433038771152496,
0.24712958931922913,
-0.7568343877792358,
0.035993874073028564,
0.2772005796432495,
-0.18069252371788025,
0.43406033515930176,
0.181756392121315,
0.10865741968154907,
0.04653913527727127,
0.00832027941942215,
0.2035628855228424,
-0.006730979308485985,
-0.014289501123130322,
-0.15476644039154053,
-0.2815597653388977,
-0.17736366391181946,
0.006488127633929253,
0.18801915645599365,
-0.11015725880861282,
-0.12399742752313614,
-0.30263108015060425,
-0.21362578868865967,
0.29961711168289185,
-0.09240467846393585,
0.16892606019973755,
0.07639620453119278,
0.015471171587705612,
-0.023240957409143448,
0.31400159001350403,
-0.16723722219467163,
-0.42079228162765503,
0.10202421247959137,
-0.07125797867774963,
0.304334819316864,
0.02870289981365204,
0.14613112807273865,
0.022461339831352234,
-0.10863403230905533,
-0.35247403383255005,
-0.019318200647830963,
0.1491246223449707,
-0.07393082976341248,
0.05352039262652397,
-0.3656347393989563,
0.18875813484191895,
0.10587190091609955,
0.14242568612098694,
0.2639562785625458,
-0.19187745451927185,
-0.16597536206245422,
-0.0014204364269971848,
0.05385023355484009,
0.15905940532684326,
-0.2506590783596039,
0.19053107500076294,
0.09571810066699982,
-0.3110484778881073,
0.016059279441833496,
0.32214415073394775,
-0.11972875893115997,
-0.0757652074098587,
0.020863760262727737,
0.45451629161834717,
-0.2129797488451004,
0.2867923974990845,
0.1155601292848587,
0.14233806729316711,
-0.030605461448431015,
0.442514032125473,
0.3101652264595032,
0.07612914592027664,
0.49196702241897583,
-0.08622082322835922,
0.3369765281677246,
0.5232391953468323,
0.06964010000228882,
-0.15044671297073364,
-0.43847963213920593,
-0.01647893339395523,
0.35980868339538574,
-0.42112571001052856,
0.040346574038267136,
0.11813898384571075,
0.152103453874588,
0.2226315140724182,
-0.1888801008462906,
-0.10054727643728256,
0.06766970455646515,
-0.24235719442367554,
-0.20120511949062347,
0.053678885102272034,
-0.2410687506198883,
0.194441020488739,
0.2857096791267395,
-0.04379849508404732,
0.12940716743469238,
0.3107997179031372,
0.039675164967775345,
-0.22942723333835602,
0.0982368215918541,
0.49132513999938965,
0.13068784773349762,
-0.06628551334142685,
-0.10003942996263504,
-0.012605028226971626,
-0.06852635741233826,
-0.08956742286682129,
0.17544637620449066,
-0.022764714434742928,
0.052048664540052414,
0.1915345937013626,
0.09264762699604034,
0.13630911707878113,
0.2215893268585205,
-0.05984745919704437,
-0.13637155294418335,
0.2799266576766968,
0.16233453154563904,
-0.3710961639881134,
0.0641646683216095,
0.11141665279865265,
-0.04461592435836792,
0.16637222468852997,
0.04847264289855957,
0.3469821810722351,
-0.20628759264945984,
-0.1631242334842682,
-0.34318405389785767,
-0.0560138076543808,
-0.1490936130285263,
0.28744447231292725,
-0.14870545268058777,
-0.06736696511507034,
0.5298348069190979,
-0.11456242948770523,
-0.1195957288146019,
-0.21760599315166473,
-0.0045799678191542625,
-0.19460953772068024,
0.49499502778053284,
0.30057308077812195,
0.011711664497852325,
-0.17842572927474976,
-0.29715514183044434,
-0.47988951206207275,
-0.04689352959394455,
-0.24424943327903748,
0.3913601040840149,
0.014215247705578804,
0.3093048632144928,
-0.06882176548242569,
-0.018691059201955795,
0.40663450956344604,
-0.04410172253847122,
0.1097249984741211,
-0.023355238139629364,
-0.21808603405952454,
0.09737697243690491,
0.43277108669281006,
0.2211844027042389,
-0.09860555082559586,
-0.35817641019821167,
0.011326499283313751,
0.17440451681613922,
0.011141713708639145,
0.04080626741051674,
0.021848000586032867,
0.21596969664096832,
0.5090539455413818,
0.6151250004768372,
0.19404488801956177,
0.1792439967393875,
0.09927701205015182,
0.041776202619075775,
-0.05131502076983452,
-0.19428551197052002,
0.19554263353347778,
0.13941946625709534,
0.009787965565919876,
0.1717471182346344,
-0.5143799185752869,
0.32887962460517883,
-0.09325454384088516,
0.02923155575990677,
-0.12763899564743042,
-0.1343795508146286,
-0.18022695183753967,
-0.19302153587341309,
-0.33313268423080444,
0.18616628646850586,
0.195794939994812,
0.2248796820640564,
0.0822167620062828,
0.11974874138832092,
-0.019166968762874603,
0.024171607568860054,
0.42151907086372375,
-0.12539060413837433,
-0.19721698760986328,
0.2731100916862488,
0.23489104211330414,
0.29698631167411804,
-0.14693526923656464,
-0.3629281222820282,
-0.05162880942225456,
0.5664257407188416,
-0.23880699276924133,
-0.28497588634490967,
-0.006674271076917648,
-0.2340870201587677,
0.07934631407260895,
0.030364904552698135,
0.5920178890228271,
0.035281285643577576,
-0.1686139702796936,
-0.07691338658332825,
-0.3721184730529785
] |
https://github.com/huggingface/datasets/issues/2196 | `load_dataset` caches two arrow files? | Thanks @lhoestq! Hmm.. that's strange because I specifically turned off auto caching, and saved mapped result, using `save_to_disk`, to another location. At this location, the following file is created:`355G cache-ed205e500a7dc44c.arrow`
To my observation, both `load_dataset` and `map` creates `cache-*` files, and I wonder what the `cache-*` file from `load_dataset` is for (as I believe the same information is stored in `json-train.arrow`. | Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`? | 61 | `load_dataset` caches two arrow files?
Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`?
Thanks @lhoestq! Hmm.. that's strange because I specifically turned off auto caching, and saved mapped result, using `save_to_disk`, to another location. At this location, the following file is created:`355G cache-ed205e500a7dc44c.arrow`
To my observation, both `load_dataset` and `map` creates `cache-*` files, and I wonder what the `cache-*` file from `load_dataset` is for (as I believe the same information is stored in `json-train.arrow`. | [
0.01727592572569847,
-0.14640085399150848,
-0.114908367395401,
0.6492552161216736,
-0.06654702872037888,
0.3106842637062073,
0.24094071984291077,
0.25788331031799316,
0.3021346926689148,
-0.2563413977622986,
-0.03561747074127197,
0.278781920671463,
0.11617586761713028,
-0.49715134501457214,
0.2449565827846527,
0.19346974790096283,
0.1645393967628479,
0.04109024256467819,
-0.1407983899116516,
-0.10223664343357086,
-0.14491906762123108,
0.14048317074775696,
0.22299449145793915,
0.05010297894477844,
-0.45862311124801636,
-0.1467893272638321,
0.0726129487156868,
0.12640300393104553,
-0.04526200890541077,
-0.40372055768966675,
0.352699875831604,
-0.07864150404930115,
0.03078015148639679,
0.42755141854286194,
-0.00011867089051520452,
0.030207984149456024,
0.35751861333847046,
0.0993109941482544,
-0.38514697551727295,
-0.02864234149456024,
-0.4544890820980072,
-0.04569442570209503,
0.1494431048631668,
-0.18199118971824646,
0.380058228969574,
-0.33716580271720886,
-0.06623649597167969,
-0.6853262186050415,
0.4682791233062744,
0.1548907309770584,
0.17966553568840027,
-0.19667479395866394,
-0.4313080906867981,
0.07191779464483261,
0.29367974400520325,
0.11385572701692581,
-0.029568562284111977,
-0.03456344082951546,
-0.14917989075183868,
0.22949835658073425,
-0.03560323268175125,
0.12152628600597382,
-0.10984878987073898,
-0.04637455567717552,
0.44787219166755676,
0.17800702154636383,
-0.1123235747218132,
-0.26611462235450745,
0.3580048978328705,
0.05395970866084099,
0.8774030804634094,
-0.32793697714805603,
0.0023101912811398506,
-0.37566637992858887,
-0.2317553609609604,
-0.01140446588397026,
0.22803544998168945,
0.31111061573028564,
0.19245953857898712,
-0.008491337299346924,
-0.20105046033859253,
-0.42593398690223694,
0.06058260798454285,
-0.17908452451229095,
0.16645541787147522,
-0.3395427465438843,
-0.20246174931526184,
0.31087371706962585,
0.23973755538463593,
0.26736944913864136,
0.2836095094680786,
-0.4972209930419922,
-0.3389442265033722,
0.4030974209308624,
-0.19857825338840485,
0.03186441957950592,
-0.046674348413944244,
-0.040382467210292816,
-0.03329627960920334,
0.2953373193740845,
0.4044395983219147,
-0.2616671025753021,
-0.1658656746149063,
0.12074596434831619,
0.27823302149772644,
0.3537445664405823,
0.2547229528427124,
0.026898611336946487,
-0.046151868999004364,
-0.3399740755558014,
-0.02182137593626976,
-0.20867416262626648,
-0.049039483070373535,
-0.08596082776784897,
0.4438292682170868,
-0.4126613438129425,
-0.09316737204790115,
-0.08957987278699875,
0.045582115650177,
0.0914716124534607,
0.04052213579416275,
-0.3477858603000641,
0.04880111292004585,
0.08044789731502533,
0.18204157054424286,
0.23408600687980652,
-0.2339138388633728,
0.06366375833749771,
-0.010130940936505795,
-0.030081991106271744,
-0.18147972226142883,
-0.01801794022321701,
-0.14446517825126648,
0.26534250378608704,
0.273581326007843,
0.07218329608440399,
0.22678275406360626,
0.14421136677265167,
-0.2142864614725113,
-0.08318671584129333,
0.459084689617157,
-0.23245728015899658,
0.19281458854675293,
0.4072646498680115,
-0.16327247023582458,
0.43477094173431396,
-0.060497429221868515,
0.1209554672241211,
-0.132438063621521,
0.5263388752937317,
-0.48903197050094604,
-0.2337026745080948,
0.10632356256246567,
0.16358433663845062,
-0.10184888541698456,
0.21152624487876892,
-0.6663515567779541,
0.06565888971090317,
0.3233990967273712,
-0.2094888687133789,
0.27087968587875366,
0.0823255181312561,
-0.24216245114803314,
-0.3829839527606964,
-0.12473750859498978,
0.3206808269023895,
-0.3754132091999054,
-0.16807745397090912,
-0.1721181571483612,
-0.1740690916776657,
-0.23475727438926697,
0.2553410828113556,
-0.5216798782348633,
0.36487630009651184,
-0.45262327790260315,
0.17681004106998444,
0.546234130859375,
-0.35305824875831604,
-0.422203004360199,
0.2921741306781769,
-0.03946107625961304,
0.1639523059129715,
0.18005570769309998,
0.2358597218990326,
-0.12940523028373718,
-0.1869405210018158,
-0.026511847972869873,
-0.04811142385005951,
0.14900168776512146,
-0.25223809480667114,
-0.09905759990215302,
-0.04202640429139137,
0.035510022193193436,
-0.034294404089450836,
-0.22681890428066254,
0.00016921758651733398,
0.08004073053598404,
-0.09625909477472305,
0.1690087914466858,
0.15236961841583252,
0.21402333676815033,
0.20171897113323212,
-0.11445578932762146,
-0.24690692126750946,
0.2298973649740219,
0.1480555534362793,
-0.7635053396224976,
0.30794063210487366,
-0.15949924290180206,
-0.761913537979126,
-0.0747816413640976,
-0.10760998725891113,
-0.10105596482753754,
-0.08931226283311844,
-0.26720309257507324,
-0.03778347745537758,
-0.034366998821496964,
0.12902310490608215,
0.0996726006269455,
-0.18974196910858154,
-0.2920210659503937,
0.5691560506820679,
0.04483942687511444,
-0.06085539981722832,
-0.500572919845581,
0.03502483665943146,
0.23558330535888672,
0.26949527859687805,
-0.37254828214645386,
-0.14143610000610352,
0.00848366692662239,
-0.16987912356853485,
-0.09556081146001816,
0.2989889979362488,
0.132442444562912,
0.2216418832540512,
0.18003138899803162,
0.24266982078552246,
0.07439496368169785,
-0.0678134635090828,
0.22975414991378784,
-0.12075291574001312,
0.1633172184228897,
-0.3794223964214325,
-0.2856493890285492,
0.089848592877388,
-0.154698446393013,
0.09925641119480133,
-0.1303553730249405,
-0.2762315273284912,
0.1194211095571518,
0.022673670202493668,
0.03698020428419113,
-0.19940146803855896,
0.054000239819288254,
0.2509947419166565,
0.3887886106967926,
0.47381502389907837,
0.11658641695976257,
0.18427442014217377,
0.37879228591918945,
-0.2087327390909195,
-0.17664837837219238,
0.17488431930541992,
-0.3041079044342041,
-0.4068357050418854,
-0.12828966975212097,
0.5813218355178833,
0.6566792130470276,
0.022443749010562897,
0.2662491798400879,
-0.05833689868450165,
0.2058679163455963,
-0.10704345256090164,
0.21852123737335205,
-0.12969712913036346,
0.312749445438385,
0.133782297372818,
0.03196226432919502,
-0.08014731109142303,
-0.3143453299999237,
0.04706999287009239,
0.22311098873615265,
0.009309099987149239,
-0.19055165350437164,
0.12012019008398056,
-0.044902876019477844,
0.11561956256628036,
-0.2616868019104004,
0.10453179478645325,
-0.14412853121757507,
-0.10798238217830658,
-0.05952464044094086,
0.18231086432933807,
0.2603965401649475,
-0.1355581432580948,
-0.3985465168952942,
0.5211713910102844,
-0.07711613923311234,
-0.0677679106593132,
-0.4286523759365082,
-0.1353069543838501,
0.0023258253931999207,
0.015693705528974533,
0.04736616834998131,
-0.18739864230155945,
0.07273009419441223,
-0.07429869472980499,
0.21187140047550201,
-0.2597357928752899,
0.19149723649024963,
0.002884894609451294,
0.11212516576051712,
-0.06217755377292633,
-0.17945259809494019,
-0.05433419346809387,
-0.3448907732963562,
0.07722637057304382,
-0.1360480785369873,
-0.051221951842308044,
-0.31759148836135864,
-0.07461622357368469,
-0.10793597251176834,
0.1040940210223198,
-0.07709203660488129,
-0.07322966307401657,
0.04745102673768997,
0.015551574528217316,
0.2687012851238251,
-0.03905840963125229,
0.08247677981853485,
-0.07179997861385345,
-0.31824955344200134,
0.2286306470632553,
0.023494455963373184,
0.08909284323453903,
-0.5059285759925842,
-0.6877735257148743,
0.3267151117324829,
-0.22947822511196136,
0.006521798670291901,
0.1465349942445755,
0.025075960904359818,
0.18108153343200684,
0.06387355923652649,
-0.6293525695800781,
0.16461679339408875,
-0.14938676357269287,
0.11815977096557617,
-0.39386478066444397,
-0.08355233073234558,
0.17420858144760132,
0.16900737583637238,
0.02348107285797596,
-0.21774280071258545,
-0.08351419866085052,
0.2013215273618698,
0.08127404749393463,
0.3253593444824219,
-0.03747604042291641,
0.14875684678554535,
-0.15725833177566528,
0.6849867701530457,
0.16343745589256287,
0.2408481389284134,
0.15850098431110382,
0.32593604922294617,
0.47715169191360474,
-0.20958000421524048,
0.031241988763213158,
-0.107679083943367,
-0.15005171298980713,
-0.06614871323108673,
0.1684322953224182,
0.159466952085495,
-0.1389695703983307,
0.17946965992450714,
0.05881873145699501,
-0.12546545267105103,
0.09179066121578217,
0.12319386750459671,
-0.515414297580719,
-0.08839242905378342,
0.03991299495100975,
-0.12382960319519043,
-0.1138722151517868,
0.048370376229286194,
-0.027945470064878464,
0.011985696852207184,
0.4236931800842285,
0.06297910213470459,
-0.33888009190559387,
0.04588181525468826,
-0.20074346661567688,
0.1100526750087738,
-0.08272948861122131,
-0.07399831712245941,
-0.018798984587192535,
0.07973788678646088,
0.19107922911643982,
0.0900401622056961,
0.6883506178855896,
-0.026843948289752007,
-0.006134748458862305,
0.14080753922462463,
0.20764406025409698,
-0.35074931383132935,
0.08956144750118256,
0.1844308078289032,
0.3399955928325653,
-0.08107359707355499,
0.297380268573761,
-0.07142353057861328,
-0.06778473407030106,
-0.31774356961250305,
0.4325813055038452,
-0.302020788192749,
-0.24601927399635315,
-0.14244197309017181,
-0.10410098731517792,
0.09076984971761703,
-0.27450278401374817,
-0.04530460759997368,
-0.14951448142528534,
-0.14263750612735748,
-0.05879109352827072,
-0.1975502073764801,
-0.0950496643781662,
-0.0316319614648819,
-0.12032663822174072,
0.43426692485809326,
0.03057927079498768,
0.08512623608112335,
0.38679996132850647,
0.3048557639122009,
0.18455177545547485,
0.544137716293335,
-0.11855484545230865,
-0.04829801619052887,
0.01913759671151638,
-0.10586782544851303,
0.005777619779109955,
-0.0007473677396774292,
-0.14023591578006744,
0.054288532584905624,
-0.0021305326372385025,
-0.32321250438690186,
0.04621119424700737,
-0.1101754829287529,
0.13552893698215485,
-0.07689308375120163,
-0.30596867203712463,
-0.5708693265914917,
0.4978036880493164,
0.17155538499355316,
-0.29174983501434326,
0.6982319951057434,
-0.2817910313606262,
-0.2447008639574051,
0.18934530019760132,
-0.19605782628059387,
0.8117072582244873,
-0.024319157004356384,
0.20953606069087982,
-0.06907400488853455,
-0.31748634576797485,
0.29968488216400146,
-0.3061923384666443,
0.009476679377257824,
-0.09192132949829102,
0.0470290444791317,
-0.031089292839169502,
-0.2858137786388397,
0.02595452219247818,
0.5388069152832031,
0.021784070879220963,
-0.029194705188274384,
-0.18910449743270874,
0.07495269179344177,
-0.056093595921993256,
0.16307765245437622,
0.09999653697013855,
-0.131927028298378,
0.04831227660179138,
0.11637553572654724,
-0.13053560256958008,
-0.17110487818717957,
0.0016543501988053322,
0.08364929258823395,
0.064480721950531,
-0.12865781784057617,
0.10084250569343567,
0.009928066283464432,
-0.008880937471985817,
0.5330632328987122,
-0.0894705057144165,
-0.35235482454299927,
-0.12075790762901306,
0.4396193027496338,
0.03846900537610054,
-0.438790887594223,
-0.07109922915697098,
0.4661093056201935,
0.32220321893692017,
0.22951291501522064,
-0.2802361249923706,
-0.3105469346046448,
0.12669505178928375,
-0.046657055616378784,
-0.0474575012922287,
0.1918984353542328,
-0.37582194805145264,
-0.4268642067909241,
0.04177241027355194,
0.44872063398361206,
0.01049082726240158,
0.06685005873441696,
-0.2820749878883362,
0.23072709143161774,
-0.0048329830169677734,
0.09747229516506195,
0.06295701116323471,
0.366207480430603,
0.08850399404764175,
0.02998250722885132,
-0.19470107555389404,
-0.41641438007354736,
0.028832321986556053,
0.30716103315353394,
0.40126800537109375,
-0.23117338120937347,
0.5021203756332397,
-0.31504082679748535,
-0.19167383015155792,
-0.130892813205719,
0.21612948179244995,
0.35250988602638245,
-0.4439143240451813,
0.18585196137428284,
-0.005982150323688984,
0.2789992094039917,
-0.024810153990983963,
-0.1342749446630478,
0.16550622880458832,
0.17581424117088318,
-0.038897059857845306,
-0.23504279553890228,
-0.3576943874359131,
0.03461751341819763,
-0.22805331647396088,
0.1640295535326004,
0.18664422631263733,
-0.7211913466453552,
0.06384235620498657,
0.24205569922924042,
-0.19672493636608124,
0.38302019238471985,
0.22598206996917725,
0.09179319441318512,
-0.0010106544941663742,
0.04355724900960922,
0.2381799817085266,
-0.05271127074956894,
-0.025387542322278023,
-0.16928866505622864,
-0.2760159969329834,
-0.16658103466033936,
-0.020482102409005165,
0.17426155507564545,
-0.08536295592784882,
-0.060322023928165436,
-0.32806554436683655,
-0.22062157094478607,
0.1910262107849121,
-0.0904950276017189,
0.2266637086868286,
0.11681266874074936,
0.05303701013326645,
-0.1274450123310089,
0.24196769297122955,
-0.17036402225494385,
-0.3918952941894531,
0.07721905410289764,
-0.046078160405159,
0.22374579310417175,
0.04586944356560707,
0.17449839413166046,
-0.012861532159149647,
-0.10750600695610046,
-0.19065408408641815,
0.029228951781988144,
0.11612342298030853,
-0.026158232241868973,
0.03174243122339249,
-0.31721484661102295,
0.1668662279844284,
0.0520867295563221,
0.1516219973564148,
0.3093547224998474,
-0.22136685252189636,
-0.1850498914718628,
-0.0657382532954216,
0.08567140251398087,
0.14447557926177979,
-0.23716892302036285,
0.1985238492488861,
0.109416663646698,
-0.280184268951416,
-0.030511818826198578,
0.2940532863140106,
-0.08216940611600876,
-0.08164490759372711,
0.1285952925682068,
0.4023348093032837,
-0.25527429580688477,
0.38213974237442017,
0.127399742603302,
0.20816455781459808,
-0.022791419178247452,
0.3979860246181488,
0.28782498836517334,
0.12268392741680145,
0.35275131464004517,
-0.044715531170368195,
0.32520169019699097,
0.5679377913475037,
0.017886340618133545,
-0.09070148319005966,
-0.41451355814933777,
-0.03413801267743111,
0.30770343542099,
-0.4453386068344116,
0.05723375082015991,
0.23922277987003326,
0.2952447533607483,
0.08876974880695343,
-0.16750401258468628,
-0.18694095313549042,
0.012024175375699997,
-0.17251437902450562,
-0.19310671091079712,
0.12190435826778412,
-0.3153283894062042,
0.24083706736564636,
0.2190687358379364,
-0.010922174900770187,
0.14804702997207642,
0.3217509388923645,
0.05334291234612465,
-0.1923634558916092,
-0.05355388671159744,
0.41843166947364807,
0.1564745008945465,
-0.025230713188648224,
-0.06222730502486229,
0.023376591503620148,
-0.07461121678352356,
-0.11312875151634216,
0.12225349247455597,
-0.018667472526431084,
-0.027283865958452225,
0.19565793871879578,
0.10935688018798828,
0.13422171771526337,
0.28777435421943665,
-0.046405136585235596,
-0.12714117765426636,
0.3520174026489258,
0.13258740305900574,
-0.602928638458252,
0.11572577059268951,
0.1073773130774498,
-0.02421288937330246,
0.1924085021018982,
0.13085980713367462,
0.32903721928596497,
-0.16569103300571442,
-0.08927083760499954,
-0.38956406712532043,
-0.07672150433063507,
-0.08492758125066757,
0.26773741841316223,
-0.15984687209129333,
-0.1504535675048828,
0.5574600100517273,
-0.10899205505847931,
-0.08845756202936172,
-0.2930595278739929,
0.0069545116275548935,
-0.14731688797473907,
0.5219277143478394,
0.16452711820602417,
-0.028537459671497345,
-0.13466742634773254,
-0.23676078021526337,
-0.520084798336029,
0.04239347577095032,
-0.22694110870361328,
0.477240651845932,
-0.042116306722164154,
0.33772507309913635,
-0.14726552367210388,
-0.06706809252500534,
0.3972635269165039,
0.07089626044034958,
0.0967220589518547,
-0.015260927379131317,
-0.2222389578819275,
0.10804939270019531,
0.37503498792648315,
0.2518649995326996,
-0.10330455750226974,
-0.3137206435203552,
0.035881511867046356,
0.1303761750459671,
0.014955773949623108,
0.038794711232185364,
-0.08153615891933441,
0.1898535043001175,
0.45353689789772034,
0.6795002818107605,
0.15032027661800385,
0.09265368431806564,
0.06829085946083069,
-0.004987742751836777,
-0.11923058331012726,
-0.2603257894515991,
0.14615203440189362,
0.12065327167510986,
0.047240689396858215,
0.13303536176681519,
-0.4705202579498291,
0.34386423230171204,
-0.08925192058086395,
-0.03156394138932228,
-0.1404591202735901,
-0.12974292039871216,
-0.14684899151325226,
-0.13659481704235077,
-0.36601197719573975,
0.20431184768676758,
0.15800075232982635,
0.1742907613515854,
0.035645678639411926,
0.1503092497587204,
-0.031737059354782104,
0.02854076586663723,
0.3936861753463745,
-0.15784811973571777,
-0.16413287818431854,
0.2927771806716919,
0.21919065713882446,
0.2682177722454071,
-0.21801815927028656,
-0.3902970254421234,
-0.02396729588508606,
0.554038405418396,
-0.21814095973968506,
-0.24163395166397095,
-0.0371701717376709,
-0.2585568428039551,
0.1128588616847992,
0.034694064408540726,
0.6675108671188354,
0.10506802797317505,
-0.16299107670783997,
0.008821438997983932,
-0.3090762495994568
] |
https://github.com/huggingface/datasets/issues/2196 | `load_dataset` caches two arrow files? | This is a wrong report -- `cache-*` files are created only my `map`, not by `load_dataset`. | Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`? | 16 | `load_dataset` caches two arrow files?
Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`?
This is a wrong report -- `cache-*` files are created only my `map`, not by `load_dataset`. | [
-0.0013231374323368073,
-0.20793092250823975,
-0.12528645992279053,
0.7411245703697205,
-0.14882899820804596,
0.2700349688529968,
0.28123369812965393,
0.23481938242912292,
0.3605191111564636,
-0.23589085042476654,
-0.011621879413723946,
0.20675554871559143,
0.13411907851696014,
-0.4797019958496094,
0.18270829319953918,
0.25128602981567383,
0.23645511269569397,
0.0539579913020134,
-0.15154486894607544,
-0.18463076651096344,
-0.12112104892730713,
0.1802387684583664,
0.1390395611524582,
0.08087780326604843,
-0.48494061827659607,
-0.1015208289027214,
0.1177738606929779,
0.15238672494888306,
-0.12126258760690689,
-0.39251887798309326,
0.3373830020427704,
-0.07227334380149841,
0.005932902917265892,
0.4784197509288788,
-0.00012428866466507316,
0.0004776418209075928,
0.372857928276062,
0.06550293415784836,
-0.2765643298625946,
0.054949626326560974,
-0.3939550220966339,
-0.15797582268714905,
0.21199826896190643,
-0.22452718019485474,
0.3471076190471649,
-0.3236003816127777,
-0.15827539563179016,
-0.6293209791183472,
0.5224642157554626,
0.2015790194272995,
0.14052754640579224,
-0.2274220585823059,
-0.401284396648407,
0.10855382680892944,
0.24519017338752747,
0.1741994321346283,
0.021581759676337242,
0.017085161060094833,
-0.22182393074035645,
0.257230281829834,
-0.06483864039182663,
0.13777931034564972,
-0.08722855895757675,
0.07921119034290314,
0.43621543049812317,
0.18679861724376678,
-0.014609508216381073,
-0.22056511044502258,
0.30095091462135315,
0.09314452111721039,
0.9287811517715454,
-0.3096569776535034,
-0.028491759672760963,
-0.39486172795295715,
-0.21277087926864624,
-0.04907967895269394,
0.2915646433830261,
0.33783459663391113,
0.07478128373622894,
-0.007136248052120209,
-0.15415291488170624,
-0.49593469500541687,
0.10605812072753906,
-0.14871765673160553,
0.10502877831459045,
-0.3734424114227295,
-0.20289964973926544,
0.3179076611995697,
0.2064976692199707,
0.3100801706314087,
0.38495686650276184,
-0.43130189180374146,
-0.3036452829837799,
0.3299283981323242,
-0.22328291833400726,
0.07790789008140564,
-0.04683280736207962,
-0.05205612629652023,
0.049871109426021576,
0.22839871048927307,
0.3403443992137909,
-0.3397468328475952,
-0.21760308742523193,
0.08175767213106155,
0.2542223036289215,
0.34347447752952576,
0.24624252319335938,
0.11831057816743851,
-0.07828554511070251,
-0.34283503890037537,
-0.04510681331157684,
-0.24414238333702087,
-0.032565366476774216,
-0.1506539285182953,
0.3954872786998749,
-0.35826364159584045,
-0.060370467603206635,
-0.17410263419151306,
0.10839077085256577,
0.06026098504662514,
0.05748608708381653,
-0.46772435307502747,
0.02729375660419464,
0.1005067229270935,
0.17091037333011627,
0.30668672919273376,
-0.14986076951026917,
0.1831599473953247,
-0.0014762766659259796,
-0.05910007283091545,
-0.1941264122724533,
-0.04038316383957863,
-0.16240128874778748,
0.24715293943881989,
0.24120791256427765,
0.03715211898088455,
0.2517976462841034,
0.14603596925735474,
-0.14857657253742218,
-0.11872264742851257,
0.3654901087284088,
-0.19048568606376648,
0.19315649569034576,
0.3797281086444855,
-0.06618905812501907,
0.42042088508605957,
0.000027704983949661255,
0.05626028776168823,
-0.16157200932502747,
0.5288682579994202,
-0.5380881428718567,
-0.21142755448818207,
0.01730361022055149,
0.11259778589010239,
-0.13533657789230347,
0.2883090674877167,
-0.6906569600105286,
0.038364000618457794,
0.36201685667037964,
-0.15944074094295502,
0.25970596075057983,
0.15796703100204468,
-0.22692187130451202,
-0.33587750792503357,
-0.12935857474803925,
0.4049050211906433,
-0.422099232673645,
-0.18948397040367126,
-0.224315345287323,
-0.1474875956773758,
-0.05349745601415634,
0.2821420133113861,
-0.5153652429580688,
0.4251537024974823,
-0.5116039514541626,
0.12667207419872284,
0.5514276623725891,
-0.36880970001220703,
-0.416930615901947,
0.39235958456993103,
-0.057492878288030624,
0.040159232914447784,
0.3320164680480957,
0.1701669842004776,
-0.125535786151886,
-0.17165134847164154,
-0.02399274706840515,
-0.08545073866844177,
0.15731218457221985,
-0.18667303025722504,
-0.14314262568950653,
-0.021327171474695206,
0.19808608293533325,
-0.10801583528518677,
-0.1761617511510849,
0.05336171016097069,
0.11608920991420746,
-0.07612689584493637,
0.25070416927337646,
0.1806485950946808,
0.13875512778759003,
0.2073518931865692,
-0.10483402013778687,
-0.26615458726882935,
0.2222423106431961,
0.23637694120407104,
-0.7416958212852478,
0.2548567056655884,
-0.14765216410160065,
-0.7274235486984253,
0.03317253291606903,
-0.06951917707920074,
-0.1548355221748352,
-0.057483308017253876,
-0.22020290791988373,
0.05176062136888504,
-0.06550882756710052,
0.11963073909282684,
0.06427760422229767,
-0.21241752803325653,
-0.2887093126773834,
0.6405113339424133,
-0.07206562161445618,
-0.035200197249650955,
-0.44615909457206726,
0.12135852873325348,
0.2529791295528412,
0.28134337067604065,
-0.29457393288612366,
-0.21600058674812317,
0.08297711610794067,
-0.07839635759592056,
-0.13875430822372437,
0.27134302258491516,
0.13480983674526215,
0.17695584893226624,
0.22557106614112854,
0.1641739308834076,
0.03360631689429283,
-0.13517139852046967,
0.25252795219421387,
-0.06468136608600616,
0.18501706421375275,
-0.36359700560569763,
-0.24630966782569885,
0.0732184648513794,
-0.18192312121391296,
0.08343534916639328,
-0.17297516763210297,
-0.2876409888267517,
0.257578581571579,
0.02413923665881157,
0.001064550131559372,
-0.20002250373363495,
0.12899379432201385,
0.27389177680015564,
0.3292218744754791,
0.45642614364624023,
0.18692299723625183,
0.06874700635671616,
0.4439369738101959,
-0.13524694740772247,
-0.2231043577194214,
0.22936967015266418,
-0.34716475009918213,
-0.4305855333805084,
-0.04286033660173416,
0.47959664463996887,
0.6346256732940674,
0.05242707207798958,
0.2430170327425003,
-0.058897390961647034,
0.2254139482975006,
-0.1210729107260704,
0.20588110387325287,
-0.12580175697803497,
0.2707577049732208,
0.26938924193382263,
-0.036157652735710144,
-0.19101931154727936,
-0.34539347887039185,
0.1269652098417282,
0.2785903513431549,
0.0752326175570488,
-0.31639981269836426,
0.022024312987923622,
-0.0005505364388227463,
0.0009886547923088074,
-0.23477257788181305,
0.1554822474718094,
-0.15147249400615692,
-0.057127416133880615,
-0.03594055771827698,
0.10124528408050537,
0.3760834038257599,
-0.14833417534828186,
-0.3818007707595825,
0.44291090965270996,
-0.031703390181064606,
0.012056509032845497,
-0.43599840998649597,
-0.07737685739994049,
0.006216086447238922,
-0.020194314420223236,
0.06126417964696884,
-0.06915509700775146,
0.12645278871059418,
-0.18979622423648834,
0.22562657296657562,
-0.2579314708709717,
0.22387400269508362,
0.05867041274905205,
0.19912971556186676,
-0.07228249311447144,
-0.09324437379837036,
-0.006390221416950226,
-0.3061405420303345,
0.04028891772031784,
-0.12901465594768524,
-0.08581417053937912,
-0.36088794469833374,
-0.03479563817381859,
-0.23569393157958984,
0.15528273582458496,
-0.0740584135055542,
-0.12099302560091019,
0.08668051660060883,
0.02956775203347206,
0.2045619785785675,
0.045036885887384415,
0.13278675079345703,
-0.04578261822462082,
-0.3009680509567261,
0.12792667746543884,
0.04397368058562279,
0.1046285554766655,
-0.5376973152160645,
-0.7024546265602112,
0.25380516052246094,
-0.12448325753211975,
-0.0008702464401721954,
0.16466312110424042,
0.007190275937318802,
0.11465203762054443,
0.023912381380796432,
-0.6430916786193848,
0.07764235883951187,
-0.12918786704540253,
0.10014721751213074,
-0.43775421380996704,
0.03150340914726257,
0.22547918558120728,
0.09225533157587051,
0.04033084958791733,
-0.2202933430671692,
-0.11124551296234131,
0.1473977267742157,
0.10060729086399078,
0.3648701310157776,
0.03253251314163208,
0.31125983595848083,
-0.18571992218494415,
0.6073452830314636,
0.24768352508544922,
0.2405097782611847,
0.19819502532482147,
0.24626998603343964,
0.4493066966533661,
-0.1849256157875061,
0.00522143580019474,
-0.12567025423049927,
-0.09586183726787567,
-0.07452969253063202,
0.1621599644422531,
0.19938760995864868,
-0.1486029177904129,
0.12179933488368988,
0.12786953151226044,
-0.31495633721351624,
0.13013897836208344,
0.023346347734332085,
-0.49665534496307373,
-0.07349608093500137,
0.048118602484464645,
-0.17726345360279083,
-0.1590229868888855,
0.01795060932636261,
-0.03802845627069473,
0.055480681359767914,
0.4832533895969391,
0.022995347157120705,
-0.36815932393074036,
0.04195612296462059,
-0.27267706394195557,
0.09451532363891602,
-0.14445467293262482,
-0.061525583267211914,
0.04738659784197807,
0.12965041399002075,
0.2777792513370514,
0.12393254041671753,
0.7186540365219116,
-0.007662907242774963,
0.08012811094522476,
0.1951044797897339,
0.20215104520320892,
-0.39934471249580383,
0.08180518448352814,
0.072187140583992,
0.36923834681510925,
-0.08133357763290405,
0.3179689049720764,
-0.1737513542175293,
-0.036395490169525146,
-0.3998003602027893,
0.4534449577331543,
-0.3241198658943176,
-0.3078624904155731,
-0.184866264462471,
-0.12802350521087646,
0.03721679747104645,
-0.21223947405815125,
-0.06124633550643921,
-0.10303165018558502,
-0.053472600877285004,
-0.10184992849826813,
-0.18289001286029816,
-0.1325998157262802,
-0.010648749768733978,
-0.1577119529247284,
0.5028899312019348,
0.07277320325374603,
0.14248037338256836,
0.3264435827732086,
0.2844714820384979,
0.10067369788885117,
0.6179879903793335,
-0.05071776732802391,
0.011050008237361908,
-0.006983337923884392,
-0.1388685703277588,
-0.03911321610212326,
0.015824094414711,
-0.2123359739780426,
0.04280821606516838,
-0.05253704637289047,
-0.26501643657684326,
0.1317899525165558,
-0.03458213806152344,
0.06656227260828018,
-0.10583095997571945,
-0.24077846109867096,
-0.49467116594314575,
0.4943987727165222,
0.22189439833164215,
-0.2921310067176819,
0.7134966850280762,
-0.2678264379501343,
-0.2052764594554901,
0.14164723455905914,
-0.23392248153686523,
0.8169115781784058,
-0.10171708464622498,
0.07548991590738297,
-0.07128551602363586,
-0.29677069187164307,
0.291924387216568,
-0.39845484495162964,
-0.040977027267217636,
-0.14120876789093018,
-0.011090337298810482,
-0.04595208168029785,
-0.283378005027771,
-0.014865808188915253,
0.5497389435768127,
0.07460525631904602,
0.004117313772439957,
-0.20255771279335022,
0.027984023094177246,
-0.06031157821416855,
0.20448029041290283,
0.15688081085681915,
-0.12646953761577606,
-0.04020746052265167,
0.024601340293884277,
-0.16843988001346588,
-0.11379539966583252,
0.010840095579624176,
0.15962468087673187,
0.10407765209674835,
-0.3020131587982178,
0.09865576028823853,
-0.050376299768686295,
0.01301686093211174,
0.44223082065582275,
-0.07225213944911957,
-0.38809657096862793,
-0.15896117687225342,
0.4739689826965332,
0.00725865364074707,
-0.38442960381507874,
-0.07128732651472092,
0.3765248954296112,
0.2823237180709839,
0.2021595537662506,
-0.3082772195339203,
-0.18910466134548187,
-0.037973903119564056,
-0.10220763087272644,
-0.03993582725524902,
0.1005173772573471,
-0.37790995836257935,
-0.5546372532844543,
0.09111477434635162,
0.42581313848495483,
0.013057608157396317,
0.049089234322309494,
-0.23186548054218292,
0.25660568475723267,
0.02739417925477028,
0.1178208589553833,
0.02476462349295616,
0.4632156491279602,
0.008330652490258217,
0.026621222496032715,
-0.06534244120121002,
-0.4270567297935486,
0.045571278780698776,
0.3402090072631836,
0.42474445700645447,
-0.180031418800354,
0.4000789523124695,
-0.28071942925453186,
-0.17892342805862427,
-0.10613956302404404,
0.13775014877319336,
0.39765194058418274,
-0.4959983825683594,
0.18457236886024475,
0.044694218784570694,
0.303674578666687,
-0.06909967958927155,
-0.10829262435436249,
0.22180257737636566,
0.24551716446876526,
-0.0082300566136837,
-0.20963631570339203,
-0.32188424468040466,
0.08719595521688461,
-0.27046191692352295,
0.12771669030189514,
0.2162761390209198,
-0.7216906547546387,
0.0634288564324379,
0.3088494837284088,
-0.15185020864009857,
0.3722362816333771,
0.26913073658943176,
0.07420958578586578,
-0.009801819920539856,
0.09391695261001587,
0.23464497923851013,
-0.06477616727352142,
-0.030275465920567513,
-0.1650415062904358,
-0.20980209112167358,
-0.13626769185066223,
0.018925555050373077,
0.2167365849018097,
-0.04322127252817154,
-0.040719375014305115,
-0.2283444106578827,
-0.23324264585971832,
0.08173283189535141,
-0.0844750925898552,
0.1314612478017807,
0.0993550643324852,
-0.0014922469854354858,
-0.061376359313726425,
0.31578126549720764,
-0.25109919905662537,
-0.501979410648346,
0.05553934723138809,
-0.06927293539047241,
0.22594916820526123,
-0.03728766739368439,
0.18390963971614838,
0.08210085332393646,
-0.05356117710471153,
-0.2882063388824463,
0.031370725482702255,
0.10326755791902542,
0.0403592512011528,
0.033319830894470215,
-0.31704819202423096,
0.22411474585533142,
0.14922206103801727,
0.2395610213279724,
0.2552298903465271,
-0.21947582066059113,
-0.0856136754155159,
-0.027629055082798004,
0.0373448021709919,
0.02987849712371826,
-0.2787134051322937,
0.1930200606584549,
0.12880432605743408,
-0.31747353076934814,
-0.0012822449207305908,
0.3024916648864746,
-0.1544516682624817,
0.000986941158771515,
0.08110382407903671,
0.39366117119789124,
-0.23087544739246368,
0.3140847682952881,
0.21475999057292938,
0.10965225100517273,
0.0043120793998241425,
0.4021008014678955,
0.2612256407737732,
0.019719421863555908,
0.4292600154876709,
0.08746659755706787,
0.3169122636318207,
0.541094183921814,
0.05064527690410614,
-0.200219064950943,
-0.4718763828277588,
0.012836430221796036,
0.30308258533477783,
-0.4003792405128479,
-0.04618729650974274,
0.17005550861358643,
0.2563851475715637,
0.145004540681839,
-0.15130873024463654,
-0.24862702190876007,
-0.043513838201761246,
-0.14597323536872864,
-0.11005108058452606,
0.04466668516397476,
-0.2654963433742523,
0.2061278223991394,
0.2095092535018921,
-0.05569728836417198,
0.15479665994644165,
0.27261579036712646,
0.0718444362282753,
-0.2558664083480835,
-0.011109184473752975,
0.4257177412509918,
0.19116032123565674,
-0.028907202184200287,
-0.1679757535457611,
0.08478473126888275,
-0.16487808525562286,
-0.07429444789886475,
0.2118581086397171,
-0.002637350931763649,
-0.021393220871686935,
0.1676541566848755,
0.22857734560966492,
0.059346433728933334,
0.2703266739845276,
-0.04944257438182831,
-0.11721156537532806,
0.3435634970664978,
0.11065687239170074,
-0.5399624109268188,
0.026154179126024246,
0.07324342429637909,
-0.03485317528247833,
0.22873017191886902,
0.06450609862804413,
0.2918299734592438,
-0.17592108249664307,
-0.09064549952745438,
-0.442107230424881,
-0.04630051553249359,
-0.17193743586540222,
0.23327142000198364,
-0.14202746748924255,
-0.1617719680070877,
0.49963322281837463,
-0.06038650497794151,
-0.10571058094501495,
-0.3211374282836914,
-0.018665600568056107,
-0.23007279634475708,
0.36978238821029663,
0.17301680147647858,
0.039144665002822876,
-0.15728534758090973,
-0.27959752082824707,
-0.5812830924987793,
0.08490574359893799,
-0.21606415510177612,
0.4904792606830597,
-0.027843426913022995,
0.33625075221061707,
-0.13367876410484314,
0.04388844966888428,
0.44372767210006714,
0.05898873135447502,
0.14738447964191437,
-0.0009266212582588196,
-0.16561612486839294,
0.009092912077903748,
0.3874022364616394,
0.31159916520118713,
-0.14932823181152344,
-0.33832988142967224,
0.050923049449920654,
0.13518987596035004,
-0.026980821043252945,
0.0927216112613678,
-0.10290101170539856,
0.20294876396656036,
0.5067504048347473,
0.6720574498176575,
0.19035273790359497,
0.2355189174413681,
0.05332236737012863,
0.03573695570230484,
-0.07736295461654663,
-0.2588540017604828,
0.1017116978764534,
0.13998006284236908,
0.01338762603700161,
0.11795414984226227,
-0.4730012118816376,
0.32620102167129517,
-0.09338259696960449,
0.019741471856832504,
-0.1346079558134079,
-0.12392965704202652,
-0.20155058801174164,
-0.13331985473632812,
-0.3255668878555298,
0.1312025636434555,
0.15060891211032867,
0.12284503132104874,
0.03167435899376869,
0.09987363964319229,
0.019781768321990967,
-0.022125938907265663,
0.3603232502937317,
-0.1492314487695694,
-0.10521776974201202,
0.22376245260238647,
0.3252861797809601,
0.3091470003128052,
-0.25673773884773254,
-0.3303995132446289,
-0.04709922894835472,
0.5866265296936035,
-0.22997990250587463,
-0.20181211829185486,
0.004031052812933922,
-0.2191026359796524,
0.1260611116886139,
0.039979588240385056,
0.6796938180923462,
0.05153682827949524,
-0.15241502225399017,
-0.04910392314195633,
-0.3140854835510254
] |
https://github.com/huggingface/datasets/issues/2195 | KeyError: '_indices_files' in `arrow_dataset.py` | Thanks @samsontmr this should be fixed on master now
Feel free to reopen if you're still having issues | After pulling the latest master, I'm getting a crash when `load_from_disk` tries to load my local dataset.
Trace:
```
Traceback (most recent call last):
File "load_data.py", line 11, in <module>
dataset = load_from_disk(SRC)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/load.py", line 784, in load_from_disk
return DatasetDict.load_from_disk(dataset_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/dataset_dict.py", line 692, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 634, in load_from_disk
if state["_indices_files"]:
KeyError: '_indices_files'
```
I believe this is the line causing the error since there may not be a `_indices_files` key in the older versions:
https://github.com/huggingface/datasets/blob/b70141e3c5149430951773aaa0155555c5fb3e76/src/datasets/arrow_dataset.py#L634
May I suggest using `state.get()` instead of directly indexing the dictionary?
@lhoestq | 18 | KeyError: '_indices_files' in `arrow_dataset.py`
After pulling the latest master, I'm getting a crash when `load_from_disk` tries to load my local dataset.
Trace:
```
Traceback (most recent call last):
File "load_data.py", line 11, in <module>
dataset = load_from_disk(SRC)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/load.py", line 784, in load_from_disk
return DatasetDict.load_from_disk(dataset_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/dataset_dict.py", line 692, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 634, in load_from_disk
if state["_indices_files"]:
KeyError: '_indices_files'
```
I believe this is the line causing the error since there may not be a `_indices_files` key in the older versions:
https://github.com/huggingface/datasets/blob/b70141e3c5149430951773aaa0155555c5fb3e76/src/datasets/arrow_dataset.py#L634
May I suggest using `state.get()` instead of directly indexing the dictionary?
@lhoestq
Thanks @samsontmr this should be fixed on master now
Feel free to reopen if you're still having issues | [
-0.3437002897262573,
0.0625094473361969,
-0.061988651752471924,
0.6979855895042419,
-0.0762995034456253,
0.15042373538017273,
0.19406847655773163,
0.493173748254776,
0.5131549835205078,
0.1480899453163147,
0.01922178640961647,
0.18392212688922882,
-0.3918607831001282,
0.06803041696548462,
-0.10452601313591003,
0.07905975729227066,
0.08534041792154312,
0.2412605732679367,
-0.1544327437877655,
-0.05229048430919647,
-0.28065383434295654,
0.10073672235012054,
-0.13098299503326416,
0.21137398481369019,
-0.2218931019306183,
0.12316489964723587,
-0.08952461183071136,
0.4890264570713043,
-0.18539981544017792,
-0.7146968841552734,
0.4884229898452759,
-0.0012380480766296387,
0.1987973153591156,
0.6145881414413452,
-0.00012118738231947646,
0.25635457038879395,
0.32838886976242065,
0.007641160860657692,
-0.31909358501434326,
-0.3326142430305481,
-0.2397473156452179,
-0.15728634595870972,
0.38407039642333984,
-0.13702958822250366,
0.10613324493169785,
-0.44740477204322815,
-0.3572832942008972,
-0.3314715325832367,
0.22233082354068756,
0.0783567875623703,
0.11717204749584198,
0.30269965529441833,
0.2074175924062729,
-0.14360594749450684,
0.22895339131355286,
0.007780387997627258,
0.1049867793917656,
0.5003933310508728,
0.18494504690170288,
-0.293407678604126,
-0.11520124226808548,
0.140863835811615,
-0.10570021718740463,
-0.03383958339691162,
0.3557124733924866,
-0.011648938991129398,
0.5778525471687317,
-0.1533564329147339,
-0.06144382059574127,
0.17032015323638916,
0.7022154927253723,
-0.14592212438583374,
-0.45142149925231934,
-0.33540233969688416,
-0.1894247978925705,
-0.2096371352672577,
0.2590707242488861,
-0.2555755376815796,
-0.23303118348121643,
0.155056431889534,
0.17386844754219055,
-0.1955353319644928,
0.05643656849861145,
0.2905206084251404,
-0.2734231948852539,
0.30197054147720337,
0.034515246748924255,
-0.030323103070259094,
0.6314467191696167,
-0.08033698797225952,
0.09116016328334808,
0.1656607836484909,
-0.17023572325706482,
0.08073239773511887,
-0.2672140598297119,
-0.03888333588838577,
0.19094467163085938,
-0.3841381072998047,
-0.20940929651260376,
0.05289497971534729,
-0.02552470564842224,
0.1885947585105896,
-0.14970237016677856,
0.039996035397052765,
0.668785572052002,
0.24896372854709625,
0.12156899273395538,
0.22970812022686005,
0.2717272639274597,
0.21714729070663452,
-0.03505736216902733,
0.01837725192308426,
0.018403813242912292,
-0.34719204902648926,
0.044805992394685745,
0.11911291629076004,
0.31130027770996094,
-0.3126896023750305,
-0.06941649317741394,
0.05930483713746071,
-0.06248379871249199,
-0.20154066383838654,
0.13705559074878693,
0.3150913715362549,
0.15584443509578705,
0.5801067352294922,
0.03746691346168518,
0.19700703024864197,
-0.03382738307118416,
0.37132373452186584,
-0.13587990403175354,
-0.2581339478492737,
-0.09957492351531982,
-0.0013662204146385193,
0.10815447568893433,
-0.5095401406288147,
0.23598574101924896,
-0.04754110053181648,
0.07498128712177277,
0.010053399950265884,
-0.1632341891527176,
0.08407182991504669,
0.1596420854330063,
0.3046094477176666,
-0.1819997876882553,
0.210174560546875,
0.3970349431037903,
-0.3919408321380615,
-0.15233075618743896,
0.12384681403636932,
-0.29137933254241943,
-0.5782806277275085,
-0.30565395951271057,
0.13126873970031738,
0.12958119809627533,
0.025259871035814285,
-0.2260642647743225,
-0.13929225504398346,
0.11148100346326828,
0.019670523703098297,
-0.021450333297252655,
-0.0969826728105545,
-0.08330350369215012,
-0.16756442189216614,
0.01596931554377079,
0.3993794918060303,
-0.5810679793357849,
-0.002368621528148651,
-0.2711960971355438,
-0.12128730118274689,
-0.2390403151512146,
0.28163647651672363,
-0.40633493661880493,
0.20375528931617737,
-0.3347819149494171,
-0.13480305671691895,
0.30435624718666077,
-0.44268175959587097,
-0.4974362552165985,
0.3520655035972595,
-0.04886048287153244,
-0.11171124130487442,
0.1396109014749527,
-0.11204418540000916,
0.19414886832237244,
-0.04497511684894562,
0.46876856684684753,
0.055126845836639404,
0.07122588902711868,
-0.09602030366659164,
-0.07156197726726532,
-0.13248537480831146,
0.03400854766368866,
0.3673783838748932,
0.07573546469211578,
-0.14865046739578247,
-0.02344706654548645,
-0.19101421535015106,
0.33855578303337097,
-0.033753957599401474,
-0.09719918668270111,
0.31829220056533813,
0.2205263078212738,
-0.008715927600860596,
0.06385158747434616,
-0.00003699213266372681,
-0.40780049562454224,
0.46205100417137146,
0.105939581990242,
-0.04437785595655441,
-0.3058127760887146,
0.08688070625066757,
-0.23385849595069885,
0.11782930046319962,
-0.39850926399230957,
0.09078505635261536,
0.007139209657907486,
-0.15558667480945587,
-0.15386171638965607,
-0.10764311254024506,
-0.38969990611076355,
-0.26568087935447693,
0.0552959144115448,
0.2186611294746399,
-0.1987503618001938,
0.22556845843791962,
-0.11292318254709244,
-0.07878617942333221,
-0.030389683321118355,
0.11039771884679794,
-0.04723699390888214,
-0.2692546546459198,
-0.1994897723197937,
0.3676324188709259,
0.20349539816379547,
0.03888779133558273,
-0.13020741939544678,
0.0433964729309082,
0.26175305247306824,
-0.005962017923593521,
0.36879271268844604,
0.3228166699409485,
0.008459076285362244,
-0.1577734649181366,
0.0768173485994339,
0.43623805046081543,
-0.18491187691688538,
0.3767447769641876,
-0.06325361877679825,
0.0499110221862793,
-0.0009462200105190277,
0.08311265707015991,
0.11807029694318771,
-0.5903171300888062,
-0.025422174483537674,
-0.1207478791475296,
0.3981439173221588,
-0.07112927734851837,
-0.031861528754234314,
0.01121801882982254,
0.22759971022605896,
-0.0984688401222229,
0.1662932187318802,
0.001817859709262848,
-0.19077426195144653,
0.02432224527001381,
0.04313376545906067,
0.23127420246601105,
0.19580674171447754,
0.1379644274711609,
-0.003072936087846756,
0.08056452125310898,
0.1951952874660492,
-0.10462968051433563,
0.35647404193878174,
0.06863392889499664,
0.29521647095680237,
0.26328444480895996,
-0.26364240050315857,
-0.15106308460235596,
-0.2133142352104187,
-0.06091388314962387,
-0.13628976047039032,
0.37558847665786743,
-0.21558347344398499,
-0.020114023238420486,
-0.42017674446105957,
-0.23144733905792236,
-0.12569847702980042,
-0.33769407868385315,
-0.15075810253620148,
-0.4368816018104553,
-0.08837826550006866,
0.2107362151145935,
-0.24747319519519806,
0.0550902783870697,
-0.19703595340251923,
-0.11326278746128082,
0.17896711826324463,
-0.034048065543174744,
0.06016289442777634,
-0.3995401859283447,
-0.205982506275177,
-0.027768412604928017,
0.4963712692260742,
-0.16984951496124268,
-0.022450873628258705,
0.020651524886488914,
0.029630113393068314,
-0.08535517007112503,
-0.0005939304828643799,
0.18731723725795746,
-0.15657681226730347,
-0.026039542630314827,
0.14723503589630127,
0.31312960386276245,
-0.05099815875291824,
-0.20903097093105316,
0.16671770811080933,
-0.1248663067817688,
-0.26233798265457153,
0.15468989312648773,
0.0747198536992073,
0.12154019623994827,
-0.04194427654147148,
-0.136470228433609,
-0.28123578429222107,
-0.465927392244339,
0.11322858184576035,
0.13294702768325806,
0.32654058933258057,
0.3057713806629181,
0.25697454810142517,
0.2501545548439026,
0.19699305295944214,
-0.1252463012933731,
-0.10249070078134537,
-0.16090457141399384,
0.09758864343166351,
0.03451896831393242,
-0.16832199692726135,
-0.1477055549621582,
0.03334696590900421,
0.10635815560817719,
-0.14552021026611328,
-0.522537350654602,
0.0735286995768547,
0.0396970771253109,
0.33372318744659424,
-0.043208107352256775,
0.15009747445583344,
0.27384859323501587,
0.22447285056114197,
-0.1346721053123474,
0.08239004760980606,
-0.07163415104150772,
-0.05284705013036728,
0.1690419614315033,
0.07099233567714691,
0.07592496275901794,
0.6219985485076904,
-0.1741815209388733,
0.9047235250473022,
-0.08506110310554504,
0.09835155308246613,
0.3507148027420044,
0.0271191094070673,
0.37144604325294495,
-0.3195246458053589,
-0.3450508117675781,
-0.39717355370521545,
-0.01289302110671997,
-0.26904594898223877,
-0.025876536965370178,
-0.0536876916885376,
-0.26348087191581726,
-0.24247537553310394,
-0.10624156892299652,
-0.20120275020599365,
-0.26788681745529175,
0.08917845040559769,
-0.4607055187225342,
-0.15192419290542603,
-0.29181715846061707,
0.2894778251647949,
0.03389521688222885,
0.07849640399217606,
0.24965399503707886,
0.07183027267456055,
0.16376227140426636,
-0.19856122136116028,
-0.17156600952148438,
-0.2360582798719406,
-0.30281561613082886,
0.3233644962310791,
0.03269634768366814,
0.3189825713634491,
0.15095293521881104,
-0.2782142758369446,
-0.1228732019662857,
-0.02742019295692444,
0.7755702137947083,
0.069462850689888,
-0.013541433960199356,
0.34166038036346436,
-0.18285612761974335,
-0.6849214434623718,
-0.14300604164600372,
-0.07699162513017654,
0.37772032618522644,
-0.2822335362434387,
0.6447863578796387,
-0.10525275766849518,
-0.3734830915927887,
-0.1347847878932953,
0.24219198524951935,
-0.29754170775413513,
-0.04713764414191246,
-0.3241858184337616,
0.06811828911304474,
-0.3614349365234375,
0.042443010956048965,
-0.17531678080558777,
0.17823204398155212,
-0.018259063363075256,
-0.040976401418447495,
-0.023354770615696907,
-0.21567726135253906,
-0.018986240029335022,
0.17084094882011414,
0.5178516507148743,
-0.09178107231855392,
0.15528401732444763,
0.39107945561408997,
0.1512521356344223,
0.36680981516838074,
0.5727212429046631,
-0.052417922765016556,
0.02278704196214676,
0.12336812168359756,
0.012773449532687664,
0.21910707652568817,
0.37686771154403687,
0.0017912033945322037,
0.0071473270654678345,
0.18534591794013977,
-0.13990315794944763,
-0.2090143859386444,
-0.3456369936466217,
0.0707191750407219,
-0.07257445901632309,
-0.23235033452510834,
-0.3987553119659424,
0.5538121461868286,
0.07573331892490387,
-0.14514851570129395,
0.45242300629615784,
0.2212207317352295,
-0.21906447410583496,
0.7223875522613525,
0.04203929379582405,
0.5834646224975586,
-0.14723485708236694,
0.30339741706848145,
0.20705640316009521,
0.04084784537553787,
-0.02047508955001831,
0.2904045581817627,
-0.08366118371486664,
-0.4212234318256378,
-0.07577371597290039,
-0.1213999018073082,
-0.09919922053813934,
-0.0378698855638504,
0.17120742797851562,
0.008072104305028915,
0.3083399534225464,
-0.37150776386260986,
0.048265960067510605,
-0.4021242558956146,
0.12161071598529816,
-0.12545540928840637,
-0.17212478816509247,
-0.43607649207115173,
0.048366472125053406,
0.2044880986213684,
0.06332068890333176,
-0.20607909560203552,
-0.10368895530700684,
-0.09897090494632721,
-0.15349537134170532,
-0.2596631646156311,
-0.13194487988948822,
-0.1039302870631218,
0.598722517490387,
-0.049435053020715714,
-0.4428336024284363,
-0.16990046203136444,
0.17804549634456635,
0.0864555612206459,
-0.11959923803806305,
-0.12588240206241608,
-0.10755473375320435,
-0.031449005007743835,
0.041904695332050323,
-0.04088815674185753,
0.06956950575113297,
0.422850102186203,
-0.017548082396388054,
-0.35066425800323486,
0.08918789029121399,
-0.14808547496795654,
-0.6180956363677979,
0.10871213674545288,
0.14795508980751038,
-0.25327736139297485,
-0.010204226709902287,
-0.31669527292251587,
-0.11181214451789856,
-0.03476634994149208,
-0.1134832501411438,
0.04424329474568367,
0.14008590579032898,
0.0375356487929821,
-0.1662016212940216,
0.09542487561702728,
-0.10886259377002716,
0.08718694746494293,
0.7104116082191467,
0.16154557466506958,
0.22599294781684875,
0.6737828254699707,
0.1651812344789505,
0.04479100555181503,
-0.25609728693962097,
0.11965443938970566,
0.38184407353401184,
-0.20101046562194824,
0.20454154908657074,
-0.1781063675880432,
-0.16636055707931519,
0.24911360442638397,
0.14075636863708496,
0.4852977991104126,
0.11383222043514252,
-0.33939751982688904,
-0.3412427306175232,
-0.649151623249054,
0.47580069303512573,
-0.07774928212165833,
0.190566286444664,
-0.3575003743171692,
-0.3366333544254303,
-0.26186591386795044,
-0.15948252379894257,
-0.22982171177864075,
0.3489598035812378,
0.020311551168560982,
-0.04322521388530731,
-0.017016664147377014,
0.02940986678004265,
0.18902398645877838,
-0.23352853953838348,
0.06640426069498062,
-0.1214158833026886,
-0.2289005070924759,
-0.12665729224681854,
0.08123321831226349,
0.14567755162715912,
0.07049024850130081,
-0.18642409145832062,
-0.01253168098628521,
-0.31933826208114624,
-0.03847179934382439,
-0.03309551253914833,
0.28203362226486206,
0.015456542372703552,
0.10982854664325714,
0.1792060285806656,
0.4029446244239807,
0.07358761876821518,
-0.11374039947986603,
0.3437514901161194,
-0.013706415891647339,
0.27628636360168457,
0.053083326667547226,
0.096864253282547,
-0.20842179656028748,
-0.1503099799156189,
-0.19738361239433289,
0.1348845362663269,
-0.3143283724784851,
0.2006952464580536,
0.3316071033477783,
-0.37231671810150146,
-0.16940966248512268,
0.41378253698349,
0.5258204936981201,
0.4191301167011261,
-0.11607405543327332,
0.061357975006103516,
0.1539829671382904,
0.15747767686843872,
-0.06765605509281158,
-0.28256669640541077,
-0.03499141335487366,
0.05151021480560303,
-0.11263874173164368,
0.15934152901172638,
0.22071892023086548,
-0.260326623916626,
-0.09835007786750793,
0.22202208638191223,
0.00996776856482029,
0.1790398359298706,
0.2652376592159271,
0.6549832820892334,
0.04777563735842705,
-0.18288816511631012,
0.2611655592918396,
0.08064814656972885,
0.5296798348426819,
0.5002399682998657,
-0.1772083044052124,
0.0948740690946579,
0.14703437685966492,
0.05801108852028847,
-0.0320034995675087,
-0.5207429528236389,
0.39447546005249023,
0.16123059391975403,
-0.1278059333562851,
-0.1419653296470642,
0.16913621127605438,
0.5864526629447937,
-0.2946018874645233,
-0.14353808760643005,
-0.16792169213294983,
-0.10490237176418304,
-0.23347333073616028,
-0.09063342213630676,
0.08627825975418091,
-0.268277645111084,
0.08536872267723083,
0.06532657146453857,
-0.20184125006198883,
-0.1600523591041565,
-0.0437694787979126,
0.03481901437044144,
-0.14539234340190887,
-0.15574859082698822,
-0.14444738626480103,
0.303310751914978,
0.15797138214111328,
-0.1481505036354065,
-0.03491029143333435,
0.3843451142311096,
0.017267506569623947,
0.05846394598484039,
0.3044852912425995,
0.44447293877601624,
0.26582980155944824,
-0.5645002126693726,
0.06913656741380692,
0.19303184747695923,
-0.20521318912506104,
-0.046557556837797165,
-0.16993699967861176,
0.011272430419921875,
0.14805589616298676,
0.23564140498638153,
0.10472247004508972,
-0.05088234320282936,
0.037430621683597565,
0.23139238357543945,
0.37395206093788147,
-0.005779088009148836,
-0.046518824994564056,
0.06019560247659683,
-0.12296558916568756,
0.13863788545131683,
0.10468614846467972,
-0.26372095942497253,
-0.18109732866287231,
0.40951216220855713,
0.14604249596595764,
0.13147032260894775,
0.09363387525081635,
0.04923297464847565,
-0.0019206367433071136,
0.6029655933380127,
0.5017883777618408,
-0.07309151440858841,
-0.06349141150712967,
-0.020014867186546326,
-0.6808797717094421,
-0.09040563553571701,
0.020209375768899918,
0.291287362575531,
0.3152635991573334,
0.13240468502044678,
0.33137041330337524,
0.10178689658641815,
0.24252840876579285,
0.0359327457845211,
0.08639523386955261,
0.019245263189077377,
-0.30520641803741455,
-0.24744932353496552,
0.12211217731237411,
-0.08697356283664703,
-0.17433175444602966,
-0.34120050072669983,
0.01690993458032608,
-0.1808810830116272,
0.03431268036365509,
-0.06415954977273941,
0.051038749516010284,
-0.09939298033714294,
0.041208233684301376,
0.5967946648597717,
-0.1437923163175583,
0.09156543016433716,
0.16013863682746887,
-0.29612797498703003,
-0.1572456657886505,
-0.300083726644516,
-0.14457154273986816,
0.1659156233072281,
0.00930311344563961,
0.4882321059703827,
-0.1628599762916565,
-0.014356985688209534,
-0.3650956153869629,
0.31714946031570435,
-0.038444217294454575,
-0.023300688713788986,
-0.42064419388771057,
0.19150912761688232,
-0.020353559404611588,
-0.22998589277267456,
0.142831951379776,
0.2392260730266571,
0.10446653515100479,
0.1673976629972458,
-0.14794638752937317,
-0.17474430799484253,
0.46623244881629944,
-0.27339738607406616,
0.016934562474489212,
0.028358101844787598,
0.20475807785987854,
0.1471782624721527,
-0.06368445605039597,
-0.48891976475715637,
0.035064585506916046,
0.21955625712871552,
-0.09502316266298294,
-0.30316105484962463,
-0.09357531368732452,
0.11148540675640106,
0.23280395567417145,
-0.1336057335138321,
0.2096351534128189,
-0.031165555119514465,
-0.28140512108802795,
-0.13931135833263397,
-0.12269793450832367
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | Hi ! Yes we are working on making `filter` significantly faster. You can look at related PRs here: #2060 #2178
I think you can expect to have the fast version of `filter` available next week.
We'll make it only select one column, and we'll also make the overall filtering operation way faster by avoiding many arrow<->python conversions especially during writing.
I'll let you know how it goes ! | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 68 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
Hi ! Yes we are working on making `filter` significantly faster. You can look at related PRs here: #2060 #2178
I think you can expect to have the fast version of `filter` available next week.
We'll make it only select one column, and we'll also make the overall filtering operation way faster by avoiding many arrow<->python conversions especially during writing.
I'll let you know how it goes ! | [
-0.1237306296825409,
0.2983857989311218,
-0.020849283784627914,
-0.2533699870109558,
0.10165759176015854,
-0.1387869268655777,
0.3027840256690979,
0.6129091382026672,
0.24762621521949768,
-0.03285512328147888,
-0.09859931468963623,
0.4860824644565582,
0.03813527897000313,
-0.18357928097248077,
-0.015727821737527847,
0.18545714020729065,
0.09009141474962234,
0.3238481283187866,
0.303554505109787,
0.10208803415298462,
-0.08965614438056946,
-0.15776951611042023,
-0.1881164014339447,
-0.08998973667621613,
-0.009268750436604023,
-0.02320140413939953,
0.2395869791507721,
-0.4195278286933899,
-0.32879623770713806,
-0.17737233638763428,
0.29754549264907837,
0.29987671971321106,
-0.17267809808254242,
0.11152362078428268,
-0.0001252738875336945,
-0.05117003992199898,
0.04809702932834625,
0.007738595828413963,
-0.21744094789028168,
-0.07573617994785309,
0.1736845076084137,
-0.24353784322738647,
0.13877293467521667,
-0.1812339425086975,
0.07904581725597382,
-0.09275006502866745,
0.031184758991003036,
-0.005055628716945648,
0.01812482625246048,
-0.07038776576519012,
0.049227580428123474,
-0.10215213149785995,
-0.28759369254112244,
0.27438971400260925,
0.4761994779109955,
0.20474624633789062,
-0.008388087153434753,
-0.13962522149085999,
0.3575640916824341,
-0.39823025465011597,
-0.10143546015024185,
0.5694907903671265,
-0.49702179431915283,
-0.05897385999560356,
0.35477128624916077,
0.012887719087302685,
0.10707937926054001,
-0.22537913918495178,
0.31619036197662354,
0.15749797224998474,
0.18167373538017273,
-0.2657525837421417,
-0.13765273988246918,
-0.23951950669288635,
-0.06850551813840866,
-0.23049962520599365,
-0.07470894604921341,
0.04166325181722641,
-0.46056032180786133,
0.00946863740682602,
-0.2457599937915802,
-0.2786824107170105,
-0.10207520425319672,
0.4110226035118103,
-0.44750556349754333,
0.45334571599960327,
0.17925842106342316,
0.2715733051300049,
0.248257115483284,
-0.21480122208595276,
0.017070021480321884,
-0.03790964558720589,
0.43530723452568054,
0.5598412156105042,
-0.43271952867507935,
-0.18853285908699036,
0.05904706194996834,
0.051812320947647095,
0.19200557470321655,
-0.20988214015960693,
-0.1892123818397522,
0.4369453489780426,
0.3875004053115845,
0.08747455477714539,
0.3505069613456726,
0.036256447434425354,
-0.06845641881227493,
0.6006135940551758,
0.3717554211616516,
-0.1598748415708542,
0.10431072115898132,
0.09377279877662659,
0.01691453903913498,
0.2993762791156769,
0.1783025711774826,
-0.38355669379234314,
-0.22139059007167816,
-0.19219200313091278,
-0.009819358587265015,
-0.06261584162712097,
-0.27068886160850525,
0.010091559961438179,
0.12243837863206863,
0.39632630348205566,
0.26012590527534485,
0.29853588342666626,
-0.1823652982711792,
-0.009876813739538193,
-0.23512686789035797,
0.0012541068717837334,
0.07510044425725937,
0.06375649571418762,
-0.014474000781774521,
0.1764782816171646,
0.1271902322769165,
0.1445113867521286,
-0.1922730952501297,
0.007048903964459896,
-0.005253300070762634,
0.12124861776828766,
-0.0002687368541955948,
-0.1912531852722168,
0.26030340790748596,
0.49088725447654724,
-0.12212835252285004,
0.38437607884407043,
0.24743129312992096,
-0.25638246536254883,
-0.3247014880180359,
0.2783825695514679,
-0.16152116656303406,
-0.2274029701948166,
0.09001901745796204,
-0.026831243187189102,
-0.0578174814581871,
0.2852581739425659,
-0.12460344284772873,
0.6093723177909851,
0.3525463044643402,
-0.15333117544651031,
-0.13725298643112183,
-0.15584246814250946,
-0.28023603558540344,
-0.2027675211429596,
0.330841600894928,
-0.08457863330841064,
-0.4108807146549225,
-0.19494232535362244,
-0.21976543962955475,
0.29365187883377075,
0.4690002501010895,
0.36668941378593445,
-0.14434882998466492,
0.07363908737897873,
0.3656388521194458,
0.3744415044784546,
0.6236248016357422,
-0.012694362550973892,
-0.5791274905204773,
0.07148144394159317,
-0.1642441749572754,
0.10808659344911575,
-0.18430736660957336,
0.376710444688797,
0.682487964630127,
0.14279057085514069,
0.2814699411392212,
0.1935896873474121,
-0.06232905387878418,
0.25907382369041443,
-0.14939166605472565,
-0.13646866381168365,
0.15922334790229797,
0.057283129543066025,
-0.01757647469639778,
-0.18597912788391113,
-0.020869269967079163,
0.03841852769255638,
0.0531383752822876,
0.023740500211715698,
0.15480981767177582,
0.05456113815307617,
0.16064393520355225,
-0.06518073379993439,
0.12137043476104736,
-0.27164098620414734,
-0.2506520450115204,
0.05016423761844635,
0.4665891230106354,
0.135252445936203,
-0.35857492685317993,
-0.365456759929657,
-0.1568947434425354,
0.13108640909194946,
0.4029458165168762,
0.13009192049503326,
-0.062034934759140015,
-0.33648616075515747,
0.22755765914916992,
-0.2044118046760559,
-0.20511262118816376,
-0.09418296068906784,
-0.06029829755425453,
0.08576556295156479,
0.04324248433113098,
0.008348781615495682,
0.23715563118457794,
-0.06843604892492294,
-0.08526118099689484,
-0.1317298710346222,
0.24260398745536804,
0.2441398948431015,
0.1396600902080536,
0.07772163301706314,
0.2486259937286377,
-0.16956336796283722,
-0.2477496862411499,
0.4770079255104065,
0.06236668676137924,
0.09638652205467224,
0.12509824335575104,
-0.11571913957595825,
0.16988305747509003,
-0.14046461880207062,
-0.5081630945205688,
0.29692327976226807,
0.11037889122962952,
0.6598654389381409,
0.050108253955841064,
0.15407556295394897,
0.1797201782464981,
0.06429342925548553,
-0.10621374845504761,
-0.34453362226486206,
0.03604252636432648,
0.00978428777307272,
-0.1476866751909256,
0.1191621720790863,
-0.0164022259414196,
0.3111935257911682,
0.20180441439151764,
-0.04267159849405289,
0.09060638397932053,
0.3051791191101074,
-0.1029428169131279,
-0.19185176491737366,
0.1773732751607895,
-0.11146440356969833,
-0.023357897996902466,
0.2024940401315689,
0.13658808171749115,
-0.28601542115211487,
-0.1919524371623993,
-0.021991148591041565,
0.23769861459732056,
0.21295055747032166,
-0.14898601174354553,
-0.24522602558135986,
0.20797809958457947,
-0.05228516086935997,
-0.3534877598285675,
0.033016081899404526,
-0.04906035214662552,
0.3363074064254761,
-0.23367859423160553,
-0.18251092731952667,
-0.259851336479187,
-0.14264264702796936,
0.3249363601207733,
-0.10807327926158905,
0.04766494035720825,
-0.27923330664634705,
0.33161044120788574,
0.18325968086719513,
0.10823319852352142,
0.19789434969425201,
-0.167624831199646,
0.27570298314094543,
0.006529143080115318,
-0.171316996216774,
-0.3011423349380493,
-0.46770599484443665,
0.012996383011341095,
-0.06587681919336319,
0.05552169680595398,
0.4877006709575653,
0.2073122262954712,
0.3975657522678375,
-0.3270419239997864,
-0.2520029544830322,
-0.44762662053108215,
0.03635625168681145,
-0.09385840594768524,
0.22990107536315918,
0.06947841495275497,
0.5328618288040161,
-0.35969310998916626,
0.028011232614517212,
-0.033904559910297394,
-0.042093515396118164,
-0.09769334644079208,
0.12815597653388977,
-0.06121402978897095,
0.2300926148891449,
-0.10599097609519958,
0.20676788687705994,
0.05234745144844055,
-0.11543413996696472,
-0.11157585680484772,
-0.06385236233472824,
0.35519611835479736,
-0.4245608150959015,
0.006369381211698055,
-0.2987715005874634,
-0.1701817810535431,
-0.09759680926799774,
-0.07312621921300888,
0.26778313517570496,
0.4281625747680664,
0.2718479633331299,
-0.09989127516746521,
-0.14880305528640747,
-0.09645426273345947,
-0.19784143567085266,
0.5476945638656616,
-0.2510446310043335,
-0.01821628026664257,
-0.23870627582073212,
-0.007611870765686035,
0.13220638036727905,
0.11175092309713364,
0.4148825407028198,
-0.0027593406848609447,
0.040485359728336334,
0.08411090821027756,
-0.26708078384399414,
-0.29349595308303833,
-0.12145347148180008,
-0.18793782591819763,
0.24163028597831726,
0.6311588287353516,
0.28274616599082947,
0.7758922576904297,
0.158503457903862,
0.22124917805194855,
-0.03525041043758392,
0.00006633996963500977,
-0.019969094544649124,
-0.02655509114265442,
-0.2585275173187256,
-0.20286652445793152,
-0.22883087396621704,
0.0017705541104078293,
0.1533154994249344,
0.20566818118095398,
-0.5505749583244324,
-0.03496000915765762,
0.15991874039173126,
-0.12431496381759644,
-0.3024815618991852,
0.30744296312332153,
0.042990390211343765,
0.12992990016937256,
0.35795503854751587,
0.09008260816335678,
-0.4467230439186096,
-0.4382314085960388,
-0.06861227750778198,
-0.12675316631793976,
0.009031735360622406,
-0.15073716640472412,
-0.6066063642501831,
-0.2665177285671234,
-0.6999781131744385,
0.2868990898132324,
0.12165049463510513,
0.11999984085559845,
0.24920769035816193,
-0.25036105513572693,
0.25621289014816284,
-0.12063126266002655,
0.6425051093101501,
-0.07562143355607986,
-0.2868642807006836,
0.15850317478179932,
-0.04020467400550842,
-0.6319990158081055,
0.2532655596733093,
-0.1052064448595047,
0.11210573464632034,
0.15832571685314178,
0.49872395396232605,
-0.5397433042526245,
-0.24337349832057953,
0.07370159775018692,
0.1668107956647873,
-0.1530795842409134,
0.07648105174303055,
-0.0852578729391098,
-0.3236052989959717,
-0.1550816148519516,
0.27264857292175293,
0.0012736283242702484,
0.1353929489850998,
0.47267666459083557,
-0.045216988772153854,
0.12001501023769379,
-0.12343302369117737,
0.10134483873844147,
0.3883756697177887,
-0.0829365998506546,
0.20341262221336365,
0.06479783356189728,
0.2924255132675171,
-0.3008712828159332,
-0.08616799116134644,
0.08269107341766357,
-0.07246904075145721,
-0.13519491255283356,
-0.06982268393039703,
0.12147484719753265,
0.28759104013442993,
0.5704536437988281,
0.02630355954170227,
0.38267871737480164,
-0.14645999670028687,
0.20837248861789703,
-0.00902815442532301,
-0.014484159648418427,
-0.2250092327594757,
0.0013281414285302162,
-0.28293073177337646,
-0.33674490451812744,
0.4052058458328247,
0.28802672028541565,
-0.28969430923461914,
0.6709113717079163,
0.21331191062927246,
-0.15370702743530273,
0.4451870322227478,
0.35295361280441284,
1.0079764127731323,
-0.4848759174346924,
0.13183501362800598,
0.0028196536004543304,
0.08467403054237366,
0.3737163245677948,
-0.39715415239334106,
0.23976148664951324,
-0.1637779325246811,
-0.060423821210861206,
-0.03207613155245781,
-0.06903710216283798,
-0.12887537479400635,
0.1712002158164978,
0.13134314119815826,
0.13951687514781952,
-0.09440922737121582,
0.4635606110095978,
0.10231288522481918,
0.14624066650867462,
0.2702811062335968,
-0.4677022099494934,
-0.09090735018253326,
-0.005596138536930084,
-0.02602001279592514,
-0.23027652502059937,
0.08076149225234985,
0.3179073929786682,
-0.16835829615592957,
-0.40448516607284546,
-0.2705265283584595,
-0.31553852558135986,
-0.18681952357292175,
0.046128734946250916,
-0.14133302867412567,
-0.08960409462451935,
-0.16334018111228943,
-0.11794963479042053,
-0.3856496810913086,
0.11543063819408417,
0.1286412626504898,
0.11606717109680176,
0.4527558386325836,
0.2938825786113739,
0.12556274235248566,
-0.16492672264575958,
0.09012198448181152,
0.042559266090393066,
-0.05236244201660156,
0.21208858489990234,
-0.08674192428588867,
-0.3952052593231201,
-0.278511106967926,
0.16785243153572083,
0.6052414178848267,
0.10698777437210083,
-0.04293164238333702,
-0.035372503101825714,
0.13675494492053986,
-0.2750183939933777,
-0.008214173838496208,
-0.09764999151229858,
0.03502379730343819,
0.4042133092880249,
0.06307627260684967,
-0.2621447443962097,
-0.0026681870222091675,
0.3417322635650635,
0.304881751537323,
0.03880741447210312,
0.19388553500175476,
-0.11326007544994354,
-0.5539799332618713,
-0.04294394701719284,
-0.057819124311208725,
0.1937416046857834,
0.015541337430477142,
0.011900842189788818,
-0.34699803590774536,
-0.10127297043800354,
0.03324182704091072,
0.18285498023033142,
-0.05930600315332413,
-0.03675725311040878,
-0.2799467444419861,
-0.42994531989097595,
-0.0247348565608263,
0.41171151399612427,
0.13478997349739075,
0.043627019971609116,
-0.022400055080652237,
-0.1254226118326187,
-0.4318520128726959,
0.474906861782074,
-0.16435471177101135,
-0.16090744733810425,
-0.07015429437160492,
0.39951956272125244,
-0.12537658214569092,
0.2816865146160126,
-0.10143569856882095,
-0.04855917766690254,
0.08097975701093674,
-0.020003270357847214,
-0.00003103725612163544,
-0.1230204701423645,
0.10127726197242737,
0.2107246071100235,
-0.17633625864982605,
-0.1292170286178589,
0.1146143302321434,
-0.1573333591222763,
-0.1441318243741989,
-0.43295514583587646,
0.1776151806116104,
0.024164170026779175,
-0.03301437199115753,
-0.3705616593360901,
0.38706082105636597,
-0.18994590640068054,
-0.030392948538064957,
0.14956329762935638,
-0.20277953147888184,
-0.10676974058151245,
0.06354718655347824,
0.3398331105709076,
0.07601895183324814,
0.04705728590488434,
-0.09577379375696182,
0.13401859998703003,
0.0065673887729644775,
-0.2462807297706604,
0.028802694752812386,
0.11857622116804123,
0.04132941737771034,
0.20259998738765717,
0.11364306509494781,
0.37816327810287476,
-0.02270212396979332,
-0.0405413955450058,
0.36741429567337036,
0.0015124734491109848,
-0.20300446450710297,
-0.32455524802207947,
0.39612507820129395,
-0.08282875269651413,
0.21279865503311157,
0.35785800218582153,
-0.03041207604110241,
0.11892539262771606,
0.062113456428050995,
-0.2317250370979309,
0.5323963761329651,
-0.24804429709911346,
-0.31258174777030945,
0.38609087467193604,
0.2828720510005951,
-0.1621648222208023,
0.11660219728946686,
0.12995482981204987,
-0.10213751345872879,
0.2557511031627655,
-0.11809854954481125,
0.22515128552913666,
0.14571000635623932,
0.11538606882095337,
-0.43273308873176575,
-0.06699120998382568,
0.059089239686727524,
0.48094913363456726,
-0.17023825645446777,
0.05358825996518135,
0.07271790504455566,
-0.1600969433784485,
0.5276102423667908,
-0.09940093755722046,
0.2219121903181076,
0.2778366208076477,
0.11263731867074966,
-0.23515905439853668,
-0.36274248361587524,
-0.261509507894516,
0.07537700235843658,
0.020213134586811066,
-0.049238260835409164,
-0.3334948420524597,
0.4740840494632721,
0.05138717219233513,
0.25422972440719604,
-0.41753214597702026,
0.11411285400390625,
-0.29181933403015137,
0.2974717319011688,
-0.1703624278306961,
0.042923666536808014,
-0.4668007493019104,
0.3129243552684784,
0.05062331259250641,
-0.38007834553718567,
0.11811502277851105,
0.31635698676109314,
0.004983775317668915,
-0.05876791104674339,
-0.30021893978118896,
-0.2340754121541977,
-0.06241987645626068,
0.0377320870757103,
0.0890231803059578,
0.05510421469807625,
-0.0459938645362854,
-0.04370473697781563,
-0.04741337522864342,
-0.2555032968521118,
0.32061508297920227,
0.19432151317596436,
-0.010828514583408833,
-0.0755019411444664,
0.11780650168657303,
-0.27219364047050476,
0.027799637988209724,
-0.09044865518808365,
0.25277116894721985,
0.0565548837184906,
0.00495496578514576,
-0.17346234619617462,
0.15018630027770996,
0.04723465070128441,
0.009915176779031754,
0.04681270569562912,
0.2418237179517746,
-0.09013932943344116,
-0.012342624366283417,
-0.1436454951763153,
-0.3169913589954376,
-0.42537227272987366,
-0.052730463445186615,
-0.7110074758529663,
-0.3438417911529541,
0.3633756935596466,
0.32560983300209045,
0.466802716255188,
0.3856765627861023,
-0.02188757061958313,
-0.1853250414133072,
-0.33037763833999634,
0.35460299253463745,
-0.123401939868927,
0.4170961380004883,
-0.024532683193683624,
0.12514877319335938,
-0.07689281553030014,
-0.5126945376396179,
0.34329989552497864,
-0.16280661523342133,
-0.059258028864860535,
-0.011287659406661987,
0.06584364175796509,
0.29298868775367737,
0.21728506684303284,
0.260394811630249,
-0.14210154116153717,
0.1607440710067749,
0.06186194717884064,
0.14670749008655548,
-0.1186075359582901,
0.3497374653816223,
-0.46588703989982605,
0.14881163835525513,
-0.05365309491753578,
0.18639135360717773,
-0.11626635491847992,
-0.13651585578918457,
0.025405770167708397,
0.0742524191737175,
-0.23781929910182953,
-0.16737323999404907,
0.21105307340621948,
0.08364947140216827,
0.2566664218902588,
0.2304346114397049,
-0.35416343808174133,
-0.07261276990175247,
0.0052158422768116,
0.0728045254945755,
-0.27912306785583496,
-0.22182413935661316,
0.5476243495941162,
-0.805391788482666,
-0.44643065333366394,
-0.2124721258878708,
0.06809425354003906,
-0.02511262148618698,
-0.12626029551029205,
-0.1320757269859314,
-0.37728023529052734,
0.24844177067279816,
-0.15590327978134155,
-0.3053336441516876,
0.07734347879886627,
0.1260431557893753,
-0.15569277107715607,
-0.3427354395389557,
-0.030038505792617798,
-0.009336061775684357,
-0.07523459941148758,
-0.5701997876167297,
-0.5153658390045166
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | @lhoestq Thanks for the responseβ it's great to hear that we'll be getting a much faster `filter` method soon. However, my use case does also involve using `map` over a single column in order to pre-compute roughly uniformly sized batches, and right now that is also very slow. Is there any plan to make `map` faster for single column operations?
If that's not a priority for the maintainers right now, I could try my hand at adding the feature, but I can't guarantee I would do a good job given my lack of familiarity with pyarrow. | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 96 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
@lhoestq Thanks for the responseβ it's great to hear that we'll be getting a much faster `filter` method soon. However, my use case does also involve using `map` over a single column in order to pre-compute roughly uniformly sized batches, and right now that is also very slow. Is there any plan to make `map` faster for single column operations?
If that's not a priority for the maintainers right now, I could try my hand at adding the feature, but I can't guarantee I would do a good job given my lack of familiarity with pyarrow. | [
-0.18856212496757507,
0.30073288083076477,
-0.006221102550625801,
-0.291556179523468,
0.11390580236911774,
-0.12519079446792603,
0.37745413184165955,
0.6256684064865112,
0.28753191232681274,
0.017281271517276764,
-0.03644700348377228,
0.5041143298149109,
0.029043693095445633,
-0.16418932378292084,
-0.03691404312849045,
0.17096589505672455,
0.10482383519411087,
0.2638179063796997,
0.27629590034484863,
0.12859779596328735,
-0.10549896210432053,
-0.23043261468410492,
-0.22125451266765594,
-0.05628776550292969,
0.002770340768620372,
-0.10560991615056992,
0.15892867743968964,
-0.48391544818878174,
-0.2446199506521225,
-0.17035801708698273,
0.2296721190214157,
0.3419598340988159,
-0.16457952558994293,
0.18543824553489685,
-0.00012655909813474864,
-0.015295043587684631,
0.06728015840053558,
0.004659879952669144,
-0.13268613815307617,
-0.0347866415977478,
0.10361918061971664,
-0.2461571991443634,
0.08076752722263336,
-0.22829195857048035,
0.14493700861930847,
-0.07292807102203369,
0.09217837452888489,
-0.04809412360191345,
-0.011883281171321869,
-0.1497037410736084,
0.02603999897837639,
-0.10857229679822922,
-0.2673383355140686,
0.28665733337402344,
0.3932987451553345,
0.14767837524414062,
-0.03336846083402634,
-0.1472427397966385,
0.36185938119888306,
-0.4993889033794403,
-0.10287187248468399,
0.5538046360015869,
-0.4942292273044586,
-0.04685741290450096,
0.32401779294013977,
0.059682298451662064,
0.11143375933170319,
-0.16393430531024933,
0.2983197569847107,
0.1498268097639084,
0.12796056270599365,
-0.25278380513191223,
-0.22384844720363617,
-0.26000648736953735,
-0.09244204312562943,
-0.16858519613742828,
-0.06134814769029617,
-0.034111954271793365,
-0.3952659070491791,
-0.04767414554953575,
-0.28081944584846497,
-0.3235604763031006,
-0.045124344527721405,
0.39685916900634766,
-0.43608757853507996,
0.4768274426460266,
0.29625383019447327,
0.27472853660583496,
0.34420257806777954,
-0.15625201165676117,
0.0028866231441497803,
0.007663920521736145,
0.4512863755226135,
0.5650334358215332,
-0.48384666442871094,
-0.18338553607463837,
0.07618800550699234,
0.0020670294761657715,
0.17332401871681213,
-0.28950202465057373,
-0.1337253898382187,
0.46747609972953796,
0.3749386668205261,
0.12823089957237244,
0.31002095341682434,
0.07151822745800018,
-0.15259221196174622,
0.5785238742828369,
0.44994789361953735,
-0.12908755242824554,
0.0587531141936779,
0.12265684455633163,
-0.013866768218576908,
0.2276315838098526,
0.17566412687301636,
-0.31412360072135925,
-0.3155645728111267,
-0.1293070763349533,
0.1225791648030281,
-0.1538137048482895,
-0.2330203354358673,
-0.002599169733002782,
0.07032699137926102,
0.3658013641834259,
0.24220484495162964,
0.2920156419277191,
-0.2204376459121704,
-0.042545802891254425,
-0.18045338988304138,
0.01921479031443596,
0.10900917649269104,
0.07036599516868591,
-0.025290902704000473,
0.23170071840286255,
0.13113830983638763,
0.15726181864738464,
-0.26273292303085327,
0.022589512169361115,
-0.04277055710554123,
0.14456109702587128,
0.002202676609158516,
-0.13363103568553925,
0.22346466779708862,
0.3903024196624756,
-0.15769103169441223,
0.34273025393486023,
0.16934055089950562,
-0.10299239307641983,
-0.329244464635849,
0.2667767107486725,
-0.19522303342819214,
-0.2770001292228699,
0.16209279000759125,
-0.042051397264003754,
-0.05495450645685196,
0.2621859312057495,
-0.12861639261245728,
0.5985475778579712,
0.3813326954841614,
-0.2264774590730667,
-0.16181686520576477,
-0.06941910833120346,
-0.3165630102157593,
-0.17833396792411804,
0.2890985906124115,
-0.10791108012199402,
-0.35478562116622925,
-0.23132580518722534,
-0.18782682716846466,
0.37090417742729187,
0.4160902202129364,
0.3849087059497833,
-0.11986813694238663,
0.13430696725845337,
0.32663121819496155,
0.33217793703079224,
0.5479460954666138,
-0.10426401346921921,
-0.5639657974243164,
0.06558582186698914,
-0.24163684248924255,
0.051149532198905945,
-0.13214600086212158,
0.34403106570243835,
0.6694211959838867,
0.09023214876651764,
0.3183022141456604,
0.19807422161102295,
-0.13066482543945312,
0.3279161751270294,
-0.18363235890865326,
-0.2531144320964813,
0.15320464968681335,
0.04890231415629387,
0.04272299259901047,
-0.1249033734202385,
-0.015754058957099915,
0.04459945112466812,
-0.01295115053653717,
-0.01851767674088478,
0.16478866338729858,
0.06022662669420242,
0.06557029485702515,
-0.09137125313282013,
0.11335375905036926,
-0.23211809992790222,
-0.28846627473831177,
0.05554046481847763,
0.386518269777298,
0.145906001329422,
-0.3229026198387146,
-0.3966251611709595,
-0.03927026316523552,
0.0619347020983696,
0.43168210983276367,
0.1690215766429901,
-0.08222344517707825,
-0.2904554009437561,
0.3275696337223053,
-0.20726051926612854,
-0.1705353707075119,
-0.12530235946178436,
0.023398132994771004,
0.09445403516292572,
0.07065543532371521,
-0.01974477246403694,
0.24383193254470825,
-0.08279373496770859,
-0.11781342327594757,
-0.061425916850566864,
0.22671198844909668,
0.1529110223054886,
0.14142334461212158,
0.09431833028793335,
0.1466473489999771,
-0.06624060869216919,
-0.17863434553146362,
0.507537841796875,
0.07007565349340439,
0.2343181073665619,
0.117743581533432,
-0.12118066847324371,
0.15454071760177612,
-0.17191310226917267,
-0.5523514151573181,
0.28619933128356934,
0.14655554294586182,
0.6651868224143982,
0.084130197763443,
0.12207762151956558,
0.16319645941257477,
0.06185160204768181,
-0.07049111276865005,
-0.32363829016685486,
0.010072626173496246,
0.026188526302576065,
-0.1350480616092682,
0.1274300068616867,
0.020221516489982605,
0.26416850090026855,
0.2843720316886902,
-0.06825913488864899,
0.13086873292922974,
0.30476483702659607,
-0.05231108516454697,
-0.2207183539867401,
0.20963843166828156,
-0.10849761962890625,
0.005785249173641205,
0.1629599630832672,
0.12177811563014984,
-0.28798946738243103,
-0.16518011689186096,
0.0005719680339097977,
0.2164829969406128,
0.17943915724754333,
-0.14156927168369293,
-0.21664786338806152,
0.2590446472167969,
-0.014397633261978626,
-0.29891282320022583,
-0.010607924312353134,
0.0033573079854249954,
0.3582736849784851,
-0.15399575233459473,
-0.2632887065410614,
-0.2762298285961151,
-0.09154117107391357,
0.33946216106414795,
-0.04261314123868942,
0.03724539279937744,
-0.30986469984054565,
0.3070688843727112,
0.1898733526468277,
0.10269424319267273,
0.21137742698192596,
-0.12250581383705139,
0.2939247488975525,
-0.026825973764061928,
-0.17289036512374878,
-0.33282822370529175,
-0.539330780506134,
0.07382063567638397,
-0.08528582006692886,
0.060938261449337006,
0.3177294135093689,
0.1754731386899948,
0.37631043791770935,
-0.3800206780433655,
-0.22344590723514557,
-0.43253636360168457,
0.03782462328672409,
-0.08587728440761566,
0.09676530212163925,
0.08508510142564774,
0.42769819498062134,
-0.3566627502441406,
0.06670870631933212,
-0.019157325848937035,
-0.13041479885578156,
-0.04180046170949936,
0.09769416600465775,
0.0027200630865991116,
0.26112744212150574,
-0.12757521867752075,
0.27199965715408325,
0.07301563769578934,
-0.1125071793794632,
-0.06974586844444275,
-0.18180502951145172,
0.3236169219017029,
-0.4374000132083893,
0.007222692482173443,
-0.2794031798839569,
-0.13871484994888306,
-0.14941509068012238,
-0.041058436036109924,
0.1951178014278412,
0.43070513010025024,
0.27133846282958984,
-0.09997805953025818,
-0.23896721005439758,
-0.13027504086494446,
-0.18226821720600128,
0.5710951089859009,
-0.22266370058059692,
-0.016939468681812286,
-0.20433932542800903,
0.04214758053421974,
0.12186519056558609,
0.08176746964454651,
0.46279022097587585,
0.03755105659365654,
0.04204095900058746,
0.1029868945479393,
-0.2466263771057129,
-0.28131136298179626,
-0.06614214181900024,
-0.25504589080810547,
0.28004321455955505,
0.5683466792106628,
0.30828195810317993,
0.7266682982444763,
0.09952212870121002,
0.18498940765857697,
-0.043340250849723816,
-0.01690923608839512,
-0.08303335309028625,
0.008353956043720245,
-0.24226273596286774,
-0.16185066103935242,
-0.2642277181148529,
0.01756623014807701,
0.14376358687877655,
0.174760103225708,
-0.5115405321121216,
-0.057276178151369095,
0.19535979628562927,
-0.0673123151063919,
-0.29472461342811584,
0.30955037474632263,
0.0013087280094623566,
0.19593435525894165,
0.3222125470638275,
0.12137743085622787,
-0.5042792558670044,
-0.3843347430229187,
0.00249574426561594,
-0.13832519948482513,
0.0402851440012455,
-0.24407729506492615,
-0.5901768803596497,
-0.20191162824630737,
-0.7772263288497925,
0.3221869468688965,
0.1993768960237503,
0.11771837621927261,
0.2021469622850418,
-0.20402082800865173,
0.19217637181282043,
-0.14188261330127716,
0.6317628026008606,
-0.14165055751800537,
-0.2654164433479309,
0.12129482626914978,
-0.06587211787700653,
-0.5496019124984741,
0.1885111778974533,
-0.11240977048873901,
0.1748044341802597,
0.14346849918365479,
0.6085752248764038,
-0.5473335385322571,
-0.20112177729606628,
0.07514375448226929,
0.1330290287733078,
-0.12468136847019196,
0.08848869055509567,
-0.06536499410867691,
-0.2612018585205078,
-0.15893308818340302,
0.26467034220695496,
-0.028597399592399597,
0.08049910515546799,
0.43170595169067383,
-0.0816911906003952,
0.14880026876926422,
-0.07473313808441162,
0.08499137312173843,
0.352380633354187,
-0.09774205833673477,
0.1742151826620102,
0.047354016453027725,
0.382413387298584,
-0.3722226619720459,
-0.09652742743492126,
0.04850037768483162,
-0.08511185646057129,
-0.12819206714630127,
-0.05516979843378067,
0.07937558740377426,
0.2917894423007965,
0.5293636918067932,
0.04554978758096695,
0.41081908345222473,
-0.17157162725925446,
0.23780766129493713,
-0.08403416723012924,
-0.1195889413356781,
-0.12078501284122467,
0.06244911998510361,
-0.2965329885482788,
-0.3106878697872162,
0.34196266531944275,
0.34241625666618347,
-0.31799548864364624,
0.7173673510551453,
0.057220809161663055,
-0.1750316172838211,
0.43522191047668457,
0.3283763825893402,
0.9149355292320251,
-0.5607411861419678,
0.14220157265663147,
-0.02610769495368004,
0.16895455121994019,
0.33558472990989685,
-0.3939291834831238,
0.262698233127594,
-0.1080000177025795,
-0.07485152035951614,
-0.010327138006687164,
-0.011387202888727188,
-0.12416363507509232,
0.25025007128715515,
0.052429068833589554,
0.152512788772583,
-0.015695109963417053,
0.5056080222129822,
0.04968976974487305,
0.1444932073354721,
0.35043174028396606,
-0.5191710591316223,
-0.06890444457530975,
-0.028211070224642754,
0.05225055292248726,
-0.2357691526412964,
0.0680917501449585,
0.326651930809021,
-0.14709119498729706,
-0.3844148516654968,
-0.279896080493927,
-0.3103635609149933,
-0.1332499384880066,
0.0652172863483429,
-0.16328415274620056,
0.03633320331573486,
-0.21103441715240479,
-0.09929829835891724,
-0.384219229221344,
0.10730613768100739,
0.12829798460006714,
0.02749737910926342,
0.44992563128471375,
0.3063402473926544,
0.1378820240497589,
-0.17385660111904144,
0.03250019997358322,
0.07183182239532471,
-0.07437081634998322,
0.1883498728275299,
-0.133444681763649,
-0.41519057750701904,
-0.3370569944381714,
0.15516981482505798,
0.5482288599014282,
0.09804544597864151,
0.005804484710097313,
-0.06512027978897095,
0.07111114263534546,
-0.3431608974933624,
-0.031135309487581253,
-0.09420165419578552,
0.0626092478632927,
0.48003676533699036,
0.02689993381500244,
-0.2448757141828537,
0.02454531006515026,
0.3853030204772949,
0.27510371804237366,
0.0067283995449543,
0.20286908745765686,
-0.15435077250003815,
-0.5062568187713623,
-0.07265176624059677,
-0.05287947505712509,
0.14565785229206085,
0.03406291455030441,
0.08348697423934937,
-0.37743422389030457,
-0.19317801296710968,
0.042448416352272034,
0.20740880072116852,
-0.10044895112514496,
-0.03331548720598221,
-0.3305816948413849,
-0.42326560616493225,
-0.0712772086262703,
0.4162355065345764,
0.2322443574666977,
0.023880891501903534,
0.05678292363882065,
-0.13453391194343567,
-0.46284112334251404,
0.5339359045028687,
-0.13952456414699554,
-0.1586114764213562,
-0.012210823595523834,
0.3892357647418976,
-0.0375511571764946,
0.27979356050491333,
-0.08105949312448502,
-0.00002919137477874756,
0.07421359419822693,
0.0025767870247364044,
0.057624150067567825,
-0.09860176593065262,
0.10957574844360352,
0.23361137509346008,
-0.23052290081977844,
-0.11155516654253006,
0.18805694580078125,
-0.18367008864879608,
-0.15817153453826904,
-0.4777018129825592,
0.20337805151939392,
0.06358139216899872,
-0.07045899331569672,
-0.32937514781951904,
0.36873486638069153,
-0.159183531999588,
-0.008684732019901276,
0.18420103192329407,
-0.17020100355148315,
-0.1051281988620758,
0.0022567654959857464,
0.3636326789855957,
0.08987072110176086,
0.045148760080337524,
-0.006033259443938732,
0.1071895956993103,
0.032422956079244614,
-0.1778634488582611,
0.11304377019405365,
0.1745922565460205,
0.028748568147420883,
0.2241036742925644,
0.10809291899204254,
0.2784985303878784,
-0.014475506730377674,
-0.07485204190015793,
0.26939550042152405,
-0.035237036645412445,
-0.20411045849323273,
-0.34712621569633484,
0.4577021598815918,
-0.0549657866358757,
0.2916862368583679,
0.372693806886673,
0.029467452317476273,
0.11111301183700562,
0.053808096796274185,
-0.2809930145740509,
0.4950438141822815,
-0.2272437959909439,
-0.2665419280529022,
0.44407418370246887,
0.30026403069496155,
-0.14330226182937622,
0.14719152450561523,
0.05097484588623047,
-0.0858994647860527,
0.22357884049415588,
-0.060849450528621674,
0.2653490900993347,
0.14293238520622253,
0.15633012354373932,
-0.36951735615730286,
-0.10386958718299866,
0.13763324916362762,
0.45768365263938904,
-0.09547360241413116,
0.12997303903102875,
0.06750020384788513,
-0.10411369055509567,
0.3830336034297943,
-0.09459289163351059,
0.23817318677902222,
0.292736291885376,
0.05181695520877838,
-0.25343063473701477,
-0.3368813395500183,
-0.26540708541870117,
0.08079753816127777,
0.05620456114411354,
-0.08989354968070984,
-0.20926673710346222,
0.6242589950561523,
0.05879366770386696,
0.3631591200828552,
-0.31365126371383667,
0.09057734906673431,
-0.3196900486946106,
0.40995702147483826,
-0.16017480194568634,
0.09827495366334915,
-0.4550589323043823,
0.2978041470050812,
0.045787885785102844,
-0.25660955905914307,
0.1654205024242401,
0.3744315803050995,
-0.02239055186510086,
0.016035016626119614,
-0.3487820625305176,
-0.22219793498516083,
-0.07232529670000076,
0.07301317155361176,
0.05822528153657913,
-0.03066473826766014,
-0.07435277104377747,
-0.07271204888820648,
-0.03370330482721329,
-0.20581060647964478,
0.2698543965816498,
0.14401695132255554,
0.04436616599559784,
-0.11399588733911514,
0.22035129368305206,
-0.3583988845348358,
0.08948107063770294,
-0.08565158396959305,
0.32736968994140625,
0.010183687321841717,
-0.04862455651164055,
-0.2447475641965866,
0.09836862981319427,
0.06589305400848389,
-0.003548143431544304,
0.11092260479927063,
0.31809261441230774,
-0.05631228908896446,
-0.01122497022151947,
-0.15635348856449127,
-0.31788209080696106,
-0.4366075098514557,
-0.04393959790468216,
-0.7775238156318665,
-0.33884868025779724,
0.3656427562236786,
0.25025323033332825,
0.4327198565006256,
0.35767966508865356,
0.059495046734809875,
-0.2541879117488861,
-0.3120018541812897,
0.35946714878082275,
-0.1705428808927536,
0.4331057369709015,
-0.025481410324573517,
0.07632999867200851,
-0.063065305352211,
-0.611269474029541,
0.4074573218822479,
-0.05630775913596153,
-0.08821329474449158,
-0.0075218454003334045,
0.0589534267783165,
0.2174140363931656,
0.11864195019006729,
0.32696065306663513,
-0.15435044467449188,
0.12575051188468933,
0.007624320685863495,
0.13437676429748535,
-0.17552220821380615,
0.41246485710144043,
-0.454795777797699,
0.18572749197483063,
-0.06260043382644653,
0.15430417656898499,
-0.1882401704788208,
-0.1462153196334839,
-0.024218186736106873,
0.05784034729003906,
-0.22255240380764008,
-0.12504854798316956,
0.20612215995788574,
0.13013781607151031,
0.2073739767074585,
0.17204509675502777,
-0.33588728308677673,
-0.03270472586154938,
0.014150429517030716,
0.021851709112524986,
-0.2987917959690094,
-0.1553065925836563,
0.48405107855796814,
-0.7961955070495605,
-0.4655473530292511,
-0.22110094130039215,
0.03400857001543045,
-0.117196224629879,
-0.11126447468996048,
-0.18425214290618896,
-0.37220245599746704,
0.21834829449653625,
-0.05471164733171463,
-0.2753542959690094,
0.035267364233732224,
0.10456529259681702,
-0.19950689375400543,
-0.3591189682483673,
-0.0041879042983055115,
-0.037807896733284,
-0.07300462573766708,
-0.5274660587310791,
-0.5042608380317688
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | Currently the optimal setup for single-column computations is probably to do something like
```python
result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
```
This has two advantages:
- input_columns="my_col" allows to only read the column "my_col"
- remove_columns=dataset.column_names makes `map` only keep the output of your function `f`, and it drops the other columns of the dataset instead of keeping them.
Let me know if it improves speed on your side.
You can also get more speed by using `batched=True` and setting `num_proc=` for multiprocessing | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 82 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
Currently the optimal setup for single-column computations is probably to do something like
```python
result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
```
This has two advantages:
- input_columns="my_col" allows to only read the column "my_col"
- remove_columns=dataset.column_names makes `map` only keep the output of your function `f`, and it drops the other columns of the dataset instead of keeping them.
Let me know if it improves speed on your side.
You can also get more speed by using `batched=True` and setting `num_proc=` for multiprocessing | [
-0.1294834315776825,
0.339111328125,
0.010745596140623093,
-0.21831859648227692,
0.0991220697760582,
-0.09364133328199387,
0.40800774097442627,
0.5750510096549988,
0.2324593961238861,
0.08215206116437912,
-0.06951168179512024,
0.4634188711643219,
0.028099603950977325,
-0.17973066866397858,
-0.028819523751735687,
0.22036094963550568,
0.09916456043720245,
0.3066152334213257,
0.32337260246276855,
0.06178244948387146,
-0.13025617599487305,
-0.21384719014167786,
-0.19263982772827148,
-0.047835156321525574,
-0.05177849531173706,
-0.1371709406375885,
0.1724524199962616,
-0.42665210366249084,
-0.24622435867786407,
-0.13428668677806854,
0.3095402121543884,
0.3318149447441101,
-0.16055935621261597,
0.14700379967689514,
-0.00012535238056443632,
-0.04066852852702141,
0.0192108154296875,
-0.027614030987024307,
-0.19739454984664917,
-0.08116444945335388,
0.1680786907672882,
-0.20349937677383423,
0.12362474948167801,
-0.2444312870502472,
0.09478858858346939,
-0.13014444708824158,
0.033779043704271317,
-0.0696483924984932,
-0.003710709512233734,
-0.14874854683876038,
0.03373409062623978,
-0.12166037410497665,
-0.31912073493003845,
0.2640784978866577,
0.4368257224559784,
0.11920095980167389,
0.02928570844233036,
-0.19736354053020477,
0.2728894352912903,
-0.3919941186904907,
-0.10344099253416061,
0.5533382892608643,
-0.47375577688217163,
-0.07471524178981781,
0.3379897177219391,
0.07308080792427063,
0.12995746731758118,
-0.20829178392887115,
0.31070661544799805,
0.14206451177597046,
0.15582332015037537,
-0.2844785749912262,
-0.2145436853170395,
-0.2602308392524719,
-0.06509679555892944,
-0.281890332698822,
-0.090978242456913,
0.06194441020488739,
-0.41083139181137085,
-0.051252398639917374,
-0.257570743560791,
-0.2819582521915436,
-0.11851267516613007,
0.4137210249900818,
-0.5403962731361389,
0.4640469253063202,
0.19534172117710114,
0.29092931747436523,
0.1714855283498764,
-0.17245088517665863,
-0.00038664601743221283,
-0.04255814850330353,
0.4799712300300598,
0.5920429229736328,
-0.4159092307090759,
-0.16514959931373596,
0.0710030049085617,
-0.03794123977422714,
0.20570093393325806,
-0.24459214508533478,
-0.1593007594347,
0.4084402620792389,
0.33823511004447937,
0.15116266906261444,
0.3294961750507355,
0.06803075969219208,
-0.07912348955869675,
0.5972887873649597,
0.45325636863708496,
-0.10029569268226624,
0.1745666265487671,
0.07945582270622253,
-0.03458665683865547,
0.37525758147239685,
0.22283370792865753,
-0.3177233338356018,
-0.19014132022857666,
-0.2148229330778122,
0.010990293696522713,
-0.007694355212152004,
-0.2603749632835388,
0.07287703454494476,
0.043994415551424026,
0.36056259274482727,
0.28100693225860596,
0.32445797324180603,
-0.19842171669006348,
0.0045820847153663635,
-0.1865282505750656,
-0.004248089622706175,
0.051890771836042404,
0.11873334646224976,
-0.026821617037057877,
0.16712087392807007,
0.19289813935756683,
0.18142186105251312,
-0.1461573988199234,
0.02136339619755745,
-0.01231839507818222,
0.023314446210861206,
-0.054780229926109314,
-0.2017877697944641,
0.2513328492641449,
0.4559924900531769,
-0.055808618664741516,
0.37799733877182007,
0.20805001258850098,
-0.2995769679546356,
-0.3604397177696228,
0.2355450689792633,
-0.11260844022035599,
-0.23352296650409698,
0.13332591950893402,
-0.02122761681675911,
-0.0874711200594902,
0.3423863649368286,
-0.15555700659751892,
0.5529487729072571,
0.3655698299407959,
-0.08925983309745789,
-0.1648726463317871,
-0.15508629381656647,
-0.2858024835586548,
-0.19171063601970673,
0.32392147183418274,
-0.11213155090808868,
-0.38369956612586975,
-0.19637587666511536,
-0.1693078577518463,
0.2926427125930786,
0.4127456247806549,
0.378328412771225,
-0.08171676844358444,
0.12282529473304749,
0.3835408389568329,
0.3930477499961853,
0.5803682208061218,
-0.10340610146522522,
-0.5420399904251099,
0.04253159835934639,
-0.20903824269771576,
0.11265527456998825,
-0.17592623829841614,
0.3581136465072632,
0.7156690359115601,
0.14065827429294586,
0.3412395715713501,
0.19645647704601288,
-0.08748733252286911,
0.23588556051254272,
-0.14435085654258728,
-0.19095975160598755,
0.0868709534406662,
0.0933985710144043,
0.07295504212379456,
-0.17830121517181396,
0.0013811737298965454,
0.04367205500602722,
0.043735530227422714,
-0.03554346784949303,
0.20243686437606812,
0.09220869839191437,
0.10315045714378357,
-0.061024099588394165,
0.08840741962194443,
-0.29978951811790466,
-0.4036320745944977,
0.08036539703607559,
0.4533422589302063,
0.1321222484111786,
-0.31842339038848877,
-0.4617900252342224,
-0.11745426803827286,
0.08671514689922333,
0.4272185266017914,
0.1464286595582962,
-0.05603461712598801,
-0.2921645939350128,
0.2219504714012146,
-0.1985517293214798,
-0.2281971275806427,
-0.10704271495342255,
-0.005361789837479591,
0.1575300395488739,
0.02970987930893898,
-0.03527464345097542,
0.2604255974292755,
-0.09676579385995865,
-0.03567852824926376,
-0.04409307241439819,
0.2602740526199341,
0.22968384623527527,
0.19762906432151794,
0.09724853932857513,
0.2005937248468399,
-0.11519093811511993,
-0.26203998923301697,
0.46579408645629883,
0.06286755204200745,
0.20842212438583374,
0.07374604791402817,
-0.1619642823934555,
0.16113680601119995,
-0.16535905003547668,
-0.5710926651954651,
0.2745729684829712,
0.08020827174186707,
0.6571451425552368,
0.05239929258823395,
0.11482179909944534,
0.17623008787631989,
0.04007861390709877,
-0.11049468070268631,
-0.37436071038246155,
0.025173332542181015,
0.0522632971405983,
-0.1696222424507141,
0.0909886434674263,
-0.03424092009663582,
0.23655983805656433,
0.23506265878677368,
-0.09209617972373962,
0.10945364087820053,
0.26453712582588196,
-0.08542966097593307,
-0.19375762343406677,
0.20974689722061157,
-0.07493828982114792,
-0.010999724268913269,
0.19322863221168518,
0.15021584928035736,
-0.24796873331069946,
-0.19984373450279236,
0.021548893302679062,
0.14922887086868286,
0.22684277594089508,
-0.18798008561134338,
-0.1777154803276062,
0.2505490779876709,
-0.01658489927649498,
-0.3266107738018036,
0.043218452483415604,
-0.012485665269196033,
0.3582070767879486,
-0.2027125358581543,
-0.2141215205192566,
-0.25674572587013245,
-0.13637475669384003,
0.32435449957847595,
-0.08367502689361572,
0.006298718973994255,
-0.32397300004959106,
0.28263622522354126,
0.22961671650409698,
0.09951001405715942,
0.2094607949256897,
-0.14350813627243042,
0.32572728395462036,
-0.007361844182014465,
-0.1692800223827362,
-0.2807357907295227,
-0.49387356638908386,
0.004714988172054291,
-0.06535792350769043,
-0.0360507071018219,
0.4081597328186035,
0.23902921378612518,
0.3726724684238434,
-0.3311501145362854,
-0.23395469784736633,
-0.3956119120121002,
0.062072597444057465,
-0.11116752028465271,
0.17034614086151123,
0.09497667104005814,
0.466996431350708,
-0.3315180540084839,
0.05665720999240875,
-0.04353290796279907,
-0.02250213362276554,
-0.0211130790412426,
0.09070960432291031,
0.018393781036138535,
0.20623256266117096,
-0.1446017473936081,
0.25026318430900574,
0.0640241801738739,
-0.11081549525260925,
-0.06770725548267365,
-0.07879839092493057,
0.366122305393219,
-0.4411126673221588,
-0.08469226211309433,
-0.31754714250564575,
-0.048936083912849426,
-0.0837780013680458,
-0.10279572010040283,
0.24632573127746582,
0.4151184856891632,
0.30677440762519836,
-0.09620757400989532,
-0.1359817534685135,
-0.11213851720094681,
-0.1576298326253891,
0.6070976853370667,
-0.28283077478408813,
-0.03607310354709625,
-0.1843351274728775,
-0.003188353031873703,
0.12985792756080627,
0.1505562961101532,
0.4464666545391083,
0.04105689376592636,
0.05307894945144653,
0.06890362501144409,
-0.25809112191200256,
-0.2522445619106293,
-0.1246066465973854,
-0.261276513338089,
0.20925849676132202,
0.5654310584068298,
0.32063576579093933,
0.7258678674697876,
0.14240731298923492,
0.157790869474411,
-0.06683671474456787,
-0.04339740425348282,
-0.017773691564798355,
0.02564222365617752,
-0.18685907125473022,
-0.20264394581317902,
-0.2535119354724884,
-0.02605845034122467,
0.177098348736763,
0.19962388277053833,
-0.5090256929397583,
-0.07562144845724106,
0.18153448402881622,
-0.12520794570446014,
-0.3385487198829651,
0.2375822216272354,
0.010904602706432343,
0.19115112721920013,
0.376566618680954,
0.1332767903804779,
-0.45340031385421753,
-0.40186914801597595,
-0.03908867388963699,
-0.08908671140670776,
-0.015725813806056976,
-0.18096408247947693,
-0.5789368152618408,
-0.19563184678554535,
-0.7405367493629456,
0.29224616289138794,
0.13104365766048431,
0.08470184355974197,
0.25282174348831177,
-0.22603467106819153,
0.1941351741552353,
-0.13663382828235626,
0.5798609256744385,
-0.08250561356544495,
-0.22407518327236176,
0.15750734508037567,
-0.01246071606874466,
-0.6134453415870667,
0.19079463183879852,
-0.16799472272396088,
0.12352275103330612,
0.1410180628299713,
0.6254454255104065,
-0.588657557964325,
-0.20782990753650665,
0.06856478750705719,
0.16608145833015442,
-0.17515048384666443,
0.08998622745275497,
-0.10421188175678253,
-0.3079535663127899,
-0.1583370417356491,
0.28639355301856995,
0.00887167640030384,
0.09922302514314651,
0.45004525780677795,
-0.025219760835170746,
0.05676206201314926,
-0.0831177681684494,
0.14575301110744476,
0.42081207036972046,
-0.09929396212100983,
0.17490608990192413,
0.039794694632291794,
0.34013891220092773,
-0.3165380656719208,
-0.03871091455221176,
0.07959350943565369,
-0.05904882028698921,
-0.15507164597511292,
-0.017338983714580536,
0.023896701633930206,
0.30530646443367004,
0.5189319849014282,
0.006589611992239952,
0.34396225214004517,
-0.21333159506320953,
0.23412254452705383,
-0.09517093002796173,
-0.012686780653893948,
-0.1836407482624054,
0.025321539491415024,
-0.3267573416233063,
-0.310910165309906,
0.40883469581604004,
0.33979862928390503,
-0.30747538805007935,
0.6517521739006042,
0.18546538054943085,
-0.2204725295305252,
0.429018497467041,
0.3837018609046936,
0.9632582068443298,
-0.5312181711196899,
0.1537017673254013,
0.051970817148685455,
0.14831127226352692,
0.4319670796394348,
-0.44092315435409546,
0.24723829329013824,
-0.15352590382099152,
-0.06789693236351013,
-0.056594446301460266,
-0.038230009377002716,
-0.1370844542980194,
0.22406603395938873,
0.12188898026943207,
0.21107757091522217,
-0.0712222307920456,
0.48963430523872375,
0.1225951686501503,
0.10715818405151367,
0.3036718964576721,
-0.511737585067749,
-0.10880158841609955,
-0.020541734993457794,
-0.051974959671497345,
-0.19585584104061127,
0.017411410808563232,
0.44058799743652344,
-0.19760648906230927,
-0.3893167972564697,
-0.2506982684135437,
-0.30461540818214417,
-0.11096183955669403,
0.04745695739984512,
-0.21824640035629272,
-0.0003560259938240051,
-0.24508389830589294,
-0.0840415507555008,
-0.31041669845581055,
0.15327297151088715,
0.16002266108989716,
0.043356310576200485,
0.44825226068496704,
0.29863476753234863,
0.11008027195930481,
-0.11929122358560562,
0.03989376127719879,
0.08101451396942139,
-0.017077304422855377,
0.2253187596797943,
-0.09509021788835526,
-0.2768142521381378,
-0.28613561391830444,
0.1231279969215393,
0.5650427341461182,
0.043857742100954056,
0.05768937990069389,
-0.06780374050140381,
0.1874900758266449,
-0.3127429783344269,
-0.028328787535429,
-0.09114980697631836,
0.03329680487513542,
0.4166703522205353,
0.01999659836292267,
-0.2361268699169159,
0.009952027350664139,
0.3401910364627838,
0.3162245750427246,
0.0180031880736351,
0.19135761260986328,
-0.1530793160200119,
-0.4885407090187073,
-0.06060782074928284,
-0.0689176544547081,
0.12854048609733582,
0.0677289292216301,
0.05689012631773949,
-0.3558071553707123,
-0.12111916393041611,
-0.048374440521001816,
0.2245284765958786,
-0.06955807656049728,
0.014233231544494629,
-0.20568303763866425,
-0.4497348964214325,
-0.07027723640203476,
0.43106669187545776,
0.2193414866924286,
0.11237924546003342,
0.07008294761180878,
-0.10890413820743561,
-0.5081058144569397,
0.44867178797721863,
-0.1567642092704773,
-0.17131367325782776,
-0.12010490894317627,
0.44685599207878113,
-0.026238802820444107,
0.2871847450733185,
-0.12726280093193054,
-0.07089932262897491,
0.0952431783080101,
-0.056016892194747925,
0.05306568369269371,
-0.11063260585069656,
0.01621648296713829,
0.21481457352638245,
-0.17312729358673096,
-0.0934673622250557,
0.1737358570098877,
-0.13558602333068848,
-0.11254657804965973,
-0.4212663769721985,
0.28416210412979126,
0.09272835403680801,
-0.012284860014915466,
-0.2881922721862793,
0.34867924451828003,
-0.08969757705926895,
-0.1130395457148552,
0.13392940163612366,
-0.1787053942680359,
-0.08964352309703827,
0.05374782532453537,
0.376431941986084,
0.03569406643509865,
0.05784793198108673,
-0.08557727187871933,
0.13843023777008057,
0.020902805030345917,
-0.22088775038719177,
0.013991478830575943,
0.12879601120948792,
0.0483880452811718,
0.20531530678272247,
0.14682690799236298,
0.32700401544570923,
-0.07730372250080109,
-0.08447947353124619,
0.3128417134284973,
0.013572126626968384,
-0.20221669971942902,
-0.27938899397850037,
0.41103941202163696,
-0.13181842863559723,
0.24039581418037415,
0.4100235402584076,
-0.03332332521677017,
0.11029915511608124,
-0.03132590651512146,
-0.2870818078517914,
0.5734831690788269,
-0.22872622311115265,
-0.2615216374397278,
0.38428935408592224,
0.2309415489435196,
-0.13361139595508575,
0.09891879558563232,
0.1595323085784912,
-0.10705699771642685,
0.29394739866256714,
-0.06473598629236221,
0.21782900393009186,
0.14711642265319824,
0.08623329550027847,
-0.45448556542396545,
-0.13383570313453674,
0.10379189252853394,
0.4685189127922058,
-0.11691457033157349,
0.07190652936697006,
0.024575918912887573,
-0.19901391863822937,
0.4639553129673004,
-0.06394283473491669,
0.21191716194152832,
0.3197755515575409,
0.07746446132659912,
-0.24595803022384644,
-0.36542657017707825,
-0.2698215842247009,
0.06963111460208893,
0.04499448463320732,
-0.06960280239582062,
-0.3188226819038391,
0.45368555188179016,
0.07901497185230255,
0.27943646907806396,
-0.3466840088367462,
0.0999406948685646,
-0.2763337790966034,
0.35966747999191284,
-0.1741620898246765,
0.06964918226003647,
-0.4111563563346863,
0.2742772698402405,
0.03567632660269737,
-0.3283541798591614,
0.13666319847106934,
0.2756027579307556,
0.027196023613214493,
-0.008117291145026684,
-0.3326178789138794,
-0.2413623332977295,
-0.10909731686115265,
-0.0015373341739177704,
0.051812514662742615,
0.09624752402305603,
0.00007916055619716644,
-0.04582641273736954,
-0.05482058227062225,
-0.18574969470500946,
0.2693294286727905,
0.18118664622306824,
-0.036321010440588,
-0.06741025298833847,
0.14685805141925812,
-0.3282647430896759,
0.06683701276779175,
-0.10627146810293198,
0.3088834881782532,
0.0234815813601017,
-0.018853001296520233,
-0.14149229228496552,
0.1683291792869568,
0.05596082657575607,
0.007331673055887222,
0.053859446197748184,
0.2261192947626114,
-0.025448959320783615,
-0.05801112949848175,
-0.16121923923492432,
-0.3147876560688019,
-0.43541181087493896,
-0.03546058386564255,
-0.7556966543197632,
-0.48216044902801514,
0.3296385109424591,
0.27768126130104065,
0.4234723150730133,
0.3575214147567749,
-0.03810296952724457,
-0.19601665437221527,
-0.3290935754776001,
0.39780259132385254,
-0.13461342453956604,
0.4052017629146576,
-0.08760885894298553,
0.039078012108802795,
-0.04310538247227669,
-0.5718618631362915,
0.3007228374481201,
-0.05054008215665817,
-0.07302525639533997,
0.049357183277606964,
0.0969884991645813,
0.23592084646224976,
0.12189817428588867,
0.27725908160209656,
-0.15669767558574677,
0.15349675714969635,
0.06225830316543579,
0.06908097863197327,
-0.13287031650543213,
0.4088369309902191,
-0.5085701942443848,
0.17196503281593323,
-0.09205573797225952,
0.19886118173599243,
-0.1279175728559494,
-0.11358755826950073,
-0.007877583615481853,
0.07228179275989532,
-0.17080570757389069,
-0.17614337801933289,
0.19318194687366486,
0.13970442116260529,
0.19683155417442322,
0.21840454638004303,
-0.23705121874809265,
0.005367923527956009,
-0.012060046195983887,
0.09103598445653915,
-0.28620028495788574,
-0.22471021115779877,
0.5315034985542297,
-0.7931772470474243,
-0.4790951609611511,
-0.2157016098499298,
0.12102716416120529,
-0.05714080482721329,
-0.16443389654159546,
-0.18644869327545166,
-0.3395097553730011,
0.2887534201145172,
-0.17776376008987427,
-0.3770122826099396,
0.01141995470970869,
0.08035928010940552,
-0.28014346957206726,
-0.32267358899116516,
-0.0827898234128952,
-0.03717467188835144,
-0.08470236510038376,
-0.5192148089408875,
-0.5552364587783813
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
``` | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 285 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
``` | [
-0.12978823482990265,
0.34384649991989136,
0.005627695471048355,
-0.23468329012393951,
0.10948678851127625,
-0.1253664791584015,
0.39552003145217896,
0.5808491706848145,
0.2243223339319229,
0.06910671293735504,
-0.06487782299518585,
0.4875029921531677,
0.02443109080195427,
-0.17363682389259338,
-0.023318946361541748,
0.2062174677848816,
0.10994774103164673,
0.3038487434387207,
0.3059222400188446,
0.07066386938095093,
-0.09726612269878387,
-0.19601784646511078,
-0.19691461324691772,
-0.04733969271183014,
-0.06161811947822571,
-0.09693317860364914,
0.17005248367786407,
-0.40983691811561584,
-0.265667587518692,
-0.13434475660324097,
0.32257968187332153,
0.34060436487197876,
-0.16047394275665283,
0.15129032731056213,
-0.00012531719403341413,
-0.04791586846113205,
0.01502227783203125,
-0.041769955307245255,
-0.18600912392139435,
-0.08782456815242767,
0.16461306810379028,
-0.21570609509944916,
0.12424157559871674,
-0.23576804995536804,
0.06684241443872452,
-0.10990505665540695,
0.018435318022966385,
-0.07029390335083008,
0.017738208174705505,
-0.1491786688566208,
0.0378246009349823,
-0.11531947553157806,
-0.3119523823261261,
0.2564549446105957,
0.42942750453948975,
0.13372820615768433,
0.013510683551430702,
-0.18869654834270477,
0.307625412940979,
-0.4169773459434509,
-0.10780324786901474,
0.5532119870185852,
-0.44949766993522644,
-0.08675706386566162,
0.3468254804611206,
0.06656713783740997,
0.11315622925758362,
-0.20485925674438477,
0.2837943732738495,
0.12313195317983627,
0.15226715803146362,
-0.29298222064971924,
-0.20578326284885406,
-0.2492106854915619,
-0.08132294565439224,
-0.28320422768592834,
-0.07639328390359879,
0.03817702829837799,
-0.4349861741065979,
-0.05620327219367027,
-0.2655763626098633,
-0.284089595079422,
-0.120512455701828,
0.41914474964141846,
-0.5168411135673523,
0.44534575939178467,
0.20737381279468536,
0.2835457921028137,
0.17370639741420746,
-0.16434819996356964,
-0.023890797048807144,
-0.04886983335018158,
0.4914848208427429,
0.5992769598960876,
-0.43811726570129395,
-0.16783714294433594,
0.08693202584981918,
-0.021708793938159943,
0.22809642553329468,
-0.24053002893924713,
-0.18105149269104004,
0.41921162605285645,
0.3674304187297821,
0.12952834367752075,
0.3315454125404358,
0.08039455115795135,
-0.07402553409337997,
0.5757724046707153,
0.4447898268699646,
-0.08795862644910812,
0.14871414005756378,
0.08833296597003937,
-0.026009902358055115,
0.3440796136856079,
0.22877244651317596,
-0.2832648754119873,
-0.20096634328365326,
-0.2048863023519516,
0.03763643652200699,
-0.002704378217458725,
-0.2731020748615265,
0.06615983694791794,
0.060809630900621414,
0.3648388385772705,
0.2870670557022095,
0.2879377603530884,
-0.18717573583126068,
0.02388570085167885,
-0.22081279754638672,
0.0010180454701185226,
0.05528043583035469,
0.11508569121360779,
-0.0744158923625946,
0.16142815351486206,
0.20634563267230988,
0.1675104796886444,
-0.16363121569156647,
0.046646639704704285,
0.0027351975440979004,
0.035874731838703156,
-0.05927564948797226,
-0.18010294437408447,
0.2324698269367218,
0.43780699372291565,
-0.06598977744579315,
0.3828451335430145,
0.22698839008808136,
-0.28310084342956543,
-0.34279343485832214,
0.260762095451355,
-0.08277355879545212,
-0.24771001935005188,
0.1496955305337906,
-0.021677125245332718,
-0.09644033759832382,
0.3550901710987091,
-0.166731595993042,
0.5624735355377197,
0.38373395800590515,
-0.107181116938591,
-0.16727405786514282,
-0.1610995978116989,
-0.2877019941806793,
-0.1954725980758667,
0.3321773409843445,
-0.08499793708324432,
-0.3995160460472107,
-0.19153884053230286,
-0.17423179745674133,
0.285177618265152,
0.4178023338317871,
0.3706708252429962,
-0.09361036866903305,
0.12202747166156769,
0.3517780601978302,
0.42316800355911255,
0.5522975921630859,
-0.07708677649497986,
-0.5348979830741882,
0.03607172891497612,
-0.22438737750053406,
0.12208171933889389,
-0.17779338359832764,
0.33410903811454773,
0.7191375494003296,
0.14008767902851105,
0.36161911487579346,
0.20635168254375458,
-0.10543407499790192,
0.2566284239292145,
-0.1739204078912735,
-0.18755082786083221,
0.10821434110403061,
0.10103292763233185,
0.07379800081253052,
-0.1837998628616333,
-0.0069086626172065735,
0.01345828827470541,
0.057699669152498245,
-0.049988288432359695,
0.20778661966323853,
0.07529813051223755,
0.11678798496723175,
-0.0806708037853241,
0.08552780002355576,
-0.29489395022392273,
-0.3675554394721985,
0.10264890640974045,
0.4557945132255554,
0.16747060418128967,
-0.3501778841018677,
-0.4428638219833374,
-0.13780167698860168,
0.09001968801021576,
0.40879425406455994,
0.137535959482193,
-0.04905036464333534,
-0.3041945695877075,
0.222751647233963,
-0.19914619624614716,
-0.20789827406406403,
-0.10952692478895187,
0.0005808565765619278,
0.15151214599609375,
0.02277899719774723,
-0.007003774866461754,
0.24661308526992798,
-0.09598629921674728,
-0.037467967718839645,
-0.05470482259988785,
0.26660263538360596,
0.21377971768379211,
0.19168400764465332,
0.0870017260313034,
0.1957297921180725,
-0.11719506978988647,
-0.26930245757102966,
0.4498794674873352,
0.06477387249469757,
0.20176613330841064,
0.07696578651666641,
-0.16233322024345398,
0.15540961921215057,
-0.18149147927761078,
-0.5328131914138794,
0.3011567294597626,
0.08026213943958282,
0.6450632810592651,
0.03099486231803894,
0.13093025982379913,
0.1760697364807129,
0.03901347145438194,
-0.10729354619979858,
-0.3742186427116394,
0.02316432259976864,
0.0713968276977539,
-0.1661331206560135,
0.08153358846902847,
-0.02775564044713974,
0.26397520303726196,
0.19078956544399261,
-0.09649908542633057,
0.09308288246393204,
0.2626735270023346,
-0.06791023164987564,
-0.1828455924987793,
0.22623366117477417,
-0.07574336230754852,
0.020079903304576874,
0.18245281279087067,
0.14054125547409058,
-0.2518349587917328,
-0.17688076198101044,
0.036090556532144547,
0.16816990077495575,
0.21306847035884857,
-0.1704660952091217,
-0.1802038848400116,
0.2561205327510834,
-0.038231637328863144,
-0.3358975350856781,
0.06005834415555,
0.003463335335254669,
0.3546963334083557,
-0.22240452468395233,
-0.21825966238975525,
-0.25119948387145996,
-0.1353277713060379,
0.323279470205307,
-0.0828276202082634,
0.006693270057439804,
-0.2888745665550232,
0.2953872084617615,
0.22052501142024994,
0.10831966996192932,
0.23516812920570374,
-0.13348594307899475,
0.3227454721927643,
-0.015280883759260178,
-0.19180169701576233,
-0.2713221311569214,
-0.46502718329429626,
-0.0009277202188968658,
-0.05921768397092819,
-0.0043338327668607235,
0.4244777262210846,
0.2421153336763382,
0.39053285121917725,
-0.32458430528640747,
-0.24510905146598816,
-0.4025377929210663,
0.05136506259441376,
-0.11988887190818787,
0.19413499534130096,
0.10992975533008575,
0.46663135290145874,
-0.34201323986053467,
0.05230434238910675,
-0.022998593747615814,
-0.0488409660756588,
-0.039774395525455475,
0.09188980609178543,
0.013783233240246773,
0.20358584821224213,
-0.15432986617088318,
0.2484566867351532,
0.046814560890197754,
-0.10754276812076569,
-0.07626639306545258,
-0.09066694974899292,
0.3686673045158386,
-0.459811270236969,
-0.06095599755644798,
-0.3338884711265564,
-0.020713848993182182,
-0.10506947338581085,
-0.11798058450222015,
0.24657830595970154,
0.4201831817626953,
0.2896748185157776,
-0.10538402199745178,
-0.1386384516954422,
-0.12947407364845276,
-0.15993142127990723,
0.612968921661377,
-0.2647594213485718,
-0.03810036927461624,
-0.1784408688545227,
0.009341292083263397,
0.133438378572464,
0.14676161110401154,
0.4467787444591522,
0.026444939896464348,
0.05751730501651764,
0.06083778291940689,
-0.27596068382263184,
-0.22900110483169556,
-0.11419355124235153,
-0.24644839763641357,
0.22019872069358826,
0.5735793709754944,
0.32400673627853394,
0.7751104235649109,
0.1520693153142929,
0.17807206511497498,
-0.051378779113292694,
-0.03416725993156433,
-0.048240382224321365,
-0.0013018473982810974,
-0.21361969411373138,
-0.1924019306898117,
-0.2690325677394867,
-0.036037296056747437,
0.1694476157426834,
0.2143826186656952,
-0.5216483473777771,
-0.07566142827272415,
0.17569097876548767,
-0.12828674912452698,
-0.3454465866088867,
0.259194940328598,
0.01025482639670372,
0.1966409981250763,
0.37935978174209595,
0.12612774968147278,
-0.4769870340824127,
-0.3877555727958679,
-0.037753380835056305,
-0.08879640698432922,
-0.005997747182846069,
-0.17404693365097046,
-0.5687568187713623,
-0.17737238109111786,
-0.7664278149604797,
0.2751237750053406,
0.14027704298496246,
0.08639901131391525,
0.24300448596477509,
-0.21640899777412415,
0.20726676285266876,
-0.12441758066415787,
0.6251428723335266,
-0.06707310676574707,
-0.20905344188213348,
0.1638411432504654,
-0.026079822331666946,
-0.6028422713279724,
0.186305969953537,
-0.13511717319488525,
0.13939239084720612,
0.159744530916214,
0.5891290903091431,
-0.6044456362724304,
-0.2002260535955429,
0.02727096527814865,
0.14626748859882355,
-0.14921218156814575,
0.08421226590871811,
-0.07487139105796814,
-0.30189982056617737,
-0.1549275517463684,
0.2972753942012787,
0.041231438517570496,
0.1232825443148613,
0.4362000823020935,
-0.0189580786973238,
0.09350532293319702,
-0.059314146637916565,
0.14760886132717133,
0.3977610468864441,
-0.08449500054121017,
0.1703258901834488,
0.047063153237104416,
0.329328715801239,
-0.3318585157394409,
-0.04495362192392349,
0.09533929079771042,
-0.06218229606747627,
-0.1341535449028015,
-0.025084972381591797,
0.0251077301800251,
0.289700448513031,
0.5526984930038452,
0.009705130942165852,
0.3432309925556183,
-0.21758008003234863,
0.22434812784194946,
-0.08553793281316757,
-0.03614943102002144,
-0.19521458446979523,
0.032635897397994995,
-0.3006550073623657,
-0.30922645330429077,
0.3831389546394348,
0.31595122814178467,
-0.3090575933456421,
0.6614328026771545,
0.17239215970039368,
-0.22900669276714325,
0.4607013463973999,
0.3709949851036072,
0.9752559065818787,
-0.5129277110099792,
0.1641957312822342,
0.06882036477327347,
0.14094455540180206,
0.405825138092041,
-0.4298228621482849,
0.2410656064748764,
-0.1704447865486145,
-0.06548886001110077,
-0.059746645390987396,
-0.048199959099292755,
-0.14799797534942627,
0.21641428768634796,
0.11767178773880005,
0.18959204852581024,
-0.059713900089263916,
0.46603378653526306,
0.1189340129494667,
0.11503517627716064,
0.30796119570732117,
-0.508971095085144,
-0.12105235457420349,
-0.01936357095837593,
-0.044214196503162384,
-0.17449122667312622,
0.014651797711849213,
0.3953196406364441,
-0.21566569805145264,
-0.39605361223220825,
-0.2694070339202881,
-0.30827927589416504,
-0.15294422209262848,
0.052053987979888916,
-0.19916008412837982,
-0.006882831454277039,
-0.21733491122722626,
-0.09213417768478394,
-0.33706337213516235,
0.12792235612869263,
0.15437769889831543,
0.04707350581884384,
0.4743730425834656,
0.32021355628967285,
0.1288522481918335,
-0.14762751758098602,
0.03941319137811661,
0.06992298364639282,
-0.008687645196914673,
0.18319645524024963,
-0.10612401366233826,
-0.29186177253723145,
-0.29660528898239136,
0.12537021934986115,
0.5700805187225342,
0.037756357342004776,
0.02702963352203369,
-0.07430051267147064,
0.18402135372161865,
-0.3169248402118683,
-0.026061948388814926,
-0.07768110930919647,
0.035093724727630615,
0.4307326078414917,
0.0009049735963344574,
-0.2017872929573059,
0.020938213914632797,
0.36387574672698975,
0.30067116022109985,
0.008058968931436539,
0.20629510283470154,
-0.11510278284549713,
-0.4882867932319641,
-0.052770789712667465,
-0.06964296847581863,
0.1498471349477768,
0.041036203503608704,
0.0476449653506279,
-0.36522671580314636,
-0.1214287206530571,
-0.03712748363614082,
0.23362454771995544,
-0.04857396334409714,
0.02172645926475525,
-0.19039468467235565,
-0.4643525183200836,
-0.08040611445903778,
0.4110327959060669,
0.2061309665441513,
0.09981965273618698,
0.05023118108510971,
-0.08626967668533325,
-0.4749448597431183,
0.4416936933994293,
-0.16329842805862427,
-0.15359562635421753,
-0.09573980420827866,
0.4342615604400635,
-0.04826884716749191,
0.27230018377304077,
-0.12641753256320953,
-0.08087010681629181,
0.09009555727243423,
-0.05306173115968704,
0.01263813953846693,
-0.11428890377283096,
0.032047420740127563,
0.2085019052028656,
-0.1704893708229065,
-0.10927002131938934,
0.18401356041431427,
-0.14468908309936523,
-0.1090037077665329,
-0.41308513283729553,
0.2695927619934082,
0.09268862754106522,
-0.03816225379705429,
-0.321090430021286,
0.38055357336997986,
-0.11829394847154617,
-0.10295113176107407,
0.12592405080795288,
-0.164688840508461,
-0.10213759541511536,
0.08210185170173645,
0.36139151453971863,
0.025741877034306526,
0.050200313329696655,
-0.05615842714905739,
0.14612406492233276,
0.0020498931407928467,
-0.19000083208084106,
0.034562624990940094,
0.13136327266693115,
0.03688351437449455,
0.19650089740753174,
0.1575852632522583,
0.32924604415893555,
-0.09799022972583771,
-0.07209210842847824,
0.30702894926071167,
0.020417777821421623,
-0.19721177220344543,
-0.27585098147392273,
0.42799657583236694,
-0.12154702097177505,
0.23147207498550415,
0.4082896113395691,
-0.020635299384593964,
0.09436613321304321,
-0.02569630742073059,
-0.2720078229904175,
0.5573036670684814,
-0.2318076640367508,
-0.2705375552177429,
0.3658284544944763,
0.2138034552335739,
-0.1216493546962738,
0.092368945479393,
0.1510499119758606,
-0.11936546117067337,
0.2973027229309082,
-0.07494702190160751,
0.22111506760120392,
0.13646014034748077,
0.09550704061985016,
-0.46241334080696106,
-0.148496612906456,
0.08898261934518814,
0.45894700288772583,
-0.11101266741752625,
0.06840605288743973,
0.038339778780937195,
-0.16757163405418396,
0.482097864151001,
-0.08550971001386642,
0.23034897446632385,
0.31410202383995056,
0.07101552188396454,
-0.23780420422554016,
-0.3685973584651947,
-0.2726428508758545,
0.06454764306545258,
0.03341211751103401,
-0.08832038938999176,
-0.3147929906845093,
0.4633411765098572,
0.07298579812049866,
0.2775481641292572,
-0.3419555425643921,
0.06539249420166016,
-0.2865810692310333,
0.35394975543022156,
-0.1692407727241516,
0.07905524969100952,
-0.4063335657119751,
0.2762996554374695,
0.03643520176410675,
-0.3371807038784027,
0.1465807557106018,
0.3046513795852661,
0.01888820342719555,
-0.019337628036737442,
-0.3063295781612396,
-0.2333144247531891,
-0.10157164931297302,
0.01323218084871769,
0.07555787265300751,
0.09667152166366577,
0.004931677132844925,
-0.04881014674901962,
-0.056660111993551254,
-0.20341934263706207,
0.2960623502731323,
0.16270509362220764,
-0.014427859336137772,
-0.08584737032651901,
0.1537097990512848,
-0.32009458541870117,
0.06718891859054565,
-0.12069385498762131,
0.30843663215637207,
0.024978194385766983,
-0.02435530349612236,
-0.14648842811584473,
0.1711667776107788,
0.04866282641887665,
0.007186047732830048,
0.034134071320295334,
0.21076858043670654,
-0.05069790408015251,
-0.048993080854415894,
-0.21680742502212524,
-0.3345029652118683,
-0.4528566598892212,
-0.04129312187433243,
-0.7500758171081543,
-0.4522309899330139,
0.3353934586048126,
0.27782174944877625,
0.4331783056259155,
0.3551087975502014,
-0.04251620173454285,
-0.2030101865530014,
-0.33372360467910767,
0.4259212017059326,
-0.14694947004318237,
0.40666019916534424,
-0.09233023226261139,
0.050773583352565765,
-0.04516804963350296,
-0.5560516119003296,
0.30859485268592834,
-0.05775674059987068,
-0.06241759657859802,
0.046900708228349686,
0.07264237105846405,
0.23631882667541504,
0.13040438294410706,
0.27426838874816895,
-0.15063044428825378,
0.1588122695684433,
0.06027410924434662,
0.08448784798383713,
-0.13541974127292633,
0.4218733012676239,
-0.5123558044433594,
0.17723020911216736,
-0.08614850044250488,
0.229761004447937,
-0.11299337446689606,
-0.11436653137207031,
-0.02141445502638817,
0.05690084770321846,
-0.16774851083755493,
-0.17563697695732117,
0.18803369998931885,
0.14945699274539948,
0.1913282573223114,
0.23064258694648743,
-0.28366270661354065,
0.02842940017580986,
-0.029107749462127686,
0.11439800262451172,
-0.2971751093864441,
-0.23011274635791779,
0.5320161581039429,
-0.8063472509384155,
-0.4839923083782196,
-0.20876775681972504,
0.10795190930366516,
-0.06366949528455734,
-0.16083188354969025,
-0.1949755847454071,
-0.3483869433403015,
0.2565125823020935,
-0.1921049952507019,
-0.3577035963535309,
0.022179529070854187,
0.08238407969474792,
-0.2597562372684479,
-0.32641080021858215,
-0.08141855895519257,
-0.03755620867013931,
-0.0764012411236763,
-0.5289857983589172,
-0.563018262386322
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | Hi ! Can you open a separate issue for that ?
Also if you could provide a google colab or a sample code to reproduce this issue that would be helpful.
On my side I was not able to reproduce this error. | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 42 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
Hi ! Can you open a separate issue for that ?
Also if you could provide a google colab or a sample code to reproduce this issue that would be helpful.
On my side I was not able to reproduce this error. | [
-0.0739276111125946,
0.2622614800930023,
0.010453417897224426,
-0.14601333439350128,
0.1726153939962387,
-0.09211455285549164,
0.342267781496048,
0.5855399966239929,
0.24096354842185974,
0.013878725469112396,
-0.02881886251270771,
0.485811322927475,
0.0747990682721138,
-0.24202555418014526,
-0.07719718664884567,
0.2121565341949463,
0.06458767503499985,
0.3524307608604431,
0.32268309593200684,
0.07532909512519836,
-0.1231594830751419,
-0.09589321166276932,
-0.23966369032859802,
-0.02730802446603775,
-0.10523851215839386,
-0.07563519477844238,
0.24020475149154663,
-0.38653770089149475,
-0.3200218081474304,
-0.19825685024261475,
0.31322619318962097,
0.26098689436912537,
-0.2287146896123886,
0.1817968785762787,
-0.00012765009887516499,
-0.058116160333156586,
0.10828050225973129,
-0.0010412205010652542,
-0.13814710080623627,
-0.025062814354896545,
0.10996422916650772,
-0.143580362200737,
0.1595812737941742,
-0.2177056521177292,
0.060991667211055756,
-0.10621867328882217,
0.0007784105837345123,
0.006420902907848358,
0.057144615799188614,
-0.03905496746301651,
0.03492247313261032,
-0.08235465735197067,
-0.26863428950309753,
0.2206539660692215,
0.531336784362793,
0.14630453288555145,
0.00387006439268589,
-0.10210707783699036,
0.3115445375442505,
-0.3857911229133606,
-0.1269279420375824,
0.558636486530304,
-0.4722703695297241,
-0.014896765351295471,
0.37591642141342163,
0.00525297736749053,
0.10031945258378983,
-0.2585340738296509,
0.3394193649291992,
0.13462631404399872,
0.24707308411598206,
-0.2523736357688904,
-0.07448071986436844,
-0.23391231894493103,
-0.0812007337808609,
-0.24211671948432922,
0.005781576037406921,
0.06971758604049683,
-0.45490604639053345,
-0.02364542707800865,
-0.24570104479789734,
-0.25891396403312683,
-0.10953634977340698,
0.3977832794189453,
-0.5061326026916504,
0.4292738139629364,
0.14595277607440948,
0.2955041825771332,
0.1822725534439087,
-0.21572501957416534,
-0.030717864632606506,
0.007094591856002808,
0.38529500365257263,
0.5473136901855469,
-0.5153126120567322,
-0.12057826668024063,
0.13055488467216492,
-0.0011696964502334595,
0.2056516408920288,
-0.24712766706943512,
-0.2166627198457718,
0.3844570219516754,
0.3991674780845642,
0.10744651407003403,
0.3933256268501282,
0.12321428954601288,
-0.06644604355096817,
0.6163380146026611,
0.39754718542099,
-0.0870259702205658,
0.07496513426303864,
0.07288176566362381,
-0.0070861028507351875,
0.32637161016464233,
0.22788415849208832,
-0.38967517018318176,
-0.15237101912498474,
-0.24472804367542267,
-0.04618557542562485,
-0.011226623319089413,
-0.27542540431022644,
0.07538372278213501,
0.14973026514053345,
0.4403752088546753,
0.260333776473999,
0.25013816356658936,
-0.20405052602291107,
0.041390374302864075,
-0.2743713855743408,
0.06895029544830322,
0.04660247266292572,
0.07286959141492844,
-0.14347974956035614,
0.1552457958459854,
0.12369462847709656,
0.15163414180278778,
-0.10848367214202881,
0.052486442029476166,
-0.0320189967751503,
0.04882802814245224,
-0.04139847308397293,
-0.2150832861661911,
0.22808200120925903,
0.5221585035324097,
-0.13864770531654358,
0.42915990948677063,
0.229203000664711,
-0.2557506561279297,
-0.330565482378006,
0.29627525806427,
-0.22453612089157104,
-0.2434125691652298,
0.09458855539560318,
-0.04934165999293327,
-0.07171564549207687,
0.35059767961502075,
-0.1128607913851738,
0.5079699158668518,
0.43235695362091064,
-0.16942653059959412,
-0.0945497676730156,
-0.19128510355949402,
-0.3159535527229309,
-0.215618297457695,
0.2965354323387146,
0.0022862255573272705,
-0.4213632047176361,
-0.19528700411319733,
-0.21652552485466003,
0.27114471793174744,
0.5304783582687378,
0.4404323697090149,
-0.12463118135929108,
0.07866588234901428,
0.29291826486587524,
0.4428160786628723,
0.5207013487815857,
-0.0072945356369018555,
-0.6128530502319336,
0.11979977786540985,
-0.21502640843391418,
0.09240326285362244,
-0.20398029685020447,
0.32509759068489075,
0.6797484159469604,
0.15789835155010223,
0.36179083585739136,
0.1648356169462204,
-0.022115571424365044,
0.2446768581867218,
-0.19201010465621948,
-0.09258610755205154,
0.13818684220314026,
0.06861613690853119,
0.010999321937561035,
-0.14158782362937927,
0.020231805741786957,
0.0064282501116395,
-0.011727526783943176,
-0.02290407195687294,
0.17316611111164093,
0.15950125455856323,
0.14448660612106323,
-0.047459401190280914,
0.14312559366226196,
-0.254042387008667,
-0.27152368426322937,
0.06449227035045624,
0.3877622187137604,
0.1844189465045929,
-0.3709637522697449,
-0.3565760850906372,
-0.26049867272377014,
0.14452381432056427,
0.35178864002227783,
0.11558514833450317,
-0.09666256606578827,
-0.3039393723011017,
0.15627774596214294,
-0.14368870854377747,
-0.1705748438835144,
-0.09885288774967194,
-0.06899787485599518,
0.08029747754335403,
0.013611345551908016,
-0.05657317489385605,
0.1670723408460617,
-0.1067381426692009,
-0.01886714994907379,
-0.12607958912849426,
0.27922558784484863,
0.23907533288002014,
0.08183297514915466,
0.06965087354183197,
0.2735038697719574,
-0.1891263872385025,
-0.2591296434402466,
0.4771983027458191,
0.07272437959909439,
0.07565698027610779,
0.1348821222782135,
-0.10287104547023773,
0.14604713022708893,
-0.21132013201713562,
-0.4426262676715851,
0.2642633318901062,
0.12587890028953552,
0.6324940919876099,
0.015660017728805542,
0.13646289706230164,
0.250524640083313,
0.01598510518670082,
-0.07562606036663055,
-0.3630043864250183,
0.08506031334400177,
0.0069791702553629875,
-0.07812702655792236,
0.0950099378824234,
-0.0385916531085968,
0.2597824037075043,
0.2616237998008728,
-0.02169332280755043,
0.11333394050598145,
0.3650853931903839,
-0.1223689541220665,
-0.21295034885406494,
0.17465026676654816,
-0.12196514755487442,
0.03068944811820984,
0.16325025260448456,
0.1556093841791153,
-0.209340438246727,
-0.14455640316009521,
-0.041850507259368896,
0.18947649002075195,
0.2225821167230606,
-0.10697273910045624,
-0.1777326464653015,
0.25124990940093994,
-0.04434005171060562,
-0.34635406732559204,
0.057274628430604935,
0.016649333760142326,
0.373043417930603,
-0.2785397469997406,
-0.19768425822257996,
-0.2901168465614319,
-0.13202571868896484,
0.30409494042396545,
-0.10162423551082611,
-0.002289019525051117,
-0.30220937728881836,
0.3303011655807495,
0.1749197542667389,
0.13609999418258667,
0.24050183594226837,
-0.12928226590156555,
0.30363568663597107,
0.05384320765733719,
-0.1591787487268448,
-0.2672784924507141,
-0.5161727666854858,
-0.014073096215724945,
-0.09434564411640167,
0.027243152260780334,
0.49502965807914734,
0.23635318875312805,
0.3811718225479126,
-0.2868725061416626,
-0.1996530145406723,
-0.4601120054721832,
0.09017090499401093,
-0.12532363831996918,
0.23697230219841003,
0.0723382830619812,
0.5490534901618958,
-0.3248768448829651,
0.06526162475347519,
0.00979342870414257,
-0.09487280249595642,
-0.10282615572214127,
0.18186093866825104,
-0.07139920443296432,
0.1781485229730606,
-0.13126687705516815,
0.22059693932533264,
0.07259172946214676,
-0.11767476797103882,
-0.10606896877288818,
-0.1165347546339035,
0.3740614652633667,
-0.3518959879875183,
-0.03392590209841728,
-0.26664888858795166,
-0.10138420015573502,
-0.12898488342761993,
-0.12145969271659851,
0.2334730625152588,
0.4066540598869324,
0.24642474949359894,
-0.06681618094444275,
-0.09939387440681458,
-0.04887232929468155,
-0.1490195095539093,
0.5926891565322876,
-0.34252744913101196,
0.015461753122508526,
-0.2961542308330536,
-0.011767806485295296,
0.09778867661952972,
0.05488542839884758,
0.5126540660858154,
-0.03072166256606579,
0.04384900629520416,
0.035336725413799286,
-0.34105634689331055,
-0.24849620461463928,
-0.10602336376905441,
-0.15931621193885803,
0.22403603792190552,
0.6323897838592529,
0.2220180630683899,
0.8341832756996155,
0.14475753903388977,
0.22165454924106598,
0.0119507797062397,
-0.0426444485783577,
0.02671130746603012,
-0.07636909931898117,
-0.2541617453098297,
-0.19076839089393616,
-0.2126713991165161,
-0.1055908128619194,
0.1826869398355484,
0.1845567524433136,
-0.6039087772369385,
-0.034067973494529724,
0.12786662578582764,
-0.15485504269599915,
-0.2923816740512848,
0.25875288248062134,
0.03902557119727135,
0.1774882674217224,
0.34806597232818604,
0.12999007105827332,
-0.44430264830589294,
-0.4553515911102295,
-0.06187586858868599,
-0.1176089197397232,
-0.0040125772356987,
-0.18381574749946594,
-0.602550745010376,
-0.23103754222393036,
-0.7433964014053345,
0.2902020812034607,
0.05708560347557068,
0.1852450966835022,
0.14808131754398346,
-0.1874941885471344,
0.3190455734729767,
-0.10602502524852753,
0.6654675006866455,
-0.08833169937133789,
-0.20527638494968414,
0.2013685554265976,
0.01372784748673439,
-0.6145782470703125,
0.20497117936611176,
-0.11210373044013977,
0.1562265157699585,
0.19933132827281952,
0.5296486020088196,
-0.5742835402488708,
-0.20196688175201416,
0.057585690170526505,
0.11043055355548859,
-0.16219976544380188,
0.046852871775627136,
-0.17319050431251526,
-0.3812519907951355,
-0.17319653928279877,
0.28430768847465515,
0.041360050439834595,
0.1488560140132904,
0.45115014910697937,
-0.007432699203491211,
0.15182599425315857,
-0.08162888139486313,
0.07012443244457245,
0.3923294246196747,
-0.023600533604621887,
0.18127091228961945,
0.06047702208161354,
0.27085304260253906,
-0.29920899868011475,
-0.036649033427238464,
0.1903487592935562,
-0.014154046773910522,
-0.12607692182064056,
0.05245673656463623,
0.07618006318807602,
0.26900768280029297,
0.5618201494216919,
-0.010732283815741539,
0.3450724482536316,
-0.19565489888191223,
0.21143639087677002,
-0.027457382529973984,
0.04783475026488304,
-0.1078944131731987,
-0.030055496841669083,
-0.31405216455459595,
-0.2903095781803131,
0.35916823148727417,
0.26984143257141113,
-0.29535454511642456,
0.698468029499054,
0.18627898395061493,
-0.18857772648334503,
0.5103732347488403,
0.33945897221565247,
1.0705472230911255,
-0.5219205021858215,
0.1128327026963234,
0.05346112698316574,
0.10152193903923035,
0.3691099286079407,
-0.39021551609039307,
0.29975366592407227,
-0.20435862243175507,
-0.08919926732778549,
-0.015888813883066177,
-0.10831348598003387,
-0.1283222734928131,
0.17573440074920654,
0.15617449581623077,
0.13699577748775482,
-0.14753463864326477,
0.5164921283721924,
0.10435395687818527,
0.11360500752925873,
0.33191341161727905,
-0.45477792620658875,
-0.1312398463487625,
-0.01872428134083748,
-0.049564093351364136,
-0.17375293374061584,
0.032661717385053635,
0.31248968839645386,
-0.1600411981344223,
-0.4126216769218445,
-0.30910632014274597,
-0.23022910952568054,
-0.16922275722026825,
0.030771614983677864,
-0.18889592587947845,
-0.02673311159014702,
-0.15387342870235443,
-0.11767260730266571,
-0.38748037815093994,
0.14520010352134705,
0.06075863540172577,
0.17453423142433167,
0.42867445945739746,
0.21834957599639893,
0.13853009045124054,
-0.08336315304040909,
0.08090127259492874,
0.04450228810310364,
-0.041443273425102234,
0.16390778124332428,
-0.11217149347066879,
-0.36094146966934204,
-0.34979361295700073,
0.17976611852645874,
0.5157937407493591,
0.060419440269470215,
-0.06606616824865341,
-0.08892714977264404,
0.17017938196659088,
-0.2673874497413635,
-0.0290575809776783,
-0.12265616655349731,
0.027831727638840675,
0.42156195640563965,
-0.028172817081212997,
-0.3202715218067169,
0.012257769703865051,
0.340238094329834,
0.30032333731651306,
0.059258610010147095,
0.2638508677482605,
-0.11903227865695953,
-0.5321376323699951,
-0.051032908260822296,
-0.1074720248579979,
0.17500364780426025,
-0.05143025889992714,
0.03951692953705788,
-0.3658224046230316,
-0.09247242659330368,
0.025701817125082016,
0.16052819788455963,
-0.04976009577512741,
-0.02118244767189026,
-0.19831787049770355,
-0.4951264262199402,
-0.0815918818116188,
0.3578311800956726,
0.10819251835346222,
0.048775143921375275,
-0.00446087121963501,
-0.08747874200344086,
-0.4045781195163727,
0.4990327060222626,
-0.14658530056476593,
-0.13670869171619415,
-0.1801360845565796,
0.4135909676551819,
-0.08448730409145355,
0.2446785271167755,
-0.04388919472694397,
-0.07721145451068878,
0.033572807908058167,
-0.015907883644104004,
0.013382231816649437,
-0.0906626433134079,
0.07581619918346405,
0.24284905195236206,
-0.1449742615222931,
-0.11700322479009628,
0.09856634587049484,
-0.21932075917720795,
-0.15341953933238983,
-0.41135600209236145,
0.2653714418411255,
0.08587056398391724,
-0.044193051755428314,
-0.37931695580482483,
0.3709971606731415,
-0.15144601464271545,
-0.059679049998521805,
0.14748463034629822,
-0.19123771786689758,
-0.08019386231899261,
0.11860141158103943,
0.2735244333744049,
0.05989468842744827,
0.06704851984977722,
-0.12542958557605743,
0.13862478733062744,
0.004434406757354736,
-0.24342715740203857,
0.0321885421872139,
0.01202230155467987,
0.08225229382514954,
0.19385091960430145,
0.11718501150608063,
0.3672371506690979,
-0.11022835969924927,
-0.07675842195749283,
0.34278935194015503,
-0.020961450412869453,
-0.21462854743003845,
-0.3234681487083435,
0.4670255780220032,
-0.07440390437841415,
0.14104905724525452,
0.3350795805454254,
0.029564086347818375,
0.11442789435386658,
0.022472593933343887,
-0.22002258896827698,
0.5852677226066589,
-0.2514873147010803,
-0.3143298625946045,
0.35294681787490845,
0.2052786499261856,
-0.11595897376537323,
0.1966896951198578,
0.18658022582530975,
-0.1286754012107849,
0.2911341190338135,
-0.03445111960172653,
0.1995794177055359,
0.13372865319252014,
0.07277628779411316,
-0.47319480776786804,
-0.15824171900749207,
0.01274460181593895,
0.5391825437545776,
-0.1250971555709839,
0.08512198179960251,
0.05376578867435455,
-0.1533166468143463,
0.48156270384788513,
-0.14596837759017944,
0.19329123198986053,
0.32045140862464905,
0.03537600487470627,
-0.19116926193237305,
-0.3031986355781555,
-0.28980720043182373,
0.09006290137767792,
0.037303026765584946,
-0.046306390315294266,
-0.23412178456783295,
0.4957737922668457,
0.017861507833003998,
0.10245512425899506,
-0.3974156379699707,
0.06796768307685852,
-0.24863341450691223,
0.30707040429115295,
-0.21450257301330566,
0.09013892710208893,
-0.4960901737213135,
0.2895285487174988,
0.0633159801363945,
-0.317686527967453,
0.19855839014053345,
0.3613951802253723,
0.027304034680128098,
-0.13050374388694763,
-0.2642959952354431,
-0.23429813981056213,
-0.04436078667640686,
0.09927176684141159,
0.14385636150836945,
0.10855135321617126,
-0.053179025650024414,
-0.09080960601568222,
-0.042281344532966614,
-0.20017220079898834,
0.34802761673927307,
0.2581954896450043,
0.02952682226896286,
-0.10889726132154465,
0.04166615009307861,
-0.3389948010444641,
0.00776403583586216,
-0.08488727360963821,
0.19251501560211182,
0.12597353756427765,
0.0392460972070694,
-0.15770740807056427,
0.17816045880317688,
-0.004350780509412289,
-0.002117060124874115,
0.013780510984361172,
0.29254093766212463,
-0.01246367022395134,
-0.024186335504055023,
-0.2196206897497177,
-0.34017008543014526,
-0.5015767812728882,
0.04727296531200409,
-0.813304603099823,
-0.36240091919898987,
0.42013731598854065,
0.3210952579975128,
0.41567009687423706,
0.2800280749797821,
-0.012921273708343506,
-0.20782555639743805,
-0.3595881760120392,
0.31663402915000916,
-0.17482981085777283,
0.4127573072910309,
-0.06877279281616211,
0.07826319336891174,
-0.055600110441446304,
-0.4907153844833374,
0.3658677935600281,
-0.1014883741736412,
-0.09075197577476501,
-0.013915009796619415,
0.08909867703914642,
0.23144888877868652,
0.18798832595348358,
0.2940821945667267,
-0.11037108302116394,
0.2682809829711914,
0.07061439752578735,
0.10881311446428299,
-0.14205271005630493,
0.2802870571613312,
-0.48643603920936584,
0.12737837433815002,
-0.0036763623356819153,
0.183431014418602,
-0.07126817852258682,
-0.13297484815120697,
-0.07154851406812668,
0.08553590625524521,
-0.21666911244392395,
-0.17650987207889557,
0.20548592507839203,
0.07573553174734116,
0.23055872321128845,
0.2810196876525879,
-0.24495695531368256,
-0.0296313539147377,
0.016944091767072678,
0.08971057087182999,
-0.299191415309906,
-0.27760079503059387,
0.6093688011169434,
-0.7927555441856384,
-0.5057581067085266,
-0.14068591594696045,
0.10325435549020767,
-0.04359372705221176,
-0.20852050185203552,
-0.20534637570381165,
-0.33827561140060425,
0.25393033027648926,
-0.13026857376098633,
-0.3445851504802704,
0.06825262308120728,
0.05897432193160057,
-0.1691323071718216,
-0.2935918867588043,
-0.029120102524757385,
-0.012951016426086426,
-0.11840175837278366,
-0.5401831269264221,
-0.4864799380302429
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | @lhoestq Sorry I'm just responding now. I'm currently using your recommendation for the map on a single column, and I've gotten it to be fast enough to sort of work for my use case by just setting `num_proc=10`, although it's still quite slow. It's clear that it is still loading the entirety of each row into memory and then discarding everything except the selected column, instead of exploiting the columnar data format to only load the selected column.
My code is like this:
```
self.dataset = self.dataset.sort('num_tokens')
batch_dataset = self.dataset.map(
compute_uniform_sized_batches,
batched=True, batch_size=10_000, num_proc=10, input_columns=['num_tokens'],
remove_columns=get_columns_all_equal(self.dataset),
with_indices=True,
fn_kwargs=dict(max_size=tokens_per_batch)
)
self.batches = {
name: list(zip(split['start'], split['length']))
for name, split in batch_dataset.items()
}
```
I find that the processes with higher IDs take significantly longer to complete, presumably because the dataset is sorted by article length and they're loading the entire article text into memory, instead of just the 'num_tokens' column.
I should note that my batching procedure would work best if I just used `batch_size=None` and loaded the whole column into memory at once, but I found that this was intolerably slow and gave me no progress information, so I'm using the less than ideal `batch_size=10_000`. | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 195 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
@lhoestq Sorry I'm just responding now. I'm currently using your recommendation for the map on a single column, and I've gotten it to be fast enough to sort of work for my use case by just setting `num_proc=10`, although it's still quite slow. It's clear that it is still loading the entirety of each row into memory and then discarding everything except the selected column, instead of exploiting the columnar data format to only load the selected column.
My code is like this:
```
self.dataset = self.dataset.sort('num_tokens')
batch_dataset = self.dataset.map(
compute_uniform_sized_batches,
batched=True, batch_size=10_000, num_proc=10, input_columns=['num_tokens'],
remove_columns=get_columns_all_equal(self.dataset),
with_indices=True,
fn_kwargs=dict(max_size=tokens_per_batch)
)
self.batches = {
name: list(zip(split['start'], split['length']))
for name, split in batch_dataset.items()
}
```
I find that the processes with higher IDs take significantly longer to complete, presumably because the dataset is sorted by article length and they're loading the entire article text into memory, instead of just the 'num_tokens' column.
I should note that my batching procedure would work best if I just used `batch_size=None` and loaded the whole column into memory at once, but I found that this was intolerably slow and gave me no progress information, so I'm using the less than ideal `batch_size=10_000`. | [
-0.11003395915031433,
0.2694854736328125,
-0.0035480093210935593,
-0.2267882078886032,
0.1348387598991394,
-0.15745586156845093,
0.32289522886276245,
0.577976405620575,
0.25163787603378296,
0.017154574394226074,
-0.008435238152742386,
0.5262531042098999,
-0.0003772163763642311,
-0.2199469804763794,
-0.0524405762553215,
0.2328757345676422,
0.0863017812371254,
0.29806244373321533,
0.32315391302108765,
0.10501690208911896,
-0.10544094443321228,
-0.1746150255203247,
-0.18986743688583374,
-0.08512425422668457,
-0.0808418020606041,
-0.04793817549943924,
0.21072565019130707,
-0.3849204182624817,
-0.2996504008769989,
-0.1998140960931778,
0.29331859946250916,
0.29986223578453064,
-0.16885331273078918,
0.14800123870372772,
-0.00012499382137320936,
-0.03293163329362869,
0.05936121195554733,
-0.015016603283584118,
-0.15491542220115662,
-0.08418424427509308,
0.13538366556167603,
-0.2224763184785843,
0.0945759043097496,
-0.21449145674705505,
0.050780653953552246,
-0.11024785041809082,
0.05433250591158867,
-0.0347231961786747,
0.026752173900604248,
-0.06678642332553864,
0.047833144664764404,
-0.08839612454175949,
-0.311880886554718,
0.23859849572181702,
0.4412197172641754,
0.1660657823085785,
0.0005604568868875504,
-0.16010545194149017,
0.3381623327732086,
-0.39961203932762146,
-0.1329919993877411,
0.4940267503261566,
-0.462211549282074,
-0.07658796012401581,
0.3967830240726471,
0.03194081410765648,
0.0792660266160965,
-0.22122880816459656,
0.30872681736946106,
0.1258922815322876,
0.19746240973472595,
-0.28182512521743774,
-0.08857770264148712,
-0.20581889152526855,
-0.07723760604858398,
-0.25471556186676025,
-0.05887051671743393,
0.019049715250730515,
-0.46564868092536926,
-0.002898693084716797,
-0.24047553539276123,
-0.2685699760913849,
-0.11229950934648514,
0.44090181589126587,
-0.5037668943405151,
0.43193069100379944,
0.22163447737693787,
0.2682170569896698,
0.21497178077697754,
-0.20143543183803558,
-0.052168358117341995,
-0.021135088056325912,
0.471550315618515,
0.5985536575317383,
-0.41382935643196106,
-0.183000847697258,
0.10644587129354477,
0.022784609347581863,
0.23419779539108276,
-0.2586020827293396,
-0.18238773941993713,
0.43557214736938477,
0.3492280840873718,
0.11865075677633286,
0.3513985276222229,
0.033875856548547745,
-0.05621948093175888,
0.546366274356842,
0.4081634283065796,
-0.09727402776479721,
0.1370312124490738,
0.09921805560588837,
0.005604005418717861,
0.31689465045928955,
0.22517450153827667,
-0.3960946202278137,
-0.23588420450687408,
-0.18374525010585785,
0.035198621451854706,
-0.00793954823166132,
-0.2091798484325409,
0.044525206089019775,
0.07543852925300598,
0.4448002576828003,
0.27879661321640015,
0.3084743916988373,
-0.22663110494613647,
-0.019254464656114578,
-0.2351519912481308,
0.028010345995426178,
0.05359375849366188,
0.08384500443935394,
-0.09492987394332886,
0.18028448522090912,
0.14234521985054016,
0.17083747684955597,
-0.14547224342823029,
0.014830482192337513,
-0.059024035930633545,
0.12638260424137115,
-0.03750474750995636,
-0.18373993039131165,
0.24491143226623535,
0.4446518123149872,
-0.14904183149337769,
0.3734371066093445,
0.20863699913024902,
-0.1996190994977951,
-0.31811559200286865,
0.32778096199035645,
-0.10038479417562485,
-0.23056185245513916,
0.11033625900745392,
-0.025112584233283997,
-0.0854819118976593,
0.3163957893848419,
-0.09837352484464645,
0.5966126918792725,
0.36362382769584656,
-0.1567474901676178,
-0.12680977582931519,
-0.17940481007099152,
-0.3244420289993286,
-0.237798273563385,
0.3155628442764282,
-0.05599124729633331,
-0.4163646996021271,
-0.23297002911567688,
-0.1773415207862854,
0.301484078168869,
0.42532074451446533,
0.36797037720680237,
-0.13124161958694458,
0.05893097072839737,
0.3872958719730377,
0.4368954300880432,
0.5277866721153259,
-0.027614176273345947,
-0.6045200824737549,
0.06410909444093704,
-0.19019374251365662,
0.06970544159412384,
-0.1573719084262848,
0.37174391746520996,
0.6730762720108032,
0.17122821509838104,
0.35086673498153687,
0.2020467221736908,
-0.043672576546669006,
0.27442699670791626,
-0.17746709287166595,
-0.2010706216096878,
0.1675620973110199,
0.09925280511379242,
0.03208445757627487,
-0.22194638848304749,
-0.003663085401058197,
0.02443542703986168,
0.056858137249946594,
0.012309148907661438,
0.18433961272239685,
0.0709388256072998,
0.1305355429649353,
-0.09611347317695618,
0.11534561216831207,
-0.27397122979164124,
-0.29589542746543884,
0.0815802663564682,
0.38431593775749207,
0.16378578543663025,
-0.32643741369247437,
-0.3511689305305481,
-0.18115094304084778,
0.0926743894815445,
0.3969915211200714,
0.09686519205570221,
-0.06343648582696915,
-0.35344818234443665,
0.19671401381492615,
-0.14897620677947998,
-0.1934259980916977,
-0.14665184915065765,
0.0024977754801511765,
0.10428785532712936,
0.011426592245697975,
-0.009363745339214802,
0.20649100840091705,
-0.11653400957584381,
-0.04714338108897209,
-0.11540894955396652,
0.23527613282203674,
0.2410053312778473,
0.16724687814712524,
0.08238314092159271,
0.23724348843097687,
-0.16476337611675262,
-0.328593909740448,
0.4697248935699463,
0.10234122723340988,
0.1482246071100235,
0.11630647629499435,
-0.14259931445121765,
0.16483411192893982,
-0.16048943996429443,
-0.5011026263237,
0.2884664535522461,
0.14807380735874176,
0.6134451627731323,
0.03109375387430191,
0.11144561320543289,
0.18546898663043976,
0.005105145275592804,
-0.060654133558273315,
-0.35915327072143555,
0.035748954862356186,
0.09713198244571686,
-0.11292135715484619,
0.10173629969358444,
-0.003351949155330658,
0.2966713011264801,
0.19449439644813538,
-0.04436272382736206,
0.08528724312782288,
0.3028746247291565,
-0.12707775831222534,
-0.19709718227386475,
0.23455385863780975,
-0.16040465235710144,
0.03202687203884125,
0.195766419172287,
0.09919452667236328,
-0.28184759616851807,
-0.1702195554971695,
0.011647412553429604,
0.19806255400180817,
0.1764257699251175,
-0.11191608756780624,
-0.17937538027763367,
0.2269996851682663,
-0.056137289851903915,
-0.3452410101890564,
0.07820203900337219,
-0.00960626918822527,
0.3562094569206238,
-0.20569202303886414,
-0.22087112069129944,
-0.2761366069316864,
-0.10305099934339523,
0.3162035644054413,
-0.10263027995824814,
-0.00739641860127449,
-0.2565504014492035,
0.3267338275909424,
0.20954576134681702,
0.13396652042865753,
0.22157105803489685,
-0.1613437980413437,
0.29756808280944824,
0.005861757323145866,
-0.18498317897319794,
-0.2740882635116577,
-0.5016185641288757,
0.01765810139477253,
-0.06628328561782837,
0.0460662916302681,
0.45365992188453674,
0.2173219621181488,
0.45913517475128174,
-0.3362983465194702,
-0.17959553003311157,
-0.39633262157440186,
0.062095604836940765,
-0.125780388712883,
0.20417118072509766,
0.06576433032751083,
0.5384761691093445,
-0.3111213445663452,
0.04346099868416786,
-0.010857904329895973,
-0.1486569344997406,
-0.059095993638038635,
0.1332433968782425,
-0.028529228642582893,
0.1866467297077179,
-0.10142113268375397,
0.21322166919708252,
0.04529188573360443,
-0.10456414520740509,
-0.09418568015098572,
-0.034768376499414444,
0.3498973250389099,
-0.41978809237480164,
0.03795331344008446,
-0.2923448383808136,
-0.06746166944503784,
-0.14481665194034576,
-0.12584619224071503,
0.2819057106971741,
0.4338942766189575,
0.27633193135261536,
-0.10037246346473694,
-0.1484421193599701,
-0.08361770957708359,
-0.1696138232946396,
0.5442781448364258,
-0.2675814628601074,
-0.00861037615686655,
-0.22664301097393036,
0.021271999925374985,
0.14781144261360168,
0.08198212832212448,
0.5152595043182373,
0.0026173321530222893,
0.03468018025159836,
0.07048837840557098,
-0.29371026158332825,
-0.22697505354881287,
-0.09384075552225113,
-0.1578364372253418,
0.249529629945755,
0.5338847637176514,
0.3260045349597931,
0.7934348583221436,
0.16551928222179413,
0.13232740759849548,
-0.051393866539001465,
-0.014919405803084373,
-0.041880760341882706,
-0.005187526345252991,
-0.19268880784511566,
-0.18693919479846954,
-0.25491419434547424,
-0.030334342271089554,
0.18436533212661743,
0.18663209676742554,
-0.5919134616851807,
-0.02166006527841091,
0.1671770066022873,
-0.09171800315380096,
-0.3089055120944977,
0.2933986783027649,
0.08434517681598663,
0.13790994882583618,
0.3415699303150177,
0.13168063759803772,
-0.4720873534679413,
-0.46464747190475464,
-0.027671361342072487,
-0.12659189105033875,
-0.025707878172397614,
-0.18399305641651154,
-0.5926159024238586,
-0.19102004170417786,
-0.7978942394256592,
0.266131728887558,
0.11824864894151688,
0.11458352208137512,
0.21137170493602753,
-0.25734850764274597,
0.24310606718063354,
-0.13322383165359497,
0.6605284214019775,
-0.07386692613363266,
-0.2266160398721695,
0.16038928925991058,
0.03525499999523163,
-0.6176283955574036,
0.23662607371807098,
-0.08476099371910095,
0.1380900889635086,
0.13544414937496185,
0.5151337385177612,
-0.5808650255203247,
-0.18643033504486084,
-0.0015589036047458649,
0.10457315295934677,
-0.15651263296604156,
0.0389331616461277,
-0.11031532287597656,
-0.28946226835250854,
-0.1778401881456375,
0.2542252242565155,
0.01606888882815838,
0.12123439460992813,
0.454769492149353,
0.017770756036043167,
0.16508424282073975,
-0.10090401023626328,
0.10250796377658844,
0.38898056745529175,
-0.0775689035654068,
0.18967531621456146,
0.04097210243344307,
0.3473922610282898,
-0.34931671619415283,
-0.03582903742790222,
0.10727657377719879,
-0.0601997934281826,
-0.09210473299026489,
-0.014563392847776413,
0.07855159044265747,
0.2629891037940979,
0.5754079818725586,
0.06604433059692383,
0.36555495858192444,
-0.1661544144153595,
0.18074452877044678,
-0.054515618830919266,
-0.02704358659684658,
-0.1794123500585556,
-0.03804570063948631,
-0.2959180474281311,
-0.29207658767700195,
0.36917823553085327,
0.29540330171585083,
-0.30097696185112,
0.6721140146255493,
0.13189208507537842,
-0.17529495060443878,
0.49071747064590454,
0.38729724287986755,
1.0202466249465942,
-0.5151754021644592,
0.1723366379737854,
0.03348061442375183,
0.15080678462982178,
0.3322608172893524,
-0.3836839199066162,
0.2518134117126465,
-0.22087964415550232,
-0.06771189719438553,
-0.030835000798106194,
-0.0808011069893837,
-0.1512112319469452,
0.21477971971035004,
0.09422039985656738,
0.12826569378376007,
-0.047469545155763626,
0.5101547837257385,
0.09633266180753708,
0.13019095361232758,
0.3080350458621979,
-0.4673941731452942,
-0.07323174923658371,
-0.0013813618570566177,
-0.01906561106443405,
-0.20651012659072876,
0.03765183314681053,
0.35365456342697144,
-0.20313483476638794,
-0.38924044370651245,
-0.2511255741119385,
-0.2868537902832031,
-0.21691976487636566,
0.04706691578030586,
-0.15234211087226868,
-0.04984799027442932,
-0.1734868437051773,
-0.05751197412610054,
-0.4261202812194824,
0.09080151468515396,
0.0768955871462822,
0.1112438440322876,
0.466680645942688,
0.23331107199192047,
0.13391971588134766,
-0.1408434957265854,
0.0918302908539772,
0.0707334503531456,
-0.03598741441965103,
0.23930439352989197,
-0.09978670626878738,
-0.3629201054573059,
-0.301352322101593,
0.15515604615211487,
0.5723893642425537,
0.03232218697667122,
-0.021212197840213776,
-0.052967920899391174,
0.14348344504833221,
-0.2560226321220398,
-0.0062223803251981735,
-0.1069570928812027,
0.08376733213663101,
0.4150015413761139,
0.0248398594558239,
-0.22222791612148285,
0.002773525193333626,
0.3920269310474396,
0.2615507245063782,
0.036748409271240234,
0.2135915607213974,
-0.11231701076030731,
-0.5209220051765442,
-0.04634621739387512,
-0.07082100212574005,
0.1633598357439041,
0.023165978491306305,
-0.026508674025535583,
-0.3171157240867615,
-0.11711221188306808,
0.0195749681442976,
0.1998365819454193,
-0.06356515735387802,
-0.054222799837589264,
-0.21333424746990204,
-0.43956494331359863,
-0.09566593915224075,
0.408852219581604,
0.12237776815891266,
0.06392598152160645,
-0.012186665087938309,
-0.0877254456281662,
-0.4353478252887726,
0.4807334840297699,
-0.17616625130176544,
-0.1444409191608429,
-0.06185920536518097,
0.39120063185691833,
-0.10111493617296219,
0.24399572610855103,
-0.09585413336753845,
-0.11713992059230804,
0.07014825195074081,
-0.028152842074632645,
0.005882688798010349,
-0.12201673537492752,
0.05325721576809883,
0.21387627720832825,
-0.1364700198173523,
-0.12359689921140671,
0.1105295941233635,
-0.1912611424922943,
-0.11962279677391052,
-0.4049905836582184,
0.21135978400707245,
0.07407127320766449,
-0.07178057730197906,
-0.3361969292163849,
0.4533836543560028,
-0.15353122353553772,
-0.054048504680395126,
0.16928035020828247,
-0.1950562596321106,
-0.055762290954589844,
0.10051584243774414,
0.3331463634967804,
0.02488452009856701,
0.05153924226760864,
-0.07874190807342529,
0.1919611394405365,
0.02674812823534012,
-0.21021249890327454,
0.03676280379295349,
0.10125494003295898,
0.04445071890950203,
0.1786356419324875,
0.11394697427749634,
0.357323557138443,
-0.12065070867538452,
-0.06314235925674438,
0.35424068570137024,
0.023921184241771698,
-0.1925201267004013,
-0.30948513746261597,
0.4062335789203644,
-0.09660256654024124,
0.22090846300125122,
0.3701666593551636,
0.03288481757044792,
0.08653435111045837,
0.0035621896386146545,
-0.23286575078964233,
0.5390011072158813,
-0.27439582347869873,
-0.3363247513771057,
0.35526347160339355,
0.27435028553009033,
-0.1701667308807373,
0.15963846445083618,
0.16538135707378387,
-0.05584312230348587,
0.2616038918495178,
-0.04249051958322525,
0.23028478026390076,
0.11655563116073608,
0.08002401888370514,
-0.4942269027233124,
-0.12901243567466736,
0.03364536911249161,
0.517456591129303,
-0.17576804757118225,
0.08975552022457123,
0.09522440284490585,
-0.06973772495985031,
0.49778133630752563,
-0.09094897657632828,
0.24040433764457703,
0.2748412787914276,
0.083156056702137,
-0.22196950018405914,
-0.35330602526664734,
-0.278216153383255,
0.057199105620384216,
0.060837890952825546,
-0.07853108644485474,
-0.321017324924469,
0.5138258934020996,
0.06572109460830688,
0.18880902230739594,
-0.38604122400283813,
0.1302870810031891,
-0.2775841951370239,
0.3409268856048584,
-0.1915675699710846,
0.07723665237426758,
-0.48944807052612305,
0.27931004762649536,
0.08368676900863647,
-0.36845719814300537,
0.14975956082344055,
0.30172091722488403,
-0.048707228153944016,
-0.041964150965213776,
-0.32157576084136963,
-0.22635358572006226,
-0.09162398427724838,
0.05912734568119049,
0.0959445908665657,
0.030370328575372696,
-0.0479741171002388,
-0.044466398656368256,
-0.05753854662179947,
-0.2394271343946457,
0.37880441546440125,
0.17219136655330658,
0.04368460178375244,
-0.11135686188936234,
0.16140562295913696,
-0.3382180333137512,
0.08984456956386566,
-0.11364752799272537,
0.26428908109664917,
0.08564554899930954,
-0.04942207410931587,
-0.19382448494434357,
0.1661047637462616,
0.022022921591997147,
0.012776777148246765,
0.0175333209335804,
0.2497018724679947,
-0.13215678930282593,
-0.040403276681900024,
-0.1920134276151657,
-0.3410741090774536,
-0.4634926915168762,
-0.02357117086648941,
-0.7484752535820007,
-0.39018651843070984,
0.3368368446826935,
0.28942978382110596,
0.440771222114563,
0.3460674285888672,
-0.0725475400686264,
-0.1604893058538437,
-0.3481915295124054,
0.3894011378288269,
-0.13629743456840515,
0.42803892493247986,
-0.05012811720371246,
0.10467327386140823,
-0.055528298020362854,
-0.525704026222229,
0.34274816513061523,
-0.1517554372549057,
-0.07405088096857071,
-0.027201615273952484,
0.04539090394973755,
0.22592517733573914,
0.21630242466926575,
0.2984825372695923,
-0.16499701142311096,
0.17716845870018005,
0.054753534495830536,
0.09563841670751572,
-0.14189130067825317,
0.4147329330444336,
-0.5043899416923523,
0.11820514500141144,
-0.0312291719019413,
0.1689736694097519,
-0.10396814346313477,
-0.11846455931663513,
-0.002100009238347411,
0.0843590497970581,
-0.2054898887872696,
-0.15568561851978302,
0.1682891696691513,
0.06908006221055984,
0.22193840146064758,
0.24208414554595947,
-0.37014931440353394,
0.022201549261808395,
-0.019084960222244263,
0.10132637619972229,
-0.29390597343444824,
-0.20790745317935944,
0.49107837677001953,
-0.8021830320358276,
-0.4429043233394623,
-0.1894972026348114,
0.048775434494018555,
-0.08947848528623581,
-0.1487005054950714,
-0.15713581442832947,
-0.3269064128398895,
0.22245603799819946,
-0.15309980511665344,
-0.3893985450267792,
0.027479521930217743,
0.06846855580806732,
-0.22643643617630005,
-0.33678385615348816,
0.011886708438396454,
-0.005130153149366379,
-0.07112044841051102,
-0.5593315362930298,
-0.515224277973175
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | Hi @norabelrose ! I'm glad you managed to make this work on your side.
Regarding memory usage, you can try to drop the columns that you don't want to use for your `map` for now.
In the future we'll try to find a way to not load unnecessary columns in memory in `map`. Currently the way it works is that it gets the batch as a python dict, then it updates it using the output of your mapping function, and finally it removes columns from `remove_columns`. Therefore for a moment some columns are loaded in memory even if you remove them or don't use them for your mapping function.
It would be nice to have a way to optimize memory for cases such as yours ! | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 126 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
Hi @norabelrose ! I'm glad you managed to make this work on your side.
Regarding memory usage, you can try to drop the columns that you don't want to use for your `map` for now.
In the future we'll try to find a way to not load unnecessary columns in memory in `map`. Currently the way it works is that it gets the batch as a python dict, then it updates it using the output of your mapping function, and finally it removes columns from `remove_columns`. Therefore for a moment some columns are loaded in memory even if you remove them or don't use them for your mapping function.
It would be nice to have a way to optimize memory for cases such as yours ! | [
-0.10902240872383118,
0.2856530249118805,
-0.017312292009592056,
-0.13604827225208282,
0.17431524395942688,
-0.084663026034832,
0.27682363986968994,
0.5508022904396057,
0.29533955454826355,
-0.028073281049728394,
-0.043003641068935394,
0.4847540557384491,
-0.0104959262534976,
-0.21682919561862946,
-0.07664857059717178,
0.178052619099617,
0.08791665732860565,
0.29811859130859375,
0.2514612376689911,
0.1253352016210556,
-0.15271812677383423,
-0.1559891402721405,
-0.19234874844551086,
-0.13312257826328278,
-0.1440611183643341,
-0.07994059473276138,
0.1867874264717102,
-0.3805733621120453,
-0.26640182733535767,
-0.23721817135810852,
0.2627156972885132,
0.31391236186027527,
-0.11954550445079803,
0.14002647995948792,
-0.00012318097287788987,
-0.06551375240087509,
0.03792295232415199,
0.018760258331894875,
-0.1874786913394928,
-0.009184479713439941,
0.11472573131322861,
-0.2367018610239029,
0.10028089582920074,
-0.21355155110359192,
0.10237572342157364,
-0.135870561003685,
-0.009675854817032814,
-0.06714010238647461,
0.0681038647890091,
-0.047348350286483765,
0.06907130032777786,
-0.07569579780101776,
-0.2891826033592224,
0.25948408246040344,
0.4704767167568207,
0.16183340549468994,
0.05020969361066818,
-0.1637227088212967,
0.3472459316253662,
-0.38541603088378906,
-0.1927085816860199,
0.5658634305000305,
-0.45682448148727417,
0.003163721412420273,
0.36841610074043274,
0.00019915495067834854,
0.12138697504997253,
-0.26288101077079773,
0.35361891984939575,
0.12016189098358154,
0.29666829109191895,
-0.3108711242675781,
-0.033721208572387695,
-0.24691256880760193,
-0.08745922148227692,
-0.2455390840768814,
-0.04813653230667114,
0.02249312400817871,
-0.4655241370201111,
-0.06422443687915802,
-0.24850881099700928,
-0.27799192070961,
-0.10070276260375977,
0.3768831491470337,
-0.4120349586009979,
0.42983776330947876,
0.18461336195468903,
0.26947838068008423,
0.23005717992782593,
-0.24251417815685272,
-0.034419309347867966,
-0.07634081691503525,
0.3317644000053406,
0.5829606652259827,
-0.43693041801452637,
-0.18211716413497925,
0.08194952458143234,
-0.03605322539806366,
0.21441328525543213,
-0.2783695459365845,
-0.25954267382621765,
0.36223819851875305,
0.3828546702861786,
0.09608425199985504,
0.44571638107299805,
0.10080364346504211,
-0.07243334501981735,
0.593791127204895,
0.35240262746810913,
-0.13360705971717834,
0.09224174916744232,
0.035510189831256866,
-0.008340820670127869,
0.28757938742637634,
0.30770111083984375,
-0.42240557074546814,
-0.14650683104991913,
-0.177795872092247,
-0.003620866686105728,
-0.023357223719358444,
-0.21486732363700867,
0.013757040724158287,
0.11958441138267517,
0.4628031551837921,
0.2295096218585968,
0.2768382430076599,
-0.19773446023464203,
-0.024847187101840973,
-0.2141759842634201,
0.05152261629700661,
0.02544356882572174,
0.09532278776168823,
-0.1413808912038803,
0.17974884808063507,
0.12377260625362396,
0.23492072522640228,
-0.0849078893661499,
0.024160340428352356,
-0.027758292853832245,
0.07161099463701248,
0.025331323966383934,
-0.23728138208389282,
0.2751714885234833,
0.46690091490745544,
-0.14561611413955688,
0.37500545382499695,
0.1949281245470047,
-0.2103823572397232,
-0.3377525210380554,
0.27834078669548035,
-0.15689006447792053,
-0.2745814621448517,
0.11745855957269669,
-0.01010302733629942,
-0.03575848788022995,
0.3091067373752594,
-0.19210687279701233,
0.5416849851608276,
0.39051151275634766,
-0.11195601522922516,
-0.1409582495689392,
-0.17788705229759216,
-0.2912271022796631,
-0.2638455927371979,
0.3307380676269531,
0.004774212837219238,
-0.40090587735176086,
-0.23621602356433868,
-0.21028780937194824,
0.27776777744293213,
0.45106878876686096,
0.4538515508174896,
-0.1082940623164177,
0.11151409149169922,
0.34507253766059875,
0.364419162273407,
0.5249238610267639,
-0.1185903549194336,
-0.564375638961792,
0.09117494523525238,
-0.08971235156059265,
0.12069738656282425,
-0.15122464299201965,
0.4033989906311035,
0.6525664329528809,
0.16550642251968384,
0.302356481552124,
0.19398216903209686,
-0.059386610984802246,
0.302056223154068,
-0.15422587096691132,
-0.18814490735530853,
0.13579335808753967,
0.07401016354560852,
0.03587012737989426,
-0.24536114931106567,
-0.049157314002513885,
0.04373141750693321,
0.021019011735916138,
-0.08103102445602417,
0.21679401397705078,
0.08805655688047409,
0.16599644720554352,
-0.018801264464855194,
0.10497290641069412,
-0.2512112557888031,
-0.3391765356063843,
0.09359870105981827,
0.3977258503437042,
0.16974927484989166,
-0.32317525148391724,
-0.3669006824493408,
-0.16377440094947815,
0.08148442953824997,
0.34381258487701416,
0.05086302012205124,
-0.027068855240941048,
-0.3686044216156006,
0.201023131608963,
-0.19622260332107544,
-0.1454143226146698,
-0.1403479278087616,
-0.012780703604221344,
0.09205368906259537,
0.013269848190248013,
-0.0675177127122879,
0.19585534930229187,
-0.08752249926328659,
-0.015384092926979065,
-0.047894902527332306,
0.24115103483200073,
0.27107173204421997,
0.1745266616344452,
0.06390724331140518,
0.27634772658348083,
-0.1552940160036087,
-0.27786198258399963,
0.4768838882446289,
0.03272922337055206,
0.1264176070690155,
0.1915230005979538,
-0.1480119675397873,
0.1535407304763794,
-0.166528582572937,
-0.4134833514690399,
0.23364093899726868,
0.1651548594236374,
0.6565909385681152,
0.008674569427967072,
0.13316567242145538,
0.18820972740650177,
-0.006811946630477905,
-0.0356932207942009,
-0.39792028069496155,
0.031874001026153564,
0.021727683022618294,
-0.07784199714660645,
0.13297481834888458,
0.007417455315589905,
0.19805285334587097,
0.20518773794174194,
-0.00784347578883171,
0.08780409395694733,
0.3099794387817383,
-0.2001461684703827,
-0.24212148785591125,
0.1981223225593567,
-0.14989283680915833,
0.01761934906244278,
0.2220948189496994,
0.08363459259271622,
-0.2559232711791992,
-0.10165983438491821,
0.008721068501472473,
0.23134446144104004,
0.22543567419052124,
-0.06685366481542587,
-0.23807105422019958,
0.177994042634964,
-0.05711118504405022,
-0.3067784905433655,
0.0590054951608181,
-0.023705847561359406,
0.3478136956691742,
-0.2445157766342163,
-0.20611438155174255,
-0.25470176339149475,
-0.1980946958065033,
0.3406115174293518,
-0.08165024220943451,
0.008711207658052444,
-0.2504311501979828,
0.28668516874313354,
0.18818724155426025,
0.1070011705160141,
0.2564489245414734,
-0.11981512606143951,
0.3113122284412384,
0.029082855209708214,
-0.2222062349319458,
-0.27296021580696106,
-0.5268831253051758,
-0.02902977168560028,
-0.030516404658555984,
0.11085561662912369,
0.3845768868923187,
0.3267250061035156,
0.4251883924007416,
-0.2760053873062134,
-0.1865749955177307,
-0.3498573303222656,
0.0308897215873003,
-0.147395521402359,
0.21653689444065094,
0.03865616023540497,
0.5493983030319214,
-0.34263718128204346,
0.049189675599336624,
-0.002728586783632636,
-0.10808322578668594,
-0.03409494832158089,
0.12996456027030945,
-0.04714071378111839,
0.17864932119846344,
-0.0442439466714859,
0.1530381739139557,
0.05914728343486786,
-0.13239219784736633,
-0.10487282276153564,
-0.04405561834573746,
0.3658526539802551,
-0.33948907256126404,
0.036153532564640045,
-0.25837934017181396,
-0.10677488148212433,
-0.13615663349628448,
-0.13857224583625793,
0.22789636254310608,
0.40985003113746643,
0.23684509098529816,
-0.04918435588479042,
-0.046133823692798615,
-0.05417139455676079,
-0.0778103619813919,
0.5534917116165161,
-0.33836179971694946,
0.005988060496747494,
-0.24293069541454315,
-0.001542162150144577,
0.14680221676826477,
0.1258048266172409,
0.4377748370170593,
0.02515212446451187,
0.0017539914697408676,
0.08939383178949356,
-0.2488977164030075,
-0.2838340401649475,
-0.11817236989736557,
-0.14189541339874268,
0.2551562786102295,
0.558638870716095,
0.2956332862377167,
0.8239873051643372,
0.15586093068122864,
0.21647728979587555,
0.013482298702001572,
0.0023208409547805786,
0.019504420459270477,
-0.018736161291599274,
-0.20573903620243073,
-0.22714652121067047,
-0.24263471364974976,
-0.03510072082281113,
0.18511085212230682,
0.2311798632144928,
-0.5529460310935974,
-0.007512148469686508,
0.11598023772239685,
-0.08652444183826447,
-0.33212292194366455,
0.3729742765426636,
0.018517976626753807,
0.18349897861480713,
0.3319442868232727,
0.05402454733848572,
-0.48320072889328003,
-0.4939585328102112,
-0.043936554342508316,
-0.17279334366321564,
-0.004334151744842529,
-0.18394961953163147,
-0.5975131392478943,
-0.2067457139492035,
-0.7730185985565186,
0.2885383367538452,
0.05152696371078491,
0.06268080323934555,
0.16221122443675995,
-0.1980968415737152,
0.26044952869415283,
-0.05202804133296013,
0.6324743032455444,
-0.10641171783208847,
-0.2887439727783203,
0.16403155028820038,
-0.02449723891913891,
-0.6307042241096497,
0.23113735020160675,
-0.13953225314617157,
0.135793536901474,
0.14551927149295807,
0.5015466213226318,
-0.5444862246513367,
-0.27313947677612305,
0.02277938276529312,
0.16015900671482086,
-0.21091578900814056,
0.04122619330883026,
-0.07774461060762405,
-0.34153416752815247,
-0.24751828610897064,
0.24555975198745728,
0.05491461604833603,
0.1496189534664154,
0.5006222128868103,
0.010920241475105286,
0.1289723962545395,
-0.053247109055519104,
0.16411280632019043,
0.37662672996520996,
-0.004163953475654125,
0.21453611552715302,
0.01708792895078659,
0.3097979724407196,
-0.2957209050655365,
0.04823746532201767,
0.0950116515159607,
-0.09580320119857788,
-0.13144442439079285,
-0.09140941500663757,
0.08598417043685913,
0.34215047955513,
0.5212574005126953,
0.016756493598222733,
0.3089970648288727,
-0.165633425116539,
0.1997566819190979,
-0.09878085553646088,
0.02437063679099083,
-0.1273791640996933,
0.01238259393721819,
-0.3444966673851013,
-0.36879804730415344,
0.34838226437568665,
0.3398561477661133,
-0.2826130986213684,
0.7005108594894409,
0.13457661867141724,
-0.2693926990032196,
0.49197328090667725,
0.4547048807144165,
1.003008246421814,
-0.5092760920524597,
0.19182933866977692,
0.1041995957493782,
0.15248887240886688,
0.3764022886753082,
-0.37552887201309204,
0.27387237548828125,
-0.17445719242095947,
0.01933828555047512,
0.007618540897965431,
-0.06861726939678192,
-0.10365103930234909,
0.18735724687576294,
0.10575772821903229,
0.15708352625370026,
-0.11728475987911224,
0.4785139858722687,
-0.002379384823143482,
0.16668333113193512,
0.25662392377853394,
-0.5155162215232849,
-0.12560458481311798,
0.030008714646100998,
-0.023356087505817413,
-0.23955529928207397,
-0.001650303602218628,
0.36043262481689453,
-0.11639121919870377,
-0.4067578911781311,
-0.23947341740131378,
-0.33395424485206604,
-0.17647944390773773,
0.07649675011634827,
-0.21805062890052795,
-0.00006205588579177856,
-0.09663645923137665,
-0.034144822508096695,
-0.3839147090911865,
0.09996058791875839,
0.11961311846971512,
0.12398390471935272,
0.4367551803588867,
0.21803128719329834,
0.07898324728012085,
-0.1147114560008049,
0.06382541358470917,
0.05451188236474991,
-0.030629634857177734,
0.2301749587059021,
-0.08447111397981644,
-0.36999744176864624,
-0.3310750722885132,
0.14228758215904236,
0.5918897390365601,
-0.015617599710822105,
-0.05704839527606964,
-0.07318766415119171,
0.13843223452568054,
-0.1705447882413864,
0.013900106772780418,
-0.11726979911327362,
0.037561431527137756,
0.48828986287117004,
0.009326253086328506,
-0.2604597806930542,
0.0049469489604234695,
0.2434515357017517,
0.33910250663757324,
0.05817846953868866,
0.2930651903152466,
-0.08150207996368408,
-0.4987186789512634,
-0.08577777445316315,
-0.06994672864675522,
0.2039605677127838,
0.0262368842959404,
0.018641237169504166,
-0.2155817449092865,
-0.09639789909124374,
-0.030551476404070854,
0.19364216923713684,
-0.046411603689193726,
-0.049974583089351654,
-0.18698649108409882,
-0.40015584230422974,
-0.1264631748199463,
0.412747859954834,
0.15679849684238434,
0.14423853158950806,
-0.011568242684006691,
-0.15278516709804535,
-0.4431922435760498,
0.5253604054450989,
-0.19376040995121002,
-0.17971059679985046,
-0.09947281330823898,
0.4249875843524933,
-0.07593020796775818,
0.29844895005226135,
-0.021544426679611206,
-0.14239072799682617,
0.056768737733364105,
-0.07810588926076889,
-0.027993597090244293,
-0.14439448714256287,
0.05468548461794853,
0.20249566435813904,
-0.16704174876213074,
-0.20093250274658203,
0.10738229751586914,
-0.20263487100601196,
-0.0884777158498764,
-0.45007917284965515,
0.24850896000862122,
0.08771946281194687,
-0.06732584536075592,
-0.3250292241573334,
0.39653342962265015,
-0.2247072458267212,
-0.051757946610450745,
0.21747629344463348,
-0.1652270406484604,
-0.08368197083473206,
0.14749430119991302,
0.32861772179603577,
0.11126003414392471,
0.03271064907312393,
-0.0768912211060524,
0.1567070633172989,
0.08650106936693192,
-0.22997671365737915,
-0.06540530920028687,
0.09118672460317612,
-0.02223716303706169,
0.22650757431983948,
0.07775723189115524,
0.32555192708969116,
-0.11883066594600677,
-0.07019978761672974,
0.3611971437931061,
0.04891819506883621,
-0.18873260915279388,
-0.289971262216568,
0.3760865032672882,
-0.15461084246635437,
0.14738908410072327,
0.3530823886394501,
-0.0040374621748924255,
0.08526638150215149,
-0.02184746414422989,
-0.20059356093406677,
0.5574965476989746,
-0.25974905490875244,
-0.2453693449497223,
0.28991416096687317,
0.266928493976593,
-0.18695028126239777,
0.14341352880001068,
0.22236007452011108,
-0.07303179055452347,
0.22469674050807953,
-0.049738772213459015,
0.1983327567577362,
0.14449796080589294,
0.09015412628650665,
-0.5114415884017944,
-0.12119691073894501,
0.049583639949560165,
0.5318866968154907,
-0.18302959203720093,
0.06723320484161377,
0.03983688727021217,
-0.14013803005218506,
0.5727421641349792,
-0.16429990530014038,
0.18311011791229248,
0.2923382520675659,
0.02717360109090805,
-0.20315241813659668,
-0.31538501381874084,
-0.2637039124965668,
0.12722644209861755,
0.049883756786584854,
-0.006265703588724136,
-0.4017658829689026,
0.4743148386478424,
0.050112128257751465,
0.14379169046878815,
-0.34584856033325195,
0.17349714040756226,
-0.18046429753303528,
0.30579182505607605,
-0.20121432840824127,
-0.0011616144329309464,
-0.4704740047454834,
0.298112690448761,
0.053575124591588974,
-0.2909854054450989,
0.2042207568883896,
0.31162190437316895,
-0.005686605349183083,
-0.04551125317811966,
-0.24246929585933685,
-0.22195284068584442,
-0.14563533663749695,
0.08767712116241455,
0.06224667280912399,
0.05386234074831009,
-0.08184349536895752,
-0.03036697581410408,
-0.05687391385436058,
-0.28636011481285095,
0.34769606590270996,
0.18249830603599548,
0.02645450085401535,
-0.08136142045259476,
0.1229303628206253,
-0.313700795173645,
0.07133452594280243,
-0.0916881188750267,
0.2021404206752777,
0.05373658984899521,
0.07805181294679642,
-0.1932748407125473,
0.17448705434799194,
0.0030705519020557404,
0.027552101761102676,
0.002617867663502693,
0.2995876669883728,
-0.07860483229160309,
-0.04608269780874252,
-0.2731841802597046,
-0.3212512731552124,
-0.4879874289035797,
-0.07965616136789322,
-0.8037523031234741,
-0.3432796001434326,
0.3171459436416626,
0.2904570996761322,
0.3600548803806305,
0.3319469690322876,
-0.051244497299194336,
-0.15307015180587769,
-0.40106984972953796,
0.30757617950439453,
-0.14262817800045013,
0.3985098898410797,
-0.04830700904130936,
0.17642444372177124,
-0.00047744810581207275,
-0.4729263186454773,
0.3123590350151062,
-0.12482769787311554,
-0.059129469096660614,
-0.04131931811571121,
0.09134434163570404,
0.25510919094085693,
0.2520381212234497,
0.3186085820198059,
-0.11162914335727692,
0.2177821397781372,
0.06280457973480225,
0.0907694548368454,
-0.1198384016752243,
0.3120599389076233,
-0.4494711756706238,
0.06923829019069672,
0.004029138013720512,
0.17686599493026733,
-0.20578442513942719,
-0.12384480237960815,
-0.0555477999150753,
0.11012058705091476,
-0.20111139118671417,
-0.18337060511112213,
0.21575003862380981,
0.03672400116920471,
0.261010080575943,
0.2835201025009155,
-0.3485638499259949,
0.023250088095664978,
-0.02532879263162613,
0.07448846101760864,
-0.3010801076889038,
-0.23120488226413727,
0.5163488388061523,
-0.8135396838188171,
-0.4936997890472412,
-0.19429996609687805,
0.10853912681341171,
-0.04661805182695389,
-0.2379189133644104,
-0.16401886940002441,
-0.28790974617004395,
0.2436068058013916,
-0.12065424770116806,
-0.33472830057144165,
0.04816732928156853,
0.04696646332740784,
-0.1878630518913269,
-0.3019769787788391,
-0.0490138903260231,
-0.07361821085214615,
-0.13300512731075287,
-0.5351456999778748,
-0.4960492253303528
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | @lhoestq After looking through the source code, it looks like the following solution has at least some chance of working:
- refactor `Dataset.map()` so that the `input_columns` parameter is implemented by using the `self.formatted_as()` context manager with `columns=input_columns`
- change `Dataset._getitem()` so that it passes `self._data.drop(drop_columns)` to the `query_table()` function whenever `format_columns` is non-None and `output_all_columns` is False, instead of `self._data` itself | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 62 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
@lhoestq After looking through the source code, it looks like the following solution has at least some chance of working:
- refactor `Dataset.map()` so that the `input_columns` parameter is implemented by using the `self.formatted_as()` context manager with `columns=input_columns`
- change `Dataset._getitem()` so that it passes `self._data.drop(drop_columns)` to the `query_table()` function whenever `format_columns` is non-None and `output_all_columns` is False, instead of `self._data` itself | [
-0.12732206284999847,
0.34810400009155273,
-0.006475726142525673,
-0.15352939069271088,
0.1438034474849701,
-0.14673574268817902,
0.3634435534477234,
0.6069023609161377,
0.16607461869716644,
-0.0057869479060173035,
-0.1035192459821701,
0.5548494458198547,
0.0025604115799069405,
-0.19553518295288086,
-0.057818323373794556,
0.18262973427772522,
0.05853051319718361,
0.2830987572669983,
0.2737964391708374,
0.10410213470458984,
-0.09511736035346985,
-0.1705082207918167,
-0.2150658816099167,
-0.06666150689125061,
-0.0642239898443222,
-0.061307743191719055,
0.1991729438304901,
-0.38500499725341797,
-0.2869391441345215,
-0.22710616886615753,
0.2922722399234772,
0.35935166478157043,
-0.18019671738147736,
0.12673574686050415,
-0.00012594253348652273,
-0.045802198350429535,
0.03894898295402527,
-0.020065538585186005,
-0.17057327926158905,
-0.05512610077857971,
0.147995263338089,
-0.17616508901119232,
0.08466705679893494,
-0.2403680980205536,
0.05513288825750351,
-0.1327308565378189,
-0.01061970554292202,
-0.01175236701965332,
0.04061388969421387,
-0.11284733563661575,
0.0341307669878006,
-0.034077227115631104,
-0.30176135897636414,
0.25655844807624817,
0.45950934290885925,
0.19409745931625366,
0.027051446959376335,
-0.1416131854057312,
0.270746111869812,
-0.3485596776008606,
-0.16819027066230774,
0.5096771121025085,
-0.49222666025161743,
-0.058093879371881485,
0.3593023419380188,
0.025337297469377518,
0.10581228137016296,
-0.2550089657306671,
0.2683985233306885,
0.1529868245124817,
0.2921068072319031,
-0.3296051621437073,
-0.15174883604049683,
-0.31548598408699036,
-0.043914441019296646,
-0.2649434208869934,
-0.07075654715299606,
0.020001398399472237,
-0.4546419680118561,
-0.015496645122766495,
-0.22152701020240784,
-0.2403394728899002,
-0.13276363909244537,
0.40172773599624634,
-0.4890253245830536,
0.4664956331253052,
0.17490942776203156,
0.2699730098247528,
0.20084397494792938,
-0.2302258461713791,
0.004269337747246027,
-0.03035631775856018,
0.40813031792640686,
0.5703799724578857,
-0.41176703572273254,
-0.21430295705795288,
0.1393149197101593,
0.003653392195701599,
0.23064404726028442,
-0.19238078594207764,
-0.21970248222351074,
0.4396783113479614,
0.3002086877822876,
0.10325077176094055,
0.39378219842910767,
0.08232481777667999,
-0.011740453541278839,
0.6130167245864868,
0.41948026418685913,
-0.06902774423360825,
0.15204863250255585,
0.11068305373191833,
-0.03779347613453865,
0.282865971326828,
0.19122309982776642,
-0.2766188085079193,
-0.14907969534397125,
-0.18551117181777954,
-0.016878418624401093,
-0.017802949994802475,
-0.2466076910495758,
0.018831437453627586,
0.08668641000986099,
0.36930209398269653,
0.25539523363113403,
0.331707626581192,
-0.18548141419887543,
-0.0037354975938796997,
-0.22591981291770935,
0.02453005686402321,
0.09046085178852081,
0.06583911180496216,
-0.07531615346670151,
0.13682718575000763,
0.12437307834625244,
0.2003500610589981,
-0.11175402253866196,
0.01938803866505623,
-0.011176325380802155,
0.1090581864118576,
-0.04833277314901352,
-0.15295419096946716,
0.2417970597743988,
0.44113868474960327,
-0.1661825031042099,
0.3761272728443146,
0.2155161201953888,
-0.3126178979873657,
-0.38320794701576233,
0.24309352040290833,
-0.1104760393500328,
-0.1868738979101181,
0.06667536497116089,
-0.028904195874929428,
-0.07719765603542328,
0.3230989873409271,
-0.1639081835746765,
0.5878400802612305,
0.3482170104980469,
-0.14936380088329315,
-0.09802795201539993,
-0.17332583665847778,
-0.2845935821533203,
-0.20816656947135925,
0.3253331482410431,
-0.014953270554542542,
-0.4749380648136139,
-0.23950903117656708,
-0.19892817735671997,
0.2556532621383667,
0.4086402952671051,
0.33160772919654846,
-0.10024333745241165,
0.14160005748271942,
0.33977165818214417,
0.4450964331626892,
0.5255149602890015,
-0.07800672948360443,
-0.5603325963020325,
0.05603485554456711,
-0.19522736966609955,
0.09961112588644028,
-0.16348257660865784,
0.3420073091983795,
0.7027945518493652,
0.11540988087654114,
0.2961074709892273,
0.20337457954883575,
-0.051150158047676086,
0.24374425411224365,
-0.12465611100196838,
-0.20594705641269684,
0.1755496859550476,
0.13671007752418518,
0.02925298921763897,
-0.24470600485801697,
0.04770471155643463,
-0.003933067433536053,
0.022056270390748978,
-0.0478290356695652,
0.21188747882843018,
0.0858212560415268,
0.12379451096057892,
-0.08842402696609497,
0.08693869411945343,
-0.2819356620311737,
-0.3313647210597992,
0.0774916335940361,
0.4104808568954468,
0.2247711569070816,
-0.35452061891555786,
-0.4367653727531433,
-0.1847039759159088,
0.11231673508882523,
0.38440459966659546,
0.06838467717170715,
-0.07199279218912125,
-0.3210817277431488,
0.18439558148384094,
-0.12955863773822784,
-0.1944355070590973,
-0.14078859984874725,
-0.014787927269935608,
0.10929092019796371,
-0.03603760525584221,
-0.041291624307632446,
0.2478712946176529,
-0.03886931389570236,
-0.03460536152124405,
-0.06251362711191177,
0.28112518787384033,
0.21688587963581085,
0.1725887954235077,
0.09542383998632431,
0.24235416948795319,
-0.12735165655612946,
-0.33830299973487854,
0.4517209529876709,
0.11557535827159882,
0.17826193571090698,
0.12482577562332153,
-0.11418488621711731,
0.13007782399654388,
-0.17014941573143005,
-0.5284742116928101,
0.33421146869659424,
0.14441342651844025,
0.6386407017707825,
0.03278367966413498,
0.1267503798007965,
0.16612322628498077,
0.001988384872674942,
-0.1329389363527298,
-0.3860223889350891,
-0.005312446504831314,
0.05127348005771637,
-0.07262566685676575,
0.09611181169748306,
-0.02757406234741211,
0.32752862572669983,
0.24455061554908752,
-0.06268592923879623,
0.10909417271614075,
0.27730005979537964,
-0.1371353566646576,
-0.15564104914665222,
0.23554107546806335,
-0.08415833115577698,
0.013260498642921448,
0.20412492752075195,
0.14940223097801208,
-0.18768124282360077,
-0.12094608694314957,
0.026248972862958908,
0.21145465970039368,
0.23945455253124237,
-0.13654235005378723,
-0.16132628917694092,
0.2345716655254364,
-0.0368100106716156,
-0.34679269790649414,
0.018829625099897385,
0.0038081612437963486,
0.327686071395874,
-0.26459428668022156,
-0.22065958380699158,
-0.30715638399124146,
-0.17739006876945496,
0.30765804648399353,
-0.10170016437768936,
-0.012701034545898438,
-0.26537784934043884,
0.31730157136917114,
0.21549423038959503,
0.04014880582690239,
0.3119368553161621,
-0.16618165373802185,
0.30873018503189087,
0.024370862171053886,
-0.16373316943645477,
-0.24477200210094452,
-0.5096173882484436,
0.06334608793258667,
-0.06866645812988281,
0.06419436633586884,
0.4734523296356201,
0.23610420525074005,
0.4196454584598541,
-0.3037257194519043,
-0.21424327790737152,
-0.43203005194664,
0.09369996190071106,
-0.14242202043533325,
0.22902816534042358,
0.13840360939502716,
0.5033742189407349,
-0.30425047874450684,
0.012872009538114071,
-0.020111385732889175,
-0.044261012226343155,
-0.09175306558609009,
0.07903742045164108,
-0.034972939640283585,
0.20203779637813568,
-0.13026918470859528,
0.21402040123939514,
0.029272034764289856,
-0.1585877537727356,
-0.09122170507907867,
-0.09083680808544159,
0.37714189291000366,
-0.32673513889312744,
-0.06545397639274597,
-0.2527085244655609,
-0.04766445234417915,
-0.14876821637153625,
-0.08743618428707123,
0.2180916965007782,
0.44905829429626465,
0.22274889051914215,
-0.04337736591696739,
-0.15371902287006378,
-0.09692250937223434,
-0.12336575984954834,
0.5705347657203674,
-0.26598578691482544,
-0.030716896057128906,
-0.1824512630701065,
0.08918975293636322,
0.13912248611450195,
0.13798798620700836,
0.4991467297077179,
0.05530524626374245,
0.04281879961490631,
0.06853955239057541,
-0.2809600234031677,
-0.271159291267395,
-0.09888044744729996,
-0.22124478220939636,
0.25325047969818115,
0.6047787070274353,
0.2968129515647888,
0.8350995779037476,
0.10697408020496368,
0.18188248574733734,
-0.038749389350414276,
-0.017139030620455742,
0.051924169063568115,
0.014879390597343445,
-0.20782166719436646,
-0.16370615363121033,
-0.22220009565353394,
-0.0640081986784935,
0.16981159150600433,
0.14351925253868103,
-0.5510615706443787,
0.0033134818077087402,
0.11104865372180939,
-0.1422189325094223,
-0.3159613609313965,
0.25711703300476074,
0.03880804404616356,
0.15499132871627808,
0.32174795866012573,
0.18412694334983826,
-0.4510052502155304,
-0.4142399728298187,
-0.020976027473807335,
-0.14429615437984467,
0.004287786781787872,
-0.19054065644741058,
-0.6768004298210144,
-0.18208390474319458,
-0.7496144771575928,
0.27242594957351685,
0.12838681042194366,
0.10444702208042145,
0.2136634737253189,
-0.25611504912376404,
0.2302793711423874,
-0.14937926828861237,
0.6817165017127991,
-0.1297956109046936,
-0.2012694627046585,
0.21354468166828156,
0.06318266689777374,
-0.6210015416145325,
0.20860238373279572,
-0.059442270547151566,
0.1769920289516449,
0.11928300559520721,
0.49898672103881836,
-0.5984187722206116,
-0.24230562150478363,
0.029548268765211105,
0.12552592158317566,
-0.15673893690109253,
0.09660940617322922,
-0.011224444955587387,
-0.3419356346130371,
-0.19495153427124023,
0.2824055552482605,
0.0686623752117157,
0.13674981892108917,
0.41770774126052856,
0.019761912524700165,
0.12511923909187317,
-0.041703931987285614,
0.07638432085514069,
0.4052553176879883,
-0.011933781206607819,
0.2226390242576599,
0.06382986903190613,
0.339408814907074,
-0.30687615275382996,
-0.01538274995982647,
0.0988522469997406,
-0.07767261564731598,
-0.17325201630592346,
-0.005254920572042465,
0.06738457083702087,
0.29342326521873474,
0.5596973299980164,
0.023644015192985535,
0.3625146448612213,
-0.13494984805583954,
0.20423784852027893,
-0.06893102079629898,
0.008607864379882812,
-0.19271060824394226,
-0.02981468290090561,
-0.30973851680755615,
-0.31036728620529175,
0.3756297826766968,
0.2721708118915558,
-0.29792067408561707,
0.6662805676460266,
0.1824178695678711,
-0.2572314143180847,
0.4809883236885071,
0.3857996165752411,
0.9818715453147888,
-0.4391019940376282,
0.19446679949760437,
0.06567507237195969,
0.12380799651145935,
0.4268318712711334,
-0.3922564387321472,
0.2636389136314392,
-0.22777803242206573,
-0.015603822655975819,
-0.04823931306600571,
-0.06632446497678757,
-0.14529651403427124,
0.23819951713085175,
0.12758716940879822,
0.16841796040534973,
-0.10420257598161697,
0.5085715651512146,
0.06848885864019394,
0.1353708654642105,
0.2738373875617981,
-0.5243557691574097,
-0.12508496642112732,
-0.015376286581158638,
-0.0862964540719986,
-0.2240329384803772,
0.029722709208726883,
0.3337562084197998,
-0.1380545049905777,
-0.3959973454475403,
-0.2638474702835083,
-0.27800774574279785,
-0.1923874318599701,
0.032511670142412186,
-0.1721453219652176,
-0.058266445994377136,
-0.15273573994636536,
-0.07717370986938477,
-0.3341745138168335,
0.08372019231319427,
0.10585375875234604,
0.14384832978248596,
0.4252271056175232,
0.30695998668670654,
0.18274135887622833,
-0.158641517162323,
0.09969190508127213,
0.0837215930223465,
-0.01026933640241623,
0.1840323507785797,
-0.07197067141532898,
-0.371984601020813,
-0.29964882135391235,
0.13728195428848267,
0.5914363861083984,
0.027499819174408913,
-0.006854739040136337,
-0.08930559456348419,
0.1800948679447174,
-0.2673332691192627,
-0.03233889490365982,
-0.1305837333202362,
0.031047038733959198,
0.41023924946784973,
-0.051787134259939194,
-0.20978191494941711,
0.011497432366013527,
0.36101797223091125,
0.2665201723575592,
0.06272149085998535,
0.24239537119865417,
-0.08362165093421936,
-0.5424603819847107,
-0.05976242572069168,
-0.029894094914197922,
0.14598235487937927,
-0.02430400252342224,
0.008240099996328354,
-0.3483138978481293,
-0.10901911556720734,
-0.04364308342337608,
0.19708721339702606,
-0.10892750322818756,
-0.019323885440826416,
-0.23480482399463654,
-0.4801251292228699,
-0.10040690004825592,
0.41244059801101685,
0.13636374473571777,
0.11011460423469543,
0.025563813745975494,
-0.10330012440681458,
-0.4717288613319397,
0.421845018863678,
-0.16112998127937317,
-0.1528005748987198,
-0.08249782770872116,
0.4136497378349304,
-0.05257853865623474,
0.29954993724823,
-0.08344065397977829,
-0.12783873081207275,
0.04044737666845322,
-0.015747584402561188,
0.006028322968631983,
-0.10822217911481857,
-0.018025659024715424,
0.2158908098936081,
-0.15201729536056519,
-0.17676948010921478,
0.15950728952884674,
-0.16101059317588806,
-0.128353089094162,
-0.4170396029949188,
0.2688872218132019,
0.07391414046287537,
-0.02479974925518036,
-0.29301679134368896,
0.37559980154037476,
-0.10985661298036575,
-0.08504079282283783,
0.18562740087509155,
-0.0925678163766861,
-0.04416288435459137,
0.13147833943367004,
0.3624937832355499,
0.016375690698623657,
0.10233913362026215,
-0.021215099841356277,
0.18304020166397095,
0.07649078965187073,
-0.2310965657234192,
0.029805470257997513,
0.05794359743595123,
-0.02447187714278698,
0.243353471159935,
0.17060275375843048,
0.33925965428352356,
-0.11478212475776672,
-0.06809034943580627,
0.40510931611061096,
0.009043442085385323,
-0.23173630237579346,
-0.31608495116233826,
0.4245138168334961,
-0.15971343219280243,
0.20717701315879822,
0.3458244502544403,
0.004767719656229019,
0.07888983190059662,
0.017280928790569305,
-0.20250126719474792,
0.6030322909355164,
-0.2612035870552063,
-0.24814867973327637,
0.3932274580001831,
0.23674048483371735,
-0.14057637751102448,
0.15251748263835907,
0.196187824010849,
-0.10341308265924454,
0.20997755229473114,
0.013410374522209167,
0.21174970269203186,
0.14338216185569763,
0.049501363188028336,
-0.45718273520469666,
-0.13904817402362823,
0.07195258140563965,
0.4697219133377075,
-0.08022886514663696,
0.09910248219966888,
0.1034100130200386,
-0.13756152987480164,
0.5090917944908142,
-0.148508682847023,
0.23942548036575317,
0.29187875986099243,
0.05182981491088867,
-0.2284318506717682,
-0.38810253143310547,
-0.2717406451702118,
0.08874259889125824,
0.04316407069563866,
-0.08770158886909485,
-0.3937126398086548,
0.4382045567035675,
0.031719084829092026,
0.18059277534484863,
-0.44977861642837524,
0.08546236157417297,
-0.2634504437446594,
0.3338371813297272,
-0.21528156101703644,
0.05290812626481056,
-0.4307363033294678,
0.2762869596481323,
0.039721086621284485,
-0.30555057525634766,
0.170583114027977,
0.2844313979148865,
-0.058019574731588364,
-0.11178487539291382,
-0.2988744080066681,
-0.1893376111984253,
-0.07499636709690094,
0.03066619671881199,
0.07248376309871674,
-0.020262721925973892,
-0.03777705132961273,
-0.06162448227405548,
-0.04316447302699089,
-0.2216571420431137,
0.3707211911678314,
0.15568314492702484,
-0.0224829763174057,
-0.1269093155860901,
0.14489638805389404,
-0.3175267279148102,
0.10324732214212418,
-0.16582775115966797,
0.26757556200027466,
0.06877496838569641,
0.04336373135447502,
-0.1203853189945221,
0.19010737538337708,
-0.001694116392172873,
0.009762486442923546,
0.008538833819329739,
0.20752795040607452,
-0.039188455790281296,
-0.06591716408729553,
-0.184433251619339,
-0.2827777564525604,
-0.542422890663147,
-0.07852790504693985,
-0.678316593170166,
-0.4402121305465698,
0.3769555985927582,
0.2896394729614258,
0.47995448112487793,
0.3359670639038086,
-0.037375614047050476,
-0.19879741966724396,
-0.301608145236969,
0.3532309830188751,
-0.15487390756607056,
0.3796236515045166,
-0.09482137858867645,
0.06966766715049744,
-0.046130500733852386,
-0.5607625842094421,
0.30275869369506836,
-0.06474493443965912,
-0.09203191101551056,
-0.011949017643928528,
0.10742908716201782,
0.2510437071323395,
0.1420670449733734,
0.26618683338165283,
-0.1468736231327057,
0.15011638402938843,
0.06659785658121109,
0.10737837105989456,
-0.16706015169620514,
0.3415958285331726,
-0.5109818577766418,
0.1398371458053589,
-0.035484086722135544,
0.2615736126899719,
-0.10154862701892853,
-0.14987388253211975,
-0.06442248821258545,
0.048589352518320084,
-0.17079390585422516,
-0.15904255211353302,
0.17941977083683014,
0.1091797724366188,
0.1894635260105133,
0.23570920526981354,
-0.31554538011550903,
-0.01147150993347168,
-0.02223556488752365,
0.13989447057247162,
-0.27802473306655884,
-0.22211842238903046,
0.5493470430374146,
-0.8324962854385376,
-0.4792652428150177,
-0.16539235413074493,
0.07010692358016968,
-0.06419561058282852,
-0.1915351152420044,
-0.1486913561820984,
-0.3194428086280823,
0.25890156626701355,
-0.17351862788200378,
-0.30300018191337585,
0.043629344552755356,
0.06909922510385513,
-0.21173253655433655,
-0.32540959119796753,
-0.04797893017530441,
0.0009031258523464203,
-0.1098848283290863,
-0.5369402766227722,
-0.5348819494247437
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | Looks like a great direction :)
Note that `query_table` doesn't bring data into memory. Only `format_table` does.
Also the dataset may already have a format with `columns=` already defined so we would need to define the formatted `input_dataset` like:
```python
# before the `map` main for loop
input_columns = input_columns if input_columns is not None else self.column_names
if not self._output_all_columns:
columns = [col for col in input_columns if self._format_columns is None or col in self._format_columns]
input_dataset = self.with_format(
type=self._format_type,
columns=columns
)
else:
# in this case we could find a way to filter both format_columns and unformatted columns eventually
input_dataset = self
# then input_dataset can be used in the main for loop of `map`
```
EDIT: oh and regarding streaming format versus file format for arrow, we plan to start using the file format #1933 at one point (though I'm not sure if it would improve performance) | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 148 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
Looks like a great direction :)
Note that `query_table` doesn't bring data into memory. Only `format_table` does.
Also the dataset may already have a format with `columns=` already defined so we would need to define the formatted `input_dataset` like:
```python
# before the `map` main for loop
input_columns = input_columns if input_columns is not None else self.column_names
if not self._output_all_columns:
columns = [col for col in input_columns if self._format_columns is None or col in self._format_columns]
input_dataset = self.with_format(
type=self._format_type,
columns=columns
)
else:
# in this case we could find a way to filter both format_columns and unformatted columns eventually
input_dataset = self
# then input_dataset can be used in the main for loop of `map`
```
EDIT: oh and regarding streaming format versus file format for arrow, we plan to start using the file format #1933 at one point (though I'm not sure if it would improve performance) | [
-0.12052275240421295,
0.2916715145111084,
-0.006857838481664658,
-0.1955765038728714,
0.11129971593618393,
-0.10715067386627197,
0.2545415759086609,
0.5994861125946045,
0.20434807240962982,
-0.028511226177215576,
-0.03400079160928726,
0.47935378551483154,
0.02173737995326519,
-0.21316994726657867,
0.020491553470492363,
0.22573620080947876,
0.1094411090016365,
0.354947566986084,
0.25419825315475464,
0.09662054479122162,
-0.15383949875831604,
-0.19829121232032776,
-0.18365609645843506,
-0.10879151523113251,
-0.07374636828899384,
-0.013257177546620369,
0.14677709341049194,
-0.3689957857131958,
-0.32876312732696533,
-0.15713416039943695,
0.2981295883655548,
0.33511656522750854,
-0.15111027657985687,
0.11530931293964386,
-0.0001276158436667174,
-0.021964043378829956,
-0.003913935273885727,
-0.052566200494766235,
-0.18306776881217957,
-0.05912090837955475,
0.12850221991539001,
-0.21012777090072632,
0.07958905398845673,
-0.2305578589439392,
0.020480480045080185,
-0.088620625436306,
0.02888914942741394,
-0.07368889451026917,
0.014810286462306976,
-0.1144910454750061,
0.02618005871772766,
-0.08333499729633331,
-0.31166234612464905,
0.2302703708410263,
0.44932034611701965,
0.19989487528800964,
0.0042839813977479935,
-0.16191096603870392,
0.28943300247192383,
-0.40111202001571655,
-0.11722780019044876,
0.5342759490013123,
-0.49632254242897034,
-0.024185635149478912,
0.36178237199783325,
0.02337435632944107,
0.013498872518539429,
-0.19790413975715637,
0.3108479678630829,
0.1128363236784935,
0.2250443994998932,
-0.3431988060474396,
-0.10860490798950195,
-0.22927120327949524,
-0.08387624472379684,
-0.26941588521003723,
-0.06521482020616531,
0.05857871472835541,
-0.4512803852558136,
-0.00890294462442398,
-0.2625634968280792,
-0.2576967179775238,
-0.09915722906589508,
0.40923869609832764,
-0.5199318528175354,
0.43219873309135437,
0.16466256976127625,
0.2750135362148285,
0.19866856932640076,
-0.21954526007175446,
-0.04318151995539665,
-0.029707346111536026,
0.3957515358924866,
0.5969603061676025,
-0.40202823281288147,
-0.2055865228176117,
0.13781923055648804,
-0.023900717496871948,
0.23022910952568054,
-0.22873251140117645,
-0.16782760620117188,
0.393246054649353,
0.3833606541156769,
0.10297992825508118,
0.3581872880458832,
0.006378604099154472,
-0.0522427037358284,
0.6364862322807312,
0.3577842712402344,
-0.1339597851037979,
0.10196647047996521,
0.06394172459840775,
-0.032211724668741226,
0.344474732875824,
0.2406601756811142,
-0.3781088590621948,
-0.16421277821063995,
-0.17267175018787384,
0.001642916351556778,
-0.004870007745921612,
-0.20481127500534058,
0.05032350495457649,
0.07547716051340103,
0.45366746187210083,
0.25887131690979004,
0.2259848415851593,
-0.17843866348266602,
0.011035637930035591,
-0.21883822977542877,
0.06811240315437317,
0.0662756860256195,
0.05885550379753113,
-0.059432800859212875,
0.22035862505435944,
0.17251862585544586,
0.19755755364894867,
-0.13922417163848877,
0.03587731346487999,
-0.0783819705247879,
0.09631344676017761,
-0.0028509004041552544,
-0.23589718341827393,
0.3039044439792633,
0.4720260500907898,
-0.12103627622127533,
0.37928569316864014,
0.23755773901939392,
-0.21672409772872925,
-0.3476656973361969,
0.3116397261619568,
-0.1199536994099617,
-0.19913633167743683,
0.11784983426332474,
-0.03989996388554573,
-0.10225179046392441,
0.3331950008869171,
-0.08386924117803574,
0.614460289478302,
0.36248764395713806,
-0.1243358701467514,
-0.1075509712100029,
-0.13454709947109222,
-0.32340484857559204,
-0.21820269525051117,
0.37306123971939087,
-0.03776787221431732,
-0.4412722885608673,
-0.22633133828639984,
-0.15039820969104767,
0.28707823157310486,
0.4017948508262634,
0.32838284969329834,
-0.10411100089550018,
0.14481061697006226,
0.3399393856525421,
0.40920454263687134,
0.5807514190673828,
0.0020426996052265167,
-0.5462443828582764,
0.058696113526821136,
-0.16783663630485535,
0.10423506051301956,
-0.15507766604423523,
0.3828924000263214,
0.6717817783355713,
0.19354486465454102,
0.3389425575733185,
0.20511271059513092,
-0.09297365695238113,
0.2500668168067932,
-0.08526249974966049,
-0.10954875499010086,
0.19743818044662476,
0.12172110378742218,
0.007749013602733612,
-0.1483389437198639,
-0.009366042912006378,
0.03999564051628113,
0.02636813372373581,
-0.02510763332247734,
0.12141882628202438,
0.06461088359355927,
0.11716954410076141,
-0.07161620259284973,
0.08118857443332672,
-0.29459553956985474,
-0.29063883423805237,
0.07191720604896545,
0.4683176279067993,
0.1420728862285614,
-0.340886652469635,
-0.3782499432563782,
-0.1787261664867401,
0.14332835376262665,
0.40130436420440674,
0.13068175315856934,
-0.07834343612194061,
-0.32354849576950073,
0.223969966173172,
-0.16723816096782684,
-0.23481428623199463,
-0.14742645621299744,
-0.029437996447086334,
0.09883925318717957,
0.0033340975642204285,
0.002542668953537941,
0.2784743010997772,
-0.09763197600841522,
-0.032074782997369766,
-0.09488929063081741,
0.24820223450660706,
0.25851815938949585,
0.21770530939102173,
0.07546696066856384,
0.2817988991737366,
-0.16837559640407562,
-0.29044148325920105,
0.4979361295700073,
0.026438891887664795,
0.16843244433403015,
0.13036607205867767,
-0.2077956646680832,
0.18089666962623596,
-0.1695895493030548,
-0.4422304928302765,
0.3461419939994812,
0.1428612917661667,
0.6261829137802124,
0.03836248070001602,
0.08797146379947662,
0.1729707568883896,
0.015163581818342209,
-0.10294903814792633,
-0.3706107437610626,
0.024663209915161133,
0.06758011877536774,
-0.12962958216667175,
0.11757787317037582,
-0.028636258095502853,
0.2628380358219147,
0.24000731110572815,
-0.07574637234210968,
0.11830636113882065,
0.2568661570549011,
-0.12326493114233017,
-0.1520133912563324,
0.17834129929542542,
-0.16884995996952057,
0.016351133584976196,
0.17467951774597168,
0.13806641101837158,
-0.2322898507118225,
-0.17842067778110504,
0.0018266700208187103,
0.22318308055400848,
0.1911959946155548,
-0.15047411620616913,
-0.20710602402687073,
0.1783088892698288,
-0.07490445673465729,
-0.3234235346317291,
0.088271364569664,
-0.003070894628763199,
0.31330665946006775,
-0.22822977602481842,
-0.205206960439682,
-0.25554895401000977,
-0.19227707386016846,
0.3304748833179474,
-0.10145696997642517,
0.03953084722161293,
-0.25357913970947266,
0.31072843074798584,
0.1738024204969406,
0.08689968287944794,
0.23327480256557465,
-0.18452085554599762,
0.3074073791503906,
0.03289733827114105,
-0.2708677649497986,
-0.26493269205093384,
-0.4880027770996094,
0.06229173392057419,
-0.06600411236286163,
0.010512600652873516,
0.4343786835670471,
0.25810158252716064,
0.3665308356285095,
-0.2448256015777588,
-0.2507918179035187,
-0.3883436620235443,
0.07920680940151215,
-0.13655826449394226,
0.21668849885463715,
0.11664396524429321,
0.554726779460907,
-0.35385799407958984,
0.044388122856616974,
-0.013054688461124897,
-0.04749850183725357,
-0.06379344314336777,
0.17216449975967407,
-0.02477879822254181,
0.18523287773132324,
-0.09689310938119888,
0.2254285216331482,
0.08120829612016678,
-0.09634384512901306,
-0.12297679483890533,
-0.06446302682161331,
0.3656046986579895,
-0.37163615226745605,
-0.009851678274571896,
-0.29709479212760925,
-0.14275646209716797,
-0.13173066079616547,
-0.11919718980789185,
0.24556776881217957,
0.4853588044643402,
0.2650068700313568,
-0.05036511644721031,
-0.11518119275569916,
-0.10633356869220734,
-0.155970498919487,
0.6325246095657349,
-0.3378854990005493,
0.0153189143165946,
-0.23932276666164398,
0.02027713879942894,
0.16522976756095886,
0.12302631884813309,
0.45066073536872864,
-0.05206390097737312,
0.04759871959686279,
0.0480048805475235,
-0.29721328616142273,
-0.27801355719566345,
-0.0886455774307251,
-0.22167593240737915,
0.24245372414588928,
0.6447244882583618,
0.30336084961891174,
0.7878701090812683,
0.08383500576019287,
0.17958945035934448,
0.033537231385707855,
-0.061943419277668,
0.04759426787495613,
0.010166198015213013,
-0.21111254394054413,
-0.24001282453536987,
-0.20721429586410522,
-0.0753115639090538,
0.1416134238243103,
0.20633718371391296,
-0.545441746711731,
-0.05507278069853783,
0.16445717215538025,
-0.14033597707748413,
-0.30173924565315247,
0.32359567284584045,
0.06654930859804153,
0.19008009135723114,
0.35586225986480713,
0.14758628606796265,
-0.47593072056770325,
-0.44314444065093994,
-0.0849098265171051,
-0.11601686477661133,
0.0462111197412014,
-0.15501727163791656,
-0.6074302196502686,
-0.2667901813983917,
-0.7115898728370667,
0.2854959964752197,
0.07913277298212051,
0.1452512890100479,
0.21684063971042633,
-0.29473167657852173,
0.22040046751499176,
-0.09254220873117447,
0.6694390177726746,
-0.05208210647106171,
-0.2414197474718094,
0.14312323927879333,
-0.056140147149562836,
-0.6001131534576416,
0.21900595724582672,
-0.07699158042669296,
0.17233289778232574,
0.07564140856266022,
0.5250886678695679,
-0.5840336084365845,
-0.18273156881332397,
0.05842620134353638,
0.15711615979671478,
-0.1851092129945755,
0.05426457151770592,
-0.10853661596775055,
-0.34395813941955566,
-0.14713622629642487,
0.2608182430267334,
0.02822124771773815,
0.10797753185033798,
0.47378480434417725,
-0.019232623279094696,
0.06741807609796524,
-0.09038244932889938,
0.09660044312477112,
0.423126220703125,
-0.04352058097720146,
0.20961658656597137,
0.06815482676029205,
0.3000507056713104,
-0.3356434106826782,
-0.029400670900940895,
0.10678540170192719,
-0.025760270655155182,
-0.08099241554737091,
0.015473896637558937,
0.09735168516635895,
0.3004745841026306,
0.568304717540741,
0.034230805933475494,
0.3881698250770569,
-0.12950074672698975,
0.18782389163970947,
-0.13904188573360443,
0.003984048496931791,
-0.20062685012817383,
-0.0432828925549984,
-0.3406226634979248,
-0.39272210001945496,
0.3689994812011719,
0.3045244812965393,
-0.2760222554206848,
0.6531163454055786,
0.17056970298290253,
-0.20660483837127686,
0.45879513025283813,
0.3477596342563629,
1.019508719444275,
-0.5214760899543762,
0.1699346899986267,
0.03226354345679283,
0.14406467974185944,
0.36664682626724243,
-0.42509788274765015,
0.2500382959842682,
-0.1836034059524536,
-0.09549382328987122,
-0.05268489941954613,
-0.10696607828140259,
-0.10038983076810837,
0.1931835412979126,
0.12982754409313202,
0.14753159880638123,
-0.09916052222251892,
0.5432231426239014,
0.10066472738981247,
0.08518359065055847,
0.22509457170963287,
-0.442933052778244,
-0.15127050876617432,
-0.019622886553406715,
-0.047235384583473206,
-0.23599189519882202,
0.04169319570064545,
0.3622328042984009,
-0.15575189888477325,
-0.41614478826522827,
-0.2355290800333023,
-0.2978556156158447,
-0.2282816618680954,
-0.011371072381734848,
-0.22225981950759888,
-0.05331292375922203,
-0.21181318163871765,
-0.08183233439922333,
-0.40608251094818115,
0.14287236332893372,
0.1504829376935959,
0.09908634424209595,
0.4586839973926544,
0.2568596303462982,
0.10954201966524124,
-0.11785516887903214,
0.10199165344238281,
0.10328889638185501,
-0.011484026908874512,
0.2659313380718231,
-0.0809338241815567,
-0.3675950765609741,
-0.3423033356666565,
0.16436514258384705,
0.5911530256271362,
0.03401855379343033,
-0.062352076172828674,
-0.07984812557697296,
0.20688045024871826,
-0.21470004320144653,
-0.02935592085123062,
-0.1153370589017868,
0.05677357316017151,
0.39591801166534424,
0.009564373642206192,
-0.28553837537765503,
0.004000551998615265,
0.35448896884918213,
0.28554898500442505,
0.020834658294916153,
0.20448127388954163,
-0.1106402650475502,
-0.5134524703025818,
-0.042550403624773026,
-0.050671301782131195,
0.228165864944458,
0.0060097649693489075,
-0.012116058729588985,
-0.2796095013618469,
-0.0588049441576004,
-0.03627034276723862,
0.17618325352668762,
-0.04997202754020691,
-0.05294569581747055,
-0.19968178868293762,
-0.4386974573135376,
-0.018205983564257622,
0.4425364136695862,
0.1786850541830063,
0.10228269547224045,
0.053902141749858856,
-0.12543228268623352,
-0.4615597426891327,
0.4586753249168396,
-0.14862726628780365,
-0.192112997174263,
-0.09853445738554001,
0.4340786635875702,
-0.145181342959404,
0.3470754623413086,
-0.12421809881925583,
-0.12381654977798462,
0.05933946371078491,
-0.03725879639387131,
0.009996261447668076,
-0.11108171939849854,
0.0633869618177414,
0.23025794327259064,
-0.13802075386047363,
-0.12758265435695648,
0.06646323949098587,
-0.19674575328826904,
-0.12038406729698181,
-0.43937182426452637,
0.25628364086151123,
0.06789529323577881,
-0.0392499640583992,
-0.3404693305492401,
0.4545373022556305,
-0.16673144698143005,
-0.10421574115753174,
0.12598039209842682,
-0.17546114325523376,
-0.06434665620326996,
0.06911101192235947,
0.33985430002212524,
0.025319509208202362,
0.08688037097454071,
-0.0635237917304039,
0.17589335143566132,
0.07530957460403442,
-0.2827731668949127,
0.005880691111087799,
0.0976225882768631,
0.03371665999293327,
0.19959911704063416,
0.15742573142051697,
0.3863252103328705,
-0.10265521705150604,
-0.06373763829469681,
0.3855549991130829,
-0.001376185566186905,
-0.17560647428035736,
-0.28203117847442627,
0.37542158365249634,
-0.1159965917468071,
0.21123826503753662,
0.41109272837638855,
-0.015505470335483551,
0.13464820384979248,
0.03786361962556839,
-0.2541951537132263,
0.5481323003768921,
-0.18786980211734772,
-0.2755917012691498,
0.3920186161994934,
0.29210421442985535,
-0.1242123693227768,
0.11407771706581116,
0.22383412718772888,
-0.11094824224710464,
0.23146355152130127,
-0.03811381012201309,
0.2487492859363556,
0.1422787755727768,
0.040458329021930695,
-0.4667990505695343,
-0.12065823376178741,
0.03434371203184128,
0.4787985682487488,
-0.10200710594654083,
0.10823893547058105,
0.0011626183986663818,
-0.15337857604026794,
0.5385464429855347,
-0.09226902574300766,
0.16768449544906616,
0.2412598729133606,
0.08285968005657196,
-0.184939906001091,
-0.32710084319114685,
-0.2880988121032715,
0.06288670003414154,
0.02373025193810463,
-0.034603167325258255,
-0.3504159450531006,
0.4097351133823395,
0.04970204830169678,
0.22641706466674805,
-0.3599361479282379,
0.20243790745735168,
-0.23525020480155945,
0.2522643804550171,
-0.22114324569702148,
0.0708499625325203,
-0.47580480575561523,
0.2940939664840698,
0.10467417538166046,
-0.3440803289413452,
0.1097564771771431,
0.3184894919395447,
-0.01438019797205925,
-0.036772727966308594,
-0.2831403911113739,
-0.24731124937534332,
-0.12658219039440155,
0.08225084096193314,
0.04497814178466797,
0.04334614425897598,
-0.052230674773454666,
-0.0464489609003067,
-0.02632651850581169,
-0.2710568904876709,
0.3402979075908661,
0.183048814535141,
-0.01854722574353218,
-0.11848584562540054,
0.09440261125564575,
-0.2621902823448181,
0.12251503020524979,
-0.10878356546163559,
0.2234492003917694,
0.06298018246889114,
0.0031003830954432487,
-0.18631497025489807,
0.15444576740264893,
0.064211905002594,
0.0005110837519168854,
0.006081447005271912,
0.20941464602947235,
-0.08612354099750519,
0.02055983617901802,
-0.2128865271806717,
-0.35771095752716064,
-0.46259886026382446,
-0.0634595975279808,
-0.7106279134750366,
-0.42468398809432983,
0.36018452048301697,
0.2865707576274872,
0.4639974534511566,
0.34937334060668945,
-0.07300755381584167,
-0.19681838154792786,
-0.4219461977481842,
0.4059286117553711,
-0.09408585727214813,
0.3259022831916809,
-0.09371645748615265,
0.121558777987957,
-0.09544184803962708,
-0.4906405210494995,
0.26633408665657043,
-0.14915291965007782,
-0.09301339089870453,
-0.03976723924279213,
0.061073169112205505,
0.27962857484817505,
0.22962501645088196,
0.26372820138931274,
-0.16265304386615753,
0.20277699828147888,
0.039021529257297516,
0.16178858280181885,
-0.12380808591842651,
0.3242391347885132,
-0.47122225165367126,
0.11854571104049683,
-0.05699684098362923,
0.16718131303787231,
-0.1209937334060669,
-0.15477848052978516,
-0.0034628533758223057,
0.07539856433868408,
-0.20156976580619812,
-0.13485196232795715,
0.24023765325546265,
0.09254701435565948,
0.19106411933898926,
0.235341876745224,
-0.3011476695537567,
0.0027840174734592438,
-0.016123265027999878,
0.1544586420059204,
-0.2255382239818573,
-0.20506435632705688,
0.48813360929489136,
-0.8047513961791992,
-0.4586588740348816,
-0.16682498157024384,
0.07457803189754486,
-0.05606003850698471,
-0.15887412428855896,
-0.16395756602287292,
-0.32095789909362793,
0.2653919756412506,
-0.11652762442827225,
-0.28810298442840576,
0.09568659961223602,
0.08980557322502136,
-0.1982935667037964,
-0.34108394384384155,
0.011486820876598358,
-0.05755838751792908,
-0.13200059533119202,
-0.5714483857154846,
-0.5315230488777161
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | Good to know about `query_table` not bringing anything into memory. I was under the impression that it did because a while back I looked at my `map` operation in pdb and it looked like it was spending forever in line 93 of formatting.py, `return pa.concat_tables(....)`, although that was before the `fast_slice` interpolation search was implemented, so it may have had more to do with the slow ChunkedArray slice implementation than anything else.
If `query_table` is I/O free then the fix may be as simple as just adding this to line 1779 of arrow_dataset.py:
```python
# Only load the columns we actually need
if input_columns:
stack.enter_context(self.formatted_as(
self._format_type,
columns=input_columns,
output_all_columns=False,
**self._format_kwargs
))
```
It's not clear to me why the `[col for col in input_columns if self._format_columns is None or col in self._format_columns]` check would be necessaryβ it seems like either `input_columns` should simply temporarily override the `_format_columns` within the `map` operation, or we should throw an error if there are any conflicts. Currently it doesn't look like this case is checked for at all within `map`, but maybe I'm just missing it. | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 181 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
Good to know about `query_table` not bringing anything into memory. I was under the impression that it did because a while back I looked at my `map` operation in pdb and it looked like it was spending forever in line 93 of formatting.py, `return pa.concat_tables(....)`, although that was before the `fast_slice` interpolation search was implemented, so it may have had more to do with the slow ChunkedArray slice implementation than anything else.
If `query_table` is I/O free then the fix may be as simple as just adding this to line 1779 of arrow_dataset.py:
```python
# Only load the columns we actually need
if input_columns:
stack.enter_context(self.formatted_as(
self._format_type,
columns=input_columns,
output_all_columns=False,
**self._format_kwargs
))
```
It's not clear to me why the `[col for col in input_columns if self._format_columns is None or col in self._format_columns]` check would be necessaryβ it seems like either `input_columns` should simply temporarily override the `_format_columns` within the `map` operation, or we should throw an error if there are any conflicts. Currently it doesn't look like this case is checked for at all within `map`, but maybe I'm just missing it. | [
-0.10460568964481354,
0.3224443793296814,
-0.01583399809896946,
-0.18998326361179352,
0.09967689961194992,
-0.09264656901359558,
0.22558394074440002,
0.5739008784294128,
0.1345910280942917,
-0.005185894668102264,
-0.09151377528905869,
0.45793217420578003,
0.07698608934879303,
-0.23750707507133484,
0.007108272984623909,
0.25679096579551697,
0.09782643616199493,
0.35708630084991455,
0.3204876780509949,
0.11953732371330261,
-0.19448865950107574,
-0.20110373198986053,
-0.16716913878917694,
-0.09311200678348541,
-0.10439634323120117,
-0.06725024431943893,
0.1529693454504013,
-0.3571104109287262,
-0.3311983644962311,
-0.1571364402770996,
0.28276288509368896,
0.32016900181770325,
-0.20160621404647827,
0.12886352837085724,
-0.00012684197281487286,
-0.05011175945401192,
0.009109947830438614,
-0.020821982994675636,
-0.1327056735754013,
0.018961437046527863,
0.20414245128631592,
-0.21844711899757385,
0.07863487303256989,
-0.2216877043247223,
0.05270937830209732,
-0.061387959867715836,
0.021483048796653748,
-0.029898662120103836,
-0.021624520421028137,
-0.08220185339450836,
0.033135972917079926,
-0.05274352803826332,
-0.3226948082447052,
0.21149487793445587,
0.479737788438797,
0.1571221947669983,
0.02350444905459881,
-0.21265141665935516,
0.28920769691467285,
-0.4368455111980438,
-0.12707483768463135,
0.5308564901351929,
-0.5316396951675415,
-0.04649517312645912,
0.34276270866394043,
0.049161095172166824,
0.002218581736087799,
-0.20073240995407104,
0.358323335647583,
0.05180884525179863,
0.1605585813522339,
-0.296064168214798,
-0.08982177823781967,
-0.22263428568840027,
-0.08413843810558319,
-0.21704664826393127,
-0.06649277359247208,
0.054209671914577484,
-0.45619121193885803,
-0.018268819898366928,
-0.2613743841648102,
-0.2506408393383026,
-0.05236824229359627,
0.31579646468162537,
-0.518673300743103,
0.42360711097717285,
0.17050641775131226,
0.24595379829406738,
0.30763402581214905,
-0.21117712557315826,
-0.042785461992025375,
0.007803741842508316,
0.40944749116897583,
0.5418297648429871,
-0.38829001784324646,
-0.14470736682415009,
0.21660923957824707,
-0.004607543349266052,
0.24405041337013245,
-0.27818793058395386,
-0.17832224071025848,
0.3794896602630615,
0.4178124964237213,
0.09228462725877762,
0.37315088510513306,
0.057214025408029556,
-0.1314656138420105,
0.6420700550079346,
0.36682695150375366,
-0.15928734838962555,
0.08979099988937378,
0.08275368809700012,
0.043435752391815186,
0.3798615038394928,
0.1911717653274536,
-0.4334312975406647,
-0.18476882576942444,
-0.1714392900466919,
-0.025348573923110962,
-0.008487933315336704,
-0.1762731671333313,
0.11743853986263275,
0.085548534989357,
0.489179402589798,
0.23161102831363678,
0.225786954164505,
-0.16786275804042816,
-0.04057922214269638,
-0.2845213711261749,
0.07346304506063461,
0.028069794178009033,
0.03451324999332428,
-0.05123530328273773,
0.23070113360881805,
0.16014878451824188,
0.18309953808784485,
-0.16461212933063507,
0.015262565575540066,
-0.07226358354091644,
0.11571767926216125,
-0.010124330408871174,
-0.27999791502952576,
0.3596169054508209,
0.515150785446167,
-0.15935102105140686,
0.34642329812049866,
0.21702559292316437,
-0.2327198088169098,
-0.34889674186706543,
0.3377684950828552,
-0.13245627284049988,
-0.2263547033071518,
0.148690864443779,
-0.037489064037799835,
-0.06696777045726776,
0.33397069573402405,
-0.03965146094560623,
0.6287928819656372,
0.39451396465301514,
-0.15952320396900177,
-0.137729674577713,
-0.14159153401851654,
-0.36312657594680786,
-0.2324799746274948,
0.4056430459022522,
0.00620424747467041,
-0.4137154221534729,
-0.26687973737716675,
-0.12628936767578125,
0.32572150230407715,
0.4485499858856201,
0.41730353236198425,
-0.06875225156545639,
0.1465698778629303,
0.3328171372413635,
0.44063907861709595,
0.490185409784317,
0.010949619114398956,
-0.5700110793113708,
0.04050818458199501,
-0.1876830756664276,
0.09027308970689774,
-0.14751920104026794,
0.3816784620285034,
0.6364924907684326,
0.23774974048137665,
0.35492751002311707,
0.17790207266807556,
-0.08553323149681091,
0.261348158121109,
-0.16568775475025177,
-0.11751291900873184,
0.24431940913200378,
0.10286013782024384,
0.06803734600543976,
-0.17263242602348328,
-0.0305090993642807,
0.03170204162597656,
0.023410290479660034,
0.02583601325750351,
0.0950573980808258,
0.09408414363861084,
0.1272764950990677,
-0.05848884582519531,
0.08461213856935501,
-0.2734278738498688,
-0.22152245044708252,
0.0759866014122963,
0.42187562584877014,
0.18084320425987244,
-0.3522834777832031,
-0.35395538806915283,
-0.14674916863441467,
0.1585351675748825,
0.3680203855037689,
0.08255986124277115,
-0.06505678594112396,
-0.31809020042419434,
0.19617943465709686,
-0.13268856704235077,
-0.22652561962604523,
-0.14267393946647644,
-0.052441567182540894,
0.05991826951503754,
-0.061049144715070724,
-0.030826386064291,
0.20684900879859924,
-0.10801922529935837,
-0.07473239302635193,
-0.04085469990968704,
0.19792252779006958,
0.3113130033016205,
0.17737862467765808,
0.057352855801582336,
0.27712464332580566,
-0.2035665065050125,
-0.21854358911514282,
0.49615412950515747,
0.03985810652375221,
0.10942763090133667,
0.14926400780677795,
-0.2200751155614853,
0.132261261343956,
-0.20093736052513123,
-0.41131463646888733,
0.30364131927490234,
0.12084347009658813,
0.6467670798301697,
0.045671477913856506,
0.03941319137811661,
0.1866070032119751,
0.0499049611389637,
-0.020906779915094376,
-0.34670618176460266,
0.055941592901945114,
0.1037929505109787,
-0.09000809490680695,
0.18547622859477997,
0.025499612092971802,
0.273661345243454,
0.2416229099035263,
-0.06393367052078247,
0.08693103492259979,
0.2822878062725067,
-0.09844530373811722,
-0.2455403208732605,
0.19200590252876282,
-0.24862389266490936,
0.02682497352361679,
0.21370144188404083,
0.18587325513362885,
-0.2289257049560547,
-0.17501404881477356,
-0.01324504241347313,
0.20935265719890594,
0.21646679937839508,
-0.18569669127464294,
-0.2287490963935852,
0.19396421313285828,
-0.05169476196169853,
-0.31808122992515564,
0.11752566695213318,
-0.06449522823095322,
0.2998575270175934,
-0.22731603682041168,
-0.210518941283226,
-0.25035735964775085,
-0.1601746380329132,
0.3770166337490082,
-0.07508625835180283,
-0.012998111546039581,
-0.28623297810554504,
0.34276890754699707,
0.12383919954299927,
0.11249284446239471,
0.21138539910316467,
-0.210243821144104,
0.3423674702644348,
0.027517152950167656,
-0.24963174760341644,
-0.2695375978946686,
-0.5140575170516968,
0.030020471662282944,
-0.06442289054393768,
-0.0016973894089460373,
0.4669361114501953,
0.21703121066093445,
0.3613245487213135,
-0.24680005013942719,
-0.1738605499267578,
-0.40385979413986206,
0.05816051363945007,
-0.1109810620546341,
0.26049545407295227,
0.10978955775499344,
0.481425940990448,
-0.364549458026886,
0.0615466833114624,
-0.0480230450630188,
-0.11582765728235245,
-0.06755536049604416,
0.15092603862285614,
-0.04203018918633461,
0.18658514320850372,
-0.07373785972595215,
0.22565791010856628,
0.06641308963298798,
-0.10363973677158356,
-0.06742022931575775,
-0.1274871826171875,
0.3572295904159546,
-0.31416431069374084,
-0.01752362586557865,
-0.217801034450531,
-0.13747544586658478,
-0.08864005655050278,
-0.13166624307632446,
0.29063957929611206,
0.41225337982177734,
0.2820616364479065,
-0.02566460892558098,
-0.1306437849998474,
-0.08310208469629288,
-0.14896447956562042,
0.5557097792625427,
-0.3557239770889282,
0.07620184123516083,
-0.23891304433345795,
0.055539172142744064,
0.11537494510412216,
0.13210703432559967,
0.4308941662311554,
-0.04463961720466614,
0.035833850502967834,
0.07261001318693161,
-0.33850017189979553,
-0.2934175133705139,
-0.045460157096385956,
-0.18588319420814514,
0.2047915756702423,
0.584362804889679,
0.2935066223144531,
0.7721477150917053,
0.07335609197616577,
0.21708878874778748,
0.012930791825056076,
-0.016837196424603462,
0.09953346848487854,
-0.06756719201803207,
-0.2521341145038605,
-0.2696582078933716,
-0.20660734176635742,
-0.151266410946846,
0.1877737194299698,
0.23099085688591003,
-0.5564441680908203,
-0.06220369413495064,
0.13384392857551575,
-0.08983631432056427,
-0.2923489809036255,
0.3094571828842163,
0.13778281211853027,
0.16177135705947876,
0.36744311451911926,
0.14568710327148438,
-0.46371451020240784,
-0.4544994533061981,
-0.0988752692937851,
-0.17026914656162262,
0.01690574735403061,
-0.19578364491462708,
-0.5587356686592102,
-0.28245776891708374,
-0.7603419423103333,
0.2780366539955139,
0.08030810952186584,
0.14720986783504486,
0.16199924051761627,
-0.3202677071094513,
0.24655719101428986,
-0.071415975689888,
0.6872803568840027,
-0.010419264435768127,
-0.3197705149650574,
0.16508060693740845,
-0.039980947971343994,
-0.5558204650878906,
0.2617914080619812,
-0.07538273930549622,
0.16205301880836487,
0.11876221001148224,
0.5174381136894226,
-0.5288394093513489,
-0.1607712358236313,
0.06496402621269226,
0.14068320393562317,
-0.18296192586421967,
0.08201827108860016,
-0.1768849641084671,
-0.4218448996543884,
-0.07693558186292648,
0.28296712040901184,
0.033543527126312256,
0.09010649472475052,
0.45620042085647583,
-0.03889838978648186,
0.11347326636314392,
-0.10310789197683334,
0.10045603662729263,
0.3970746695995331,
-0.030770044773817062,
0.16569548845291138,
0.05278300866484642,
0.32277947664260864,
-0.34913304448127747,
-0.011340348049998283,
0.1368066519498825,
-0.11601866781711578,
-0.02721269428730011,
0.015186211094260216,
0.10748551785945892,
0.3381060063838959,
0.593218207359314,
0.03594415634870529,
0.38886040449142456,
-0.13041743636131287,
0.19237913191318512,
-0.11431942135095596,
-0.02365291677415371,
-0.18409645557403564,
-0.0883665606379509,
-0.27212339639663696,
-0.3375442624092102,
0.34023207426071167,
0.2814842164516449,
-0.2885202169418335,
0.6071958541870117,
0.14755253493785858,
-0.1815360188484192,
0.47967004776000977,
0.36669740080833435,
1.05464768409729,
-0.546789288520813,
0.19068917632102966,
0.007026761770248413,
0.12272995710372925,
0.3516569137573242,
-0.437502920627594,
0.2877718210220337,
-0.17263683676719666,
-0.18599608540534973,
0.0071150679141283035,
-0.09533335268497467,
-0.12119797617197037,
0.16274714469909668,
0.12644338607788086,
0.11715108156204224,
-0.05591163784265518,
0.5475068688392639,
0.10610891133546829,
0.04349995404481888,
0.2786797881126404,
-0.4434574544429779,
-0.177891343832016,
-0.00172334723174572,
-0.011087559163570404,
-0.2943689525127411,
0.028158515691757202,
0.39081162214279175,
-0.14668861031532288,
-0.37290579080581665,
-0.2168046534061432,
-0.2689221203327179,
-0.2742672860622406,
0.0710577443242073,
-0.23829180002212524,
0.010642021894454956,
-0.25624191761016846,
-0.0652531087398529,
-0.4524877667427063,
0.12398481369018555,
0.14305315911769867,
0.09363304078578949,
0.4910556674003601,
0.29330945014953613,
0.16947315633296967,
-0.09471861273050308,
0.09995615482330322,
0.08821918815374374,
-0.04905109107494354,
0.2174968421459198,
-0.11559492349624634,
-0.38449299335479736,
-0.3565833270549774,
0.19572430849075317,
0.5410516262054443,
0.053535476326942444,
-0.013500070199370384,
-0.0737212598323822,
0.20040829479694366,
-0.20427481830120087,
-0.01769302412867546,
-0.10412952303886414,
0.026419049128890038,
0.4646100401878357,
-0.008595652878284454,
-0.32433295249938965,
-0.015190906822681427,
0.38583770394325256,
0.2920016348361969,
0.05628369003534317,
0.18586058914661407,
-0.12349390983581543,
-0.5478105545043945,
-0.0282437801361084,
-0.03001514822244644,
0.18066105246543884,
0.05692591518163681,
0.004683400504291058,
-0.2886972427368164,
-0.10330075025558472,
-0.002499709138646722,
0.14980506896972656,
-0.012430891394615173,
-0.13625064492225647,
-0.2823069095611572,
-0.3563694953918457,
-0.06862849742174149,
0.43477433919906616,
0.206235870718956,
0.10381290316581726,
0.058077722787857056,
-0.16955216228961945,
-0.42562729120254517,
0.5064361691474915,
-0.1533578336238861,
-0.21737965941429138,
-0.16000677645206451,
0.4036403298377991,
-0.21677947044372559,
0.2944272458553314,
-0.08082207292318344,
-0.11727501451969147,
0.0371398851275444,
0.009844088926911354,
0.028614893555641174,
-0.11566825211048126,
0.12212355434894562,
0.23823639750480652,
-0.16403788328170776,
-0.09122257679700851,
0.032915398478507996,
-0.17311641573905945,
-0.12819430232048035,
-0.4739850163459778,
0.25477421283721924,
0.08115755021572113,
-0.010522648692131042,
-0.3706907331943512,
0.4491293132305145,
-0.1695685088634491,
-0.04717075824737549,
0.17144668102264404,
-0.18174272775650024,
-0.0698385238647461,
0.0787624716758728,
0.3315684199333191,
0.007250042632222176,
0.0656057596206665,
-0.021031392738223076,
0.20764613151550293,
0.05543236806988716,
-0.32469409704208374,
-0.030075140297412872,
0.0958474650979042,
-0.019771410152316093,
0.20344600081443787,
0.12490160763263702,
0.41916465759277344,
-0.06376921385526657,
-0.08184237033128738,
0.36506617069244385,
-0.009415937587618828,
-0.142835795879364,
-0.30405035614967346,
0.4143344461917877,
-0.15001274645328522,
0.16023631393909454,
0.4338814914226532,
0.04634537920355797,
0.1727837324142456,
0.04264203459024429,
-0.23135173320770264,
0.5329796075820923,
-0.18978704512119293,
-0.28409844636917114,
0.37173283100128174,
0.2719360589981079,
-0.12131179869174957,
0.1473492681980133,
0.19205604493618011,
-0.06827602535486221,
0.25794315338134766,
-0.019837506115436554,
0.29733359813690186,
0.06910008192062378,
0.0615573488175869,
-0.4594769775867462,
-0.1466951221227646,
0.026891585439443588,
0.4805706739425659,
-0.15049156546592712,
0.13395121693611145,
-0.0326375737786293,
-0.05402535945177078,
0.4316009283065796,
-0.12162714451551437,
0.14981652796268463,
0.25681424140930176,
0.04158959165215492,
-0.17480877041816711,
-0.20707741379737854,
-0.2911297380924225,
0.03301993012428284,
0.035049330443143845,
0.019011568278074265,
-0.31098997592926025,
0.42859891057014465,
-0.003909021615982056,
0.15668800473213196,
-0.32974621653556824,
0.18220588564872742,
-0.26070982217788696,
0.28370869159698486,
-0.2353379875421524,
0.054507359862327576,
-0.49591881036758423,
0.3333553969860077,
0.07464633882045746,
-0.33061933517456055,
0.12002333998680115,
0.3252446949481964,
-0.04732201620936394,
-0.0790775790810585,
-0.259773313999176,
-0.25768542289733887,
-0.15746331214904785,
0.11377595365047455,
0.024979237467050552,
0.059885986149311066,
-0.08131679892539978,
-0.054057441651821136,
-0.02520969696342945,
-0.28185662627220154,
0.34969931840896606,
0.2898429334163666,
-0.0031586424447596073,
-0.11312062293291092,
0.07073814421892166,
-0.32565927505493164,
0.1132194772362709,
-0.10825823992490768,
0.20764568448066711,
0.09669484198093414,
-0.018765777349472046,
-0.23579347133636475,
0.152608722448349,
0.06162240728735924,
0.004491215571761131,
0.033620916306972504,
0.2721971273422241,
-0.06871846318244934,
0.0013844333589076996,
-0.2263072282075882,
-0.32189393043518066,
-0.43982797861099243,
-0.029200933873653412,
-0.6811190843582153,
-0.35653597116470337,
0.38247430324554443,
0.28353461623191833,
0.4024677276611328,
0.2974586486816406,
-0.08781075477600098,
-0.24262556433677673,
-0.3541279733181,
0.29836368560791016,
-0.10909588634967804,
0.34516027569770813,
-0.14177298545837402,
0.12899772822856903,
-0.0833110362291336,
-0.4821411669254303,
0.28967735171318054,
-0.11792732030153275,
-0.08865952491760254,
-0.060693830251693726,
0.05066633224487305,
0.276461660861969,
0.3113327622413635,
0.30395200848579407,
-0.12102152407169342,
0.19250372052192688,
0.02129640057682991,
0.13681720197200775,
-0.11409121751785278,
0.3005499243736267,
-0.4723968207836151,
0.08789364993572235,
-0.06722356379032135,
0.1004677414894104,
-0.12259060144424438,
-0.19783848524093628,
-0.0027770574670284986,
0.1293991208076477,
-0.16183221340179443,
-0.13654498755931854,
0.2370937466621399,
0.022122854366898537,
0.22471871972084045,
0.21712584793567657,
-0.28823474049568176,
-0.036039143800735474,
-0.01733497530221939,
0.15001767873764038,
-0.25279054045677185,
-0.20921066403388977,
0.5330387353897095,
-0.7193197011947632,
-0.4463276267051697,
-0.15953318774700165,
0.09141342341899872,
-0.0455702468752861,
-0.18438705801963806,
-0.21446609497070312,
-0.3904004693031311,
0.24215906858444214,
-0.09160834550857544,
-0.3103509843349457,
0.10910414159297943,
0.037169843912124634,
-0.19714218378067017,
-0.33414146304130554,
-0.009717784821987152,
-0.1004762127995491,
-0.10679509490728378,
-0.532439649105072,
-0.4777885675430298
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | `query_table` simply slices/concatenates parts of the table. The actual data inside the table is not brought in memory.
Also I'm more in favor of declaring `input_dataset = self.with_format(...)` since `formatted_as` may update the dataset fingerprint of `self`, which is not expected when someone runs `map`.
> It's not clear to me why the [col for col in input_columns if self._format_columns is None or col in self._format_columns] check would be necessaryβ it seems like either input_columns should simply temporarily override the _format_columns within the map operation, or we should throw an error if there are any conflicts. Currently it doesn't look like this case is checked for at all within map, but maybe I'm just missing it.
Actually yes we can just use input_columns. And we do need to add a check to make sure there are not conflicts or this could lead to confusing errors. | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 145 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
`query_table` simply slices/concatenates parts of the table. The actual data inside the table is not brought in memory.
Also I'm more in favor of declaring `input_dataset = self.with_format(...)` since `formatted_as` may update the dataset fingerprint of `self`, which is not expected when someone runs `map`.
> It's not clear to me why the [col for col in input_columns if self._format_columns is None or col in self._format_columns] check would be necessaryβ it seems like either input_columns should simply temporarily override the _format_columns within the map operation, or we should throw an error if there are any conflicts. Currently it doesn't look like this case is checked for at all within map, but maybe I'm just missing it.
Actually yes we can just use input_columns. And we do need to add a check to make sure there are not conflicts or this could lead to confusing errors. | [
-0.09050965309143066,
0.27838101983070374,
-0.007305508479475975,
-0.17817337810993195,
0.14086773991584778,
-0.09612902253866196,
0.31843286752700806,
0.570652961730957,
0.1868225485086441,
-0.02807651460170746,
-0.058642178773880005,
0.4846482574939728,
0.09406649321317673,
-0.26581498980522156,
-0.004591538570821285,
0.2481255680322647,
0.10016357153654099,
0.3244249224662781,
0.25971317291259766,
0.06095588952302933,
-0.1716756522655487,
-0.2206239551305771,
-0.21548283100128174,
-0.0906187891960144,
-0.086943618953228,
-0.056824177503585815,
0.16010701656341553,
-0.3758951425552368,
-0.3585891127586365,
-0.15891167521476746,
0.2664773762226105,
0.3161304295063019,
-0.20514695346355438,
0.13491924107074738,
-0.00012722323299385607,
-0.020199839025735855,
0.04673485457897186,
-0.03732779994606972,
-0.19952049851417542,
-0.0664864331483841,
0.14743968844413757,
-0.18485325574874878,
0.10728437453508377,
-0.24599066376686096,
0.05984339118003845,
-0.1259114295244217,
0.03188980370759964,
-0.052175577729940414,
0.009008534252643585,
-0.11140388995409012,
0.033268578350543976,
-0.047182392328977585,
-0.3189132511615753,
0.2509443759918213,
0.4844822883605957,
0.21427087485790253,
-0.0029354169964790344,
-0.1754942685365677,
0.28365203738212585,
-0.39932823181152344,
-0.1439494788646698,
0.5009634494781494,
-0.47196561098098755,
-0.045085202902555466,
0.381498783826828,
0.027734462171792984,
0.013387367129325867,
-0.19748534262180328,
0.33428871631622314,
0.07233037054538727,
0.20533165335655212,
-0.3297659754753113,
-0.09841800481081009,
-0.20134475827217102,
-0.08955445140600204,
-0.2471136599779129,
-0.0652233138680458,
0.072840116918087,
-0.41964974999427795,
-0.0061350613832473755,
-0.26665201783180237,
-0.21523669362068176,
-0.08315295726060867,
0.399617075920105,
-0.47490185499191284,
0.4343479871749878,
0.17016643285751343,
0.31728997826576233,
0.19659456610679626,
-0.14600767195224762,
0.0056471754796803,
-0.08092258125543594,
0.44200432300567627,
0.5432046055793762,
-0.42576131224632263,
-0.1392761766910553,
0.13788914680480957,
0.019359901547431946,
0.25142571330070496,
-0.22759099304676056,
-0.1442236304283142,
0.3652479350566864,
0.38208648562431335,
0.13838160037994385,
0.38237670063972473,
0.055243831127882004,
-0.06788677722215652,
0.5654720067977905,
0.3401663303375244,
-0.12877880036830902,
0.09925132989883423,
0.0866195410490036,
0.007261194288730621,
0.37714090943336487,
0.2361534684896469,
-0.39717698097229004,
-0.1501551866531372,
-0.14417000114917755,
-0.003334600478410721,
-0.03592001274228096,
-0.23649737238883972,
0.037973590195178986,
0.11463093757629395,
0.446728378534317,
0.21711568534374237,
0.22193998098373413,
-0.23959235846996307,
0.006965545937418938,
-0.242815300822258,
0.016714293509721756,
0.026326976716518402,
0.03614974394440651,
-0.08855442702770233,
0.17847146093845367,
0.12631015479564667,
0.17001445591449738,
-0.1283930391073227,
0.04167745262384415,
-0.0802164375782013,
0.11006686091423035,
0.017849845811724663,
-0.241055428981781,
0.3043305575847626,
0.5060300827026367,
-0.12703785300254822,
0.41514045000076294,
0.23378241062164307,
-0.2551228106021881,
-0.3541775047779083,
0.3156723380088806,
-0.2056184709072113,
-0.24524733424186707,
0.1567533314228058,
-0.04328879341483116,
-0.053322311490774155,
0.3144856095314026,
-0.08191836625337601,
0.5806531310081482,
0.3763391673564911,
-0.15144123136997223,
-0.1035861000418663,
-0.1623920053243637,
-0.31254133582115173,
-0.2653500437736511,
0.3400164842605591,
-0.03212074935436249,
-0.4576420485973358,
-0.219966858625412,
-0.17485138773918152,
0.2500416934490204,
0.46787479519844055,
0.40396952629089355,
-0.11577697098255157,
0.13068462908267975,
0.3230549991130829,
0.42306870222091675,
0.5786600708961487,
-0.004451461136341095,
-0.6051675081253052,
0.04563374072313309,
-0.19107526540756226,
0.13021819293498993,
-0.12589281797409058,
0.3633521795272827,
0.6630898714065552,
0.1699461042881012,
0.3502975106239319,
0.20838205516338348,
-0.08323973417282104,
0.23329108953475952,
-0.13200485706329346,
-0.09924720972776413,
0.22409430146217346,
0.0698583722114563,
-0.031469304114580154,
-0.15801119804382324,
0.043207913637161255,
-0.01469438336789608,
0.012032777070999146,
-0.030744370073080063,
0.14959754049777985,
0.03526437282562256,
0.12250365316867828,
-0.07934536039829254,
0.09683647751808167,
-0.1701590120792389,
-0.31514421105384827,
0.08333171159029007,
0.47577616572380066,
0.16269619762897491,
-0.3184890151023865,
-0.4162275791168213,
-0.171794593334198,
0.15897735953330994,
0.3474313020706177,
0.07171611487865448,
-0.08837229013442993,
-0.3062794506549835,
0.192757710814476,
-0.1530601978302002,
-0.22302363812923431,
-0.15827839076519012,
-0.07867540419101715,
0.09188491106033325,
-0.0018242746591567993,
-0.04612744599580765,
0.22286278009414673,
-0.05459911376237869,
-0.08339470624923706,
-0.06862116605043411,
0.22273388504981995,
0.22685503959655762,
0.16909560561180115,
0.10068608075380325,
0.30239662528038025,
-0.20073769986629486,
-0.30228346586227417,
0.4918420910835266,
0.0368729867041111,
0.15247051417827606,
0.11405568569898605,
-0.2299971729516983,
0.1563224047422409,
-0.22396034002304077,
-0.4133351743221283,
0.25585347414016724,
0.1995144635438919,
0.6288717985153198,
0.05277200788259506,
0.08415939658880234,
0.1763402670621872,
0.058058787137269974,
-0.09300880879163742,
-0.32848531007766724,
-0.023751821368932724,
0.05193407088518143,
-0.06845493614673615,
0.1705930233001709,
-0.04250001162290573,
0.28111258149147034,
0.3036041259765625,
-0.06353995203971863,
0.12177518010139465,
0.288303017616272,
-0.144916832447052,
-0.22080087661743164,
0.20542000234127045,
-0.18093979358673096,
0.033985815942287445,
0.17457811534404755,
0.16398371756076813,
-0.21330128610134125,
-0.1876697540283203,
-0.00837520882487297,
0.19922980666160583,
0.21247360110282898,
-0.12504377961158752,
-0.23431310057640076,
0.20744840800762177,
-0.06264445185661316,
-0.33549973368644714,
0.07322259247303009,
0.021295631304383278,
0.298134982585907,
-0.22831779718399048,
-0.1893729269504547,
-0.2869468033313751,
-0.13075265288352966,
0.3210742473602295,
-0.0955275297164917,
0.03652603179216385,
-0.2719177305698395,
0.31663787364959717,
0.1489037424325943,
0.1104649156332016,
0.22258345782756805,
-0.09622898697853088,
0.33248090744018555,
0.044453807175159454,
-0.24733678996562958,
-0.2861942648887634,
-0.49484574794769287,
0.023519115522503853,
-0.06998132169246674,
0.010535276494920254,
0.3992699384689331,
0.2383039891719818,
0.3589072525501251,
-0.27229273319244385,
-0.23298212885856628,
-0.440253883600235,
0.066439688205719,
-0.1753516048192978,
0.2203931361436844,
0.10147856920957565,
0.5082466006278992,
-0.3530634641647339,
0.07231448590755463,
0.0008110012859106064,
-0.08867700397968292,
-0.10406956076622009,
0.14760875701904297,
-0.05482298508286476,
0.15845589339733124,
-0.1324397325515747,
0.2103566825389862,
0.06458361446857452,
-0.10255280137062073,
-0.08856913447380066,
-0.1085604727268219,
0.35641932487487793,
-0.3576385974884033,
-0.012236589565873146,
-0.2859366536140442,
-0.11592845618724823,
-0.0990881696343422,
-0.13914614915847778,
0.21195316314697266,
0.44331812858581543,
0.2500690221786499,
-0.07704092562198639,
-0.12587107717990875,
-0.08333232998847961,
-0.1012144684791565,
0.6114694476127625,
-0.3645411729812622,
-0.01425462868064642,
-0.20901669561862946,
0.0716235339641571,
0.16471531987190247,
0.14090782403945923,
0.4514617621898651,
-0.04238675534725189,
0.05900764465332031,
0.053438588976860046,
-0.3214302957057953,
-0.29032301902770996,
-0.047887369990348816,
-0.2004416584968567,
0.21386295557022095,
0.6448990702629089,
0.30938875675201416,
0.8403739929199219,
0.11304853856563568,
0.1725100874900818,
0.03370329365134239,
-0.05106957256793976,
0.08154167234897614,
-0.06333211809396744,
-0.2036997377872467,
-0.2114545702934265,
-0.23505181074142456,
-0.09643053263425827,
0.18332616984844208,
0.17172735929489136,
-0.553752601146698,
-0.01956332102417946,
0.14738214015960693,
-0.12557199597358704,
-0.2622869908809662,
0.304364413022995,
0.1472885012626648,
0.16808241605758667,
0.37419039011001587,
0.1579209268093109,
-0.41759368777275085,
-0.4230320155620575,
-0.06383414566516876,
-0.12957067787647247,
0.028678931295871735,
-0.13408777117729187,
-0.5923661589622498,
-0.23602667450904846,
-0.7482563257217407,
0.3018718957901001,
0.08294174820184708,
0.15228302776813507,
0.18743357062339783,
-0.2930604815483093,
0.2830199599266052,
-0.07555931061506271,
0.6906269192695618,
-0.04554528743028641,
-0.2970350980758667,
0.1469217985868454,
-0.023681169375777245,
-0.5939136743545532,
0.22092773020267487,
-0.07804747670888901,
0.15377329289913177,
0.16132603585720062,
0.5281014442443848,
-0.5880943536758423,
-0.19723466038703918,
0.0655306875705719,
0.16826310753822327,
-0.15556700527668,
0.07215295732021332,
-0.11807020008563995,
-0.3797650635242462,
-0.14866267144680023,
0.2245042622089386,
-0.0023846644908189774,
0.09083868563175201,
0.4537906348705292,
-0.027731992304325104,
0.11088651418685913,
-0.09290686249732971,
0.08766529709100723,
0.42736202478408813,
-0.05265243723988533,
0.18025456368923187,
0.047249678522348404,
0.2657175064086914,
-0.2962568700313568,
-0.012426307424902916,
0.20268991589546204,
-0.045839887112379074,
-0.10554400086402893,
0.02096850983798504,
0.12372568249702454,
0.31936579942703247,
0.5515722632408142,
0.01815206930041313,
0.3794238269329071,
-0.14544454216957092,
0.1872478574514389,
-0.1112789511680603,
0.013400338590145111,
-0.13016605377197266,
-0.029565557837486267,
-0.34713879227638245,
-0.3774888813495636,
0.3290829360485077,
0.25394782423973083,
-0.2744832932949066,
0.6376813650131226,
0.15795612335205078,
-0.1558040976524353,
0.4983794689178467,
0.3384491503238678,
1.0316681861877441,
-0.5237042903900146,
0.18102669715881348,
0.06490384787321091,
0.15769067406654358,
0.33894941210746765,
-0.4578651785850525,
0.24216444790363312,
-0.18255360424518585,
-0.12559810280799866,
-0.02754930779337883,
-0.11778779327869415,
-0.08093062788248062,
0.21271832287311554,
0.13012255728244781,
0.14714406430721283,
-0.09133462607860565,
0.5559561252593994,
0.11215232312679291,
0.10313040018081665,
0.31033867597579956,
-0.419163316488266,
-0.06045982241630554,
-0.01995866186916828,
-0.0042770616710186005,
-0.26608484983444214,
0.055070407688617706,
0.36501169204711914,
-0.1820293813943863,
-0.41320234537124634,
-0.1793469488620758,
-0.2829311788082123,
-0.22848208248615265,
0.03178451955318451,
-0.16888175904750824,
-0.03444594889879227,
-0.18546800315380096,
-0.08279818296432495,
-0.4226723313331604,
0.11798906326293945,
0.1659643054008484,
0.1124051958322525,
0.506820559501648,
0.2643396258354187,
0.15797573328018188,
-0.11964045464992523,
0.11311549693346024,
0.09552694112062454,
-0.021248482167720795,
0.22375249862670898,
-0.11862076073884964,
-0.4042242169380188,
-0.3700036406517029,
0.17895548045635223,
0.5880470275878906,
0.017371226102113724,
-0.04045898839831352,
-0.05795598030090332,
0.17240244150161743,
-0.2196783423423767,
-0.031784188002347946,
-0.14282770454883575,
0.07734551280736923,
0.4151405394077301,
-0.019598770886659622,
-0.31921857595443726,
-0.034947719424963,
0.3392707407474518,
0.29272741079330444,
0.07348436862230301,
0.1987026482820511,
-0.14793983101844788,
-0.5300845503807068,
-0.03623282536864281,
-0.07160129398107529,
0.2113046497106552,
-0.006102718412876129,
-0.03326911851763725,
-0.3178263008594513,
-0.06420999765396118,
-0.0575801320374012,
0.16373012959957123,
-0.053069695830345154,
-0.03855565935373306,
-0.28609123826026917,
-0.42688891291618347,
-0.026392051950097084,
0.39721202850341797,
0.1831769049167633,
0.07755082100629807,
0.10226989537477493,
-0.11482217907905579,
-0.436066210269928,
0.5048316121101379,
-0.15208366513252258,
-0.2250877171754837,
-0.05940236896276474,
0.42603257298469543,
-0.14376620948314667,
0.30607539415359497,
-0.05534067749977112,
-0.08340634405612946,
0.052467018365859985,
-0.02660786733031273,
-0.030252523720264435,
-0.11358343064785004,
0.08035720884799957,
0.2378629744052887,
-0.15880456566810608,
-0.09037580341100693,
0.06429968774318695,
-0.17450769245624542,
-0.15588179230690002,
-0.4696466624736786,
0.27880972623825073,
0.05908970534801483,
-0.05691617727279663,
-0.3633277416229248,
0.3943195641040802,
-0.15170949697494507,
-0.07168614864349365,
0.14346419274806976,
-0.1927838921546936,
-0.04554663598537445,
0.07236310094594955,
0.2985588312149048,
0.011188281700015068,
0.05291926860809326,
-0.09575007855892181,
0.18752586841583252,
0.0862700417637825,
-0.2638131082057953,
0.004544254392385483,
0.08051960170269012,
0.040419694036245346,
0.1443311870098114,
0.14044857025146484,
0.37162092328071594,
-0.09647420793771744,
-0.10182914137840271,
0.35531699657440186,
-0.011907914653420448,
-0.1676962822675705,
-0.2848278880119324,
0.4189099967479706,
-0.06342444568872452,
0.22794097661972046,
0.4156302809715271,
0.0333213172852993,
0.17186877131462097,
0.0038918480277061462,
-0.28001868724823,
0.5418031811714172,
-0.17525401711463928,
-0.29711517691612244,
0.38702234625816345,
0.23681028187274933,
-0.10326887667179108,
0.1635177880525589,
0.1996374875307083,
-0.09745761007070541,
0.25225186347961426,
-0.03480372577905655,
0.252701073884964,
0.16924208402633667,
0.04887007176876068,
-0.4442737400531769,
-0.1520386040210724,
0.10982099175453186,
0.45037221908569336,
-0.12631767988204956,
0.10952672362327576,
0.0359787791967392,
-0.12391728907823563,
0.5140133500099182,
-0.09647922962903976,
0.17517969012260437,
0.23719528317451477,
0.06789050996303558,
-0.15329402685165405,
-0.31485772132873535,
-0.2530973553657532,
0.06624145805835724,
0.013420060276985168,
-0.053007882088422775,
-0.3334815502166748,
0.4227050542831421,
0.0035087168216705322,
0.16094985604286194,
-0.33897164463996887,
0.14633065462112427,
-0.25960421562194824,
0.2895331382751465,
-0.20760294795036316,
0.08517374098300934,
-0.5017511248588562,
0.2916598916053772,
0.08551064878702164,
-0.32971063256263733,
0.1519300639629364,
0.3821592330932617,
0.040368154644966125,
-0.07212565094232559,
-0.2558273673057556,
-0.25194188952445984,
-0.13467541337013245,
0.0848696231842041,
0.051125820726156235,
0.058923132717609406,
-0.02541656605899334,
-0.0539003387093544,
-0.03403521701693535,
-0.27236872911453247,
0.36164408922195435,
0.19714570045471191,
-0.029169229790568352,
-0.14048153162002563,
0.05816894769668579,
-0.3104747533798218,
0.12028270959854126,
-0.09769422560930252,
0.18710774183273315,
0.06594207137823105,
0.04505880922079086,
-0.21264147758483887,
0.16989034414291382,
-0.027191955596208572,
-0.0016711000353097916,
-0.007415333762764931,
0.27345094084739685,
-0.05350806936621666,
-0.00021159276366233826,
-0.2139618694782257,
-0.3434695601463318,
-0.467712938785553,
0.005768433213233948,
-0.7461004257202148,
-0.3828417956829071,
0.36025723814964294,
0.30305418372154236,
0.45022866129875183,
0.35922670364379883,
-0.040831536054611206,
-0.24981503188610077,
-0.39736148715019226,
0.3535868525505066,
-0.10523436963558197,
0.35241734981536865,
-0.11026965081691742,
0.10479506850242615,
-0.0784878134727478,
-0.5093361735343933,
0.32774224877357483,
-0.14191819727420807,
-0.08812566101551056,
-0.0596211776137352,
0.08473888039588928,
0.28875163197517395,
0.20488309860229492,
0.321236252784729,
-0.12804420292377472,
0.18760183453559875,
0.05833377689123154,
0.15333622694015503,
-0.12233290076255798,
0.3114006221294403,
-0.46410951018333435,
0.13699015974998474,
-0.07732447981834412,
0.1348332166671753,
-0.0685960203409195,
-0.192535862326622,
-0.015542959794402122,
0.13879063725471497,
-0.15137699246406555,
-0.15224497020244598,
0.26541033387184143,
0.11884645372629166,
0.15836071968078613,
0.22285425662994385,
-0.2743425667285919,
-0.04074531048536301,
0.015760697424411774,
0.10231798142194748,
-0.2132021188735962,
-0.2157049924135208,
0.5233750343322754,
-0.7930595874786377,
-0.443189799785614,
-0.16258186101913452,
0.05793692171573639,
-0.052723176777362823,
-0.17479917407035828,
-0.16221868991851807,
-0.3733668923377991,
0.2869018316268921,
-0.12780484557151794,
-0.33672192692756653,
0.1035347431898117,
0.023729950189590454,
-0.17184124886989594,
-0.32465559244155884,
-0.017716549336910248,
-0.1019672229886055,
-0.13829708099365234,
-0.5111667513847351,
-0.5413415431976318
] |
https://github.com/huggingface/datasets/issues/2193 | Filtering/mapping on one column is very slow | That sounds good to me! I just submitted a PR (#2246) implementing your approach. I also changed how `_query_table` handles Iterable keys since it still seemed like `pa.concat_tables` was taking a long time to create the table for each batch. Now my whole `map()` operation takes 1 min 46 seconds where it used to take somewhere on the order of 10 minutes. | I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible. | 62 | Filtering/mapping on one column is very slow
I'm currently using the `wikipedia` datasetβ I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like thatβ I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
That sounds good to me! I just submitted a PR (#2246) implementing your approach. I also changed how `_query_table` handles Iterable keys since it still seemed like `pa.concat_tables` was taking a long time to create the table for each batch. Now my whole `map()` operation takes 1 min 46 seconds where it used to take somewhere on the order of 10 minutes. | [
-0.17371809482574463,
0.3303041160106659,
-0.015150229446589947,
-0.23526029288768768,
0.09672672301530838,
-0.13735653460025787,
0.24519692361354828,
0.6020460724830627,
0.12157446146011353,
-0.05612553656101227,
-0.07012160867452621,
0.5131319165229797,
0.07048029452562332,
-0.2048012912273407,
-0.017926067113876343,
0.20674340426921844,
0.09104310721158981,
0.3320179283618927,
0.307717502117157,
0.14187373220920563,
-0.12450958788394928,
-0.1790831983089447,
-0.16067323088645935,
-0.09904398024082184,
-0.06509236246347427,
-0.08652060478925705,
0.142902210354805,
-0.40431082248687744,
-0.3323492109775543,
-0.2287282943725586,
0.32213443517684937,
0.3873365819454193,
-0.17678199708461761,
0.14152196049690247,
-0.00012483559839893132,
-0.05493190139532089,
0.014045048505067825,
0.013742217794060707,
-0.18244005739688873,
-0.029547452926635742,
0.1309022307395935,
-0.21674127876758575,
0.07551587373018265,
-0.17306117713451385,
0.04762464761734009,
-0.10836943984031677,
0.030625583603978157,
-0.047826945781707764,
0.02155718207359314,
-0.0948140099644661,
0.041202157735824585,
-0.04760729521512985,
-0.2681419849395752,
0.20970062911510468,
0.46458420157432556,
0.19353622198104858,
-0.050210703164339066,
-0.16409504413604736,
0.3533453047275543,
-0.44627097249031067,
-0.14111405611038208,
0.5246966481208801,
-0.45934638381004333,
-0.0403558649122715,
0.3705936074256897,
0.006420642603188753,
0.06939305365085602,
-0.2104826420545578,
0.2937602996826172,
0.1523417979478836,
0.18257184326648712,
-0.3065948188304901,
-0.13535799086093903,
-0.26164719462394714,
-0.04737097769975662,
-0.2595103085041046,
-0.06014523655176163,
0.04567109793424606,
-0.44108086824417114,
-0.0086556077003479,
-0.25205427408218384,
-0.2057039737701416,
-0.08321844786405563,
0.31699138879776,
-0.4233553409576416,
0.4046780467033386,
0.21046364307403564,
0.24377310276031494,
0.2672818899154663,
-0.2661033868789673,
0.012251592241227627,
0.0007131882011890411,
0.3663116991519928,
0.5617978572845459,
-0.45567721128463745,
-0.19419388473033905,
0.15786689519882202,
-0.003194376826286316,
0.304434597492218,
-0.24306745827198029,
-0.2232787311077118,
0.41800162196159363,
0.3920198380947113,
0.045277826488018036,
0.3689551055431366,
0.07546275854110718,
-0.04278668761253357,
0.594801127910614,
0.35024553537368774,
-0.09752859175205231,
0.03986269608139992,
0.09791307151317596,
0.0036887316964566708,
0.2870083451271057,
0.20490862429141998,
-0.36690863966941833,
-0.1987365335226059,
-0.16196714341640472,
-0.0005877278745174408,
-0.014780565164983273,
-0.16992536187171936,
0.02224988117814064,
0.11730803549289703,
0.45598480105400085,
0.24183551967144012,
0.28403326869010925,
-0.20973795652389526,
0.02069060504436493,
-0.2422882318496704,
0.06687072664499283,
0.06598012149333954,
-0.0030264053493738174,
-0.11164488643407822,
0.21520131826400757,
0.1996006816625595,
0.17800869047641754,
-0.2033904641866684,
0.05431597679853439,
-0.02017843723297119,
0.12063674628734589,
-0.0231194905936718,
-0.20950143039226532,
0.2548905313014984,
0.4586895704269409,
-0.12614725530147552,
0.34940609335899353,
0.20854073762893677,
-0.2365359663963318,
-0.3625698387622833,
0.2813226878643036,
-0.12922242283821106,
-0.26168015599250793,
0.13500291109085083,
-0.0050356267020106316,
-0.094992995262146,
0.2969784140586853,
-0.09372084587812424,
0.5968530774116516,
0.4027433693408966,
-0.10579429566860199,
-0.1509811282157898,
-0.1515807956457138,
-0.30304762721061707,
-0.19579125940799713,
0.3636775314807892,
-0.022448241710662842,
-0.4293302893638611,
-0.19340042769908905,
-0.13059283792972565,
0.3211941719055176,
0.4375312328338623,
0.4082217216491699,
-0.10906801372766495,
0.14302143454551697,
0.3695867657661438,
0.3730916976928711,
0.5056323409080505,
0.0012926757335662842,
-0.5878236889839172,
0.09859646111726761,
-0.14753417670726776,
0.07721289992332458,
-0.08188740164041519,
0.32690784335136414,
0.6758549213409424,
0.17783547937870026,
0.36053386330604553,
0.17436079680919647,
-0.09818556904792786,
0.26902827620506287,
-0.18259133398532867,
-0.1666397899389267,
0.21023528277873993,
0.1413114368915558,
-0.014534886926412582,
-0.19577372074127197,
-0.016728989779949188,
-0.023886725306510925,
0.01835448294878006,
-0.0340094231069088,
0.14505814015865326,
0.053889088332653046,
0.13724498450756073,
-0.05906984210014343,
0.13754364848136902,
-0.22965165972709656,
-0.24159643054008484,
0.08027546107769012,
0.372058629989624,
0.20292307436466217,
-0.3949057459831238,
-0.4120774269104004,
-0.17335021495819092,
0.17748913168907166,
0.34025752544403076,
0.09052641689777374,
-0.04656544700264931,
-0.35127803683280945,
0.2362399697303772,
-0.14812330901622772,
-0.2082931101322174,
-0.1503557562828064,
-0.03878327086567879,
0.09389034658670425,
-0.021490976214408875,
-0.08327549695968628,
0.1942666471004486,
-0.05562157928943634,
-0.01107320748269558,
-0.07426219433546066,
0.247274249792099,
0.25627490878105164,
0.15892040729522705,
0.07340274006128311,
0.252461701631546,
-0.16502757370471954,
-0.19194209575653076,
0.48147517442703247,
0.08809979259967804,
0.13204047083854675,
0.12184805423021317,
-0.20948627591133118,
0.09835951775312424,
-0.19082438945770264,
-0.4711274206638336,
0.3587893843650818,
0.11093117296695709,
0.6832935214042664,
0.056272320449352264,
0.07702215015888214,
0.24205395579338074,
0.02319178357720375,
-0.08587028086185455,
-0.31867167353630066,
0.05346376448869705,
0.07444629073143005,
-0.09312378615140915,
0.13441236317157745,
0.004162140190601349,
0.36991870403289795,
0.2097863107919693,
-0.04827556759119034,
0.05770641937851906,
0.2880362868309021,
-0.11212945729494095,
-0.2076292634010315,
0.19129106402397156,
-0.1340470016002655,
0.025676198303699493,
0.19866694509983063,
0.12500251829624176,
-0.2327357828617096,
-0.19546553492546082,
-0.019145941361784935,
0.23584213852882385,
0.19096031785011292,
-0.15082508325576782,
-0.21344146132469177,
0.21860425174236298,
-0.04372085630893707,
-0.36146360635757446,
0.03912089392542839,
-0.038161229342222214,
0.34630438685417175,
-0.22170379757881165,
-0.19436176121234894,
-0.2746427357196808,
-0.19937461614608765,
0.3418700695037842,
-0.05731499567627907,
0.026858970522880554,
-0.2546791732311249,
0.3636475205421448,
0.14761213958263397,
0.10412874817848206,
0.25017935037612915,
-0.186670184135437,
0.2861470580101013,
0.055988021194934845,
-0.23623131215572357,
-0.30872201919555664,
-0.5034466981887817,
0.029707681387662888,
-0.057634852826595306,
0.033673662692308426,
0.39862725138664246,
0.24784575402736664,
0.3540845215320587,
-0.257527619600296,
-0.2357904016971588,
-0.4259323179721832,
0.051564671099185944,
-0.15744724869728088,
0.2065596729516983,
0.11959139257669449,
0.519163966178894,
-0.3392125368118286,
-0.021903662011027336,
0.01468735933303833,
-0.10959368199110031,
-0.06872367858886719,
0.15605643391609192,
-0.11340473592281342,
0.13698050379753113,
-0.09307224303483963,
0.1554461121559143,
0.055348582565784454,
-0.11319813132286072,
-0.0398746058344841,
-0.05486203730106354,
0.3683738112449646,
-0.3320028781890869,
0.015554242767393589,
-0.31003910303115845,
-0.16935378313064575,
-0.10768716782331467,
-0.12195619195699692,
0.2462715208530426,
0.4157122075557709,
0.2412176877260208,
-0.05088520422577858,
-0.11372382193803787,
-0.09767217934131622,
-0.1423165500164032,
0.560302197933197,
-0.2883722186088562,
0.003624909557402134,
-0.2501583397388458,
0.08193951845169067,
0.14995065331459045,
0.12565352022647858,
0.4113701581954956,
0.023337606340646744,
0.029219282791018486,
0.07274698466062546,
-0.2747863233089447,
-0.2659970819950104,
-0.10897501558065414,
-0.14832234382629395,
0.2204151451587677,
0.5995189547538757,
0.30567044019699097,
0.8259322643280029,
0.14614537358283997,
0.20411770045757294,
0.011356886476278305,
-0.03935512155294418,
0.03516864404082298,
-0.061704374849796295,
-0.23607273399829865,
-0.2448733150959015,
-0.2205197811126709,
-0.07329666614532471,
0.15711089968681335,
0.22408023476600647,
-0.5832892060279846,
-0.02321481890976429,
0.15425938367843628,
-0.07508450001478195,
-0.3146775960922241,
0.33222290873527527,
0.059474699199199677,
0.18931196630001068,
0.3733278810977936,
0.12188412994146347,
-0.4728977084159851,
-0.42385610938072205,
-0.0668867975473404,
-0.14576303958892822,
0.004805535078048706,
-0.19215147197246552,
-0.6434128880500793,
-0.2553212344646454,
-0.8011314868927002,
0.2882489264011383,
0.08542661368846893,
0.19009147584438324,
0.20131315290927887,
-0.25916191935539246,
0.2519071102142334,
-0.1105627790093422,
0.6910766363143921,
-0.0863245502114296,
-0.2742424011230469,
0.21169447898864746,
0.01209428533911705,
-0.5982701182365417,
0.22585688531398773,
-0.04982323944568634,
0.17941918969154358,
0.1453023999929428,
0.5133736729621887,
-0.5888469219207764,
-0.1962418556213379,
0.012588044628500938,
0.11936413496732712,
-0.13989317417144775,
0.06635817885398865,
-0.08071263879537582,
-0.3828620910644531,
-0.14269720017910004,
0.29859408736228943,
0.023336270824074745,
0.1394139528274536,
0.4171297252178192,
-0.011887777596712112,
0.10986634343862534,
-0.04349207505583763,
0.05669182911515236,
0.43459609150886536,
-0.05119087174534798,
0.1705738753080368,
0.13866271078586578,
0.3155054748058319,
-0.3407425284385681,
0.030270066112279892,
0.09757037460803986,
-0.07157823443412781,
-0.13211867213249207,
-0.04566406458616257,
0.1029336154460907,
0.24427255988121033,
0.5856770873069763,
0.023727096617221832,
0.37126895785331726,
-0.13061091303825378,
0.21081426739692688,
-0.039732467383146286,
-0.04727634787559509,
-0.17222245037555695,
-0.03984556719660759,
-0.34554073214530945,
-0.4100880026817322,
0.2944977283477783,
0.2769503593444824,
-0.28775861859321594,
0.5986567139625549,
0.108362577855587,
-0.16813597083091736,
0.5244887471199036,
0.3236609399318695,
1.0571986436843872,
-0.518900454044342,
0.1504937708377838,
0.009287642315030098,
0.15361221134662628,
0.36352911591529846,
-0.4427523612976074,
0.25496166944503784,
-0.20845119655132294,
-0.10576524585485458,
-0.0030290596187114716,
-0.07572472095489502,
-0.12304166704416275,
0.20546647906303406,
0.09889905154705048,
0.15271487832069397,
-0.04953109472990036,
0.43587759137153625,
0.06506187468767166,
0.1470278799533844,
0.22204606235027313,
-0.5009416341781616,
-0.15564197301864624,
-0.0032372046262025833,
-0.011068277060985565,
-0.23852211236953735,
0.046057164669036865,
0.30092084407806396,
-0.1505010575056076,
-0.3813910484313965,
-0.27516239881515503,
-0.2833558917045593,
-0.25736311078071594,
0.008785630576312542,
-0.16161322593688965,
-0.041230667382478714,
-0.18461978435516357,
-0.10713537037372589,
-0.36673444509506226,
0.11035555601119995,
0.11706763505935669,
0.18084189295768738,
0.4582228660583496,
0.2670478820800781,
0.17298923432826996,
-0.1589830219745636,
0.03684162721037865,
0.08423648774623871,
-0.04478520154953003,
0.12673920392990112,
-0.10291331261396408,
-0.4008798599243164,
-0.3160420060157776,
0.14036747813224792,
0.5727040767669678,
0.03379596769809723,
0.007835336029529572,
-0.022574827075004578,
0.13332512974739075,
-0.2516573965549469,
-0.0018535126000642776,
-0.11880533397197723,
0.08240533620119095,
0.45657676458358765,
-0.027230199426412582,
-0.2644687294960022,
0.011697197332978249,
0.33947935700416565,
0.2910999059677124,
0.05980326980352402,
0.166842982172966,
-0.09500838071107864,
-0.5276136994361877,
-0.058570776134729385,
-0.058088965713977814,
0.158124640583992,
-0.03147907182574272,
-0.05131688714027405,
-0.29055291414260864,
-0.10988381505012512,
0.053972553461790085,
0.185971200466156,
-0.02636263519525528,
-0.06726499646902084,
-0.1996271163225174,
-0.395063191652298,
-0.04099629074335098,
0.3940744400024414,
0.18956583738327026,
0.07287940382957458,
0.06190279871225357,
-0.10575775802135468,
-0.4257470369338989,
0.48494383692741394,
-0.1800253987312317,
-0.18977709114551544,
-0.105691097676754,
0.3836822807788849,
-0.16670094430446625,
0.2562187612056732,
-0.08148711919784546,
-0.12832798063755035,
0.06924650073051453,
-0.0055741965770721436,
-0.007537843659520149,
-0.13387317955493927,
0.08899489045143127,
0.1997961699962616,
-0.17072448134422302,
-0.10759759694337845,
0.028045766055583954,
-0.17399096488952637,
-0.17489799857139587,
-0.4453566372394562,
0.1998780220746994,
0.04805648326873779,
-0.05308092385530472,
-0.4007865786552429,
0.3999558389186859,
-0.17109191417694092,
-0.04828915745019913,
0.17565464973449707,
-0.15797466039657593,
-0.07031060755252838,
0.10834205150604248,
0.32411983609199524,
-0.02892892435193062,
0.03291871398687363,
-0.035942237824201584,
0.17544323205947876,
0.06819483637809753,
-0.20275694131851196,
0.04854044318199158,
0.11073312908411026,
-0.04514431953430176,
0.20968231558799744,
0.17071576416492462,
0.3930058479309082,
-0.05666082724928856,
-0.026962872594594955,
0.37141522765159607,
0.01938280649483204,
-0.18835145235061646,
-0.3401808440685272,
0.40275275707244873,
-0.1269005835056305,
0.19545555114746094,
0.3642883896827698,
0.06860235333442688,
0.13519075512886047,
0.09084372222423553,
-0.22231066226959229,
0.6175417304039001,
-0.26088446378707886,
-0.2881406843662262,
0.3428645133972168,
0.2779903709888458,
-0.1272321194410324,
0.15673202276229858,
0.20825721323490143,
-0.08151634782552719,
0.21004073321819305,
-0.05781800299882889,
0.2513265311717987,
0.19702839851379395,
0.06498795002698898,
-0.43356552720069885,
-0.0970001071691513,
0.014896081760525703,
0.4516620635986328,
-0.09407408535480499,
0.06690188497304916,
0.028722967952489853,
-0.06803751736879349,
0.5121017098426819,
-0.1372925341129303,
0.21537290513515472,
0.24186162650585175,
0.08785228431224823,
-0.21782325208187103,
-0.3109590709209442,
-0.27951180934906006,
0.0975806713104248,
-0.016583852469921112,
-0.06414633989334106,
-0.2964720129966736,
0.43005505204200745,
0.03471783176064491,
0.22842112183570862,
-0.4378516376018524,
0.18863844871520996,
-0.2358878254890442,
0.3433356285095215,
-0.20309729874134064,
0.08027820289134979,
-0.4757513999938965,
0.270918607711792,
0.06571535021066666,
-0.27937600016593933,
0.18047888576984406,
0.3388805091381073,
-0.021554071456193924,
-0.03238673508167267,
-0.27597182989120483,
-0.20546314120292664,
-0.1266845464706421,
0.08489935100078583,
0.04188954085111618,
0.0050510987639427185,
-0.036138832569122314,
-0.04587128013372421,
-0.04001776874065399,
-0.2692869007587433,
0.3161686956882477,
0.21018093824386597,
0.05872127041220665,
-0.17580246925354004,
0.10780132561922073,
-0.31339961290359497,
0.13362768292427063,
-0.06842909008264542,
0.23108407855033875,
0.0788867324590683,
0.02192840725183487,
-0.19231948256492615,
0.18178877234458923,
-0.030809607356786728,
0.019239675253629684,
0.039372462779283524,
0.2859228551387787,
-0.03796578571200371,
0.010069489479064941,
-0.21294666826725006,
-0.32464054226875305,
-0.48451927304267883,
-0.050802119076251984,
-0.759692370891571,
-0.35301387310028076,
0.38883697986602783,
0.3353845775127411,
0.45071229338645935,
0.37083494663238525,
-0.040823400020599365,
-0.22085684537887573,
-0.3869847357273102,
0.40411633253097534,
-0.13000044226646423,
0.38309991359710693,
-0.02101968228816986,
0.14319871366024017,
-0.08221806585788727,
-0.5314816236495972,
0.3417707681655884,
-0.10662537813186646,
-0.061985526233911514,
-0.02914135903120041,
0.06679393351078033,
0.32970479130744934,
0.21050116419792175,
0.29035210609436035,
-0.093427374958992,
0.17455293238162994,
0.06691994518041611,
0.1510738581418991,
-0.1747179925441742,
0.26758286356925964,
-0.43930497765541077,
0.09740801900625229,
-0.04622644558548927,
0.0972074493765831,
-0.10029787570238113,
-0.18522284924983978,
-0.0050046443939208984,
0.08590414375066757,
-0.1603620946407318,
-0.14418520033359528,
0.18926189839839935,
0.08542385697364807,
0.25218504667282104,
0.22806121408939362,
-0.37901178002357483,
0.006634514778852463,
-0.024319075047969818,
0.12358742952346802,
-0.25940045714378357,
-0.2491067498922348,
0.4583289325237274,
-0.793411135673523,
-0.4857640564441681,
-0.1487041562795639,
0.06937418133020401,
-0.03476196527481079,
-0.1215018555521965,
-0.11827008426189423,
-0.3490401804447174,
0.21945910155773163,
-0.13504177331924438,
-0.3207782804965973,
0.09856508672237396,
0.07162722200155258,
-0.21515251696109772,
-0.3376729190349579,
-0.01596245914697647,
-0.04406213015317917,
-0.12445180863142014,
-0.5616627931594849,
-0.5143706798553467
] |
https://github.com/huggingface/datasets/issues/2190 | News_commentary Dataset Translation Pairs are of Incorrect Language Specified Pairs | Hi @anassalamah,
Could you please try with this:
```python
train_ds = load_dataset("news_commentary", lang1="ar", lang2="en", split='train[:98%]')
val_ds = load_dataset("news_commentary", lang1="ar", lang2="en", split='train[98%:]')
``` | I used load_dataset to load the news_commentary dataset for "ar-en" translation pairs but found translations from Arabic to Hindi.
```
train_ds = load_dataset("news_commentary", "ar-en", split='train[:98%]')
val_ds = load_dataset("news_commentary", "ar-en", split='train[98%:]')
# filtering out examples that are not ar-en translations but ar-hi
val_ds = val_ds.filter(lambda example, indice: indice not in chain(range(1312,1327) ,range(1384,1399), range(1030,1042)), with_indices=True)
```
* I'm fairly new to using datasets so I might be doing something wrong | 22 | News_commentary Dataset Translation Pairs are of Incorrect Language Specified Pairs
I used load_dataset to load the news_commentary dataset for "ar-en" translation pairs but found translations from Arabic to Hindi.
```
train_ds = load_dataset("news_commentary", "ar-en", split='train[:98%]')
val_ds = load_dataset("news_commentary", "ar-en", split='train[98%:]')
# filtering out examples that are not ar-en translations but ar-hi
val_ds = val_ds.filter(lambda example, indice: indice not in chain(range(1312,1327) ,range(1384,1399), range(1030,1042)), with_indices=True)
```
* I'm fairly new to using datasets so I might be doing something wrong
Hi @anassalamah,
Could you please try with this:
```python
train_ds = load_dataset("news_commentary", lang1="ar", lang2="en", split='train[:98%]')
val_ds = load_dataset("news_commentary", lang1="ar", lang2="en", split='train[98%:]')
``` | [
-0.16038620471954346,
0.004446566104888916,
-0.21704235672950745,
0.24928420782089233,
-0.05379097908735275,
0.08853862434625626,
0.32000577449798584,
0.22939984500408173,
-0.025390831753611565,
-0.2357994168996811,
-0.246135413646698,
0.19127443432807922,
0.18397989869117737,
0.27491363883018494,
-0.059965431690216064,
-0.3076823353767395,
0.07509055733680725,
-0.1572853922843933,
-0.014174111187458038,
-0.19573989510536194,
-0.11862388253211975,
0.43417826294898987,
-0.1855178326368332,
0.06626284122467041,
-0.032969310879707336,
-0.044025324285030365,
0.00811014510691166,
-0.033700890839099884,
0.11061692982912064,
-0.12341461330652237,
0.08043679594993591,
0.2322266697883606,
0.16696147620677948,
0.09357357025146484,
-0.00011288198584225029,
0.06269119679927826,
0.11989444494247437,
-0.15914924442768097,
-0.15550965070724487,
-0.2982667088508606,
-0.13291636109352112,
-0.27262625098228455,
0.11102060973644257,
-0.2844848036766052,
-0.13425225019454956,
-0.4882696866989136,
-0.254555881023407,
-0.5316694974899292,
0.5619792342185974,
0.49271634221076965,
0.22837118804454803,
0.1886768639087677,
-0.02937077172100544,
-0.06263000518083572,
0.09206526726484299,
-0.15631897747516632,
0.1393919736146927,
0.32679468393325806,
0.37889474630355835,
0.23358047008514404,
-0.14171451330184937,
0.43238115310668945,
-0.27321746945381165,
-0.13820266723632812,
-0.3607787787914276,
-0.04723780229687691,
0.23175770044326782,
-0.4424891471862793,
0.2594132125377655,
0.20923423767089844,
0.4308643937110901,
-0.19788041710853577,
-0.302554190158844,
-0.1495148241519928,
-0.12474072724580765,
0.07329966872930527,
0.07833898812532425,
0.17911872267723083,
-0.2363337129354477,
0.42085257172584534,
0.10151645541191101,
-0.12040024995803833,
0.21365153789520264,
0.35793668031692505,
0.06953860819339752,
0.03839695081114769,
0.06343470513820648,
0.1177147701382637,
0.0055171288549900055,
-0.22024552524089813,
0.1597222536802292,
-0.1910918653011322,
0.08912289887666702,
0.34951645135879517,
-0.3829519748687744,
0.05381525307893753,
-0.2302294671535492,
-0.15964066982269287,
-0.13287457823753357,
-0.24174295365810394,
-0.2591853439807892,
0.2534897029399872,
-0.13867142796516418,
0.04343666508793831,
0.09328146278858185,
0.03349699079990387,
0.2530217468738556,
0.24355290830135345,
-0.0637134313583374,
-0.15802672505378723,
-0.12775346636772156,
0.30615848302841187,
-0.09089764952659607,
-0.3678646683692932,
-0.2495773434638977,
-0.018795445561408997,
0.010044898837804794,
-0.16214002668857574,
-0.41178110241889954,
0.19179515540599823,
-0.5404414534568787,
-0.4620899260044098,
-0.0832577720284462,
0.19829654693603516,
0.16359087824821472,
0.11886970698833466,
0.13200248777866364,
0.36747992038726807,
-0.1292290836572647,
-0.3483610451221466,
-0.20252910256385803,
0.12464261054992676,
-0.22587141394615173,
-0.08094212412834167,
0.11551964282989502,
-0.12000048160552979,
0.3928951025009155,
0.08894867449998856,
0.04681486636400223,
-0.22689326107501984,
-0.055834002792835236,
-0.21467335522174835,
-0.04590097814798355,
-0.05015736445784569,
0.19797784090042114,
0.33170294761657715,
0.25485679507255554,
-0.28481438755989075,
0.023638345301151276,
0.32670971751213074,
-0.44355738162994385,
0.3104059398174286,
-0.18825551867485046,
0.16673825681209564,
-0.10775408148765564,
-0.008597981184720993,
-0.16971641778945923,
0.6289416551589966,
0.3114929795265198,
-0.08706057071685791,
-0.006319180130958557,
-0.019795618951320648,
-0.14629215002059937,
-0.08903322368860245,
0.0914798378944397,
0.26861250400543213,
-0.7350519299507141,
-0.15710952877998352,
0.21017278730869293,
-0.02727067470550537,
0.17806822061538696,
0.4736940264701843,
-0.24199563264846802,
0.24044466018676758,
-0.2692956030368805,
-0.12797676026821136,
0.3589184880256653,
-0.01831616647541523,
-0.1526157557964325,
0.06281854957342148,
0.12326429784297943,
0.17294497787952423,
0.2040344774723053,
0.11737777292728424,
0.22212101519107819,
-0.0477188378572464,
0.2874533534049988,
0.35554617643356323,
0.18211877346038818,
0.013875620439648628,
-0.17418017983436584,
-0.19759880006313324,
0.8043537139892578,
0.19910261034965515,
0.3475912809371948,
0.09372640401124954,
0.15163806080818176,
0.0677664503455162,
0.4992113411426544,
0.06089841574430466,
0.0599408894777298,
0.20851778984069824,
-0.3930371105670929,
-0.007878780364990234,
0.08470218628644943,
-0.06692367792129517,
-0.17844489216804504,
0.022550977766513824,
-0.148173525929451,
0.27828168869018555,
0.0313989594578743,
0.07130677253007889,
-0.5101251602172852,
-0.2441059947013855,
-0.228396937251091,
0.11285705864429474,
0.17409418523311615,
-0.05618490278720856,
-0.20034471154212952,
0.39785322546958923,
0.016195882111787796,
0.3494779169559479,
-0.3953164219856262,
-0.07756070792675018,
-0.46995803713798523,
0.5394406318664551,
0.1512419581413269,
-0.24888697266578674,
0.03586484491825104,
0.12305805087089539,
0.23245784640312195,
0.06706629693508148,
-0.2001376450061798,
0.03349251300096512,
0.2786712646484375,
0.34820884466171265,
-0.050793156027793884,
-0.006407395005226135,
0.22198912501335144,
-0.5121757984161377,
0.12717221677303314,
0.36748868227005005,
0.04347485303878784,
-0.0011219307780265808,
0.06269408762454987,
0.5724954009056091,
-0.06853106617927551,
0.15397724509239197,
-0.04351527988910675,
0.03832593560218811,
0.4436296820640564,
0.08639882504940033,
-0.1897151917219162,
-0.3766207695007324,
0.15051546692848206,
0.19766303896903992,
0.3643486499786377,
0.4173542857170105,
-0.1284814029932022,
-0.029719211161136627,
0.4801754355430603,
0.04563698545098305,
0.15393102169036865,
0.20729300379753113,
-0.0988580510020256,
-0.1010797917842865,
-0.043823570013046265,
0.14283567667007446,
0.08068330585956573,
0.2600463926792145,
0.07621104270219803,
-0.08224209398031235,
0.12748168408870697,
-0.12355730682611465,
0.21547549962997437,
-0.004862405359745026,
0.22278276085853577,
-0.04367391765117645,
-0.038934409618377686,
-0.1674811989068985,
-0.39174941182136536,
0.2549133896827698,
0.09176213294267654,
0.24711665511131287,
-0.32530489563941956,
0.03790438920259476,
-0.3931707441806793,
-0.4345543384552002,
-0.36910557746887207,
-0.3373207449913025,
-0.1522035002708435,
-0.24409106373786926,
0.06914488971233368,
-0.3370833992958069,
-0.0516582727432251,
0.2737577557563782,
0.09897351264953613,
-0.135925754904747,
-0.005558110773563385,
-0.1260441243648529,
-0.026669180020689964,
-0.2810831367969513,
-0.16186997294425964,
0.12517258524894714,
0.23145072162151337,
0.07075430452823639,
0.13134315609931946,
-0.4163939654827118,
-0.47495126724243164,
-0.1198277696967125,
-0.4053298830986023,
-0.047865189611911774,
-0.2889059782028198,
0.18794845044612885,
-0.16765618324279785,
0.3506738543510437,
-0.12119469046592712,
-0.32912734150886536,
0.17180179059505463,
0.3448718190193176,
-0.1739180088043213,
0.0501895546913147,
-0.13610221445560455,
0.12877106666564941,
0.09592938423156738,
-0.7553017139434814,
-0.4478924870491028,
-0.18588097393512726,
-0.27328628301620483,
-0.10295489430427551,
0.13736560940742493,
-0.27822646498680115,
0.13783924281597137,
-0.06994839757680893,
-0.018781283870339394,
0.03905443847179413,
-0.47458550333976746,
-0.10958085209131241,
0.2636790871620178,
0.007868926972150803,
-0.24371977150440216,
-0.10092400014400482,
-0.002743929624557495,
0.1687009632587433,
-0.14576378464698792,
-0.11779960989952087,
0.18168288469314575,
-0.17539255321025848,
0.21527224779129028,
0.08454024791717529,
0.05491476505994797,
-0.02296385169029236,
-0.07142841070890427,
0.06589909642934799,
-0.04687374830245972,
-0.2789109945297241,
0.1696225255727768,
-0.022533804178237915,
0.16602075099945068,
0.0673167034983635,
0.30733805894851685,
-0.22332826256752014,
0.40891140699386597,
0.2515799105167389,
-0.19835685193538666,
0.42925259470939636,
-0.028350522741675377,
0.0025143176317214966,
-0.1306346356868744,
-0.31739577651023865,
-0.1287914216518402,
0.12077653408050537,
-0.07335685193538666,
0.35305243730545044,
-0.21607691049575806,
-0.5282365083694458,
-0.1642279028892517,
-0.18926262855529785,
-0.6420203447341919,
-0.1335216909646988,
0.04152039438486099,
-0.5166895389556885,
0.12643495202064514,
0.070809006690979,
-0.015054769814014435,
0.08894720673561096,
-0.16929587721824646,
0.018551167100667953,
-0.04796344041824341,
-0.16581016778945923,
0.24630317091941833,
-0.38094982504844666,
-0.21496322751045227,
-0.046963199973106384,
0.10626254230737686,
-0.0010409203823655844,
0.4505559504032135,
-0.19285285472869873,
0.0754271149635315,
0.22397947311401367,
0.23111481964588165,
0.5450598001480103,
-0.08474978059530258,
-0.08731949329376221,
0.11340396106243134,
0.08872094750404358,
-0.22768859565258026,
-0.15506984293460846,
-0.33793479204177856,
0.24192725121974945,
0.2359015792608261,
0.20664936304092407,
-0.21307770907878876,
-0.20132648944854736,
-0.004075359553098679,
0.35398632287979126,
-0.2952656149864197,
-0.0009570084512233734,
-0.29168322682380676,
-0.25892436504364014,
-0.2787748873233795,
0.04599088430404663,
0.17930786311626434,
0.1624133139848709,
-0.10723527520895004,
-0.09546425938606262,
0.1414387822151184,
0.118245430290699,
0.2900577187538147,
0.21439366042613983,
0.3774513900279999,
0.2690685987472534,
0.06253078579902649,
0.020536761730909348,
0.1457177996635437,
-0.14148998260498047,
0.4112643599510193,
0.06005074083805084,
-0.3950062096118927,
-0.12373252958059311,
-0.3656810224056244,
0.36825329065322876,
0.16664062440395355,
-0.13120992481708527,
0.3721059560775757,
0.1139574870467186,
-0.17723380029201508,
0.15573152899742126,
-0.11564558744430542,
0.4012763500213623,
0.23296429216861725,
-0.30532461404800415,
-0.6735947728157043,
0.1488206386566162,
-0.09548905491828918,
-0.1972217708826065,
0.1967376470565796,
-0.004777662456035614,
-0.3827110826969147,
0.4975559115409851,
0.06288271397352219,
1.0744349956512451,
-0.028065219521522522,
-0.03915395960211754,
0.15422046184539795,
-0.12778064608573914,
0.12364919483661652,
0.22345007956027985,
-0.24712662398815155,
-0.26811277866363525,
0.25103992223739624,
0.015211666002869606,
0.12830254435539246,
0.13637730479240417,
0.24925300478935242,
-0.3342452347278595,
0.19562876224517822,
-0.18021619319915771,
-0.35612353682518005,
0.17530202865600586,
0.09316129982471466,
0.15282264351844788,
-0.10953803360462189,
-0.5600212812423706,
0.08050310611724854,
-0.14362600445747375,
-0.033795710653066635,
-0.03462568670511246,
-0.08434518426656723,
-0.043527279049158096,
-0.122141033411026,
-0.23421338200569153,
0.00025293976068496704,
-0.3061942458152771,
0.19429315626621246,
-0.12667790055274963,
-0.09916425496339798,
0.2096233069896698,
0.5898771286010742,
0.3825436234474182,
0.09006869047880173,
0.1290685087442398,
0.04595912992954254,
-0.016296811401844025,
0.140383780002594,
0.15700261294841766,
-0.07724148035049438,
0.2753789722919464,
0.0077806636691093445,
-0.4079744219779968,
0.3461226522922516,
0.08164899051189423,
0.08668217062950134,
-0.389794260263443,
-0.027148231863975525,
0.10867738723754883,
-0.05512907728552818,
-0.28957775235176086,
0.2188415825366974,
0.035041693598032,
-0.2126810997724533,
0.0971648246049881,
0.19193758070468903,
-0.1699075996875763,
0.1545957326889038,
-0.10137870907783508,
-0.41175681352615356,
-0.05434611812233925,
0.4425745904445648,
0.5296670794487,
-0.1368502527475357,
0.5471819639205933,
0.3692953884601593,
-0.21387098729610443,
-0.18498903512954712,
0.062248267233371735,
-0.10133454948663712,
-0.4705783724784851,
0.11475851386785507,
0.0867467001080513,
-0.04980263113975525,
-0.2640345096588135,
0.17890121042728424,
-0.024144649505615234,
0.20927628874778748,
0.09419171512126923,
-0.4357055425643921,
-0.060314908623695374,
0.17072665691375732,
0.2167465090751648,
-0.09926852583885193,
0.08208909630775452,
-0.3421543538570404,
0.0714787021279335,
0.07859007269144058,
-0.2994539439678192,
0.0846593901515007,
-0.10858702659606934,
0.29601597785949707,
-0.2808217406272888,
0.18721947073936462,
0.07953056693077087,
0.0016340827569365501,
0.07946605980396271,
-0.32974207401275635,
0.06535505503416061,
-0.19549962878227234,
-0.19204311072826385,
0.08684071153402328,
-0.1420459747314453,
0.07967223972082138,
0.012076937593519688,
-0.21427109837532043,
0.2390352040529251,
-0.02115059271454811,
0.22310583293437958,
0.4757251739501953,
0.14013716578483582,
0.2635379731655121,
-0.03640148416161537,
-0.1789245307445526,
-0.318131685256958,
-0.1975480020046234,
-0.013796202838420868,
-0.16720949113368988,
0.23583947122097015,
0.12613099813461304,
0.18841207027435303,
-0.09569896757602692,
-0.0267544724047184,
-0.011756598949432373,
-0.018186897039413452,
0.17469671368598938,
0.0015371963381767273,
-0.27857011556625366,
0.10761144757270813,
0.036491040140390396,
0.17658793926239014,
0.20289923250675201,
-0.23087763786315918,
-0.07960090786218643,
0.1853611171245575,
0.17726697027683258,
-0.6147271394729614,
-0.021337777376174927,
0.5288522839546204,
-0.27501073479652405,
0.14475564658641815,
0.2450878620147705,
0.20319566130638123,
0.2351166009902954,
0.1567690521478653,
-0.19079524278640747,
0.18787334859371185,
-0.08363431692123413,
0.2569766640663147,
0.4046112895011902,
0.21177680790424347,
0.13228492438793182,
0.09865961223840714,
-0.09338550269603729,
-0.1742669641971588,
0.16311484575271606,
-0.3341968059539795,
0.5841134190559387,
0.18201276659965515,
0.07171262800693512,
0.05486191064119339,
-0.09033507108688354,
0.18085618317127228,
0.237869992852211,
-0.32484304904937744,
0.08841390162706375,
0.10941451787948608,
0.28140151500701904,
0.3797246515750885,
-0.23124447464942932,
-0.21808959543704987,
0.02074110507965088,
-0.23226657509803772,
-0.07661919295787811,
-0.29554489254951477,
-0.28968796133995056,
-0.47262898087501526,
-0.17646679282188416,
0.03263315558433533,
-0.2177872508764267,
0.35865843296051025,
0.17614591121673584,
-0.004105404019355774,
-0.3209913671016693,
0.02777073159813881,
-0.22090396285057068,
-0.07933517545461655,
-0.030345002189278603,
0.3630644381046295,
0.11455845087766647,
-0.1080797016620636,
0.2044369876384735,
0.34495028853416443,
0.18110637366771698,
0.20499195158481598,
0.0664624571800232,
0.04091038182377815,
0.19171567261219025,
-0.025057725608348846,
-0.07589760422706604,
0.33433425426483154,
-0.02583158016204834,
0.24607260525226593,
0.19304712116718292,
0.17586450278759003,
-0.2258743941783905,
0.13177792727947235,
0.4836494028568268,
0.17244026064872742,
-0.13795460760593414,
0.10594876110553741,
-0.4913063943386078,
0.18097630143165588,
-0.3183493912220001,
-0.048285551369190216,
-0.37930116057395935,
-0.13329926133155823,
0.33052724599838257,
-0.1352652609348297,
0.13456210494041443,
0.07683823257684708,
0.11046715080738068,
0.0673261284828186,
0.49361953139305115,
0.38537368178367615,
0.33219072222709656,
-0.46574732661247253,
-0.11692540347576141,
-0.5569059252738953,
0.10857734084129333,
0.050856031477451324,
0.08399524539709091,
-0.03495270758867264,
0.0864710807800293,
0.5793501734733582,
0.4553443193435669,
0.2812594175338745,
0.12979333102703094,
-0.26638633012771606,
0.17007647454738617,
-0.3078097105026245,
-0.07280856370925903,
0.07532357424497604,
0.3558690845966339,
-0.18802356719970703,
-0.1337626874446869,
0.044823240488767624,
-0.08833155781030655,
0.042894624173641205,
-0.15458357334136963,
-0.28902149200439453,
0.2012949287891388,
0.026072908192873,
0.09159353375434875,
0.05753367394208908,
0.34879231452941895,
-0.19187262654304504,
0.31043675541877747,
0.11706028878688812,
-0.28381115198135376,
-0.0762261301279068,
0.3920159637928009,
-0.04683369770646095,
0.46381688117980957,
-0.1197870597243309,
0.18866795301437378,
-0.015225843526422977,
0.13424375653266907,
0.08245512843132019,
-0.13775700330734253,
-0.4191015064716339,
0.10972685366868973,
0.14627951383590698,
0.005186896305531263,
-0.05099038407206535,
0.3429950773715973,
-0.0020060166716575623,
0.1670835167169571,
-0.09621978551149368,
-0.1518561989068985,
0.21852190792560577,
-0.3656322956085205,
-0.3418229818344116,
-0.07875009626150131,
0.10990609228610992,
0.2867901921272278,
0.022097591310739517,
-0.29976657032966614,
0.15846216678619385,
0.3886457085609436,
0.05867292732000351,
0.23600691556930542,
0.30538514256477356,
-0.0925670713186264,
0.2856920659542084,
-0.04117480292916298,
-0.40880459547042847,
0.23993584513664246,
-0.009883373975753784,
-0.11493845283985138,
-0.4027515649795532
] |
https://github.com/huggingface/datasets/issues/2190 | News_commentary Dataset Translation Pairs are of Incorrect Language Specified Pairs | Hello @albertvillanova,
Thanks for the suggestion. I didn't know you could do that. however, it didn't resolve the issue

| I used load_dataset to load the news_commentary dataset for "ar-en" translation pairs but found translations from Arabic to Hindi.
```
train_ds = load_dataset("news_commentary", "ar-en", split='train[:98%]')
val_ds = load_dataset("news_commentary", "ar-en", split='train[98%:]')
# filtering out examples that are not ar-en translations but ar-hi
val_ds = val_ds.filter(lambda example, indice: indice not in chain(range(1312,1327) ,range(1384,1399), range(1030,1042)), with_indices=True)
```
* I'm fairly new to using datasets so I might be doing something wrong | 20 | News_commentary Dataset Translation Pairs are of Incorrect Language Specified Pairs
I used load_dataset to load the news_commentary dataset for "ar-en" translation pairs but found translations from Arabic to Hindi.
```
train_ds = load_dataset("news_commentary", "ar-en", split='train[:98%]')
val_ds = load_dataset("news_commentary", "ar-en", split='train[98%:]')
# filtering out examples that are not ar-en translations but ar-hi
val_ds = val_ds.filter(lambda example, indice: indice not in chain(range(1312,1327) ,range(1384,1399), range(1030,1042)), with_indices=True)
```
* I'm fairly new to using datasets so I might be doing something wrong
Hello @albertvillanova,
Thanks for the suggestion. I didn't know you could do that. however, it didn't resolve the issue

| [
-0.20709186792373657,
0.1082225888967514,
-0.17505034804344177,
0.32578760385513306,
-0.11737151443958282,
0.10630907863378525,
0.2994767427444458,
0.2640416920185089,
-0.04221062362194061,
-0.26377934217453003,
-0.28765636682510376,
0.2302989661693573,
0.228669211268425,
0.18732726573944092,
-0.0158623605966568,
-0.18735124170780182,
0.06028412654995918,
-0.11624106764793396,
-0.07667146623134613,
-0.207841157913208,
-0.12069284915924072,
0.4833289682865143,
-0.15542739629745483,
0.0874612033367157,
-0.019855456426739693,
-0.07573124766349792,
0.1117977499961853,
-0.008534662425518036,
0.08585479110479355,
-0.07312441617250443,
0.08227880299091339,
0.26148292422294617,
0.10844849795103073,
0.006969168782234192,
-0.00011245696805417538,
0.03885322064161301,
0.1481902301311493,
-0.18047243356704712,
-0.15092280507087708,
-0.2352926880121231,
-0.1899530291557312,
-0.19161242246627808,
0.04943941533565521,
-0.23319503664970398,
-0.04862743616104126,
-0.5036551356315613,
-0.2592267692089081,
-0.6031262874603271,
0.49658340215682983,
0.4825665354728699,
0.23108124732971191,
0.15923215448856354,
-0.08024144917726517,
-0.040868815034627914,
0.11384885013103485,
-0.06149086356163025,
0.12423693388700485,
0.30942660570144653,
0.4024915099143982,
0.28476354479789734,
-0.2044498324394226,
0.40414565801620483,
-0.22827056050300598,
-0.11407768726348877,
-0.35245510935783386,
-0.1065051406621933,
0.15206024050712585,
-0.348244845867157,
0.2825843095779419,
0.2758643627166748,
0.5080475211143494,
-0.1678183376789093,
-0.19932518899440765,
-0.1636422574520111,
-0.13946378231048584,
0.2181408703327179,
0.17074137926101685,
0.1603754758834839,
-0.2545473277568817,
0.41653844714164734,
0.02351212128996849,
-0.13330473005771637,
0.2564956545829773,
0.27408576011657715,
0.08195285499095917,
0.0065441131591796875,
0.026174116879701614,
0.14739695191383362,
-0.026523064821958542,
-0.2402656227350235,
0.21948370337486267,
-0.18353614211082458,
-0.039417851716279984,
0.3342428505420685,
-0.42082300782203674,
0.09484744071960449,
-0.27157604694366455,
-0.11118379980325699,
-0.03618750721216202,
-0.2702118754386902,
-0.21596643328666687,
0.22903749346733093,
-0.21243420243263245,
0.01768215373158455,
0.11015693843364716,
0.020424559712409973,
0.27494746446609497,
0.14093030989170074,
-0.11453773081302643,
-0.22190694510936737,
-0.055082615464925766,
0.3491464853286743,
-0.07473988085985184,
-0.385444700717926,
-0.3508569598197937,
-0.007530201226472855,
-0.03939894959330559,
-0.19182948768138885,
-0.4289533197879791,
0.18375879526138306,
-0.4606360197067261,
-0.4549329876899719,
-0.07408761978149414,
0.12137780338525772,
0.1983213871717453,
0.07357610762119293,
0.14562517404556274,
0.3672659397125244,
-0.11848930269479752,
-0.5046817064285278,
-0.18600504100322723,
0.058504994958639145,
-0.21994353830814362,
-0.03500810265541077,
0.10841402411460876,
-0.038663122802972794,
0.3271981477737427,
0.08962360769510269,
0.00915326178073883,
-0.23448936641216278,
-0.06780798733234406,
-0.20754453539848328,
-0.0875820443034172,
-0.07453262805938721,
0.15888924896717072,
0.36075305938720703,
0.16695711016654968,
-0.2650855779647827,
0.014560364186763763,
0.3440951108932495,
-0.4482042193412781,
0.31660377979278564,
-0.20729973912239075,
0.13576772809028625,
-0.2083461880683899,
-0.014542005956172943,
-0.2116771936416626,
0.7168804407119751,
0.29362908005714417,
-0.16619734466075897,
-0.03694695979356766,
-0.00939328595995903,
-0.14571577310562134,
-0.023739079013466835,
0.07679440081119537,
0.33615535497665405,
-0.8569790720939636,
-0.1413988322019577,
0.21794943511486053,
-0.05592202767729759,
0.16493304073810577,
0.4651122987270355,
-0.2521306276321411,
0.22062724828720093,
-0.27031558752059937,
-0.06203676387667656,
0.26394015550613403,
0.1395995318889618,
-0.11557728052139282,
0.030495882034301758,
0.12793868780136108,
0.1764545440673828,
0.17024020850658417,
0.06757046282291412,
0.20283560454845428,
-0.0669737234711647,
0.25570154190063477,
0.33198869228363037,
0.20474873483181,
0.019182248041033745,
-0.2515002489089966,
-0.2176719754934311,
0.7432217597961426,
0.13926619291305542,
0.3220183551311493,
0.08561093360185623,
0.2037651091814041,
0.10420303791761398,
0.4789544939994812,
0.07018385827541351,
0.11009884625673294,
0.21354112029075623,
-0.4879888892173767,
0.013660524040460587,
0.11813417077064514,
-0.0065687596797943115,
-0.23728519678115845,
0.05259189009666443,
-0.19224666059017181,
0.24025794863700867,
0.09761610627174377,
0.09466056525707245,
-0.5183297395706177,
-0.2205011248588562,
-0.1496955156326294,
0.1412651538848877,
0.1538340300321579,
-0.004762463271617889,
-0.3061057925224304,
0.40996575355529785,
0.01663917675614357,
0.31818947196006775,
-0.40551701188087463,
-0.14110618829727173,
-0.5065097212791443,
0.5023490786552429,
0.20465514063835144,
-0.19490019977092743,
0.03607029467821121,
0.04168189316987991,
0.20797836780548096,
0.028468525037169456,
-0.25286734104156494,
0.0272007267922163,
0.19035618007183075,
0.4163329005241394,
-0.06803659349679947,
0.028549283742904663,
0.17700040340423584,
-0.5377518534660339,
0.10771075636148453,
0.27044278383255005,
-0.016698800027370453,
-0.024304550141096115,
0.05953233316540718,
0.5245121717453003,
-0.08736288547515869,
0.12528091669082642,
-0.14908668398857117,
0.03689175844192505,
0.4804254472255707,
0.10639557242393494,
-0.13846616446971893,
-0.38120296597480774,
0.17894835770130157,
0.27831295132637024,
0.34802567958831787,
0.5137360692024231,
-0.04837340861558914,
0.009833484888076782,
0.45018842816352844,
0.10223449766635895,
0.13605539500713348,
0.23857027292251587,
-0.10305724292993546,
-0.17073941230773926,
-0.03702457249164581,
0.16849347949028015,
0.06580840051174164,
0.19913001358509064,
0.0308088306337595,
-0.09148611128330231,
0.15792036056518555,
-0.133971706032753,
0.19614964723587036,
-0.03735531121492386,
0.31820690631866455,
-0.014592595398426056,
-0.07557014375925064,
-0.16974814236164093,
-0.41377687454223633,
0.2959267199039459,
0.2264297753572464,
0.2362150400876999,
-0.36826416850090027,
0.018477844074368477,
-0.4315111041069031,
-0.4144335389137268,
-0.3770638704299927,
-0.23378701508045197,
-0.205153226852417,
-0.2250041961669922,
0.12898284196853638,
-0.3780670762062073,
-0.0888223946094513,
0.2565275728702545,
0.13777600228786469,
-0.018258213996887207,
-0.09607712179422379,
-0.05355602502822876,
-0.11468124389648438,
-0.24187149107456207,
-0.2124232053756714,
0.12371388077735901,
0.22019419074058533,
0.06566561013460159,
0.04105450585484505,
-0.3897135555744171,
-0.4834824204444885,
-0.18789389729499817,
-0.41039225459098816,
-0.001565154641866684,
-0.2613317370414734,
0.1828639805316925,
-0.14277052879333496,
0.314156174659729,
-0.09857244789600372,
-0.28791162371635437,
0.08589200675487518,
0.32144543528556824,
-0.1512867659330368,
0.07685515284538269,
-0.17687581479549408,
0.14279264211654663,
0.0454220287501812,
-0.7031232118606567,
-0.3522696793079376,
-0.16562877595424652,
-0.2152811735868454,
-0.19198016822338104,
0.11470989882946014,
-0.3081681728363037,
0.0880977064371109,
-0.056302882730960846,
-0.07726196199655533,
0.0004886426031589508,
-0.5082883834838867,
-0.1679229885339737,
0.24928253889083862,
0.03213656321167946,
-0.2306918054819107,
-0.12067177891731262,
0.04426898807287216,
0.17177249491214752,
-0.11493457108736038,
-0.18497709929943085,
0.2866247594356537,
-0.12482133507728577,
0.2030002772808075,
0.07200425863265991,
-0.15070639550685883,
-0.01010286808013916,
-0.12097307294607162,
0.08214867860078812,
-0.09422442317008972,
-0.2967146635055542,
0.20794427394866943,
-0.023784078657627106,
0.21008434891700745,
0.060333386063575745,
0.24782851338386536,
-0.20296619832515717,
0.3356174826622009,
0.17058274149894714,
-0.21079327166080475,
0.44120630621910095,
0.01886599138379097,
0.0747186616063118,
-0.12530171871185303,
-0.21156449615955353,
-0.060449764132499695,
0.1711615025997162,
-0.07598434388637543,
0.45317715406417847,
-0.2013956904411316,
-0.5693996548652649,
-0.08565026521682739,
-0.15517371892929077,
-0.5203017592430115,
-0.12762951850891113,
0.04476204514503479,
-0.5405316352844238,
0.11577440798282623,
0.12559594213962555,
-0.04639601334929466,
0.09341152012348175,
-0.21878281235694885,
-0.015963833779096603,
-0.10844413936138153,
-0.08683111518621445,
0.30021584033966064,
-0.4213475286960602,
-0.10290616750717163,
-0.00971357524394989,
0.08560285717248917,
0.025489533320069313,
0.4773222506046295,
-0.2653152644634247,
0.12757688760757446,
0.23030535876750946,
0.229108989238739,
0.5325818657875061,
-0.0887979045510292,
-0.041277214884757996,
0.11727935075759888,
0.1922929733991623,
-0.24395693838596344,
-0.16295230388641357,
-0.2884436845779419,
0.1725550889968872,
0.2764638066291809,
0.15221518278121948,
-0.19783073663711548,
-0.16848711669445038,
-0.04182252287864685,
0.3355359435081482,
-0.3215470612049103,
0.07124944031238556,
-0.21771082282066345,
-0.23287591338157654,
-0.2509145140647888,
0.01982266455888748,
0.19669954478740692,
0.10711506754159927,
-0.05078088492155075,
-0.037297990173101425,
0.13129502534866333,
0.1556154489517212,
0.23222938179969788,
0.21586093306541443,
0.3609079420566559,
0.3124881386756897,
0.0315982960164547,
0.04245098680257797,
0.09424667060375214,
-0.1116563081741333,
0.42736637592315674,
0.1121567040681839,
-0.42716944217681885,
-0.06427351385354996,
-0.4153340756893158,
0.32322290539741516,
0.17681418359279633,
-0.18400821089744568,
0.3443754017353058,
0.121460922062397,
-0.2251703292131424,
0.17168579995632172,
-0.1061776801943779,
0.3313925564289093,
0.19410693645477295,
-0.22313448786735535,
-0.6060093641281128,
0.13681632280349731,
-0.14938975870609283,
-0.2557845115661621,
0.2395675778388977,
-0.026622377336025238,
-0.3724319338798523,
0.48520469665527344,
0.16786721348762512,
1.0589585304260254,
-0.035157211124897,
-0.10655198991298676,
0.08052970468997955,
-0.1452811062335968,
0.16840139031410217,
0.17855039238929749,
-0.28066176176071167,
-0.2597341239452362,
0.23656480014324188,
0.039807505905628204,
0.1408507078886032,
0.11402739584445953,
0.31151556968688965,
-0.2300712913274765,
0.046827103942632675,
-0.10893172025680542,
-0.38864442706108093,
0.24235014617443085,
0.048388347029685974,
0.17968662083148956,
-0.14126257598400116,
-0.4036935567855835,
0.08557816594839096,
-0.21822713315486908,
-0.06898805499076843,
-0.05555063486099243,
-0.027217760682106018,
0.06296460330486298,
-0.11325572431087494,
-0.2976604104042053,
0.02124509960412979,
-0.29342198371887207,
0.1737208217382431,
-0.1397775411605835,
0.00011356920003890991,
0.2800721228122711,
0.599994957447052,
0.3800118565559387,
0.09677565097808838,
0.10273687541484833,
0.14099851250648499,
0.06952004134654999,
0.14108501374721527,
0.18377411365509033,
-0.06121555343270302,
0.21311232447624207,
0.045228712260723114,
-0.3418717384338379,
0.24242421984672546,
0.06674132496118546,
0.029260940849781036,
-0.42005598545074463,
-0.08343334496021271,
0.14531183242797852,
0.01659199967980385,
-0.16688798367977142,
0.1984102427959442,
0.05863868072628975,
-0.1752559095621109,
0.09115715324878693,
0.18270201981067657,
-0.10868865996599197,
0.13058672845363617,
-0.1456710249185562,
-0.4750139117240906,
-0.11506550014019012,
0.4618608057498932,
0.5040041208267212,
-0.15159288048744202,
0.5482200384140015,
0.3820112943649292,
-0.19955943524837494,
-0.19211146235466003,
0.04858970642089844,
-0.10495657473802567,
-0.6128007173538208,
0.11952279508113861,
0.0028251218609511852,
-0.13123837113380432,
-0.244166299700737,
0.1862151026725769,
-0.004113458096981049,
0.19080370664596558,
0.09728533029556274,
-0.41006001830101013,
0.026074646040797234,
0.14702321588993073,
0.16943798959255219,
-0.1030796468257904,
0.15049684047698975,
-0.39706259965896606,
0.059529103338718414,
0.11247923225164413,
-0.284650057554245,
0.0799204483628273,
-0.14394360780715942,
0.30358168482780457,
-0.29760539531707764,
0.22101372480392456,
0.07543478161096573,
-0.019517725333571434,
0.035982027649879456,
-0.2703357934951782,
0.07767350226640701,
-0.16768541932106018,
-0.19230353832244873,
0.08557260781526566,
-0.1444278061389923,
0.11854343861341476,
-0.010399412363767624,
-0.23356632888317108,
0.20744341611862183,
-0.015241842716932297,
0.22017036378383636,
0.4723275303840637,
0.11441132426261902,
0.17018897831439972,
-0.04764382168650627,
-0.2262437641620636,
-0.3558192849159241,
-0.1969032734632492,
0.06184060871601105,
-0.15621830523014069,
0.13228948414325714,
0.14472845196723938,
0.17056013643741608,
-0.09897133708000183,
-0.026047753170132637,
0.04260857403278351,
-0.00466088205575943,
0.20628342032432556,
-0.004849225282669067,
-0.2688601613044739,
0.17099162936210632,
0.022515919059515,
0.1297854632139206,
0.09683528542518616,
-0.2307148426771164,
-0.1970708966255188,
0.18620917201042175,
0.14507989585399628,
-0.5371160507202148,
0.0039227185770869255,
0.48996323347091675,
-0.20881518721580505,
0.10460703074932098,
0.25143882632255554,
0.29559069871902466,
0.17681381106376648,
0.19962544739246368,
-0.22145265340805054,
0.25994348526000977,
-0.0738697350025177,
0.2285895049571991,
0.40262365341186523,
0.11895386874675751,
0.15797320008277893,
0.1433979868888855,
-0.08104659616947174,
-0.1764240860939026,
0.15470141172409058,
-0.31038859486579895,
0.5803029537200928,
0.2122042179107666,
0.09439937770366669,
0.05737484619021416,
-0.1589539498090744,
0.21360993385314941,
0.24715587496757507,
-0.2911059856414795,
0.16038990020751953,
0.1672292947769165,
0.2373124361038208,
0.39928746223449707,
-0.23981797695159912,
-0.23518714308738708,
0.006519977003335953,
-0.23581716418266296,
-0.048442404717206955,
-0.3694182336330414,
-0.3110378086566925,
-0.47322970628738403,
-0.16401216387748718,
-0.03639284148812294,
-0.18103496730327606,
0.3520991802215576,
0.13791149854660034,
-0.022674255073070526,
-0.35632702708244324,
0.045066043734550476,
-0.25280600786209106,
-0.14946994185447693,
0.012407492846250534,
0.4107271432876587,
0.07139891386032104,
-0.08165736496448517,
0.3319815993309021,
0.41655534505844116,
0.11296160519123077,
0.22152459621429443,
0.2037566751241684,
-0.007583842612802982,
0.20022587478160858,
0.07482916116714478,
-0.10674288868904114,
0.35026976466178894,
-0.025674261152744293,
0.17862503230571747,
0.24343861639499664,
0.16104698181152344,
-0.19045135378837585,
0.08120711147785187,
0.4890146553516388,
0.2658087909221649,
-0.03328893706202507,
0.006543941795825958,
-0.5003947019577026,
0.2084721028804779,
-0.29831841588020325,
-0.05864230543375015,
-0.25634270906448364,
-0.13033370673656464,
0.30031728744506836,
-0.18500028550624847,
0.16474109888076782,
0.12641817331314087,
0.11506867408752441,
0.06579592823982239,
0.6010000705718994,
0.3236117362976074,
0.23098152875900269,
-0.3963489532470703,
-0.18945817649364471,
-0.5788679122924805,
0.1657884120941162,
0.084720179438591,
0.13648973405361176,
0.0024744844995439053,
0.10107250511646271,
0.6250317096710205,
0.38403844833374023,
0.2882040739059448,
0.18616746366024017,
-0.3260056674480438,
0.15045025944709778,
-0.3130932152271271,
-0.08150605857372284,
0.12247486412525177,
0.3754116892814636,
-0.1949741095304489,
-0.09709839522838593,
0.1322987973690033,
0.005493488162755966,
0.028595522046089172,
-0.11303937435150146,
-0.328051894903183,
0.181362122297287,
0.029579222202301025,
0.07408987730741501,
0.032003309577703476,
0.2794812321662903,
-0.1914895474910736,
0.34294408559799194,
0.04644392430782318,
-0.3566102385520935,
-0.11673125624656677,
0.40837132930755615,
-0.07683658599853516,
0.4339626133441925,
-0.12120731174945831,
0.26145222783088684,
0.023343687877058983,
0.05353812873363495,
0.06989708542823792,
-0.011545387096703053,
-0.5153926610946655,
0.09009116142988205,
0.08369862288236618,
0.05252108722925186,
-0.06564589589834213,
0.33929938077926636,
0.037298783659935,
0.1431981474161148,
-0.11790415644645691,
-0.16916918754577637,
0.23179949820041656,
-0.32271432876586914,
-0.30618783831596375,
-0.012973633594810963,
0.1450245976448059,
0.3385319113731384,
-0.01587187685072422,
-0.2886613607406616,
0.11989475041627884,
0.39384737610816956,
0.051323436200618744,
0.2838503122329712,
0.22978779673576355,
-0.19011282920837402,
0.2200772613286972,
-0.06678352504968643,
-0.44329968094825745,
0.28865885734558105,
-0.02132142148911953,
-0.09405817091464996,
-0.3443763256072998
] |
https://github.com/huggingface/datasets/issues/2189 | save_to_disk doesn't work when we use concatenate_datasets function before creating the final dataset_object. | Hi ! We refactored save_to_disk in #2025 so this doesn't happen.
Feel free to try it on master for now
We'll do a new release soon | As you can see, it saves the entire dataset.
@lhoestq
You can check by going through the following example,
```
from datasets import load_from_disk,concatenate_datasets
loaded_data=load_from_disk('/home/gsir059/HNSW-ori/my_knowledge_dataset')
n=20
kb_list=[loaded_data.shard(n, i, contiguous=True) for i in range(n)]
final_dataset=concatenate_datasets([kb_list[1],kb_list[2]])
final_dataset.save_to_disk('/home/gsir059/haha/k.arrow')
``` | 26 | save_to_disk doesn't work when we use concatenate_datasets function before creating the final dataset_object.
As you can see, it saves the entire dataset.
@lhoestq
You can check by going through the following example,
```
from datasets import load_from_disk,concatenate_datasets
loaded_data=load_from_disk('/home/gsir059/HNSW-ori/my_knowledge_dataset')
n=20
kb_list=[loaded_data.shard(n, i, contiguous=True) for i in range(n)]
final_dataset=concatenate_datasets([kb_list[1],kb_list[2]])
final_dataset.save_to_disk('/home/gsir059/haha/k.arrow')
```
Hi ! We refactored save_to_disk in #2025 so this doesn't happen.
Feel free to try it on master for now
We'll do a new release soon | [
-0.25447648763656616,
0.036902934312820435,
-0.07479122281074524,
0.023532312363386154,
0.20227763056755066,
0.2077019214630127,
0.31474462151527405,
0.37458536028862,
-0.07030709832906723,
0.2908633351325989,
-0.10103654861450195,
0.1949494332075119,
0.0023285141214728355,
0.2046324610710144,
-0.05197807401418686,
0.18728186190128326,
0.3261984586715698,
0.2545652985572815,
-0.20249029994010925,
-0.13185709714889526,
-0.36871233582496643,
0.3375607132911682,
-0.08716637641191483,
-0.3545357584953308,
-0.2599397599697113,
0.13032248616218567,
-0.370202898979187,
0.18012696504592896,
0.08679436892271042,
-0.09327378869056702,
0.1130666583776474,
0.03039618954062462,
0.17949460446834564,
0.16137570142745972,
-0.00010241957352263853,
-0.01839279755949974,
0.09843447804450989,
-0.23015096783638,
-0.5061355233192444,
0.0002734661102294922,
-0.04543393477797508,
-0.4297146797180176,
-0.031801559031009674,
-0.2701205611228943,
0.05549841374158859,
0.030688710510730743,
-0.02648731879889965,
-0.3492642641067505,
0.15955184400081635,
0.13463297486305237,
0.30926287174224854,
-0.061512541025877,
0.22639258205890656,
-0.12412818521261215,
0.09259306639432907,
-0.06195142865180969,
-0.15976011753082275,
-0.017489716410636902,
-0.3068612515926361,
0.07662470638751984,
0.18386629223823547,
0.2538933753967285,
-0.05206451192498207,
-0.1528070569038391,
0.10297280550003052,
0.331537663936615,
0.20000335574150085,
-0.3587838411331177,
0.1949591040611267,
0.050801053643226624,
0.3223496675491333,
-0.42280104756355286,
-0.32152608036994934,
-0.14212749898433685,
-0.07083988189697266,
-0.41460147500038147,
0.06880931556224823,
0.27252039313316345,
-0.0372714065015316,
0.1376820206642151,
-0.21045264601707458,
-0.09434546530246735,
-0.06981952488422394,
0.08589676022529602,
-0.09707917273044586,
-0.057837024331092834,
-0.2149946689605713,
0.04838567599654198,
0.4175906777381897,
-0.20344436168670654,
0.07561085373163223,
-0.49409496784210205,
-0.01867743209004402,
-0.09915190935134888,
-0.37178918719291687,
-0.06628809869289398,
-0.038204893469810486,
-0.13027724623680115,
0.11777817457914352,
0.16548074781894684,
0.15671159327030182,
0.017269711941480637,
0.28396594524383545,
0.13992883265018463,
0.1291773021221161,
0.1396842896938324,
0.21097838878631592,
0.0681462362408638,
0.20357514917850494,
-0.12109869718551636,
0.011574562638998032,
0.007594116032123566,
0.15972746908664703,
-0.06216439977288246,
0.3084390163421631,
-0.16791144013404846,
0.24255169928073883,
-0.031923167407512665,
-0.09980626404285431,
0.2859278917312622,
0.23497629165649414,
0.06556046009063721,
-0.24241527915000916,
0.31844285130500793,
0.04084758833050728,
0.1560945212841034,
-0.05972142145037651,
0.31905949115753174,
0.17888721823692322,
0.0181819349527359,
-0.33258771896362305,
-0.1384912133216858,
0.041994642466306686,
0.16509556770324707,
0.10610856115818024,
-0.16817855834960938,
0.2190975397825241,
-0.13215766847133636,
0.12505373358726501,
0.013527218252420425,
-0.03492605686187744,
-0.27643343806266785,
0.3223589360713959,
0.26347047090530396,
0.3512491285800934,
-0.0020951051265001297,
-0.00246381014585495,
-0.36959123611450195,
-0.14274334907531738,
0.2944759726524353,
-0.09112628549337387,
-0.16715294122695923,
-0.22896943986415863,
0.3325921893119812,
-0.08900400251150131,
0.1589021384716034,
-0.3129998743534088,
0.13941094279289246,
0.31604573130607605,
0.05207645520567894,
-0.17314302921295166,
-0.11795705556869507,
-0.12837181985378265,
-0.5556749701499939,
0.37782061100006104,
0.14881505072116852,
-0.04924336448311806,
0.14137177169322968,
-0.04395998269319534,
-0.07546412944793701,
0.08340174704790115,
0.12711426615715027,
0.02350853569805622,
0.07569610327482224,
-0.3151821494102478,
0.41413575410842896,
0.3489592969417572,
-0.09660688787698746,
-0.3720923066139221,
0.16935661435127258,
-0.012668997049331665,
-0.034488797187805176,
0.08727461099624634,
0.15821073949337006,
0.27188000082969666,
-0.07213400304317474,
0.24812671542167664,
0.28177863359451294,
0.08365387469530106,
0.03359687328338623,
-0.3789058327674866,
0.10187985002994537,
-0.042809322476387024,
-0.1003161370754242,
-0.22336961328983307,
0.2506658434867859,
0.08712789416313171,
-0.12966886162757874,
0.38150888681411743,
-0.2515323758125305,
0.26968374848365784,
0.438035786151886,
0.2545841634273529,
-0.29481005668640137,
-0.14046937227249146,
0.12508901953697205,
-0.6262159943580627,
0.12824752926826477,
0.2535209059715271,
-0.16699039936065674,
0.008517853915691376,
-0.1840660274028778,
-0.06598913669586182,
0.12497679144144058,
-0.24295146763324738,
0.05085500702261925,
0.29637572169303894,
0.26822686195373535,
0.10498413443565369,
-0.03793363273143768,
-0.13913944363594055,
0.19486168026924133,
-0.06774373352527618,
0.008913001976907253,
-0.2562568783760071,
0.2754267752170563,
-0.1660950630903244,
-0.34400928020477295,
0.004062969237565994,
0.03959963098168373,
0.1255233883857727,
-0.04867614060640335,
-0.0014977045357227325,
0.5335174202919006,
-0.1285199671983719,
0.06457174569368362,
-0.07408776134252548,
-0.052881523966789246,
-0.033474862575531006,
0.030207213014364243,
0.07481089979410172,
0.07017653435468674,
0.17002390325069427,
-0.06471174210309982,
-0.34010347723960876,
0.34523648023605347,
0.10253223031759262,
0.2119351476430893,
0.2155987173318863,
-0.005121767520904541,
0.17247118055820465,
-0.14356619119644165,
0.011430539190769196,
-0.2770320177078247,
-0.09964723885059357,
0.11606539785861969,
0.153486967086792,
-0.04188481718301773,
-0.1850671023130417,
0.2772960960865021,
0.5342245101928711,
0.004786871373653412,
0.2684757709503174,
0.15920262038707733,
-0.32284754514694214,
-0.22007966041564941,
-0.05127273499965668,
0.29499319195747375,
0.5205634832382202,
0.2487684041261673,
0.2373424470424652,
-0.07393573224544525,
-0.022697042673826218,
-0.15030056238174438,
0.32395243644714355,
-0.009243600070476532,
0.19379174709320068,
0.4255509376525879,
0.07222002744674683,
-0.1734609752893448,
-0.24584466218948364,
0.2164747416973114,
-0.08046404272317886,
0.08856457471847534,
-0.22869804501533508,
-0.13949140906333923,
-0.18800176680088043,
0.12805846333503723,
-0.15935449302196503,
-0.1150401383638382,
-0.18172115087509155,
-0.5245653390884399,
-0.1320968121290207,
0.49938711524009705,
-0.18427179753780365,
-0.0487552285194397,
0.16413000226020813,
0.07066236436367035,
-0.00391392782330513,
-0.19580726325511932,
-0.07523185014724731,
0.0643513947725296,
-0.12509700655937195,
0.21304500102996826,
-0.05665532127022743,
-0.1815362125635147,
0.2067795693874359,
-0.1099688932299614,
0.15889425575733185,
-0.38106516003608704,
-0.07275157421827316,
0.006004538387060165,
-0.16339443624019623,
0.007264226675033569,
0.05311372131109238,
0.24063995480537415,
-0.06691447645425797,
-0.20531776547431946,
0.1579134315252304,
0.03429762274026871,
-0.20097723603248596,
0.32233726978302,
0.14045993983745575,
-0.15376903116703033,
-0.19582360982894897,
-0.2867220938205719,
-0.1278877556324005,
-0.3667711913585663,
0.24082647264003754,
0.04253006353974342,
0.1054975688457489,
0.04707695543766022,
0.3343973457813263,
0.05076852813363075,
0.1509000062942505,
-0.13254208862781525,
-0.26675766706466675,
-0.4190298020839691,
0.5335768461227417,
-0.3335798680782318,
-0.4781666100025177,
0.24543169140815735,
-0.08325614035129547,
0.028726758435368538,
0.07843606919050217,
-0.4200793504714966,
-0.051572464406490326,
-0.08736075460910797,
0.041065070778131485,
-0.08416299521923065,
0.24447548389434814,
0.29063495993614197,
0.14833123981952667,
-0.15503481030464172,
-0.15389829874038696,
-0.2125999927520752,
0.25712940096855164,
0.11140415817499161,
0.34425589442253113,
-0.19543814659118652,
0.13380113244056702,
0.1407625377178192,
0.15449967980384827,
0.18095698952674866,
0.10470807552337646,
0.3695560097694397,
0.10158447921276093,
0.5001896619796753,
-0.3050989806652069,
-0.21661895513534546,
-0.12639112770557404,
-0.16310718655586243,
-0.05708429962396622,
0.15867628157138824,
0.014714465476572514,
0.04586344212293625,
-0.011292275041341782,
-0.03821912035346031,
-0.10916920006275177,
-0.31775614619255066,
0.06517574191093445,
0.12240903824567795,
0.1376289278268814,
-0.05861499160528183,
-0.01283717155456543,
0.11477059125900269,
0.03938226401805878,
-0.10080091655254364,
0.11926485598087311,
0.15170912444591522,
-0.11767087876796722,
-0.4989120066165924,
-0.027128208428621292,
-0.5107485055923462,
0.3123716115951538,
-0.053733281791210175,
0.06657560914754868,
0.1716882884502411,
-0.3388546407222748,
-0.12555652856826782,
-0.12147942930459976,
0.5472692251205444,
-0.10335960984230042,
-0.1469321846961975,
0.26477500796318054,
-0.02135494537651539,
-0.39005565643310547,
0.004992201924324036,
0.11358729004859924,
0.032296519726514816,
-0.09141245484352112,
0.4053325653076172,
-0.29433614015579224,
-0.0033263007644563913,
-0.0025431346148252487,
0.5030465126037598,
-0.29025760293006897,
0.05260177329182625,
-0.31011709570884705,
-0.1842460334300995,
-0.5458336472511292,
-0.2709190845489502,
-0.1587412804365158,
0.23140007257461548,
-0.14684666693210602,
-0.12652282416820526,
-0.19771802425384521,
-0.5551075339317322,
0.14497926831245422,
-0.17434054613113403,
0.5804964900016785,
0.06569626182317734,
0.3546786308288574,
-0.1276700645685196,
0.24577273428440094,
0.2979596257209778,
0.5010456442832947,
-0.2553139328956604,
-0.2001613974571228,
0.08323238790035248,
-0.21544942259788513,
0.3007061183452606,
0.20004743337631226,
-0.1495772898197174,
-0.1918494999408722,
-0.2488209307193756,
0.08438427001237869,
-0.1546163409948349,
0.042670004069805145,
0.04597434401512146,
-0.12627650797367096,
-0.3833073675632477,
-0.04533202201128006,
0.35728636384010315,
-0.11670899391174316,
0.11834757030010223,
-0.04122234880924225,
0.011802725493907928,
-0.32747599482536316,
0.4180617332458496,
-0.04036860913038254,
0.7842453122138977,
0.21048814058303833,
0.48156261444091797,
0.0452091321349144,
-0.07329516112804413,
0.03272024542093277,
0.09966422617435455,
0.13737565279006958,
-0.4184630215167999,
-0.14453242719173431,
0.03725150227546692,
-0.015411868691444397,
0.04157575964927673,
0.10349148511886597,
-0.44832485914230347,
0.14744293689727783,
-0.31086885929107666,
0.06244594603776932,
-0.21647489070892334,
0.11730921268463135,
-0.18342402577400208,
-0.41660282015800476,
-0.12218545377254486,
0.2904289960861206,
0.27581000328063965,
-0.09508176147937775,
0.11019487679004669,
-0.18928343057632446,
-0.2790112793445587,
-0.09530412405729294,
0.05963994562625885,
0.28438156843185425,
-0.129384383559227,
0.30615121126174927,
-0.3621833920478821,
-0.45055991411209106,
-0.5449163317680359,
0.33284318447113037,
0.38896656036376953,
0.10155609250068665,
-0.12394993007183075,
-0.1875552237033844,
0.01746203750371933,
0.012624339200556278,
-0.17849959433078766,
-0.1696203649044037,
0.2127753645181656,
-0.07242270559072495,
0.06666631251573563,
0.03996272012591362,
0.037254005670547485,
-0.17778274416923523,
-0.06931077688932419,
0.003245726227760315,
0.08495686948299408,
-0.22884178161621094,
-0.20247671008110046,
0.18485942482948303,
-0.2149602323770523,
-0.30110010504722595,
0.2421291619539261,
0.18236538767814636,
-0.23376567661762238,
0.23354488611221313,
-0.22846828401088715,
-0.048650871962308884,
-0.0894215852022171,
0.41233116388320923,
0.30135858058929443,
0.08987241983413696,
0.3267374336719513,
-0.17108897864818573,
-0.030790463089942932,
-0.2798592150211334,
0.26572564244270325,
-0.02104082703590393,
-0.0508863665163517,
0.3845865726470947,
-0.11558874696493149,
0.03569209575653076,
-0.1603340357542038,
0.34728020429611206,
-0.032477401196956635,
0.04312639683485031,
-0.05021153762936592,
-0.15767687559127808,
-0.40565261244773865,
-0.0964474231004715,
0.1587664633989334,
0.3276343047618866,
0.018735796213150024,
0.0800633430480957,
-0.08444738388061523,
0.1526058316230774,
-0.45654594898223877,
-0.06445284187793732,
-0.0799507275223732,
0.07909111678600311,
0.15359529852867126,
-0.007938943803310394,
0.22625534236431122,
-0.13518548011779785,
0.27220937609672546,
0.14518851041793823,
-0.0681956484913826,
-0.40869632363319397,
-0.06640425324440002,
0.06274547427892685,
0.05609777569770813,
0.09081197530031204,
-0.08686164766550064,
-0.221841499209404,
-0.09720064699649811,
-0.3641074299812317,
-0.06618314236402512,
0.00478760153055191,
-0.07879172265529633,
-0.009890271350741386,
0.21354906260967255,
0.24113184213638306,
0.1394852250814438,
-0.20319026708602905,
-0.06454044580459595,
0.1836988925933838,
-0.2426442950963974,
0.11014258116483688,
-0.22921617329120636,
-0.20557108521461487,
-0.11751078069210052,
-0.02150532603263855,
-0.05023790895938873,
0.006539728492498398,
0.19166946411132812,
-0.19496001303195953,
-0.3101610243320465,
-0.2141375094652176,
0.4370490610599518,
0.17474044859409332,
-0.2056213766336441,
-0.07583578675985336,
0.07385917752981186,
0.30586397647857666,
-0.13248872756958008,
-0.31512024998664856,
0.13745485246181488,
-0.18273170292377472,
0.019091244786977768,
0.15742206573486328,
0.1232963502407074,
-0.057354290038347244,
-0.27742111682891846,
0.10316663235425949,
0.13214966654777527,
-0.06687519699335098,
0.09434424340724945,
0.3355686068534851,
0.036353882402181625,
0.42153027653694153,
-0.02191871963441372,
0.15190844237804413,
0.20038685202598572,
0.46463334560394287,
-0.2015642523765564,
0.4510604441165924,
0.3531266152858734,
-0.20470666885375977,
0.04481642320752144,
-0.2510589063167572,
0.314880907535553,
-0.01243753731250763,
-0.12103724479675293,
0.2766670286655426,
0.08862727880477905,
-0.09248446673154831,
-0.1561167687177658,
-0.24166658520698547,
-0.18680836260318756,
0.29852423071861267,
-0.1953546702861786,
-0.13285480439662933,
0.19403856992721558,
-0.037272945046424866,
0.020010732114315033,
0.057337675243616104,
0.09277649223804474,
-0.39039182662963867,
0.27207475900650024,
-0.03133690357208252,
0.2085283100605011,
0.09385944902896881,
0.1055414006114006,
0.06666630506515503,
0.03308366984128952,
-0.19818700850009918,
0.013586228713393211,
0.19957461953163147,
0.01955026015639305,
-0.06962820887565613,
0.12158390879631042,
0.371181845664978,
0.3659864068031311,
0.09074731171131134,
0.2423740029335022,
0.14318546652793884,
-0.17490381002426147,
-0.16075900197029114,
-0.003674697130918503,
-0.012254483997821808,
0.04237274453043938,
0.4947177469730377,
0.2761059105396271,
-0.25842610001564026,
0.14844170212745667,
0.22573235630989075,
0.0316295400261879,
-0.23314760625362396,
0.15360145270824432,
0.03570510074496269,
-0.41021019220352173,
-0.06632040441036224,
-0.0989830270409584,
-0.28076544404029846,
-0.28766340017318726,
0.4731300175189972,
-0.10054168850183487,
0.1434699296951294,
-0.11040086299180984,
0.16542746126651764,
0.06163736432790756,
0.4518496096134186,
-0.06972537934780121,
-0.04464799910783768,
-0.3877369165420532,
-0.21343502402305603,
-0.4200604557991028,
0.022382430732250214,
0.1277051419019699,
0.21521970629692078,
-0.2014201581478119,
0.45831263065338135,
0.08157401531934738,
0.1868249922990799,
-0.10178528726100922,
-0.08727073669433594,
-0.01832558773458004,
0.331861287355423,
-0.20513828098773956,
-0.1092732846736908,
0.07714857161045074,
0.1314723938703537,
0.1458147168159485,
-0.464418888092041,
0.3085883557796478,
-0.010423816740512848,
0.2647193968296051,
0.02848188392817974,
0.2422059178352356,
0.1414976269006729,
0.13593989610671997,
0.39803341031074524,
0.12077362090349197,
0.10303454846143723,
-0.32974839210510254,
-0.21409174799919128,
0.11600876599550247,
0.032400403171777725,
-0.09651261568069458,
-0.011534057557582855,
0.14476068317890167,
0.35819634795188904,
-0.26362696290016174,
0.10542353987693787,
-0.044658929109573364,
-0.045223236083984375,
0.3222957253456116,
0.13396501541137695,
-0.08967602998018265,
0.271845281124115,
0.1822463870048523,
0.11334050446748734,
0.18580268323421478,
0.2558702826499939,
-0.1761450171470642,
0.29219576716423035,
-0.2606450319290161,
-0.4027802348136902,
0.3502841591835022,
-0.04068804159760475,
-0.22110697627067566,
-0.023840922862291336,
0.27127552032470703,
0.13728174567222595,
0.12399110198020935,
-0.5584982633590698,
-0.08265876024961472,
0.33412179350852966,
-0.1519654095172882,
-0.35712966322898865,
0.35379254817962646,
-0.10599339008331299,
-0.005755122750997543,
0.0049680061638355255,
0.333381712436676,
0.1975371241569519,
-0.4678482115268707,
-0.03250126540660858,
-0.45941853523254395
] |
https://github.com/huggingface/datasets/issues/2188 | Duplicate data in Timit dataset | Hi ! Thanks for reporting
If I recall correctly this has been recently fixed #1995
Can you try to upgrade your local version of `datasets` ?
```
pip install --upgrade datasets
``` | I ran a simple code to list all texts in Timit dataset and the texts were all the same.
Is this dataset corrupted?
**Code:**
timit = load_dataset("timit_asr")
print(*timit['train']['text'], sep='\n')
**Result:**
Would such an act of refusal be useful?
Would such an act of refusal be useful?
Would such an act of refusal be useful?
Would such an act of refusal be useful?
...
...
Would such an act of refusal be useful? | 32 | Duplicate data in Timit dataset
I ran a simple code to list all texts in Timit dataset and the texts were all the same.
Is this dataset corrupted?
**Code:**
timit = load_dataset("timit_asr")
print(*timit['train']['text'], sep='\n')
**Result:**
Would such an act of refusal be useful?
Would such an act of refusal be useful?
Would such an act of refusal be useful?
Would such an act of refusal be useful?
...
...
Would such an act of refusal be useful?
Hi ! Thanks for reporting
If I recall correctly this has been recently fixed #1995
Can you try to upgrade your local version of `datasets` ?
```
pip install --upgrade datasets
``` | [
-0.008559837937355042,
-0.3116269111633301,
-0.0845908522605896,
0.6408435106277466,
0.2972833514213562,
0.17986077070236206,
0.21272192895412445,
0.34836605191230774,
-0.3550940752029419,
0.06406441330909729,
-0.18485790491104126,
0.36077362298965454,
-0.03706923872232437,
0.1377495676279068,
0.1514657735824585,
0.17377278208732605,
-0.023120902478694916,
-0.007755301892757416,
-0.28967776894569397,
-0.2847212553024292,
-0.0019158758223056793,
0.16851937770843506,
-0.09286824613809586,
0.061681028455495834,
-0.0929965227842331,
0.24396833777427673,
-0.10596371442079544,
-0.16544294357299805,
-0.011092416942119598,
-0.29168784618377686,
0.03912823647260666,
0.13916422426700592,
-0.19569440186023712,
0.4862784743309021,
-0.00012116822472307831,
0.11767150461673737,
0.14195579290390015,
0.03844119608402252,
-0.2202284336090088,
-0.2915334701538086,
-0.11748389154672623,
-0.15145395696163177,
0.276820570230484,
-0.09301453083753586,
-0.1665942668914795,
0.008407157845795155,
0.08134497702121735,
-0.15152239799499512,
0.34222865104675293,
0.15505720674991608,
0.1326090395450592,
0.12510238587856293,
-0.03196404129266739,
0.12619762122631073,
0.22455143928527832,
0.13919419050216675,
0.042969875037670135,
0.115841805934906,
0.3519425094127655,
0.36541974544525146,
0.40907734632492065,
0.1617845743894577,
-0.2078806608915329,
0.2010410577058792,
-0.3571012318134308,
0.06070897728204727,
0.005046583712100983,
-0.10508562624454498,
-0.029572710394859314,
0.3857056796550751,
0.8181934356689453,
-0.34925925731658936,
-0.12907172739505768,
0.02660086750984192,
-0.04132155701518059,
-0.18246160447597504,
0.1129799634218216,
0.12791471183300018,
-0.21832206845283508,
0.16193920373916626,
-0.18778537213802338,
0.15239115059375763,
0.04134652763605118,
0.13060806691646576,
0.08171969652175903,
-0.3430476486682892,
-0.031661730259656906,
0.06687983125448227,
-0.09581178426742554,
0.0588131919503212,
0.12808668613433838,
-0.13153117895126343,
-0.038897302001714706,
-0.05307832360267639,
-0.09541606903076172,
-0.0338921993970871,
-0.5064445734024048,
-0.11930377036333084,
0.1723775863647461,
0.2862875461578369,
0.4710802137851715,
0.09888996183872223,
-0.2946043014526367,
-0.09156429022550583,
0.47529223561286926,
-0.06704913079738617,
-0.10209394246339798,
-0.05303183197975159,
-0.1388147622346878,
-0.27797141671180725,
-0.396797776222229,
-0.02619832009077072,
0.0038941041566431522,
0.0036781448870897293,
0.2771376967430115,
-0.07674545049667358,
0.3120041489601135,
-0.2282843142747879,
-0.588894248008728,
-0.09352109581232071,
-0.4488688111305237,
-0.091646708548069,
-0.13066063821315765,
-0.1027451679110527,
0.07751171290874481,
0.08744144439697266,
0.033571697771549225,
0.03183677792549133,
-0.21022702753543854,
-0.1265280395746231,
-0.10799428820610046,
-0.30614548921585083,
-0.017462696880102158,
-0.07775577902793884,
-0.009289637207984924,
-0.37473079562187195,
0.19590896368026733,
0.2917191684246063,
-0.030680768191814423,
-0.22820763289928436,
0.009642573073506355,
-0.18629895150661469,
-0.014130868017673492,
0.0944492369890213,
0.014046303927898407,
0.3920697569847107,
0.20788785815238953,
-0.08132050931453705,
0.055469758808612823,
0.28342676162719727,
-0.24667394161224365,
-0.1098552793264389,
0.11376620829105377,
0.14105308055877686,
-0.07665850967168808,
-0.11082231998443604,
-0.1702793538570404,
0.10283312201499939,
0.24032479524612427,
-0.1323532909154892,
0.0363372340798378,
0.04775376617908478,
-0.21895258128643036,
-0.061045482754707336,
-0.187149778008461,
0.3434600234031677,
-0.5317344665527344,
0.061580657958984375,
-0.024383557960391045,
0.0334312878549099,
0.03333897888660431,
0.3163556754589081,
-0.18765650689601898,
0.3697366416454315,
-0.23898190259933472,
-0.1521962285041809,
0.10760350525379181,
-0.23161080479621887,
-0.35822951793670654,
0.05334362015128136,
-0.05660498887300491,
-0.01799263246357441,
0.047360971570014954,
0.2656922936439514,
0.14680726826190948,
0.03040890209376812,
0.06508839875459671,
-0.2567759156227112,
0.29303309321403503,
-0.3015698194503784,
-0.42907416820526123,
-0.06268647313117981,
0.4001123905181885,
-0.056845612823963165,
-0.24793703854084015,
0.038378309458494186,
0.07349071651697159,
0.061333850026130676,
0.3726986348628998,
0.20818927884101868,
-0.1574126034975052,
0.28599733114242554,
0.23293210566043854,
0.3830018639564514,
0.23961345851421356,
-0.16962167620658875,
0.28724879026412964,
-0.07536254823207855,
0.18773016333580017,
0.21430641412734985,
0.23334839940071106,
-0.24133232235908508,
-0.13738879561424255,
-0.02629326656460762,
-0.34459900856018066,
0.1045035570859909,
0.1936202496290207,
0.22459010779857635,
-0.33199018239974976,
0.10086382925510406,
-0.09796130657196045,
0.6169003844261169,
-0.37796899676322937,
0.018899373710155487,
-0.15868844091892242,
0.1941651701927185,
-0.11017202585935593,
0.1503383219242096,
0.045161619782447815,
0.04276656359434128,
0.011073067784309387,
0.005340848118066788,
-0.11095765978097916,
0.15066580474376678,
0.17664013803005219,
-0.17164729535579681,
-0.21931719779968262,
-0.3255200982093811,
0.2579401135444641,
-0.5105293989181519,
-0.2207469344139099,
0.5468989014625549,
0.2125026285648346,
-0.11584621667861938,
-0.03440495580434799,
-0.05731196701526642,
-0.22295768558979034,
-0.006844371557235718,
-0.010768290609121323,
0.18315336108207703,
0.07093903422355652,
-0.10899394750595093,
0.011387260630726814,
-0.2626824975013733,
0.36565345525741577,
0.13386300206184387,
0.18024516105651855,
0.3277197778224945,
-0.07004571706056595,
0.18655624985694885,
0.09424102306365967,
-0.06371654570102692,
0.010796304792165756,
0.009121160954236984,
-0.019851945340633392,
0.3328455984592438,
-0.15065692365169525,
0.14002756774425507,
0.29394131898880005,
0.1768110692501068,
-0.019978296011686325,
0.1302332878112793,
0.02996722236275673,
-0.038336388766765594,
0.24248290061950684,
0.1791711151599884,
-0.15876857936382294,
0.27041909098625183,
-0.030871791765093803,
-0.05321618542075157,
-0.5526505708694458,
0.2271171510219574,
0.2784298360347748,
0.3408263623714447,
-0.2932354807853699,
-0.05689367651939392,
-0.3629147708415985,
-0.1330239474773407,
-0.5408288240432739,
-0.03716304525732994,
-0.24541014432907104,
-0.1514035016298294,
0.07938414812088013,
0.0795682892203331,
0.2793278694152832,
0.13642582297325134,
-0.04616404324769974,
-0.1637200266122818,
-0.05568436533212662,
0.060698002576828,
-0.11508625745773315,
0.09717105329036713,
-0.31981271505355835,
0.09556768834590912,
0.22579562664031982,
0.17981000244617462,
0.2389543354511261,
-0.36591964960098267,
0.05539447069168091,
-0.34341979026794434,
-0.31290313601493835,
0.10374178737401962,
-0.1895086020231247,
0.34615662693977356,
0.17305190861225128,
0.10271568596363068,
-0.30565524101257324,
-0.20643888413906097,
0.06908402591943741,
-0.1115269809961319,
-0.36331117153167725,
0.030477188527584076,
0.005888165906071663,
-0.14959105849266052,
-0.0017720572650432587,
-0.6204956769943237,
-0.29184624552726746,
0.062334094196558,
0.3842014670372009,
0.07567644119262695,
0.16633650660514832,
0.35595205426216125,
-0.05178900063037872,
-0.021683450788259506,
0.22918088734149933,
0.23811933398246765,
-0.511391818523407,
-0.21323223412036896,
-0.024932723492383957,
0.13791875541210175,
-0.21060773730278015,
-0.12399430572986603,
0.009925801306962967,
0.10930660367012024,
0.09423615038394928,
-0.5886980295181274,
0.031473856419324875,
-0.01349363662302494,
-0.18558301031589508,
0.03182118386030197,
-0.046471305191516876,
0.2385505735874176,
0.07991234958171844,
-0.011604942381381989,
-0.07720344513654709,
0.00906277447938919,
0.09860815107822418,
-0.18171310424804688,
0.3093614876270294,
0.0258250180631876,
0.18987664580345154,
0.09853388369083405,
0.23691509664058685,
0.6378480195999146,
0.03015407919883728,
0.20117174088954926,
-0.2357310950756073,
0.4956573247909546,
-0.032033808529376984,
-0.48549938201904297,
-0.27491655945777893,
-0.155083566904068,
-0.23766548931598663,
0.21330612897872925,
-0.006268572062253952,
0.17923809587955475,
0.08421489596366882,
0.14134293794631958,
-0.4024023413658142,
-0.19583065807819366,
-0.20924656093120575,
-0.2632054388523102,
0.1199411153793335,
0.18685133755207062,
-0.11180062592029572,
0.1284531056880951,
-0.39197254180908203,
-0.1281607747077942,
0.2763440012931824,
-0.23264828324317932,
-0.09871070086956024,
-0.5177314281463623,
-0.3856751620769501,
-0.15722519159317017,
0.2232966125011444,
0.39143580198287964,
0.3871855139732361,
0.01293487474322319,
0.12270808964967728,
0.3271722197532654,
0.08992882072925568,
0.64339679479599,
-0.4577268064022064,
-0.22558172047138214,
0.27769333124160767,
0.19233526289463043,
-0.3458140194416046,
0.0036674439907073975,
-0.298507422208786,
0.11014045029878616,
0.1936442255973816,
0.020016737282276154,
-0.16909079253673553,
-0.05777887627482414,
0.2804933488368988,
0.3153577148914337,
-0.39226406812667847,
-0.03747033700346947,
-0.29011833667755127,
-0.38780274987220764,
-0.05963420867919922,
-0.2520771324634552,
0.001768229529261589,
0.03396792337298393,
-0.2614022493362427,
0.08081206679344177,
-0.15974196791648865,
0.28220072388648987,
0.4743412733078003,
-0.22977399826049805,
0.5287470817565918,
0.018332013860344887,
0.31863632798194885,
0.03835692256689072,
-0.025638490915298462,
0.03461330384016037,
0.7942627668380737,
-0.18171800673007965,
-0.05187053978443146,
-0.27490416169166565,
-0.5175100564956665,
0.32645395398139954,
0.2323889434337616,
0.10026167333126068,
0.20106038451194763,
-0.32108813524246216,
-0.2144901603460312,
0.08773108571767807,
0.022679755464196205,
0.4050423502922058,
0.04030665010213852,
-0.3864828944206238,
-0.5881889462471008,
0.15362341701984406,
0.22833192348480225,
-0.21258145570755005,
0.4853884279727936,
-0.24197320640087128,
-0.1396200805902481,
0.23898759484291077,
0.01981057971715927,
1.0326577425003052,
-0.37133538722991943,
0.2594500780105591,
-0.043415263295173645,
0.14136630296707153,
0.12415467202663422,
-0.2882460951805115,
-0.022544778883457184,
-0.27245596051216125,
-0.2003299742937088,
-0.18229715526103973,
-0.0019371956586837769,
-0.11244203895330429,
0.33254045248031616,
-0.26593518257141113,
0.14912135899066925,
0.0046439990401268005,
0.4775799810886383,
-0.03329091519117355,
-0.0351792611181736,
-0.038637466728687286,
0.2886991500854492,
0.16277256608009338,
0.10691334307193756,
-0.12341782450675964,
0.15136118233203888,
0.12875819206237793,
-0.02988419681787491,
0.1740531027317047,
-0.2242053747177124,
-0.6097682118415833,
-0.21638590097427368,
-0.278277188539505,
0.20340952277183533,
-0.16060389578342438,
-0.5160956382751465,
-0.08293119072914124,
0.28941959142684937,
0.4077766537666321,
0.2702653408050537,
-0.13232111930847168,
-0.05274810269474983,
0.34452152252197266,
0.18576081097126007,
-0.12394934147596359,
-0.043912794440984726,
0.07641270756721497,
0.14068913459777832,
-0.27155861258506775,
0.005844473838806152,
0.33066678047180176,
-0.31951308250427246,
-0.4827299118041992,
0.2105577439069748,
-0.04244888573884964,
-0.5394484400749207,
0.22588005661964417,
0.3129878342151642,
-0.15766963362693787,
-0.24043825268745422,
0.06070767343044281,
-0.11678579449653625,
-0.18388159573078156,
0.2974872291088104,
0.03821568936109543,
-0.3845885992050171,
-0.046683814376592636,
0.39513450860977173,
0.6507584452629089,
-0.0362955667078495,
0.5934004783630371,
-0.07968743145465851,
0.03256853669881821,
-0.2607859969139099,
0.2576851546764374,
-0.0785074383020401,
-0.4097454249858856,
0.05365075170993805,
-0.255608469247818,
0.44557034969329834,
0.14030025899410248,
0.23260612785816193,
0.09975847601890564,
0.14920376241207123,
-0.23083217442035675,
-0.21599406003952026,
-0.2349487692117691,
0.1496259868144989,
0.3456689417362213,
0.46820691227912903,
-0.08309820294380188,
0.11551904678344727,
0.060694992542266846,
-0.16242407262325287,
-0.21278688311576843,
0.4024805426597595,
0.018899036571383476,
0.2500675916671753,
-0.1053193211555481,
-0.08275320380926132,
0.10985779762268066,
-0.013324243947863579,
0.09440706670284271,
0.16932253539562225,
0.021943483501672745,
-0.14366097748279572,
-0.11356480419635773,
0.18536871671676636,
-0.010677367448806763,
-0.0386759489774704,
-0.4134533107280731,
-0.24450920522212982,
0.2411624789237976,
0.07476569712162018,
-0.13343185186386108,
0.366666316986084,
0.18887591361999512,
0.1262802630662918,
0.07408283650875092,
-0.07692538946866989,
-0.08997909724712372,
-0.1799813061952591,
-0.18651115894317627,
0.2855628728866577,
0.32648965716362,
-0.030424222350120544,
0.1567705124616623,
0.024606890976428986,
-0.31666556000709534,
0.06358490884304047,
0.22759459912776947,
-0.06325480341911316,
0.026090778410434723,
-0.5054304003715515,
0.1208677589893341,
0.12652042508125305,
0.4913758933544159,
0.48508796095848083,
-0.29485180974006653,
-0.02723473496735096,
0.05191600322723389,
0.14079585671424866,
-0.2662792205810547,
-0.15099367499351501,
0.03802953660488129,
0.039499882608652115,
-0.08495362848043442,
0.21654272079467773,
0.2520008087158203,
-0.38056865334510803,
0.3474818468093872,
-0.09549494087696075,
0.3520771265029907,
-0.30514806509017944,
0.17475663125514984,
0.4739435911178589,
0.23028837144374847,
-0.22372786700725555,
-0.03153105825185776,
0.1291675865650177,
-0.08789651840925217,
0.5185216665267944,
-0.04010649770498276,
0.13772237300872803,
-0.30860260128974915,
-0.09725278615951538,
0.1541345715522766,
0.05359679087996483,
0.10036687552928925,
0.23393771052360535,
-0.21646049618721008,
0.27903276681900024,
0.22601082921028137,
0.4698837399482727,
0.016708245500922203,
-0.19192367792129517,
-0.383007675409317,
-0.16041897237300873,
-0.2408696711063385,
0.008433206006884575,
-0.12739437818527222,
-0.06660103797912598,
-0.0035137757658958435,
0.06440693140029907,
-0.006433527916669846,
-0.13463139533996582,
0.2504630982875824,
0.2350129932165146,
-0.05744090676307678,
-0.7289215326309204,
-0.16700047254562378,
0.2327001392841339,
-0.03038429468870163,
-0.2189616858959198,
0.2196619212627411,
0.2771153748035431,
0.052966997027397156,
0.17724892497062683,
0.57753986120224,
0.37323424220085144,
0.06333345174789429,
0.01644046977162361,
0.020676257088780403,
-0.44865351915359497,
-0.011061273515224457,
-0.03657282888889313,
0.40574491024017334,
-0.09871765971183777,
-0.06709952652454376,
0.14466901123523712,
0.05005037784576416,
0.0595601350069046,
0.12731359899044037,
0.2412569671869278,
0.0006836894899606705,
-0.5757216811180115,
0.3191530406475067,
-0.05706857144832611,
-0.094314806163311,
-0.18902425467967987,
-0.05396895855665207,
-0.4186169505119324,
0.1573532521724701,
0.7430906295776367,
0.13849544525146484,
0.11939040571451187,
-0.06456498056650162,
0.05588456243276596,
-0.046530526131391525,
0.14263805747032166,
0.291202187538147,
0.015589997172355652,
-0.24687376618385315,
-0.08640604466199875,
-0.6696781516075134,
0.27131593227386475,
-0.47946035861968994,
0.20542779564857483,
0.09250132739543915,
-0.010242518968880177,
0.060267310589551926,
0.42302405834198,
0.258480966091156,
0.05383211374282837,
-0.6601259112358093,
0.28258663415908813,
-0.42047318816185,
-0.32598385214805603,
0.16690921783447266,
0.09434203803539276,
-0.08865492045879364,
-0.19494414329528809,
0.18242743611335754,
-0.18065878748893738,
-0.017679668962955475,
-0.2466893345117569,
-0.013955526053905487,
0.0855448842048645,
0.35464516282081604,
-0.08319096267223358,
0.037962764501571655,
0.3189558982849121,
0.1843022108078003,
-0.04866945743560791,
-0.023822877556085587,
-0.42197853326797485,
-0.14479945600032806,
0.6116064190864563,
0.1478208601474762,
-0.13534608483314514,
-0.18284717202186584,
-0.12310445308685303,
0.0834425836801529,
-0.009193835780024529,
0.28734898567199707,
0.12398500740528107,
-0.2562181353569031,
-0.21459858119487762,
-0.13803303241729736,
0.189276322722435,
0.011636716313660145,
0.6060588359832764,
0.22082610428333282,
0.31740760803222656,
-0.1575760692358017,
-0.5446339249610901,
0.45196259021759033,
-0.5644433498382568,
-0.2094038873910904,
-0.08543291687965393,
0.0419430136680603,
0.18150585889816284,
0.10172095149755478,
-0.5763415694236755,
-0.11683376878499985,
0.6631141304969788,
-0.09732811897993088,
-0.06834963709115982,
0.3364095389842987,
0.1263560801744461,
0.01163158193230629,
-0.004661325365304947,
0.5800074338912964,
0.16278216242790222,
-0.20721471309661865,
0.4560905992984772,
-0.21820048987865448
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | An educated guess: does this refer to the fact that depending on the custom column names in the dataset files (csv in this case), there is a dataset loader being created? and this dataset loader - using the "custom data configuration" is used among all jobs running using this particular csv files? (thinking out loud here...)
If this is the case, it may be ok for my use case (have to think about it more), still a bit surprising given that datasets caching is disabled (or so I hope) by the lines I pasted above. | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 95 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
An educated guess: does this refer to the fact that depending on the custom column names in the dataset files (csv in this case), there is a dataset loader being created? and this dataset loader - using the "custom data configuration" is used among all jobs running using this particular csv files? (thinking out loud here...)
If this is the case, it may be ok for my use case (have to think about it more), still a bit surprising given that datasets caching is disabled (or so I hope) by the lines I pasted above. | [
-0.074739471077919,
0.032924309372901917,
-0.11125215888023376,
0.18403831124305725,
0.20810313522815704,
0.19958657026290894,
0.34123706817626953,
0.03536441549658775,
0.3006591498851776,
-0.14211590588092804,
0.17081204056739807,
0.09101533144712448,
-0.23205529153347015,
0.038795702159404755,
-0.09109344333410263,
0.4722394049167633,
0.08659215271472931,
0.0711621344089508,
-0.13391314446926117,
0.05546317994594574,
-0.07450211048126221,
-0.01446106843650341,
-0.15610811114311218,
0.08238115161657333,
-0.4832647144794464,
-0.0868271142244339,
0.11258555948734283,
-0.024431899189949036,
0.021261807531118393,
-0.5053257942199707,
0.4776337146759033,
0.26668861508369446,
0.1665526181459427,
0.3351033926010132,
-0.00011396418267395347,
0.030528046190738678,
0.17119142413139343,
-0.03321413695812225,
-0.26157915592193604,
-0.05183213949203491,
-0.5447486639022827,
-0.45654329657554626,
0.22220738232135773,
-0.12318015843629837,
0.0039044395089149475,
-0.03614215925335884,
0.05077371001243591,
-0.6826247572898865,
0.41172218322753906,
0.29669511318206787,
0.23817500472068787,
-0.12851262092590332,
-0.4286360740661621,
0.0785951092839241,
0.011744409799575806,
0.1088230162858963,
-0.09089376777410507,
-0.08732187747955322,
0.19389507174491882,
-0.11127781867980957,
-0.050755150616168976,
0.3164397180080414,
-0.09715501219034195,
0.3233143985271454,
0.5042587518692017,
0.01712007448077202,
-0.24121680855751038,
-0.2511724829673767,
0.3183847963809967,
0.021812215447425842,
0.9332628846168518,
-0.3090759813785553,
-0.12317735701799393,
-0.41113245487213135,
-0.03188838064670563,
-0.29882341623306274,
0.21271640062332153,
-0.02839449979364872,
0.048281919211149216,
0.10949203372001648,
-0.4467253088951111,
-0.23965167999267578,
-0.0837242379784584,
-0.2604038715362549,
-0.21732068061828613,
-0.10608746111392975,
-0.3423904776573181,
0.11851392686367035,
-0.09543836116790771,
-0.07735292613506317,
0.4783642590045929,
-0.4291203022003174,
0.05214845389127731,
0.1758251190185547,
-0.49033987522125244,
-0.0390842966735363,
0.12245529890060425,
0.327942430973053,
-0.1147691085934639,
0.13509203493595123,
0.10505462437868118,
0.012275708839297295,
-0.09074408560991287,
0.07997744530439377,
0.45828771591186523,
0.2901146709918976,
0.05886939540505409,
0.16180706024169922,
0.17197832465171814,
-0.1607419103384018,
-0.24115991592407227,
-0.1606793999671936,
0.10686066001653671,
-0.4139525592327118,
0.5185587406158447,
0.04689398407936096,
0.19745461642742157,
-0.2680058181285858,
-0.30010518431663513,
0.11106029897928238,
0.09485318511724472,
-0.18120555579662323,
0.07918185740709305,
0.15228943526744843,
0.02111470326781273,
0.007477864623069763,
-0.1893981248140335,
0.016282564029097557,
-0.18049809336662292,
-0.17941023409366608,
-0.19863271713256836,
-0.17868979275226593,
-0.27161169052124023,
0.03702269494533539,
0.1595563143491745,
-0.1190398633480072,
0.055574268102645874,
0.37135156989097595,
0.12617985904216766,
-0.2491980940103531,
0.13708823919296265,
-0.008804448880255222,
0.1465436965227127,
0.2985468804836273,
-0.2595076560974121,
0.24148638546466827,
0.3928396701812744,
-0.0316358357667923,
-0.22730636596679688,
0.2966908812522888,
-0.44085437059402466,
-0.5244545340538025,
0.083808533847332,
0.15106001496315002,
-0.5156720280647278,
-0.17430326342582703,
-0.16592976450920105,
-0.048084232956171036,
0.43660828471183777,
0.09131382405757904,
0.15817195177078247,
-0.2211638242006302,
-0.18358007073402405,
-0.24875837564468384,
-0.0916244387626648,
0.4071260094642639,
-0.6090788841247559,
0.05804795026779175,
-0.23024967312812805,
-0.06869563460350037,
0.10205379128456116,
0.20404982566833496,
-0.4850606322288513,
0.17683064937591553,
-0.17970798909664154,
-0.20357383787631989,
0.09283304214477539,
-0.1709415167570114,
-0.29057756066322327,
0.2443111538887024,
0.14962895214557648,
0.44614264369010925,
0.15042263269424438,
0.07307256758213043,
0.0984581932425499,
0.0018106861971318722,
-0.020993933081626892,
-0.04792768508195877,
0.11576846987009048,
-0.19456185400485992,
-0.054496049880981445,
-0.26853498816490173,
0.2093883454799652,
-0.11843118071556091,
0.08052072674036026,
0.1271193027496338,
-0.00382203608751297,
-0.19733400642871857,
0.05539202690124512,
-0.09198343753814697,
0.033547379076480865,
0.268084853887558,
-0.02067016437649727,
0.28393644094467163,
0.10134687274694443,
0.13712850213050842,
-0.5190865993499756,
0.37681353092193604,
0.19721943140029907,
-0.3630044758319855,
-0.1326485127210617,
-0.23421987891197205,
-0.16364002227783203,
-0.039962287992239,
-0.4563784897327423,
-0.18381309509277344,
0.04518774896860123,
0.012897096574306488,
-0.04904919117689133,
-0.15725351870059967,
-0.23021748661994934,
0.4298686385154724,
-0.36457741260528564,
-0.12835532426834106,
-0.16982761025428772,
0.10358807444572449,
0.04851415380835533,
0.305169016122818,
-0.2094288170337677,
0.12950652837753296,
0.10136903822422028,
0.11961531639099121,
0.0973195806145668,
0.18363994359970093,
0.16094864904880524,
0.4847698211669922,
0.04699834808707237,
0.391610711812973,
-0.08768955618143082,
0.05878588184714317,
0.31919172406196594,
-0.092087522149086,
0.10489432513713837,
-0.11982280761003494,
-0.10356228798627853,
0.4611104726791382,
-0.1929135024547577,
0.22340944409370422,
-0.2311306893825531,
-0.21439668536186218,
0.14864623546600342,
-0.06416572630405426,
-0.03216831013560295,
-0.12728631496429443,
-0.03852548822760582,
0.057800013571977615,
0.015275221318006516,
0.346453994512558,
-0.3043404221534729,
0.12056218832731247,
0.22613202035427094,
0.08753477036952972,
-0.04416375607252121,
-0.017838619649410248,
-0.05133425444364548,
-0.23158836364746094,
0.14010871946811676,
0.44450029730796814,
0.556118369102478,
0.07785933464765549,
0.018979080021381378,
0.051059141755104065,
0.0876900926232338,
-0.1661074310541153,
0.26124584674835205,
-0.1427205204963684,
0.04649829864501953,
0.13946254551410675,
0.00014756899327039719,
-0.10836302489042282,
-0.24997007846832275,
0.07959865033626556,
0.13975860178470612,
0.17557869851589203,
-0.5349951982498169,
0.24275706708431244,
-0.4415969252586365,
-0.1433643251657486,
-0.3243464529514313,
0.13960173726081848,
-0.22961288690567017,
-0.392086923122406,
-0.05582857131958008,
0.0654044896364212,
0.109890878200531,
0.05785858631134033,
-0.2731124758720398,
0.40561580657958984,
-0.1743050217628479,
-0.061287038028240204,
-0.06752386689186096,
-0.16251970827579498,
-0.13204246759414673,
0.08243010938167572,
0.12121839821338654,
-0.15819665789604187,
0.20318998396396637,
0.0007401295006275177,
0.045961473137140274,
-0.29964563250541687,
0.12141991406679153,
-0.051458314061164856,
0.027421802282333374,
0.25717103481292725,
-0.09367215633392334,
0.015569061040878296,
-0.030541658401489258,
-0.04449572414159775,
-0.06955273449420929,
0.14858373999595642,
0.14380787312984467,
-0.1593751311302185,
-0.0334501639008522,
0.08614364266395569,
0.026593517512083054,
-0.19344410300254822,
-0.3771928548812866,
-0.17239759862422943,
-0.17664320766925812,
0.017774727195501328,
-0.023749470710754395,
0.43630853295326233,
-0.028057098388671875,
-0.07853472232818604,
0.1182728037238121,
0.011934511363506317,
-0.5252436399459839,
-0.5456598401069641,
0.2012653946876526,
-0.07932253926992416,
0.020125241950154305,
0.19227519631385803,
0.13509023189544678,
0.35361364483833313,
0.011069298721849918,
-0.6578812599182129,
0.010115035809576511,
-0.1363929957151413,
0.08642110228538513,
0.12115736305713654,
-0.0074005406349897385,
0.19341450929641724,
0.07413691282272339,
-0.012097885832190514,
-0.11911453306674957,
-0.11676834523677826,
-0.15160447359085083,
-0.11090149730443954,
0.3235323429107666,
0.1593187153339386,
-0.03244820237159729,
0.03675227239727974,
0.9366270303726196,
0.38415637612342834,
-0.12146829068660736,
0.1396237015724182,
-0.10883643478155136,
0.6221186518669128,
0.0644044354557991,
-0.2527449131011963,
-0.11523190140724182,
-0.2590203583240509,
-0.389825701713562,
0.03135361522436142,
-0.038490358740091324,
0.049664221704006195,
0.17969709634780884,
0.33036476373672485,
-0.051457200199365616,
-0.27393656969070435,
0.21696837246418,
-0.4276331961154938,
0.31616777181625366,
0.11546044051647186,
-0.12893712520599365,
-0.2765469253063202,
-0.08965557813644409,
-0.3233952820301056,
0.20793955028057098,
0.25426843762397766,
-0.09122536331415176,
-0.18657150864601135,
-0.1520024985074997,
-0.2801685035228729,
0.23994743824005127,
-0.12129364162683487,
0.16723626852035522,
-0.16658534109592438,
0.15576672554016113,
0.27474063634872437,
0.2953508794307709,
0.3989814519882202,
-0.5094987750053406,
-0.05477152764797211,
0.247361421585083,
-0.030123526230454445,
-0.02467825636267662,
-0.20442108809947968,
0.10537092387676239,
0.3304409086704254,
-0.002918936312198639,
0.10571599006652832,
0.27413618564605713,
-0.18563859164714813,
-0.1463252454996109,
0.13681982457637787,
-0.22118303179740906,
-0.2176622599363327,
-0.229527086019516,
-0.06476157158613205,
-0.1236504465341568,
-0.007174275815486908,
-0.03462821990251541,
-0.10037846118211746,
-0.2729244530200958,
0.13295084238052368,
-0.14213429391384125,
0.16353994607925415,
0.21586093306541443,
0.07071077823638916,
0.16510817408561707,
0.16582755744457245,
0.0806579738855362,
0.37218329310417175,
-0.08938758075237274,
0.3206746578216553,
0.5537671446800232,
-0.1596214473247528,
-0.17029687762260437,
-0.0921294242143631,
0.028520118445158005,
0.2239183485507965,
0.27741938829421997,
-0.3186158239841461,
0.231195330619812,
0.01508142426609993,
-0.1968952864408493,
-0.4145432710647583,
-0.24753420054912567,
0.30818459391593933,
0.28307706117630005,
-0.24074940383434296,
-0.6778425574302673,
0.4185903072357178,
0.20342400670051575,
-0.24142959713935852,
0.011489588767290115,
-0.11559244990348816,
-0.34380173683166504,
-0.08260127902030945,
0.031150251626968384,
0.6868380904197693,
0.05367811396718025,
0.15119341015815735,
-0.08733285963535309,
-0.05058583617210388,
0.4624561667442322,
-0.2295813411474228,
0.21735930442810059,
-0.165316641330719,
-0.08138544112443924,
-0.13416741788387299,
-0.1254746913909912,
0.3942568302154541,
0.19977033138275146,
-0.0706661194562912,
0.3692275881767273,
-0.3337559103965759,
0.4619784951210022,
-0.19792377948760986,
-0.04770222678780556,
-0.1497228592634201,
0.00538090243935585,
0.06325050443410873,
0.17644023895263672,
-0.0409989207983017,
0.37822115421295166,
-0.10984648019075394,
0.23511482775211334,
0.2955278158187866,
0.1585526466369629,
-0.3830777406692505,
-0.2306857407093048,
0.09521853178739548,
0.25895750522613525,
-0.1065821498632431,
-0.3580361008644104,
0.4108010530471802,
0.3930884897708893,
0.2602234482765198,
-0.07944145798683167,
-0.12403976917266846,
0.27397969365119934,
0.22072482109069824,
0.22643743455410004,
-0.17943169176578522,
-0.03428380936384201,
0.296690434217453,
0.14022192358970642,
-0.3095146715641022,
0.17447057366371155,
-0.020397230982780457,
-0.25642794370651245,
-0.029142923653125763,
0.4295300245285034,
0.03570828586816788,
-0.6212305426597595,
-0.19375081360340118,
0.28608593344688416,
0.23807862401008606,
0.1409773975610733,
0.16573241353034973,
0.09758568555116653,
0.17261603474617004,
0.5359575152397156,
-0.4709509313106537,
-0.35261252522468567,
-0.028977908194065094,
0.21719232201576233,
0.5373673439025879,
-0.10348514467477798,
0.4559840261936188,
-0.21341277658939362,
-0.29687345027923584,
-0.20709803700447083,
0.056098200380802155,
0.1261422485113144,
-0.08603693544864655,
0.09510545432567596,
0.12128307670354843,
0.3870358467102051,
0.1258448213338852,
0.05278851091861725,
0.09068024158477783,
0.03265223279595375,
-0.18891486525535583,
-0.1910335123538971,
-0.09089019149541855,
-0.03699987381696701,
-0.019009556621313095,
0.4248799979686737,
-0.10853968560695648,
-0.14484845101833344,
0.0165486391633749,
0.005379527807235718,
-0.28180086612701416,
0.2052350789308548,
-0.15175148844718933,
0.13127124309539795,
0.1264011263847351,
0.017750173807144165,
0.10772977769374847,
-0.21852339804172516,
-0.04132009297609329,
-0.11667273938655853,
-0.38018766045570374,
-0.1926354467868805,
0.06447635591030121,
0.14268779754638672,
-0.03268486633896828,
-0.17007996141910553,
0.011739886365830898,
-0.24768441915512085,
0.0291255172342062,
-0.1259060651063919,
0.21869751811027527,
0.36357930302619934,
0.005353793501853943,
0.22916902601718903,
-0.21572230756282806,
-0.1443708837032318,
-0.0980215072631836,
-0.012781389057636261,
0.02264735847711563,
0.40868377685546875,
0.32748356461524963,
0.3122509717941284,
-0.11278209090232849,
0.143349289894104,
-0.24297136068344116,
0.25344589352607727,
0.049438849091529846,
0.1417551338672638,
0.13782018423080444,
-0.32631176710128784,
0.1708707958459854,
0.21786659955978394,
0.33894723653793335,
0.25620466470718384,
-0.31326961517333984,
-0.19518046081066132,
0.10582054406404495,
0.14714999496936798,
-0.14505264163017273,
-0.18462809920310974,
0.15225663781166077,
0.19686315953731537,
-0.1703169345855713,
0.2726590931415558,
0.5628317594528198,
-0.031178820878267288,
0.48013365268707275,
-0.07125750929117203,
0.6081088781356812,
-0.4641149044036865,
0.45341554284095764,
0.1287994086742401,
0.015193264931440353,
-0.12859544157981873,
0.4395718276500702,
0.5133955478668213,
0.03749300539493561,
0.5916278958320618,
0.05163915455341339,
0.19148889183998108,
0.4715462327003479,
0.14816659688949585,
-0.37053170800209045,
-0.8666632771492004,
0.4774237275123596,
0.4776126444339752,
-0.501635730266571,
0.10338721424341202,
0.04315754398703575,
0.0473802387714386,
-0.18564637005329132,
0.22525754570960999,
-0.12479807436466217,
0.1617400050163269,
-0.21560055017471313,
-0.1505633294582367,
0.4182741940021515,
-0.2759999930858612,
0.11432498693466187,
0.13050498068332672,
-0.054357003420591354,
-0.04196315258741379,
0.14966778457164764,
-0.24062643945217133,
-0.148619145154953,
-0.3659249246120453,
0.45336082577705383,
-0.008745890110731125,
0.3205535411834717,
-0.16187213361263275,
0.12121899425983429,
-0.08636920154094696,
0.12271186709403992,
0.3090473711490631,
0.3091043531894684,
0.518556535243988,
0.10617733746767044,
0.28641757369041443,
0.02587786316871643,
-0.05748090520501137,
0.0429527685046196,
-0.20930011570453644,
0.2197228968143463,
-0.197829931974411,
-0.08920334279537201,
0.18552717566490173,
0.14048072695732117,
0.03711599484086037,
0.13103130459785461,
0.10150520503520966,
0.2059725821018219,
-0.48963218927383423,
-0.10689107328653336,
0.1763571798801422,
0.05969564616680145,
-0.011910010129213333,
0.2690346837043762,
-0.26615580916404724,
-0.2663978040218353,
0.7305530905723572,
0.05878293886780739,
0.3269718885421753,
-0.12900909781455994,
0.07351004332304001,
-0.13359999656677246,
0.3655228316783905,
0.10059984028339386,
0.07104799151420593,
-0.22863486409187317,
-0.015460573136806488,
-0.6817542314529419,
-0.08816622942686081,
-0.31396061182022095,
0.144767165184021,
0.11710084974765778,
0.11185424029827118,
-0.1319795548915863,
-0.013800039887428284,
0.04337208718061447,
-0.22209498286247253,
-0.13324590027332306,
-0.12721391022205353,
-0.047697775065898895,
-0.16490501165390015,
-0.07320992648601532,
-0.010808439925312996,
-0.12694135308265686,
-0.2174554467201233,
0.13909953832626343,
-0.004783651325851679,
0.0037279874086380005,
-0.12586933374404907,
0.048872269690036774,
0.11921592056751251,
0.07170110195875168,
0.42640531063079834,
0.09708447754383087,
0.39554792642593384,
0.3030190169811249,
0.10157027095556259,
-0.2562289535999298,
-0.2654801309108734,
-0.1641043722629547,
0.24066200852394104,
0.11558336019515991,
-0.13955779373645782,
-0.5429919958114624,
0.10470721125602722,
-0.22278407216072083,
0.054863836616277695,
-0.012023836374282837,
-0.12668514251708984,
0.06431736052036285,
-0.14988623559474945,
-0.06472796201705933,
0.21700462698936462,
-0.048702988773584366,
0.26896005868911743,
0.01623077690601349,
0.31618866324424744,
-0.28509432077407837,
-0.021237198263406754,
0.3094377815723419,
-0.1760540008544922,
-0.28196626901626587,
-0.05325959250330925,
0.19873638451099396,
-0.03699226677417755,
-0.1815897524356842,
-0.5344361066818237,
0.049864061176776886,
0.5088614821434021,
-0.28332647681236267,
-0.01620168425142765,
0.0728507786989212,
0.02030952274799347,
0.04722898080945015,
-0.08403948694467545,
0.22606684267520905,
-0.035838209092617035,
-0.02231062389910221,
0.030584964901208878,
-0.34412920475006104
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | Hi ! Currently disabling the caching means that all the dataset transform like `map`, `filter` etc. ignore the cache: it doesn't write nor read processed cache files.
However `load_dataset` reuses datasets that have already been prepared: it does reload prepared dataset files.
Indeed from the documentation:
> datasets.set_caching_enabled(boolean: bool)
> When applying transforms on a dataset, the data are stored in cache files. The caching mechanism allows to reload an existing cache file if itβs already been computed.
> Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated after each transform.
> If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets. More precisely, if the caching is disabled:
> - cache files are always recreated
> - cache files are written to a temporary directory that is deleted when session closes
> - cache files are named using a random hash instead of the dataset fingerprint - use datasets.Dataset.save_to_disk() to save a transformed dataset or it will be deleted when session closes
> - caching doesnβt affect datasets.load_dataset(). If you want to regenerate a dataset from scratch you should use the download_mode parameter in datasets.load_dataset(). | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 202 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
Hi ! Currently disabling the caching means that all the dataset transform like `map`, `filter` etc. ignore the cache: it doesn't write nor read processed cache files.
However `load_dataset` reuses datasets that have already been prepared: it does reload prepared dataset files.
Indeed from the documentation:
> datasets.set_caching_enabled(boolean: bool)
> When applying transforms on a dataset, the data are stored in cache files. The caching mechanism allows to reload an existing cache file if itβs already been computed.
> Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated after each transform.
> If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets. More precisely, if the caching is disabled:
> - cache files are always recreated
> - cache files are written to a temporary directory that is deleted when session closes
> - cache files are named using a random hash instead of the dataset fingerprint - use datasets.Dataset.save_to_disk() to save a transformed dataset or it will be deleted when session closes
> - caching doesnβt affect datasets.load_dataset(). If you want to regenerate a dataset from scratch you should use the download_mode parameter in datasets.load_dataset(). | [
-0.09970798343420029,
0.06134212017059326,
-0.09445253014564514,
0.13757404685020447,
0.28683602809906006,
0.1569390594959259,
0.29463255405426025,
0.057629141956567764,
0.21895624697208405,
-0.2274290770292282,
0.05633825808763504,
0.18915848433971405,
-0.1538449376821518,
-0.13491737842559814,
-0.015560074709355831,
0.45778125524520874,
0.17151209712028503,
0.05999497324228287,
-0.11557887494564056,
0.004733342677354813,
-0.03562748432159424,
-0.0026573464274406433,
-0.21271908283233643,
0.040278755128383636,
-0.45704004168510437,
-0.1324051469564438,
0.12293000519275665,
-0.07164990156888962,
-0.013050680980086327,
-0.5536743402481079,
0.48868250846862793,
0.3283199071884155,
0.07414739578962326,
0.2518530786037445,
-0.00011180152068845928,
0.07280005514621735,
0.2476901412010193,
-0.017831850796937943,
-0.28225085139274597,
-0.0032015442848205566,
-0.5275139212608337,
-0.39973142743110657,
0.20771656930446625,
-0.12177050113677979,
0.008824504911899567,
-0.22824326157569885,
0.021483076736330986,
-0.7317456007003784,
0.3986603617668152,
0.2624376714229584,
0.25377094745635986,
-0.14176945388317108,
-0.32257288694381714,
0.0698816180229187,
0.02949872612953186,
0.10565689206123352,
-0.07900818437337875,
-0.11971013247966766,
0.17552310228347778,
0.001150672324001789,
-0.12979507446289062,
0.3401147723197937,
-0.18206559121608734,
0.21848241984844208,
0.5376935005187988,
-0.02511826902627945,
-0.30096951127052307,
-0.3138097822666168,
0.3533351421356201,
-0.047577016055583954,
0.8824434280395508,
-0.3004612624645233,
-0.213221475481987,
-0.37195026874542236,
-0.13039396703243256,
-0.10722237825393677,
0.2515769600868225,
-0.06265538930892944,
0.10689255595207214,
0.162693053483963,
-0.5890988111495972,
-0.3423179090023041,
-0.0354444645345211,
-0.12168021500110626,
-0.18836289644241333,
-0.09872186183929443,
-0.3428516089916229,
0.1247541755437851,
-0.012488361448049545,
0.029806427657604218,
0.5160678625106812,
-0.487183153629303,
-0.02958066388964653,
0.2198568880558014,
-0.458388090133667,
0.01425507664680481,
0.1422320008277893,
0.41667497158050537,
-0.049647293984889984,
0.22010698914527893,
0.10758601874113083,
0.09106674790382385,
-0.19750715792179108,
0.05593312531709671,
0.3907086253166199,
0.38203155994415283,
0.0675787553191185,
0.1710539013147354,
0.08456158638000488,
-0.21508342027664185,
-0.1033618301153183,
-0.1998727023601532,
0.10320401936769485,
-0.3857402205467224,
0.5634827017784119,
-0.02667614072561264,
0.26185816526412964,
-0.2945905923843384,
-0.32048723101615906,
0.03429967537522316,
0.01428278163075447,
-0.20448890328407288,
0.10504249483346939,
0.13281288743019104,
-0.04185635969042778,
0.1020388975739479,
-0.17869767546653748,
-0.091880202293396,
-0.199480339884758,
-0.23971611261367798,
-0.22978362441062927,
-0.1517886370420456,
-0.3549553155899048,
0.06776716560125351,
0.23486889898777008,
-0.32194095849990845,
0.027107933536171913,
0.3597249388694763,
0.0614183135330677,
-0.2675005793571472,
0.15168479084968567,
-0.03969380259513855,
0.3635239005088806,
0.3102007806301117,
-0.3273587226867676,
0.2836119830608368,
0.39070048928260803,
-0.05642606317996979,
-0.12843814492225647,
0.3827970623970032,
-0.4262165427207947,
-0.3516855835914612,
0.19252286851406097,
0.15908598899841309,
-0.4444238543510437,
-0.11024263501167297,
-0.20619100332260132,
0.09028960764408112,
0.4188184142112732,
-0.04664803668856621,
0.17536604404449463,
-0.14391301572322845,
-0.1300472915172577,
-0.2852768301963806,
0.14027154445648193,
0.4280160665512085,
-0.5497481822967529,
-0.0674494057893753,
-0.24989092350006104,
-0.05621689185500145,
0.1099884882569313,
0.2396278828382492,
-0.48151251673698425,
0.20111513137817383,
-0.2263176590204239,
-0.1987857073545456,
0.142875537276268,
-0.12158869206905365,
-0.43377721309661865,
0.18038354814052582,
0.24995319545269012,
0.42963045835494995,
0.02079017460346222,
0.07828190922737122,
0.06477472186088562,
-0.036548394709825516,
-0.10672643780708313,
-0.14066000282764435,
0.061826542019844055,
-0.24573124945163727,
-0.13657139241695404,
-0.26024171710014343,
0.3213844299316406,
-0.13548409938812256,
0.10370898246765137,
0.22380074858665466,
0.036731746047735214,
0.01815059408545494,
0.03117981180548668,
-0.03680996224284172,
0.10455304384231567,
0.3294176459312439,
-0.018839355558156967,
0.10374901443719864,
0.12635061144828796,
0.0807274729013443,
-0.46506834030151367,
0.3508913815021515,
0.12093287706375122,
-0.46755969524383545,
-0.1491142362356186,
-0.1868676096200943,
-0.15377676486968994,
-0.121195487678051,
-0.44672247767448425,
-0.19150042533874512,
0.08794663101434708,
-0.0069219619035720825,
-0.01619948446750641,
-0.08094300329685211,
-0.2429458647966385,
0.4812089502811432,
-0.2107366919517517,
-0.135223850607872,
-0.24893735349178314,
0.14133796095848083,
0.042028702795505524,
0.281089723110199,
-0.26945316791534424,
0.054643452167510986,
0.1063116192817688,
0.08007007837295532,
0.03143873065710068,
0.24194231629371643,
0.08775809407234192,
0.40276527404785156,
-0.005088847130537033,
0.3685148060321808,
0.025367144495248795,
-0.10323978215456009,
0.27672362327575684,
-0.09412111341953278,
0.148920476436615,
-0.082166388630867,
-0.15423932671546936,
0.2779752016067505,
-0.2706848084926605,
0.21210409700870514,
-0.2125898003578186,
-0.2112363874912262,
0.12400928139686584,
-0.03466064855456352,
-0.088496133685112,
-0.17013762891292572,
-0.06983619928359985,
0.06793151795864105,
0.17114321887493134,
0.3167242109775543,
-0.043030377477407455,
0.07044661045074463,
0.3305058181285858,
0.060381773859262466,
-0.10280481725931168,
0.015681985765695572,
-0.15701690316200256,
-0.3179258704185486,
0.0985313132405281,
0.44476041197776794,
0.4994434118270874,
0.12758369743824005,
0.06660345196723938,
-0.009882980957627296,
0.07872295379638672,
-0.17676490545272827,
0.24953344464302063,
-0.06490716338157654,
0.04688648134469986,
0.12980687618255615,
0.04077143222093582,
-0.03121015429496765,
-0.34149786829948425,
0.119683176279068,
0.2410702109336853,
0.12373457849025726,
-0.47688230872154236,
0.3093511760234833,
-0.4462127387523651,
-0.07219687104225159,
-0.139826238155365,
0.13680212199687958,
-0.2670969069004059,
-0.40400078892707825,
-0.14079715311527252,
0.04957745596766472,
0.22794750332832336,
0.12124013155698776,
-0.20313100516796112,
0.3428516387939453,
-0.13361389935016632,
-0.022177426144480705,
-0.1573786735534668,
-0.1400095373392105,
-0.15626195073127747,
0.09894166886806488,
0.1103479415178299,
-0.30315250158309937,
0.22017797827720642,
-0.019752059131860733,
0.10696234554052353,
-0.32826465368270874,
0.0002519562840461731,
0.002827562391757965,
0.03420807421207428,
0.15732069313526154,
-0.22034227848052979,
-0.0943111777305603,
-0.10187842696905136,
0.07360615581274033,
-0.04426012560725212,
0.030460519716143608,
0.11187653243541718,
-0.11550571024417877,
-0.02665277011692524,
0.043922245502471924,
-0.059039805084466934,
-0.22372600436210632,
-0.25534847378730774,
-0.11471439898014069,
-0.19692949950695038,
-0.03656228631734848,
-0.10489088296890259,
0.549976646900177,
-0.006283483933657408,
-0.0027899956330657005,
0.02418244630098343,
-0.04753624647855759,
-0.5478750467300415,
-0.4771880805492401,
0.24331755936145782,
-0.010391009040176868,
-0.09273992478847504,
0.18002960085868835,
0.18218038976192474,
0.35794001817703247,
0.20903754234313965,
-0.5898661613464355,
0.07161979377269745,
-0.15880225598812103,
0.02339419350028038,
0.029422804713249207,
-0.04250020533800125,
0.26043766736984253,
0.12299249321222305,
-0.019721578806638718,
-0.14969894289970398,
-0.0818621888756752,
-0.14567172527313232,
-0.10061506181955338,
0.292693555355072,
-0.014061752706766129,
-0.02581549435853958,
0.11663977801799774,
0.872851550579071,
0.3354339897632599,
-0.17435826361179352,
0.14974308013916016,
0.0036007333546876907,
0.6802712082862854,
-0.023698821663856506,
-0.2721685469150543,
-0.10485745221376419,
-0.3019881844520569,
-0.2880852222442627,
0.0078902468085289,
-0.06822322309017181,
-0.07395118474960327,
0.11868317425251007,
0.28262341022491455,
-0.07407088577747345,
-0.25466039776802063,
0.1120002493262291,
-0.4700663089752197,
0.3354952335357666,
0.19042600691318512,
-0.03170778602361679,
-0.2627396285533905,
-0.07644614577293396,
-0.2539058327674866,
0.16476304829120636,
0.4068378806114197,
-0.11221396923065186,
-0.15645401179790497,
-0.03225388750433922,
-0.2148512601852417,
0.22874808311462402,
-0.10434038937091827,
0.19424213469028473,
-0.1866881549358368,
0.11930844932794571,
0.270630419254303,
0.2362114042043686,
0.4416406750679016,
-0.3354635238647461,
-0.12846685945987701,
0.24658986926078796,
0.00224309042096138,
-0.14956893026828766,
-0.1514667421579361,
0.027649883180856705,
0.3585681915283203,
-0.07402889430522919,
0.05725109577178955,
0.21137651801109314,
-0.20033884048461914,
-0.32002535462379456,
0.16982579231262207,
-0.19952470064163208,
-0.17007608711719513,
-0.23343400657176971,
-0.04898963123559952,
-0.28333979845046997,
-0.07695642858743668,
-0.03710665926337242,
-0.1540486067533493,
-0.23179078102111816,
0.029889587312936783,
-0.16397172212600708,
0.11102999001741409,
0.15632286667823792,
0.02929757907986641,
0.30123284459114075,
0.21591776609420776,
0.020234830677509308,
0.39444705843925476,
-0.035293810069561005,
0.3171941637992859,
0.45606547594070435,
-0.01676909253001213,
-0.10998952388763428,
-0.024350155144929886,
0.009998883120715618,
0.0677470862865448,
0.15113988518714905,
-0.4170917570590973,
0.1462957262992859,
0.07368418574333191,
-0.12102054059505463,
-0.38773977756500244,
-0.054751865565776825,
0.27098554372787476,
0.2128458172082901,
-0.3550460636615753,
-0.6746978759765625,
0.4435945153236389,
0.1464603841304779,
-0.24018043279647827,
0.13830924034118652,
-0.08839567005634308,
-0.2996915876865387,
-0.06106419861316681,
0.12307597696781158,
0.6396500468254089,
-0.04979003965854645,
0.09996378421783447,
-0.1400752067565918,
0.07196970283985138,
0.5022537112236023,
-0.3129163384437561,
0.30418527126312256,
-0.08619678765535355,
-0.19276808202266693,
-0.14550849795341492,
-0.11978606879711151,
0.3632361590862274,
0.26970458030700684,
-0.1359049379825592,
0.307972252368927,
-0.31612348556518555,
0.3013366162776947,
-0.15052038431167603,
-0.05498933419585228,
-0.028589783236384392,
-0.04068837687373161,
0.1442476511001587,
0.22818928956985474,
-0.0997176319360733,
0.33561909198760986,
-0.06899832934141159,
0.20483674108982086,
0.2493765652179718,
0.19368858635425568,
-0.3374403119087219,
-0.12573719024658203,
0.0690716877579689,
0.3066955804824829,
-0.08904038369655609,
-0.2670944631099701,
0.4590047299861908,
0.3506660759449005,
0.34233778715133667,
-0.045761626213788986,
-0.1775248795747757,
0.31480011343955994,
0.1381991058588028,
0.23389844596385956,
-0.16890642046928406,
-0.05100836977362633,
0.30564090609550476,
0.15944752097129822,
-0.26401400566101074,
0.15249016880989075,
-0.08829148858785629,
-0.22409546375274658,
-0.050948306918144226,
0.40851157903671265,
0.06405596435070038,
-0.5559613108634949,
-0.09083279967308044,
0.3273923099040985,
0.2179466187953949,
0.1672280728816986,
0.16390076279640198,
0.16619613766670227,
0.20955978333950043,
0.4357341527938843,
-0.3501187860965729,
-0.3544805943965912,
-0.022738084197044373,
0.2921636402606964,
0.43677178025245667,
-0.19637241959571838,
0.4934602677822113,
-0.2784537076950073,
-0.26682567596435547,
-0.18400132656097412,
-0.059324003756046295,
0.07688957452774048,
-0.19870269298553467,
0.03205178305506706,
0.05038141831755638,
0.5129693150520325,
0.11120826750993729,
0.002171512693166733,
-0.011747457087039948,
0.019625231623649597,
-0.21822898089885712,
-0.09114130586385727,
-0.15196095407009125,
-0.025247439742088318,
-0.07338088750839233,
0.348589152097702,
-0.05976474657654762,
-0.1408625692129135,
0.08228057622909546,
0.07429560273885727,
-0.30466601252555847,
0.10406550765037537,
-0.09145074337720871,
0.18771927058696747,
0.024871762841939926,
-0.059507109224796295,
0.10206905007362366,
-0.33102452754974365,
-0.02542171999812126,
-0.13439494371414185,
-0.2966212332248688,
-0.2075813114643097,
0.10332527756690979,
0.1513068675994873,
0.0808229148387909,
-0.23058800399303436,
-0.10545562207698822,
-0.1783614456653595,
-0.018911201506853104,
-0.18841944634914398,
0.20501047372817993,
0.3741442859172821,
0.05110814422369003,
0.20642632246017456,
-0.13300815224647522,
-0.1382596492767334,
-0.1291482150554657,
-0.13267165422439575,
-0.015238486230373383,
0.28601470589637756,
0.3478200435638428,
0.26527875661849976,
0.0007205929141491652,
0.10149914026260376,
-0.38589775562286377,
0.3128345012664795,
0.16143611073493958,
0.1342078447341919,
0.19040364027023315,
-0.36352890729904175,
0.24799317121505737,
0.1711931973695755,
0.2598031759262085,
0.1603671908378601,
-0.23524123430252075,
-0.24465711414813995,
0.047794390469789505,
0.17328891158103943,
-0.10723600536584854,
-0.19301846623420715,
0.16765716671943665,
0.28094562888145447,
-0.0967923253774643,
0.20385028421878815,
0.48008856177330017,
-0.032356519252061844,
0.5502659678459167,
-0.026942145079374313,
0.6699727773666382,
-0.4500138759613037,
0.4508245289325714,
0.1529664695262909,
0.10556404292583466,
-0.0680249035358429,
0.46518367528915405,
0.4063003659248352,
-0.023705728352069855,
0.6273494362831116,
0.01441705971956253,
0.2521226406097412,
0.44988206028938293,
0.2904346287250519,
-0.3405666649341583,
-0.8192086815834045,
0.310433566570282,
0.3982144296169281,
-0.44889432191848755,
0.11680880188941956,
0.026272568851709366,
-0.01000378280878067,
-0.045377347618341446,
0.01836893893778324,
-0.08889413625001907,
0.24485886096954346,
-0.18346616625785828,
-0.12320420145988464,
0.3968524634838104,
-0.2634817659854889,
0.0694974958896637,
0.09684166312217712,
-0.04346233233809471,
-0.051419101655483246,
0.16462531685829163,
-0.15880738198757172,
-0.21009521186351776,
-0.31027472019195557,
0.4182794988155365,
0.060718245804309845,
0.3171713650226593,
-0.08848467469215393,
0.22178709506988525,
-0.06837816536426544,
0.00830771028995514,
0.2621365487575531,
0.320821613073349,
0.37276390194892883,
0.09574346244335175,
0.24605220556259155,
0.12700311839580536,
-0.02108629420399666,
0.0010047052055597305,
-0.17511051893234253,
0.31051117181777954,
-0.18861550092697144,
-0.09049825370311737,
0.08980706334114075,
0.15739129483699799,
0.05610048770904541,
0.10405370593070984,
0.0010083355009555817,
0.25350382924079895,
-0.4775230288505554,
-0.005623243749141693,
0.16702760756015778,
0.022588282823562622,
-0.06311739981174469,
0.23471057415008545,
-0.30025365948677063,
-0.20691487193107605,
0.7661941647529602,
-0.02682529017329216,
0.2581924498081207,
-0.21063807606697083,
0.09335297346115112,
-0.033100638538599014,
0.3607286810874939,
0.1303011178970337,
0.10061559081077576,
-0.18311206996440887,
-0.05739263817667961,
-0.6422399282455444,
-0.09626080840826035,
-0.16629070043563843,
0.293777197599411,
0.10582439601421356,
0.09466229379177094,
-0.08223172277212143,
0.05797101557254791,
0.10924842208623886,
-0.18070058524608612,
-0.05887935310602188,
-0.23687103390693665,
-0.009735964238643646,
-0.05354193225502968,
-0.17692935466766357,
0.012656431645154953,
-0.20957128703594208,
-0.19166451692581177,
0.1834263801574707,
-0.06668776273727417,
0.03854120522737503,
-0.08508758246898651,
0.011673331260681152,
0.08222450315952301,
0.15339522063732147,
0.4481312036514282,
0.23285898566246033,
0.2836710810661316,
0.26139262318611145,
0.1431042104959488,
-0.31987497210502625,
-0.21907274425029755,
-0.1147533506155014,
0.24780312180519104,
0.07116653770208359,
-0.11486051976680756,
-0.49611714482307434,
0.02292744815349579,
-0.2213883399963379,
0.11737893521785736,
0.08954665064811707,
-0.016669688746333122,
-0.030882930383086205,
-0.2125702053308487,
-0.08933119475841522,
0.1652231365442276,
0.04409703612327576,
0.29766207933425903,
0.028904220089316368,
0.32172834873199463,
-0.35880911350250244,
-0.07838641107082367,
0.293399453163147,
-0.32429569959640503,
-0.22589170932769775,
0.06072875112295151,
0.14991964399814606,
0.04979122430086136,
-0.2368643879890442,
-0.5234309434890747,
-0.013979077339172363,
0.5846510529518127,
-0.36174073815345764,
-0.06856819987297058,
0.06320036202669144,
-0.09643426537513733,
0.09375816583633423,
-0.11030195653438568,
0.253966748714447,
0.06226811558008194,
0.0009360406547784805,
0.03942069038748741,
-0.28469955921173096
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | Thank you for the clarification.
This is a bit confusing. On one hand, it says that cache files are always recreated and written to a temporary directory that is removed; on the other hand the last bullet point makes me think that since the default according to the docs for `download_mode (Optional datasets.GenerateMode) β select the download/generate mode - Default to REUSE_DATASET_IF_EXISTS` => it almost sounds that it could reload prepared dataset files. Where are these files stored? I guess not in the temporary directory that is removed...
I find this type of api design error-prone. When I see as a programmer `datasets.set_caching_enabled(False)` I expect no reuse of anything in the cache. | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 112 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
Thank you for the clarification.
This is a bit confusing. On one hand, it says that cache files are always recreated and written to a temporary directory that is removed; on the other hand the last bullet point makes me think that since the default according to the docs for `download_mode (Optional datasets.GenerateMode) β select the download/generate mode - Default to REUSE_DATASET_IF_EXISTS` => it almost sounds that it could reload prepared dataset files. Where are these files stored? I guess not in the temporary directory that is removed...
I find this type of api design error-prone. When I see as a programmer `datasets.set_caching_enabled(False)` I expect no reuse of anything in the cache. | [
0.023499656468629837,
-0.006731219589710236,
-0.10065872967243195,
0.22953376173973083,
0.21939027309417725,
0.16460686922073364,
0.14268338680267334,
-0.12215995788574219,
0.26811519265174866,
-0.221397265791893,
0.14639051258563995,
0.04763791710138321,
-0.08117957413196564,
-0.09891989827156067,
0.041984353214502335,
0.439771443605423,
0.14167308807373047,
0.12206996232271194,
-0.12413901090621948,
-0.024245455861091614,
-0.11321381479501724,
-0.07207231223583221,
-0.22969242930412292,
-0.009361214935779572,
-0.38641804456710815,
-0.18578943610191345,
-0.013625744730234146,
-0.009507536888122559,
-0.12641876935958862,
-0.6089861392974854,
0.500725507736206,
0.3236505389213562,
0.1929258555173874,
0.1994948387145996,
-0.00011819512292277068,
0.06777288019657135,
0.2361234426498413,
-0.12097854167222977,
-0.27350711822509766,
-0.07278323173522949,
-0.6044925451278687,
-0.2693716287612915,
0.21450352668762207,
-0.10044053941965103,
0.1328166425228119,
-0.3968069851398468,
0.14878281950950623,
-0.6915856003761292,
0.46523743867874146,
0.35040032863616943,
0.172118678689003,
-0.28238314390182495,
-0.4284878671169281,
0.07574639469385147,
-0.11823960393667221,
0.19314801692962646,
-0.030906008556485176,
-0.13359101116657257,
0.17993181943893433,
0.08532336354255676,
0.04459827020764351,
0.17980165779590607,
-0.07020863890647888,
0.1382528841495514,
0.6103150844573975,
0.0010877354070544243,
-0.3598734736442566,
-0.48361000418663025,
0.3094479441642761,
-0.03792223334312439,
1.1107503175735474,
-0.2843288779258728,
-0.21588416397571564,
-0.3374544680118561,
-0.11479562520980835,
-0.16294832527637482,
0.2030143439769745,
0.014190109446644783,
0.08175285160541534,
0.2514042854309082,
-0.4645249545574188,
-0.41271325945854187,
-0.10393941402435303,
-0.1423557996749878,
-0.13135926425457,
-0.18551596999168396,
-0.3275108337402344,
0.05611758679151535,
-0.24202017486095428,
0.03815995156764984,
0.46486273407936096,
-0.591077446937561,
0.0029418878257274628,
0.31649112701416016,
-0.2159610539674759,
-0.03299322351813316,
0.18874534964561462,
0.3879159092903137,
0.000581761822104454,
0.3070465922355652,
0.22296535968780518,
0.04023047164082527,
-0.24442797899246216,
0.09548388421535492,
0.40191733837127686,
0.3555065393447876,
0.21712976694107056,
0.020725369453430176,
0.15865156054496765,
-0.11435272544622421,
-0.06754978001117706,
-0.2549191117286682,
0.037896785885095596,
-0.14898455142974854,
0.6144717931747437,
0.011102690361440182,
0.2402535229921341,
-0.24067790806293488,
-0.21743373572826385,
0.11859850585460663,
-0.014571115374565125,
-0.08955302834510803,
0.021740607917308807,
0.10522139817476273,
-0.055134762078523636,
0.0611126571893692,
-0.19948410987854004,
0.020843233913183212,
-0.1996302455663681,
-0.23555880784988403,
-0.16459807753562927,
-0.14723210036754608,
-0.2722468376159668,
0.06559398770332336,
0.23712675273418427,
-0.19965265691280365,
0.20411746203899384,
0.34991100430488586,
0.014224845916032791,
-0.27146321535110474,
0.3167570233345032,
0.05347571149468422,
0.3164253234863281,
0.3470379412174225,
-0.1522311270236969,
0.2555708885192871,
0.258089154958725,
-0.0264408178627491,
-0.17139089107513428,
0.41408461332321167,
-0.4340631365776062,
-0.46253758668899536,
0.20608098804950714,
0.14053429663181305,
-0.4565964937210083,
-0.053190723061561584,
-0.1370825171470642,
-0.0015278421342372894,
0.4295647144317627,
0.010373905301094055,
0.18199801445007324,
-0.0979931652545929,
-0.08369310945272446,
-0.3451652228832245,
0.0018541961908340454,
0.5554594397544861,
-0.6028237342834473,
0.017168357968330383,
-0.18155427277088165,
-0.1036815494298935,
-0.031186245381832123,
0.20992374420166016,
-0.3868826627731323,
0.24380937218666077,
-0.2664463222026825,
-0.15069454908370972,
0.29506203532218933,
-0.27055588364601135,
-0.3486517667770386,
-0.023202097043395042,
0.3061288595199585,
0.3065517246723175,
0.039665769785642624,
0.11316613852977753,
0.17028115689754486,
-0.020074136555194855,
-0.030762948095798492,
-0.04587873816490173,
0.020520135760307312,
-0.30101722478866577,
-0.14180167019367218,
-0.23153597116470337,
0.102464959025383,
-0.2727431654930115,
0.012484461069107056,
0.18222111463546753,
0.02625638246536255,
-0.13054916262626648,
0.015008293092250824,
0.04172363132238388,
0.06575868278741837,
0.249811053276062,
0.043764129281044006,
0.13659216463565826,
0.0974457785487175,
0.08892883360385895,
-0.5970898866653442,
0.3292791545391083,
0.023564472794532776,
-0.4680379033088684,
-0.09443308413028717,
-0.21021698415279388,
-0.14546304941177368,
-0.11035628616809845,
-0.4886604845523834,
-0.18754568696022034,
0.03477085381746292,
-0.0018732249736785889,
0.15233904123306274,
-0.01823752373456955,
-0.29086652398109436,
0.3823862373828888,
-0.2144010215997696,
-0.04401716962456703,
-0.21941420435905457,
0.14620475471019745,
0.024348312988877296,
0.20986540615558624,
-0.31316372752189636,
0.10229165852069855,
0.10380896925926208,
-0.037407178431749344,
0.05183742567896843,
0.2952744960784912,
0.1787334531545639,
0.4258136749267578,
-0.001428358256816864,
0.4329092502593994,
0.13855944573879242,
0.010997045785188675,
0.2834737002849579,
-0.1397247314453125,
0.08736642450094223,
-0.03469568118453026,
-0.19875121116638184,
0.2592175602912903,
-0.22506053745746613,
0.07674062252044678,
-0.08305813372135162,
-0.24201305210590363,
0.09861874580383301,
0.09784214198589325,
-0.07637165486812592,
-0.27099743485450745,
-0.13681752979755402,
0.2496689409017563,
0.15022847056388855,
0.34292569756507874,
-0.046141475439071655,
0.250221848487854,
0.30184829235076904,
-0.05663863569498062,
-0.04513837397098541,
-0.1202748641371727,
-0.16157788038253784,
-0.3995043635368347,
0.16066193580627441,
0.4072236716747284,
0.5993426442146301,
0.062253449112176895,
0.21820642054080963,
-0.025842925533652306,
0.10388202965259552,
-0.1643979549407959,
0.28323569893836975,
-0.05321604013442993,
-0.044737622141838074,
0.1709441840648651,
0.05312780663371086,
-0.0749831423163414,
-0.36021602153778076,
0.13970185816287994,
0.27989956736564636,
0.18869981169700623,
-0.367191880941391,
0.25294116139411926,
-0.4431511163711548,
-0.18170487880706787,
-0.17058542370796204,
0.1654938906431198,
-0.10211950540542603,
-0.4035170078277588,
-0.05258234590291977,
-0.004776250571012497,
0.14090503752231598,
0.08202382177114487,
-0.1954798549413681,
0.3975164294242859,
-0.18602222204208374,
-0.005378939211368561,
-0.18060268461704254,
-0.02110644243657589,
-0.2057395577430725,
0.02982448786497116,
0.12935908138751984,
-0.27060121297836304,
0.2892290949821472,
-0.07674124836921692,
0.1035090908408165,
-0.3255175054073334,
0.07746564596891403,
0.017413616180419922,
0.20443376898765564,
0.23599880933761597,
-0.04909387230873108,
0.05451095104217529,
0.11794513463973999,
0.22067400813102722,
-0.10585241764783859,
-0.0016605518758296967,
0.06029840558767319,
-0.19317133724689484,
0.08588355034589767,
0.1474360078573227,
-0.07838846743106842,
-0.29041579365730286,
-0.3152565658092499,
-0.10243216156959534,
-0.2619399428367615,
0.027781706303358078,
-0.04817042499780655,
0.3808298707008362,
0.01951029896736145,
-0.0984848216176033,
-0.003982685040682554,
-0.02924574725329876,
-0.5016863346099854,
-0.5709945559501648,
0.24433158338069916,
-0.13077349960803986,
-0.004299454391002655,
0.20752376317977905,
0.08455757796764374,
0.3798982799053192,
0.11973453313112259,
-0.5160895586013794,
-0.17881792783737183,
-0.056851938366889954,
0.151649609208107,
0.08866551518440247,
0.03105413168668747,
0.3348369300365448,
0.07758031785488129,
0.03352700173854828,
-0.12693136930465698,
-0.05958499386906624,
-0.03512110561132431,
-0.01858203485608101,
0.16838988661766052,
0.1260143667459488,
-0.06939768046140671,
0.0441119484603405,
0.9790995121002197,
0.40862393379211426,
-0.115441232919693,
0.17608770728111267,
0.06960314512252808,
0.7738028764724731,
-0.037713877856731415,
-0.07413721084594727,
-0.20788930356502533,
-0.18846002221107483,
-0.3139917254447937,
0.016748331487178802,
0.08863820880651474,
-0.016152799129486084,
0.1868170201778412,
0.34738487005233765,
-0.13133879005908966,
-0.21652288734912872,
0.051559001207351685,
-0.3629051148891449,
0.3482804596424103,
0.26500338315963745,
-0.0842529684305191,
-0.3296339809894562,
-0.01855411008000374,
-0.29465439915657043,
0.18307477235794067,
0.44021666049957275,
0.029231183230876923,
-0.19517317414283752,
-0.1712912768125534,
-0.2636549472808838,
0.17435672879219055,
-0.006118949502706528,
0.20297585427761078,
-0.006115879863500595,
0.2090800702571869,
0.3335348069667816,
0.18024547398090363,
0.3525329828262329,
-0.502612829208374,
-0.18245741724967957,
0.13468246161937714,
0.18802766501903534,
0.019483862444758415,
-0.1133228987455368,
0.11279571056365967,
0.2617643177509308,
0.006089456379413605,
-0.035384587943553925,
0.2537998557090759,
-0.2336898148059845,
-0.358902245759964,
0.23167601227760315,
-0.2619052529335022,
-0.0648512914776802,
-0.18653464317321777,
-0.18262562155723572,
-0.1798883080482483,
-0.17471063137054443,
0.00357157364487648,
-0.3195202648639679,
-0.21468594670295715,
0.017603110522031784,
-0.07040845602750778,
0.1649591028690338,
0.0369962677359581,
-0.04739241302013397,
0.2551010251045227,
0.0189984031021595,
0.0032835379242897034,
0.3809717893600464,
-0.14575812220573425,
0.28996145725250244,
0.5449881553649902,
-0.17222675681114197,
-0.008487604558467865,
-0.08302586525678635,
0.04144102334976196,
-0.014842696487903595,
0.19666847586631775,
-0.3733762204647064,
0.1374659240245819,
-0.05857669562101364,
-0.21014021337032318,
-0.43827998638153076,
-0.12864640355110168,
0.2698000371456146,
0.08603262156248093,
-0.14526236057281494,
-0.8525412678718567,
0.48822221159935,
0.13496021926403046,
-0.300237774848938,
0.2561309039592743,
-0.02631540596485138,
-0.2982075810432434,
-0.02918744832277298,
0.1631518006324768,
0.6705074906349182,
0.03428678214550018,
0.2532726228237152,
-0.10950740426778793,
-0.06968623399734497,
0.6333460807800293,
-0.37049055099487305,
0.260089248418808,
-0.13898758590221405,
-0.05346792936325073,
-0.22365708649158478,
-0.14582811295986176,
0.3658934235572815,
0.15966269373893738,
-0.00782281905412674,
0.3788115680217743,
-0.1656181663274765,
0.3940688371658325,
-0.06918156892061234,
-0.07415100932121277,
-0.2906841039657593,
0.022586317732930183,
0.17847473919391632,
0.11185234785079956,
0.13640263676643372,
0.32560741901397705,
-0.22109466791152954,
0.25636720657348633,
0.317825585603714,
0.1809581220149994,
-0.30078524351119995,
-0.28862062096595764,
-0.06433261185884476,
0.28304797410964966,
-0.2062586098909378,
-0.28313589096069336,
0.2936156988143921,
0.43671584129333496,
0.19425435364246368,
-0.05880915746092796,
-0.16225816309452057,
0.24454432725906372,
0.17026038467884064,
0.1599702686071396,
-0.12030725181102753,
-0.05484580993652344,
0.2731929123401642,
0.13043585419654846,
-0.21214979887008667,
0.16571304202079773,
-0.11858475208282471,
-0.0801924392580986,
-0.2377205193042755,
0.32190531492233276,
0.12422406673431396,
-0.5290641188621521,
-0.25641319155693054,
0.2405349463224411,
0.13541752099990845,
0.1218913197517395,
0.08497662842273712,
0.26683732867240906,
0.2513149380683899,
0.42075926065444946,
-0.5648021101951599,
-0.18991553783416748,
-0.05057781562209129,
0.293049693107605,
0.5396538972854614,
-0.2217864692211151,
0.4010859429836273,
-0.37722647190093994,
-0.24430611729621887,
-0.15877482295036316,
0.05016621947288513,
-0.024127237498760223,
-0.1426788866519928,
0.052215900272130966,
0.0530313141644001,
0.37434977293014526,
0.027289051562547684,
0.00460110604763031,
0.020917050540447235,
0.009592615067958832,
-0.23367410898208618,
-0.16445885598659515,
-0.08685712516307831,
0.03528875857591629,
0.05729453265666962,
0.40758615732192993,
-0.03269163519144058,
-0.3268318176269531,
0.09594393521547318,
-0.1341901421546936,
-0.23896481096744537,
0.15811334550380707,
0.012210706248879433,
0.10368551313877106,
0.006294049322605133,
0.04870210215449333,
0.0077854935079813,
-0.25780802965164185,
-0.12302162498235703,
-0.13654054701328278,
-0.3432871699333191,
-0.12997832894325256,
0.1342007964849472,
0.18954817950725555,
0.08324946463108063,
-0.24293464422225952,
0.026556547731161118,
-0.27873361110687256,
-0.006221555173397064,
-0.13612405955791473,
0.22299005091190338,
0.2821003794670105,
0.03756704181432724,
0.14264698326587677,
-0.277972936630249,
-0.02245572954416275,
-0.1634533405303955,
0.04487129673361778,
0.046244245022535324,
0.28927329182624817,
0.3116779625415802,
0.31970319151878357,
-0.162852942943573,
0.015492744743824005,
-0.3095220923423767,
0.3768356144428253,
0.057394132018089294,
0.14865106344223022,
0.2582587003707886,
-0.3487163782119751,
0.2262749969959259,
0.11721343547105789,
0.19906145334243774,
0.3502596914768219,
-0.28526103496551514,
-0.10700596868991852,
0.027434254065155983,
0.11202490329742432,
-0.0820118710398674,
-0.1429762989282608,
0.06830278038978577,
0.2846560776233673,
-0.12257419526576996,
0.28546592593193054,
0.5204182863235474,
-0.11545584350824356,
0.4649973511695862,
-0.057753417640924454,
0.6504694819450378,
-0.4031919836997986,
0.37575221061706543,
0.11903798580169678,
0.0685902088880539,
0.009272333234548569,
0.327464759349823,
0.4481208920478821,
0.142203688621521,
0.6588887572288513,
0.12187068164348602,
0.38794881105422974,
0.46733343601226807,
0.20162038505077362,
-0.3833971619606018,
-0.8955918550491333,
0.30783748626708984,
0.38186466693878174,
-0.36854514479637146,
0.26390859484672546,
0.10648304224014282,
-0.031250037252902985,
-0.13808389008045197,
0.09025552123785019,
-0.09981230646371841,
0.19680683314800262,
-0.1688736379146576,
-0.18329979479312897,
0.36031389236450195,
-0.38668596744537354,
0.18720927834510803,
0.11687187850475311,
-0.006679631769657135,
-0.08980932831764221,
0.014119096100330353,
-0.20203228294849396,
-0.2183414250612259,
-0.3180064260959625,
0.48473718762397766,
0.03479728102684021,
0.23265093564987183,
-0.061707351356744766,
0.28554436564445496,
0.0759228840470314,
-0.015252001583576202,
0.15971198678016663,
0.2611501216888428,
0.3983960449695587,
0.11813059449195862,
0.14486178755760193,
0.12760581076145172,
0.04565276950597763,
0.012699322775006294,
-0.1188005805015564,
0.22742311656475067,
-0.15832921862602234,
-0.10214036703109741,
0.07068021595478058,
0.11906200647354126,
0.1113487109541893,
0.06805561482906342,
0.07853135466575623,
0.06706783920526505,
-0.41879090666770935,
0.08652603626251221,
0.11185767501592636,
0.05413869768381119,
0.04709449037909508,
0.2602120041847229,
-0.2820611596107483,
-0.20089267194271088,
0.5995697379112244,
-0.018512818962335587,
0.18891236186027527,
-0.2611025273799896,
0.05337895452976227,
-0.13869060575962067,
0.20620617270469666,
0.26038140058517456,
0.1407029926776886,
-0.18009179830551147,
-0.06045671924948692,
-0.6016354560852051,
-0.08576943725347519,
-0.1399375945329666,
0.20873314142227173,
0.0244959257543087,
0.16471847891807556,
-0.1989479959011078,
-0.047362133860588074,
0.08392183482646942,
-0.045446086674928665,
0.054981306195259094,
-0.009548932313919067,
0.03704753890633583,
-0.18255780637264252,
-0.194101020693779,
-0.02265726961195469,
-0.29079222679138184,
-0.3785872161388397,
0.02321571111679077,
-0.21555159986019135,
-0.05120651051402092,
-0.09246760606765747,
0.0003641769289970398,
0.18370121717453003,
0.0372895672917366,
0.5205758810043335,
0.20666100084781647,
0.17020250856876373,
0.3203723430633545,
-0.01714460179209709,
-0.260978639125824,
-0.03013102523982525,
-0.12418531626462936,
0.14298708736896515,
0.04515049234032631,
-0.10892670601606369,
-0.5915426015853882,
0.07861003279685974,
-0.21931341290473938,
-0.005659969989210367,
0.11236484348773956,
0.04194029048085213,
-0.08966808021068573,
-0.18705445528030396,
-0.2448747456073761,
0.2106909304857254,
0.2306341975927353,
0.2907434105873108,
-0.017701424658298492,
0.30300989747047424,
-0.29978102445602417,
0.08323758095502853,
0.25383877754211426,
-0.18350650370121002,
-0.1611139476299286,
-0.07862682640552521,
0.2735329866409302,
0.16039198637008667,
-0.2609640955924988,
-0.4676232933998108,
0.02544519305229187,
0.5799105167388916,
-0.3833323121070862,
-0.1049099713563919,
0.017323633655905724,
-0.06418849527835846,
-0.014564339071512222,
-0.1484283059835434,
0.5461587905883789,
0.027882985770702362,
0.0070443470031023026,
0.14805591106414795,
-0.29956746101379395
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | It would be nice if the documentation elaborated on all the possible values for `download_mode` and/or a link to `datasets.GenerateMode`.
This info here:
```
"""`Enum` for how to treat pre-existing downloads and data.
The default mode is `REUSE_DATASET_IF_EXISTS`, which will reuse both
raw downloads and the prepared dataset if they exist.
The generations modes:
| | Downloads | Dataset |
| -----------------------------------|-----------|---------|
| `REUSE_DATASET_IF_EXISTS` (default)| Reuse | Reuse |
| `REUSE_CACHE_IF_EXISTS` | Reuse | Fresh |
| `FORCE_REDOWNLOAD` | Fresh | Fresh |
``` | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 84 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
It would be nice if the documentation elaborated on all the possible values for `download_mode` and/or a link to `datasets.GenerateMode`.
This info here:
```
"""`Enum` for how to treat pre-existing downloads and data.
The default mode is `REUSE_DATASET_IF_EXISTS`, which will reuse both
raw downloads and the prepared dataset if they exist.
The generations modes:
| | Downloads | Dataset |
| -----------------------------------|-----------|---------|
| `REUSE_DATASET_IF_EXISTS` (default)| Reuse | Reuse |
| `REUSE_CACHE_IF_EXISTS` | Reuse | Fresh |
| `FORCE_REDOWNLOAD` | Fresh | Fresh |
``` | [
-0.13257543742656708,
0.0042612552642822266,
-0.10032559931278229,
0.14501947164535522,
0.26111477613449097,
0.0885639563202858,
0.14977996051311493,
-0.005440022796392441,
0.05236497148871422,
-0.22100000083446503,
-0.010533921420574188,
-0.009321505203843117,
-0.07880253344774246,
0.01480255089700222,
-0.0911453366279602,
0.45155075192451477,
0.17176710069179535,
0.054477863013744354,
-0.27031567692756653,
-0.012686565518379211,
-0.07954323291778564,
-0.05089917033910751,
-0.1528281271457672,
-0.017735935747623444,
-0.32577911019325256,
-0.001737944781780243,
0.060810767114162445,
-0.04848533123731613,
-0.2403378039598465,
-0.6755391359329224,
0.5190630555152893,
0.44948410987854004,
0.20839133858680725,
0.1146773099899292,
-0.00011681511386996135,
0.04894925653934479,
0.3039729595184326,
-0.13387879729270935,
-0.28750789165496826,
-0.01039193570613861,
-0.5450858473777771,
-0.291278600692749,
0.11243005841970444,
-0.11206008493900299,
0.0395757257938385,
-0.1538887470960617,
0.08112246543169022,
-0.5785894393920898,
0.3715525269508362,
0.3695133626461029,
0.18183372914791107,
-0.18327680230140686,
-0.20010629296302795,
0.08932387083768845,
0.1412217915058136,
0.24371016025543213,
-0.12377960234880447,
0.037241656333208084,
0.3220754861831665,
0.12478064000606537,
-0.01819968968629837,
0.28794926404953003,
-0.05605613440275192,
0.2960298955440521,
0.5656487941741943,
0.00934438407421112,
0.16367748379707336,
-0.4565843343734741,
0.23888906836509705,
0.025014594197273254,
1.149366021156311,
-0.2332354187965393,
-0.28735437989234924,
-0.3733198344707489,
-0.11095423996448517,
-0.3186916410923004,
0.2588652968406677,
0.01407519169151783,
-0.02722006104886532,
0.1969657689332962,
-0.6656897068023682,
-0.23695102334022522,
-0.15104645490646362,
-0.14398489892482758,
-0.11404576897621155,
0.008321955800056458,
-0.32880932092666626,
0.06014823541045189,
0.022860169410705566,
-0.04486984759569168,
0.5436961650848389,
-0.4406122863292694,
0.017796577885746956,
0.22354571521282196,
-0.3665754795074463,
-0.13503825664520264,
0.1707548201084137,
0.3412368595600128,
0.05596122145652771,
0.28097134828567505,
0.0043474230915308,
-0.10903363674879074,
-0.1632775515317917,
0.07960769534111023,
0.4099762439727783,
0.1847311556339264,
0.15361791849136353,
-0.12110384553670883,
0.10266577452421188,
-0.06536026298999786,
-0.012792292982339859,
-0.15229466557502747,
0.05789311230182648,
-0.3024712800979614,
0.5569895505905151,
0.025959011167287827,
0.223909392952919,
-0.27498164772987366,
-0.3039263188838959,
-0.003877885639667511,
0.014193341135978699,
-0.2060307413339615,
0.09288638830184937,
0.18613247573375702,
-0.07541550695896149,
0.06217197701334953,
-0.29229146242141724,
0.01884426176548004,
-0.15901152789592743,
-0.3619893789291382,
-0.15785127878189087,
-0.17932549118995667,
-0.3269335925579071,
0.020479749888181686,
0.2394791692495346,
-0.25745660066604614,
0.10054431855678558,
0.4393436014652252,
0.04203636199235916,
-0.2138964980840683,
0.18896977603435516,
0.02548709511756897,
0.20105624198913574,
0.49779191613197327,
-0.28657203912734985,
0.19737540185451508,
0.268518328666687,
0.01112985610961914,
-0.19181016087532043,
0.41450271010398865,
-0.3691079020500183,
-0.5318116545677185,
0.14740878343582153,
0.13900499045848846,
-0.5060510039329529,
-0.14228923618793488,
-0.09006119519472122,
0.11058714985847473,
0.37795117497444153,
-0.005670253187417984,
0.16126158833503723,
-0.14325706660747528,
-0.13684090971946716,
-0.36846235394477844,
0.0003973357379436493,
0.4416208863258362,
-0.6113402843475342,
-0.017036516219377518,
-0.370536744594574,
-0.22740796208381653,
0.15914568305015564,
0.1475977897644043,
-0.3789155185222626,
0.17542089521884918,
-0.18634314835071564,
-0.20899948477745056,
0.18263360857963562,
-0.12417425215244293,
-0.3571071922779083,
0.14538219571113586,
0.39755314588546753,
0.2618072032928467,
0.09760014712810516,
0.13037770986557007,
0.10166999697685242,
-0.12065946310758591,
-0.11813206970691681,
-0.03772364929318428,
-0.004987915977835655,
-0.25030380487442017,
-0.07728548347949982,
-0.35031363368034363,
0.12767738103866577,
-0.163927361369133,
0.015546757727861404,
0.1499372273683548,
0.08022689074277878,
-0.10149216651916504,
-0.058877475559711456,
-0.0537632517516613,
0.08577101677656174,
0.1736118048429489,
0.13479439914226532,
0.14713266491889954,
0.028238844126462936,
0.1696176826953888,
-0.6066910624504089,
0.3852393329143524,
0.06620462238788605,
-0.34801581501960754,
-0.08715549111366272,
-0.21185928583145142,
-0.299663782119751,
-0.025024596601724625,
-0.3529517352581024,
-0.2120276242494583,
0.04582957178354263,
-0.05067382752895355,
0.15718001127243042,
-0.15181568264961243,
-0.25824278593063354,
0.34385910630226135,
-0.24237601459026337,
0.014801648445427418,
-0.1462840437889099,
0.1495354324579239,
-0.04880290478467941,
0.20193593204021454,
-0.20944561064243317,
-0.015609338879585266,
0.11561790108680725,
0.008621850982308388,
0.07170811295509338,
0.4083193838596344,
0.1737719178199768,
0.4718438386917114,
-0.10329819470643997,
0.4203926622867584,
0.13776914775371552,
0.07367680966854095,
0.21358013153076172,
-0.1835937798023224,
0.10245386511087418,
0.014230974018573761,
-0.2718120515346527,
0.3134007751941681,
-0.19314713776111603,
0.0768745094537735,
-0.11403333395719528,
-0.27361345291137695,
0.13061551749706268,
0.08103927969932556,
-0.04600103199481964,
-0.27514249086380005,
-0.08083021640777588,
0.1798795461654663,
0.003794074058532715,
0.30584028363227844,
-0.02887226641178131,
0.28790807723999023,
0.220086470246315,
-0.2195734977722168,
-0.06103003770112991,
-0.012492839246988297,
0.0235610231757164,
-0.47249549627304077,
0.18490923941135406,
0.4928191006183624,
0.5551478862762451,
0.022260088473558426,
0.2973549962043762,
0.04338138550519943,
-0.046156030148267746,
-0.29605966806411743,
0.3671458661556244,
-0.19079352915287018,
0.04650336131453514,
0.15678028762340546,
-0.05066441744565964,
-0.14994929730892181,
-0.3461316227912903,
0.12565965950489044,
0.3300364315509796,
0.32102566957473755,
-0.45054155588150024,
0.11894484609365463,
-0.41109707951545715,
-0.07872257381677628,
-0.07618269324302673,
0.15490444004535675,
-0.23106667399406433,
-0.3646591305732727,
-0.10814537107944489,
0.1242578774690628,
0.13147075474262238,
-0.01636497862637043,
-0.19970455765724182,
0.25605446100234985,
-0.12828032672405243,
0.05145798623561859,
-0.12847009301185608,
-0.17925268411636353,
-0.1449582278728485,
0.06500393152236938,
0.0717625766992569,
-0.30106186866760254,
0.25863876938819885,
-0.1313633918762207,
0.09433961659669876,
-0.22285622358322144,
-0.012240402400493622,
0.09624536335468292,
0.07745780050754547,
0.2347010225057602,
-0.13157160580158234,
0.029680244624614716,
0.12029293179512024,
0.1396782398223877,
-0.08191829174757004,
-0.0028211604803800583,
-0.0017426498234272003,
-0.20950819551944733,
-0.006124177947640419,
0.10705643147230148,
-0.1420658528804779,
-0.30351224541664124,
-0.2983776330947876,
-0.09504207968711853,
-0.25785142183303833,
0.00048141181468963623,
-0.005252577364444733,
0.557214617729187,
-0.009997041895985603,
0.006604061461985111,
0.093948133289814,
0.015162337571382523,
-0.5945010781288147,
-0.49541527032852173,
0.29069983959198,
-0.10307476669549942,
-0.03940163925290108,
0.2776835262775421,
0.0995817482471466,
0.3611541986465454,
0.292603075504303,
-0.5287021398544312,
-0.035663630813360214,
-0.15692833065986633,
0.10761390626430511,
0.15528596937656403,
0.02890547178685665,
0.27212342619895935,
0.08682262152433395,
-0.006167043000459671,
-0.13015638291835785,
0.007491461932659149,
-0.1374361217021942,
-0.04727336764335632,
0.2741396129131317,
0.06057761609554291,
0.023810843005776405,
0.06369565427303314,
0.9581975936889648,
0.4418126940727234,
-0.08329269289970398,
0.16601449251174927,
0.08285348117351532,
0.6536436676979065,
0.08801619708538055,
-0.048327669501304626,
0.010689044371247292,
-0.22499549388885498,
-0.29969823360443115,
0.026103414595127106,
0.015635473653674126,
-0.0034112874418497086,
0.09519051015377045,
0.44207072257995605,
-0.13361668586730957,
-0.2970891296863556,
0.05593900382518768,
-0.32864564657211304,
0.4383741021156311,
0.11996559798717499,
-0.024677719920873642,
-0.13553407788276672,
-0.03863806277513504,
-0.3168526887893677,
0.27353447675704956,
0.3320982754230499,
0.00519255455583334,
-0.2060045599937439,
-0.033715009689331055,
-0.27318695187568665,
0.19805283844470978,
0.08858805894851685,
0.13846687972545624,
-0.07644379138946533,
0.20414510369300842,
0.30536073446273804,
0.05516591668128967,
0.4123058319091797,
-0.6105517745018005,
-0.010504629462957382,
0.12388958036899567,
0.08260966837406158,
-0.02885797992348671,
-0.17155982553958893,
-0.01096072793006897,
0.13509248197078705,
0.050785087049007416,
-0.12054748833179474,
0.07074671238660812,
-0.24544434249401093,
-0.2502865195274353,
0.07758024334907532,
-0.09452839195728302,
-0.18383263051509857,
-0.20003242790699005,
-0.12343593686819077,
-0.2955693006515503,
-0.04232022911310196,
-0.07762962579727173,
-0.24148136377334595,
-0.3587050437927246,
0.10355918109416962,
-0.05161236226558685,
0.27317315340042114,
0.10973063111305237,
0.15896622836589813,
0.2044166624546051,
0.16614361107349396,
-0.018342427909374237,
0.3403424620628357,
-0.4006924033164978,
0.3688639998435974,
0.5073346495628357,
-0.04518872871994972,
0.001062139868736267,
-0.06558526307344437,
0.05746053531765938,
-0.07695712894201279,
0.22002455592155457,
-0.3538413941860199,
0.02129630744457245,
-0.03343158960342407,
-0.25355207920074463,
-0.4195619225502014,
-0.07671340554952621,
0.33130231499671936,
0.02476895973086357,
-0.22315183281898499,
-0.8084747791290283,
0.5134008526802063,
0.1843256950378418,
-0.262962281703949,
0.06299708038568497,
0.05938813090324402,
-0.233833909034729,
-0.31895023584365845,
0.24639326333999634,
0.6856462955474854,
0.02112121880054474,
0.16049553453922272,
0.018162064254283905,
-0.03611668944358826,
0.5817769765853882,
-0.2473655343055725,
0.1859797239303589,
-0.04984280839562416,
0.020507287234067917,
-0.18847328424453735,
-0.12359870970249176,
0.4794456660747528,
0.22879160940647125,
-0.15469340980052948,
0.30276206135749817,
-0.18602390587329865,
0.39604827761650085,
-0.10691414028406143,
-0.12338580191135406,
-0.22251951694488525,
0.02050694264471531,
0.16767273843288422,
0.17715586721897125,
-0.04176366329193115,
0.34282103180885315,
-0.15813341736793518,
0.22057051956653595,
0.23291337490081787,
0.21625526249408722,
-0.469249427318573,
-0.25143006443977356,
0.12758783996105194,
0.24137750267982483,
-0.18213601410388947,
-0.26396334171295166,
0.3876970708370209,
0.41824424266815186,
0.36481815576553345,
-0.10931332409381866,
-0.22852545976638794,
0.2783448398113251,
0.08907970786094666,
0.18867309391498566,
-0.15428119897842407,
-0.06472297757863998,
0.35711342096328735,
0.0443258062005043,
-0.27554401755332947,
0.21782580018043518,
-0.01687554456293583,
-0.038072116672992706,
-0.05115105211734772,
0.18244168162345886,
-0.03266136348247528,
-0.525184154510498,
-0.1205986738204956,
0.280126690864563,
0.12794168293476105,
0.15332353115081787,
0.09722200036048889,
0.18011261522769928,
0.16804391145706177,
0.3907106816768646,
-0.5758718848228455,
-0.21641266345977783,
-0.13271556794643402,
0.2938944101333618,
0.47570380568504333,
-0.22323568165302277,
0.2769852876663208,
-0.3090810179710388,
-0.27339720726013184,
-0.11323701590299606,
0.08647174388170242,
-0.15125249326229095,
-0.25683245062828064,
0.08098424226045609,
0.05622905492782593,
0.3315262794494629,
0.09112200140953064,
0.0808098167181015,
0.08514931797981262,
0.11141777038574219,
-0.12193405628204346,
-0.09547439962625504,
-0.1219085231423378,
-0.07599946856498718,
-0.09558387100696564,
0.37118470668792725,
-0.09308893233537674,
-0.26474764943122864,
0.17069509625434875,
-0.12951555848121643,
-0.25502175092697144,
0.08768434822559357,
-0.0030137747526168823,
0.16419366002082825,
0.06230263039469719,
-0.12572526931762695,
0.045717447996139526,
-0.3645147383213043,
-0.10384999215602875,
-0.17746174335479736,
-0.5247847437858582,
-0.13877369463443756,
-0.00826326198875904,
0.19291652739048004,
0.11147709935903549,
-0.3349025249481201,
0.027439337223768234,
-0.2507595717906952,
-0.10265359282493591,
-0.09966548532247543,
0.1932179480791092,
0.23944464325904846,
0.06430216878652573,
0.24330578744411469,
-0.1276586651802063,
0.06001598387956619,
-0.17101852595806122,
-0.07931922376155853,
0.04486298933625221,
0.3459503948688507,
0.3399980366230011,
0.3575984537601471,
-0.17725911736488342,
-0.03748594969511032,
-0.3184014856815338,
0.39747199416160583,
0.19372309744358063,
0.03829456865787506,
0.28720563650131226,
-0.27773940563201904,
0.23084339499473572,
0.07801009714603424,
0.32347217202186584,
0.35061490535736084,
-0.14373263716697693,
-0.1888294667005539,
0.037548646330833435,
0.13379248976707458,
-0.09082107245922089,
-0.1459817737340927,
-0.03686641529202461,
0.3552684485912323,
-0.08665688335895538,
0.24951019883155823,
0.5172487497329712,
0.08038513362407684,
0.5661523342132568,
-0.010808556340634823,
0.5127913355827332,
-0.3276563286781311,
0.43683290481567383,
0.35363179445266724,
0.11256654560565948,
-0.0184975303709507,
0.45812833309173584,
0.3813282549381256,
0.13209453225135803,
0.5072707533836365,
0.03204776719212532,
0.22377771139144897,
0.3761741518974304,
0.20627346634864807,
-0.3331027030944824,
-0.799094021320343,
0.27459755539894104,
0.42372220754623413,
-0.4052152633666992,
0.24539899826049805,
0.10989148169755936,
-0.04611632972955704,
-0.06033656373620033,
0.03302813321352005,
-0.1960100680589676,
0.18853187561035156,
-0.1355806291103363,
-0.23120713233947754,
0.27343353629112244,
-0.3501797020435333,
-0.0725109800696373,
0.2056945115327835,
-0.23987635970115662,
-0.13120903074741364,
0.10127469897270203,
-0.1173488199710846,
-0.14341820776462555,
-0.45776668190956116,
0.4708822965621948,
-0.03280900418758392,
0.2585253119468689,
-0.07148095220327377,
0.2669594883918762,
0.2390207201242447,
-0.09129931032657623,
0.2848150134086609,
0.26313313841819763,
0.5140573978424072,
0.10252954065799713,
0.074502132833004,
0.11793830245733261,
0.07444354146718979,
0.027463393285870552,
-0.11081529408693314,
0.23621204495429993,
-0.07218839228153229,
0.02717089280486107,
0.08546991646289825,
0.0888834297657013,
0.05586297810077667,
0.10256291925907135,
-0.025800544768571854,
0.0754956528544426,
-0.43818047642707825,
0.14964443445205688,
0.12884396314620972,
0.08579959720373154,
0.1375637948513031,
0.2785961925983429,
-0.3378024101257324,
-0.2569728493690491,
0.5932247042655945,
-0.046314842998981476,
0.21423903107643127,
-0.14429853856563568,
0.07048768550157547,
-0.021784815937280655,
0.4156259298324585,
0.10639268159866333,
0.07662223279476166,
-0.1099090576171875,
-0.017600446939468384,
-0.7548531293869019,
-0.29571592807769775,
-0.15012159943580627,
0.19488179683685303,
0.2156325876712799,
0.1462043672800064,
-0.11011914163827896,
0.23096947371959686,
-0.0136861652135849,
-0.14200954139232635,
-0.04630324989557266,
-0.05847525596618652,
0.08076389133930206,
-0.1495244801044464,
-0.10937246680259705,
-0.10997435450553894,
-0.28977563977241516,
-0.2760656774044037,
0.21543408930301666,
-0.1367383450269699,
-0.056944362819194794,
-0.06969933211803436,
-0.023558560758829117,
0.28477686643600464,
0.1172647476196289,
0.4224744141101837,
0.26119211316108704,
0.24047937989234924,
0.28465893864631653,
0.004492124542593956,
-0.30450159311294556,
-0.05077650770545006,
-0.08706013858318329,
0.15803587436676025,
0.026101063936948776,
-0.05400971323251724,
-0.5192808508872986,
0.1436508446931839,
-0.18286101520061493,
0.2056903839111328,
0.1607750505208969,
-0.11458148807287216,
-0.03552713990211487,
-0.1985425353050232,
-0.14449888467788696,
0.10649596899747849,
0.11654919385910034,
0.23399636149406433,
-0.042643576860427856,
0.4200555384159088,
-0.3301743268966675,
-0.08780351281166077,
0.28400343656539917,
-0.11894503235816956,
-0.14382322132587433,
-0.029190994799137115,
0.13713438808918,
0.2747972905635834,
-0.12087783962488174,
-0.5332903265953064,
0.1804155707359314,
0.4839944839477539,
-0.32937443256378174,
-0.19500668346881866,
0.09202255308628082,
0.007371982559561729,
-0.0753997191786766,
-0.14563226699829102,
0.5694739818572998,
0.10466018319129944,
-0.12238431721925735,
0.11782757937908173,
-0.3137854337692261
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | I have another question. Assuming that I understood correctly and there is reuse of datasets files when caching is disabled (!), I'm guessing there is a directory that is created based on some information on the dataset file. I'm interested in the situation where I'm loading a (custom) dataset from local disk. What information is used to create the directory/filenames where the files are stored?
I'm concerned about the following scenario: if I have a file, let's say `train.csv` at path `the_path`, run once, the dataset is prepared, some models are run, etc. Now let's say there is an issue and I recreate `train.csv` at the same path `the_path`. Is there enough information in the temporary name/hash to *not* reload the *old* prepared dataset (e.g., timestamp of the file)? Or is it going to reload the *old* prepared file? | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 139 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
I have another question. Assuming that I understood correctly and there is reuse of datasets files when caching is disabled (!), I'm guessing there is a directory that is created based on some information on the dataset file. I'm interested in the situation where I'm loading a (custom) dataset from local disk. What information is used to create the directory/filenames where the files are stored?
I'm concerned about the following scenario: if I have a file, let's say `train.csv` at path `the_path`, run once, the dataset is prepared, some models are run, etc. Now let's say there is an issue and I recreate `train.csv` at the same path `the_path`. Is there enough information in the temporary name/hash to *not* reload the *old* prepared dataset (e.g., timestamp of the file)? Or is it going to reload the *old* prepared file? | [
0.03961401805281639,
0.17447951436042786,
-0.12205339968204498,
0.368890643119812,
0.12289901822805405,
0.09724772721529007,
0.3478941023349762,
-0.04351850971579552,
0.17479506134986877,
-0.11833678185939789,
0.08155412971973419,
-0.07398992776870728,
-0.09671016037464142,
-0.1997416913509369,
0.18343667685985565,
0.40338650345802307,
0.23528626561164856,
0.07056330144405365,
-0.16339316964149475,
-0.21122577786445618,
-0.21582035720348358,
-0.11366263031959534,
0.028703756630420685,
0.025710832327604294,
-0.46531397104263306,
-0.053294092416763306,
-0.16112786531448364,
0.3412361145019531,
0.04545196145772934,
-0.5218762755393982,
0.13737981021404266,
0.3655669093132019,
0.2634638845920563,
0.39190784096717834,
-0.00011923276906600222,
0.0900883674621582,
0.07516837120056152,
-0.2078174501657486,
-0.48993366956710815,
-0.23577313125133514,
-0.6089838743209839,
-0.31322532892227173,
0.10522713512182236,
-0.25918179750442505,
0.14305123686790466,
-0.2797461450099945,
0.19611972570419312,
-0.5753271579742432,
0.3598959445953369,
0.216854527592659,
0.13161155581474304,
-0.3067784309387207,
-0.4450264275074005,
0.1514538824558258,
0.10422469675540924,
0.33876943588256836,
-0.005234465003013611,
0.09611353278160095,
0.10167907923460007,
-0.03477610647678375,
-0.09324485808610916,
0.07844226062297821,
0.07697299122810364,
0.09820006787776947,
0.5855481028556824,
0.19812625646591187,
-0.1865924596786499,
-0.14742521941661835,
0.1589408665895462,
0.07586564123630524,
0.8340935707092285,
-0.33092692494392395,
-0.4406980276107788,
-0.36398845911026,
-0.04034502059221268,
-0.06528092175722122,
0.3427961468696594,
0.016986127942800522,
-0.09984435141086578,
0.10368411988019943,
-0.35867640376091003,
-0.30677175521850586,
-0.15402935445308685,
-0.16440489888191223,
0.14031924307346344,
-0.17476090788841248,
-0.20149973034858704,
0.08580665290355682,
-0.16671881079673767,
0.015218373388051987,
0.46799641847610474,
-0.6780707836151123,
0.12474770843982697,
0.3843235969543457,
-0.10374309122562408,
0.039514705538749695,
0.03385898470878601,
0.4278022348880768,
-0.13847893476486206,
-0.040163554251194,
0.3203822374343872,
-0.0879884883761406,
-0.23873256146907806,
0.1491919904947281,
0.3794379234313965,
0.16775742173194885,
-0.027519874274730682,
0.08277200907468796,
0.15783041715621948,
-0.1401791125535965,
-0.2612258493900299,
-0.2612173855304718,
-0.21728341281414032,
-0.2086574286222458,
0.47205185890197754,
-0.0031830500811338425,
0.19878911972045898,
-0.22197148203849792,
0.013367103412747383,
0.07471002638339996,
0.06892754882574081,
-0.16001519560813904,
0.0717223659157753,
0.16326530277729034,
-0.10206693410873413,
-0.04468635469675064,
-0.30075281858444214,
-0.19753600656986237,
-0.08101938664913177,
0.03481931984424591,
-0.10888681560754776,
-0.2815064787864685,
-0.3479227125644684,
0.07961899042129517,
0.2255406528711319,
-0.2305433750152588,
0.20351041853427887,
0.22080011665821075,
-0.1127789318561554,
-0.11631407588720322,
0.0974738821387291,
-0.07638226449489594,
0.34879428148269653,
0.45646145939826965,
-0.20268407464027405,
0.19941899180412292,
0.07943868637084961,
-0.119977667927742,
-0.24308818578720093,
0.3181142508983612,
-0.5094612836837769,
-0.43431442975997925,
0.19354569911956787,
0.09515969455242157,
-0.28971582651138306,
0.18316149711608887,
-0.009421125054359436,
-0.11649684607982635,
0.2761576175689697,
-0.015064915642142296,
0.1290665864944458,
-0.13159479200839996,
-0.16303761303424835,
-0.3629795014858246,
0.03446139395236969,
0.5511761903762817,
-0.7481021285057068,
0.04419232904911041,
-0.04222239553928375,
-0.19123724102973938,
-0.22217649221420288,
0.3882531523704529,
-0.42130884528160095,
0.28732064366340637,
-0.27883613109588623,
-0.09582238644361496,
0.3518694341182709,
-0.1698627918958664,
-0.14032520353794098,
0.05124588683247566,
0.05924244225025177,
0.2768932580947876,
0.1626453846693039,
0.27495142817497253,
-0.21810591220855713,
-0.1565302014350891,
-0.03656454384326935,
0.006719578988850117,
-0.1402026265859604,
-0.2560180127620697,
-0.05170608311891556,
-0.05278788506984711,
0.027831967920064926,
-0.14783567190170288,
-0.13442979753017426,
0.23838171362876892,
0.1785312294960022,
-0.039703018963336945,
0.020397186279296875,
0.023594927042722702,
0.06845982372760773,
0.43478691577911377,
0.09133817255496979,
0.2837570905685425,
0.2616578936576843,
0.24618032574653625,
-0.6048415303230286,
0.38346657156944275,
-0.024956585839390755,
-0.5644062757492065,
-0.16977904736995697,
-0.2210455685853958,
-0.1049436554312706,
-0.05955973267555237,
-0.3477902114391327,
-0.020488332957029343,
-0.0005915872752666473,
0.2033090740442276,
0.11741356551647186,
-0.15713942050933838,
-0.3319164216518402,
0.2712098956108093,
-0.4437341094017029,
-0.07005999982357025,
-0.2444698065519333,
-0.014535092748701572,
-0.04957803338766098,
0.162165567278862,
-0.37410032749176025,
0.1364879608154297,
0.03587181493639946,
-0.11388624459505081,
0.02526549994945526,
0.40737998485565186,
0.1449674665927887,
0.5493710041046143,
0.24494025111198425,
0.5470481514930725,
-0.0219657551497221,
0.28671738505363464,
0.45524317026138306,
-0.27847450971603394,
0.24441388249397278,
-0.0584346204996109,
-0.31020525097846985,
0.37250322103500366,
-0.5067827105522156,
0.11167851835489273,
0.0574624165892601,
-0.4737316071987152,
0.20377658307552338,
-0.003811269998550415,
0.004818757995963097,
-0.1751115620136261,
-0.0792369544506073,
0.29397064447402954,
0.390752911567688,
0.31531408429145813,
-0.07469931244850159,
0.03301098942756653,
0.23186196386814117,
-0.10052542388439178,
-0.20881378650665283,
-0.03610794246196747,
-0.17673850059509277,
-0.34529635310173035,
0.012353088706731796,
0.5395864248275757,
0.5537015199661255,
0.017891250550746918,
0.31815996766090393,
-0.08846375346183777,
-0.017032504081726074,
-0.2547690272331238,
0.08986680209636688,
-0.11710473895072937,
-0.14543090760707855,
0.37907272577285767,
-0.024904480203986168,
-0.04183023050427437,
-0.24198859930038452,
0.024063073098659515,
0.2772977352142334,
0.0776958167552948,
-0.2950515151023865,
0.23722006380558014,
-0.11578720808029175,
-0.1908857524394989,
-0.28701654076576233,
0.18969100713729858,
-0.09410984814167023,
-0.1602422595024109,
-0.023361168801784515,
0.09469501674175262,
0.012669820338487625,
0.0027124984189867973,
-0.10749061405658722,
0.33364158868789673,
-0.16972748935222626,
-0.1477849781513214,
-0.13758894801139832,
-0.273390531539917,
-0.09002945572137833,
0.03884609416127205,
0.1775083988904953,
-0.16947169601917267,
0.08053626120090485,
-0.08590585738420486,
0.07634416222572327,
-0.4038633406162262,
0.25715506076812744,
-0.0204172283411026,
0.05338871851563454,
0.2470943182706833,
-0.1725015640258789,
0.07282579690217972,
0.007248181849718094,
0.05690722167491913,
0.01989131048321724,
0.09126075357198715,
-0.011835348792374134,
-0.2892059087753296,
0.19120153784751892,
0.022402552887797356,
-0.07868342101573944,
-0.16998499631881714,
-0.3214596211910248,
0.02821611613035202,
0.046677906066179276,
0.08630101382732391,
0.03661709278821945,
0.47970160841941833,
-0.10615599155426025,
-0.0073567405343055725,
-0.028706571087241173,
0.017007865011692047,
-0.3930700719356537,
-0.7377175092697144,
0.13306079804897308,
-0.11192601919174194,
0.07861083745956421,
0.05854466184973717,
-0.02976309508085251,
0.1121712327003479,
0.37372809648513794,
-0.5044370293617249,
-0.18250368535518646,
0.21089015901088715,
0.2946910858154297,
0.10265505313873291,
-0.005597872659564018,
0.3985082805156708,
0.03435393050312996,
-0.03816325590014458,
-0.2396538257598877,
0.10461720824241638,
0.07218462973833084,
0.05672120302915573,
0.21376505494117737,
0.11872453987598419,
-0.04381532222032547,
-0.10131888091564178,
1.056129813194275,
0.06566210091114044,
-0.09505043923854828,
0.1984086036682129,
0.005584504455327988,
0.7749562859535217,
-0.01112731546163559,
0.060247741639614105,
-0.20002588629722595,
-0.1283799707889557,
-0.5644761323928833,
0.14425359666347504,
0.17905384302139282,
0.10419628769159317,
0.08039230853319168,
0.3580327332019806,
-0.33251094818115234,
-0.2472895234823227,
0.24454274773597717,
-0.38490918278694153,
0.4336819350719452,
0.17373844981193542,
-0.24452674388885498,
-0.21229855716228485,
-0.14680615067481995,
-0.1929413229227066,
0.22097472846508026,
0.39691242575645447,
-0.11119526624679565,
-0.31278470158576965,
-0.0740492045879364,
0.05000682175159454,
-0.01334458589553833,
0.20470423996448517,
0.24594640731811523,
-0.09057177603244781,
0.041918665170669556,
0.15684817731380463,
0.1857423633337021,
0.3920873999595642,
-0.4064944088459015,
0.05830080434679985,
0.20350195467472076,
0.07537154853343964,
0.013351010158658028,
-0.05926232784986496,
0.02752896025776863,
0.17894655466079712,
-0.21796470880508423,
0.29621052742004395,
0.3291771709918976,
-0.26022106409072876,
-0.2999032735824585,
0.4384307563304901,
-0.32790112495422363,
-0.022532135248184204,
-0.11016924679279327,
0.090969018638134,
0.0019616708159446716,
-0.25772807002067566,
-0.24565495550632477,
-0.3908727765083313,
-0.10665898025035858,
0.12094013392925262,
-0.17051337659358978,
0.1837504506111145,
0.08416697382926941,
0.08408081531524658,
0.2590390741825104,
0.06271632015705109,
0.09648378193378448,
0.4471679627895355,
0.03606020659208298,
0.4149879217147827,
0.4983244240283966,
-0.4157926142215729,
0.029507964849472046,
-0.06923317909240723,
0.07565750926733017,
0.09257254749536514,
0.4459812045097351,
-0.2754131555557251,
-0.05832795053720474,
0.011650487780570984,
-0.3149537444114685,
-0.5572515726089478,
0.10166813433170319,
0.2380484789609909,
0.14531485736370087,
-0.24573500454425812,
-0.7298752665519714,
0.4616044759750366,
0.044289302080869675,
-0.45332157611846924,
0.1364474594593048,
-0.043061092495918274,
-0.43349987268447876,
0.00929182954132557,
0.043369945138692856,
0.7851672768592834,
-0.13777178525924683,
0.3983209729194641,
-0.27038443088531494,
0.03355105221271515,
0.2256222814321518,
-0.3931539058685303,
-0.002761753275990486,
-0.16181886196136475,
-0.11945344507694244,
-0.21223558485507965,
-0.10505964607000351,
0.40067437291145325,
0.41438817977905273,
0.2862849831581116,
0.40978509187698364,
-0.09122510254383087,
0.4684945344924927,
-0.16313067078590393,
0.10355786979198456,
-0.10089936852455139,
-0.07152843475341797,
0.12785151600837708,
0.09500794857740402,
0.20183074474334717,
0.2626236081123352,
-0.13162614405155182,
0.2657708525657654,
0.10290393233299255,
0.2221253663301468,
-0.0917191281914711,
-0.24306142330169678,
-0.194889098405838,
0.31122881174087524,
-0.32055193185806274,
-0.40924668312072754,
-0.22757619619369507,
0.44450700283050537,
0.33194541931152344,
-0.049968305975198746,
-0.022046664729714394,
0.31894251704216003,
0.04059390723705292,
0.29283246397972107,
-0.2071419358253479,
-0.002362850122153759,
0.2992726266384125,
0.21874451637268066,
0.04252774268388748,
-0.030825473368167877,
-0.3231317400932312,
-0.06537430733442307,
-0.20037643611431122,
0.2053971290588379,
0.29908448457717896,
-0.4685586392879486,
-0.213606059551239,
0.05527228116989136,
-0.00029389187693595886,
0.13527682423591614,
0.0712406188249588,
0.14728042483329773,
0.20070481300354004,
0.26192784309387207,
-0.39043760299682617,
-0.22761045396327972,
-0.07141458988189697,
0.30397963523864746,
0.3663793206214905,
-0.1873268485069275,
0.44607871770858765,
-0.5390531420707703,
-0.15435096621513367,
-0.11258416622877121,
0.23062413930892944,
-0.006428984925150871,
-0.07028156518936157,
0.10918338596820831,
0.17585593461990356,
0.2060980647802353,
0.001550406450405717,
0.06458460539579391,
0.2470373958349228,
0.03738721087574959,
-0.26356983184814453,
-0.18571949005126953,
-0.17922750115394592,
0.0767906978726387,
0.28254732489585876,
0.5055931806564331,
0.04978141933679581,
-0.3265339136123657,
-0.01954313926398754,
-0.09590038657188416,
-0.23328617215156555,
0.14941628277301788,
-0.049235761165618896,
0.3271290063858032,
0.07631084322929382,
0.15453094244003296,
0.15792299807071686,
-0.3071282207965851,
-0.00963246077299118,
-0.2811216115951538,
-0.23049479722976685,
-0.13996799290180206,
0.03239782154560089,
0.1811802089214325,
0.0003293324261903763,
-0.18884067237377167,
-0.18680302798748016,
-0.458281934261322,
0.10540993511676788,
-0.1665191948413849,
0.05919277295470238,
0.3447117209434509,
0.13106772303581238,
0.20916402339935303,
0.13430146872997284,
0.14196139574050903,
-0.035252854228019714,
0.13012267649173737,
-0.13937495648860931,
0.4549195170402527,
0.2578461468219757,
0.19626060128211975,
-0.35289955139160156,
0.023394212126731873,
-0.3583093285560608,
0.2972154915332794,
0.04891370236873627,
-0.041117407381534576,
0.17308616638183594,
-0.06185019016265869,
0.1825908124446869,
0.11472203582525253,
0.35487040877342224,
0.45225101709365845,
-0.18321341276168823,
-0.3053300976753235,
0.3238883316516876,
0.08783861994743347,
-0.05508827045559883,
-0.1283651739358902,
0.007276235148310661,
0.08755813539028168,
-0.10637002438306808,
0.24167782068252563,
0.4929351508617401,
-0.0420585535466671,
0.1961420476436615,
-0.16035223007202148,
0.46384337544441223,
-0.2952371835708618,
0.2642429769039154,
0.2453196495771408,
0.14329101145267487,
0.05426795408129692,
0.21465179324150085,
0.4828642010688782,
0.12018013745546341,
0.771659791469574,
-0.016387879848480225,
0.279360294342041,
0.3738038241863251,
0.27397722005844116,
-0.2553505003452301,
-0.6836419105529785,
0.2907903492450714,
0.3437066674232483,
-0.4014594554901123,
0.25479575991630554,
-0.03766991198062897,
0.1597912311553955,
-0.12830182909965515,
0.17225469648838043,
0.06330571323633194,
0.16026023030281067,
-0.1695292890071869,
-0.40845876932144165,
0.2957373261451721,
-0.3943379819393158,
0.1876867115497589,
0.15565188229084015,
-0.017174284905195236,
-0.018581397831439972,
0.0033890604972839355,
-0.01211642473936081,
0.1542952060699463,
-0.1750783771276474,
0.49361470341682434,
0.11888308823108673,
0.17852509021759033,
-0.15519402921199799,
0.19759975373744965,
0.284506618976593,
0.09190508723258972,
0.2843462824821472,
0.077359639108181,
0.25578615069389343,
0.1358579844236374,
0.0959462970495224,
0.17542678117752075,
-0.02773251384496689,
0.010246505960822105,
-0.09548263996839523,
0.1879786103963852,
-0.15854789316654205,
-0.10549981892108917,
0.13347145915031433,
0.11343792080879211,
0.07491861283779144,
0.24344076216220856,
0.02783704549074173,
0.1547423005104065,
-0.21787217259407043,
0.04312074929475784,
0.17845691740512848,
0.023048602044582367,
0.05056149140000343,
0.21828338503837585,
-0.17995212972164154,
-0.2894687056541443,
0.5751603841781616,
0.029829423874616623,
0.24065399169921875,
0.04169303551316261,
0.030498169362545013,
-0.10337390005588531,
0.3388954997062683,
0.2730056345462799,
-0.010256491601467133,
-0.20401927828788757,
-0.1510637402534485,
-0.592651903629303,
-0.17606770992279053,
-0.1478046327829361,
0.11585469543933868,
-0.14704051613807678,
0.1717141717672348,
-0.07309124618768692,
-0.05515831708908081,
-0.06622649729251862,
-0.13787327706813812,
-0.17801235616207123,
0.0832473412156105,
-0.05653329938650131,
-0.31018033623695374,
-0.39744502305984497,
0.014807518571615219,
-0.14455406367778778,
-0.45410385727882385,
-0.08419713377952576,
-0.09549169987440109,
-0.10859573632478714,
0.012178781442344189,
-0.057054873555898666,
0.16400748491287231,
0.3761211633682251,
0.40887564420700073,
-0.05182017385959625,
0.07449072599411011,
0.22345855832099915,
0.024308854714035988,
-0.2947927415370941,
-0.3059476315975189,
-0.06783802062273026,
0.20623734593391418,
0.032858483493328094,
-0.09755641222000122,
-0.6697201132774353,
0.11797773838043213,
-0.18312864005565643,
-0.14267219603061676,
-0.007659543305635452,
-0.02651909552514553,
-0.02087552286684513,
-0.2445761263370514,
-0.11776275932788849,
0.26005786657333374,
0.20575876533985138,
0.3443099558353424,
0.04083125293254852,
0.2696208953857422,
-0.16679653525352478,
0.08843699097633362,
0.4007048010826111,
-0.06640762835741043,
-0.11739462614059448,
0.03127345070242882,
0.21963180601596832,
-0.016666270792484283,
-0.1236058697104454,
-0.44346264004707336,
0.10942430049180984,
0.6644130349159241,
-0.25210627913475037,
-0.031818170100450516,
-0.13844546675682068,
-0.05743677541613579,
0.040493112057447433,
-0.17208468914031982,
0.1647002398967743,
0.04358581453561783,
-0.1685229390859604,
0.023775536566972733,
-0.26920709013938904
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | Thanks for the feedback, we'll work in improving this aspect of the documentation.
> Where are these files stored? I guess not in the temporary directory that is removed...
We're using the Arrow file format to load datasets. Therefore each time you load a dataset, it is prepared as an arrow file on your disk. By default the file is located in the ~/.cache/huggingface/datasets/<dataset_name>/<config_id>/<version> directory.
> What information is used to create the directory/filenames where the files are stored?
The config_id contains a hash that takes into account:
- the dataset loader used and its source code (e.g. the "csv" loader)
- the arguments passed to the loader (e.g. the csv delimiter)
- metadata of the local data files if any (e.g. their timestamps)
> I'm concerned about the following scenario: if I have a file, let's say train.csv at path the_path, run once, the dataset is prepared, some models are run, etc. Now let's say there is an issue and I recreate train.csv at the same path the_path. Is there enough information in the temporary name/hash to not reload the old prepared dataset (e.g., timestamp of the file)? Or is it going to reload the old prepared file?
Yes the timestamp of the local csv file is taken into account. If you edit your csv file, the config_id will change and loading the dataset will create a new arrow file. | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 231 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
Thanks for the feedback, we'll work in improving this aspect of the documentation.
> Where are these files stored? I guess not in the temporary directory that is removed...
We're using the Arrow file format to load datasets. Therefore each time you load a dataset, it is prepared as an arrow file on your disk. By default the file is located in the ~/.cache/huggingface/datasets/<dataset_name>/<config_id>/<version> directory.
> What information is used to create the directory/filenames where the files are stored?
The config_id contains a hash that takes into account:
- the dataset loader used and its source code (e.g. the "csv" loader)
- the arguments passed to the loader (e.g. the csv delimiter)
- metadata of the local data files if any (e.g. their timestamps)
> I'm concerned about the following scenario: if I have a file, let's say train.csv at path the_path, run once, the dataset is prepared, some models are run, etc. Now let's say there is an issue and I recreate train.csv at the same path the_path. Is there enough information in the temporary name/hash to not reload the old prepared dataset (e.g., timestamp of the file)? Or is it going to reload the old prepared file?
Yes the timestamp of the local csv file is taken into account. If you edit your csv file, the config_id will change and loading the dataset will create a new arrow file. | [
0.04265282675623894,
0.11284618079662323,
-0.07477454096078873,
0.3651132583618164,
0.18751351535320282,
0.16579139232635498,
0.36184874176979065,
-0.07639780640602112,
0.19209399819374084,
-0.1457173079252243,
0.12443500757217407,
0.09013599157333374,
-0.26943618059158325,
-0.12038248032331467,
0.09264038503170013,
0.31328117847442627,
0.12181241065263748,
0.0018568262457847595,
-0.26740679144859314,
-0.061273276805877686,
-0.023848526179790497,
0.013903924264013767,
-0.047613613307476044,
0.07759355753660202,
-0.5502682328224182,
-0.17780590057373047,
-0.028479930013418198,
0.13887730240821838,
-0.04224472492933273,
-0.5476479530334473,
0.4293837547302246,
0.2526208758354187,
0.10221540927886963,
0.44314703345298767,
-0.00011365238606231287,
0.1564302295446396,
0.16534894704818726,
-0.05950498580932617,
-0.38350120186805725,
-0.0884685218334198,
-0.4759688079357147,
-0.2783871591091156,
0.2284003347158432,
-0.17913442850112915,
0.05595050007104874,
-0.17541266977787018,
0.06641825288534164,
-0.7208994626998901,
0.4306551218032837,
0.3034115135669708,
0.20957772433757782,
-0.11282950639724731,
-0.3428080081939697,
0.1669267863035202,
0.12122414261102676,
0.11761149764060974,
-0.06479199230670929,
0.09583796560764313,
0.01712072640657425,
0.029999447986483574,
-0.19081291556358337,
0.3489198684692383,
0.02848385088145733,
0.0995287150144577,
0.6798650622367859,
0.1164376512169838,
-0.3021642863750458,
-0.2816374599933624,
0.17102017998695374,
-0.016892477869987488,
0.875719428062439,
-0.37729209661483765,
-0.3937721848487854,
-0.4215784966945648,
-0.07224389910697937,
-0.29106390476226807,
0.3705022931098938,
-0.03499435633420944,
0.033818334341049194,
0.19658629596233368,
-0.4137374460697174,
-0.29783132672309875,
-0.1873835325241089,
-0.17984889447689056,
-0.09503050148487091,
-0.21049925684928894,
-0.32814690470695496,
0.04317738115787506,
0.052905961871147156,
0.08941533416509628,
0.34124675393104553,
-0.47968846559524536,
0.05448204278945923,
0.3145653009414673,
-0.30248600244522095,
0.05850552022457123,
0.06692685186862946,
0.3536750376224518,
-0.10323092341423035,
0.18015795946121216,
0.31306347250938416,
-0.0729675441980362,
-0.2701881527900696,
0.1462642103433609,
0.3341299593448639,
0.3940926790237427,
-0.006545111536979675,
0.06677033007144928,
0.21191103756427765,
-0.10266979038715363,
-0.16894659399986267,
-0.28561288118362427,
-0.0797218307852745,
-0.4382007122039795,
0.36838793754577637,
0.00001849047839641571,
0.18211734294891357,
-0.24023211002349854,
-0.096963070333004,
0.07625515758991241,
0.06471279263496399,
-0.1605021059513092,
0.2484932541847229,
0.14272458851337433,
-0.0343201719224453,
0.01688808761537075,
-0.18065041303634644,
-0.11790868639945984,
-0.16336745023727417,
-0.04657375440001488,
-0.17438305914402008,
-0.13651332259178162,
-0.3817649483680725,
0.12128229439258575,
0.23186184465885162,
-0.288232684135437,
0.17285475134849548,
0.28958117961883545,
0.1174059584736824,
-0.19140154123306274,
0.1421864777803421,
-0.09958299994468689,
0.3003714680671692,
0.3959773778915405,
-0.36595237255096436,
0.2547309100627899,
0.25329944491386414,
0.047030314803123474,
-0.23828965425491333,
0.23515889048576355,
-0.5508419275283813,
-0.5308256149291992,
0.10952766239643097,
0.1173829659819603,
-0.4187036156654358,
-0.01840188354253769,
-0.245589941740036,
-0.11562728881835938,
0.3187909424304962,
0.06240076199173927,
0.24187704920768738,
-0.2037985771894455,
-0.1772335171699524,
-0.32704776525497437,
0.05442431569099426,
0.5265342593193054,
-0.6201192140579224,
0.013923324644565582,
-0.10136202722787857,
-0.05697857216000557,
-0.056618280708789825,
0.43880778551101685,
-0.5644399523735046,
0.2282957136631012,
-0.2668421268463135,
-0.04188148304820061,
0.2101626992225647,
-0.23596414923667908,
-0.23705187439918518,
0.03873356804251671,
0.048646338284015656,
0.365350604057312,
0.1788058578968048,
0.06647470593452454,
0.09016798436641693,
-0.13607507944107056,
-0.03838571161031723,
-0.032742276787757874,
0.0925370529294014,
-0.2657948136329651,
-0.10539501905441284,
-0.2953509986400604,
0.08319885283708572,
-0.21032536029815674,
-0.049705322831869125,
-0.013660579919815063,
0.05653814971446991,
-0.18614141643047333,
-0.009612850844860077,
-0.1338644176721573,
0.08117250353097916,
0.40351343154907227,
0.04868011549115181,
0.2840645909309387,
0.09546630084514618,
0.21525555849075317,
-0.5267919898033142,
0.42330440878868103,
0.18526072800159454,
-0.494121253490448,
-0.20060016214847565,
-0.26157718896865845,
-0.07187345623970032,
-0.08623357117176056,
-0.44113752245903015,
-0.1706928163766861,
0.034137822687625885,
0.04466854780912399,
0.11599372327327728,
-0.051442332565784454,
-0.3322877287864685,
0.4101417064666748,
-0.40492433309555054,
-0.04171186685562134,
-0.3104243874549866,
0.08449995517730713,
0.02349836751818657,
0.2354416698217392,
-0.3102503716945648,
0.1405351758003235,
0.029996559023857117,
-0.06299038976430893,
0.042705100029706955,
0.3603609502315521,
0.13447847962379456,
0.49143511056900024,
0.19147655367851257,
0.5197807550430298,
0.08403226733207703,
-0.014438174664974213,
0.35387060046195984,
-0.19102884829044342,
0.11653812974691391,
0.030778318643569946,
-0.3368670642375946,
0.3540523648262024,
-0.33870619535446167,
0.1638699471950531,
-0.012147005647420883,
-0.2903885245323181,
0.11310763657093048,
0.016929801553487778,
-0.07557622343301773,
-0.07681332528591156,
-0.03019002452492714,
0.09850947558879852,
0.2543652057647705,
0.4224380850791931,
-0.22810202836990356,
0.1754332184791565,
0.3237636387348175,
-0.02156122960150242,
-0.2616901099681854,
0.023533258587121964,
-0.1400737762451172,
-0.24765345454216003,
0.13880860805511475,
0.4800472557544708,
0.5014016032218933,
0.12015809863805771,
0.23838543891906738,
-0.053388841450214386,
0.021673476323485374,
-0.2430942952632904,
0.24499210715293884,
-0.03318963199853897,
0.0830225721001625,
0.19088640809059143,
-0.013133462518453598,
0.03837532177567482,
-0.2990607023239136,
-0.028978150337934494,
0.10936567187309265,
0.05011989176273346,
-0.4698912501335144,
0.36934566497802734,
-0.3929537832736969,
-0.08207474648952484,
-0.38237491250038147,
0.0865275040268898,
-0.22762197256088257,
-0.2523649334907532,
-0.01429804041981697,
0.002054017037153244,
0.05418902263045311,
0.05338381975889206,
-0.27749869227409363,
0.4074823260307312,
-0.1261829435825348,
-0.09190747141838074,
-0.12953078746795654,
-0.10398688167333603,
-0.1594327986240387,
0.016402196139097214,
0.21744100749492645,
-0.19757860898971558,
0.09606099128723145,
-0.030701929703354836,
0.08387923985719681,
-0.33658936619758606,
0.12756198644638062,
0.0149000845849514,
0.01864246092736721,
0.20372357964515686,
-0.1277351677417755,
0.03538672998547554,
-0.1253299117088318,
-0.07700921595096588,
-0.10054143518209457,
0.04714283347129822,
0.03993336856365204,
-0.18196099996566772,
0.14690500497817993,
0.12843158841133118,
-0.11615900695323944,
-0.2377016246318817,
-0.3192606270313263,
-0.13219454884529114,
0.08552492409944534,
0.03900112584233284,
0.002754170447587967,
0.587246298789978,
-0.001630960963666439,
0.12305772304534912,
-0.024450205266475677,
0.0663003996014595,
-0.4416372776031494,
-0.6039818525314331,
0.31601497530937195,
-0.14077557623386383,
-0.03841919079422951,
0.13885407149791718,
0.0660286545753479,
0.2734754681587219,
0.19647932052612305,
-0.6239001154899597,
-0.12058186531066895,
-0.034527115523815155,
0.1573716104030609,
0.11623586714267731,
0.07007252424955368,
0.3097386956214905,
0.03748156875371933,
-0.046611566096544266,
-0.15080195665359497,
0.00299113430082798,
0.08169442415237427,
-0.0783291608095169,
0.2549777925014496,
0.11322066187858582,
-0.04737941920757294,
0.016987569630146027,
1.1582587957382202,
0.23776313662528992,
-0.0377984456717968,
0.09564218670129776,
0.007374290376901627,
0.7471948266029358,
-0.03963329643011093,
-0.08484956622123718,
-0.08741101622581482,
-0.2571054697036743,
-0.4753894805908203,
0.08986863493919373,
0.1911807358264923,
0.13737182319164276,
0.18311652541160583,
0.34301215410232544,
-0.13109013438224792,
-0.3341439664363861,
0.3024998605251312,
-0.40366727113723755,
0.3176872730255127,
0.009928155690431595,
-0.07147401571273804,
-0.22174261510372162,
-0.047929249703884125,
-0.14263804256916046,
0.3482539653778076,
0.3176630437374115,
0.01982748694717884,
-0.19184820353984833,
-0.16682858765125275,
-0.22319984436035156,
0.05483320355415344,
-0.049877990037202835,
0.10971534997224808,
-0.17333459854125977,
0.1313457489013672,
0.27012133598327637,
0.1460508108139038,
0.4943932890892029,
-0.25045037269592285,
-0.07591908425092697,
0.17079059779644012,
0.07240241765975952,
-0.013805936090648174,
-0.13669507205486298,
0.07946884632110596,
0.27141037583351135,
-0.039279308170080185,
0.13664445281028748,
0.22431764006614685,
-0.29717257618904114,
-0.19614259898662567,
0.26963067054748535,
-0.24192053079605103,
-0.052735283970832825,
-0.18409739434719086,
-0.056829825043678284,
-0.09816432744264603,
-0.13479024171829224,
0.019516201689839363,
-0.28735098242759705,
-0.23877215385437012,
0.05164674296975136,
-0.11015324294567108,
0.08591056615114212,
0.13841159641742706,
0.041104767471551895,
0.3774220943450928,
0.14933697879314423,
-0.051111817359924316,
0.6349806785583496,
0.03989753872156143,
0.3729884922504425,
0.5501741766929626,
-0.18535131216049194,
-0.09170515835285187,
-0.044324301183223724,
-0.02346416562795639,
0.1364944726228714,
0.4127087891101837,
-0.4581157863140106,
0.0470285564661026,
0.04676356539130211,
-0.2780455946922302,
-0.39468637108802795,
-0.07610968500375748,
0.3407287299633026,
0.2532004117965698,
-0.14852550625801086,
-0.6971560716629028,
0.5179473757743835,
0.2509443759918213,
-0.2987608313560486,
0.24395671486854553,
0.04624205455183983,
-0.4107719659805298,
-0.0370483435690403,
0.14460203051567078,
0.7890864610671997,
-0.011542320251464844,
0.35342827439308167,
-0.071290984749794,
-0.0696333646774292,
0.389928936958313,
-0.3019835948944092,
0.11579505354166031,
-0.08569765090942383,
-0.0856730118393898,
-0.2145988643169403,
-0.14330635964870453,
0.35829100012779236,
0.27066436409950256,
0.010011747479438782,
0.3308510184288025,
-0.23805716633796692,
0.2818346917629242,
-0.25573861598968506,
0.04985992610454559,
-0.0701778307557106,
-0.11898262798786163,
-0.044005922973155975,
0.14692512154579163,
0.11891324818134308,
0.2945713400840759,
-0.15372878313064575,
0.10414022207260132,
0.13771161437034607,
0.19407203793525696,
-0.2254679948091507,
-0.2816457748413086,
-0.2321237325668335,
0.31752270460128784,
-0.10133171081542969,
-0.44387292861938477,
0.1494944840669632,
0.408486932516098,
0.20141065120697021,
-0.12994462251663208,
-0.10750201344490051,
0.2657448947429657,
0.14925765991210938,
0.18958453834056854,
-0.12850159406661987,
-0.17945188283920288,
0.3612166941165924,
0.15416744351387024,
-0.056122515350580215,
0.04600463807582855,
-0.21875953674316406,
-0.2864956259727478,
0.13231942057609558,
0.23049068450927734,
0.10658419877290726,
-0.4199065864086151,
-0.1353830248117447,
0.16528519988059998,
0.08215503394603729,
0.16231784224510193,
0.12543609738349915,
0.17476120591163635,
0.18391887843608856,
0.34379470348358154,
-0.3938899338245392,
-0.20652227103710175,
-0.035806987434625626,
0.19853070378303528,
0.2643134891986847,
-0.170212060213089,
0.431894987821579,
-0.26708468794822693,
-0.33547842502593994,
-0.07785168290138245,
0.1133328452706337,
0.08801945298910141,
-0.23676714301109314,
0.054924823343753815,
0.1126624047756195,
0.32351016998291016,
-0.018843453377485275,
0.004082620143890381,
0.2732166051864624,
0.00828898698091507,
-0.36133402585983276,
-0.23480834066867828,
-0.2408810257911682,
0.09224174916744232,
0.017537327483296394,
0.44365838170051575,
-0.03353945165872574,
-0.2856045961380005,
0.06266063451766968,
-0.15269260108470917,
-0.2890157401561737,
0.16194786131381989,
-0.07867693156003952,
0.09428834170103073,
0.22554923593997955,
0.030591480433940887,
0.2534170150756836,
-0.3031991422176361,
-0.05099011957645416,
-0.2666364312171936,
-0.307781845331192,
-0.16082245111465454,
0.010460983961820602,
0.15890377759933472,
-0.1022016629576683,
-0.20558087527751923,
-0.04418405145406723,
-0.3034951686859131,
0.03150554373860359,
-0.16856089234352112,
0.12193948030471802,
0.3316381573677063,
0.09647554159164429,
0.08600925654172897,
-0.20519696176052094,
0.016383837908506393,
-0.08084110915660858,
0.004120327532291412,
0.017772510647773743,
0.3359736502170563,
0.39064937829971313,
0.28162387013435364,
-0.2716902792453766,
0.002427048981189728,
-0.23177982866764069,
0.3015431761741638,
-0.0651254653930664,
0.11486127227544785,
0.1655111312866211,
-0.28634727001190186,
0.10283532738685608,
0.19915828108787537,
0.32810676097869873,
0.3717806935310364,
-0.2649431824684143,
-0.22947652637958527,
0.13572552800178528,
0.13098616898059845,
-0.026210138574242592,
-0.21495893597602844,
0.054224226623773575,
0.18980833888053894,
-0.13255304098129272,
0.25851571559906006,
0.5278127789497375,
-0.012796685099601746,
0.2924176752567291,
0.056679725646972656,
0.4073832035064697,
-0.2825930714607239,
0.38388970494270325,
0.13595452904701233,
0.008370820432901382,
0.015925433486700058,
0.4384000599384308,
0.48683926463127136,
0.22244161367416382,
0.6142734885215759,
-0.059811271727085114,
0.1821412891149521,
0.485237717628479,
0.19308322668075562,
-0.3621421456336975,
-0.7948090434074402,
0.185365691781044,
0.29021790623664856,
-0.3958209455013275,
0.14706172049045563,
-0.008744560182094574,
0.33066999912261963,
-0.15078888833522797,
-0.032617706805467606,
-0.021000254899263382,
0.20750100910663605,
-0.2223576009273529,
-0.18779174983501434,
0.3327510356903076,
-0.3243265450000763,
0.1385265290737152,
0.1337725669145584,
-0.09669066965579987,
-0.07536320388317108,
0.11477930843830109,
-0.12879657745361328,
-0.08927266299724579,
-0.2601796090602875,
0.498015820980072,
0.07214459776878357,
0.37087154388427734,
-0.09352263808250427,
0.2920442819595337,
0.04707055166363716,
0.08076983690261841,
0.19340719282627106,
0.19071441888809204,
0.4301685094833374,
0.0948304831981659,
0.2269957959651947,
0.0762036144733429,
-0.0022001732140779495,
0.011924391612410545,
-0.09958799183368683,
0.197194904088974,
-0.17138946056365967,
-0.18789899349212646,
0.1820627748966217,
0.13637858629226685,
0.019426986575126648,
0.1632920354604721,
-0.060363221913576126,
0.1767076849937439,
-0.3804509937763214,
-0.0838853195309639,
0.20301319658756256,
-0.006039343774318695,
-0.01725037768483162,
0.17024344205856323,
-0.28536176681518555,
-0.27657604217529297,
0.741401195526123,
0.05655277147889137,
0.2432408630847931,
-0.05738600715994835,
0.07098381966352463,
0.052309662103652954,
0.43040144443511963,
0.2606305181980133,
0.14810076355934143,
-0.12300700694322586,
-0.02880803495645523,
-0.7707138657569885,
-0.18410971760749817,
-0.15682034194469452,
0.14717042446136475,
0.020682457834482193,
0.19618874788284302,
-0.0730559304356575,
0.05213325470685959,
0.1274419128894806,
-0.21601223945617676,
-0.018225224688649178,
-0.10028642416000366,
-0.026457782834768295,
-0.053480107337236404,
-0.1319114714860916,
0.025415269657969475,
-0.13937757909297943,
-0.2766144275665283,
0.06042667105793953,
-0.022357206791639328,
-0.05603751912713051,
0.07120205461978912,
0.03945620357990265,
0.03168768063187599,
0.1538894921541214,
0.42970937490463257,
0.03280698508024216,
0.12820124626159668,
0.30014175176620483,
0.09155076742172241,
-0.3685917556285858,
-0.19024239480495453,
-0.12028268724679947,
0.16410976648330688,
-0.025724679231643677,
-0.012208866886794567,
-0.6058148145675659,
0.016912266612052917,
-0.3258044421672821,
0.03796355798840523,
0.12195754051208496,
-0.15502792596817017,
-0.0037437621504068375,
-0.10748916864395142,
-0.1270574927330017,
0.22283406555652618,
0.1746286153793335,
0.37284770607948303,
-0.031834498047828674,
0.21009066700935364,
-0.2636839747428894,
-0.011886082589626312,
0.4197932481765747,
-0.2700086832046509,
-0.17850293219089508,
0.14463548362255096,
0.18990615010261536,
0.2657696604728699,
-0.11790736764669418,
-0.6296889781951904,
0.10736262053251266,
0.5160408020019531,
-0.2359798550605774,
-0.13370896875858307,
-0.029583867639303207,
-0.08208003640174866,
0.03605789318680763,
-0.10675743222236633,
0.33524516224861145,
-0.00854707881808281,
-0.05225108191370964,
0.03729039803147316,
-0.3499302864074707
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | Thank you for all your clarifications, really helpful!
If you have the bandwidth, please do revisit the api wrt cache disabling. Anywhere in the computer stack (hardware included) where you disable the cache, one assumes there is no caching that happens. | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 41 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
Thank you for all your clarifications, really helpful!
If you have the bandwidth, please do revisit the api wrt cache disabling. Anywhere in the computer stack (hardware included) where you disable the cache, one assumes there is no caching that happens. | [
-0.08065491169691086,
-0.019092634320259094,
-0.07845878601074219,
0.18294359743595123,
0.20736488699913025,
0.23291286826133728,
0.17175602912902832,
0.012628205120563507,
0.20395855605602264,
-0.1684737354516983,
0.10436809062957764,
0.0651792660355568,
-0.14791637659072876,
-0.048604704439640045,
-0.045972514897584915,
0.44695335626602173,
0.1602656990289688,
0.13738512992858887,
-0.13079693913459778,
-0.040254175662994385,
-0.0730123519897461,
-0.008737897500395775,
-0.22747531533241272,
0.10305135697126389,
-0.5465360879898071,
-0.19966527819633484,
0.029756171628832817,
-0.025818966329097748,
-0.05395015329122543,
-0.45668748021125793,
0.49858027696609497,
0.19065624475479126,
0.13090534508228302,
0.28623640537261963,
-0.00011592552618822083,
0.0028493106365203857,
0.14771097898483276,
0.007445408031344414,
-0.24556586146354675,
0.12210658937692642,
-0.5522732734680176,
-0.3764938712120056,
0.2959464490413666,
-0.07344871759414673,
-0.029668815433979034,
-0.2271423190832138,
0.08032143861055374,
-0.6296423077583313,
0.4789682626724243,
0.3128570318222046,
0.21885134279727936,
-0.02777080237865448,
-0.34524792432785034,
0.1580733358860016,
-0.06289314478635788,
-0.026200242340564728,
-0.14374734461307526,
-0.068062424659729,
0.2651395797729492,
-0.14962509274482727,
-0.05443277209997177,
0.35418859124183655,
-0.08055215328931808,
0.409623920917511,
0.5019235610961914,
0.05150098726153374,
-0.3145159184932709,
-0.38352712988853455,
0.30747488141059875,
0.030954932793974876,
0.9555871486663818,
-0.29589489102363586,
-0.1510225236415863,
-0.32016345858573914,
-0.06149393320083618,
-0.25220465660095215,
0.21539849042892456,
-0.042363837361335754,
0.036488357931375504,
0.22569532692432404,
-0.5020577907562256,
-0.28658396005630493,
-0.07615973800420761,
-0.10781945288181305,
-0.23402991890907288,
0.028332214802503586,
-0.22196465730667114,
0.07962090522050858,
-0.18038176000118256,
-0.04423698037862778,
0.45696091651916504,
-0.4619446396827698,
-0.008636768907308578,
0.16265839338302612,
-0.5250940918922424,
-0.10690051317214966,
0.17388108372688293,
0.4802711009979248,
-0.1630518138408661,
0.18262481689453125,
0.0631820484995842,
0.017997153103351593,
-0.06387994438409805,
0.04555005207657814,
0.4424837827682495,
0.28829675912857056,
0.04658065736293793,
0.06370867788791656,
0.18415649235248566,
-0.27339765429496765,
-0.1512686163187027,
-0.19370412826538086,
0.14483805000782013,
-0.3180258870124817,
0.5594483017921448,
-0.031263142824172974,
0.35899490118026733,
-0.3831407129764557,
-0.31125882267951965,
0.05873662233352661,
-0.018917536363005638,
-0.16820190846920013,
0.052500221878290176,
0.11310459673404694,
-0.06568144261837006,
-0.009020108729600906,
-0.13720256090164185,
-0.0024414174258708954,
-0.2364441603422165,
-0.2604895532131195,
-0.24963608384132385,
-0.19635973870754242,
-0.2484811693429947,
0.0164702907204628,
0.2276226133108139,
-0.17545422911643982,
-0.04502376914024353,
0.34773534536361694,
0.16344860196113586,
-0.21842828392982483,
0.15093490481376648,
0.0006868168711662292,
0.24341514706611633,
0.30308908224105835,
-0.294501930475235,
0.3164534270763397,
0.42737168073654175,
0.0003930628299713135,
-0.19982314109802246,
0.41889968514442444,
-0.4340384602546692,
-0.4555510878562927,
0.0640677660703659,
0.13145656883716583,
-0.4850311279296875,
-0.27163615822792053,
-0.1847335696220398,
-0.018942654132843018,
0.40811023116111755,
-0.0017413385212421417,
0.15437375009059906,
-0.13295166194438934,
-0.25226059556007385,
-0.2450333535671234,
-0.00402345135807991,
0.3853211998939514,
-0.615648090839386,
0.008378580212593079,
-0.2004258781671524,
-0.05710599198937416,
0.11469052731990814,
0.3705380856990814,
-0.44631919264793396,
0.15172719955444336,
-0.1681307852268219,
-0.17252568900585175,
0.18481183052062988,
-0.1718275398015976,
-0.5081831216812134,
0.2176719605922699,
0.20190005004405975,
0.3354846239089966,
-0.022835493087768555,
0.07413426786661148,
0.12653294205665588,
0.0012818221002817154,
-0.031976357102394104,
-0.05235503613948822,
0.09520012885332108,
-0.20443561673164368,
-0.21590639650821686,
-0.4232354164123535,
0.26722410321235657,
-0.13775116205215454,
0.07156454771757126,
0.14945006370544434,
-0.05018176883459091,
-0.17088736593723297,
0.07187194377183914,
-0.05694231018424034,
0.09814032167196274,
0.19589245319366455,
0.19508513808250427,
0.09455423057079315,
0.1072176843881607,
0.05225791037082672,
-0.4603860378265381,
0.334503710269928,
0.14163562655448914,
-0.3668772578239441,
-0.07864882051944733,
-0.20398716628551483,
-0.10241460800170898,
-0.10820342600345612,
-0.43131425976753235,
-0.07423457503318787,
0.049478672444820404,
-0.05294990539550781,
0.003720998764038086,
-0.07231731712818146,
-0.2836421728134155,
0.41355180740356445,
-0.3291516602039337,
-0.10316777974367142,
-0.11659066379070282,
0.21080181002616882,
0.03918217867612839,
0.19263102114200592,
-0.22283639013767242,
0.141366109251976,
0.03765980154275894,
0.18663448095321655,
0.02624574676156044,
0.1384478658437729,
0.04253576695919037,
0.35387712717056274,
0.09195227921009064,
0.3583671450614929,
0.006924690678715706,
-0.06166817247867584,
0.3143140375614166,
0.04784347489476204,
0.2054935246706009,
-0.09726642072200775,
-0.10941531509160995,
0.22666007280349731,
-0.11067226529121399,
0.12863191962242126,
-0.23014117777347565,
-0.15337714552879333,
0.11839719116687775,
-0.02933044731616974,
0.056473083794116974,
-0.14600935578346252,
-0.030213702470064163,
0.0089364442974329,
-0.03565015643835068,
0.30043110251426697,
-0.10308870673179626,
0.1872985064983368,
0.32569366693496704,
0.01715356856584549,
0.03251495584845543,
0.0430142767727375,
-0.13505980372428894,
-0.37477239966392517,
0.1514114886522293,
0.3989088237285614,
0.5773314833641052,
0.1253364235162735,
0.14229080080986023,
0.05760803818702698,
0.05631114915013313,
-0.16470542550086975,
0.3104422688484192,
-0.04273969680070877,
-0.05216497182846069,
0.09851716458797455,
0.08599087595939636,
-0.11606889218091965,
-0.30533668398857117,
0.09066610038280487,
0.23170332610607147,
0.2590827941894531,
-0.5257885456085205,
0.22816164791584015,
-0.5218096375465393,
-0.18933317065238953,
-0.12274608016014099,
0.014579342678189278,
-0.31213268637657166,
-0.40091976523399353,
-0.002623938024044037,
-0.015253055840730667,
0.1822066754102707,
0.06256594508886337,
-0.20801174640655518,
0.46789366006851196,
-0.12622003257274628,
0.04637710377573967,
-0.11392919719219208,
-0.15636935830116272,
-0.2914365530014038,
0.09240555763244629,
0.08681130409240723,
-0.15076790750026703,
0.2687634825706482,
0.02939254231750965,
0.05685923993587494,
-0.22528988122940063,
0.09843049198389053,
-0.035640522837638855,
0.026833385229110718,
0.2886548340320587,
-0.20702284574508667,
0.06317489594221115,
-0.06007511913776398,
0.036545902490615845,
-0.025581803172826767,
0.04903935641050339,
0.11526668071746826,
-0.20906883478164673,
-0.013963986188173294,
0.10013654828071594,
-0.016568530350923538,
-0.16710826754570007,
-0.39124977588653564,
-0.13894838094711304,
-0.19759108126163483,
-0.006330937147140503,
-0.04059787094593048,
0.4335283637046814,
-0.03282707557082176,
-0.04384840279817581,
0.04458369314670563,
-0.02581815980374813,
-0.5719742774963379,
-0.4883938431739807,
0.2505272924900055,
0.006066122557967901,
-0.15403170883655548,
0.2757163643836975,
0.2353699952363968,
0.36908605694770813,
0.0922648161649704,
-0.7071725130081177,
-0.1561724990606308,
-0.2046678364276886,
0.11844739317893982,
0.10582572221755981,
0.024153396487236023,
0.23982904851436615,
0.024091841652989388,
-0.02689160406589508,
-0.1140974760055542,
-0.14672666788101196,
-0.12910372018814087,
-0.03748513013124466,
0.3500133156776428,
0.09104916453361511,
0.00011571869254112244,
0.04162405803799629,
0.9497953653335571,
0.39437949657440186,
-0.1414884775876999,
0.14398235082626343,
-0.024064751341938972,
0.4980606138706207,
0.03164822608232498,
-0.19732250273227692,
-0.022342577576637268,
-0.2218565046787262,
-0.3265596628189087,
0.10500611364841461,
0.03024926781654358,
-0.034493595361709595,
0.07930908352136612,
0.31649258732795715,
-0.055747829377651215,
-0.2625712752342224,
0.14851723611354828,
-0.3140104413032532,
0.2633897066116333,
0.17859022319316864,
-0.06686011701822281,
-0.26871219277381897,
-0.17594298720359802,
-0.3116210103034973,
0.21268877387046814,
0.2438858449459076,
-0.08345194160938263,
-0.06984219700098038,
-0.13469602167606354,
-0.31454598903656006,
0.2725904583930969,
-0.09897156059741974,
0.24341270327568054,
-0.20304566621780396,
0.20655027031898499,
0.37318170070648193,
0.29712894558906555,
0.25079578161239624,
-0.5127699971199036,
-0.06305389851331711,
0.22908399999141693,
0.010392405092716217,
-0.09868999570608139,
-0.19027672708034515,
-0.04210124909877777,
0.18081940710544586,
0.031335752457380295,
-0.04663245379924774,
0.29273301362991333,
-0.2061232179403305,
-0.1982196569442749,
0.07275533676147461,
-0.20742246508598328,
-0.16318504512310028,
-0.2685336768627167,
-0.0736331045627594,
-0.17769037187099457,
-0.0034783557057380676,
-0.029165947809815407,
-0.15939262509346008,
-0.26594871282577515,
0.048908766359090805,
-0.2242681086063385,
0.22673168778419495,
0.1672309935092926,
0.03708941489458084,
0.25791558623313904,
0.11977678537368774,
0.06931336224079132,
0.280386745929718,
0.011784102767705917,
0.23700159788131714,
0.47914907336235046,
0.003930596634745598,
-0.1519688069820404,
-0.05735575407743454,
0.05201464146375656,
0.14703069627285004,
0.2802858352661133,
-0.35973674058914185,
0.240203857421875,
0.16470997035503387,
-0.041278764605522156,
-0.4268028140068054,
-0.15561076998710632,
0.30611833930015564,
0.22076813876628876,
-0.25330159068107605,
-0.6095197796821594,
0.5321123003959656,
0.1871461123228073,
-0.23842720687389374,
0.2558767795562744,
-0.06180495023727417,
-0.2736567258834839,
-0.06485719978809357,
0.062331680208444595,
0.8591033816337585,
0.09763546288013458,
0.14409729838371277,
-0.0029545333236455917,
-0.16817283630371094,
0.5544692277908325,
-0.21905964612960815,
0.27689528465270996,
-0.1044926643371582,
-0.13457873463630676,
-0.19150258600711823,
-0.05204536393284798,
0.302208811044693,
0.20408564805984497,
-0.16024047136306763,
0.3003250062465668,
-0.2708016335964203,
0.4485933184623718,
-0.14921386539936066,
-0.1534205675125122,
-0.14315800368785858,
0.009088506922125816,
-0.006054172292351723,
0.18525364995002747,
-0.10693599283695221,
0.3841549754142761,
-0.14768266677856445,
0.19691365957260132,
0.2623198330402374,
0.17414598166942596,
-0.4287793040275574,
-0.2461884319782257,
0.05911684408783913,
0.28239119052886963,
-0.1715058535337448,
-0.39298439025878906,
0.4317496716976166,
0.3194621205329895,
0.27649933099746704,
-0.05354590341448784,
-0.28579428791999817,
0.26672422885894775,
0.0634535700082779,
0.1829371601343155,
-0.21526482701301575,
-0.013418829068541527,
0.24224881827831268,
0.10899656265974045,
-0.40479153394699097,
0.09338375926017761,
-0.010791385546326637,
-0.21293354034423828,
-0.04646514356136322,
0.4137536287307739,
0.023095659911632538,
-0.5987154245376587,
-0.15306881070137024,
0.2957651615142822,
0.25907275080680847,
0.1559879630804062,
0.15570273995399475,
0.19506210088729858,
0.1615443229675293,
0.5383927822113037,
-0.37275010347366333,
-0.33191996812820435,
-0.07511422038078308,
0.3418461084365845,
0.48005735874176025,
-0.1337224692106247,
0.5248401165008545,
-0.1896691620349884,
-0.3283011317253113,
-0.21438294649124146,
-0.11988777667284012,
0.05377528816461563,
-0.1673792600631714,
0.03006109595298767,
0.1847633272409439,
0.4469095468521118,
0.08598648756742477,
0.0942792221903801,
0.0386938638985157,
0.16914096474647522,
-0.28482869267463684,
-0.14990383386611938,
-0.08699887245893478,
-0.023355558514595032,
-0.06607413291931152,
0.4195609390735626,
-0.1543794572353363,
-0.2241765409708023,
0.11993758380413055,
-0.01923610083758831,
-0.28367674350738525,
0.20199313759803772,
-0.12789444625377655,
0.0934845581650734,
0.03269215300679207,
-0.12239938229322433,
0.1731598973274231,
-0.2500203251838684,
-0.0944233164191246,
-0.1227530986070633,
-0.35318833589553833,
-0.19026005268096924,
0.1031414270401001,
0.19021925330162048,
0.06441956013441086,
-0.2847708463668823,
0.0072892578318715096,
-0.22467496991157532,
-0.03134322166442871,
-0.11403711140155792,
0.2164696902036667,
0.317514032125473,
0.04160826653242111,
0.25575923919677734,
-0.14551955461502075,
-0.13824039697647095,
-0.04081956297159195,
0.016284387558698654,
0.06207636743783951,
0.3474434018135071,
0.3701218366622925,
0.24687856435775757,
-0.0009162563364952803,
0.17822986841201782,
-0.22156737744808197,
0.2649023234844208,
0.04770100489258766,
0.09943359345197678,
0.18038447201251984,
-0.40756553411483765,
0.1558144986629486,
0.21788805723190308,
0.32423025369644165,
0.27140551805496216,
-0.2259008139371872,
-0.3062479794025421,
0.08382483571767807,
0.14073814451694489,
-0.14090415835380554,
-0.22093968093395233,
0.23453916609287262,
0.31852126121520996,
-0.17070433497428894,
0.1732642948627472,
0.43521738052368164,
-0.09972469508647919,
0.3946261405944824,
-0.030041925609111786,
0.6261054873466492,
-0.5539910197257996,
0.37934499979019165,
0.07896310836076736,
0.06929813325405121,
-0.12008416652679443,
0.3651638925075531,
0.42781609296798706,
0.022486448287963867,
0.5699400901794434,
0.08486385643482208,
0.15688680112361908,
0.5307421088218689,
0.2910482883453369,
-0.38885989785194397,
-0.9131237268447876,
0.4202113449573517,
0.44026604294776917,
-0.5396683812141418,
0.1072002649307251,
0.09477062523365021,
-0.05342315882444382,
-0.16861183941364288,
0.14955881237983704,
-0.16003113985061646,
0.20459775626659393,
-0.22335365414619446,
-0.07102777063846588,
0.42424216866493225,
-0.1915764957666397,
0.20486357808113098,
0.06517516076564789,
-0.0621957965195179,
-0.07690836489200592,
0.08255574107170105,
-0.16351933777332306,
-0.18945731222629547,
-0.33505773544311523,
0.3617978096008301,
0.06399615108966827,
0.3503904640674591,
-0.09719888865947723,
0.167908176779747,
0.06348659843206406,
0.043422915041446686,
0.20470236241817474,
0.44447264075279236,
0.5200182199478149,
0.0289696604013443,
0.191412091255188,
0.21816980838775635,
0.026091817766427994,
0.013970622792840004,
-0.16268020868301392,
0.2969219982624054,
-0.1348583847284317,
-0.021427668631076813,
0.1584320217370987,
0.12947414815425873,
0.06831785291433334,
0.08197002112865448,
-0.03699208423495293,
0.17607738077640533,
-0.45341330766677856,
-0.018983587622642517,
0.17625269293785095,
-0.018062099814414978,
-0.06926874816417694,
0.21227683126926422,
-0.2905004620552063,
-0.14478187263011932,
0.7292044758796692,
0.031671080738306046,
0.23956534266471863,
-0.20098644495010376,
0.06226412206888199,
-0.1819661259651184,
0.45389053225517273,
0.30871152877807617,
0.23114705085754395,
-0.18409310281276703,
-0.0565364696085453,
-0.6199725270271301,
-0.032540805637836456,
-0.27901917695999146,
0.11690518260002136,
0.10155171155929565,
0.16113269329071045,
-0.19482159614562988,
0.037408340722322464,
0.0814652293920517,
-0.15980717539787292,
-0.07686860859394073,
-0.06744372844696045,
-0.16335469484329224,
-0.07607503235340118,
-0.025317266583442688,
-0.005000205710530281,
-0.18988041579723358,
-0.2545613944530487,
0.203604593873024,
-0.028941646218299866,
-0.022175373509526253,
-0.11081986129283905,
-0.03229981288313866,
0.03674430772662163,
0.04140982776880264,
0.42719483375549316,
0.2819313704967499,
0.404743492603302,
0.36568430066108704,
0.11756611615419388,
-0.2506977617740631,
-0.1911173313856125,
-0.16927523910999298,
0.2737906277179718,
0.07633887231349945,
-0.15672138333320618,
-0.44099733233451843,
0.07666182518005371,
-0.13892792165279388,
0.19223010540008545,
0.005998186767101288,
-0.024793028831481934,
0.07393459975719452,
-0.2451407015323639,
-0.016601257026195526,
0.15910398960113525,
0.13937422633171082,
0.23566684126853943,
-0.03486763685941696,
0.28645384311676025,
-0.3084515333175659,
-0.07123151421546936,
0.298155277967453,
-0.2871443033218384,
-0.23831436038017273,
-0.13360820710659027,
0.335043340921402,
0.012203268706798553,
-0.21802832186222076,
-0.5311557054519653,
-0.04220441356301308,
0.5525938272476196,
-0.32095351815223694,
-0.07493093609809875,
0.15682601928710938,
0.06077851727604866,
0.13234569132328033,
-0.08809585124254227,
0.37949156761169434,
-0.01871585100889206,
-0.024516843259334564,
0.062199097126722336,
-0.3847382664680481
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | I have another question about caching, this time in the case where FORCE_REDOWNLOAD is used to load the dataset, the datasets cache is one directory as defined by HF_HOME and there are multiple concurrent jobs running in a cluster using the same local dataset (i.e., same local files in the cluster). Does anything in the naming convention and/or file access/locking that you're using prevent race conditions between the concurrent jobs on the caching of the local dataset they all use?
I noticed some errors (can provide more details if helpful) in load_dataset/prepare_split that lead to my question above.
Let me know if my question is clear, I can elaborate more if needed @lhoestq Thank you! | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 115 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
I have another question about caching, this time in the case where FORCE_REDOWNLOAD is used to load the dataset, the datasets cache is one directory as defined by HF_HOME and there are multiple concurrent jobs running in a cluster using the same local dataset (i.e., same local files in the cluster). Does anything in the naming convention and/or file access/locking that you're using prevent race conditions between the concurrent jobs on the caching of the local dataset they all use?
I noticed some errors (can provide more details if helpful) in load_dataset/prepare_split that lead to my question above.
Let me know if my question is clear, I can elaborate more if needed @lhoestq Thank you! | [
-0.1976587027311325,
0.0997743308544159,
-0.1261470913887024,
0.23994241654872894,
0.028944052755832672,
0.043431356549263,
0.45647957921028137,
0.0984460860490799,
0.42207035422325134,
-0.21270205080509186,
-0.02498314529657364,
-0.04001081734895706,
-0.036591775715351105,
0.013408923521637917,
-0.1342041790485382,
0.40308040380477905,
0.20768795907497406,
-0.039634570479393005,
-0.02421519160270691,
-0.14134594798088074,
-0.15003612637519836,
-0.028953472152352333,
-0.047572530806064606,
0.060677964240312576,
-0.5617078542709351,
-0.06714168190956116,
0.001373032107949257,
0.16230402886867523,
0.1725722998380661,
-0.42353305220603943,
0.35193416476249695,
0.5294939875602722,
0.06704498082399368,
0.49141186475753784,
-0.00011309102410450578,
-0.04038093239068985,
0.19586385786533356,
-0.047752365469932556,
-0.26227474212646484,
-0.15761889517307281,
-0.5350164771080017,
-0.4387892484664917,
0.17207692563533783,
-0.09883170574903488,
0.05743378400802612,
-0.1514246016740799,
0.04117480292916298,
-0.7131087183952332,
0.45191705226898193,
0.1427444964647293,
0.20417746901512146,
-0.10912098735570908,
-0.4887526035308838,
0.01603063941001892,
0.09627574682235718,
0.3353847861289978,
0.01612427644431591,
0.10148324072360992,
0.2383863478899002,
-0.3198067843914032,
-0.32911962270736694,
0.268815815448761,
-0.013863196596503258,
0.3965907394886017,
0.3954428732395172,
0.008609690703451633,
-0.27637186646461487,
-0.27457571029663086,
0.1655483841896057,
0.0608961395919323,
0.7798289060592651,
-0.2836917042732239,
-0.3395361304283142,
-0.4090898334980011,
-0.14753931760787964,
-0.17930778861045837,
0.26996591687202454,
0.07160186767578125,
0.042968157678842545,
0.08457852900028229,
-0.396480917930603,
-0.2547958791255951,
0.003656044602394104,
-0.2672637104988098,
-0.0383913516998291,
-0.0404893159866333,
-0.15679766237735748,
0.08330696821212769,
-0.07470731437206268,
0.05146472156047821,
0.6233455538749695,
-0.504534125328064,
0.17904119193553925,
0.1976584792137146,
-0.461689293384552,
0.02372755855321884,
-0.036460235714912415,
0.3918437361717224,
-0.054018888622522354,
-0.02450845018029213,
-0.15368175506591797,
0.08676670491695404,
-0.19154824316501617,
0.15895183384418488,
0.44644278287887573,
0.15031693875789642,
0.13277140259742737,
0.20226244628429413,
0.23228484392166138,
-0.3030022084712982,
-0.3496907353401184,
-0.06956063956022263,
0.06653635948896408,
-0.4245011806488037,
0.29962658882141113,
0.034016333520412445,
0.10594405233860016,
-0.3955442011356354,
-0.2909144163131714,
0.07812358438968658,
0.13195350766181946,
-0.27822110056877136,
0.04589555040001869,
0.1907656192779541,
0.053393036127090454,
0.028291955590248108,
-0.25144532322883606,
0.08395740389823914,
-0.3625873625278473,
-0.2256823629140854,
-0.22208045423030853,
-0.12523899972438812,
-0.25242915749549866,
0.17852087318897247,
0.20624442398548126,
-0.23267138004302979,
0.040270887315273285,
0.39503130316734314,
0.09625215083360672,
-0.16988341510295868,
0.14043597877025604,
-0.16786158084869385,
0.2335449457168579,
0.3442671298980713,
-0.25461286306381226,
0.23552881181240082,
0.3324483036994934,
0.030890867114067078,
-0.14430616796016693,
0.2100907564163208,
-0.4729040265083313,
-0.41841956973075867,
0.10012931376695633,
0.10334852337837219,
-0.40516477823257446,
-0.02472500503063202,
-0.1482534110546112,
0.07267607748508453,
0.5164401531219482,
0.049785066395998,
0.09436207264661789,
-0.26994460821151733,
-0.2512397766113281,
-0.1872328519821167,
-0.09064486622810364,
0.5964111089706421,
-0.626185417175293,
0.024364374577999115,
-0.14292429387569427,
-0.09977997839450836,
0.07218863070011139,
0.3109852373600006,
-0.4317258894443512,
0.17715054750442505,
-0.24711395800113678,
-0.030025526881217957,
0.15619349479675293,
-0.28192561864852905,
-0.2977418601512909,
0.2853240668773651,
-0.004816591739654541,
0.28711289167404175,
0.11050072312355042,
-0.0748477354645729,
0.07741103321313858,
-0.20644401013851166,
0.07316965609788895,
0.02416849695146084,
-0.0004385039210319519,
-0.12786231935024261,
-0.2169780731201172,
-0.2795426547527313,
0.12651777267456055,
-0.05910952016711235,
0.15580956637859344,
0.1283835470676422,
0.1315273642539978,
-0.06419087946414948,
0.13977599143981934,
-0.04227133467793465,
0.13206566870212555,
0.3305949568748474,
-0.05621608719229698,
0.2266032099723816,
0.1514284461736679,
0.20365294814109802,
-0.6013003587722778,
0.40220126509666443,
0.05655522644519806,
-0.4018247127532959,
-0.015567228198051453,
-0.1956532597541809,
-0.15189823508262634,
-0.19132475554943085,
-0.4529676139354706,
-0.0661180317401886,
0.06312402337789536,
-0.12439434230327606,
-0.07427215576171875,
-0.21703489124774933,
-0.20074714720249176,
0.8151636123657227,
-0.3109959363937378,
-0.03135934844613075,
-0.0666532963514328,
0.23419196903705597,
-0.0657755434513092,
0.20167778432369232,
-0.17214490473270416,
0.03475477918982506,
0.24459105730056763,
-0.009364059194922447,
-0.06299922615289688,
0.3307785093784332,
0.2265690118074417,
0.5461761951446533,
0.18390938639640808,
0.2227417528629303,
0.1407315582036972,
0.10498276352882385,
0.3516892194747925,
-0.20023779571056366,
0.10835432261228561,
-0.17673708498477936,
-0.25461503863334656,
0.3825458288192749,
-0.3531450927257538,
0.26027604937553406,
-0.16926519572734833,
-0.2800014019012451,
0.07221313565969467,
-0.025357002392411232,
0.05788321793079376,
-0.06200634315609932,
0.16342802345752716,
-0.054424840956926346,
0.26420676708221436,
0.21558129787445068,
-0.16685453057289124,
0.14551788568496704,
0.19837868213653564,
0.08101484179496765,
-0.10464940220117569,
-0.10365275293588638,
0.031168993562459946,
-0.30267012119293213,
0.19094382226467133,
0.4321049153804779,
0.6589483618736267,
0.08414578437805176,
0.1966477781534195,
-0.0270575862377882,
-0.0880918800830841,
-0.2778381109237671,
0.12201771885156631,
-0.07200698554515839,
-0.0023051206953823566,
0.20294150710105896,
0.06121382117271423,
-0.15247543156147003,
-0.31587737798690796,
-0.047457195818424225,
0.2898838222026825,
0.07723426818847656,
-0.44485121965408325,
0.1399449110031128,
-0.27465009689331055,
0.03846989572048187,
-0.1693122833967209,
0.1227739006280899,
-0.3491447865962982,
-0.3374188244342804,
-0.017350032925605774,
0.16778349876403809,
0.039774369448423386,
0.023976774886250496,
-0.3611682057380676,
0.31728580594062805,
-0.3596298098564148,
-0.037097759544849396,
-0.1784278154373169,
-0.3712446689605713,
-0.14862197637557983,
0.027070488780736923,
0.20501354336738586,
0.06774558871984482,
0.24443398416042328,
0.09253867715597153,
-0.1358066350221634,
-0.19855329394340515,
0.22297194600105286,
-0.0905948281288147,
-0.07142344862222672,
0.14593279361724854,
-0.3722257614135742,
-0.01439628005027771,
-0.04195361211895943,
-0.08361776918172836,
0.001237810356542468,
-0.04416096583008766,
0.025200774893164635,
-0.276080459356308,
0.07671691477298737,
0.13794782757759094,
-0.03295448049902916,
-0.12606152892112732,
-0.3585489094257355,
-0.2973441481590271,
-0.14164510369300842,
-0.06657194346189499,
-0.013350822031497955,
0.38121920824050903,
-0.12330717593431473,
-0.10909850895404816,
0.22329780459403992,
-0.21074683964252472,
-0.5925026535987854,
-0.4445324242115021,
0.06572439521551132,
-0.15887585282325745,
-0.18973611295223236,
-0.0171293206512928,
0.11731070280075073,
0.18801145255565643,
0.17419511079788208,
-0.5063968300819397,
0.030678842216730118,
-0.05220004916191101,
0.10786888003349304,
0.11491871625185013,
0.011920265853404999,
0.23832179605960846,
0.05617359280586243,
0.006871236488223076,
-0.18661683797836304,
0.0011007525026798248,
0.06508643180131912,
-0.016990024596452713,
0.21550753712654114,
0.031027840450406075,
-0.16360142827033997,
-0.12786124646663666,
0.9876948595046997,
0.28209590911865234,
-0.02004597708582878,
0.24784204363822937,
0.2097236067056656,
0.565801739692688,
0.0727657824754715,
-0.2682194411754608,
-0.01980297826230526,
-0.3216589391231537,
-0.4030305743217468,
0.09863442927598953,
-0.02021130546927452,
-0.025567373260855675,
0.015895266085863113,
0.2516835927963257,
-0.1507885754108429,
-0.32023680210113525,
0.09681957215070724,
-0.40163764357566833,
0.22477099299430847,
0.10571916401386261,
-0.15798503160476685,
-0.23115932941436768,
-0.06380408257246017,
-0.20341424643993378,
0.12529242038726807,
0.2671802341938019,
-0.11334202438592911,
-0.37609565258026123,
-0.012211628258228302,
-0.15098199248313904,
0.2174096256494522,
0.0030074550304561853,
0.2297932207584381,
-0.22138120234012604,
0.15415295958518982,
0.24255909025669098,
0.2520405948162079,
0.5395841002464294,
-0.49433189630508423,
-0.012009024620056152,
0.3081452548503876,
0.09350620210170746,
-0.03507092222571373,
-0.3314196467399597,
0.05971929058432579,
0.3186374008655548,
-0.06012902036309242,
0.16865397989749908,
0.1850641965866089,
-0.35484081506729126,
-0.20197686553001404,
0.12049633264541626,
-0.18762069940567017,
-0.33861851692199707,
-0.1475476324558258,
0.05158724635839462,
-0.09892349690198898,
0.17064450681209564,
0.0041626375168561935,
-0.10423539578914642,
-0.4475528299808502,
0.14244116842746735,
-0.037559524178504944,
0.16455897688865662,
0.18223468959331512,
-0.006350887008011341,
0.24749130010604858,
0.06725193560123444,
0.12248781323432922,
0.4751349985599518,
-0.11626553535461426,
0.3912045359611511,
0.513235330581665,
-0.2522023618221283,
-0.07458385825157166,
0.0655103325843811,
0.04367813095450401,
0.2390204668045044,
0.49209973216056824,
-0.16983459889888763,
0.011233709752559662,
0.04913490265607834,
-0.19936080276966095,
-0.3951825499534607,
-0.00893988274037838,
0.0891338586807251,
0.11153646558523178,
-0.2740193009376526,
-0.5477323532104492,
0.49443942308425903,
0.18827103078365326,
-0.29311493039131165,
0.22713807225227356,
-0.07944145798683167,
-0.2718231976032257,
0.16467532515525818,
0.0818440392613411,
0.7546728849411011,
-0.0053864941000938416,
0.08571570366621017,
-0.2928616404533386,
-0.1523360013961792,
0.3615902066230774,
-0.4735434055328369,
0.19160380959510803,
-0.20582975447177887,
-0.13564786314964294,
-0.06615964323282242,
-0.17599280178546906,
0.3035150468349457,
0.42331504821777344,
0.06988520920276642,
0.409953773021698,
-0.16378968954086304,
0.34773769974708557,
-0.34060153365135193,
0.12997318804264069,
-0.08025489002466202,
-0.09745922684669495,
0.1579231172800064,
0.19041228294372559,
-0.00529012456536293,
0.44842082262039185,
-0.13426852226257324,
0.25423550605773926,
0.14996586740016937,
0.21682317554950714,
-0.3202621042728424,
-0.09618348628282547,
0.014867184683680534,
0.31580138206481934,
-0.35186487436294556,
-0.48613256216049194,
0.30816593766212463,
0.2944428622722626,
0.4739227890968323,
-0.18093009293079376,
-0.10674893856048584,
0.23651476204395294,
0.15020155906677246,
0.3250727653503418,
-0.19637949764728546,
0.015832416713237762,
0.35168778896331787,
0.1532215178012848,
-0.2486715018749237,
-0.02031911164522171,
-0.13146743178367615,
-0.12920495867729187,
-0.05361558496952057,
0.34815698862075806,
0.11015959084033966,
-0.5068120360374451,
-0.06207401677966118,
0.3035106658935547,
0.26397883892059326,
0.13148868083953857,
0.12623269855976105,
0.14652889966964722,
0.18770714104175568,
0.40046700835227966,
-0.4862883388996124,
-0.26978784799575806,
-0.1348177194595337,
0.38678842782974243,
0.4538162648677826,
-0.30985382199287415,
0.43575581908226013,
-0.19714918732643127,
-0.2967899441719055,
-0.1681283712387085,
-0.016831640154123306,
0.2014452964067459,
-0.16555315256118774,
0.05889272317290306,
-0.07160546630620956,
0.09451396763324738,
0.1081802025437355,
-0.0181550495326519,
0.12788906693458557,
0.12761999666690826,
-0.07241737842559814,
-0.13815051317214966,
-0.28859713673591614,
-0.09413166344165802,
-0.166200652718544,
0.37292397022247314,
-0.007663290947675705,
-0.2614080011844635,
-0.003544362261891365,
0.12068998068571091,
-0.2857522964477539,
0.0724874883890152,
-0.1828870177268982,
0.13122177124023438,
0.014440814033150673,
-0.06692726910114288,
0.22887426614761353,
-0.19787560403347015,
-0.07241711765527725,
-0.060482822358608246,
-0.3882531523704529,
-0.16093531250953674,
0.10404302179813385,
0.1701238751411438,
0.057410601526498795,
-0.10910340398550034,
-0.11588556319475174,
-0.29925405979156494,
0.11756306886672974,
-0.14966216683387756,
0.2170010805130005,
0.3762134909629822,
-0.007314704358577728,
0.20576521754264832,
0.20460917055606842,
0.007570743560791016,
-0.07966604828834534,
0.09699961543083191,
0.16929006576538086,
0.24674943089485168,
0.28332239389419556,
0.2763616442680359,
-0.04949274659156799,
0.12303940951824188,
-0.23914752900600433,
0.13096880912780762,
0.22718964517116547,
0.1936822533607483,
0.07247547805309296,
-0.2769877314567566,
0.1188424676656723,
0.08335977047681808,
0.45567649602890015,
0.36232179403305054,
-0.0685257613658905,
-0.3023667335510254,
0.2224196195602417,
0.14097222685813904,
-0.07031203806400299,
-0.20938138663768768,
0.42148223519325256,
0.212128147482872,
-0.10019057989120483,
0.25937867164611816,
0.6226679086685181,
-0.0030640587210655212,
0.26517730951309204,
0.1284809708595276,
0.626998782157898,
-0.3409233093261719,
0.3178866505622864,
0.12410503625869751,
0.14059185981750488,
0.07253728806972504,
0.4786076843738556,
0.4627038538455963,
0.045511502772569656,
0.4786469340324402,
0.11873514205217361,
0.22416584193706512,
0.33076196908950806,
0.2659926116466522,
-0.2395767867565155,
-0.7666533589363098,
0.33864107728004456,
0.44356250762939453,
-0.3572899401187897,
0.1059565618634224,
-0.16207526624202728,
0.0412578247487545,
-0.23857857286930084,
-0.02232363633811474,
-0.019892457872629166,
0.13417372107505798,
-0.17579451203346252,
-0.16527707874774933,
0.5611444115638733,
-0.23218968510627747,
0.07244591414928436,
0.07179330289363861,
-0.08725665509700775,
0.03105444833636284,
0.29546093940734863,
-0.14023412764072418,
-0.020640887320041656,
-0.14178308844566345,
0.3359810709953308,
0.08955270051956177,
0.28145864605903625,
-0.11957664787769318,
0.150071382522583,
0.01930779218673706,
0.02296658605337143,
0.2433670461177826,
0.3205234110355377,
0.43121138215065,
0.07307548820972443,
0.05678930506110191,
-0.04198063537478447,
0.08034947514533997,
0.03065858967602253,
-0.12447405606508255,
0.24029552936553955,
-0.2892830967903137,
-0.1411241590976715,
0.27963492274284363,
0.1205691248178482,
0.05445729196071625,
0.09974029660224915,
0.03473415598273277,
0.05222312733530998,
-0.2454395741224289,
0.04132682457566261,
0.16169974207878113,
-0.1541542112827301,
0.04137489199638367,
0.08723162114620209,
-0.2158907651901245,
-0.2138017863035202,
0.643429160118103,
-0.04117349535226822,
0.3312615156173706,
-0.08741874992847443,
0.06712064892053604,
-0.08990970253944397,
0.4424493908882141,
0.30444738268852234,
0.0016846023499965668,
-0.285518616437912,
-0.0738333910703659,
-0.6275609135627747,
-0.09985721856355667,
-0.3399468958377838,
0.30912208557128906,
0.012760243378579617,
0.150641068816185,
-0.0677456185221672,
0.009188557043671608,
-0.0018431171774864197,
-0.1150776594877243,
-0.2683277130126953,
0.16037163138389587,
-0.1871928870677948,
-0.07896572351455688,
-0.14765587449073792,
-0.0946878045797348,
-0.09102216362953186,
-0.2468646764755249,
0.18489326536655426,
0.08069336414337158,
-0.06949169933795929,
-0.017188820987939835,
-0.048256345093250275,
0.34182751178741455,
-0.049281373620033264,
0.3211779296398163,
0.08969708532094955,
0.31448131799697876,
0.3501133918762207,
0.1428949534893036,
-0.3316807448863983,
-0.25303876399993896,
-0.2174377143383026,
0.1777808964252472,
-0.06983502209186554,
-0.049541737884283066,
-0.606016218662262,
0.015094783157110214,
-0.15689772367477417,
0.19810254871845245,
-0.09864901006221771,
-0.10575968027114868,
0.10388634353876114,
-0.17094413936138153,
-0.07058842480182648,
0.20160700380802155,
0.20138441026210785,
0.3171713650226593,
0.08105111122131348,
0.41739746928215027,
-0.4404122233390808,
-0.0809612050652504,
0.2961798310279846,
-0.2702329456806183,
-0.26280248165130615,
-0.04784277081489563,
0.3122306168079376,
0.09490874409675598,
-0.2099294513463974,
-0.41732001304626465,
0.0037848055362701416,
0.4315958023071289,
-0.280796617269516,
-0.049259766936302185,
0.04117883741855621,
0.1083436906337738,
0.029037173837423325,
-0.09648051857948303,
-0.013983696699142456,
0.031316619366407394,
-0.0698072761297226,
0.16741923987865448,
-0.17690514028072357
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | I got another error that convinces me there is a race condition (one of the test files had zero samples at prediction time). I think it comes down to the fact that the `config_id` above (used in the naming for the cache) has no information on who's touching the data. If I have 2 concurrent jobs, both loading the same dataset and forcing redownload, they may step on each other foot/caching of the dataset. | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 74 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
I got another error that convinces me there is a race condition (one of the test files had zero samples at prediction time). I think it comes down to the fact that the `config_id` above (used in the naming for the cache) has no information on who's touching the data. If I have 2 concurrent jobs, both loading the same dataset and forcing redownload, they may step on each other foot/caching of the dataset. | [
-0.2517681121826172,
0.19136768579483032,
-0.12854303419589996,
0.2252948135137558,
-0.027028009295463562,
0.07782407850027084,
0.3286910951137543,
0.10052615404129028,
0.32229533791542053,
-0.16506622731685638,
0.12396372109651566,
-0.127957284450531,
-0.19243575632572174,
-0.014435985125601292,
-0.0895962119102478,
0.5366291403770447,
0.10789947211742401,
-0.02522057294845581,
-0.0901687890291214,
0.03651080280542374,
-0.1266118586063385,
0.005336696282029152,
-0.021497361361980438,
0.03359682112932205,
-0.511425793170929,
-0.11946573108434677,
0.09140821546316147,
0.10053698718547821,
0.06351618468761444,
-0.4727330207824707,
0.4316721558570862,
0.4998074471950531,
0.11850054562091827,
0.5272335410118103,
-0.0001120525412261486,
-0.028734497725963593,
0.2750873565673828,
-0.049884818494319916,
-0.19753161072731018,
-0.04015420377254486,
-0.5221558809280396,
-0.4225539565086365,
0.1734902560710907,
-0.15654492378234863,
-0.01928871124982834,
0.1251882016658783,
0.09996456652879715,
-0.6649635434150696,
0.4458990693092346,
0.20688912272453308,
0.2239559441804886,
0.006383281201124191,
-0.3632514774799347,
0.056534066796302795,
0.1321963369846344,
0.03163456916809082,
0.11123230308294296,
0.017996108159422874,
0.24997837841510773,
-0.2765146493911743,
-0.1764029860496521,
0.39183464646339417,
-0.14968518912792206,
0.27009695768356323,
0.33947858214378357,
-0.04955989122390747,
-0.14561882615089417,
-0.24987518787384033,
0.1793825924396515,
0.07852424681186676,
0.7550192475318909,
-0.2804463803768158,
-0.2590421140193939,
-0.35737863183021545,
-0.00038893846794962883,
-0.3408976197242737,
0.27169913053512573,
0.0059854029677808285,
-0.06213343143463135,
0.13012319803237915,
-0.5325365662574768,
-0.04472629353404045,
0.054428018629550934,
-0.20204515755176544,
-0.08760961890220642,
-0.03255210816860199,
-0.18248939514160156,
0.120684415102005,
-0.11208926141262054,
0.07781487703323364,
0.5639137625694275,
-0.46946752071380615,
-0.003059394657611847,
0.1652614176273346,
-0.5255539417266846,
-0.042523495852947235,
0.11443004012107849,
0.3191138207912445,
-0.07186926901340485,
0.046111322939395905,
-0.02583281695842743,
-0.05754248797893524,
-0.07538042217493057,
0.09629066288471222,
0.4880087077617645,
0.28649237751960754,
-0.016368038952350616,
0.15489459037780762,
0.33410340547561646,
-0.20744264125823975,
-0.22927992045879364,
-0.019702959805727005,
0.12735161185264587,
-0.43061643838882446,
0.5709227919578552,
0.030396927148103714,
0.23769642412662506,
-0.2874128818511963,
-0.47230151295661926,
0.1600818783044815,
-0.05115089565515518,
-0.19261255860328674,
0.12896178662776947,
0.19745469093322754,
-0.04553130269050598,
-0.07311031967401505,
-0.03617347031831741,
-0.06041507422924042,
-0.34385547041893005,
-0.267879843711853,
-0.25704529881477356,
-0.18457520008087158,
-0.29818907380104065,
0.0259227491915226,
0.14232954382896423,
-0.13146749138832092,
0.04741553217172623,
0.3375697731971741,
0.09190689772367477,
-0.22769179940223694,
0.1491725742816925,
-0.10799816250801086,
0.1522395759820938,
0.41094380617141724,
-0.23561643064022064,
0.21779941022396088,
0.25153058767318726,
-0.09829428791999817,
-0.14949873089790344,
0.231740802526474,
-0.47037529945373535,
-0.3041459023952484,
0.2093472182750702,
0.1603919267654419,
-0.6245671510696411,
-0.050875887274742126,
-0.1154579445719719,
0.10692593455314636,
0.5289373397827148,
-0.018832294270396233,
0.18803808093070984,
-0.14650429785251617,
-0.13476859033107758,
-0.18195025622844696,
-0.06328771263360977,
0.6424160003662109,
-0.4017949104309082,
0.03203854709863663,
-0.0944015309214592,
0.01198226772248745,
0.059430234134197235,
0.23951329290866852,
-0.4469092786312103,
0.1544790416955948,
-0.14851059019565582,
-0.1909795105457306,
0.13869145512580872,
-0.18908928334712982,
-0.45849335193634033,
0.19031772017478943,
-0.05158838629722595,
0.35289767384529114,
0.10845538973808289,
0.11932697892189026,
-0.02222955785691738,
-0.19317390024662018,
0.04050667583942413,
-0.1391271948814392,
0.03233020752668381,
-0.09804745018482208,
-0.19251765310764313,
-0.45592057704925537,
0.20040252804756165,
-0.09154249727725983,
0.10579808056354523,
0.03211243078112602,
-0.04704008251428604,
-0.2174394577741623,
0.06960612535476685,
0.012223310768604279,
0.06254161149263382,
0.3167731761932373,
-0.03132421895861626,
0.09075359255075455,
0.010326169431209564,
0.09605636447668076,
-0.6243483424186707,
0.3583465814590454,
0.1563863307237625,
-0.35398587584495544,
0.013927742838859558,
-0.14685384929180145,
-0.10408338159322739,
-0.07715531438589096,
-0.43898534774780273,
-0.153005450963974,
0.08889598399400711,
-0.0018816739320755005,
-0.036159344017505646,
-0.19671738147735596,
-0.18798352777957916,
0.6546056270599365,
-0.3568730652332306,
-0.14907631278038025,
-0.27133849263191223,
0.10599297285079956,
0.01948513463139534,
0.0749574601650238,
-0.21562066674232483,
-0.029737308621406555,
0.14460164308547974,
0.10752604901790619,
0.04490198940038681,
0.23352715373039246,
0.09973830729722977,
0.4624316692352295,
0.039795540273189545,
0.4178237318992615,
-0.02456267736852169,
0.11381007730960846,
0.16844643652439117,
-0.05703642591834068,
0.12761183083057404,
-0.1137056052684784,
-0.08685443550348282,
0.4415452480316162,
-0.3481495976448059,
0.21574506163597107,
-0.27469372749328613,
-0.2525874376296997,
0.1577693670988083,
-0.09149952232837677,
-0.06848430633544922,
-0.018727485090494156,
0.18528711795806885,
0.06741419434547424,
0.10387630760669708,
0.22662702202796936,
-0.3037703037261963,
0.13079436123371124,
0.19642122089862823,
0.08604001998901367,
-0.03557474911212921,
-0.05367865413427353,
0.011819101870059967,
-0.16830584406852722,
0.14275673031806946,
0.4865143597126007,
0.6019805073738098,
0.16097921133041382,
0.10270185023546219,
-0.03081389330327511,
-0.06923475116491318,
-0.2510654330253601,
0.17919114232063293,
-0.08466313779354095,
-0.07072334736585617,
0.16487236320972443,
0.09418215602636337,
-0.07865241914987564,
-0.23529356718063354,
-0.0024988800287246704,
0.2213747650384903,
0.18783175945281982,
-0.5408715009689331,
0.21935825049877167,
-0.18851716816425323,
-0.06432463228702545,
-0.20798352360725403,
0.01579388789832592,
-0.2783074676990509,
-0.2711946964263916,
0.029967501759529114,
0.22031231224536896,
0.051273759454488754,
-0.0009048581123352051,
-0.4029426574707031,
0.33083856105804443,
-0.29623255133628845,
-0.019309507682919502,
-0.15326666831970215,
-0.3106406331062317,
-0.1549326479434967,
0.050517838448286057,
0.20700815320014954,
-0.05088184401392937,
0.2605372965335846,
0.01854741759598255,
-0.051902320235967636,
-0.07460411638021469,
0.13861262798309326,
-0.19869402050971985,
0.016671907156705856,
0.2831508219242096,
-0.2718155086040497,
0.018625669181346893,
0.0076692551374435425,
-0.11969541758298874,
-0.05984920263290405,
0.03488152474164963,
-0.04349048063158989,
-0.20978757739067078,
0.07490290701389313,
0.08852334320545197,
-0.031241416931152344,
-0.14034375548362732,
-0.3080452084541321,
-0.20725327730178833,
-0.13294635713100433,
-0.00048460811376571655,
-0.07176606357097626,
0.5000894665718079,
-0.036615386605262756,
-0.13079331815242767,
0.17352133989334106,
-0.08066977560520172,
-0.595980167388916,
-0.6015762090682983,
0.008343614637851715,
-0.00803631916642189,
-0.11650829017162323,
0.07931207120418549,
0.08091044425964355,
0.33737000823020935,
0.20102834701538086,
-0.4741952419281006,
0.05861707404255867,
-0.11616997420787811,
0.15235832333564758,
0.10112495720386505,
-0.013329712674021721,
0.32846391201019287,
0.12948665022850037,
-0.032244592905044556,
-0.1425667107105255,
0.008559070527553558,
-0.0020878612995147705,
-0.08027445524930954,
0.3332744240760803,
-0.05103880912065506,
-0.0800950825214386,
-0.08176890015602112,
1.0259203910827637,
0.44514909386634827,
-0.22072063386440277,
0.11975033581256866,
0.11148378252983093,
0.595401406288147,
0.09927161782979965,
-0.29818251729011536,
-0.14155836403369904,
-0.21051180362701416,
-0.44685906171798706,
0.07893724739551544,
-0.08130332082509995,
-0.010253779590129852,
0.025645382702350616,
0.3378879129886627,
-0.2246459722518921,
-0.3094709813594818,
0.15352730453014374,
-0.38524624705314636,
0.21109792590141296,
0.12982937693595886,
-0.1262350082397461,
-0.26419004797935486,
-0.1565331220626831,
-0.30464911460876465,
0.15666580200195312,
0.21087223291397095,
-0.12927044928073883,
-0.28098347783088684,
-0.052912965416908264,
-0.21090427041053772,
0.2140875607728958,
-0.11040069162845612,
0.22880055010318756,
-0.15272702276706696,
0.13936525583267212,
0.1894437074661255,
0.12345554679632187,
0.5261526107788086,
-0.5408658981323242,
0.018712559714913368,
0.32588624954223633,
0.03663384169340134,
-0.014130129478871822,
-0.25023937225341797,
-0.021413959562778473,
0.27495771646499634,
0.0569707527756691,
0.10409439355134964,
0.11273299902677536,
-0.1625838726758957,
-0.1295725405216217,
0.03863615170121193,
-0.20367173850536346,
-0.3574635088443756,
-0.33488166332244873,
0.021614357829093933,
-0.03563765063881874,
0.20711606740951538,
0.034981049597263336,
-0.17062218487262726,
-0.40676748752593994,
0.06336575746536255,
-0.17901629209518433,
0.25991058349609375,
0.23798970878124237,
0.09640023112297058,
0.13906514644622803,
0.15106147527694702,
0.19210107624530792,
0.5285319089889526,
-0.19437682628631592,
0.3289647698402405,
0.42493736743927,
-0.028833340853452682,
-0.0411117821931839,
-0.03335237875580788,
0.2387889325618744,
0.16100364923477173,
0.48022758960723877,
-0.16358914971351624,
0.11846345663070679,
0.11184326559305191,
-0.22440855205059052,
-0.4298040568828583,
-0.053908415138721466,
0.18327593803405762,
0.34336748719215393,
-0.29813411831855774,
-0.5379779934883118,
0.4298599362373352,
0.18253067135810852,
-0.2888794243335724,
0.2886284589767456,
-0.25113731622695923,
-0.30573534965515137,
-0.047873616218566895,
0.060648828744888306,
0.9063931703567505,
0.023812640458345413,
0.08961127698421478,
-0.16804039478302002,
-0.20434245467185974,
0.3515004515647888,
-0.26651549339294434,
0.26215532422065735,
-0.16861170530319214,
-0.11901381611824036,
-0.0768342912197113,
-0.13680508732795715,
0.3444722890853882,
0.20396411418914795,
-0.025658749043941498,
0.38157349824905396,
-0.25146484375,
0.3177069127559662,
-0.25363603234291077,
0.054557204246520996,
-0.03127773851156235,
0.0408974289894104,
0.04827946424484253,
0.20114438235759735,
-0.09158986806869507,
0.4211692214012146,
-0.14812913537025452,
0.16604776680469513,
0.17322492599487305,
0.20959649980068207,
-0.36721694469451904,
-0.07585575431585312,
-0.12880685925483704,
0.2412809282541275,
-0.3847012221813202,
-0.4085423946380615,
0.21009007096290588,
0.30014294385910034,
0.2872568964958191,
-0.04021209105849266,
-0.08790621161460876,
0.3305516541004181,
0.17189130187034607,
0.2496000975370407,
-0.1143169105052948,
-0.0921345204114914,
0.25313422083854675,
0.09281041473150253,
-0.4002293646335602,
0.13813820481300354,
-0.11760024726390839,
-0.09761857986450195,
0.04760628938674927,
0.40582430362701416,
0.16815006732940674,
-0.47196853160858154,
-0.06615680456161499,
0.3432352542877197,
0.23801937699317932,
0.12252488732337952,
0.14869186282157898,
0.21730956435203552,
0.1809561550617218,
0.45635899901390076,
-0.49318626523017883,
-0.3539920151233673,
-0.09800311923027039,
0.4541843831539154,
0.4964263141155243,
-0.11594316363334656,
0.46863627433776855,
-0.36755794286727905,
-0.19631318747997284,
-0.16572417318820953,
0.021810173988342285,
0.22904744744300842,
-0.10154609382152557,
0.11916117370128632,
-0.007933580316603184,
0.18277613818645477,
0.19187594950199127,
0.07996036112308502,
0.10436601936817169,
0.029729440808296204,
-0.0993024930357933,
-0.10743176192045212,
-0.22841472923755646,
0.0016843676567077637,
-0.008753474801778793,
0.4354405999183655,
-0.02157530002295971,
-0.23988814651966095,
-0.12330792844295502,
0.08865996450185776,
-0.32682108879089355,
0.04027492552995682,
-0.3119000494480133,
0.13478074967861176,
0.08954574912786484,
-0.09041915088891983,
0.15594178438186646,
-0.3188299238681793,
-0.055083610117435455,
-0.134819895029068,
-0.4211335778236389,
-0.19290879368782043,
0.10112455487251282,
0.14737731218338013,
-0.04539006948471069,
-0.10484865307807922,
0.03593378886580467,
-0.3042227625846863,
0.11554877460002899,
-0.11964298784732819,
0.1508764624595642,
0.2795189619064331,
0.07095415145158768,
0.12981104850769043,
0.014461956918239594,
0.008974723517894745,
-0.14452670514583588,
0.0718490332365036,
0.06182451918721199,
0.09339915961027145,
0.2500111162662506,
0.2964654564857483,
-0.07909253984689713,
0.136219322681427,
-0.27207690477371216,
0.1582305133342743,
0.179656982421875,
0.14324921369552612,
0.04053612798452377,
-0.2879130244255066,
0.05956554040312767,
0.2745725214481354,
0.33487066626548767,
0.31943216919898987,
-0.15189477801322937,
-0.2957105338573456,
0.1598288118839264,
0.1814671903848648,
-0.18419837951660156,
-0.06813741475343704,
0.26967835426330566,
0.29188546538352966,
-0.029099352657794952,
0.23031361401081085,
0.4189586341381073,
0.028682760894298553,
0.4258459210395813,
0.08844345062971115,
0.6176126003265381,
-0.49267882108688354,
0.45188334584236145,
-0.003627229481935501,
0.16521798074245453,
-0.014056120067834854,
0.4809516370296478,
0.3415844440460205,
0.12575742602348328,
0.3665904402732849,
0.09083159267902374,
0.2661989629268646,
0.41685593128204346,
0.1795765459537506,
-0.38351011276245117,
-0.7729432582855225,
0.32689473032951355,
0.40597003698349,
-0.4040578007698059,
0.15755897760391235,
0.046488385647535324,
0.09452258050441742,
-0.24132494628429413,
0.0773722231388092,
-0.16423097252845764,
0.1319761574268341,
-0.15417134761810303,
-0.17207416892051697,
0.46507978439331055,
-0.21349194645881653,
0.172403022646904,
0.014079630374908447,
-0.07295705378055573,
-0.01964208483695984,
0.2851194441318512,
-0.18888889253139496,
-0.1902800351381302,
-0.3847341239452362,
0.19928693771362305,
0.11758174002170563,
0.31360116600990295,
-0.21441181004047394,
0.14068059623241425,
0.17024442553520203,
0.013551514595746994,
0.2077639251947403,
0.4880633056163788,
0.6151871085166931,
0.04580327123403549,
0.2123408317565918,
0.04077260568737984,
0.15670675039291382,
-0.021197738125920296,
-0.22750593721866608,
0.24169792234897614,
-0.12720602750778198,
-0.14024218916893005,
0.1282976269721985,
0.1625058352947235,
0.010919013060629368,
0.08442290127277374,
0.1475851684808731,
0.17682065069675446,
-0.36245524883270264,
-0.12455035001039505,
0.018037283793091774,
-0.0987357497215271,
-0.03877308964729309,
0.16793787479400635,
-0.2236952781677246,
-0.0650022029876709,
0.5706329941749573,
-0.00860284361988306,
0.1929667592048645,
-0.11905613541603088,
0.08423639833927155,
-0.12752003967761993,
0.45128685235977173,
0.1960032880306244,
0.012287590652704239,
-0.2609117925167084,
0.018416307866573334,
-0.7642449736595154,
-0.06484246999025345,
-0.37089696526527405,
0.21496321260929108,
0.01959928125143051,
0.19428613781929016,
-0.13663604855537415,
0.027583828195929527,
0.04459550231695175,
-0.1766606569290161,
-0.14152391254901886,
0.16898886859416962,
-0.2013433277606964,
-0.05423371121287346,
-0.09010882675647736,
-0.18997043371200562,
0.02240721508860588,
-0.2785153090953827,
0.11218385398387909,
0.040068961679935455,
0.010265495628118515,
0.039389051496982574,
0.024368874728679657,
0.24304166436195374,
0.15247783064842224,
0.4254673421382904,
0.12095146626234055,
0.4215008318424225,
0.2823092043399811,
0.0887165367603302,
-0.394535094499588,
-0.271237850189209,
-0.26112985610961914,
0.2192794382572174,
0.04997338354587555,
-0.06041643023490906,
-0.5520473122596741,
0.10472982376813889,
-0.11746667325496674,
0.13393796980381012,
-0.10223668813705444,
-0.20001372694969177,
0.11630191653966904,
-0.24598126113414764,
-0.07091701030731201,
0.3233182430267334,
0.046384502202272415,
0.35678786039352417,
0.047515735030174255,
0.40303221344947815,
-0.45116686820983887,
-0.0404336154460907,
0.3104496896266937,
-0.2887722849845886,
-0.20978225767612457,
-0.08256623893976212,
0.2860710620880127,
0.012439504265785217,
-0.20904196798801422,
-0.4489826261997223,
0.06663588434457779,
0.43740129470825195,
-0.2764774262905121,
-0.08162452280521393,
0.15402141213417053,
0.01560083869844675,
0.0642775148153305,
-0.040562428534030914,
0.13214023411273956,
0.05444472283124924,
-0.12220395356416702,
0.23349851369857788,
-0.27427464723587036
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | We're using a locking mechanism to prevent two processes from writing at the same time. The locking is based on the `filelock` module.
Also directories that are being written use a suffix ".incomplete" so that reading is not possible on a dataset being written.
Do you think you could provide a simple code to reproduce the race condition you experienced ? | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 61 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
We're using a locking mechanism to prevent two processes from writing at the same time. The locking is based on the `filelock` module.
Also directories that are being written use a suffix ".incomplete" so that reading is not possible on a dataset being written.
Do you think you could provide a simple code to reproduce the race condition you experienced ? | [
-0.19675293564796448,
0.11761045455932617,
-0.08972488343715668,
0.35525548458099365,
0.1577596813440323,
0.15526747703552246,
0.1879121959209442,
0.16086405515670776,
0.3102246820926666,
-0.1881493777036667,
0.19101926684379578,
0.01797320507466793,
-0.27344897389411926,
0.026845073327422142,
-0.2476356327533722,
0.40495187044143677,
0.12672853469848633,
-0.0034804567694664,
-0.14057821035385132,
0.01794593036174774,
0.04593364894390106,
0.044799480587244034,
-0.10375727713108063,
-0.0012469813227653503,
-0.4769836664199829,
-0.20354874432086945,
0.09598854184150696,
0.1866525411605835,
-0.03996431827545166,
-0.5564549565315247,
0.30198055505752563,
0.45023244619369507,
0.06780393421649933,
0.5293136835098267,
-0.0001150939569924958,
-0.12798498570919037,
0.2920047640800476,
-0.05317189544439316,
-0.2578074336051941,
-0.07266633212566376,
-0.5385324954986572,
-0.40822476148605347,
0.24712206423282623,
-0.14691191911697388,
-0.08555403351783752,
-0.08139216154813766,
0.14382652938365936,
-0.8633800745010376,
0.5533199906349182,
0.22624847292900085,
0.18475674092769623,
0.04903848469257355,
-0.3496801257133484,
0.09530626237392426,
0.0084356889128685,
0.029179614037275314,
-0.04816149175167084,
0.07148002088069916,
0.43451017141342163,
-0.2140531688928604,
-0.1860690414905548,
0.32168829441070557,
-0.2358110547065735,
0.2497454434633255,
0.4829367399215698,
0.05748013034462929,
-0.18651705980300903,
-0.28848037123680115,
0.13421186804771423,
0.017499178647994995,
0.7710599899291992,
-0.43935492634773254,
-0.12255091220140457,
-0.33440592885017395,
-0.06875582784414291,
-0.33368417620658875,
0.32061469554901123,
-0.072834812104702,
-0.033972494304180145,
0.2561247646808624,
-0.4723565876483917,
-0.04517316818237305,
0.00785815715789795,
-0.16586405038833618,
0.03765256702899933,
-0.09197086095809937,
-0.12534181773662567,
0.03739612549543381,
-0.11798524856567383,
0.12160641700029373,
0.5495468378067017,
-0.5747790932655334,
0.01100166141986847,
0.22914503514766693,
-0.544428288936615,
-0.0410543791949749,
0.032434504479169846,
0.4762229323387146,
-0.12413248419761658,
0.12483866512775421,
-0.011014495976269245,
0.05574280768632889,
-0.04005376994609833,
0.1130375862121582,
0.36804261803627014,
0.22389279305934906,
0.12154310941696167,
0.23142018914222717,
0.21832512319087982,
-0.1693473607301712,
-0.20751066505908966,
-0.054774075746536255,
0.07305479794740677,
-0.3701848089694977,
0.5901764035224915,
0.07537354528903961,
0.14061589539051056,
-0.3174619972705841,
-0.39904606342315674,
0.2899317741394043,
-0.01976625807583332,
-0.09111979603767395,
0.12246942520141602,
0.14684762060642242,
-0.05523597076535225,
-0.2533988058567047,
-0.01594284549355507,
-0.009425342082977295,
-0.278545618057251,
-0.14501813054084778,
-0.1850530356168747,
-0.11829975247383118,
-0.3526630103588104,
-0.06796620041131973,
0.16084927320480347,
-0.16221068799495697,
-0.08025434613227844,
0.4727271795272827,
-0.029606588184833527,
-0.14806917309761047,
0.2859728932380676,
-0.10990113019943237,
0.09465791285037994,
0.21314603090286255,
-0.1637275516986847,
0.32567068934440613,
0.41626739501953125,
-0.07924699038267136,
-0.17198237776756287,
0.313536673784256,
-0.3567284941673279,
-0.24600577354431152,
0.029870588332414627,
0.12212416529655457,
-0.5536226034164429,
-0.04034707695245743,
0.01362263411283493,
0.09557714313268661,
0.475046306848526,
0.0389859713613987,
0.24956026673316956,
-0.13826847076416016,
-0.292318731546402,
-0.19060994684696198,
-0.04436194524168968,
0.7311727404594421,
-0.5330131649971008,
0.12850992381572723,
-0.13964897394180298,
-0.028640106320381165,
0.14456842839717865,
0.28419390320777893,
-0.296282023191452,
0.1323598325252533,
-0.21155332028865814,
-0.13106271624565125,
0.05731344223022461,
-0.11848534643650055,
-0.4381595253944397,
0.17429594695568085,
-0.16783568263053894,
0.4191296398639679,
0.21834516525268555,
0.3029730021953583,
0.04685379937291145,
-0.043120454996824265,
0.05224474519491196,
-0.07611417025327682,
0.04602702707052231,
-0.22444306313991547,
-0.1492370367050171,
-0.33161410689353943,
0.22199951112270355,
-0.10101650655269623,
0.04537441208958626,
0.010490886867046356,
0.006976097822189331,
-0.14551156759262085,
0.14695578813552856,
-0.0052154287695884705,
0.1594037562608719,
0.3471343517303467,
0.06702754646539688,
0.23492537438869476,
0.016208792105317116,
-0.13932573795318604,
-0.43021854758262634,
0.38243937492370605,
0.17002369463443756,
-0.32734400033950806,
-0.07641632854938507,
-0.168244868516922,
-0.27419400215148926,
-0.15067248046398163,
-0.41960105299949646,
-0.06486532092094421,
0.05592856556177139,
-0.16326867043972015,
-0.09973537921905518,
0.006389230489730835,
-0.05818641185760498,
0.7144824862480164,
-0.3550774157047272,
-0.1178707480430603,
-0.17873874306678772,
0.16542312502861023,
-0.06951365619897842,
-0.06506513059139252,
-0.12825754284858704,
0.016238268464803696,
0.16773973405361176,
0.08843451738357544,
0.040156807750463486,
0.1977183222770691,
0.14375893771648407,
0.4981750249862671,
-0.017399094998836517,
0.40182721614837646,
0.02887885458767414,
0.04210665449500084,
0.11493677645921707,
0.05802289396524429,
0.11003914475440979,
-0.09026288986206055,
-0.21577966213226318,
0.40761107206344604,
-0.31880730390548706,
0.07715913653373718,
-0.22221429646015167,
-0.17668035626411438,
0.07086282968521118,
-0.12014545500278473,
0.0369202196598053,
-0.05322343111038208,
0.3261001408100128,
0.09336186945438385,
0.039437051862478256,
0.2987612783908844,
-0.11404061317443848,
0.15425729751586914,
0.35549330711364746,
0.1300944983959198,
0.1081676185131073,
-0.0364469438791275,
0.0031141191720962524,
-0.10818829387426376,
0.08849085122346878,
0.3828623592853546,
0.44149380922317505,
0.1244363859295845,
0.13646838068962097,
0.05070142447948456,
-0.05798432230949402,
-0.2591860294342041,
0.31136205792427063,
-0.1765066534280777,
-0.02997639775276184,
0.28077179193496704,
0.08835572004318237,
-0.18503437936306,
-0.2827691435813904,
-0.13102470338344574,
0.1508902758359909,
0.26867449283599854,
-0.4140032231807709,
0.18922409415245056,
-0.4363933503627777,
-0.006558496505022049,
-0.2460869550704956,
0.17565996944904327,
-0.11342459917068481,
-0.25154128670692444,
0.04809553548693657,
0.3083198070526123,
0.16184331476688385,
-0.00877547636628151,
-0.36336350440979004,
0.18620765209197998,
-0.08625349402427673,
-0.029283950105309486,
-0.11678977310657501,
-0.27549922466278076,
-0.17711609601974487,
0.0540669821202755,
0.2507050931453705,
0.04938674345612526,
0.24071405827999115,
0.03578195720911026,
-0.05559433996677399,
-0.17267200350761414,
0.08690211921930313,
-0.1923733651638031,
0.0038504861295223236,
0.3356836438179016,
-0.1077345609664917,
0.09451410919427872,
-0.07957421243190765,
-0.011685465462505817,
-0.14738775789737701,
0.0740211084485054,
-0.0783887580037117,
-0.12551575899124146,
0.07725191861391068,
0.03606483340263367,
-0.10966292023658752,
-0.12800392508506775,
-0.30823731422424316,
-0.18410463631153107,
-0.07272516191005707,
-0.09175106883049011,
0.01081676036119461,
0.4160492718219757,
0.04772455617785454,
0.008280581794679165,
0.08061940968036652,
-0.09691733866930008,
-0.46769800782203674,
-0.3725501000881195,
0.15799732506275177,
0.07147033512592316,
-0.12430459260940552,
0.038348693400621414,
0.1377868801355362,
0.10916599631309509,
0.06395166367292404,
-0.49748319387435913,
-0.06470724940299988,
-0.21504923701286316,
0.12650713324546814,
0.07881332188844681,
-0.056757137179374695,
0.3888297975063324,
0.10915754735469818,
-0.03494701534509659,
-0.21984094381332397,
0.12280341982841492,
0.05524786189198494,
-0.22243458032608032,
0.18762046098709106,
-0.069627545773983,
0.13014782965183258,
0.09807910025119781,
0.9211751222610474,
0.44213056564331055,
-0.14901210367679596,
0.1426527202129364,
0.036785852164030075,
0.5512973666191101,
0.07146645337343216,
-0.28810688853263855,
-0.2727803587913513,
-0.20127564668655396,
-0.5301856994628906,
0.07370267808437347,
-0.12224671989679337,
0.12101991474628448,
0.16226620972156525,
0.25639501214027405,
-0.02452288195490837,
-0.26345017552375793,
0.0854230597615242,
-0.3224432170391083,
0.30556896328926086,
0.11760878562927246,
-0.11358557641506195,
-0.13866089284420013,
-0.15945270657539368,
-0.2369191199541092,
0.3065064549446106,
0.18028050661087036,
-0.06423329561948776,
-0.27458998560905457,
-0.0641612783074379,
-0.32040125131607056,
0.19765159487724304,
0.009216093458235264,
0.13922002911567688,
-0.33404219150543213,
0.2803924083709717,
0.30668210983276367,
0.10703571140766144,
0.5290559530258179,
-0.46737515926361084,
0.11542259901762009,
0.2394135296344757,
0.13148441910743713,
-0.09818747639656067,
-0.12507358193397522,
-0.15518327057361603,
0.3858981728553772,
0.12223681807518005,
0.1415536254644394,
0.12976282835006714,
-0.12073078751564026,
-0.33528852462768555,
0.029977615922689438,
-0.17024259269237518,
-0.271711528301239,
-0.3003404438495636,
-0.05134928226470947,
-0.22292901575565338,
0.2612917423248291,
0.16748178005218506,
-0.10902334004640579,
-0.3220363259315491,
-0.1244567334651947,
-0.11820337176322937,
0.2126157581806183,
0.265846848487854,
-0.012299850583076477,
0.2714410722255707,
0.040720291435718536,
0.20278191566467285,
0.33922332525253296,
-0.33853304386138916,
0.2675186097621918,
0.41624173521995544,
0.06382949650287628,
0.03016708418726921,
0.07783117890357971,
0.02542950212955475,
0.0431312695145607,
0.38927772641181946,
-0.2104761302471161,
0.36025795340538025,
0.31591305136680603,
-0.22289396822452545,
-0.4493180811405182,
-0.18460223078727722,
0.1863557994365692,
0.34591102600097656,
-0.23177564144134521,
-0.5013899803161621,
0.3324222266674042,
0.20900173485279083,
-0.2888942062854767,
0.3288910984992981,
-0.22535951435565948,
-0.3025457561016083,
-0.06794960796833038,
0.08774780482053757,
0.8110820055007935,
-0.08093211054801941,
0.1577160507440567,
-0.10471055656671524,
-0.32333844900131226,
0.40599629282951355,
-0.23270553350448608,
0.20797660946846008,
-0.25319936871528625,
-0.25498807430267334,
-0.16022589802742004,
-0.23445995151996613,
0.47297385334968567,
0.18055208027362823,
-0.11038754880428314,
0.30758315324783325,
-0.45792698860168457,
0.3586801588535309,
-0.19057394564151764,
0.11034156382083893,
-0.24522876739501953,
0.09997150301933289,
0.03346387296915054,
0.16644060611724854,
-0.029446259140968323,
0.3087552785873413,
-0.15835803747177124,
0.12986735999584198,
0.08570438623428345,
0.24192334711551666,
-0.49655240774154663,
-0.12608973681926727,
0.028394199907779694,
0.26367002725601196,
-0.3742275536060333,
-0.40507322549819946,
0.42804571986198425,
0.27670130133628845,
0.3951696753501892,
0.08718952536582947,
-0.22251932322978973,
0.3622687757015228,
0.19293835759162903,
0.12357594072818756,
-0.134628027677536,
-0.15451061725616455,
0.1473846286535263,
0.13906481862068176,
-0.3111172616481781,
0.0902867317199707,
-0.04509403929114342,
-0.15977278351783752,
0.043238863348960876,
0.30935484170913696,
0.12021228671073914,
-0.34978365898132324,
-0.22507701814174652,
0.22662068903446198,
0.1959669291973114,
0.09313139319419861,
0.12342537939548492,
0.1805717647075653,
0.23320554196834564,
0.3488672077655792,
-0.5268521308898926,
-0.28410810232162476,
-0.060097161680459976,
0.45901644229888916,
0.5724374651908875,
-0.14699946343898773,
0.5827163457870483,
-0.036185067147016525,
-0.30931413173675537,
-0.20248547196388245,
-0.11360608041286469,
0.11539950966835022,
-0.14371204376220703,
0.14653275907039642,
-0.06355059891939163,
0.23936794698238373,
0.10571166127920151,
0.05750492215156555,
0.12361402064561844,
0.042645733803510666,
-0.1881808489561081,
-0.22672006487846375,
-0.22508707642555237,
-0.1304013878107071,
-0.07954330742359161,
0.4237508475780487,
-0.13072025775909424,
-0.12495933473110199,
-0.15476204454898834,
0.046299371868371964,
-0.28899064660072327,
0.07837428897619247,
-0.22328083217144012,
0.10124398022890091,
0.19137458503246307,
-0.09362597018480301,
0.10945159196853638,
-0.3080520033836365,
-0.10404522716999054,
-0.012683745473623276,
-0.39798352122306824,
-0.16932162642478943,
0.020396742969751358,
0.1602523773908615,
-0.13824716210365295,
-0.23114919662475586,
0.055858008563518524,
-0.3819752335548401,
0.038037944585084915,
-0.05331454053521156,
0.12504680454730988,
0.4172589182853699,
0.057987961918115616,
-0.027196411043405533,
-0.033934127539396286,
-0.030623994767665863,
-0.25231096148490906,
-0.16756263375282288,
-0.13540805876255035,
0.029907330870628357,
0.2597558796405792,
0.19470232725143433,
0.03518484905362129,
0.17115476727485657,
-0.30195266008377075,
0.2385362684726715,
0.2598297595977783,
0.19493398070335388,
0.1614035964012146,
-0.14596928656101227,
0.014477189630270004,
0.30869361758232117,
0.45759832859039307,
0.15887755155563354,
-0.14883475005626678,
-0.3826073408126831,
0.03549693524837494,
0.16785874962806702,
-0.14445370435714722,
-0.20389404892921448,
0.1804099678993225,
0.12597164511680603,
-0.1261831670999527,
0.18468666076660156,
0.42934098839759827,
0.06877581775188446,
0.33593034744262695,
0.13705182075500488,
0.6464175581932068,
-0.41570448875427246,
0.40200838446617126,
-0.021449405699968338,
0.12414859235286713,
-0.13967038691043854,
0.4943688213825226,
0.17022499442100525,
0.1256910264492035,
0.49026840925216675,
0.20147311687469482,
0.12945187091827393,
0.5204965472221375,
0.2998254895210266,
-0.5431532859802246,
-0.6889320015907288,
0.27382707595825195,
0.348874568939209,
-0.3763980269432068,
0.24237528443336487,
0.02016867697238922,
0.0024437755346298218,
-0.2609206736087799,
0.167876735329628,
-0.13819250464439392,
0.17915990948677063,
-0.15436479449272156,
-0.16345152258872986,
0.5487617254257202,
-0.2669770121574402,
0.11584468185901642,
0.0672508031129837,
-0.006779085844755173,
0.18630456924438477,
0.18220201134681702,
-0.12886230647563934,
-0.06842207908630371,
-0.4192675054073334,
0.2929188907146454,
0.2478068768978119,
0.35989558696746826,
-0.25450649857521057,
0.12314755469560623,
0.09961550682783127,
-0.03989093005657196,
0.11496791243553162,
0.38051027059555054,
0.5170988440513611,
0.0935729444026947,
0.18125014007091522,
0.051707975566387177,
0.057783711701631546,
0.013683879747986794,
-0.18437202274799347,
0.3988666236400604,
-0.11648163199424744,
-0.05926832929253578,
0.010174155235290527,
0.11275751888751984,
-0.009359495714306831,
0.08282310515642166,
0.1456761360168457,
0.04659762233495712,
-0.4272492527961731,
0.01604563742876053,
0.15581580996513367,
-0.044878702610731125,
0.023387465626001358,
0.22686049342155457,
-0.2670724391937256,
-0.13728481531143188,
0.6190409064292908,
0.012345576658844948,
0.21944096684455872,
-0.16159267723560333,
0.07178898900747299,
-0.09207884967327118,
0.3734671473503113,
0.18229298293590546,
0.14868925511837006,
-0.3880922496318817,
-0.045899953693151474,
-0.763544499874115,
-0.057960398495197296,
-0.43321356177330017,
0.06151133030653,
0.03750593215227127,
0.14874905347824097,
-0.21460121870040894,
-0.01091393455862999,
0.16400137543678284,
-0.09928610920906067,
-0.28246164321899414,
0.0789489597082138,
-0.1491817981004715,
-0.03274345025420189,
-0.07189571857452393,
-0.24042585492134094,
-0.17486965656280518,
-0.3282742202281952,
0.32160189747810364,
-0.02231135591864586,
0.05366457253694534,
-0.0545274093747139,
-0.10204119980335236,
0.19529488682746887,
-0.0020405463874340057,
0.36353054642677307,
0.1444205790758133,
0.4088544547557831,
0.22957468032836914,
0.06692320108413696,
-0.3549906015396118,
-0.22115018963813782,
-0.2582736015319824,
0.20484498143196106,
0.0921684205532074,
0.13152381777763367,
-0.6213534474372864,
-0.1107708215713501,
-0.16443856060504913,
0.3291623294353485,
0.012251526117324829,
-0.20068548619747162,
0.03995499014854431,
-0.1441812366247177,
-0.1794247329235077,
0.4260331988334656,
-0.03491316735744476,
0.3897732198238373,
0.15825912356376648,
0.43758803606033325,
-0.39427608251571655,
-0.0755254477262497,
0.22758880257606506,
-0.3375062644481659,
-0.3425864279270172,
-0.024161014705896378,
0.22516705095767975,
0.10198116302490234,
-0.15750569105148315,
-0.40659719705581665,
-0.040634382516145706,
0.4557797908782959,
-0.2565910518169403,
-0.05416736751794815,
0.21292974054813385,
-0.0525505356490612,
0.06687945127487183,
0.02486201748251915,
0.17614218592643738,
0.07816315442323685,
-0.12096910923719406,
0.18817201256752014,
-0.29548490047454834
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | I can provide details about the code I'm running (it's really-really close to some official samples from the huggingface transformers examples, I can point to the exact sample file, I kept a record of that). I can also describe in which conditions this race occurs (I'm convinced it has to do with forcing the redownloading of the dataset, I've been running hundreds of experiments before and didn't have a problem before I forced the redownload). I also can provide samples of the different stack errors I get and some details about the level of concurrency of jobs I was running. I can also try to imagine how the race manifests (I'm fairly sure that it's a combo of one job cleaning up and another job being in the middle of the run).
However, I have to cleanup all this to make sure I'm no spilling any info I shouldn't be spilling. I'll try to do it by the end of the week, if you think all this is helpful.
For now, I have a workaround. Don't use forcing redownloading. And to be ultra careful (although I don't think this is a problem), I run a series of jobs that will prepare the datasets and I know there is no concurrency wrt the dataset. Once that's done (and I believe even having multiple jobs loading the datasets at the same time doesn't create problems, as long as REUSE_DATASET_IF_EXISTS is the policy for loading the dataset, so the filelock mechanism you're using is working in that scenario), the prepared datasets will be reused, no race possible in any way.
Thanks for all the details you provided, it helped me understand the underlying implementation and coming up with workarounds when I ran into issues. | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 291 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
I can provide details about the code I'm running (it's really-really close to some official samples from the huggingface transformers examples, I can point to the exact sample file, I kept a record of that). I can also describe in which conditions this race occurs (I'm convinced it has to do with forcing the redownloading of the dataset, I've been running hundreds of experiments before and didn't have a problem before I forced the redownload). I also can provide samples of the different stack errors I get and some details about the level of concurrency of jobs I was running. I can also try to imagine how the race manifests (I'm fairly sure that it's a combo of one job cleaning up and another job being in the middle of the run).
However, I have to cleanup all this to make sure I'm no spilling any info I shouldn't be spilling. I'll try to do it by the end of the week, if you think all this is helpful.
For now, I have a workaround. Don't use forcing redownloading. And to be ultra careful (although I don't think this is a problem), I run a series of jobs that will prepare the datasets and I know there is no concurrency wrt the dataset. Once that's done (and I believe even having multiple jobs loading the datasets at the same time doesn't create problems, as long as REUSE_DATASET_IF_EXISTS is the policy for loading the dataset, so the filelock mechanism you're using is working in that scenario), the prepared datasets will be reused, no race possible in any way.
Thanks for all the details you provided, it helped me understand the underlying implementation and coming up with workarounds when I ran into issues. | [
-0.2184482216835022,
-0.09565658867359161,
-0.01374091301113367,
0.3255730867385864,
0.14435270428657532,
0.04012278467416763,
0.2102063149213791,
-0.0006144829094409943,
0.28918221592903137,
-0.23899398744106293,
-0.017255490645766258,
-0.122287817299366,
-0.21927717328071594,
0.06673618406057358,
-0.08926775306463242,
0.3100433647632599,
0.11535122245550156,
-0.04676593840122223,
-0.20458537340164185,
0.026150353252887726,
-0.09796078503131866,
0.002709014341235161,
-0.07170373201370239,
0.07355917990207672,
-0.5078134536743164,
-0.15200625360012054,
0.17913325130939484,
0.13393034040927887,
0.10757078975439072,
-0.5074863433837891,
0.46599286794662476,
0.33329257369041443,
0.17598430812358856,
0.5821762084960938,
-0.0001166995643870905,
0.04387994855642319,
0.2641132175922394,
-0.05019211396574974,
-0.2653786242008209,
0.08825173228979111,
-0.2523036301136017,
-0.2569722831249237,
0.21329273283481598,
-0.04933420196175575,
-0.10886252671480179,
0.015741312876343727,
0.13501136004924774,
-0.6665105819702148,
0.7769579887390137,
0.19391027092933655,
0.18872857093811035,
0.224013552069664,
-0.37267979979515076,
0.05924025923013687,
0.049223173409700394,
0.20280909538269043,
-0.029978789389133453,
-0.05930143967270851,
0.3182840049266815,
-0.1498449295759201,
-0.2916330397129059,
0.3643891215324402,
-0.13998818397521973,
0.2117864191532135,
0.5098318457603455,
-0.016847528517246246,
-0.27289262413978577,
-0.20459243655204773,
0.17505091428756714,
0.13558059930801392,
0.6188477873802185,
-0.22017887234687805,
-0.2451946884393692,
-0.4416950047016144,
-0.24972698092460632,
-0.29144492745399475,
0.28398704528808594,
-0.07840298861265182,
-0.020753584802150726,
0.2485283762216568,
-0.5805150866508484,
-0.08920444548130035,
-0.01744478940963745,
-0.26913559436798096,
-0.04595315456390381,
-0.009222261607646942,
-0.23774556815624237,
0.17769163846969604,
0.07244253903627396,
0.1365375816822052,
0.46825510263442993,
-0.40043845772743225,
0.05280099809169769,
0.14643579721450806,
-0.5663057565689087,
-0.0044936686754226685,
0.18407998979091644,
0.4157847464084625,
-0.023924726992845535,
0.09964749962091446,
-0.11346055567264557,
0.006555397063493729,
-0.07794155180454254,
-0.06951186805963516,
0.44415125250816345,
0.33846449851989746,
-0.135004460811615,
0.17967014014720917,
0.2509446144104004,
0.011508610099554062,
-0.07482655346393585,
-0.044779129326343536,
0.1517450511455536,
-0.31780582666397095,
0.4623068571090698,
0.02691386267542839,
0.21132834255695343,
-0.3225101828575134,
-0.3603185713291168,
0.09802699834108353,
0.14305713772773743,
-0.13059449195861816,
0.1650647222995758,
0.22280529141426086,
-0.0674743726849556,
-0.11749369651079178,
0.015591640025377274,
-0.09157494455575943,
-0.3483349680900574,
-0.30604925751686096,
-0.23443672060966492,
-0.1986524611711502,
-0.32939788699150085,
0.08836205303668976,
0.19225530326366425,
-0.24327078461647034,
-0.08377087861299515,
0.28863951563835144,
0.21137498319149017,
-0.13933616876602173,
0.0559377521276474,
-0.020942911505699158,
0.13516870141029358,
0.3564774692058563,
-0.31130272150039673,
0.33318236470222473,
0.3844086825847626,
0.003946337848901749,
-0.1590268611907959,
0.14579680562019348,
-0.24206337332725525,
-0.41221296787261963,
0.09115499258041382,
0.06090078502893448,
-0.586132824420929,
0.004657343029975891,
-0.2381560206413269,
0.10792328417301178,
0.49210938811302185,
0.1390795260667801,
0.16396449506282806,
-0.15101772546768188,
-0.14338958263397217,
-0.14910301566123962,
-0.0015661753714084625,
0.7684628367424011,
-0.4081897735595703,
-0.034413792192935944,
-0.12293476611375809,
0.028287287801504135,
0.11701765656471252,
0.36220550537109375,
-0.5105871558189392,
0.13869787752628326,
-0.1987219601869583,
-0.25037652254104614,
-0.16045904159545898,
-0.28738054633140564,
-0.45580700039863586,
0.12847338616847992,
-0.07161197811365128,
0.44964566826820374,
0.18000952899456024,
0.07164216041564941,
0.06616479158401489,
-0.1947525590658188,
-0.015145525336265564,
0.018385862931609154,
0.07902658730745316,
-0.0493960976600647,
-0.19384044408798218,
-0.5073307156562805,
0.17706429958343506,
0.014150593429803848,
0.10873310267925262,
0.09267544746398926,
-0.10151656717061996,
-0.04820512607693672,
0.062173083424568176,
-0.11361001431941986,
0.12639963626861572,
0.2767603397369385,
-0.020378921180963516,
0.05383589118719101,
0.05635082349181175,
0.06376867741346359,
-0.7198370695114136,
0.3640690743923187,
0.062196068465709686,
-0.17755559086799622,
-0.06478062272071838,
-0.1762678027153015,
-0.2811447083950043,
-0.051373470574617386,
-0.41521400213241577,
-0.20842936635017395,
-0.007764529436826706,
-0.04536336660385132,
0.09411086142063141,
-0.1766502857208252,
-0.16504371166229248,
0.6631063222885132,
-0.2613235116004944,
-0.03773710876703262,
-0.4285816252231598,
0.20971088111400604,
-0.005617620423436165,
0.11835582554340363,
-0.13021428883075714,
0.004977807402610779,
0.14834174513816833,
-0.04570229351520538,
0.0555209144949913,
0.29901960492134094,
-0.03734338656067848,
0.42311954498291016,
0.056237462908029556,
0.3884788751602173,
0.060231633484363556,
-0.0962391197681427,
0.20314641296863556,
0.03061184100806713,
0.05984383821487427,
0.0012686476111412048,
-0.23506903648376465,
0.37011730670928955,
-0.39147305488586426,
0.22450149059295654,
-0.16871973872184753,
-0.16640396416187286,
0.13371960818767548,
-0.14924590289592743,
-0.08849913626909256,
0.05241715908050537,
0.1954358071088791,
0.14904151856899261,
0.04203425720334053,
0.26487231254577637,
-0.15536460280418396,
0.08308471739292145,
0.3847407102584839,
-0.000049347057938575745,
-0.07164297252893448,
0.024955790489912033,
-0.17664659023284912,
-0.23583781719207764,
0.1340905725955963,
0.41455763578414917,
0.477411687374115,
0.09278841316699982,
0.07332649827003479,
0.02470494993031025,
-0.13162298500537872,
-0.21880625188350677,
0.2385987639427185,
-0.033312492072582245,
-0.006382220424711704,
0.13227979838848114,
0.15015365183353424,
-0.10334152728319168,
-0.507317304611206,
-0.05262136459350586,
0.12995728850364685,
0.24760815501213074,
-0.4868397116661072,
0.35163649916648865,
-0.24265512824058533,
0.017685692757368088,
-0.2625906467437744,
0.08531537652015686,
-0.3560929298400879,
-0.2444312870502472,
0.05349230766296387,
0.203973188996315,
0.08362430334091187,
0.06497490406036377,
-0.16694074869155884,
0.477325975894928,
-0.1676080971956253,
0.012173478491604328,
-0.2627761960029602,
-0.27868378162384033,
-0.23982587456703186,
-0.014107796363532543,
0.22551198303699493,
-0.1726500689983368,
0.2520116865634918,
0.030207036063075066,
0.004055870696902275,
-0.15933652222156525,
-0.012127906084060669,
-0.10621681809425354,
-0.02891494333744049,
0.3015744686126709,
-0.19368907809257507,
0.11970119178295135,
-0.07675881683826447,
-0.1719680279493332,
-0.016015242785215378,
-0.12384828180074692,
-0.06586809456348419,
-0.1261281669139862,
-0.0156723465770483,
0.10328244417905807,
-0.004150327295064926,
-0.12763071060180664,
-0.1971973478794098,
-0.23346443474292755,
0.060940492898225784,
-0.07192713022232056,
-0.11501888930797577,
0.6053469777107239,
-0.02977021411061287,
-0.07196895033121109,
0.05902866646647453,
-0.17172692716121674,
-0.6446000337600708,
-0.3447819948196411,
0.12920929491519928,
0.09169384837150574,
-0.19586341083049774,
0.005527574568986893,
0.09894564002752304,
0.21208970248699188,
0.1458246260881424,
-0.6791309714317322,
0.00028713978826999664,
-0.2181432992219925,
-0.05373740941286087,
0.1720140278339386,
0.05002392828464508,
0.38003993034362793,
0.1637679636478424,
-0.01257345825433731,
-0.00026237592101097107,
-0.09684543311595917,
-0.019953206181526184,
-0.06503615528345108,
0.375119149684906,
-0.07977593690156937,
0.09275645017623901,
0.011571984738111496,
0.9484995007514954,
0.39213308691978455,
-0.19215913116931915,
0.023016680032014847,
0.17805115878582,
0.5541976690292358,
-0.05240338295698166,
-0.36910727620124817,
-0.06386493891477585,
-0.3495132029056549,
-0.40309804677963257,
0.09508156776428223,
-0.07270099222660065,
0.1678202599287033,
0.13967478275299072,
0.39580556750297546,
-0.017740508541464806,
-0.3547946810722351,
0.18078656494617462,
-0.18820449709892273,
0.20428526401519775,
0.17469091713428497,
-0.1109636202454567,
-0.34419259428977966,
-0.20605093240737915,
-0.14910517632961273,
0.17736098170280457,
0.2643490731716156,
-0.05514545738697052,
-0.3965286314487457,
0.07621859014034271,
-0.42069628834724426,
0.3041412830352783,
-0.1695518046617508,
0.1284058541059494,
-0.23364722728729248,
0.11750655621290207,
0.3223250210285187,
0.15500587224960327,
0.6023412346839905,
-0.3451418876647949,
0.022981008514761925,
0.08218029141426086,
-0.054918888956308365,
-0.2506532371044159,
-0.23549790680408478,
-0.06349360942840576,
0.1432368904352188,
0.061196792870759964,
0.21348419785499573,
-0.08734840154647827,
-0.15467259287834167,
-0.051867976784706116,
0.074704609811306,
-0.21562480926513672,
-0.17430539429187775,
-0.36563679575920105,
-0.209966778755188,
-0.21255917847156525,
0.2507585287094116,
0.19316650927066803,
-0.17345479130744934,
-0.33326783776283264,
0.07555702328681946,
-0.11865046620368958,
0.15913552045822144,
0.21758340299129486,
0.04953667148947716,
0.2550603151321411,
0.21730199456214905,
0.03753172233700752,
0.5109981894493103,
-0.21941599249839783,
0.16313613951206207,
0.49035197496414185,
0.0542379692196846,
-0.20912253856658936,
0.0817096084356308,
0.184361070394516,
0.07655840367078781,
0.5475769639015198,
-0.243316188454628,
0.2171187698841095,
0.31719139218330383,
-0.06752915680408478,
-0.5061046481132507,
-0.065404511988163,
0.23107023537158966,
0.3086543083190918,
-0.29624083638191223,
-0.39678388833999634,
0.4350883364677429,
0.16113902628421783,
-0.28267258405685425,
0.21369722485542297,
-0.04329903423786163,
-0.2798188626766205,
0.15051843225955963,
0.09427890926599503,
0.9982909560203552,
-0.19497357308864594,
0.20902422070503235,
-0.019153457134962082,
-0.1586572825908661,
0.6049423813819885,
-0.2817753553390503,
0.2646337151527405,
-0.10857737809419632,
-0.21033623814582825,
-0.11367250233888626,
-0.16722501814365387,
0.2565816342830658,
0.21598169207572937,
-0.05133360996842384,
0.3694308400154114,
-0.2387760579586029,
0.4395720064640045,
-0.1976955682039261,
0.08104418218135834,
0.05632709711790085,
-0.14763028919696808,
-0.151292622089386,
0.14928990602493286,
-0.13855643570423126,
0.4672681391239166,
-0.15251675248146057,
0.10196464508771896,
0.18977439403533936,
0.11932264268398285,
-0.4207965135574341,
-0.0937194675207138,
-0.00538043724372983,
0.25966542959213257,
-0.019594348967075348,
-0.22176773846149445,
0.37195682525634766,
0.23655268549919128,
0.4461590051651001,
-0.08539456129074097,
-0.18389907479286194,
0.32009297609329224,
-0.0009725913405418396,
0.1532411128282547,
-0.12288288027048111,
-0.09111128002405167,
0.2610336244106293,
0.17778700590133667,
-0.32996800541877747,
0.171020045876503,
0.022403575479984283,
-0.3243247866630554,
0.05407238006591797,
0.28937986493110657,
0.043285809457302094,
-0.513839602470398,
0.06320296227931976,
0.3218320608139038,
0.1608249396085739,
0.061960119754076004,
0.08756047487258911,
0.10867349803447723,
0.11391189694404602,
0.3072546124458313,
-0.2990091145038605,
-0.32366323471069336,
-0.11414271593093872,
0.41207414865493774,
0.4970076382160187,
-0.23770847916603088,
0.5076001882553101,
-0.03711069002747536,
-0.21907852590084076,
-0.13930590450763702,
-0.18541878461837769,
0.25266972184181213,
-0.5142334699630737,
0.1806250661611557,
-0.09559327363967896,
0.10756589472293854,
0.11487092077732086,
0.11740085482597351,
0.20296937227249146,
-0.012627430260181427,
-0.2576301693916321,
-0.029042530804872513,
-0.3065875172615051,
-0.005865946412086487,
-0.0665069967508316,
0.3970099985599518,
0.01378365233540535,
-0.06793855130672455,
-0.10329834371805191,
0.1723507046699524,
-0.2670111656188965,
-0.002637056168168783,
-0.2696267366409302,
0.11423757672309875,
0.15284158289432526,
-0.3196128010749817,
0.2932243347167969,
-0.24593114852905273,
-0.14114798605442047,
-0.038636334240436554,
-0.46656888723373413,
-0.13169729709625244,
0.05047694966197014,
0.19202375411987305,
-0.08363088965415955,
-0.29600790143013,
-0.11305399239063263,
-0.1597793698310852,
0.1190347671508789,
-0.1632990837097168,
0.22406135499477386,
0.33599311113357544,
0.028014138340950012,
-0.011308779940009117,
0.049460578709840775,
-0.08278199285268784,
-0.0830925852060318,
-0.08172301948070526,
0.05506204813718796,
0.20352709293365479,
0.39432209730148315,
0.2428923398256302,
-0.0679365023970604,
0.07934786379337311,
-0.33001309633255005,
0.2858983874320984,
0.3381091058254242,
0.21590936183929443,
0.16933268308639526,
-0.26601189374923706,
-0.06385942548513412,
0.1596682071685791,
0.338058739900589,
0.2196957767009735,
-0.09318260103464127,
-0.38793596625328064,
-0.010806752368807793,
0.10764989256858826,
-0.17285150289535522,
-0.12755276262760162,
0.30484965443611145,
0.2739821970462799,
-0.14118395745754242,
0.3339983820915222,
0.42540040612220764,
0.056332409381866455,
0.5450054407119751,
0.1230320855975151,
0.8266121745109558,
-0.4311631917953491,
0.4370396137237549,
-0.03143436089158058,
0.04730147495865822,
-0.03947163745760918,
0.6299883127212524,
0.2780954837799072,
0.24245333671569824,
0.33633458614349365,
0.12223778665065765,
0.0032555777579545975,
0.05693061277270317,
0.3076256811618805,
-0.3858356773853302,
-0.7054357528686523,
0.18177126348018646,
0.47424790263175964,
-0.3341676592826843,
0.1956605613231659,
0.04915032163262367,
0.12312399595975876,
-0.26744046807289124,
0.047626640647649765,
-0.3517281711101532,
0.29569077491760254,
-0.14558452367782593,
-0.27356165647506714,
0.5554335713386536,
-0.19873493909835815,
0.10094143450260162,
0.1675456315279007,
-0.03422493115067482,
-0.027005597949028015,
0.2948554754257202,
-0.20031319558620453,
-0.1536579579114914,
-0.2820436358451843,
0.1737096905708313,
0.1838049292564392,
0.3505779504776001,
-0.1240309625864029,
0.23112627863883972,
0.22196370363235474,
0.025468621402978897,
0.1306251436471939,
0.4619574248790741,
0.5259420871734619,
-0.05160142481327057,
0.08399012684822083,
0.2164376825094223,
0.029877807945013046,
0.10856680572032928,
-0.18616983294487,
0.34022438526153564,
-0.18440139293670654,
-0.05977578088641167,
0.027457386255264282,
0.12029354274272919,
0.013025802560150623,
-0.01481756940484047,
-0.13089165091514587,
0.12233731150627136,
-0.326552152633667,
-0.04601513594388962,
0.029429445043206215,
-0.04921254143118858,
-0.070707306265831,
0.18189069628715515,
-0.28676310181617737,
-0.029051877558231354,
0.5673056840896606,
-0.18336650729179382,
0.256979376077652,
-0.10060526430606842,
0.048773251473903656,
-0.10991925001144409,
0.5449646711349487,
0.34108516573905945,
0.10195036232471466,
-0.29918959736824036,
-0.014667436480522156,
-0.6810793876647949,
-0.07858856767416,
-0.2810334861278534,
0.21899698674678802,
0.1051526814699173,
0.2027108073234558,
-0.11955427378416061,
0.06072689965367317,
0.00046122074127197266,
-0.1750670224428177,
-0.3195897340774536,
-0.010458141565322876,
-0.0973801463842392,
0.01992843486368656,
0.004805661737918854,
-0.06997448951005936,
-0.10381674766540527,
-0.24991509318351746,
0.29844120144844055,
0.23899416625499725,
-0.03543974459171295,
-0.0437825545668602,
0.064372718334198,
0.11098304390907288,
0.0058756619691848755,
0.24295632541179657,
0.2596437633037567,
0.2820841670036316,
0.3239375650882721,
0.0057566799223423,
-0.4033370912075043,
-0.24707730114459991,
-0.18180353939533234,
0.1646515429019928,
0.0001340918242931366,
0.11169159412384033,
-0.4221595227718353,
-0.030358966439962387,
-0.2969038784503937,
0.14511480927467346,
0.1499474197626114,
-0.24670282006263733,
-0.06639962643384933,
-0.16458402574062347,
-0.21456971764564514,
0.29626592993736267,
0.14076291024684906,
0.400262713432312,
0.0999283492565155,
0.39065393805503845,
-0.4157351851463318,
-0.10323432832956314,
0.4054408073425293,
-0.33762308955192566,
-0.32598817348480225,
0.09483011811971664,
0.1858663707971573,
0.12003806233406067,
-0.2982681095600128,
-0.5435610413551331,
0.04486330598592758,
0.2724536061286926,
-0.20360970497131348,
-0.12303662300109863,
0.13261237740516663,
-0.09843380749225616,
0.028857219964265823,
-0.07057983428239822,
0.2866342067718506,
0.09621462970972061,
-0.11289796233177185,
0.24189677834510803,
-0.21906869113445282
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | Hi! I have the same challenge with caching, where the **.cache** folder is required even though it isn't possible for me.
I'd like to run transformers in Snowflake, using Snowpark for Python, this would mean I could provide configurable transformers in real-time for business users without having data leave an environment (for security reasons). With no need for data transfer,n the compute is faster. It is a large use case - is it possible to entirely disable caching in certain scenarios?
@lhoestq ?
| I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 83 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
Hi! I have the same challenge with caching, where the **.cache** folder is required even though it isn't possible for me.
I'd like to run transformers in Snowflake, using Snowpark for Python, this would mean I could provide configurable transformers in real-time for business users without having data leave an environment (for security reasons). With no need for data transfer,n the compute is faster. It is a large use case - is it possible to entirely disable caching in certain scenarios?
@lhoestq ?
| [
-0.09467713534832001,
0.06660035252571106,
-0.023435503244400024,
0.37313735485076904,
0.3858664035797119,
0.11478788405656815,
0.20470580458641052,
-0.023724611848592758,
0.1317998766899109,
-0.15086765587329865,
0.12440095841884613,
0.0604427233338356,
-0.21300449967384338,
0.0339626744389534,
-0.15125279128551483,
0.3005065321922302,
0.09789081662893295,
0.13375499844551086,
-0.2121717631816864,
0.12775368988513947,
0.0011792443692684174,
-0.03557442128658295,
-0.2065400630235672,
0.016300834715366364,
-0.5661315321922302,
-0.24427416920661926,
0.1787440925836563,
-0.13470593094825745,
0.03165144473314285,
-0.37338054180145264,
0.49161607027053833,
0.15766641497612,
0.1474488228559494,
0.3182440400123596,
-0.00011958811228396371,
0.12958964705467224,
0.251775860786438,
-0.09768769890069962,
-0.31962159276008606,
0.11392098665237427,
-0.317057341337204,
-0.24544450640678406,
0.3565850257873535,
-0.12945601344108582,
0.05585908889770508,
0.08779366314411163,
0.16371993720531464,
-0.6004230976104736,
0.5071951150894165,
0.2055647224187851,
0.14636553823947906,
0.1797688603401184,
-0.374392032623291,
0.3034335970878601,
-0.18420034646987915,
0.003527320921421051,
-0.19794553518295288,
-0.08744402229785919,
0.0892130509018898,
-0.08616551756858826,
-0.28094014525413513,
0.28332266211509705,
-0.18935994803905487,
0.23807241022586823,
0.6124255657196045,
0.04405447095632553,
-0.29068616032600403,
-0.36093389987945557,
0.21827226877212524,
0.06035759299993515,
0.8673907518386841,
-0.4305945634841919,
-0.3642672896385193,
-0.34425023198127747,
-0.2075403481721878,
-0.16962669789791107,
0.3166573643684387,
0.018149424344301224,
-0.07830967009067535,
0.2903580963611603,
-0.7362042665481567,
-0.3310920000076294,
-0.14405612647533417,
-0.02192111313343048,
-0.13742443919181824,
0.06572525203227997,
-0.3332864046096802,
0.06419993191957474,
-0.05787112936377525,
-0.0974975973367691,
0.7165234684944153,
-0.5255381464958191,
0.05775391310453415,
0.18211707472801208,
-0.5081066489219666,
-0.2795451283454895,
-0.007631897926330566,
0.3936643600463867,
-0.13332347571849823,
0.20294812321662903,
0.19139273464679718,
0.03582753613591194,
0.022320710122585297,
-0.041014932096004486,
0.38279813528060913,
0.3254563510417938,
-0.02000465989112854,
0.19862310588359833,
0.24512790143489838,
-0.31703945994377136,
-0.008945420384407043,
-0.13879168033599854,
0.14109496772289276,
-0.3209083378314972,
0.3928619921207428,
0.11860324442386627,
0.21839110553264618,
-0.294510155916214,
-0.2490931749343872,
-0.09879346191883087,
-0.012120123952627182,
-0.011401927098631859,
0.11794544756412506,
0.12291745841503143,
0.019991740584373474,
0.11452165246009827,
-0.3127939701080322,
0.041187502443790436,
-0.27944815158843994,
0.016864091157913208,
-0.16629360616207123,
0.03240890055894852,
-0.15136337280273438,
0.16126258671283722,
0.4559895396232605,
-0.28658780455589294,
0.12215650826692581,
0.357636958360672,
0.2301243543624878,
-0.06684137135744095,
0.1573149412870407,
-0.13147911429405212,
0.01636069267988205,
0.35264378786087036,
-0.3255442976951599,
0.2538291811943054,
0.3827894628047943,
0.030964046716690063,
-0.2316698133945465,
0.2271847128868103,
-0.3100687265396118,
-0.44952359795570374,
0.119437575340271,
0.03915984928607941,
-0.6682558655738831,
-0.057732440531253815,
0.0016575604677200317,
-0.09184843301773071,
0.33882978558540344,
0.09063303470611572,
0.2092898041009903,
-0.04005827009677887,
0.1286146193742752,
-0.19779667258262634,
0.011429691687226295,
0.5838109850883484,
-0.3815104067325592,
-0.012515362352132797,
-0.22833453118801117,
-0.056330498307943344,
-0.019035257399082184,
0.3786988854408264,
-0.4956929683685303,
0.1258179247379303,
-0.17656363546848297,
-0.4051794409751892,
0.05113042891025543,
-0.3042578399181366,
-0.34806016087532043,
0.2219609171152115,
0.09414252638816833,
0.23045174777507782,
0.13759416341781616,
0.2650696635246277,
0.12737205624580383,
-0.07380348443984985,
0.005025215446949005,
0.00028063543140888214,
0.15192535519599915,
-0.2122207134962082,
-0.16362504661083221,
-0.5274344086647034,
0.17271645367145538,
-0.061483416706323624,
0.11926466226577759,
0.3074236214160919,
-0.08095663040876389,
0.13137394189834595,
-0.19295749068260193,
-0.0927671492099762,
0.17460303008556366,
0.477075457572937,
0.0015930421650409698,
-0.11406373977661133,
-0.0007612160407006741,
-0.049915559589862823,
-0.6402902007102966,
0.31087520718574524,
0.12044942378997803,
-0.387820303440094,
-0.2055434137582779,
-0.11479903012514114,
0.04464499652385712,
-0.17887158691883087,
-0.18902020156383514,
-0.14663198590278625,
0.033191777765750885,
-0.27423083782196045,
0.14439301192760468,
-0.20902752876281738,
-0.32685741782188416,
0.5827515721321106,
-0.010353539139032364,
-0.07574792206287384,
-0.10996431112289429,
0.19992536306381226,
0.021667050197720528,
0.17352555692195892,
-0.19210772216320038,
-0.03861178457736969,
0.1171080619096756,
0.09292198717594147,
0.11162281036376953,
0.21076714992523193,
-0.18885982036590576,
0.3536222577095032,
0.16346359252929688,
0.5931726098060608,
0.015868406742811203,
-0.1266019493341446,
0.3953758776187897,
-0.06551402807235718,
0.08360759168863297,
0.0035126060247421265,
-0.28554460406303406,
0.5260058641433716,
-0.22271771728992462,
0.3036637008190155,
-0.1252727210521698,
-0.09435811638832092,
0.13496364653110504,
-0.20793625712394714,
-0.04752106964588165,
-0.1448281705379486,
-0.012203436344861984,
0.14242249727249146,
0.1761723756790161,
0.2909691631793976,
-0.10919147729873657,
-0.035497136414051056,
0.18904319405555725,
0.06720156967639923,
-0.024761617183685303,
0.010513253509998322,
-0.24397331476211548,
-0.23341739177703857,
0.12892687320709229,
0.431237131357193,
0.6009780764579773,
0.1055050641298294,
0.04401242733001709,
0.08266523480415344,
0.0751543715596199,
-0.20401927828788757,
0.29127049446105957,
0.07120933383703232,
-0.06949301064014435,
0.023709453642368317,
0.14934611320495605,
-0.05723104253411293,
-0.2874900996685028,
-0.07489013671875,
0.1641717255115509,
0.14081639051437378,
-0.3259774148464203,
0.3078339993953705,
-0.37748491764068604,
-0.1805548369884491,
-0.0816449373960495,
0.2656579613685608,
-0.3598719835281372,
-0.21464642882347107,
0.02428678795695305,
0.16414567828178406,
0.05408039316534996,
0.10566432774066925,
-0.15181462466716766,
0.3626887798309326,
-0.19182321429252625,
-0.3132053315639496,
-0.22701311111450195,
-0.1666584014892578,
-0.026103772222995758,
0.01911820098757744,
0.0826767161488533,
-0.11088263243436813,
0.06495595723390579,
0.06879112869501114,
0.0691089928150177,
-0.4938885569572449,
0.12188412994146347,
0.04796579107642174,
0.19287365674972534,
0.22254663705825806,
-0.2503989338874817,
0.08831804990768433,
-0.09250237047672272,
-0.186002716422081,
-0.11358039826154709,
0.059589117765426636,
0.09651171416044235,
-0.05530128255486488,
-0.09285778552293777,
0.12696614861488342,
-0.07993700355291367,
-0.04188459366559982,
-0.32835254073143005,
-0.22633913159370422,
-0.14884446561336517,
0.09459593892097473,
-0.016202673316001892,
0.4017794728279114,
0.015534202568233013,
0.01893894001841545,
-0.14298905432224274,
-0.22980517148971558,
-0.3087005317211151,
-0.40451520681381226,
0.4214268922805786,
0.1321852207183838,
-0.012320850044488907,
0.15157842636108398,
0.016382776200771332,
0.2889370918273926,
0.30793702602386475,
-0.579854428768158,
-0.0010944521054625511,
-0.3770741820335388,
0.018056664615869522,
0.09013208746910095,
0.026726899668574333,
0.46639934182167053,
0.0781506821513176,
0.02249777503311634,
-0.025970861315727234,
-0.1408005952835083,
-0.11235348135232925,
0.018067561089992523,
0.3746957778930664,
-0.03329702466726303,
-0.049284107983112335,
0.07157908380031586,
1.2683072090148926,
0.26445597410202026,
-0.07170520722866058,
0.03161448612809181,
0.10635076463222504,
0.6880610585212708,
0.029615875333547592,
-0.10138782858848572,
-0.13759906589984894,
-0.2907516658306122,
-0.37815630435943604,
-0.06113132834434509,
0.12706120312213898,
-0.0541766956448555,
0.07964081317186356,
0.29088908433914185,
0.017250679433345795,
-0.34216347336769104,
0.1910092979669571,
-0.426188200712204,
0.3606090843677521,
0.22609129548072815,
-0.07517050951719284,
-0.3764522075653076,
-0.15096992254257202,
-0.2726888060569763,
0.2439347803592682,
0.2947382926940918,
-0.013406649231910706,
-0.22240547835826874,
-0.059010934084653854,
-0.3234739303588867,
0.13532128930091858,
-0.21159052848815918,
0.2416984885931015,
-0.10253383219242096,
0.23120179772377014,
0.19554433226585388,
0.2662718594074249,
0.3659529983997345,
-0.267390638589859,
-0.0909428745508194,
0.20880469679832458,
-0.1527402102947235,
-0.10813120007514954,
-0.1279786378145218,
-0.09975206851959229,
0.1827506124973297,
-0.011294655501842499,
0.3098949193954468,
0.1029149517416954,
-0.2647354304790497,
-0.3073331117630005,
0.25981444120407104,
-0.20453405380249023,
-0.15085642039775848,
-0.18685483932495117,
-0.060173191130161285,
-0.2759213149547577,
-0.0338033065199852,
0.22198903560638428,
-0.1879279762506485,
-0.1687169224023819,
0.14629143476486206,
-0.25983425974845886,
0.14355599880218506,
0.10627169162034988,
-0.06615645438432693,
0.32500895857810974,
-0.040185630321502686,
0.06263744831085205,
0.24494706094264984,
-0.39510276913642883,
0.06023586541414261,
0.3231063783168793,
0.2061031013727188,
-0.005570940673351288,
0.09223006665706635,
0.1656588613986969,
0.11913977563381195,
0.3325176239013672,
-0.4118692874908447,
0.25503066182136536,
0.026185117661952972,
-0.0603158175945282,
-0.27287763357162476,
-0.10704422742128372,
-0.008782332763075829,
0.16793809831142426,
-0.25701189041137695,
-0.43340060114860535,
0.49818775057792664,
0.18757832050323486,
-0.1257990002632141,
0.1292150914669037,
-0.00490221381187439,
-0.22033600509166718,
0.14015695452690125,
0.11409071832895279,
0.7895756363868713,
-0.042221806943416595,
0.35022565722465515,
-0.25147366523742676,
0.06263360381126404,
0.6037164926528931,
-0.32800209522247314,
0.34746313095092773,
-0.024217121303081512,
-0.23921121656894684,
-0.17336124181747437,
-0.2834499180316925,
0.3127354681491852,
0.28436803817749023,
-0.0570538267493248,
0.5115417242050171,
-0.2576398253440857,
0.4064403176307678,
-0.03985419124364853,
-0.0935317650437355,
-0.20220115780830383,
-0.13013531267642975,
0.09364655613899231,
0.13711124658584595,
-0.0927882194519043,
0.43508321046829224,
-0.08195547014474869,
0.04341781139373779,
0.19754895567893982,
0.00960351899266243,
-0.33289241790771484,
-0.17960679531097412,
-0.03224274516105652,
0.26695770025253296,
-0.09747377038002014,
-0.23130346834659576,
0.5072327256202698,
0.41389158368110657,
0.3167170286178589,
0.029883235692977905,
-0.2938649356365204,
0.24920746684074402,
0.07947744429111481,
0.1808418482542038,
-0.12489355355501175,
0.09144169092178345,
0.032266974449157715,
0.10300707072019577,
-0.07749263942241669,
0.09647107124328613,
-0.19848719239234924,
-0.24859650433063507,
0.10909298062324524,
0.27374860644340515,
-0.09921079874038696,
-0.30638587474823,
0.00021717557683587074,
0.2596793472766876,
0.142385333776474,
0.11608164012432098,
0.09953980147838593,
0.15169557929039001,
0.3107210695743561,
0.3539646565914154,
-0.3419337272644043,
-0.2604749798774719,
-0.05440839007496834,
0.3361486494541168,
0.42642825841903687,
-0.26416414976119995,
0.4259597957134247,
-0.40010857582092285,
-0.30979180335998535,
-0.17140784859657288,
-0.05772310867905617,
-0.24869826436042786,
-0.3418591618537903,
0.13906249403953552,
0.041973892599344254,
0.11383865773677826,
0.0020561793353408575,
-0.1108245998620987,
0.1674508899450302,
0.09015808999538422,
-0.40020209550857544,
-0.17375251650810242,
-0.3120283782482147,
0.04981537535786629,
-0.05735411122441292,
0.2675308883190155,
-0.22392317652702332,
-0.02450193092226982,
-0.011616057716310024,
-0.16456246376037598,
-0.24412807822227478,
0.15964297950267792,
-0.2691861093044281,
0.1278219223022461,
-0.006355138495564461,
-0.1380927562713623,
0.1344698667526245,
-0.15507656335830688,
-0.127227783203125,
-0.2121225893497467,
-0.3354550302028656,
-0.11365649849176407,
0.05092471465468407,
0.19941769540309906,
0.14623157680034637,
-0.37612205743789673,
0.021673358976840973,
-0.1124652698636055,
-0.04493280127644539,
-0.13391979038715363,
0.23755717277526855,
0.5356440544128418,
0.07224205881357193,
0.1635141372680664,
-0.0780482143163681,
0.04925474524497986,
-0.3065568208694458,
-0.23401811718940735,
0.04775625839829445,
0.24861553311347961,
0.3152288794517517,
0.3857254385948181,
0.02172393538057804,
0.16438324749469757,
-0.32870224118232727,
0.10536956787109375,
0.042768221348524094,
0.18991389870643616,
0.12441152334213257,
-0.15903635323047638,
0.022888395935297012,
0.09865859895944595,
0.15682649612426758,
0.21861675381660461,
-0.19771450757980347,
-0.13805384933948517,
0.26365384459495544,
0.10227862745523453,
-0.15157128870487213,
-0.1861058473587036,
0.0470472052693367,
0.09020686894655228,
-0.0817406103014946,
0.19743773341178894,
0.3800676465034485,
-0.11183027178049088,
0.6269457936286926,
-0.014446599408984184,
0.7908146977424622,
-0.43851470947265625,
0.4025564193725586,
0.2329658418893814,
0.10921281576156616,
-0.0829751193523407,
0.625664472579956,
0.310730904340744,
0.10885285586118698,
0.5783063769340515,
0.08696211874485016,
-0.0371837392449379,
0.24110066890716553,
0.22537130117416382,
-0.40305715799331665,
-0.598076581954956,
0.25848427414894104,
0.3156602382659912,
-0.24861857295036316,
0.15212473273277283,
-0.010358631610870361,
-0.25184181332588196,
-0.14842016994953156,
0.25935930013656616,
-0.13806945085525513,
0.12640802562236786,
-0.14315196871757507,
-0.1223316341638565,
0.7712324857711792,
-0.2517760396003723,
0.32372185587882996,
0.20351842045783997,
-0.10130468010902405,
-0.19945688545703888,
0.1945945918560028,
-0.06613025069236755,
-0.16210313141345978,
-0.19031161069869995,
0.6135603785514832,
0.22091853618621826,
0.2608392834663391,
-0.11339586973190308,
0.04961574077606201,
0.009026683866977692,
-0.0011412054300308228,
-0.05578279122710228,
0.40738874673843384,
0.3165026009082794,
-0.03768228739500046,
0.2279367744922638,
0.030748113989830017,
0.06832912564277649,
-0.01387049537152052,
-0.09345060586929321,
0.2528289556503296,
-0.07148206233978271,
0.10674525797367096,
0.04290488362312317,
0.08260387182235718,
0.0023942207917571068,
0.05324949696660042,
-0.23929934203624725,
0.12193450331687927,
-0.5080288052558899,
0.1013968363404274,
0.236155167222023,
-0.0564708411693573,
0.109347864985466,
0.2660581171512604,
-0.2869928777217865,
-0.23734959959983826,
0.6228469610214233,
-0.09458068758249283,
0.1772012710571289,
-0.05548519641160965,
0.03519575670361519,
-0.046963851898908615,
0.4001930356025696,
0.1311483234167099,
0.10866538435220718,
-0.25057801604270935,
0.11319684982299805,
-0.5951959490776062,
-0.19937428832054138,
-0.25250422954559326,
0.381509929895401,
0.1491323858499527,
0.09132637828588486,
-0.1829613447189331,
0.16499532759189606,
-0.060841068625450134,
-0.014959791675209999,
-0.20815595984458923,
-0.10797800123691559,
-0.0867018848657608,
0.06593646109104156,
-0.07620508968830109,
0.119667649269104,
-0.13308927416801453,
-0.3421180248260498,
0.15828436613082886,
0.2661288380622864,
-0.014343835413455963,
-0.053784750401973724,
0.09364870190620422,
0.17371638119220734,
-0.045881032943725586,
0.21833039820194244,
0.238625630736351,
0.26635825634002686,
0.3212863504886627,
-0.025271857157349586,
-0.3427373468875885,
-0.24263186752796173,
-0.08942778408527374,
-0.13246923685073853,
0.20398078858852386,
-0.06559451669454575,
-0.5562286376953125,
0.009747765958309174,
-0.21145272254943848,
0.0236914474517107,
-0.035463374108076096,
-0.1147078350186348,
0.0862664207816124,
-0.07037699967622757,
-0.14528128504753113,
0.3082360625267029,
0.07362404465675354,
0.26244068145751953,
-0.06406448036432266,
0.12133187055587769,
-0.41016441583633423,
0.015991156920790672,
0.3337955176830292,
-0.3162972331047058,
-0.3330470025539398,
0.10545765608549118,
0.22468248009681702,
0.14865747094154358,
-0.3053797781467438,
-0.3457385003566742,
0.04016133397817612,
0.3916209638118744,
-0.2789902985095978,
-0.11725910007953644,
0.06382319331169128,
-0.1547815054655075,
-0.07419732213020325,
-0.06639134883880615,
0.3022700846195221,
0.09479399025440216,
-0.016604728996753693,
-0.007206667214632034,
-0.3101041316986084
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | You can try to change the location of the cache folder using the `HF_CACHE_HOME` environment variable, and set a location where you have read/write access. | I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 25 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
You can try to change the location of the cache folder using the `HF_CACHE_HOME` environment variable, and set a location where you have read/write access. | [
-0.05553406849503517,
0.05233955383300781,
-0.09127366542816162,
0.2140350043773651,
0.3289119601249695,
0.19444552063941956,
0.19704419374465942,
0.06822456419467926,
0.18030990660190582,
-0.1208227127790451,
0.04178735613822937,
0.036759424954652786,
-0.1732836216688156,
-0.0334036648273468,
-0.03305414691567421,
0.43540894985198975,
0.12521885335445404,
0.07652869820594788,
-0.10359601676464081,
-0.04827412590384483,
-0.026042290031909943,
0.011456096544861794,
-0.16396334767341614,
0.09585889428853989,
-0.46731552481651306,
-0.11186603456735611,
0.07100946456193924,
0.006499134004116058,
-0.03473638743162155,
-0.5790505409240723,
0.46746426820755005,
0.3250703513622284,
0.1155112236738205,
0.34299010038375854,
-0.00011232733231736347,
0.0465736910700798,
0.19040662050247192,
-0.010162862949073315,
-0.2614564895629883,
0.045670777559280396,
-0.4922616481781006,
-0.40032264590263367,
0.21653024852275848,
-0.044408608227968216,
-0.03464595973491669,
-0.18539561331272125,
0.035125669091939926,
-0.6871446371078491,
0.3920987844467163,
0.38119757175445557,
0.25724682211875916,
-0.12660470604896545,
-0.29235145449638367,
0.07480865716934204,
0.11039204150438309,
0.13311603665351868,
-0.08506882190704346,
-0.0826682597398758,
0.10395210236310959,
-0.1168288066983223,
-0.016005754470825195,
0.35560357570648193,
-0.1251426786184311,
0.3110974133014679,
0.5668014883995056,
0.0039597079157829285,
-0.3118305504322052,
-0.2616655230522156,
0.3257148861885071,
-0.06960880011320114,
0.94569331407547,
-0.3484362065792084,
-0.1766889989376068,
-0.292964905500412,
-0.03913082182407379,
-0.2925527095794678,
0.27847781777381897,
-0.04642938822507858,
0.11031898856163025,
0.18907976150512695,
-0.4329870343208313,
-0.3675355613231659,
-0.09219107031822205,
-0.09581996500492096,
-0.14954620599746704,
-0.06692487001419067,
-0.2948892116546631,
0.039738625288009644,
-0.025934550911188126,
-0.07485885918140411,
0.5343630313873291,
-0.4327896535396576,
-0.0709497332572937,
0.2100338637828827,
-0.4339537024497986,
-0.0309995599091053,
0.14809784293174744,
0.44194820523262024,
-0.10882968455553055,
0.1398455798625946,
0.042885493487119675,
0.03975524753332138,
-0.11968085169792175,
0.03722748905420303,
0.3649967312812805,
0.3470120429992676,
0.10975228250026703,
0.22199735045433044,
0.23088620603084564,
-0.1687105894088745,
-0.17263150215148926,
-0.21753019094467163,
0.12175068259239197,
-0.40616071224212646,
0.5429805517196655,
0.022063199430704117,
0.23876117169857025,
-0.37351322174072266,
-0.3230851888656616,
0.10295906662940979,
0.040797822177410126,
-0.180049866437912,
0.100213922560215,
0.18947458267211914,
-0.015166093595325947,
-0.055158793926239014,
-0.20396849513053894,
0.02273009717464447,
-0.27264517545700073,
-0.13757728040218353,
-0.23341920971870422,
-0.06295251846313477,
-0.2674841582775116,
-0.014578618109226227,
0.20625002682209015,
-0.22387011349201202,
-0.02016565203666687,
0.36772269010543823,
0.15826267004013062,
-0.259208083152771,
0.14830507338047028,
-0.05531811714172363,
0.20789948105812073,
0.31084421277046204,
-0.30512478947639465,
0.2719257175922394,
0.4759504199028015,
-0.04349971562623978,
-0.1942344605922699,
0.28959742188453674,
-0.41094329953193665,
-0.5129496455192566,
0.048269324004650116,
0.15792006254196167,
-0.43264830112457275,
-0.17894762754440308,
-0.12209320813417435,
-0.049333009868860245,
0.34519344568252563,
0.06469593942165375,
0.1561918407678604,
-0.12789732217788696,
-0.18734297156333923,
-0.26080766320228577,
0.05694231390953064,
0.4216284155845642,
-0.6739151477813721,
0.10019335150718689,
-0.30121099948883057,
-0.048913370817899704,
0.09074428677558899,
0.31213805079460144,
-0.4201717972755432,
0.21616649627685547,
-0.21316766738891602,
-0.22385653853416443,
0.07427456229925156,
-0.24664662778377533,
-0.47019267082214355,
0.16995666921138763,
0.17827245593070984,
0.2688049077987671,
0.07594086229801178,
0.06446763873100281,
0.09281011670827866,
0.02562139183282852,
-0.0171898752450943,
-0.10501901805400848,
0.1512051522731781,
-0.20812726020812988,
-0.12953054904937744,
-0.3098095953464508,
0.21092666685581207,
-0.17330344021320343,
0.11717124283313751,
0.14434364438056946,
0.08817210793495178,
-0.14341947436332703,
0.06249505281448364,
-0.10761716961860657,
0.03939082473516464,
0.3786258101463318,
0.15044356882572174,
0.25970184803009033,
0.06152145564556122,
0.035562723875045776,
-0.3536529242992401,
0.3447553515434265,
0.15929274260997772,
-0.4222981035709381,
-0.19917578995227814,
-0.25692200660705566,
-0.22239375114440918,
-0.08791936933994293,
-0.44564637541770935,
-0.1696644127368927,
0.09308210015296936,
0.0035649314522743225,
-0.005691030994057655,
-0.08784227073192596,
-0.16326461732387543,
0.514968752861023,
-0.24091660976409912,
-0.12049004435539246,
-0.10475821793079376,
0.24145136773586273,
-0.029565313830971718,
0.18600530922412872,
-0.21942347288131714,
0.1557992696762085,
0.1787247508764267,
0.09214949607849121,
-0.025731436908245087,
0.24846389889717102,
0.08241955190896988,
0.37839430570602417,
0.11294770240783691,
0.31511056423187256,
-0.050334297120571136,
-0.08812510967254639,
0.33681485056877136,
-0.03040822222828865,
0.09970732033252716,
-0.037897855043411255,
-0.17253530025482178,
0.3011985421180725,
-0.19329242408275604,
0.12915123999118805,
-0.1975594460964203,
-0.20002064108848572,
0.12101224064826965,
-0.0403677336871624,
0.09103940427303314,
-0.22413894534111023,
0.04367633908987045,
0.035903751850128174,
-0.02877010405063629,
0.34295833110809326,
-0.18456816673278809,
0.17655031383037567,
0.3434008061885834,
0.07718123495578766,
-0.03302760422229767,
0.04652731865644455,
-0.0672578439116478,
-0.28271201252937317,
0.16843445599079132,
0.41375529766082764,
0.5016269683837891,
0.1355447620153427,
0.030562127009034157,
0.07937514036893845,
0.062395282089710236,
-0.12273868173360825,
0.29859787225723267,
-0.1452278345823288,
0.021697334945201874,
0.11672531068325043,
0.08614079654216766,
-0.09350825101137161,
-0.3259701132774353,
0.1200600266456604,
0.10604355484247208,
0.25272616744041443,
-0.5240059494972229,
0.25651296973228455,
-0.587851345539093,
-0.05872519314289093,
-0.14187750220298767,
0.13352535665035248,
-0.26875603199005127,
-0.4354322850704193,
-0.03119167685508728,
0.09246094524860382,
0.193816140294075,
0.014609044417738914,
-0.24059872329235077,
0.29339009523391724,
-0.13488268852233887,
0.0004957299679517746,
-0.14481784403324127,
-0.13808497786521912,
-0.20838052034378052,
0.05596069619059563,
0.06523384898900986,
-0.13134077191352844,
0.24666278064250946,
-0.02732500433921814,
0.033350858837366104,
-0.33715537190437317,
0.027572140097618103,
-0.04097086191177368,
0.0884612500667572,
0.30924710631370544,
-0.09947086870670319,
0.02344384789466858,
-0.05044456198811531,
0.004058572463691235,
-0.04043734446167946,
0.0759141594171524,
0.08951473236083984,
-0.07164342701435089,
-0.05362348631024361,
0.09426064044237137,
-0.03085477650165558,
-0.13421416282653809,
-0.4234274923801422,
-0.1952986866235733,
-0.2006300538778305,
0.010816942900419235,
-0.03568277508020401,
0.46280544996261597,
-0.006100919563323259,
-0.012883071787655354,
0.021999416872859,
-0.012295573949813843,
-0.5213986039161682,
-0.49162209033966064,
0.25856807827949524,
-0.13579751551151276,
-0.06083684042096138,
0.21265527606010437,
0.21326136589050293,
0.2986806333065033,
0.01678524538874626,
-0.661793053150177,
-0.02628379315137863,
-0.20626989006996155,
0.07702668011188507,
0.03887447342276573,
0.03598051518201828,
0.20321229100227356,
0.09266254305839539,
-0.0373162217438221,
-0.13230136036872864,
-0.10192625224590302,
-0.1513172686100006,
-0.10684221237897873,
0.31965354084968567,
-0.007925868034362793,
-0.0065224505960941315,
0.0916222482919693,
0.9041484594345093,
0.3836013972759247,
-0.0492248572409153,
0.20643772184848785,
-0.05525004863739014,
0.6437282562255859,
-0.026759877800941467,
-0.3528425395488739,
-0.0780825987458229,
-0.2060094177722931,
-0.3923302888870239,
0.027515657246112823,
-0.0076868534088134766,
0.043397098779678345,
0.209926575422287,
0.2641258239746094,
-0.02941718138754368,
-0.30675432085990906,
0.10371515899896622,
-0.38020095229148865,
0.29903486371040344,
0.14393778145313263,
-0.06102718040347099,
-0.3072715699672699,
-0.18381831049919128,
-0.2213386595249176,
0.19946542382240295,
0.1567443162202835,
-0.008051086217164993,
-0.15643471479415894,
-0.24749428033828735,
-0.2920818626880646,
0.29070746898651123,
-0.12406057119369507,
0.16641436517238617,
-0.26983878016471863,
0.2988959550857544,
0.3398875594139099,
0.2238110601902008,
0.4157145023345947,
-0.4676615595817566,
-0.03672396391630173,
0.24974700808525085,
0.03797782212495804,
-0.08873251080513,
-0.1551857888698578,
0.06395301222801208,
0.359383225440979,
0.007022110745310783,
0.011353522539138794,
0.2674531936645508,
-0.2596386671066284,
-0.11322124302387238,
0.034026436507701874,
-0.18415296077728271,
-0.15714235603809357,
-0.21040019392967224,
-0.13305673003196716,
-0.20663274824619293,
-0.05377902835607529,
-0.042720384895801544,
-0.11010166257619858,
-0.21224628388881683,
0.09669022262096405,
-0.1428327113389969,
0.18097302317619324,
0.1772308498620987,
-0.018307585269212723,
0.32481640577316284,
0.15433630347251892,
-0.01607474498450756,
0.37053972482681274,
-0.09291790425777435,
0.3562557101249695,
0.4984911382198334,
-0.0685088187456131,
-0.09493902325630188,
-0.08865866810083389,
-0.0024427566677331924,
0.19277378916740417,
0.29269182682037354,
-0.3969719111919403,
0.22674095630645752,
0.018104465678334236,
-0.0793386846780777,
-0.3719313442707062,
-0.1211797446012497,
0.2790987193584442,
0.23793740570545197,
-0.21489913761615753,
-0.5762765407562256,
0.406154066324234,
0.16833387315273285,
-0.21889516711235046,
0.11056040227413177,
-0.0023330077528953552,
-0.2982177436351776,
-0.04463944956660271,
0.07283361256122589,
0.719164252281189,
0.06228259205818176,
0.16847160458564758,
-0.09041569381952286,
-0.12857335805892944,
0.4128374755382538,
-0.3078737258911133,
0.27183300256729126,
-0.13790561258792877,
-0.1775786429643631,
-0.16600865125656128,
-0.08839137852191925,
0.3763512372970581,
0.19013196229934692,
-0.1370452344417572,
0.3573904037475586,
-0.3660007119178772,
0.3942633867263794,
-0.2502824664115906,
-0.05871571600437164,
-0.12050268799066544,
0.04033040255308151,
-0.004996649920940399,
0.22946104407310486,
-0.08482494950294495,
0.3666132092475891,
-0.14454111456871033,
0.21016216278076172,
0.3066839873790741,
0.17029741406440735,
-0.40112996101379395,
-0.2092040479183197,
0.04270637780427933,
0.2986904978752136,
-0.15788798034191132,
-0.3341140151023865,
0.39219510555267334,
0.3231402337551117,
0.37923526763916016,
0.05726280435919762,
-0.17472122609615326,
0.24729329347610474,
0.1748422384262085,
0.19358772039413452,
-0.2067919373512268,
0.01983392983675003,
0.23036739230155945,
0.1448335349559784,
-0.38406166434288025,
0.09727782011032104,
-0.06345234811306,
-0.24878662824630737,
0.07952472567558289,
0.3060547709465027,
0.005333598703145981,
-0.5399658679962158,
-0.10289816558361053,
0.25133705139160156,
0.22809752821922302,
0.11773864924907684,
0.1816316843032837,
0.13708612322807312,
0.1904963254928589,
0.4124380648136139,
-0.467794805765152,
-0.3027001619338989,
-0.03871181979775429,
0.2840269207954407,
0.45948323607444763,
-0.09132716059684753,
0.5113943815231323,
-0.1616760939359665,
-0.32514381408691406,
-0.20943689346313477,
-0.00451437383890152,
0.05693601071834564,
-0.08290959894657135,
0.09872537106275558,
0.03415019437670708,
0.3663190007209778,
0.11926894634962082,
-0.0008972026407718658,
0.10436031222343445,
-0.00725526362657547,
-0.26313450932502747,
-0.17092671990394592,
-0.2232518196105957,
-0.053821712732315063,
-0.06199711933732033,
0.4068595767021179,
-0.0929180383682251,
-0.15218430757522583,
0.038360804319381714,
-0.02563423477113247,
-0.3131052255630493,
0.12462559342384338,
-0.18613295257091522,
0.04323628544807434,
0.08656466007232666,
-0.07097513228654861,
0.1631506234407425,
-0.31285810470581055,
-0.023400697857141495,
-0.12479719519615173,
-0.3602622449398041,
-0.20312774181365967,
0.019574008882045746,
0.13636942207813263,
-0.027605175971984863,
-0.1969851553440094,
0.062376875430345535,
-0.3011484742164612,
-0.021199699491262436,
-0.1216585636138916,
0.21988438069820404,
0.4346325397491455,
0.08213106542825699,
0.22529402375221252,
-0.20073933899402618,
-0.2399911880493164,
0.01139376312494278,
-0.09965735673904419,
0.09261179715394974,
0.3519590497016907,
0.32783111929893494,
0.2935444712638855,
-0.10730587691068649,
0.10532374680042267,
-0.3066678047180176,
0.28338855504989624,
0.041577376425266266,
0.12811368703842163,
0.13288207352161407,
-0.36431360244750977,
0.13665249943733215,
0.22086597979068756,
0.3303125202655792,
0.1147191971540451,
-0.23242242634296417,
-0.1996341049671173,
0.06574811041355133,
0.1525270789861679,
-0.1264042854309082,
-0.2983817756175995,
0.15987016260623932,
0.21348437666893005,
-0.14590580761432648,
0.20716023445129395,
0.4969653785228729,
0.023752272129058838,
0.5358995199203491,
0.04162328317761421,
0.605394184589386,
-0.4651086926460266,
0.4209359884262085,
0.11652740836143494,
-0.015496499836444855,
-0.13824108242988586,
0.46276572346687317,
0.44264858961105347,
0.006466388702392578,
0.7303828597068787,
0.10137003660202026,
0.13571128249168396,
0.44288885593414307,
0.20735053718090057,
-0.44240084290504456,
-0.8468706607818604,
0.3491550087928772,
0.36412671208381653,
-0.4121885299682617,
0.12791971862316132,
0.040718089789152145,
0.040021155029535294,
-0.15560287237167358,
0.08038008213043213,
-0.09452435374259949,
0.23407535254955292,
-0.21402844786643982,
-0.14056019484996796,
0.4556308686733246,
-0.19665127992630005,
0.09169451892375946,
0.08776159584522247,
-0.03606322035193443,
-0.07536686956882477,
0.14579567313194275,
-0.17254143953323364,
-0.1521875262260437,
-0.40968450903892517,
0.5304926633834839,
0.024926230311393738,
0.3813745379447937,
-0.15066714584827423,
0.2123977243900299,
-0.1174994558095932,
0.08843906223773956,
0.2497246414422989,
0.35813233256340027,
0.4607529044151306,
0.05428200960159302,
0.2500917911529541,
0.032998695969581604,
-0.01301572099328041,
-0.044498078525066376,
-0.15999670326709747,
0.19999463856220245,
-0.18886619806289673,
-0.00061069056391716,
0.10981222987174988,
0.15748701989650726,
0.02283511683344841,
0.11723846197128296,
-0.001577712595462799,
0.2177877575159073,
-0.4366983473300934,
-0.005288325250148773,
0.24589897692203522,
-0.0024130642414093018,
-0.023617565631866455,
0.16661593317985535,
-0.2933165729045868,
-0.22497142851352692,
0.7585443258285522,
0.07746168971061707,
0.32287219166755676,
-0.24931353330612183,
0.09118511527776718,
-0.0665561854839325,
0.37681782245635986,
0.18083569407463074,
0.12990322709083557,
-0.21275024116039276,
-0.028597161173820496,
-0.6616355180740356,
-0.08547546714544296,
-0.29314878582954407,
0.170551136136055,
0.14988917112350464,
0.10978896915912628,
-0.1584187150001526,
-0.03878476470708847,
0.21851679682731628,
-0.20455041527748108,
-0.08533652871847153,
-0.1378420889377594,
-0.05397627130150795,
-0.02536250278353691,
-0.08341357111930847,
-0.019078219309449196,
-0.18722231686115265,
-0.23908206820487976,
0.2051587998867035,
-0.02816907688975334,
0.023280128836631775,
-0.09542103111743927,
-0.0049004703760147095,
0.08199112117290497,
0.00597788393497467,
0.4046562612056732,
0.17651231586933136,
0.30131974816322327,
0.25914448499679565,
0.10801777988672256,
-0.28711286187171936,
-0.24303588271141052,
-0.19041693210601807,
0.16468669474124908,
0.07341399043798447,
0.0014635846018791199,
-0.5317786335945129,
-0.007721446454524994,
-0.22574496269226074,
0.11054927855730057,
0.05756533890962601,
-0.05126556009054184,
0.04313161224126816,
-0.046984560787677765,
-0.03397515416145325,
0.17462703585624695,
0.06891660392284393,
0.2647239863872528,
0.0031803064048290253,
0.3403755724430084,
-0.3055140972137451,
-0.08388923108577728,
0.30466222763061523,
-0.19955624639987946,
-0.334322988986969,
0.03949704021215439,
0.24102430045604706,
0.05656126141548157,
-0.313476026058197,
-0.537049412727356,
0.02635495364665985,
0.466581791639328,
-0.2633056044578552,
-0.04170108214020729,
0.09639279544353485,
-0.043422430753707886,
0.13521340489387512,
-0.042765289545059204,
0.2940587103366852,
0.004088561981916428,
0.011961294338107109,
0.08782358467578888,
-0.2700871527194977
] |
https://github.com/huggingface/datasets/issues/2187 | Question (potential issue?) related to datasets caching | Thanks @lhoestq
I wanted to do that, however, snowflake does not allow it to write at all. I'm asking around to see if they can help me out with that issue π
| I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you! | 32 | Question (potential issue?) related to datasets caching
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
Thanks @lhoestq
I wanted to do that, however, snowflake does not allow it to write at all. I'm asking around to see if they can help me out with that issue π
| [
-0.08300359547138214,
-0.11795234680175781,
-0.0875985324382782,
0.4333561062812805,
0.31444215774536133,
0.09293175488710403,
0.21593531966209412,
0.045001134276390076,
0.09018552303314209,
-0.21972991526126862,
0.21874508261680603,
0.08733394742012024,
-0.16049593687057495,
0.21282465755939484,
-0.11394950747489929,
0.3961228132247925,
0.16811592876911163,
-0.060065582394599915,
-0.14694136381149292,
0.055062972009181976,
-0.0045379213988780975,
-0.026000989601016045,
-0.2200978398323059,
0.10088002681732178,
-0.5274440050125122,
-0.24852952361106873,
0.1818993091583252,
0.11898109316825867,
-0.01387186162173748,
-0.36452481150627136,
0.33721354603767395,
0.38692227005958557,
0.1112213283777237,
0.26117944717407227,
-0.00011924882710445672,
0.0071547627449035645,
0.08696050196886063,
-0.07867250591516495,
-0.14518921077251434,
0.14758163690567017,
-0.46570947766304016,
-0.4216429889202118,
0.11555137485265732,
-0.05091241002082825,
0.05088081210851669,
-0.01993703469634056,
0.11490832269191742,
-0.5476254224777222,
0.39198851585388184,
0.29329216480255127,
0.19086039066314697,
-0.09594510495662689,
-0.12834960222244263,
0.2236308604478836,
-0.11827265471220016,
0.03920801728963852,
-0.18859075009822845,
0.00498332642018795,
0.057432327419519424,
-0.19273944199085236,
0.0369257815182209,
0.4029904305934906,
-0.10314984619617462,
0.2855369448661804,
0.4989510774612427,
0.09763571619987488,
-0.11121378093957901,
-0.31492701172828674,
0.3575795292854309,
-0.08204705268144608,
0.9697122573852539,
-0.4430265426635742,
-0.25731706619262695,
-0.32279327511787415,
-0.06449246406555176,
-0.2586381435394287,
0.43853703141212463,
-0.06373823434114456,
-0.007124142721295357,
0.23256531357765198,
-0.5162084102630615,
-0.3975946605205536,
-0.08143536001443863,
0.005570113658905029,
0.1000978946685791,
-0.18962576985359192,
-0.3547714054584503,
0.14097005128860474,
0.0007637180387973785,
-0.057760968804359436,
0.7219294309616089,
-0.3766186237335205,
-0.1459037959575653,
0.18593771755695343,
-0.5217921137809753,
-0.16469572484493256,
-0.02745530754327774,
0.40000635385513306,
-0.17452222108840942,
0.32498645782470703,
0.29710710048675537,
0.16358065605163574,
-0.13878238201141357,
-0.021108366549015045,
0.4190918803215027,
0.2298399657011032,
0.29182708263397217,
0.2000093013048172,
0.23132134974002838,
-0.2315066158771515,
-0.046584997326135635,
-0.24797210097312927,
0.053364016115665436,
-0.4563722014427185,
0.4261591136455536,
-0.01684838905930519,
0.3432384729385376,
-0.4151289463043213,
-0.3126908540725708,
0.08662952482700348,
-0.002918008714914322,
-0.14430078864097595,
0.0951177179813385,
0.34074440598487854,
-0.11689102649688721,
0.004011526703834534,
-0.23440642654895782,
0.1531844139099121,
-0.18905559182167053,
-0.026311278343200684,
-0.12029340118169785,
-0.06264214217662811,
-0.1086944043636322,
0.08767328411340714,
0.19751286506652832,
-0.48224836587905884,
0.105217844247818,
0.4087968170642853,
0.22226150333881378,
-0.38657698035240173,
0.17522746324539185,
0.021041644737124443,
-0.0056487396359443665,
0.1651783436536789,
-0.21577557921409607,
0.31994327902793884,
0.4000422954559326,
-0.06967706978321075,
-0.15140214562416077,
0.2335573434829712,
-0.35906264185905457,
-0.47407349944114685,
0.006319154053926468,
0.05446411669254303,
-0.5137889981269836,
-0.18489308655261993,
0.19515934586524963,
-0.07140231132507324,
0.3760620355606079,
0.06486031413078308,
0.2302568554878235,
-0.024648278951644897,
0.03630158677697182,
-0.37182068824768066,
-0.0028843041509389877,
0.45571547746658325,
-0.6841306090354919,
0.03159193694591522,
-0.3415835201740265,
-0.21264760196208954,
0.11589841544628143,
0.38215509057044983,
-0.3631255328655243,
-0.01683802902698517,
-0.1544792652130127,
-0.363625705242157,
0.042359255254268646,
-0.12158942222595215,
-0.3736902177333832,
0.10684879124164581,
0.054196327924728394,
0.24887196719646454,
0.008227050304412842,
0.30643710494041443,
0.09236175566911697,
-0.03242167457938194,
0.16791409254074097,
-0.15136916935443878,
0.11795177310705185,
-0.2742047905921936,
-0.24262097477912903,
-0.3054749667644501,
0.13763603568077087,
-0.1261901557445526,
-0.06528857350349426,
0.0889415368437767,
0.1884947270154953,
-0.07565813511610031,
-0.0591929629445076,
-0.052136581391096115,
0.12797078490257263,
0.43475496768951416,
0.29894277453422546,
0.20595942437648773,
-0.09502904117107391,
0.00754900649189949,
-0.42315593361854553,
0.2704654037952423,
0.2751035690307617,
-0.40928006172180176,
0.04846717044711113,
-0.0632190853357315,
-0.13208222389221191,
-0.013599280267953873,
-0.3264310359954834,
-0.283176064491272,
0.008946634829044342,
-0.08988560736179352,
0.030630409717559814,
-0.19198544323444366,
-0.28092342615127563,
0.48563483357429504,
-0.34381380677223206,
-0.08497028052806854,
-0.07270203530788422,
0.2778049409389496,
-0.029241075739264488,
0.030919887125492096,
-0.2294040322303772,
0.2430075705051422,
0.08943802863359451,
0.16355599462985992,
0.12632709741592407,
0.36033472418785095,
-0.2735148072242737,
0.30087628960609436,
0.19446125626564026,
0.4044587314128876,
-0.07968857139348984,
-0.28555363416671753,
0.4255675673484802,
-0.2607000172138214,
0.04068388044834137,
-0.10174751281738281,
-0.09558508545160294,
0.4596121907234192,
-0.0728675127029419,
0.15643617510795593,
-0.30720776319503784,
-0.029044829308986664,
-0.08988238871097565,
-0.07156534492969513,
0.10706646740436554,
-0.2985248565673828,
0.19535121321678162,
-0.09009282290935516,
-0.03053775243461132,
0.1454392969608307,
-0.2758229970932007,
0.13030004501342773,
0.3609590530395508,
0.01338597759604454,
-0.04675426334142685,
-0.06137215346097946,
-0.1859380304813385,
-0.20575663447380066,
0.11443107575178146,
0.37235814332962036,
0.527398407459259,
0.0003318307863082737,
-0.07743091881275177,
0.08162220567464828,
0.04647252336144447,
-0.16693222522735596,
0.34516558051109314,
-0.19603277742862701,
-0.21175232529640198,
-0.022154152393341064,
0.05979407951235771,
-0.22090215981006622,
-0.22352677583694458,
0.18521974980831146,
0.2116284966468811,
0.2884588837623596,
-0.5206727385520935,
0.12853610515594482,
-0.4886268973350525,
-0.235245019197464,
-0.18328802287578583,
0.1857174038887024,
-0.5014755725860596,
-0.2659797668457031,
0.018396761268377304,
0.09243060648441315,
0.180556058883667,
0.0018883692100644112,
-0.009088423103094101,
0.05980674922466278,
-0.1269018054008484,
-0.14494222402572632,
-0.07613219320774078,
-0.23239296674728394,
0.009778009727597237,
0.08478683233261108,
0.18524876236915588,
-0.04433796927332878,
0.2807301878929138,
0.058677516877651215,
-0.048676617443561554,
-0.4883289933204651,
-0.009803466498851776,
-0.08887800574302673,
0.010261982679367065,
0.3593807518482208,
-0.14625373482704163,
0.20518267154693604,
-0.053918853402137756,
-0.07183147221803665,
0.0404595211148262,
0.051852576434612274,
0.10544461011886597,
-0.09231676906347275,
-0.002023338805884123,
0.10473710298538208,
-0.15466587245464325,
0.01916782557964325,
-0.24502776563167572,
-0.21774473786354065,
0.10566611588001251,
0.19585832953453064,
0.0009165145456790924,
0.42108091711997986,
0.17317534983158112,
0.04585723206400871,
-0.11728385835886002,
-0.05484948307275772,
-0.534705400466919,
-0.4480845630168915,
0.2464950978755951,
0.036873191595077515,
-0.16162660717964172,
0.3472459316253662,
0.2651326656341553,
0.24915705621242523,
0.01649429276585579,
-0.5621761679649353,
-0.09291862696409225,
-0.262639582157135,
0.20909768342971802,
0.2389356642961502,
0.1333714723587036,
0.2985398471355438,
0.07730355858802795,
0.03836800158023834,
-0.15068671107292175,
-0.2522502839565277,
-0.05222515016794205,
0.08711259812116623,
0.2719486355781555,
0.07190406322479248,
0.15988808870315552,
-0.01757201738655567,
1.0711956024169922,
0.3206685483455658,
-0.02472662553191185,
0.07475428283214569,
-0.043111346662044525,
0.6927633285522461,
0.12441667914390564,
-0.19574029743671417,
0.10270314663648605,
-0.23322558403015137,
-0.3188023567199707,
-0.08447535336017609,
0.03417191654443741,
0.1123272106051445,
0.11659561097621918,
0.43443563580513,
-0.08257076889276505,
-0.2394031584262848,
0.1861468255519867,
-0.4307931363582611,
0.1566702127456665,
0.13523516058921814,
-0.0882176086306572,
-0.24656783044338226,
-0.1703484058380127,
-0.3172502815723419,
0.2758336365222931,
0.17170020937919617,
-0.09106677770614624,
-0.3504675626754761,
-0.2140173763036728,
-0.44564807415008545,
0.309846967458725,
-0.12167900055646896,
0.08796536177396774,
-0.3154114782810211,
0.323036253452301,
0.3921821713447571,
0.16001297533512115,
0.31110262870788574,
-0.5243167281150818,
-0.19365178048610687,
0.17821845412254333,
0.04154903441667557,
-0.005842642858624458,
-0.07876034080982208,
-0.1917339414358139,
0.26831933856010437,
0.14829733967781067,
0.08874450623989105,
0.15033593773841858,
-0.26440563797950745,
-0.10061970353126526,
0.1161855012178421,
-0.13405035436153412,
0.01351624634116888,
-0.22425946593284607,
-0.17573487758636475,
-0.3824942409992218,
-0.05247483402490616,
0.09092038869857788,
-0.035215847194194794,
-0.29051607847213745,
0.2636159360408783,
-0.1741487979888916,
0.10402106493711472,
0.23345409333705902,
0.0013866797089576721,
0.4444805681705475,
-0.08623211085796356,
0.03929443284869194,
0.34503448009490967,
-0.36993101239204407,
0.23012986779212952,
0.4714263379573822,
0.1391422301530838,
0.19766399264335632,
0.012346547096967697,
0.00855893362313509,
0.246815025806427,
0.2908244729042053,
-0.31398552656173706,
0.4629867970943451,
0.033227987587451935,
-0.06732042133808136,
-0.3869801163673401,
-0.08148489892482758,
0.1856941282749176,
0.29872673749923706,
-0.3986579477787018,
-0.7208906412124634,
0.34268033504486084,
0.18601132929325104,
-0.11072593182325363,
0.29203736782073975,
-0.011241130530834198,
-0.17085546255111694,
-0.16912086308002472,
0.1240801140666008,
0.7785499691963196,
0.017560172826051712,
0.19104160368442535,
-0.10213027149438858,
-0.020633596926927567,
0.3490002453327179,
-0.25898703932762146,
0.18536950647830963,
-0.18609333038330078,
-0.2644084393978119,
-0.14140012860298157,
-0.1229461133480072,
0.40313348174095154,
0.18110111355781555,
-0.08391539007425308,
0.2796556055545807,
-0.15715977549552917,
0.4372503161430359,
-0.1104736253619194,
-0.1964835673570633,
-0.31464114785194397,
0.050632327795028687,
-0.01281428337097168,
0.13561661541461945,
-0.027125731110572815,
0.3354983627796173,
-0.24028825759887695,
0.038679108023643494,
0.2485371232032776,
-0.014916585758328438,
-0.476260781288147,
-0.1376175582408905,
-0.01210436224937439,
0.14107532799243927,
-0.12821505963802338,
-0.35556626319885254,
0.49495890736579895,
0.4138251543045044,
0.4467034339904785,
0.0053806304931640625,
-0.2314111590385437,
0.12098865211009979,
0.2606905996799469,
0.010506355203688145,
-0.138490229845047,
0.08589139580726624,
0.0426192581653595,
0.09462019056081772,
-0.2613508701324463,
0.14207059144973755,
-0.08324901759624481,
-0.32454365491867065,
0.010313332080841064,
0.4104156494140625,
-0.22073446214199066,
-0.43971195816993713,
-0.0974436104297638,
0.1958964765071869,
0.10002501308917999,
0.04143945500254631,
0.11596080660820007,
0.26059311628341675,
0.2644948363304138,
0.2525098919868469,
-0.4376688003540039,
-0.20013025403022766,
-0.04056381806731224,
0.20058295130729675,
0.331263929605484,
-0.1748127043247223,
0.5203331708908081,
-0.23261986672878265,
-0.2135128676891327,
-0.2091207504272461,
-0.03784799203276634,
-0.11558249592781067,
-0.2471086084842682,
0.1173790842294693,
0.12398573756217957,
0.14119751751422882,
0.07014381140470505,
-0.09442608058452606,
0.04826942831277847,
0.13744525611400604,
-0.26766324043273926,
-0.3017573952674866,
-0.2382993996143341,
0.016641348600387573,
-0.024808097630739212,
0.36557120084762573,
-0.31970277428627014,
0.028589731082320213,
-0.033391352742910385,
-0.08069639652967453,
-0.276883602142334,
0.13966411352157593,
-0.1471020132303238,
0.08759622275829315,
0.10711707919836044,
-0.11336282640695572,
0.3064139187335968,
-0.2225172370672226,
-0.04734591022133827,
-0.006464201956987381,
-0.3592097759246826,
-0.12378814816474915,
0.01192261278629303,
0.22113367915153503,
0.03633608669042587,
-0.4569542109966278,
0.030833818018436432,
-0.1872665286064148,
-0.05849747732281685,
-0.15741707384586334,
0.27419131994247437,
0.4414138197898865,
0.05023211985826492,
0.08459877967834473,
0.01493583619594574,
0.10379427671432495,
-0.11616607010364532,
-0.23832467198371887,
-0.05330871045589447,
0.40618211030960083,
0.24817292392253876,
0.2420823574066162,
-0.1154036596417427,
0.17178577184677124,
-0.19068308174610138,
0.23157057166099548,
0.05628576874732971,
0.1044602319598198,
0.10400547087192535,
-0.25589656829833984,
-0.00906844437122345,
0.13268403708934784,
0.35563981533050537,
0.33399447798728943,
-0.2420945167541504,
-0.0624367818236351,
0.16723906993865967,
0.09432147443294525,
0.015376705676317215,
-0.06687043607234955,
0.044428303837776184,
0.04161398857831955,
-0.10838907957077026,
0.21035322546958923,
0.364487886428833,
-0.160121887922287,
0.5675615072250366,
0.043977148830890656,
0.3996666371822357,
-0.49273961782455444,
0.4754476249217987,
0.23417185246944427,
0.06919433176517487,
-0.19585402309894562,
0.5946479439735413,
0.21276409924030304,
0.1268317550420761,
0.6032751798629761,
0.13586589694023132,
-0.0462130531668663,
0.43181681632995605,
0.1851053088903427,
-0.36011946201324463,
-0.7051732540130615,
0.4985732436180115,
0.4037263095378876,
-0.3071163594722748,
0.31696224212646484,
0.031349096447229385,
0.07477394491434097,
-0.2801298201084137,
0.32519054412841797,
-0.15327641367912292,
0.24495573341846466,
-0.1674192249774933,
-0.0851624459028244,
0.4390913248062134,
-0.2661687135696411,
0.194728821516037,
0.20017890632152557,
-0.1369803249835968,
-0.18166866898536682,
0.05104518681764603,
-0.2051602452993393,
-0.17554835975170135,
-0.3871915936470032,
0.5764133930206299,
0.27456220984458923,
0.2460857331752777,
-0.1630844920873642,
0.1548515260219574,
0.044620878994464874,
-0.11605557799339294,
0.14204832911491394,
0.29160040616989136,
0.47809550166130066,
0.01904018595814705,
0.28662386536598206,
0.14484159648418427,
0.053750380873680115,
-0.021666789427399635,
-0.04176619276404381,
0.32445263862609863,
-0.06331317126750946,
0.14776138961315155,
0.16877257823944092,
0.12306573987007141,
-0.03690851852297783,
-0.04194184020161629,
-0.10987167060375214,
0.2076115757226944,
-0.4940418601036072,
-0.08644754439592361,
0.06984792649745941,
-0.09710563719272614,
0.07295624166727066,
0.12901604175567627,
-0.22874408960342407,
-0.3907279968261719,
0.6065537333488464,
-0.006110396236181259,
0.20416566729545593,
-0.24537141621112823,
0.05618061125278473,
-0.0907643586397171,
0.38781315088272095,
0.17082861065864563,
-0.00685591995716095,
-0.08821788430213928,
-0.08890431374311447,
-0.6628528237342834,
-0.09389432519674301,
-0.2248581349849701,
0.2151726484298706,
0.06900705397129059,
0.08776853233575821,
-0.14800229668617249,
0.04929675534367561,
0.12806683778762817,
-0.13335205614566803,
0.002720770426094532,
-0.04997934401035309,
-0.05833735316991806,
-0.12395685911178589,
-0.08457635343074799,
0.030441464856266975,
-0.03601113334298134,
-0.2466021180152893,
0.1802649199962616,
0.1657576560974121,
-0.013618353754281998,
-0.16447989642620087,
0.13471457362174988,
-0.011703532189130783,
-0.24457603693008423,
0.28381890058517456,
0.24671092629432678,
0.3350403308868408,
0.27886447310447693,
0.0005039554089307785,
-0.3281315863132477,
-0.327945739030838,
-0.1375652551651001,
0.08246809989213943,
0.1839776486158371,
0.11019231379032135,
-0.35849106311798096,
-0.07061474025249481,
-0.16749046742916107,
0.294367253780365,
0.06473642587661743,
-0.0058585647493600845,
0.25124773383140564,
0.018744727596640587,
0.027811437845230103,
0.12809491157531738,
0.1470533162355423,
0.20407822728157043,
0.021650459617376328,
0.19038739800453186,
-0.2908806800842285,
-0.03470568731427193,
0.24489013850688934,
-0.25084173679351807,
-0.1726885437965393,
0.2540249824523926,
0.11140657961368561,
0.07150229066610336,
-0.33261048793792725,
-0.6557814478874207,
-0.034565988928079605,
0.4279372990131378,
-0.2203350067138672,
-0.06982794404029846,
0.06429542601108551,
-0.16712293028831482,
0.017411667853593826,
-0.04702931270003319,
0.45379287004470825,
0.05574086681008339,
0.00012287497520446777,
0.24308109283447266,
-0.2858812212944031
] |
https://github.com/huggingface/datasets/issues/2185 | .map() and distributed training | Hi, one workaround would be to save the mapped(tokenized in your case) file using `save_to_disk`, and having each process load this file using `load_from_disk`. This is what I am doing, and in this case, I turn off the ability to automatically load from the cache.
Also, multiprocessing the map function seems to be slower at the moment (#1992), hope this helps you. | Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters. | 62 | .map() and distributed training
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
Hi, one workaround would be to save the mapped(tokenized in your case) file using `save_to_disk`, and having each process load this file using `load_from_disk`. This is what I am doing, and in this case, I turn off the ability to automatically load from the cache.
Also, multiprocessing the map function seems to be slower at the moment (#1992), hope this helps you. | [
-0.25376173853874207,
-0.2207169234752655,
0.11777672171592712,
0.07457448542118073,
0.2116168737411499,
-0.10975942015647888,
0.517072856426239,
0.010205429047346115,
0.28015705943107605,
0.023762956261634827,
0.1822476089000702,
0.34344959259033203,
-0.22906433045864105,
-0.5855441093444824,
0.0941428542137146,
0.06153406202793121,
0.1861158013343811,
0.036659859120845795,
-0.037735842168331146,
-0.2008032649755478,
-0.15293297171592712,
0.07591672986745834,
-0.15427079796791077,
0.11705100536346436,
-0.7540706396102905,
-0.15231508016586304,
-0.18345360457897186,
0.1027398332953453,
0.22531794011592865,
-0.3499089479446411,
0.2342275232076645,
0.2213345170021057,
0.4013623595237732,
0.5336914658546448,
-0.00012720905942842364,
0.031262725591659546,
0.18786080181598663,
-0.19833096861839294,
0.03971799835562706,
-0.047676265239715576,
0.16418999433517456,
0.005025122314691544,
0.19361120462417603,
-0.29533651471138,
0.13107287883758545,
-0.14767341315746307,
0.3262224793434143,
-0.4418163001537323,
0.4140009880065918,
-0.10773000866174698,
-0.0018774829804897308,
0.09438946098089218,
-0.5714960098266602,
0.13987627625465393,
-0.2214406132698059,
0.12348013371229172,
0.17111380398273468,
0.2180825024843216,
0.3029264807701111,
-0.34165555238723755,
-0.3789149820804596,
0.15822704136371613,
-0.14662371575832367,
0.13405944406986237,
0.4135625660419464,
0.036601874977350235,
-0.07898802310228348,
-0.34870049357414246,
-0.07574982196092606,
-0.12185835093259811,
0.10768753290176392,
-0.07430695742368698,
-0.18817922472953796,
-0.466538667678833,
-0.2733979821205139,
-0.0016579926013946533,
-0.002462737262248993,
0.11624366044998169,
-0.02337254211306572,
-0.11971379816532135,
-0.5124093294143677,
-0.06252461671829224,
0.055294573307037354,
0.13265389204025269,
-0.2732614278793335,
0.4564460813999176,
-0.02547357976436615,
0.3163392245769501,
0.14199258387088776,
0.05433782562613487,
0.08374596387147903,
-0.17199194431304932,
0.12963683903217316,
0.37158313393592834,
0.027552861720323563,
0.014174208045005798,
0.048927925527095795,
-0.3223406970500946,
-0.023288968950510025,
0.03560980409383774,
0.23210692405700684,
0.259809672832489,
-0.04798610135912895,
0.2657663822174072,
0.40077006816864014,
0.09275078773498535,
-0.13914108276367188,
0.6415418386459351,
0.030111387372016907,
-0.2004719078540802,
-0.6418221592903137,
-0.17241254448890686,
-0.35194510221481323,
-0.062735415995121,
0.33358922600746155,
0.04270993173122406,
-0.20984522998332977,
0.07222741842269897,
0.46040472388267517,
-0.23941722512245178,
-0.006529923528432846,
-0.13254378736019135,
0.021212106570601463,
0.250815212726593,
0.12879353761672974,
0.4370376467704773,
-0.05552695691585541,
0.10142675042152405,
-0.19016055762767792,
0.1589490920305252,
-0.05960412696003914,
-0.3029898703098297,
-0.30491068959236145,
0.3160684406757355,
0.16187681257724762,
0.18775923550128937,
0.4239693582057953,
-0.1001104786992073,
0.28944188356399536,
-0.16136983036994934,
0.3981885313987732,
-0.11204597353935242,
0.6585770845413208,
0.10445903241634369,
-0.2513783574104309,
0.22236572206020355,
0.1862221658229828,
0.3770999312400818,
-0.15356317162513733,
0.3354168236255646,
-0.5022830367088318,
-0.4383485019207001,
0.47987520694732666,
-0.07329696416854858,
-0.009594003669917583,
0.06920219957828522,
-0.17672228813171387,
0.04275926575064659,
0.5391665101051331,
-0.2560787796974182,
0.13442404568195343,
-0.35754597187042236,
-0.20906561613082886,
-0.177628293633461,
0.2568799555301666,
0.45516157150268555,
0.3137149214744568,
-0.34181711077690125,
0.12416864186525345,
0.3162249028682709,
0.20818297564983368,
0.22909453511238098,
-0.6239327192306519,
0.38981038331985474,
-0.21997983753681183,
0.274752140045166,
0.3872866630554199,
-0.35712242126464844,
-0.14352302253246307,
0.2945983111858368,
-0.09897400438785553,
0.02335912175476551,
-0.15709400177001953,
-0.024981820955872536,
0.4641163945198059,
-0.02523188851773739,
0.12588214874267578,
0.2964545488357544,
-0.21626226603984833,
0.2001037448644638,
-0.2617366313934326,
0.01691913791000843,
0.08043812215328217,
-0.007085621356964111,
0.19472073018550873,
0.0033709704875946045,
-0.012801364064216614,
0.11961949616670609,
0.2070770263671875,
0.01023024320602417,
0.228379026055336,
0.025254253298044205,
-0.3850671350955963,
0.09240898489952087,
0.16548283398151398,
0.06651946902275085,
-0.15049803256988525,
0.18142437934875488,
-0.033235277980566025,
-0.39592960476875305,
-0.1602506786584854,
-0.05221188813447952,
0.16287502646446228,
-0.20769380033016205,
-0.31089189648628235,
-0.14020736515522003,
-0.11415519565343857,
0.1380292922258377,
-0.0407925620675087,
-0.2170623391866684,
-0.3000539243221283,
-0.09362832456827164,
0.14104333519935608,
-0.058869391679763794,
0.2177683264017105,
0.10378053039312363,
0.19145244359970093,
-0.12039594352245331,
-0.43175914883613586,
-0.1487242579460144,
0.10814172029495239,
-0.2924800515174866,
-0.10761493444442749,
0.37763455510139465,
0.045573558658361435,
0.20801950991153717,
-0.11058460921049118,
0.3216453194618225,
0.2376917451620102,
0.0668996125459671,
0.1610090732574463,
0.1279924064874649,
-0.12457174062728882,
-0.15120220184326172,
-0.14207813143730164,
0.34654200077056885,
0.12898965179920197,
0.14713574945926666,
-0.015548273921012878,
0.016348624601960182,
0.041823387145996094,
0.0829826295375824,
-0.23968765139579773,
-0.08248860388994217,
-0.32003697752952576,
-0.19217850267887115,
0.2612735629081726,
0.15466296672821045,
0.037915028631687164,
0.0008638352155685425,
0.3312496542930603,
0.026126667857170105,
0.008366033434867859,
-0.14848178625106812,
-0.18063583970069885,
0.04006488621234894,
0.1552489995956421,
0.15723378956317902,
0.3422779440879822,
-0.01425726618617773,
0.3932817280292511,
-0.11448133736848831,
0.10341391712427139,
0.062259137630462646,
-0.08174242824316025,
-0.0038876980543136597,
0.2324124425649643,
0.1578570008277893,
-0.043156180530786514,
0.1835179477930069,
-0.24711290001869202,
-0.10463272035121918,
0.34853455424308777,
-0.24596652388572693,
0.08692938089370728,
0.2329530268907547,
-0.012332623824477196,
0.18088048696517944,
-0.5816079378128052,
0.09181596338748932,
0.0024795811623334885,
0.06690438836812973,
-0.16199831664562225,
0.26040661334991455,
-0.09503914415836334,
0.4181235730648041,
-0.0660853385925293,
0.24358461797237396,
-0.1192762702703476,
-0.2782997488975525,
0.18054983019828796,
-0.1531221866607666,
-0.012159653007984161,
-0.19232702255249023,
0.12843599915504456,
-0.2399805635213852,
-0.022650891914963722,
0.07756088674068451,
-0.05778767541050911,
-0.142929807305336,
0.18273600935935974,
0.11334642767906189,
0.2074275016784668,
-0.555270791053772,
-0.29690954089164734,
-0.032073765993118286,
-0.37879544496536255,
-0.14868271350860596,
0.16863226890563965,
-0.49790841341018677,
0.11927084624767303,
-0.05513763427734375,
0.24526460468769073,
-0.17175626754760742,
-0.12457077205181122,
-0.31703802943229675,
-0.2305707186460495,
-0.019363803789019585,
0.13388170301914215,
-0.05494331941008568,
0.14184030890464783,
0.0033793114125728607,
-0.10536530613899231,
-0.23937885463237762,
-0.17647989094257355,
-0.2918812930583954,
0.06517771631479263,
-0.5251651406288147,
0.388630747795105,
-0.18672248721122742,
-0.047137100249528885,
-0.10934805870056152,
-0.046108976006507874,
-0.06540895998477936,
0.6399708390235901,
-0.33489859104156494,
0.0144050819799304,
0.30953270196914673,
-0.010113779455423355,
-0.09659664332866669,
0.11164762824773788,
0.5424691438674927,
0.10664817690849304,
0.12662513554096222,
-0.05499907582998276,
0.2443145513534546,
0.25604167580604553,
0.1710580587387085,
0.05137454718351364,
0.15952777862548828,
-0.119390107691288,
0.16371288895606995,
1.2782384157180786,
0.15221929550170898,
-0.0518912635743618,
0.026243343949317932,
0.031482189893722534,
-0.014047358185052872,
0.06866714358329773,
-0.1058129221200943,
0.061383772641420364,
-0.3951035439968109,
-0.13081268966197968,
0.1793062388896942,
0.18719390034675598,
-0.5139588713645935,
0.05212712287902832,
0.19363155961036682,
-0.012220803648233414,
-0.30191633105278015,
0.3315782845020294,
-0.7171846628189087,
0.5827731490135193,
0.059084195643663406,
0.017888806760311127,
-0.4254792630672455,
0.04540019482374191,
0.09452086687088013,
-0.15131594240665436,
0.7113603353500366,
0.05342082679271698,
-0.4360215663909912,
0.0862673968076706,
-0.19184187054634094,
0.039407968521118164,
0.21483564376831055,
0.20287688076496124,
0.09526984393596649,
-0.17031651735305786,
0.1477959156036377,
0.17292891442775726,
0.4053846001625061,
-0.06395360827445984,
0.022406620904803276,
0.11699411273002625,
-0.21794059872627258,
-0.13278435170650482,
-0.1501162052154541,
0.06436406075954437,
0.37004613876342773,
0.023649295791983604,
0.43080124258995056,
-0.030336622148752213,
-0.17746898531913757,
-0.4406900703907013,
0.08842097967863083,
-0.3515690267086029,
-0.043363992124795914,
-0.1870867908000946,
0.07596608251333237,
-0.29609501361846924,
0.20950931310653687,
0.30478978157043457,
-0.17358353734016418,
-0.02137071080505848,
-0.2622394263744354,
-0.015995165333151817,
0.31471988558769226,
-0.10367757081985474,
0.03708246350288391,
0.24423357844352722,
0.14812271296977997,
0.013170339167118073,
0.4719136953353882,
0.2137567102909088,
0.21387799084186554,
0.3546659052371979,
-0.32741880416870117,
-0.1393890529870987,
0.036832213401794434,
0.007355113513767719,
0.23407024145126343,
0.1898229569196701,
0.0306466743350029,
-0.23610249161720276,
0.177387535572052,
-0.16774247586727142,
-0.2283780425786972,
0.29504159092903137,
0.11787275224924088,
0.06849812716245651,
-0.17577962577342987,
-0.4709654450416565,
0.09216675162315369,
0.18397745490074158,
-0.22207117080688477,
0.4868578314781189,
-0.8516538143157959,
-0.26168036460876465,
0.4181652069091797,
0.0608363151550293,
0.6925716996192932,
-0.26070278882980347,
0.22726459801197052,
-0.2504418194293976,
0.48743242025375366,
0.020454376935958862,
-0.6066097021102905,
0.4200374484062195,
-0.2548578083515167,
-0.20416449010372162,
-0.04122285544872284,
-0.1717182844877243,
-0.15596285462379456,
0.7070310115814209,
0.080417200922966,
0.17252378165721893,
0.1165401041507721,
0.3262239694595337,
-0.06403379887342453,
0.0934549868106842,
0.2966891825199127,
-0.43778330087661743,
0.22902865707874298,
-0.06242629885673523,
0.18298950791358948,
0.15696923434734344,
-0.0804341658949852,
0.0565103255212307,
0.12404024600982666,
-0.2584003210067749,
0.20868955552577972,
0.07172196358442307,
-0.3600728511810303,
0.36349809169769287,
0.03982042148709297,
0.052144378423690796,
-0.24333371222019196,
0.6011238694190979,
0.010904364287853241,
-0.23199571669101715,
0.09407608211040497,
0.043698929250240326,
0.1931171417236328,
-0.012696700170636177,
-0.262334406375885,
-0.16974301636219025,
0.12629976868629456,
0.09679844230413437,
-0.14593838155269623,
-0.12057466059923172,
-0.3000967502593994,
-0.4416503310203552,
-0.22375410795211792,
0.36008012294769287,
0.604175329208374,
-0.05056420713663101,
-0.05884856730699539,
0.2081899344921112,
-0.08617144823074341,
0.1668846607208252,
-0.006943525746464729,
0.06400171667337418,
-0.13817033171653748,
0.3867056369781494,
-0.023509729653596878,
-0.12429095059633255,
0.20148886740207672,
0.31319642066955566,
-0.1574302613735199,
-0.16826200485229492,
0.2568940222263336,
-0.26546698808670044,
-0.09693731367588043,
-0.05739220231771469,
-0.033052124083042145,
0.13893228769302368,
-0.36251628398895264,
0.016991881653666496,
-0.10655897110700607,
0.016631394624710083,
0.09930668771266937,
0.08376258611679077,
0.18398329615592957,
0.10752745717763901,
-0.32399293780326843,
-0.1815752387046814,
-0.37178316712379456,
-0.027891919016838074,
-0.1365000158548355,
0.05056663230061531,
0.27340400218963623,
0.13057619333267212,
0.10531774163246155,
0.37649181485176086,
-0.13172711431980133,
0.12283793836832047,
0.08179929107427597,
0.39739230275154114,
-0.051866911351680756,
0.005020808428525925,
-0.1158292293548584,
-0.029192037880420685,
-0.18753820657730103,
0.09087155759334564,
-0.14214710891246796,
0.004255726933479309,
0.08487814664840698,
0.22508566081523895,
0.19454526901245117,
-0.07184553146362305,
-0.0755309984087944,
-0.21736083924770355,
0.11622151732444763,
-0.4500409662723541,
0.04876740649342537,
0.01603393629193306,
-0.1881898194551468,
0.04671218618750572,
0.5341084003448486,
0.16230949759483337,
-0.4041571617126465,
0.14515186846256256,
-0.08664363622665405,
-0.050596341490745544,
-0.03202469274401665,
0.10413791239261627,
0.1630801409482956,
-0.004990085959434509,
-0.0814535841345787,
-0.034553855657577515,
0.36597639322280884,
0.1690801978111267,
0.47543784976005554,
-0.22721178829669952,
0.0704820454120636,
-0.029281016439199448,
0.1734144538640976,
0.23257805407047272,
-0.3147434890270233,
-0.05992045998573303,
0.34154707193374634,
0.024122482165694237,
0.02826526388525963,
-0.19900518655776978,
0.3771486282348633,
0.08671785891056061,
-0.11692649126052856,
0.26958051323890686,
0.29131320118904114,
-0.3984215557575226,
0.10716904699802399,
0.1387806236743927,
0.5225745439529419,
-0.32876574993133545,
0.26857656240463257,
0.026906102895736694,
0.08572331070899963,
0.1760588437318802,
0.2698517143726349,
0.31044960021972656,
0.17821219563484192,
-0.07478207349777222,
0.029380742460489273,
0.24966013431549072,
0.3985043168067932,
-0.10355116426944733,
-0.18747630715370178,
-0.48948919773101807,
-0.07363858819007874,
-0.00440940260887146,
-0.03696104884147644,
0.12426857650279999,
-0.2778053879737854,
0.2728981673717499,
-0.2847655117511749,
-0.5857908129692078,
0.12542106211185455,
0.32745420932769775,
-0.2013130784034729,
-0.08867983520030975,
0.09267883002758026,
0.011380814015865326,
-0.04623463749885559,
0.09415917098522186,
0.04416845738887787,
0.2097099870443344,
0.5593307614326477,
0.08588671684265137,
0.018109694123268127,
0.15415777266025543,
-0.07173880189657211,
0.0019631460309028625,
0.4593271017074585,
-0.3261110782623291,
0.1913289576768875,
-0.17257334291934967,
0.0807393342256546,
0.02004319801926613,
-0.031570613384246826,
0.049854833632707596,
0.5228729248046875,
-0.11887183785438538,
0.19383114576339722,
0.0442512184381485,
0.1886545568704605,
-0.11319932341575623,
0.16675320267677307,
-0.12337422370910645,
-0.3006841838359833,
0.030773930251598358,
-0.08147546648979187,
-0.013105197809636593,
0.028823094442486763,
-0.06652213633060455,
0.06685866415500641,
0.2088635414838791,
0.28209030628204346,
0.14854615926742554,
-0.1038462221622467,
0.10289027541875839,
0.06941033899784088,
-0.3599321246147156,
0.12591658532619476,
0.23666703701019287,
-0.2897270917892456,
0.19593128561973572,
0.050557758659124374,
-0.03994067758321762,
0.07085323333740234,
0.25427886843681335,
0.17480121552944183,
0.030376659706234932,
-0.274774432182312,
-0.3522977828979492,
-0.6728180050849915,
0.30238524079322815,
0.017480721697211266,
0.2508772313594818,
-0.10238110274076462,
0.011732114478945732,
0.056380223482847214,
-0.053125523030757904,
-0.2462203949689865,
-0.25243067741394043,
-0.03877707198262215,
0.35247811675071716,
-0.09575033187866211,
0.0024708323180675507,
-0.2875678539276123,
0.39957261085510254,
0.14586257934570312,
-0.19724130630493164,
0.06539047509431839,
-0.059779372066259384,
-0.08639679104089737,
0.26575350761413574,
-0.42360132932662964,
-0.1760619580745697,
0.06769068539142609,
0.49641892313957214,
0.06497205793857574,
0.20992223918437958,
0.060078270733356476,
0.18017439544200897,
-0.09818664193153381,
0.04511198401451111,
-0.01882946863770485,
-0.05288352072238922,
-0.08372712135314941,
0.2601967453956604,
-0.5280181169509888,
-0.0028348080813884735,
-0.49914655089378357,
-0.4764001667499542,
0.12461982667446136,
-0.015533285215497017,
0.010844174772500992,
-0.21057768166065216,
-0.2984161376953125,
0.0919269546866417,
0.26457035541534424,
0.44018810987472534,
-0.05071784555912018,
-0.059896551072597504,
-0.21876880526542664,
0.009230872616171837,
0.26662784814834595,
-0.6458789706230164,
-0.2884700298309326,
-0.2124376744031906,
0.13455480337142944,
-0.04036334156990051,
-0.05963508039712906,
-0.40264075994491577,
-0.07239661365747452,
0.2834528684616089,
-0.0711669996380806,
-0.43617549538612366,
-0.17188072204589844,
-0.05042065680027008,
-0.17073149979114532,
-0.23805437982082367,
0.4838343560695648,
-0.04084958881139755,
-0.2001533955335617,
-0.09643684327602386,
-0.17171989381313324
] |
https://github.com/huggingface/datasets/issues/2185 | .map() and distributed training | Thanks @hwijeen for the workaround, feels a bit prototypical but it works! (it seems files are written twice then though)
(I haven't observed slowness using multiprocessed map function but I could be wrong) | Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters. | 33 | .map() and distributed training
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
Thanks @hwijeen for the workaround, feels a bit prototypical but it works! (it seems files are written twice then though)
(I haven't observed slowness using multiprocessed map function but I could be wrong) | [
-0.25376173853874207,
-0.2207169234752655,
0.11777672171592712,
0.07457448542118073,
0.2116168737411499,
-0.10975942015647888,
0.517072856426239,
0.010205429047346115,
0.28015705943107605,
0.023762956261634827,
0.1822476089000702,
0.34344959259033203,
-0.22906433045864105,
-0.5855441093444824,
0.0941428542137146,
0.06153406202793121,
0.1861158013343811,
0.036659859120845795,
-0.037735842168331146,
-0.2008032649755478,
-0.15293297171592712,
0.07591672986745834,
-0.15427079796791077,
0.11705100536346436,
-0.7540706396102905,
-0.15231508016586304,
-0.18345360457897186,
0.1027398332953453,
0.22531794011592865,
-0.3499089479446411,
0.2342275232076645,
0.2213345170021057,
0.4013623595237732,
0.5336914658546448,
-0.00012720905942842364,
0.031262725591659546,
0.18786080181598663,
-0.19833096861839294,
0.03971799835562706,
-0.047676265239715576,
0.16418999433517456,
0.005025122314691544,
0.19361120462417603,
-0.29533651471138,
0.13107287883758545,
-0.14767341315746307,
0.3262224793434143,
-0.4418163001537323,
0.4140009880065918,
-0.10773000866174698,
-0.0018774829804897308,
0.09438946098089218,
-0.5714960098266602,
0.13987627625465393,
-0.2214406132698059,
0.12348013371229172,
0.17111380398273468,
0.2180825024843216,
0.3029264807701111,
-0.34165555238723755,
-0.3789149820804596,
0.15822704136371613,
-0.14662371575832367,
0.13405944406986237,
0.4135625660419464,
0.036601874977350235,
-0.07898802310228348,
-0.34870049357414246,
-0.07574982196092606,
-0.12185835093259811,
0.10768753290176392,
-0.07430695742368698,
-0.18817922472953796,
-0.466538667678833,
-0.2733979821205139,
-0.0016579926013946533,
-0.002462737262248993,
0.11624366044998169,
-0.02337254211306572,
-0.11971379816532135,
-0.5124093294143677,
-0.06252461671829224,
0.055294573307037354,
0.13265389204025269,
-0.2732614278793335,
0.4564460813999176,
-0.02547357976436615,
0.3163392245769501,
0.14199258387088776,
0.05433782562613487,
0.08374596387147903,
-0.17199194431304932,
0.12963683903217316,
0.37158313393592834,
0.027552861720323563,
0.014174208045005798,
0.048927925527095795,
-0.3223406970500946,
-0.023288968950510025,
0.03560980409383774,
0.23210692405700684,
0.259809672832489,
-0.04798610135912895,
0.2657663822174072,
0.40077006816864014,
0.09275078773498535,
-0.13914108276367188,
0.6415418386459351,
0.030111387372016907,
-0.2004719078540802,
-0.6418221592903137,
-0.17241254448890686,
-0.35194510221481323,
-0.062735415995121,
0.33358922600746155,
0.04270993173122406,
-0.20984522998332977,
0.07222741842269897,
0.46040472388267517,
-0.23941722512245178,
-0.006529923528432846,
-0.13254378736019135,
0.021212106570601463,
0.250815212726593,
0.12879353761672974,
0.4370376467704773,
-0.05552695691585541,
0.10142675042152405,
-0.19016055762767792,
0.1589490920305252,
-0.05960412696003914,
-0.3029898703098297,
-0.30491068959236145,
0.3160684406757355,
0.16187681257724762,
0.18775923550128937,
0.4239693582057953,
-0.1001104786992073,
0.28944188356399536,
-0.16136983036994934,
0.3981885313987732,
-0.11204597353935242,
0.6585770845413208,
0.10445903241634369,
-0.2513783574104309,
0.22236572206020355,
0.1862221658229828,
0.3770999312400818,
-0.15356317162513733,
0.3354168236255646,
-0.5022830367088318,
-0.4383485019207001,
0.47987520694732666,
-0.07329696416854858,
-0.009594003669917583,
0.06920219957828522,
-0.17672228813171387,
0.04275926575064659,
0.5391665101051331,
-0.2560787796974182,
0.13442404568195343,
-0.35754597187042236,
-0.20906561613082886,
-0.177628293633461,
0.2568799555301666,
0.45516157150268555,
0.3137149214744568,
-0.34181711077690125,
0.12416864186525345,
0.3162249028682709,
0.20818297564983368,
0.22909453511238098,
-0.6239327192306519,
0.38981038331985474,
-0.21997983753681183,
0.274752140045166,
0.3872866630554199,
-0.35712242126464844,
-0.14352302253246307,
0.2945983111858368,
-0.09897400438785553,
0.02335912175476551,
-0.15709400177001953,
-0.024981820955872536,
0.4641163945198059,
-0.02523188851773739,
0.12588214874267578,
0.2964545488357544,
-0.21626226603984833,
0.2001037448644638,
-0.2617366313934326,
0.01691913791000843,
0.08043812215328217,
-0.007085621356964111,
0.19472073018550873,
0.0033709704875946045,
-0.012801364064216614,
0.11961949616670609,
0.2070770263671875,
0.01023024320602417,
0.228379026055336,
0.025254253298044205,
-0.3850671350955963,
0.09240898489952087,
0.16548283398151398,
0.06651946902275085,
-0.15049803256988525,
0.18142437934875488,
-0.033235277980566025,
-0.39592960476875305,
-0.1602506786584854,
-0.05221188813447952,
0.16287502646446228,
-0.20769380033016205,
-0.31089189648628235,
-0.14020736515522003,
-0.11415519565343857,
0.1380292922258377,
-0.0407925620675087,
-0.2170623391866684,
-0.3000539243221283,
-0.09362832456827164,
0.14104333519935608,
-0.058869391679763794,
0.2177683264017105,
0.10378053039312363,
0.19145244359970093,
-0.12039594352245331,
-0.43175914883613586,
-0.1487242579460144,
0.10814172029495239,
-0.2924800515174866,
-0.10761493444442749,
0.37763455510139465,
0.045573558658361435,
0.20801950991153717,
-0.11058460921049118,
0.3216453194618225,
0.2376917451620102,
0.0668996125459671,
0.1610090732574463,
0.1279924064874649,
-0.12457174062728882,
-0.15120220184326172,
-0.14207813143730164,
0.34654200077056885,
0.12898965179920197,
0.14713574945926666,
-0.015548273921012878,
0.016348624601960182,
0.041823387145996094,
0.0829826295375824,
-0.23968765139579773,
-0.08248860388994217,
-0.32003697752952576,
-0.19217850267887115,
0.2612735629081726,
0.15466296672821045,
0.037915028631687164,
0.0008638352155685425,
0.3312496542930603,
0.026126667857170105,
0.008366033434867859,
-0.14848178625106812,
-0.18063583970069885,
0.04006488621234894,
0.1552489995956421,
0.15723378956317902,
0.3422779440879822,
-0.01425726618617773,
0.3932817280292511,
-0.11448133736848831,
0.10341391712427139,
0.062259137630462646,
-0.08174242824316025,
-0.0038876980543136597,
0.2324124425649643,
0.1578570008277893,
-0.043156180530786514,
0.1835179477930069,
-0.24711290001869202,
-0.10463272035121918,
0.34853455424308777,
-0.24596652388572693,
0.08692938089370728,
0.2329530268907547,
-0.012332623824477196,
0.18088048696517944,
-0.5816079378128052,
0.09181596338748932,
0.0024795811623334885,
0.06690438836812973,
-0.16199831664562225,
0.26040661334991455,
-0.09503914415836334,
0.4181235730648041,
-0.0660853385925293,
0.24358461797237396,
-0.1192762702703476,
-0.2782997488975525,
0.18054983019828796,
-0.1531221866607666,
-0.012159653007984161,
-0.19232702255249023,
0.12843599915504456,
-0.2399805635213852,
-0.022650891914963722,
0.07756088674068451,
-0.05778767541050911,
-0.142929807305336,
0.18273600935935974,
0.11334642767906189,
0.2074275016784668,
-0.555270791053772,
-0.29690954089164734,
-0.032073765993118286,
-0.37879544496536255,
-0.14868271350860596,
0.16863226890563965,
-0.49790841341018677,
0.11927084624767303,
-0.05513763427734375,
0.24526460468769073,
-0.17175626754760742,
-0.12457077205181122,
-0.31703802943229675,
-0.2305707186460495,
-0.019363803789019585,
0.13388170301914215,
-0.05494331941008568,
0.14184030890464783,
0.0033793114125728607,
-0.10536530613899231,
-0.23937885463237762,
-0.17647989094257355,
-0.2918812930583954,
0.06517771631479263,
-0.5251651406288147,
0.388630747795105,
-0.18672248721122742,
-0.047137100249528885,
-0.10934805870056152,
-0.046108976006507874,
-0.06540895998477936,
0.6399708390235901,
-0.33489859104156494,
0.0144050819799304,
0.30953270196914673,
-0.010113779455423355,
-0.09659664332866669,
0.11164762824773788,
0.5424691438674927,
0.10664817690849304,
0.12662513554096222,
-0.05499907582998276,
0.2443145513534546,
0.25604167580604553,
0.1710580587387085,
0.05137454718351364,
0.15952777862548828,
-0.119390107691288,
0.16371288895606995,
1.2782384157180786,
0.15221929550170898,
-0.0518912635743618,
0.026243343949317932,
0.031482189893722534,
-0.014047358185052872,
0.06866714358329773,
-0.1058129221200943,
0.061383772641420364,
-0.3951035439968109,
-0.13081268966197968,
0.1793062388896942,
0.18719390034675598,
-0.5139588713645935,
0.05212712287902832,
0.19363155961036682,
-0.012220803648233414,
-0.30191633105278015,
0.3315782845020294,
-0.7171846628189087,
0.5827731490135193,
0.059084195643663406,
0.017888806760311127,
-0.4254792630672455,
0.04540019482374191,
0.09452086687088013,
-0.15131594240665436,
0.7113603353500366,
0.05342082679271698,
-0.4360215663909912,
0.0862673968076706,
-0.19184187054634094,
0.039407968521118164,
0.21483564376831055,
0.20287688076496124,
0.09526984393596649,
-0.17031651735305786,
0.1477959156036377,
0.17292891442775726,
0.4053846001625061,
-0.06395360827445984,
0.022406620904803276,
0.11699411273002625,
-0.21794059872627258,
-0.13278435170650482,
-0.1501162052154541,
0.06436406075954437,
0.37004613876342773,
0.023649295791983604,
0.43080124258995056,
-0.030336622148752213,
-0.17746898531913757,
-0.4406900703907013,
0.08842097967863083,
-0.3515690267086029,
-0.043363992124795914,
-0.1870867908000946,
0.07596608251333237,
-0.29609501361846924,
0.20950931310653687,
0.30478978157043457,
-0.17358353734016418,
-0.02137071080505848,
-0.2622394263744354,
-0.015995165333151817,
0.31471988558769226,
-0.10367757081985474,
0.03708246350288391,
0.24423357844352722,
0.14812271296977997,
0.013170339167118073,
0.4719136953353882,
0.2137567102909088,
0.21387799084186554,
0.3546659052371979,
-0.32741880416870117,
-0.1393890529870987,
0.036832213401794434,
0.007355113513767719,
0.23407024145126343,
0.1898229569196701,
0.0306466743350029,
-0.23610249161720276,
0.177387535572052,
-0.16774247586727142,
-0.2283780425786972,
0.29504159092903137,
0.11787275224924088,
0.06849812716245651,
-0.17577962577342987,
-0.4709654450416565,
0.09216675162315369,
0.18397745490074158,
-0.22207117080688477,
0.4868578314781189,
-0.8516538143157959,
-0.26168036460876465,
0.4181652069091797,
0.0608363151550293,
0.6925716996192932,
-0.26070278882980347,
0.22726459801197052,
-0.2504418194293976,
0.48743242025375366,
0.020454376935958862,
-0.6066097021102905,
0.4200374484062195,
-0.2548578083515167,
-0.20416449010372162,
-0.04122285544872284,
-0.1717182844877243,
-0.15596285462379456,
0.7070310115814209,
0.080417200922966,
0.17252378165721893,
0.1165401041507721,
0.3262239694595337,
-0.06403379887342453,
0.0934549868106842,
0.2966891825199127,
-0.43778330087661743,
0.22902865707874298,
-0.06242629885673523,
0.18298950791358948,
0.15696923434734344,
-0.0804341658949852,
0.0565103255212307,
0.12404024600982666,
-0.2584003210067749,
0.20868955552577972,
0.07172196358442307,
-0.3600728511810303,
0.36349809169769287,
0.03982042148709297,
0.052144378423690796,
-0.24333371222019196,
0.6011238694190979,
0.010904364287853241,
-0.23199571669101715,
0.09407608211040497,
0.043698929250240326,
0.1931171417236328,
-0.012696700170636177,
-0.262334406375885,
-0.16974301636219025,
0.12629976868629456,
0.09679844230413437,
-0.14593838155269623,
-0.12057466059923172,
-0.3000967502593994,
-0.4416503310203552,
-0.22375410795211792,
0.36008012294769287,
0.604175329208374,
-0.05056420713663101,
-0.05884856730699539,
0.2081899344921112,
-0.08617144823074341,
0.1668846607208252,
-0.006943525746464729,
0.06400171667337418,
-0.13817033171653748,
0.3867056369781494,
-0.023509729653596878,
-0.12429095059633255,
0.20148886740207672,
0.31319642066955566,
-0.1574302613735199,
-0.16826200485229492,
0.2568940222263336,
-0.26546698808670044,
-0.09693731367588043,
-0.05739220231771469,
-0.033052124083042145,
0.13893228769302368,
-0.36251628398895264,
0.016991881653666496,
-0.10655897110700607,
0.016631394624710083,
0.09930668771266937,
0.08376258611679077,
0.18398329615592957,
0.10752745717763901,
-0.32399293780326843,
-0.1815752387046814,
-0.37178316712379456,
-0.027891919016838074,
-0.1365000158548355,
0.05056663230061531,
0.27340400218963623,
0.13057619333267212,
0.10531774163246155,
0.37649181485176086,
-0.13172711431980133,
0.12283793836832047,
0.08179929107427597,
0.39739230275154114,
-0.051866911351680756,
0.005020808428525925,
-0.1158292293548584,
-0.029192037880420685,
-0.18753820657730103,
0.09087155759334564,
-0.14214710891246796,
0.004255726933479309,
0.08487814664840698,
0.22508566081523895,
0.19454526901245117,
-0.07184553146362305,
-0.0755309984087944,
-0.21736083924770355,
0.11622151732444763,
-0.4500409662723541,
0.04876740649342537,
0.01603393629193306,
-0.1881898194551468,
0.04671218618750572,
0.5341084003448486,
0.16230949759483337,
-0.4041571617126465,
0.14515186846256256,
-0.08664363622665405,
-0.050596341490745544,
-0.03202469274401665,
0.10413791239261627,
0.1630801409482956,
-0.004990085959434509,
-0.0814535841345787,
-0.034553855657577515,
0.36597639322280884,
0.1690801978111267,
0.47543784976005554,
-0.22721178829669952,
0.0704820454120636,
-0.029281016439199448,
0.1734144538640976,
0.23257805407047272,
-0.3147434890270233,
-0.05992045998573303,
0.34154707193374634,
0.024122482165694237,
0.02826526388525963,
-0.19900518655776978,
0.3771486282348633,
0.08671785891056061,
-0.11692649126052856,
0.26958051323890686,
0.29131320118904114,
-0.3984215557575226,
0.10716904699802399,
0.1387806236743927,
0.5225745439529419,
-0.32876574993133545,
0.26857656240463257,
0.026906102895736694,
0.08572331070899963,
0.1760588437318802,
0.2698517143726349,
0.31044960021972656,
0.17821219563484192,
-0.07478207349777222,
0.029380742460489273,
0.24966013431549072,
0.3985043168067932,
-0.10355116426944733,
-0.18747630715370178,
-0.48948919773101807,
-0.07363858819007874,
-0.00440940260887146,
-0.03696104884147644,
0.12426857650279999,
-0.2778053879737854,
0.2728981673717499,
-0.2847655117511749,
-0.5857908129692078,
0.12542106211185455,
0.32745420932769775,
-0.2013130784034729,
-0.08867983520030975,
0.09267883002758026,
0.011380814015865326,
-0.04623463749885559,
0.09415917098522186,
0.04416845738887787,
0.2097099870443344,
0.5593307614326477,
0.08588671684265137,
0.018109694123268127,
0.15415777266025543,
-0.07173880189657211,
0.0019631460309028625,
0.4593271017074585,
-0.3261110782623291,
0.1913289576768875,
-0.17257334291934967,
0.0807393342256546,
0.02004319801926613,
-0.031570613384246826,
0.049854833632707596,
0.5228729248046875,
-0.11887183785438538,
0.19383114576339722,
0.0442512184381485,
0.1886545568704605,
-0.11319932341575623,
0.16675320267677307,
-0.12337422370910645,
-0.3006841838359833,
0.030773930251598358,
-0.08147546648979187,
-0.013105197809636593,
0.028823094442486763,
-0.06652213633060455,
0.06685866415500641,
0.2088635414838791,
0.28209030628204346,
0.14854615926742554,
-0.1038462221622467,
0.10289027541875839,
0.06941033899784088,
-0.3599321246147156,
0.12591658532619476,
0.23666703701019287,
-0.2897270917892456,
0.19593128561973572,
0.050557758659124374,
-0.03994067758321762,
0.07085323333740234,
0.25427886843681335,
0.17480121552944183,
0.030376659706234932,
-0.274774432182312,
-0.3522977828979492,
-0.6728180050849915,
0.30238524079322815,
0.017480721697211266,
0.2508772313594818,
-0.10238110274076462,
0.011732114478945732,
0.056380223482847214,
-0.053125523030757904,
-0.2462203949689865,
-0.25243067741394043,
-0.03877707198262215,
0.35247811675071716,
-0.09575033187866211,
0.0024708323180675507,
-0.2875678539276123,
0.39957261085510254,
0.14586257934570312,
-0.19724130630493164,
0.06539047509431839,
-0.059779372066259384,
-0.08639679104089737,
0.26575350761413574,
-0.42360132932662964,
-0.1760619580745697,
0.06769068539142609,
0.49641892313957214,
0.06497205793857574,
0.20992223918437958,
0.060078270733356476,
0.18017439544200897,
-0.09818664193153381,
0.04511198401451111,
-0.01882946863770485,
-0.05288352072238922,
-0.08372712135314941,
0.2601967453956604,
-0.5280181169509888,
-0.0028348080813884735,
-0.49914655089378357,
-0.4764001667499542,
0.12461982667446136,
-0.015533285215497017,
0.010844174772500992,
-0.21057768166065216,
-0.2984161376953125,
0.0919269546866417,
0.26457035541534424,
0.44018810987472534,
-0.05071784555912018,
-0.059896551072597504,
-0.21876880526542664,
0.009230872616171837,
0.26662784814834595,
-0.6458789706230164,
-0.2884700298309326,
-0.2124376744031906,
0.13455480337142944,
-0.04036334156990051,
-0.05963508039712906,
-0.40264075994491577,
-0.07239661365747452,
0.2834528684616089,
-0.0711669996380806,
-0.43617549538612366,
-0.17188072204589844,
-0.05042065680027008,
-0.17073149979114532,
-0.23805437982082367,
0.4838343560695648,
-0.04084958881139755,
-0.2001533955335617,
-0.09643684327602386,
-0.17171989381313324
] |
https://github.com/huggingface/datasets/issues/2185 | .map() and distributed training | To my understanding, files are written twice anyhow(one after load_dataset, another aftet map). It's just that you now have it at the location where you can see, whereas it was secretlely saved at caching folder(.cache/huggingface/datasets by default)! Correct me if I'm wrong! | Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters. | 42 | .map() and distributed training
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
To my understanding, files are written twice anyhow(one after load_dataset, another aftet map). It's just that you now have it at the location where you can see, whereas it was secretlely saved at caching folder(.cache/huggingface/datasets by default)! Correct me if I'm wrong! | [
-0.25376173853874207,
-0.2207169234752655,
0.11777672171592712,
0.07457448542118073,
0.2116168737411499,
-0.10975942015647888,
0.517072856426239,
0.010205429047346115,
0.28015705943107605,
0.023762956261634827,
0.1822476089000702,
0.34344959259033203,
-0.22906433045864105,
-0.5855441093444824,
0.0941428542137146,
0.06153406202793121,
0.1861158013343811,
0.036659859120845795,
-0.037735842168331146,
-0.2008032649755478,
-0.15293297171592712,
0.07591672986745834,
-0.15427079796791077,
0.11705100536346436,
-0.7540706396102905,
-0.15231508016586304,
-0.18345360457897186,
0.1027398332953453,
0.22531794011592865,
-0.3499089479446411,
0.2342275232076645,
0.2213345170021057,
0.4013623595237732,
0.5336914658546448,
-0.00012720905942842364,
0.031262725591659546,
0.18786080181598663,
-0.19833096861839294,
0.03971799835562706,
-0.047676265239715576,
0.16418999433517456,
0.005025122314691544,
0.19361120462417603,
-0.29533651471138,
0.13107287883758545,
-0.14767341315746307,
0.3262224793434143,
-0.4418163001537323,
0.4140009880065918,
-0.10773000866174698,
-0.0018774829804897308,
0.09438946098089218,
-0.5714960098266602,
0.13987627625465393,
-0.2214406132698059,
0.12348013371229172,
0.17111380398273468,
0.2180825024843216,
0.3029264807701111,
-0.34165555238723755,
-0.3789149820804596,
0.15822704136371613,
-0.14662371575832367,
0.13405944406986237,
0.4135625660419464,
0.036601874977350235,
-0.07898802310228348,
-0.34870049357414246,
-0.07574982196092606,
-0.12185835093259811,
0.10768753290176392,
-0.07430695742368698,
-0.18817922472953796,
-0.466538667678833,
-0.2733979821205139,
-0.0016579926013946533,
-0.002462737262248993,
0.11624366044998169,
-0.02337254211306572,
-0.11971379816532135,
-0.5124093294143677,
-0.06252461671829224,
0.055294573307037354,
0.13265389204025269,
-0.2732614278793335,
0.4564460813999176,
-0.02547357976436615,
0.3163392245769501,
0.14199258387088776,
0.05433782562613487,
0.08374596387147903,
-0.17199194431304932,
0.12963683903217316,
0.37158313393592834,
0.027552861720323563,
0.014174208045005798,
0.048927925527095795,
-0.3223406970500946,
-0.023288968950510025,
0.03560980409383774,
0.23210692405700684,
0.259809672832489,
-0.04798610135912895,
0.2657663822174072,
0.40077006816864014,
0.09275078773498535,
-0.13914108276367188,
0.6415418386459351,
0.030111387372016907,
-0.2004719078540802,
-0.6418221592903137,
-0.17241254448890686,
-0.35194510221481323,
-0.062735415995121,
0.33358922600746155,
0.04270993173122406,
-0.20984522998332977,
0.07222741842269897,
0.46040472388267517,
-0.23941722512245178,
-0.006529923528432846,
-0.13254378736019135,
0.021212106570601463,
0.250815212726593,
0.12879353761672974,
0.4370376467704773,
-0.05552695691585541,
0.10142675042152405,
-0.19016055762767792,
0.1589490920305252,
-0.05960412696003914,
-0.3029898703098297,
-0.30491068959236145,
0.3160684406757355,
0.16187681257724762,
0.18775923550128937,
0.4239693582057953,
-0.1001104786992073,
0.28944188356399536,
-0.16136983036994934,
0.3981885313987732,
-0.11204597353935242,
0.6585770845413208,
0.10445903241634369,
-0.2513783574104309,
0.22236572206020355,
0.1862221658229828,
0.3770999312400818,
-0.15356317162513733,
0.3354168236255646,
-0.5022830367088318,
-0.4383485019207001,
0.47987520694732666,
-0.07329696416854858,
-0.009594003669917583,
0.06920219957828522,
-0.17672228813171387,
0.04275926575064659,
0.5391665101051331,
-0.2560787796974182,
0.13442404568195343,
-0.35754597187042236,
-0.20906561613082886,
-0.177628293633461,
0.2568799555301666,
0.45516157150268555,
0.3137149214744568,
-0.34181711077690125,
0.12416864186525345,
0.3162249028682709,
0.20818297564983368,
0.22909453511238098,
-0.6239327192306519,
0.38981038331985474,
-0.21997983753681183,
0.274752140045166,
0.3872866630554199,
-0.35712242126464844,
-0.14352302253246307,
0.2945983111858368,
-0.09897400438785553,
0.02335912175476551,
-0.15709400177001953,
-0.024981820955872536,
0.4641163945198059,
-0.02523188851773739,
0.12588214874267578,
0.2964545488357544,
-0.21626226603984833,
0.2001037448644638,
-0.2617366313934326,
0.01691913791000843,
0.08043812215328217,
-0.007085621356964111,
0.19472073018550873,
0.0033709704875946045,
-0.012801364064216614,
0.11961949616670609,
0.2070770263671875,
0.01023024320602417,
0.228379026055336,
0.025254253298044205,
-0.3850671350955963,
0.09240898489952087,
0.16548283398151398,
0.06651946902275085,
-0.15049803256988525,
0.18142437934875488,
-0.033235277980566025,
-0.39592960476875305,
-0.1602506786584854,
-0.05221188813447952,
0.16287502646446228,
-0.20769380033016205,
-0.31089189648628235,
-0.14020736515522003,
-0.11415519565343857,
0.1380292922258377,
-0.0407925620675087,
-0.2170623391866684,
-0.3000539243221283,
-0.09362832456827164,
0.14104333519935608,
-0.058869391679763794,
0.2177683264017105,
0.10378053039312363,
0.19145244359970093,
-0.12039594352245331,
-0.43175914883613586,
-0.1487242579460144,
0.10814172029495239,
-0.2924800515174866,
-0.10761493444442749,
0.37763455510139465,
0.045573558658361435,
0.20801950991153717,
-0.11058460921049118,
0.3216453194618225,
0.2376917451620102,
0.0668996125459671,
0.1610090732574463,
0.1279924064874649,
-0.12457174062728882,
-0.15120220184326172,
-0.14207813143730164,
0.34654200077056885,
0.12898965179920197,
0.14713574945926666,
-0.015548273921012878,
0.016348624601960182,
0.041823387145996094,
0.0829826295375824,
-0.23968765139579773,
-0.08248860388994217,
-0.32003697752952576,
-0.19217850267887115,
0.2612735629081726,
0.15466296672821045,
0.037915028631687164,
0.0008638352155685425,
0.3312496542930603,
0.026126667857170105,
0.008366033434867859,
-0.14848178625106812,
-0.18063583970069885,
0.04006488621234894,
0.1552489995956421,
0.15723378956317902,
0.3422779440879822,
-0.01425726618617773,
0.3932817280292511,
-0.11448133736848831,
0.10341391712427139,
0.062259137630462646,
-0.08174242824316025,
-0.0038876980543136597,
0.2324124425649643,
0.1578570008277893,
-0.043156180530786514,
0.1835179477930069,
-0.24711290001869202,
-0.10463272035121918,
0.34853455424308777,
-0.24596652388572693,
0.08692938089370728,
0.2329530268907547,
-0.012332623824477196,
0.18088048696517944,
-0.5816079378128052,
0.09181596338748932,
0.0024795811623334885,
0.06690438836812973,
-0.16199831664562225,
0.26040661334991455,
-0.09503914415836334,
0.4181235730648041,
-0.0660853385925293,
0.24358461797237396,
-0.1192762702703476,
-0.2782997488975525,
0.18054983019828796,
-0.1531221866607666,
-0.012159653007984161,
-0.19232702255249023,
0.12843599915504456,
-0.2399805635213852,
-0.022650891914963722,
0.07756088674068451,
-0.05778767541050911,
-0.142929807305336,
0.18273600935935974,
0.11334642767906189,
0.2074275016784668,
-0.555270791053772,
-0.29690954089164734,
-0.032073765993118286,
-0.37879544496536255,
-0.14868271350860596,
0.16863226890563965,
-0.49790841341018677,
0.11927084624767303,
-0.05513763427734375,
0.24526460468769073,
-0.17175626754760742,
-0.12457077205181122,
-0.31703802943229675,
-0.2305707186460495,
-0.019363803789019585,
0.13388170301914215,
-0.05494331941008568,
0.14184030890464783,
0.0033793114125728607,
-0.10536530613899231,
-0.23937885463237762,
-0.17647989094257355,
-0.2918812930583954,
0.06517771631479263,
-0.5251651406288147,
0.388630747795105,
-0.18672248721122742,
-0.047137100249528885,
-0.10934805870056152,
-0.046108976006507874,
-0.06540895998477936,
0.6399708390235901,
-0.33489859104156494,
0.0144050819799304,
0.30953270196914673,
-0.010113779455423355,
-0.09659664332866669,
0.11164762824773788,
0.5424691438674927,
0.10664817690849304,
0.12662513554096222,
-0.05499907582998276,
0.2443145513534546,
0.25604167580604553,
0.1710580587387085,
0.05137454718351364,
0.15952777862548828,
-0.119390107691288,
0.16371288895606995,
1.2782384157180786,
0.15221929550170898,
-0.0518912635743618,
0.026243343949317932,
0.031482189893722534,
-0.014047358185052872,
0.06866714358329773,
-0.1058129221200943,
0.061383772641420364,
-0.3951035439968109,
-0.13081268966197968,
0.1793062388896942,
0.18719390034675598,
-0.5139588713645935,
0.05212712287902832,
0.19363155961036682,
-0.012220803648233414,
-0.30191633105278015,
0.3315782845020294,
-0.7171846628189087,
0.5827731490135193,
0.059084195643663406,
0.017888806760311127,
-0.4254792630672455,
0.04540019482374191,
0.09452086687088013,
-0.15131594240665436,
0.7113603353500366,
0.05342082679271698,
-0.4360215663909912,
0.0862673968076706,
-0.19184187054634094,
0.039407968521118164,
0.21483564376831055,
0.20287688076496124,
0.09526984393596649,
-0.17031651735305786,
0.1477959156036377,
0.17292891442775726,
0.4053846001625061,
-0.06395360827445984,
0.022406620904803276,
0.11699411273002625,
-0.21794059872627258,
-0.13278435170650482,
-0.1501162052154541,
0.06436406075954437,
0.37004613876342773,
0.023649295791983604,
0.43080124258995056,
-0.030336622148752213,
-0.17746898531913757,
-0.4406900703907013,
0.08842097967863083,
-0.3515690267086029,
-0.043363992124795914,
-0.1870867908000946,
0.07596608251333237,
-0.29609501361846924,
0.20950931310653687,
0.30478978157043457,
-0.17358353734016418,
-0.02137071080505848,
-0.2622394263744354,
-0.015995165333151817,
0.31471988558769226,
-0.10367757081985474,
0.03708246350288391,
0.24423357844352722,
0.14812271296977997,
0.013170339167118073,
0.4719136953353882,
0.2137567102909088,
0.21387799084186554,
0.3546659052371979,
-0.32741880416870117,
-0.1393890529870987,
0.036832213401794434,
0.007355113513767719,
0.23407024145126343,
0.1898229569196701,
0.0306466743350029,
-0.23610249161720276,
0.177387535572052,
-0.16774247586727142,
-0.2283780425786972,
0.29504159092903137,
0.11787275224924088,
0.06849812716245651,
-0.17577962577342987,
-0.4709654450416565,
0.09216675162315369,
0.18397745490074158,
-0.22207117080688477,
0.4868578314781189,
-0.8516538143157959,
-0.26168036460876465,
0.4181652069091797,
0.0608363151550293,
0.6925716996192932,
-0.26070278882980347,
0.22726459801197052,
-0.2504418194293976,
0.48743242025375366,
0.020454376935958862,
-0.6066097021102905,
0.4200374484062195,
-0.2548578083515167,
-0.20416449010372162,
-0.04122285544872284,
-0.1717182844877243,
-0.15596285462379456,
0.7070310115814209,
0.080417200922966,
0.17252378165721893,
0.1165401041507721,
0.3262239694595337,
-0.06403379887342453,
0.0934549868106842,
0.2966891825199127,
-0.43778330087661743,
0.22902865707874298,
-0.06242629885673523,
0.18298950791358948,
0.15696923434734344,
-0.0804341658949852,
0.0565103255212307,
0.12404024600982666,
-0.2584003210067749,
0.20868955552577972,
0.07172196358442307,
-0.3600728511810303,
0.36349809169769287,
0.03982042148709297,
0.052144378423690796,
-0.24333371222019196,
0.6011238694190979,
0.010904364287853241,
-0.23199571669101715,
0.09407608211040497,
0.043698929250240326,
0.1931171417236328,
-0.012696700170636177,
-0.262334406375885,
-0.16974301636219025,
0.12629976868629456,
0.09679844230413437,
-0.14593838155269623,
-0.12057466059923172,
-0.3000967502593994,
-0.4416503310203552,
-0.22375410795211792,
0.36008012294769287,
0.604175329208374,
-0.05056420713663101,
-0.05884856730699539,
0.2081899344921112,
-0.08617144823074341,
0.1668846607208252,
-0.006943525746464729,
0.06400171667337418,
-0.13817033171653748,
0.3867056369781494,
-0.023509729653596878,
-0.12429095059633255,
0.20148886740207672,
0.31319642066955566,
-0.1574302613735199,
-0.16826200485229492,
0.2568940222263336,
-0.26546698808670044,
-0.09693731367588043,
-0.05739220231771469,
-0.033052124083042145,
0.13893228769302368,
-0.36251628398895264,
0.016991881653666496,
-0.10655897110700607,
0.016631394624710083,
0.09930668771266937,
0.08376258611679077,
0.18398329615592957,
0.10752745717763901,
-0.32399293780326843,
-0.1815752387046814,
-0.37178316712379456,
-0.027891919016838074,
-0.1365000158548355,
0.05056663230061531,
0.27340400218963623,
0.13057619333267212,
0.10531774163246155,
0.37649181485176086,
-0.13172711431980133,
0.12283793836832047,
0.08179929107427597,
0.39739230275154114,
-0.051866911351680756,
0.005020808428525925,
-0.1158292293548584,
-0.029192037880420685,
-0.18753820657730103,
0.09087155759334564,
-0.14214710891246796,
0.004255726933479309,
0.08487814664840698,
0.22508566081523895,
0.19454526901245117,
-0.07184553146362305,
-0.0755309984087944,
-0.21736083924770355,
0.11622151732444763,
-0.4500409662723541,
0.04876740649342537,
0.01603393629193306,
-0.1881898194551468,
0.04671218618750572,
0.5341084003448486,
0.16230949759483337,
-0.4041571617126465,
0.14515186846256256,
-0.08664363622665405,
-0.050596341490745544,
-0.03202469274401665,
0.10413791239261627,
0.1630801409482956,
-0.004990085959434509,
-0.0814535841345787,
-0.034553855657577515,
0.36597639322280884,
0.1690801978111267,
0.47543784976005554,
-0.22721178829669952,
0.0704820454120636,
-0.029281016439199448,
0.1734144538640976,
0.23257805407047272,
-0.3147434890270233,
-0.05992045998573303,
0.34154707193374634,
0.024122482165694237,
0.02826526388525963,
-0.19900518655776978,
0.3771486282348633,
0.08671785891056061,
-0.11692649126052856,
0.26958051323890686,
0.29131320118904114,
-0.3984215557575226,
0.10716904699802399,
0.1387806236743927,
0.5225745439529419,
-0.32876574993133545,
0.26857656240463257,
0.026906102895736694,
0.08572331070899963,
0.1760588437318802,
0.2698517143726349,
0.31044960021972656,
0.17821219563484192,
-0.07478207349777222,
0.029380742460489273,
0.24966013431549072,
0.3985043168067932,
-0.10355116426944733,
-0.18747630715370178,
-0.48948919773101807,
-0.07363858819007874,
-0.00440940260887146,
-0.03696104884147644,
0.12426857650279999,
-0.2778053879737854,
0.2728981673717499,
-0.2847655117511749,
-0.5857908129692078,
0.12542106211185455,
0.32745420932769775,
-0.2013130784034729,
-0.08867983520030975,
0.09267883002758026,
0.011380814015865326,
-0.04623463749885559,
0.09415917098522186,
0.04416845738887787,
0.2097099870443344,
0.5593307614326477,
0.08588671684265137,
0.018109694123268127,
0.15415777266025543,
-0.07173880189657211,
0.0019631460309028625,
0.4593271017074585,
-0.3261110782623291,
0.1913289576768875,
-0.17257334291934967,
0.0807393342256546,
0.02004319801926613,
-0.031570613384246826,
0.049854833632707596,
0.5228729248046875,
-0.11887183785438538,
0.19383114576339722,
0.0442512184381485,
0.1886545568704605,
-0.11319932341575623,
0.16675320267677307,
-0.12337422370910645,
-0.3006841838359833,
0.030773930251598358,
-0.08147546648979187,
-0.013105197809636593,
0.028823094442486763,
-0.06652213633060455,
0.06685866415500641,
0.2088635414838791,
0.28209030628204346,
0.14854615926742554,
-0.1038462221622467,
0.10289027541875839,
0.06941033899784088,
-0.3599321246147156,
0.12591658532619476,
0.23666703701019287,
-0.2897270917892456,
0.19593128561973572,
0.050557758659124374,
-0.03994067758321762,
0.07085323333740234,
0.25427886843681335,
0.17480121552944183,
0.030376659706234932,
-0.274774432182312,
-0.3522977828979492,
-0.6728180050849915,
0.30238524079322815,
0.017480721697211266,
0.2508772313594818,
-0.10238110274076462,
0.011732114478945732,
0.056380223482847214,
-0.053125523030757904,
-0.2462203949689865,
-0.25243067741394043,
-0.03877707198262215,
0.35247811675071716,
-0.09575033187866211,
0.0024708323180675507,
-0.2875678539276123,
0.39957261085510254,
0.14586257934570312,
-0.19724130630493164,
0.06539047509431839,
-0.059779372066259384,
-0.08639679104089737,
0.26575350761413574,
-0.42360132932662964,
-0.1760619580745697,
0.06769068539142609,
0.49641892313957214,
0.06497205793857574,
0.20992223918437958,
0.060078270733356476,
0.18017439544200897,
-0.09818664193153381,
0.04511198401451111,
-0.01882946863770485,
-0.05288352072238922,
-0.08372712135314941,
0.2601967453956604,
-0.5280181169509888,
-0.0028348080813884735,
-0.49914655089378357,
-0.4764001667499542,
0.12461982667446136,
-0.015533285215497017,
0.010844174772500992,
-0.21057768166065216,
-0.2984161376953125,
0.0919269546866417,
0.26457035541534424,
0.44018810987472534,
-0.05071784555912018,
-0.059896551072597504,
-0.21876880526542664,
0.009230872616171837,
0.26662784814834595,
-0.6458789706230164,
-0.2884700298309326,
-0.2124376744031906,
0.13455480337142944,
-0.04036334156990051,
-0.05963508039712906,
-0.40264075994491577,
-0.07239661365747452,
0.2834528684616089,
-0.0711669996380806,
-0.43617549538612366,
-0.17188072204589844,
-0.05042065680027008,
-0.17073149979114532,
-0.23805437982082367,
0.4838343560695648,
-0.04084958881139755,
-0.2001533955335617,
-0.09643684327602386,
-0.17171989381313324
] |
https://github.com/huggingface/datasets/issues/2185 | .map() and distributed training | So to answer my initial question, I was just doing something stupid as I was not re-giving the `preprocessing_num_workers` arguments when launching the distributed training (and it was then set to `None`). I initially thought the hash was computed only with the `tokenize_function` but it's all arguments. Thanks @lhoestq for clarifying! | Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters. | 51 | .map() and distributed training
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
So to answer my initial question, I was just doing something stupid as I was not re-giving the `preprocessing_num_workers` arguments when launching the distributed training (and it was then set to `None`). I initially thought the hash was computed only with the `tokenize_function` but it's all arguments. Thanks @lhoestq for clarifying! | [
-0.25376173853874207,
-0.2207169234752655,
0.11777672171592712,
0.07457448542118073,
0.2116168737411499,
-0.10975942015647888,
0.517072856426239,
0.010205429047346115,
0.28015705943107605,
0.023762956261634827,
0.1822476089000702,
0.34344959259033203,
-0.22906433045864105,
-0.5855441093444824,
0.0941428542137146,
0.06153406202793121,
0.1861158013343811,
0.036659859120845795,
-0.037735842168331146,
-0.2008032649755478,
-0.15293297171592712,
0.07591672986745834,
-0.15427079796791077,
0.11705100536346436,
-0.7540706396102905,
-0.15231508016586304,
-0.18345360457897186,
0.1027398332953453,
0.22531794011592865,
-0.3499089479446411,
0.2342275232076645,
0.2213345170021057,
0.4013623595237732,
0.5336914658546448,
-0.00012720905942842364,
0.031262725591659546,
0.18786080181598663,
-0.19833096861839294,
0.03971799835562706,
-0.047676265239715576,
0.16418999433517456,
0.005025122314691544,
0.19361120462417603,
-0.29533651471138,
0.13107287883758545,
-0.14767341315746307,
0.3262224793434143,
-0.4418163001537323,
0.4140009880065918,
-0.10773000866174698,
-0.0018774829804897308,
0.09438946098089218,
-0.5714960098266602,
0.13987627625465393,
-0.2214406132698059,
0.12348013371229172,
0.17111380398273468,
0.2180825024843216,
0.3029264807701111,
-0.34165555238723755,
-0.3789149820804596,
0.15822704136371613,
-0.14662371575832367,
0.13405944406986237,
0.4135625660419464,
0.036601874977350235,
-0.07898802310228348,
-0.34870049357414246,
-0.07574982196092606,
-0.12185835093259811,
0.10768753290176392,
-0.07430695742368698,
-0.18817922472953796,
-0.466538667678833,
-0.2733979821205139,
-0.0016579926013946533,
-0.002462737262248993,
0.11624366044998169,
-0.02337254211306572,
-0.11971379816532135,
-0.5124093294143677,
-0.06252461671829224,
0.055294573307037354,
0.13265389204025269,
-0.2732614278793335,
0.4564460813999176,
-0.02547357976436615,
0.3163392245769501,
0.14199258387088776,
0.05433782562613487,
0.08374596387147903,
-0.17199194431304932,
0.12963683903217316,
0.37158313393592834,
0.027552861720323563,
0.014174208045005798,
0.048927925527095795,
-0.3223406970500946,
-0.023288968950510025,
0.03560980409383774,
0.23210692405700684,
0.259809672832489,
-0.04798610135912895,
0.2657663822174072,
0.40077006816864014,
0.09275078773498535,
-0.13914108276367188,
0.6415418386459351,
0.030111387372016907,
-0.2004719078540802,
-0.6418221592903137,
-0.17241254448890686,
-0.35194510221481323,
-0.062735415995121,
0.33358922600746155,
0.04270993173122406,
-0.20984522998332977,
0.07222741842269897,
0.46040472388267517,
-0.23941722512245178,
-0.006529923528432846,
-0.13254378736019135,
0.021212106570601463,
0.250815212726593,
0.12879353761672974,
0.4370376467704773,
-0.05552695691585541,
0.10142675042152405,
-0.19016055762767792,
0.1589490920305252,
-0.05960412696003914,
-0.3029898703098297,
-0.30491068959236145,
0.3160684406757355,
0.16187681257724762,
0.18775923550128937,
0.4239693582057953,
-0.1001104786992073,
0.28944188356399536,
-0.16136983036994934,
0.3981885313987732,
-0.11204597353935242,
0.6585770845413208,
0.10445903241634369,
-0.2513783574104309,
0.22236572206020355,
0.1862221658229828,
0.3770999312400818,
-0.15356317162513733,
0.3354168236255646,
-0.5022830367088318,
-0.4383485019207001,
0.47987520694732666,
-0.07329696416854858,
-0.009594003669917583,
0.06920219957828522,
-0.17672228813171387,
0.04275926575064659,
0.5391665101051331,
-0.2560787796974182,
0.13442404568195343,
-0.35754597187042236,
-0.20906561613082886,
-0.177628293633461,
0.2568799555301666,
0.45516157150268555,
0.3137149214744568,
-0.34181711077690125,
0.12416864186525345,
0.3162249028682709,
0.20818297564983368,
0.22909453511238098,
-0.6239327192306519,
0.38981038331985474,
-0.21997983753681183,
0.274752140045166,
0.3872866630554199,
-0.35712242126464844,
-0.14352302253246307,
0.2945983111858368,
-0.09897400438785553,
0.02335912175476551,
-0.15709400177001953,
-0.024981820955872536,
0.4641163945198059,
-0.02523188851773739,
0.12588214874267578,
0.2964545488357544,
-0.21626226603984833,
0.2001037448644638,
-0.2617366313934326,
0.01691913791000843,
0.08043812215328217,
-0.007085621356964111,
0.19472073018550873,
0.0033709704875946045,
-0.012801364064216614,
0.11961949616670609,
0.2070770263671875,
0.01023024320602417,
0.228379026055336,
0.025254253298044205,
-0.3850671350955963,
0.09240898489952087,
0.16548283398151398,
0.06651946902275085,
-0.15049803256988525,
0.18142437934875488,
-0.033235277980566025,
-0.39592960476875305,
-0.1602506786584854,
-0.05221188813447952,
0.16287502646446228,
-0.20769380033016205,
-0.31089189648628235,
-0.14020736515522003,
-0.11415519565343857,
0.1380292922258377,
-0.0407925620675087,
-0.2170623391866684,
-0.3000539243221283,
-0.09362832456827164,
0.14104333519935608,
-0.058869391679763794,
0.2177683264017105,
0.10378053039312363,
0.19145244359970093,
-0.12039594352245331,
-0.43175914883613586,
-0.1487242579460144,
0.10814172029495239,
-0.2924800515174866,
-0.10761493444442749,
0.37763455510139465,
0.045573558658361435,
0.20801950991153717,
-0.11058460921049118,
0.3216453194618225,
0.2376917451620102,
0.0668996125459671,
0.1610090732574463,
0.1279924064874649,
-0.12457174062728882,
-0.15120220184326172,
-0.14207813143730164,
0.34654200077056885,
0.12898965179920197,
0.14713574945926666,
-0.015548273921012878,
0.016348624601960182,
0.041823387145996094,
0.0829826295375824,
-0.23968765139579773,
-0.08248860388994217,
-0.32003697752952576,
-0.19217850267887115,
0.2612735629081726,
0.15466296672821045,
0.037915028631687164,
0.0008638352155685425,
0.3312496542930603,
0.026126667857170105,
0.008366033434867859,
-0.14848178625106812,
-0.18063583970069885,
0.04006488621234894,
0.1552489995956421,
0.15723378956317902,
0.3422779440879822,
-0.01425726618617773,
0.3932817280292511,
-0.11448133736848831,
0.10341391712427139,
0.062259137630462646,
-0.08174242824316025,
-0.0038876980543136597,
0.2324124425649643,
0.1578570008277893,
-0.043156180530786514,
0.1835179477930069,
-0.24711290001869202,
-0.10463272035121918,
0.34853455424308777,
-0.24596652388572693,
0.08692938089370728,
0.2329530268907547,
-0.012332623824477196,
0.18088048696517944,
-0.5816079378128052,
0.09181596338748932,
0.0024795811623334885,
0.06690438836812973,
-0.16199831664562225,
0.26040661334991455,
-0.09503914415836334,
0.4181235730648041,
-0.0660853385925293,
0.24358461797237396,
-0.1192762702703476,
-0.2782997488975525,
0.18054983019828796,
-0.1531221866607666,
-0.012159653007984161,
-0.19232702255249023,
0.12843599915504456,
-0.2399805635213852,
-0.022650891914963722,
0.07756088674068451,
-0.05778767541050911,
-0.142929807305336,
0.18273600935935974,
0.11334642767906189,
0.2074275016784668,
-0.555270791053772,
-0.29690954089164734,
-0.032073765993118286,
-0.37879544496536255,
-0.14868271350860596,
0.16863226890563965,
-0.49790841341018677,
0.11927084624767303,
-0.05513763427734375,
0.24526460468769073,
-0.17175626754760742,
-0.12457077205181122,
-0.31703802943229675,
-0.2305707186460495,
-0.019363803789019585,
0.13388170301914215,
-0.05494331941008568,
0.14184030890464783,
0.0033793114125728607,
-0.10536530613899231,
-0.23937885463237762,
-0.17647989094257355,
-0.2918812930583954,
0.06517771631479263,
-0.5251651406288147,
0.388630747795105,
-0.18672248721122742,
-0.047137100249528885,
-0.10934805870056152,
-0.046108976006507874,
-0.06540895998477936,
0.6399708390235901,
-0.33489859104156494,
0.0144050819799304,
0.30953270196914673,
-0.010113779455423355,
-0.09659664332866669,
0.11164762824773788,
0.5424691438674927,
0.10664817690849304,
0.12662513554096222,
-0.05499907582998276,
0.2443145513534546,
0.25604167580604553,
0.1710580587387085,
0.05137454718351364,
0.15952777862548828,
-0.119390107691288,
0.16371288895606995,
1.2782384157180786,
0.15221929550170898,
-0.0518912635743618,
0.026243343949317932,
0.031482189893722534,
-0.014047358185052872,
0.06866714358329773,
-0.1058129221200943,
0.061383772641420364,
-0.3951035439968109,
-0.13081268966197968,
0.1793062388896942,
0.18719390034675598,
-0.5139588713645935,
0.05212712287902832,
0.19363155961036682,
-0.012220803648233414,
-0.30191633105278015,
0.3315782845020294,
-0.7171846628189087,
0.5827731490135193,
0.059084195643663406,
0.017888806760311127,
-0.4254792630672455,
0.04540019482374191,
0.09452086687088013,
-0.15131594240665436,
0.7113603353500366,
0.05342082679271698,
-0.4360215663909912,
0.0862673968076706,
-0.19184187054634094,
0.039407968521118164,
0.21483564376831055,
0.20287688076496124,
0.09526984393596649,
-0.17031651735305786,
0.1477959156036377,
0.17292891442775726,
0.4053846001625061,
-0.06395360827445984,
0.022406620904803276,
0.11699411273002625,
-0.21794059872627258,
-0.13278435170650482,
-0.1501162052154541,
0.06436406075954437,
0.37004613876342773,
0.023649295791983604,
0.43080124258995056,
-0.030336622148752213,
-0.17746898531913757,
-0.4406900703907013,
0.08842097967863083,
-0.3515690267086029,
-0.043363992124795914,
-0.1870867908000946,
0.07596608251333237,
-0.29609501361846924,
0.20950931310653687,
0.30478978157043457,
-0.17358353734016418,
-0.02137071080505848,
-0.2622394263744354,
-0.015995165333151817,
0.31471988558769226,
-0.10367757081985474,
0.03708246350288391,
0.24423357844352722,
0.14812271296977997,
0.013170339167118073,
0.4719136953353882,
0.2137567102909088,
0.21387799084186554,
0.3546659052371979,
-0.32741880416870117,
-0.1393890529870987,
0.036832213401794434,
0.007355113513767719,
0.23407024145126343,
0.1898229569196701,
0.0306466743350029,
-0.23610249161720276,
0.177387535572052,
-0.16774247586727142,
-0.2283780425786972,
0.29504159092903137,
0.11787275224924088,
0.06849812716245651,
-0.17577962577342987,
-0.4709654450416565,
0.09216675162315369,
0.18397745490074158,
-0.22207117080688477,
0.4868578314781189,
-0.8516538143157959,
-0.26168036460876465,
0.4181652069091797,
0.0608363151550293,
0.6925716996192932,
-0.26070278882980347,
0.22726459801197052,
-0.2504418194293976,
0.48743242025375366,
0.020454376935958862,
-0.6066097021102905,
0.4200374484062195,
-0.2548578083515167,
-0.20416449010372162,
-0.04122285544872284,
-0.1717182844877243,
-0.15596285462379456,
0.7070310115814209,
0.080417200922966,
0.17252378165721893,
0.1165401041507721,
0.3262239694595337,
-0.06403379887342453,
0.0934549868106842,
0.2966891825199127,
-0.43778330087661743,
0.22902865707874298,
-0.06242629885673523,
0.18298950791358948,
0.15696923434734344,
-0.0804341658949852,
0.0565103255212307,
0.12404024600982666,
-0.2584003210067749,
0.20868955552577972,
0.07172196358442307,
-0.3600728511810303,
0.36349809169769287,
0.03982042148709297,
0.052144378423690796,
-0.24333371222019196,
0.6011238694190979,
0.010904364287853241,
-0.23199571669101715,
0.09407608211040497,
0.043698929250240326,
0.1931171417236328,
-0.012696700170636177,
-0.262334406375885,
-0.16974301636219025,
0.12629976868629456,
0.09679844230413437,
-0.14593838155269623,
-0.12057466059923172,
-0.3000967502593994,
-0.4416503310203552,
-0.22375410795211792,
0.36008012294769287,
0.604175329208374,
-0.05056420713663101,
-0.05884856730699539,
0.2081899344921112,
-0.08617144823074341,
0.1668846607208252,
-0.006943525746464729,
0.06400171667337418,
-0.13817033171653748,
0.3867056369781494,
-0.023509729653596878,
-0.12429095059633255,
0.20148886740207672,
0.31319642066955566,
-0.1574302613735199,
-0.16826200485229492,
0.2568940222263336,
-0.26546698808670044,
-0.09693731367588043,
-0.05739220231771469,
-0.033052124083042145,
0.13893228769302368,
-0.36251628398895264,
0.016991881653666496,
-0.10655897110700607,
0.016631394624710083,
0.09930668771266937,
0.08376258611679077,
0.18398329615592957,
0.10752745717763901,
-0.32399293780326843,
-0.1815752387046814,
-0.37178316712379456,
-0.027891919016838074,
-0.1365000158548355,
0.05056663230061531,
0.27340400218963623,
0.13057619333267212,
0.10531774163246155,
0.37649181485176086,
-0.13172711431980133,
0.12283793836832047,
0.08179929107427597,
0.39739230275154114,
-0.051866911351680756,
0.005020808428525925,
-0.1158292293548584,
-0.029192037880420685,
-0.18753820657730103,
0.09087155759334564,
-0.14214710891246796,
0.004255726933479309,
0.08487814664840698,
0.22508566081523895,
0.19454526901245117,
-0.07184553146362305,
-0.0755309984087944,
-0.21736083924770355,
0.11622151732444763,
-0.4500409662723541,
0.04876740649342537,
0.01603393629193306,
-0.1881898194551468,
0.04671218618750572,
0.5341084003448486,
0.16230949759483337,
-0.4041571617126465,
0.14515186846256256,
-0.08664363622665405,
-0.050596341490745544,
-0.03202469274401665,
0.10413791239261627,
0.1630801409482956,
-0.004990085959434509,
-0.0814535841345787,
-0.034553855657577515,
0.36597639322280884,
0.1690801978111267,
0.47543784976005554,
-0.22721178829669952,
0.0704820454120636,
-0.029281016439199448,
0.1734144538640976,
0.23257805407047272,
-0.3147434890270233,
-0.05992045998573303,
0.34154707193374634,
0.024122482165694237,
0.02826526388525963,
-0.19900518655776978,
0.3771486282348633,
0.08671785891056061,
-0.11692649126052856,
0.26958051323890686,
0.29131320118904114,
-0.3984215557575226,
0.10716904699802399,
0.1387806236743927,
0.5225745439529419,
-0.32876574993133545,
0.26857656240463257,
0.026906102895736694,
0.08572331070899963,
0.1760588437318802,
0.2698517143726349,
0.31044960021972656,
0.17821219563484192,
-0.07478207349777222,
0.029380742460489273,
0.24966013431549072,
0.3985043168067932,
-0.10355116426944733,
-0.18747630715370178,
-0.48948919773101807,
-0.07363858819007874,
-0.00440940260887146,
-0.03696104884147644,
0.12426857650279999,
-0.2778053879737854,
0.2728981673717499,
-0.2847655117511749,
-0.5857908129692078,
0.12542106211185455,
0.32745420932769775,
-0.2013130784034729,
-0.08867983520030975,
0.09267883002758026,
0.011380814015865326,
-0.04623463749885559,
0.09415917098522186,
0.04416845738887787,
0.2097099870443344,
0.5593307614326477,
0.08588671684265137,
0.018109694123268127,
0.15415777266025543,
-0.07173880189657211,
0.0019631460309028625,
0.4593271017074585,
-0.3261110782623291,
0.1913289576768875,
-0.17257334291934967,
0.0807393342256546,
0.02004319801926613,
-0.031570613384246826,
0.049854833632707596,
0.5228729248046875,
-0.11887183785438538,
0.19383114576339722,
0.0442512184381485,
0.1886545568704605,
-0.11319932341575623,
0.16675320267677307,
-0.12337422370910645,
-0.3006841838359833,
0.030773930251598358,
-0.08147546648979187,
-0.013105197809636593,
0.028823094442486763,
-0.06652213633060455,
0.06685866415500641,
0.2088635414838791,
0.28209030628204346,
0.14854615926742554,
-0.1038462221622467,
0.10289027541875839,
0.06941033899784088,
-0.3599321246147156,
0.12591658532619476,
0.23666703701019287,
-0.2897270917892456,
0.19593128561973572,
0.050557758659124374,
-0.03994067758321762,
0.07085323333740234,
0.25427886843681335,
0.17480121552944183,
0.030376659706234932,
-0.274774432182312,
-0.3522977828979492,
-0.6728180050849915,
0.30238524079322815,
0.017480721697211266,
0.2508772313594818,
-0.10238110274076462,
0.011732114478945732,
0.056380223482847214,
-0.053125523030757904,
-0.2462203949689865,
-0.25243067741394043,
-0.03877707198262215,
0.35247811675071716,
-0.09575033187866211,
0.0024708323180675507,
-0.2875678539276123,
0.39957261085510254,
0.14586257934570312,
-0.19724130630493164,
0.06539047509431839,
-0.059779372066259384,
-0.08639679104089737,
0.26575350761413574,
-0.42360132932662964,
-0.1760619580745697,
0.06769068539142609,
0.49641892313957214,
0.06497205793857574,
0.20992223918437958,
0.060078270733356476,
0.18017439544200897,
-0.09818664193153381,
0.04511198401451111,
-0.01882946863770485,
-0.05288352072238922,
-0.08372712135314941,
0.2601967453956604,
-0.5280181169509888,
-0.0028348080813884735,
-0.49914655089378357,
-0.4764001667499542,
0.12461982667446136,
-0.015533285215497017,
0.010844174772500992,
-0.21057768166065216,
-0.2984161376953125,
0.0919269546866417,
0.26457035541534424,
0.44018810987472534,
-0.05071784555912018,
-0.059896551072597504,
-0.21876880526542664,
0.009230872616171837,
0.26662784814834595,
-0.6458789706230164,
-0.2884700298309326,
-0.2124376744031906,
0.13455480337142944,
-0.04036334156990051,
-0.05963508039712906,
-0.40264075994491577,
-0.07239661365747452,
0.2834528684616089,
-0.0711669996380806,
-0.43617549538612366,
-0.17188072204589844,
-0.05042065680027008,
-0.17073149979114532,
-0.23805437982082367,
0.4838343560695648,
-0.04084958881139755,
-0.2001533955335617,
-0.09643684327602386,
-0.17171989381313324
] |
https://github.com/huggingface/datasets/issues/2185 | .map() and distributed training | This cache process isn't really consistent. I just changed `per_device_train_batch_size` of training script and now it rebuilding the dataset cache!!!! Why? | Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters. | 21 | .map() and distributed training
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
This cache process isn't really consistent. I just changed `per_device_train_batch_size` of training script and now it rebuilding the dataset cache!!!! Why? | [
-0.25376173853874207,
-0.2207169234752655,
0.11777672171592712,
0.07457448542118073,
0.2116168737411499,
-0.10975942015647888,
0.517072856426239,
0.010205429047346115,
0.28015705943107605,
0.023762956261634827,
0.1822476089000702,
0.34344959259033203,
-0.22906433045864105,
-0.5855441093444824,
0.0941428542137146,
0.06153406202793121,
0.1861158013343811,
0.036659859120845795,
-0.037735842168331146,
-0.2008032649755478,
-0.15293297171592712,
0.07591672986745834,
-0.15427079796791077,
0.11705100536346436,
-0.7540706396102905,
-0.15231508016586304,
-0.18345360457897186,
0.1027398332953453,
0.22531794011592865,
-0.3499089479446411,
0.2342275232076645,
0.2213345170021057,
0.4013623595237732,
0.5336914658546448,
-0.00012720905942842364,
0.031262725591659546,
0.18786080181598663,
-0.19833096861839294,
0.03971799835562706,
-0.047676265239715576,
0.16418999433517456,
0.005025122314691544,
0.19361120462417603,
-0.29533651471138,
0.13107287883758545,
-0.14767341315746307,
0.3262224793434143,
-0.4418163001537323,
0.4140009880065918,
-0.10773000866174698,
-0.0018774829804897308,
0.09438946098089218,
-0.5714960098266602,
0.13987627625465393,
-0.2214406132698059,
0.12348013371229172,
0.17111380398273468,
0.2180825024843216,
0.3029264807701111,
-0.34165555238723755,
-0.3789149820804596,
0.15822704136371613,
-0.14662371575832367,
0.13405944406986237,
0.4135625660419464,
0.036601874977350235,
-0.07898802310228348,
-0.34870049357414246,
-0.07574982196092606,
-0.12185835093259811,
0.10768753290176392,
-0.07430695742368698,
-0.18817922472953796,
-0.466538667678833,
-0.2733979821205139,
-0.0016579926013946533,
-0.002462737262248993,
0.11624366044998169,
-0.02337254211306572,
-0.11971379816532135,
-0.5124093294143677,
-0.06252461671829224,
0.055294573307037354,
0.13265389204025269,
-0.2732614278793335,
0.4564460813999176,
-0.02547357976436615,
0.3163392245769501,
0.14199258387088776,
0.05433782562613487,
0.08374596387147903,
-0.17199194431304932,
0.12963683903217316,
0.37158313393592834,
0.027552861720323563,
0.014174208045005798,
0.048927925527095795,
-0.3223406970500946,
-0.023288968950510025,
0.03560980409383774,
0.23210692405700684,
0.259809672832489,
-0.04798610135912895,
0.2657663822174072,
0.40077006816864014,
0.09275078773498535,
-0.13914108276367188,
0.6415418386459351,
0.030111387372016907,
-0.2004719078540802,
-0.6418221592903137,
-0.17241254448890686,
-0.35194510221481323,
-0.062735415995121,
0.33358922600746155,
0.04270993173122406,
-0.20984522998332977,
0.07222741842269897,
0.46040472388267517,
-0.23941722512245178,
-0.006529923528432846,
-0.13254378736019135,
0.021212106570601463,
0.250815212726593,
0.12879353761672974,
0.4370376467704773,
-0.05552695691585541,
0.10142675042152405,
-0.19016055762767792,
0.1589490920305252,
-0.05960412696003914,
-0.3029898703098297,
-0.30491068959236145,
0.3160684406757355,
0.16187681257724762,
0.18775923550128937,
0.4239693582057953,
-0.1001104786992073,
0.28944188356399536,
-0.16136983036994934,
0.3981885313987732,
-0.11204597353935242,
0.6585770845413208,
0.10445903241634369,
-0.2513783574104309,
0.22236572206020355,
0.1862221658229828,
0.3770999312400818,
-0.15356317162513733,
0.3354168236255646,
-0.5022830367088318,
-0.4383485019207001,
0.47987520694732666,
-0.07329696416854858,
-0.009594003669917583,
0.06920219957828522,
-0.17672228813171387,
0.04275926575064659,
0.5391665101051331,
-0.2560787796974182,
0.13442404568195343,
-0.35754597187042236,
-0.20906561613082886,
-0.177628293633461,
0.2568799555301666,
0.45516157150268555,
0.3137149214744568,
-0.34181711077690125,
0.12416864186525345,
0.3162249028682709,
0.20818297564983368,
0.22909453511238098,
-0.6239327192306519,
0.38981038331985474,
-0.21997983753681183,
0.274752140045166,
0.3872866630554199,
-0.35712242126464844,
-0.14352302253246307,
0.2945983111858368,
-0.09897400438785553,
0.02335912175476551,
-0.15709400177001953,
-0.024981820955872536,
0.4641163945198059,
-0.02523188851773739,
0.12588214874267578,
0.2964545488357544,
-0.21626226603984833,
0.2001037448644638,
-0.2617366313934326,
0.01691913791000843,
0.08043812215328217,
-0.007085621356964111,
0.19472073018550873,
0.0033709704875946045,
-0.012801364064216614,
0.11961949616670609,
0.2070770263671875,
0.01023024320602417,
0.228379026055336,
0.025254253298044205,
-0.3850671350955963,
0.09240898489952087,
0.16548283398151398,
0.06651946902275085,
-0.15049803256988525,
0.18142437934875488,
-0.033235277980566025,
-0.39592960476875305,
-0.1602506786584854,
-0.05221188813447952,
0.16287502646446228,
-0.20769380033016205,
-0.31089189648628235,
-0.14020736515522003,
-0.11415519565343857,
0.1380292922258377,
-0.0407925620675087,
-0.2170623391866684,
-0.3000539243221283,
-0.09362832456827164,
0.14104333519935608,
-0.058869391679763794,
0.2177683264017105,
0.10378053039312363,
0.19145244359970093,
-0.12039594352245331,
-0.43175914883613586,
-0.1487242579460144,
0.10814172029495239,
-0.2924800515174866,
-0.10761493444442749,
0.37763455510139465,
0.045573558658361435,
0.20801950991153717,
-0.11058460921049118,
0.3216453194618225,
0.2376917451620102,
0.0668996125459671,
0.1610090732574463,
0.1279924064874649,
-0.12457174062728882,
-0.15120220184326172,
-0.14207813143730164,
0.34654200077056885,
0.12898965179920197,
0.14713574945926666,
-0.015548273921012878,
0.016348624601960182,
0.041823387145996094,
0.0829826295375824,
-0.23968765139579773,
-0.08248860388994217,
-0.32003697752952576,
-0.19217850267887115,
0.2612735629081726,
0.15466296672821045,
0.037915028631687164,
0.0008638352155685425,
0.3312496542930603,
0.026126667857170105,
0.008366033434867859,
-0.14848178625106812,
-0.18063583970069885,
0.04006488621234894,
0.1552489995956421,
0.15723378956317902,
0.3422779440879822,
-0.01425726618617773,
0.3932817280292511,
-0.11448133736848831,
0.10341391712427139,
0.062259137630462646,
-0.08174242824316025,
-0.0038876980543136597,
0.2324124425649643,
0.1578570008277893,
-0.043156180530786514,
0.1835179477930069,
-0.24711290001869202,
-0.10463272035121918,
0.34853455424308777,
-0.24596652388572693,
0.08692938089370728,
0.2329530268907547,
-0.012332623824477196,
0.18088048696517944,
-0.5816079378128052,
0.09181596338748932,
0.0024795811623334885,
0.06690438836812973,
-0.16199831664562225,
0.26040661334991455,
-0.09503914415836334,
0.4181235730648041,
-0.0660853385925293,
0.24358461797237396,
-0.1192762702703476,
-0.2782997488975525,
0.18054983019828796,
-0.1531221866607666,
-0.012159653007984161,
-0.19232702255249023,
0.12843599915504456,
-0.2399805635213852,
-0.022650891914963722,
0.07756088674068451,
-0.05778767541050911,
-0.142929807305336,
0.18273600935935974,
0.11334642767906189,
0.2074275016784668,
-0.555270791053772,
-0.29690954089164734,
-0.032073765993118286,
-0.37879544496536255,
-0.14868271350860596,
0.16863226890563965,
-0.49790841341018677,
0.11927084624767303,
-0.05513763427734375,
0.24526460468769073,
-0.17175626754760742,
-0.12457077205181122,
-0.31703802943229675,
-0.2305707186460495,
-0.019363803789019585,
0.13388170301914215,
-0.05494331941008568,
0.14184030890464783,
0.0033793114125728607,
-0.10536530613899231,
-0.23937885463237762,
-0.17647989094257355,
-0.2918812930583954,
0.06517771631479263,
-0.5251651406288147,
0.388630747795105,
-0.18672248721122742,
-0.047137100249528885,
-0.10934805870056152,
-0.046108976006507874,
-0.06540895998477936,
0.6399708390235901,
-0.33489859104156494,
0.0144050819799304,
0.30953270196914673,
-0.010113779455423355,
-0.09659664332866669,
0.11164762824773788,
0.5424691438674927,
0.10664817690849304,
0.12662513554096222,
-0.05499907582998276,
0.2443145513534546,
0.25604167580604553,
0.1710580587387085,
0.05137454718351364,
0.15952777862548828,
-0.119390107691288,
0.16371288895606995,
1.2782384157180786,
0.15221929550170898,
-0.0518912635743618,
0.026243343949317932,
0.031482189893722534,
-0.014047358185052872,
0.06866714358329773,
-0.1058129221200943,
0.061383772641420364,
-0.3951035439968109,
-0.13081268966197968,
0.1793062388896942,
0.18719390034675598,
-0.5139588713645935,
0.05212712287902832,
0.19363155961036682,
-0.012220803648233414,
-0.30191633105278015,
0.3315782845020294,
-0.7171846628189087,
0.5827731490135193,
0.059084195643663406,
0.017888806760311127,
-0.4254792630672455,
0.04540019482374191,
0.09452086687088013,
-0.15131594240665436,
0.7113603353500366,
0.05342082679271698,
-0.4360215663909912,
0.0862673968076706,
-0.19184187054634094,
0.039407968521118164,
0.21483564376831055,
0.20287688076496124,
0.09526984393596649,
-0.17031651735305786,
0.1477959156036377,
0.17292891442775726,
0.4053846001625061,
-0.06395360827445984,
0.022406620904803276,
0.11699411273002625,
-0.21794059872627258,
-0.13278435170650482,
-0.1501162052154541,
0.06436406075954437,
0.37004613876342773,
0.023649295791983604,
0.43080124258995056,
-0.030336622148752213,
-0.17746898531913757,
-0.4406900703907013,
0.08842097967863083,
-0.3515690267086029,
-0.043363992124795914,
-0.1870867908000946,
0.07596608251333237,
-0.29609501361846924,
0.20950931310653687,
0.30478978157043457,
-0.17358353734016418,
-0.02137071080505848,
-0.2622394263744354,
-0.015995165333151817,
0.31471988558769226,
-0.10367757081985474,
0.03708246350288391,
0.24423357844352722,
0.14812271296977997,
0.013170339167118073,
0.4719136953353882,
0.2137567102909088,
0.21387799084186554,
0.3546659052371979,
-0.32741880416870117,
-0.1393890529870987,
0.036832213401794434,
0.007355113513767719,
0.23407024145126343,
0.1898229569196701,
0.0306466743350029,
-0.23610249161720276,
0.177387535572052,
-0.16774247586727142,
-0.2283780425786972,
0.29504159092903137,
0.11787275224924088,
0.06849812716245651,
-0.17577962577342987,
-0.4709654450416565,
0.09216675162315369,
0.18397745490074158,
-0.22207117080688477,
0.4868578314781189,
-0.8516538143157959,
-0.26168036460876465,
0.4181652069091797,
0.0608363151550293,
0.6925716996192932,
-0.26070278882980347,
0.22726459801197052,
-0.2504418194293976,
0.48743242025375366,
0.020454376935958862,
-0.6066097021102905,
0.4200374484062195,
-0.2548578083515167,
-0.20416449010372162,
-0.04122285544872284,
-0.1717182844877243,
-0.15596285462379456,
0.7070310115814209,
0.080417200922966,
0.17252378165721893,
0.1165401041507721,
0.3262239694595337,
-0.06403379887342453,
0.0934549868106842,
0.2966891825199127,
-0.43778330087661743,
0.22902865707874298,
-0.06242629885673523,
0.18298950791358948,
0.15696923434734344,
-0.0804341658949852,
0.0565103255212307,
0.12404024600982666,
-0.2584003210067749,
0.20868955552577972,
0.07172196358442307,
-0.3600728511810303,
0.36349809169769287,
0.03982042148709297,
0.052144378423690796,
-0.24333371222019196,
0.6011238694190979,
0.010904364287853241,
-0.23199571669101715,
0.09407608211040497,
0.043698929250240326,
0.1931171417236328,
-0.012696700170636177,
-0.262334406375885,
-0.16974301636219025,
0.12629976868629456,
0.09679844230413437,
-0.14593838155269623,
-0.12057466059923172,
-0.3000967502593994,
-0.4416503310203552,
-0.22375410795211792,
0.36008012294769287,
0.604175329208374,
-0.05056420713663101,
-0.05884856730699539,
0.2081899344921112,
-0.08617144823074341,
0.1668846607208252,
-0.006943525746464729,
0.06400171667337418,
-0.13817033171653748,
0.3867056369781494,
-0.023509729653596878,
-0.12429095059633255,
0.20148886740207672,
0.31319642066955566,
-0.1574302613735199,
-0.16826200485229492,
0.2568940222263336,
-0.26546698808670044,
-0.09693731367588043,
-0.05739220231771469,
-0.033052124083042145,
0.13893228769302368,
-0.36251628398895264,
0.016991881653666496,
-0.10655897110700607,
0.016631394624710083,
0.09930668771266937,
0.08376258611679077,
0.18398329615592957,
0.10752745717763901,
-0.32399293780326843,
-0.1815752387046814,
-0.37178316712379456,
-0.027891919016838074,
-0.1365000158548355,
0.05056663230061531,
0.27340400218963623,
0.13057619333267212,
0.10531774163246155,
0.37649181485176086,
-0.13172711431980133,
0.12283793836832047,
0.08179929107427597,
0.39739230275154114,
-0.051866911351680756,
0.005020808428525925,
-0.1158292293548584,
-0.029192037880420685,
-0.18753820657730103,
0.09087155759334564,
-0.14214710891246796,
0.004255726933479309,
0.08487814664840698,
0.22508566081523895,
0.19454526901245117,
-0.07184553146362305,
-0.0755309984087944,
-0.21736083924770355,
0.11622151732444763,
-0.4500409662723541,
0.04876740649342537,
0.01603393629193306,
-0.1881898194551468,
0.04671218618750572,
0.5341084003448486,
0.16230949759483337,
-0.4041571617126465,
0.14515186846256256,
-0.08664363622665405,
-0.050596341490745544,
-0.03202469274401665,
0.10413791239261627,
0.1630801409482956,
-0.004990085959434509,
-0.0814535841345787,
-0.034553855657577515,
0.36597639322280884,
0.1690801978111267,
0.47543784976005554,
-0.22721178829669952,
0.0704820454120636,
-0.029281016439199448,
0.1734144538640976,
0.23257805407047272,
-0.3147434890270233,
-0.05992045998573303,
0.34154707193374634,
0.024122482165694237,
0.02826526388525963,
-0.19900518655776978,
0.3771486282348633,
0.08671785891056061,
-0.11692649126052856,
0.26958051323890686,
0.29131320118904114,
-0.3984215557575226,
0.10716904699802399,
0.1387806236743927,
0.5225745439529419,
-0.32876574993133545,
0.26857656240463257,
0.026906102895736694,
0.08572331070899963,
0.1760588437318802,
0.2698517143726349,
0.31044960021972656,
0.17821219563484192,
-0.07478207349777222,
0.029380742460489273,
0.24966013431549072,
0.3985043168067932,
-0.10355116426944733,
-0.18747630715370178,
-0.48948919773101807,
-0.07363858819007874,
-0.00440940260887146,
-0.03696104884147644,
0.12426857650279999,
-0.2778053879737854,
0.2728981673717499,
-0.2847655117511749,
-0.5857908129692078,
0.12542106211185455,
0.32745420932769775,
-0.2013130784034729,
-0.08867983520030975,
0.09267883002758026,
0.011380814015865326,
-0.04623463749885559,
0.09415917098522186,
0.04416845738887787,
0.2097099870443344,
0.5593307614326477,
0.08588671684265137,
0.018109694123268127,
0.15415777266025543,
-0.07173880189657211,
0.0019631460309028625,
0.4593271017074585,
-0.3261110782623291,
0.1913289576768875,
-0.17257334291934967,
0.0807393342256546,
0.02004319801926613,
-0.031570613384246826,
0.049854833632707596,
0.5228729248046875,
-0.11887183785438538,
0.19383114576339722,
0.0442512184381485,
0.1886545568704605,
-0.11319932341575623,
0.16675320267677307,
-0.12337422370910645,
-0.3006841838359833,
0.030773930251598358,
-0.08147546648979187,
-0.013105197809636593,
0.028823094442486763,
-0.06652213633060455,
0.06685866415500641,
0.2088635414838791,
0.28209030628204346,
0.14854615926742554,
-0.1038462221622467,
0.10289027541875839,
0.06941033899784088,
-0.3599321246147156,
0.12591658532619476,
0.23666703701019287,
-0.2897270917892456,
0.19593128561973572,
0.050557758659124374,
-0.03994067758321762,
0.07085323333740234,
0.25427886843681335,
0.17480121552944183,
0.030376659706234932,
-0.274774432182312,
-0.3522977828979492,
-0.6728180050849915,
0.30238524079322815,
0.017480721697211266,
0.2508772313594818,
-0.10238110274076462,
0.011732114478945732,
0.056380223482847214,
-0.053125523030757904,
-0.2462203949689865,
-0.25243067741394043,
-0.03877707198262215,
0.35247811675071716,
-0.09575033187866211,
0.0024708323180675507,
-0.2875678539276123,
0.39957261085510254,
0.14586257934570312,
-0.19724130630493164,
0.06539047509431839,
-0.059779372066259384,
-0.08639679104089737,
0.26575350761413574,
-0.42360132932662964,
-0.1760619580745697,
0.06769068539142609,
0.49641892313957214,
0.06497205793857574,
0.20992223918437958,
0.060078270733356476,
0.18017439544200897,
-0.09818664193153381,
0.04511198401451111,
-0.01882946863770485,
-0.05288352072238922,
-0.08372712135314941,
0.2601967453956604,
-0.5280181169509888,
-0.0028348080813884735,
-0.49914655089378357,
-0.4764001667499542,
0.12461982667446136,
-0.015533285215497017,
0.010844174772500992,
-0.21057768166065216,
-0.2984161376953125,
0.0919269546866417,
0.26457035541534424,
0.44018810987472534,
-0.05071784555912018,
-0.059896551072597504,
-0.21876880526542664,
0.009230872616171837,
0.26662784814834595,
-0.6458789706230164,
-0.2884700298309326,
-0.2124376744031906,
0.13455480337142944,
-0.04036334156990051,
-0.05963508039712906,
-0.40264075994491577,
-0.07239661365747452,
0.2834528684616089,
-0.0711669996380806,
-0.43617549538612366,
-0.17188072204589844,
-0.05042065680027008,
-0.17073149979114532,
-0.23805437982082367,
0.4838343560695648,
-0.04084958881139755,
-0.2001533955335617,
-0.09643684327602386,
-0.17171989381313324
] |
https://github.com/huggingface/datasets/issues/2185 | .map() and distributed training | Hi ! A `map` function is recomputed if the code changes or if any of the variables it uses changes. Can you check that your function doesn't use `per_device_train_batch_size` or any variable that contains `per_device_train_batch_size` ? | Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters. | 36 | .map() and distributed training
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
Hi ! A `map` function is recomputed if the code changes or if any of the variables it uses changes. Can you check that your function doesn't use `per_device_train_batch_size` or any variable that contains `per_device_train_batch_size` ? | [
-0.25376173853874207,
-0.2207169234752655,
0.11777672171592712,
0.07457448542118073,
0.2116168737411499,
-0.10975942015647888,
0.517072856426239,
0.010205429047346115,
0.28015705943107605,
0.023762956261634827,
0.1822476089000702,
0.34344959259033203,
-0.22906433045864105,
-0.5855441093444824,
0.0941428542137146,
0.06153406202793121,
0.1861158013343811,
0.036659859120845795,
-0.037735842168331146,
-0.2008032649755478,
-0.15293297171592712,
0.07591672986745834,
-0.15427079796791077,
0.11705100536346436,
-0.7540706396102905,
-0.15231508016586304,
-0.18345360457897186,
0.1027398332953453,
0.22531794011592865,
-0.3499089479446411,
0.2342275232076645,
0.2213345170021057,
0.4013623595237732,
0.5336914658546448,
-0.00012720905942842364,
0.031262725591659546,
0.18786080181598663,
-0.19833096861839294,
0.03971799835562706,
-0.047676265239715576,
0.16418999433517456,
0.005025122314691544,
0.19361120462417603,
-0.29533651471138,
0.13107287883758545,
-0.14767341315746307,
0.3262224793434143,
-0.4418163001537323,
0.4140009880065918,
-0.10773000866174698,
-0.0018774829804897308,
0.09438946098089218,
-0.5714960098266602,
0.13987627625465393,
-0.2214406132698059,
0.12348013371229172,
0.17111380398273468,
0.2180825024843216,
0.3029264807701111,
-0.34165555238723755,
-0.3789149820804596,
0.15822704136371613,
-0.14662371575832367,
0.13405944406986237,
0.4135625660419464,
0.036601874977350235,
-0.07898802310228348,
-0.34870049357414246,
-0.07574982196092606,
-0.12185835093259811,
0.10768753290176392,
-0.07430695742368698,
-0.18817922472953796,
-0.466538667678833,
-0.2733979821205139,
-0.0016579926013946533,
-0.002462737262248993,
0.11624366044998169,
-0.02337254211306572,
-0.11971379816532135,
-0.5124093294143677,
-0.06252461671829224,
0.055294573307037354,
0.13265389204025269,
-0.2732614278793335,
0.4564460813999176,
-0.02547357976436615,
0.3163392245769501,
0.14199258387088776,
0.05433782562613487,
0.08374596387147903,
-0.17199194431304932,
0.12963683903217316,
0.37158313393592834,
0.027552861720323563,
0.014174208045005798,
0.048927925527095795,
-0.3223406970500946,
-0.023288968950510025,
0.03560980409383774,
0.23210692405700684,
0.259809672832489,
-0.04798610135912895,
0.2657663822174072,
0.40077006816864014,
0.09275078773498535,
-0.13914108276367188,
0.6415418386459351,
0.030111387372016907,
-0.2004719078540802,
-0.6418221592903137,
-0.17241254448890686,
-0.35194510221481323,
-0.062735415995121,
0.33358922600746155,
0.04270993173122406,
-0.20984522998332977,
0.07222741842269897,
0.46040472388267517,
-0.23941722512245178,
-0.006529923528432846,
-0.13254378736019135,
0.021212106570601463,
0.250815212726593,
0.12879353761672974,
0.4370376467704773,
-0.05552695691585541,
0.10142675042152405,
-0.19016055762767792,
0.1589490920305252,
-0.05960412696003914,
-0.3029898703098297,
-0.30491068959236145,
0.3160684406757355,
0.16187681257724762,
0.18775923550128937,
0.4239693582057953,
-0.1001104786992073,
0.28944188356399536,
-0.16136983036994934,
0.3981885313987732,
-0.11204597353935242,
0.6585770845413208,
0.10445903241634369,
-0.2513783574104309,
0.22236572206020355,
0.1862221658229828,
0.3770999312400818,
-0.15356317162513733,
0.3354168236255646,
-0.5022830367088318,
-0.4383485019207001,
0.47987520694732666,
-0.07329696416854858,
-0.009594003669917583,
0.06920219957828522,
-0.17672228813171387,
0.04275926575064659,
0.5391665101051331,
-0.2560787796974182,
0.13442404568195343,
-0.35754597187042236,
-0.20906561613082886,
-0.177628293633461,
0.2568799555301666,
0.45516157150268555,
0.3137149214744568,
-0.34181711077690125,
0.12416864186525345,
0.3162249028682709,
0.20818297564983368,
0.22909453511238098,
-0.6239327192306519,
0.38981038331985474,
-0.21997983753681183,
0.274752140045166,
0.3872866630554199,
-0.35712242126464844,
-0.14352302253246307,
0.2945983111858368,
-0.09897400438785553,
0.02335912175476551,
-0.15709400177001953,
-0.024981820955872536,
0.4641163945198059,
-0.02523188851773739,
0.12588214874267578,
0.2964545488357544,
-0.21626226603984833,
0.2001037448644638,
-0.2617366313934326,
0.01691913791000843,
0.08043812215328217,
-0.007085621356964111,
0.19472073018550873,
0.0033709704875946045,
-0.012801364064216614,
0.11961949616670609,
0.2070770263671875,
0.01023024320602417,
0.228379026055336,
0.025254253298044205,
-0.3850671350955963,
0.09240898489952087,
0.16548283398151398,
0.06651946902275085,
-0.15049803256988525,
0.18142437934875488,
-0.033235277980566025,
-0.39592960476875305,
-0.1602506786584854,
-0.05221188813447952,
0.16287502646446228,
-0.20769380033016205,
-0.31089189648628235,
-0.14020736515522003,
-0.11415519565343857,
0.1380292922258377,
-0.0407925620675087,
-0.2170623391866684,
-0.3000539243221283,
-0.09362832456827164,
0.14104333519935608,
-0.058869391679763794,
0.2177683264017105,
0.10378053039312363,
0.19145244359970093,
-0.12039594352245331,
-0.43175914883613586,
-0.1487242579460144,
0.10814172029495239,
-0.2924800515174866,
-0.10761493444442749,
0.37763455510139465,
0.045573558658361435,
0.20801950991153717,
-0.11058460921049118,
0.3216453194618225,
0.2376917451620102,
0.0668996125459671,
0.1610090732574463,
0.1279924064874649,
-0.12457174062728882,
-0.15120220184326172,
-0.14207813143730164,
0.34654200077056885,
0.12898965179920197,
0.14713574945926666,
-0.015548273921012878,
0.016348624601960182,
0.041823387145996094,
0.0829826295375824,
-0.23968765139579773,
-0.08248860388994217,
-0.32003697752952576,
-0.19217850267887115,
0.2612735629081726,
0.15466296672821045,
0.037915028631687164,
0.0008638352155685425,
0.3312496542930603,
0.026126667857170105,
0.008366033434867859,
-0.14848178625106812,
-0.18063583970069885,
0.04006488621234894,
0.1552489995956421,
0.15723378956317902,
0.3422779440879822,
-0.01425726618617773,
0.3932817280292511,
-0.11448133736848831,
0.10341391712427139,
0.062259137630462646,
-0.08174242824316025,
-0.0038876980543136597,
0.2324124425649643,
0.1578570008277893,
-0.043156180530786514,
0.1835179477930069,
-0.24711290001869202,
-0.10463272035121918,
0.34853455424308777,
-0.24596652388572693,
0.08692938089370728,
0.2329530268907547,
-0.012332623824477196,
0.18088048696517944,
-0.5816079378128052,
0.09181596338748932,
0.0024795811623334885,
0.06690438836812973,
-0.16199831664562225,
0.26040661334991455,
-0.09503914415836334,
0.4181235730648041,
-0.0660853385925293,
0.24358461797237396,
-0.1192762702703476,
-0.2782997488975525,
0.18054983019828796,
-0.1531221866607666,
-0.012159653007984161,
-0.19232702255249023,
0.12843599915504456,
-0.2399805635213852,
-0.022650891914963722,
0.07756088674068451,
-0.05778767541050911,
-0.142929807305336,
0.18273600935935974,
0.11334642767906189,
0.2074275016784668,
-0.555270791053772,
-0.29690954089164734,
-0.032073765993118286,
-0.37879544496536255,
-0.14868271350860596,
0.16863226890563965,
-0.49790841341018677,
0.11927084624767303,
-0.05513763427734375,
0.24526460468769073,
-0.17175626754760742,
-0.12457077205181122,
-0.31703802943229675,
-0.2305707186460495,
-0.019363803789019585,
0.13388170301914215,
-0.05494331941008568,
0.14184030890464783,
0.0033793114125728607,
-0.10536530613899231,
-0.23937885463237762,
-0.17647989094257355,
-0.2918812930583954,
0.06517771631479263,
-0.5251651406288147,
0.388630747795105,
-0.18672248721122742,
-0.047137100249528885,
-0.10934805870056152,
-0.046108976006507874,
-0.06540895998477936,
0.6399708390235901,
-0.33489859104156494,
0.0144050819799304,
0.30953270196914673,
-0.010113779455423355,
-0.09659664332866669,
0.11164762824773788,
0.5424691438674927,
0.10664817690849304,
0.12662513554096222,
-0.05499907582998276,
0.2443145513534546,
0.25604167580604553,
0.1710580587387085,
0.05137454718351364,
0.15952777862548828,
-0.119390107691288,
0.16371288895606995,
1.2782384157180786,
0.15221929550170898,
-0.0518912635743618,
0.026243343949317932,
0.031482189893722534,
-0.014047358185052872,
0.06866714358329773,
-0.1058129221200943,
0.061383772641420364,
-0.3951035439968109,
-0.13081268966197968,
0.1793062388896942,
0.18719390034675598,
-0.5139588713645935,
0.05212712287902832,
0.19363155961036682,
-0.012220803648233414,
-0.30191633105278015,
0.3315782845020294,
-0.7171846628189087,
0.5827731490135193,
0.059084195643663406,
0.017888806760311127,
-0.4254792630672455,
0.04540019482374191,
0.09452086687088013,
-0.15131594240665436,
0.7113603353500366,
0.05342082679271698,
-0.4360215663909912,
0.0862673968076706,
-0.19184187054634094,
0.039407968521118164,
0.21483564376831055,
0.20287688076496124,
0.09526984393596649,
-0.17031651735305786,
0.1477959156036377,
0.17292891442775726,
0.4053846001625061,
-0.06395360827445984,
0.022406620904803276,
0.11699411273002625,
-0.21794059872627258,
-0.13278435170650482,
-0.1501162052154541,
0.06436406075954437,
0.37004613876342773,
0.023649295791983604,
0.43080124258995056,
-0.030336622148752213,
-0.17746898531913757,
-0.4406900703907013,
0.08842097967863083,
-0.3515690267086029,
-0.043363992124795914,
-0.1870867908000946,
0.07596608251333237,
-0.29609501361846924,
0.20950931310653687,
0.30478978157043457,
-0.17358353734016418,
-0.02137071080505848,
-0.2622394263744354,
-0.015995165333151817,
0.31471988558769226,
-0.10367757081985474,
0.03708246350288391,
0.24423357844352722,
0.14812271296977997,
0.013170339167118073,
0.4719136953353882,
0.2137567102909088,
0.21387799084186554,
0.3546659052371979,
-0.32741880416870117,
-0.1393890529870987,
0.036832213401794434,
0.007355113513767719,
0.23407024145126343,
0.1898229569196701,
0.0306466743350029,
-0.23610249161720276,
0.177387535572052,
-0.16774247586727142,
-0.2283780425786972,
0.29504159092903137,
0.11787275224924088,
0.06849812716245651,
-0.17577962577342987,
-0.4709654450416565,
0.09216675162315369,
0.18397745490074158,
-0.22207117080688477,
0.4868578314781189,
-0.8516538143157959,
-0.26168036460876465,
0.4181652069091797,
0.0608363151550293,
0.6925716996192932,
-0.26070278882980347,
0.22726459801197052,
-0.2504418194293976,
0.48743242025375366,
0.020454376935958862,
-0.6066097021102905,
0.4200374484062195,
-0.2548578083515167,
-0.20416449010372162,
-0.04122285544872284,
-0.1717182844877243,
-0.15596285462379456,
0.7070310115814209,
0.080417200922966,
0.17252378165721893,
0.1165401041507721,
0.3262239694595337,
-0.06403379887342453,
0.0934549868106842,
0.2966891825199127,
-0.43778330087661743,
0.22902865707874298,
-0.06242629885673523,
0.18298950791358948,
0.15696923434734344,
-0.0804341658949852,
0.0565103255212307,
0.12404024600982666,
-0.2584003210067749,
0.20868955552577972,
0.07172196358442307,
-0.3600728511810303,
0.36349809169769287,
0.03982042148709297,
0.052144378423690796,
-0.24333371222019196,
0.6011238694190979,
0.010904364287853241,
-0.23199571669101715,
0.09407608211040497,
0.043698929250240326,
0.1931171417236328,
-0.012696700170636177,
-0.262334406375885,
-0.16974301636219025,
0.12629976868629456,
0.09679844230413437,
-0.14593838155269623,
-0.12057466059923172,
-0.3000967502593994,
-0.4416503310203552,
-0.22375410795211792,
0.36008012294769287,
0.604175329208374,
-0.05056420713663101,
-0.05884856730699539,
0.2081899344921112,
-0.08617144823074341,
0.1668846607208252,
-0.006943525746464729,
0.06400171667337418,
-0.13817033171653748,
0.3867056369781494,
-0.023509729653596878,
-0.12429095059633255,
0.20148886740207672,
0.31319642066955566,
-0.1574302613735199,
-0.16826200485229492,
0.2568940222263336,
-0.26546698808670044,
-0.09693731367588043,
-0.05739220231771469,
-0.033052124083042145,
0.13893228769302368,
-0.36251628398895264,
0.016991881653666496,
-0.10655897110700607,
0.016631394624710083,
0.09930668771266937,
0.08376258611679077,
0.18398329615592957,
0.10752745717763901,
-0.32399293780326843,
-0.1815752387046814,
-0.37178316712379456,
-0.027891919016838074,
-0.1365000158548355,
0.05056663230061531,
0.27340400218963623,
0.13057619333267212,
0.10531774163246155,
0.37649181485176086,
-0.13172711431980133,
0.12283793836832047,
0.08179929107427597,
0.39739230275154114,
-0.051866911351680756,
0.005020808428525925,
-0.1158292293548584,
-0.029192037880420685,
-0.18753820657730103,
0.09087155759334564,
-0.14214710891246796,
0.004255726933479309,
0.08487814664840698,
0.22508566081523895,
0.19454526901245117,
-0.07184553146362305,
-0.0755309984087944,
-0.21736083924770355,
0.11622151732444763,
-0.4500409662723541,
0.04876740649342537,
0.01603393629193306,
-0.1881898194551468,
0.04671218618750572,
0.5341084003448486,
0.16230949759483337,
-0.4041571617126465,
0.14515186846256256,
-0.08664363622665405,
-0.050596341490745544,
-0.03202469274401665,
0.10413791239261627,
0.1630801409482956,
-0.004990085959434509,
-0.0814535841345787,
-0.034553855657577515,
0.36597639322280884,
0.1690801978111267,
0.47543784976005554,
-0.22721178829669952,
0.0704820454120636,
-0.029281016439199448,
0.1734144538640976,
0.23257805407047272,
-0.3147434890270233,
-0.05992045998573303,
0.34154707193374634,
0.024122482165694237,
0.02826526388525963,
-0.19900518655776978,
0.3771486282348633,
0.08671785891056061,
-0.11692649126052856,
0.26958051323890686,
0.29131320118904114,
-0.3984215557575226,
0.10716904699802399,
0.1387806236743927,
0.5225745439529419,
-0.32876574993133545,
0.26857656240463257,
0.026906102895736694,
0.08572331070899963,
0.1760588437318802,
0.2698517143726349,
0.31044960021972656,
0.17821219563484192,
-0.07478207349777222,
0.029380742460489273,
0.24966013431549072,
0.3985043168067932,
-0.10355116426944733,
-0.18747630715370178,
-0.48948919773101807,
-0.07363858819007874,
-0.00440940260887146,
-0.03696104884147644,
0.12426857650279999,
-0.2778053879737854,
0.2728981673717499,
-0.2847655117511749,
-0.5857908129692078,
0.12542106211185455,
0.32745420932769775,
-0.2013130784034729,
-0.08867983520030975,
0.09267883002758026,
0.011380814015865326,
-0.04623463749885559,
0.09415917098522186,
0.04416845738887787,
0.2097099870443344,
0.5593307614326477,
0.08588671684265137,
0.018109694123268127,
0.15415777266025543,
-0.07173880189657211,
0.0019631460309028625,
0.4593271017074585,
-0.3261110782623291,
0.1913289576768875,
-0.17257334291934967,
0.0807393342256546,
0.02004319801926613,
-0.031570613384246826,
0.049854833632707596,
0.5228729248046875,
-0.11887183785438538,
0.19383114576339722,
0.0442512184381485,
0.1886545568704605,
-0.11319932341575623,
0.16675320267677307,
-0.12337422370910645,
-0.3006841838359833,
0.030773930251598358,
-0.08147546648979187,
-0.013105197809636593,
0.028823094442486763,
-0.06652213633060455,
0.06685866415500641,
0.2088635414838791,
0.28209030628204346,
0.14854615926742554,
-0.1038462221622467,
0.10289027541875839,
0.06941033899784088,
-0.3599321246147156,
0.12591658532619476,
0.23666703701019287,
-0.2897270917892456,
0.19593128561973572,
0.050557758659124374,
-0.03994067758321762,
0.07085323333740234,
0.25427886843681335,
0.17480121552944183,
0.030376659706234932,
-0.274774432182312,
-0.3522977828979492,
-0.6728180050849915,
0.30238524079322815,
0.017480721697211266,
0.2508772313594818,
-0.10238110274076462,
0.011732114478945732,
0.056380223482847214,
-0.053125523030757904,
-0.2462203949689865,
-0.25243067741394043,
-0.03877707198262215,
0.35247811675071716,
-0.09575033187866211,
0.0024708323180675507,
-0.2875678539276123,
0.39957261085510254,
0.14586257934570312,
-0.19724130630493164,
0.06539047509431839,
-0.059779372066259384,
-0.08639679104089737,
0.26575350761413574,
-0.42360132932662964,
-0.1760619580745697,
0.06769068539142609,
0.49641892313957214,
0.06497205793857574,
0.20992223918437958,
0.060078270733356476,
0.18017439544200897,
-0.09818664193153381,
0.04511198401451111,
-0.01882946863770485,
-0.05288352072238922,
-0.08372712135314941,
0.2601967453956604,
-0.5280181169509888,
-0.0028348080813884735,
-0.49914655089378357,
-0.4764001667499542,
0.12461982667446136,
-0.015533285215497017,
0.010844174772500992,
-0.21057768166065216,
-0.2984161376953125,
0.0919269546866417,
0.26457035541534424,
0.44018810987472534,
-0.05071784555912018,
-0.059896551072597504,
-0.21876880526542664,
0.009230872616171837,
0.26662784814834595,
-0.6458789706230164,
-0.2884700298309326,
-0.2124376744031906,
0.13455480337142944,
-0.04036334156990051,
-0.05963508039712906,
-0.40264075994491577,
-0.07239661365747452,
0.2834528684616089,
-0.0711669996380806,
-0.43617549538612366,
-0.17188072204589844,
-0.05042065680027008,
-0.17073149979114532,
-0.23805437982082367,
0.4838343560695648,
-0.04084958881139755,
-0.2001533955335617,
-0.09643684327602386,
-0.17171989381313324
] |
https://github.com/huggingface/datasets/issues/2185 | .map() and distributed training | My code is actually a transformer's example for training t5, I modified a bit:
https://github.com/puraminy/transformers/blob/4b40877132eedb566043f83de8f1d29a84d71430/examples/flax/language-modeling/run_t5_mlm_flax.py#L614
No, it doesn't use `per_device_train_batch_size`. I remember it worked for several times and then for no reason or various reasons like the above it started to build the cache again, as if it had an expiration date (maybe), or maybe I had changed the code!
So, to get rid of these problems I saved cache with a name (was forced to not use multiple_processes, because otherwise it generates multiple files) and then I load it from this cache file. | Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters. | 94 | .map() and distributed training
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
My code is actually a transformer's example for training t5, I modified a bit:
https://github.com/puraminy/transformers/blob/4b40877132eedb566043f83de8f1d29a84d71430/examples/flax/language-modeling/run_t5_mlm_flax.py#L614
No, it doesn't use `per_device_train_batch_size`. I remember it worked for several times and then for no reason or various reasons like the above it started to build the cache again, as if it had an expiration date (maybe), or maybe I had changed the code!
So, to get rid of these problems I saved cache with a name (was forced to not use multiple_processes, because otherwise it generates multiple files) and then I load it from this cache file. | [
-0.25376173853874207,
-0.2207169234752655,
0.11777672171592712,
0.07457448542118073,
0.2116168737411499,
-0.10975942015647888,
0.517072856426239,
0.010205429047346115,
0.28015705943107605,
0.023762956261634827,
0.1822476089000702,
0.34344959259033203,
-0.22906433045864105,
-0.5855441093444824,
0.0941428542137146,
0.06153406202793121,
0.1861158013343811,
0.036659859120845795,
-0.037735842168331146,
-0.2008032649755478,
-0.15293297171592712,
0.07591672986745834,
-0.15427079796791077,
0.11705100536346436,
-0.7540706396102905,
-0.15231508016586304,
-0.18345360457897186,
0.1027398332953453,
0.22531794011592865,
-0.3499089479446411,
0.2342275232076645,
0.2213345170021057,
0.4013623595237732,
0.5336914658546448,
-0.00012720905942842364,
0.031262725591659546,
0.18786080181598663,
-0.19833096861839294,
0.03971799835562706,
-0.047676265239715576,
0.16418999433517456,
0.005025122314691544,
0.19361120462417603,
-0.29533651471138,
0.13107287883758545,
-0.14767341315746307,
0.3262224793434143,
-0.4418163001537323,
0.4140009880065918,
-0.10773000866174698,
-0.0018774829804897308,
0.09438946098089218,
-0.5714960098266602,
0.13987627625465393,
-0.2214406132698059,
0.12348013371229172,
0.17111380398273468,
0.2180825024843216,
0.3029264807701111,
-0.34165555238723755,
-0.3789149820804596,
0.15822704136371613,
-0.14662371575832367,
0.13405944406986237,
0.4135625660419464,
0.036601874977350235,
-0.07898802310228348,
-0.34870049357414246,
-0.07574982196092606,
-0.12185835093259811,
0.10768753290176392,
-0.07430695742368698,
-0.18817922472953796,
-0.466538667678833,
-0.2733979821205139,
-0.0016579926013946533,
-0.002462737262248993,
0.11624366044998169,
-0.02337254211306572,
-0.11971379816532135,
-0.5124093294143677,
-0.06252461671829224,
0.055294573307037354,
0.13265389204025269,
-0.2732614278793335,
0.4564460813999176,
-0.02547357976436615,
0.3163392245769501,
0.14199258387088776,
0.05433782562613487,
0.08374596387147903,
-0.17199194431304932,
0.12963683903217316,
0.37158313393592834,
0.027552861720323563,
0.014174208045005798,
0.048927925527095795,
-0.3223406970500946,
-0.023288968950510025,
0.03560980409383774,
0.23210692405700684,
0.259809672832489,
-0.04798610135912895,
0.2657663822174072,
0.40077006816864014,
0.09275078773498535,
-0.13914108276367188,
0.6415418386459351,
0.030111387372016907,
-0.2004719078540802,
-0.6418221592903137,
-0.17241254448890686,
-0.35194510221481323,
-0.062735415995121,
0.33358922600746155,
0.04270993173122406,
-0.20984522998332977,
0.07222741842269897,
0.46040472388267517,
-0.23941722512245178,
-0.006529923528432846,
-0.13254378736019135,
0.021212106570601463,
0.250815212726593,
0.12879353761672974,
0.4370376467704773,
-0.05552695691585541,
0.10142675042152405,
-0.19016055762767792,
0.1589490920305252,
-0.05960412696003914,
-0.3029898703098297,
-0.30491068959236145,
0.3160684406757355,
0.16187681257724762,
0.18775923550128937,
0.4239693582057953,
-0.1001104786992073,
0.28944188356399536,
-0.16136983036994934,
0.3981885313987732,
-0.11204597353935242,
0.6585770845413208,
0.10445903241634369,
-0.2513783574104309,
0.22236572206020355,
0.1862221658229828,
0.3770999312400818,
-0.15356317162513733,
0.3354168236255646,
-0.5022830367088318,
-0.4383485019207001,
0.47987520694732666,
-0.07329696416854858,
-0.009594003669917583,
0.06920219957828522,
-0.17672228813171387,
0.04275926575064659,
0.5391665101051331,
-0.2560787796974182,
0.13442404568195343,
-0.35754597187042236,
-0.20906561613082886,
-0.177628293633461,
0.2568799555301666,
0.45516157150268555,
0.3137149214744568,
-0.34181711077690125,
0.12416864186525345,
0.3162249028682709,
0.20818297564983368,
0.22909453511238098,
-0.6239327192306519,
0.38981038331985474,
-0.21997983753681183,
0.274752140045166,
0.3872866630554199,
-0.35712242126464844,
-0.14352302253246307,
0.2945983111858368,
-0.09897400438785553,
0.02335912175476551,
-0.15709400177001953,
-0.024981820955872536,
0.4641163945198059,
-0.02523188851773739,
0.12588214874267578,
0.2964545488357544,
-0.21626226603984833,
0.2001037448644638,
-0.2617366313934326,
0.01691913791000843,
0.08043812215328217,
-0.007085621356964111,
0.19472073018550873,
0.0033709704875946045,
-0.012801364064216614,
0.11961949616670609,
0.2070770263671875,
0.01023024320602417,
0.228379026055336,
0.025254253298044205,
-0.3850671350955963,
0.09240898489952087,
0.16548283398151398,
0.06651946902275085,
-0.15049803256988525,
0.18142437934875488,
-0.033235277980566025,
-0.39592960476875305,
-0.1602506786584854,
-0.05221188813447952,
0.16287502646446228,
-0.20769380033016205,
-0.31089189648628235,
-0.14020736515522003,
-0.11415519565343857,
0.1380292922258377,
-0.0407925620675087,
-0.2170623391866684,
-0.3000539243221283,
-0.09362832456827164,
0.14104333519935608,
-0.058869391679763794,
0.2177683264017105,
0.10378053039312363,
0.19145244359970093,
-0.12039594352245331,
-0.43175914883613586,
-0.1487242579460144,
0.10814172029495239,
-0.2924800515174866,
-0.10761493444442749,
0.37763455510139465,
0.045573558658361435,
0.20801950991153717,
-0.11058460921049118,
0.3216453194618225,
0.2376917451620102,
0.0668996125459671,
0.1610090732574463,
0.1279924064874649,
-0.12457174062728882,
-0.15120220184326172,
-0.14207813143730164,
0.34654200077056885,
0.12898965179920197,
0.14713574945926666,
-0.015548273921012878,
0.016348624601960182,
0.041823387145996094,
0.0829826295375824,
-0.23968765139579773,
-0.08248860388994217,
-0.32003697752952576,
-0.19217850267887115,
0.2612735629081726,
0.15466296672821045,
0.037915028631687164,
0.0008638352155685425,
0.3312496542930603,
0.026126667857170105,
0.008366033434867859,
-0.14848178625106812,
-0.18063583970069885,
0.04006488621234894,
0.1552489995956421,
0.15723378956317902,
0.3422779440879822,
-0.01425726618617773,
0.3932817280292511,
-0.11448133736848831,
0.10341391712427139,
0.062259137630462646,
-0.08174242824316025,
-0.0038876980543136597,
0.2324124425649643,
0.1578570008277893,
-0.043156180530786514,
0.1835179477930069,
-0.24711290001869202,
-0.10463272035121918,
0.34853455424308777,
-0.24596652388572693,
0.08692938089370728,
0.2329530268907547,
-0.012332623824477196,
0.18088048696517944,
-0.5816079378128052,
0.09181596338748932,
0.0024795811623334885,
0.06690438836812973,
-0.16199831664562225,
0.26040661334991455,
-0.09503914415836334,
0.4181235730648041,
-0.0660853385925293,
0.24358461797237396,
-0.1192762702703476,
-0.2782997488975525,
0.18054983019828796,
-0.1531221866607666,
-0.012159653007984161,
-0.19232702255249023,
0.12843599915504456,
-0.2399805635213852,
-0.022650891914963722,
0.07756088674068451,
-0.05778767541050911,
-0.142929807305336,
0.18273600935935974,
0.11334642767906189,
0.2074275016784668,
-0.555270791053772,
-0.29690954089164734,
-0.032073765993118286,
-0.37879544496536255,
-0.14868271350860596,
0.16863226890563965,
-0.49790841341018677,
0.11927084624767303,
-0.05513763427734375,
0.24526460468769073,
-0.17175626754760742,
-0.12457077205181122,
-0.31703802943229675,
-0.2305707186460495,
-0.019363803789019585,
0.13388170301914215,
-0.05494331941008568,
0.14184030890464783,
0.0033793114125728607,
-0.10536530613899231,
-0.23937885463237762,
-0.17647989094257355,
-0.2918812930583954,
0.06517771631479263,
-0.5251651406288147,
0.388630747795105,
-0.18672248721122742,
-0.047137100249528885,
-0.10934805870056152,
-0.046108976006507874,
-0.06540895998477936,
0.6399708390235901,
-0.33489859104156494,
0.0144050819799304,
0.30953270196914673,
-0.010113779455423355,
-0.09659664332866669,
0.11164762824773788,
0.5424691438674927,
0.10664817690849304,
0.12662513554096222,
-0.05499907582998276,
0.2443145513534546,
0.25604167580604553,
0.1710580587387085,
0.05137454718351364,
0.15952777862548828,
-0.119390107691288,
0.16371288895606995,
1.2782384157180786,
0.15221929550170898,
-0.0518912635743618,
0.026243343949317932,
0.031482189893722534,
-0.014047358185052872,
0.06866714358329773,
-0.1058129221200943,
0.061383772641420364,
-0.3951035439968109,
-0.13081268966197968,
0.1793062388896942,
0.18719390034675598,
-0.5139588713645935,
0.05212712287902832,
0.19363155961036682,
-0.012220803648233414,
-0.30191633105278015,
0.3315782845020294,
-0.7171846628189087,
0.5827731490135193,
0.059084195643663406,
0.017888806760311127,
-0.4254792630672455,
0.04540019482374191,
0.09452086687088013,
-0.15131594240665436,
0.7113603353500366,
0.05342082679271698,
-0.4360215663909912,
0.0862673968076706,
-0.19184187054634094,
0.039407968521118164,
0.21483564376831055,
0.20287688076496124,
0.09526984393596649,
-0.17031651735305786,
0.1477959156036377,
0.17292891442775726,
0.4053846001625061,
-0.06395360827445984,
0.022406620904803276,
0.11699411273002625,
-0.21794059872627258,
-0.13278435170650482,
-0.1501162052154541,
0.06436406075954437,
0.37004613876342773,
0.023649295791983604,
0.43080124258995056,
-0.030336622148752213,
-0.17746898531913757,
-0.4406900703907013,
0.08842097967863083,
-0.3515690267086029,
-0.043363992124795914,
-0.1870867908000946,
0.07596608251333237,
-0.29609501361846924,
0.20950931310653687,
0.30478978157043457,
-0.17358353734016418,
-0.02137071080505848,
-0.2622394263744354,
-0.015995165333151817,
0.31471988558769226,
-0.10367757081985474,
0.03708246350288391,
0.24423357844352722,
0.14812271296977997,
0.013170339167118073,
0.4719136953353882,
0.2137567102909088,
0.21387799084186554,
0.3546659052371979,
-0.32741880416870117,
-0.1393890529870987,
0.036832213401794434,
0.007355113513767719,
0.23407024145126343,
0.1898229569196701,
0.0306466743350029,
-0.23610249161720276,
0.177387535572052,
-0.16774247586727142,
-0.2283780425786972,
0.29504159092903137,
0.11787275224924088,
0.06849812716245651,
-0.17577962577342987,
-0.4709654450416565,
0.09216675162315369,
0.18397745490074158,
-0.22207117080688477,
0.4868578314781189,
-0.8516538143157959,
-0.26168036460876465,
0.4181652069091797,
0.0608363151550293,
0.6925716996192932,
-0.26070278882980347,
0.22726459801197052,
-0.2504418194293976,
0.48743242025375366,
0.020454376935958862,
-0.6066097021102905,
0.4200374484062195,
-0.2548578083515167,
-0.20416449010372162,
-0.04122285544872284,
-0.1717182844877243,
-0.15596285462379456,
0.7070310115814209,
0.080417200922966,
0.17252378165721893,
0.1165401041507721,
0.3262239694595337,
-0.06403379887342453,
0.0934549868106842,
0.2966891825199127,
-0.43778330087661743,
0.22902865707874298,
-0.06242629885673523,
0.18298950791358948,
0.15696923434734344,
-0.0804341658949852,
0.0565103255212307,
0.12404024600982666,
-0.2584003210067749,
0.20868955552577972,
0.07172196358442307,
-0.3600728511810303,
0.36349809169769287,
0.03982042148709297,
0.052144378423690796,
-0.24333371222019196,
0.6011238694190979,
0.010904364287853241,
-0.23199571669101715,
0.09407608211040497,
0.043698929250240326,
0.1931171417236328,
-0.012696700170636177,
-0.262334406375885,
-0.16974301636219025,
0.12629976868629456,
0.09679844230413437,
-0.14593838155269623,
-0.12057466059923172,
-0.3000967502593994,
-0.4416503310203552,
-0.22375410795211792,
0.36008012294769287,
0.604175329208374,
-0.05056420713663101,
-0.05884856730699539,
0.2081899344921112,
-0.08617144823074341,
0.1668846607208252,
-0.006943525746464729,
0.06400171667337418,
-0.13817033171653748,
0.3867056369781494,
-0.023509729653596878,
-0.12429095059633255,
0.20148886740207672,
0.31319642066955566,
-0.1574302613735199,
-0.16826200485229492,
0.2568940222263336,
-0.26546698808670044,
-0.09693731367588043,
-0.05739220231771469,
-0.033052124083042145,
0.13893228769302368,
-0.36251628398895264,
0.016991881653666496,
-0.10655897110700607,
0.016631394624710083,
0.09930668771266937,
0.08376258611679077,
0.18398329615592957,
0.10752745717763901,
-0.32399293780326843,
-0.1815752387046814,
-0.37178316712379456,
-0.027891919016838074,
-0.1365000158548355,
0.05056663230061531,
0.27340400218963623,
0.13057619333267212,
0.10531774163246155,
0.37649181485176086,
-0.13172711431980133,
0.12283793836832047,
0.08179929107427597,
0.39739230275154114,
-0.051866911351680756,
0.005020808428525925,
-0.1158292293548584,
-0.029192037880420685,
-0.18753820657730103,
0.09087155759334564,
-0.14214710891246796,
0.004255726933479309,
0.08487814664840698,
0.22508566081523895,
0.19454526901245117,
-0.07184553146362305,
-0.0755309984087944,
-0.21736083924770355,
0.11622151732444763,
-0.4500409662723541,
0.04876740649342537,
0.01603393629193306,
-0.1881898194551468,
0.04671218618750572,
0.5341084003448486,
0.16230949759483337,
-0.4041571617126465,
0.14515186846256256,
-0.08664363622665405,
-0.050596341490745544,
-0.03202469274401665,
0.10413791239261627,
0.1630801409482956,
-0.004990085959434509,
-0.0814535841345787,
-0.034553855657577515,
0.36597639322280884,
0.1690801978111267,
0.47543784976005554,
-0.22721178829669952,
0.0704820454120636,
-0.029281016439199448,
0.1734144538640976,
0.23257805407047272,
-0.3147434890270233,
-0.05992045998573303,
0.34154707193374634,
0.024122482165694237,
0.02826526388525963,
-0.19900518655776978,
0.3771486282348633,
0.08671785891056061,
-0.11692649126052856,
0.26958051323890686,
0.29131320118904114,
-0.3984215557575226,
0.10716904699802399,
0.1387806236743927,
0.5225745439529419,
-0.32876574993133545,
0.26857656240463257,
0.026906102895736694,
0.08572331070899963,
0.1760588437318802,
0.2698517143726349,
0.31044960021972656,
0.17821219563484192,
-0.07478207349777222,
0.029380742460489273,
0.24966013431549072,
0.3985043168067932,
-0.10355116426944733,
-0.18747630715370178,
-0.48948919773101807,
-0.07363858819007874,
-0.00440940260887146,
-0.03696104884147644,
0.12426857650279999,
-0.2778053879737854,
0.2728981673717499,
-0.2847655117511749,
-0.5857908129692078,
0.12542106211185455,
0.32745420932769775,
-0.2013130784034729,
-0.08867983520030975,
0.09267883002758026,
0.011380814015865326,
-0.04623463749885559,
0.09415917098522186,
0.04416845738887787,
0.2097099870443344,
0.5593307614326477,
0.08588671684265137,
0.018109694123268127,
0.15415777266025543,
-0.07173880189657211,
0.0019631460309028625,
0.4593271017074585,
-0.3261110782623291,
0.1913289576768875,
-0.17257334291934967,
0.0807393342256546,
0.02004319801926613,
-0.031570613384246826,
0.049854833632707596,
0.5228729248046875,
-0.11887183785438538,
0.19383114576339722,
0.0442512184381485,
0.1886545568704605,
-0.11319932341575623,
0.16675320267677307,
-0.12337422370910645,
-0.3006841838359833,
0.030773930251598358,
-0.08147546648979187,
-0.013105197809636593,
0.028823094442486763,
-0.06652213633060455,
0.06685866415500641,
0.2088635414838791,
0.28209030628204346,
0.14854615926742554,
-0.1038462221622467,
0.10289027541875839,
0.06941033899784088,
-0.3599321246147156,
0.12591658532619476,
0.23666703701019287,
-0.2897270917892456,
0.19593128561973572,
0.050557758659124374,
-0.03994067758321762,
0.07085323333740234,
0.25427886843681335,
0.17480121552944183,
0.030376659706234932,
-0.274774432182312,
-0.3522977828979492,
-0.6728180050849915,
0.30238524079322815,
0.017480721697211266,
0.2508772313594818,
-0.10238110274076462,
0.011732114478945732,
0.056380223482847214,
-0.053125523030757904,
-0.2462203949689865,
-0.25243067741394043,
-0.03877707198262215,
0.35247811675071716,
-0.09575033187866211,
0.0024708323180675507,
-0.2875678539276123,
0.39957261085510254,
0.14586257934570312,
-0.19724130630493164,
0.06539047509431839,
-0.059779372066259384,
-0.08639679104089737,
0.26575350761413574,
-0.42360132932662964,
-0.1760619580745697,
0.06769068539142609,
0.49641892313957214,
0.06497205793857574,
0.20992223918437958,
0.060078270733356476,
0.18017439544200897,
-0.09818664193153381,
0.04511198401451111,
-0.01882946863770485,
-0.05288352072238922,
-0.08372712135314941,
0.2601967453956604,
-0.5280181169509888,
-0.0028348080813884735,
-0.49914655089378357,
-0.4764001667499542,
0.12461982667446136,
-0.015533285215497017,
0.010844174772500992,
-0.21057768166065216,
-0.2984161376953125,
0.0919269546866417,
0.26457035541534424,
0.44018810987472534,
-0.05071784555912018,
-0.059896551072597504,
-0.21876880526542664,
0.009230872616171837,
0.26662784814834595,
-0.6458789706230164,
-0.2884700298309326,
-0.2124376744031906,
0.13455480337142944,
-0.04036334156990051,
-0.05963508039712906,
-0.40264075994491577,
-0.07239661365747452,
0.2834528684616089,
-0.0711669996380806,
-0.43617549538612366,
-0.17188072204589844,
-0.05042065680027008,
-0.17073149979114532,
-0.23805437982082367,
0.4838343560695648,
-0.04084958881139755,
-0.2001533955335617,
-0.09643684327602386,
-0.17171989381313324
] |
https://github.com/huggingface/datasets/issues/2181 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries) | Hi ! Can you try to increase the block size ? For example
```python
block_size_10MB = 10<<20
load_dataset("json", ..., block_size=block_size_10MB)
```
The block size corresponds to how much bytes to process at a time from the input stream.
This will determine multi-threading granularity as well as the size of individual chunks in the dataset.
You can also try with bigger block sizes if needed | Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance! | 64 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
Hi ! Can you try to increase the block size ? For example
```python
block_size_10MB = 10<<20
load_dataset("json", ..., block_size=block_size_10MB)
```
The block size corresponds to how much bytes to process at a time from the input stream.
This will determine multi-threading granularity as well as the size of individual chunks in the dataset.
You can also try with bigger block sizes if needed | [
0.016556892544031143,
0.012686818838119507,
-0.007510561496019363,
0.34093791246414185,
0.1604531705379486,
-0.26471415162086487,
0.1936325877904892,
0.5859467387199402,
-0.16216063499450684,
-0.08150680363178253,
0.1654731184244156,
0.14416258037090302,
-0.015083088539540768,
0.014562183991074562,
-0.12952084839344025,
-0.19119185209274292,
0.033368244767189026,
0.07827429473400116,
-0.08155332505702972,
0.13550728559494019,
-0.03688661754131317,
0.2328721433877945,
-0.0935274213552475,
0.23239141702651978,
-0.08702807128429413,
-0.07815100997686386,
0.1980639100074768,
0.3374815285205841,
-0.3348844349384308,
-0.4495861828327179,
0.16122518479824066,
-0.2951851487159729,
0.0062587931752204895,
0.3340715765953064,
-0.0001156308499048464,
0.04710552096366882,
0.24958986043930054,
0.10917907953262329,
0.01874280720949173,
-0.2191220372915268,
0.2808353006839752,
-0.3987071216106415,
0.22801190614700317,
-0.16741731762886047,
0.12958493828773499,
-0.4462135136127472,
-0.3999217748641968,
0.3737809360027313,
0.42772960662841797,
-0.12555453181266785,
0.16510137915611267,
0.0912109762430191,
0.2657489776611328,
0.2669146955013275,
0.4368440806865692,
-0.06525062024593353,
0.02739820070564747,
0.5041722059249878,
0.3052024245262146,
-0.23820461332798004,
-0.335480660200119,
-0.1370314061641693,
-0.24959197640419006,
0.13811466097831726,
0.37793225049972534,
-0.11720085889101028,
0.07628121227025986,
0.058968354016542435,
-0.07994316518306732,
0.03772144019603729,
0.2263207733631134,
-0.40860190987586975,
-0.10335946828126907,
-0.07818783074617386,
-0.08564862608909607,
-0.1830739825963974,
0.30791836977005005,
0.38823121786117554,
-0.2103946954011917,
0.06983020901679993,
-0.1914450228214264,
-0.10000098496675491,
-0.1991206705570221,
0.17865148186683655,
-0.3580312132835388,
-0.12594978511333466,
-0.002453545108437538,
0.3322301506996155,
0.23105330765247345,
-0.007611144334077835,
-0.03557528182864189,
0.03110618330538273,
-0.27349382638931274,
-0.0565979890525341,
-0.20946244895458221,
0.01663956791162491,
0.0015149042010307312,
-0.31718313694000244,
0.19064882397651672,
0.2260885387659073,
0.19608604907989502,
-0.06559465825557709,
0.2463151216506958,
0.2574925124645233,
0.6111615896224976,
0.059475239366292953,
-0.352253794670105,
-0.16774751245975494,
0.2054002732038498,
0.23781487345695496,
-0.01948724128305912,
0.06098773330450058,
-0.05920769274234772,
-0.5538619756698608,
0.05948207899928093,
-0.27982693910598755,
0.25977540016174316,
-0.21602413058280945,
-0.21031981706619263,
0.13332237303256989,
-0.7950460314750671,
0.05001147463917732,
0.16625307500362396,
0.24969911575317383,
0.027215998619794846,
0.23634734749794006,
0.048551879823207855,
0.15819598734378815,
0.008959174156188965,
-0.11942119151353836,
-0.007867556065320969,
0.12636804580688477,
-0.152511864900589,
0.0385962538421154,
0.15799188613891602,
-0.13358120620250702,
-0.006416200660169125,
0.11933470517396927,
0.21734756231307983,
-0.21163928508758545,
0.18620672821998596,
0.016617320477962494,
0.04777013882994652,
0.3288208842277527,
-0.05167620629072189,
0.11164071410894394,
-0.05485979840159416,
-0.01265508309006691,
-0.2687699496746063,
0.4798910915851593,
-0.06268786638975143,
-0.34481245279312134,
-0.1742752194404602,
0.10041245818138123,
-0.26061391830444336,
0.265553742647171,
0.004983477294445038,
0.037517301738262177,
0.15041925013065338,
-0.36913180351257324,
0.2161605805158615,
-0.13115112483501434,
0.17783065140247345,
-0.3457722067832947,
0.10316925495862961,
-0.08137404918670654,
-0.6869226694107056,
0.017364203929901123,
0.2560489773750305,
0.17541736364364624,
-0.09443644434213638,
0.5446497797966003,
-0.4150453805923462,
0.1447615921497345,
-0.04595400393009186,
0.16156622767448425,
0.14491665363311768,
0.16062860190868378,
-0.6060854196548462,
0.3728238046169281,
-0.2745351195335388,
0.05764300376176834,
0.030735276639461517,
-0.014605402946472168,
-0.1264384686946869,
-0.02412497065961361,
-0.03010036051273346,
0.35156887769699097,
0.08327767252922058,
0.23094752430915833,
-0.3654412627220154,
-0.23694944381713867,
0.12336357682943344,
0.3634355962276459,
-0.11454500257968903,
-0.41169869899749756,
-0.049331970512866974,
-0.19168885052204132,
0.05531933158636093,
-0.11574187874794006,
0.1517808586359024,
0.4218286871910095,
0.1359187215566635,
-0.11939263343811035,
0.10268701612949371,
0.11307435482740402,
-0.4654298424720764,
0.021459825336933136,
0.07177260518074036,
-0.0631105899810791,
-0.3461885452270508,
-0.08819694072008133,
-0.0301499180495739,
0.24874956905841827,
0.09451162070035934,
0.20600970089435577,
0.03403902053833008,
-0.17311540246009827,
0.07218863070011139,
-0.0024393200874328613,
-0.09863884001970291,
-0.41359010338783264,
0.13343380391597748,
0.07346183061599731,
-0.010111004114151001,
0.390627384185791,
0.0637328252196312,
-0.2933794856071472,
0.06923133879899979,
0.1497812271118164,
-0.033690109848976135,
-0.14471103250980377,
-0.09443841129541397,
0.1845565140247345,
-0.08298864960670471,
0.0026111528277397156,
-0.24477806687355042,
0.12931974232196808,
0.28015226125717163,
-0.3557434678077698,
0.02776428684592247,
0.10324957966804504,
0.07656989991664886,
-0.06545446813106537,
0.22417423129081726,
0.4178517460823059,
-0.3288942277431488,
0.2032138556241989,
0.09631942212581635,
-0.2922596037387848,
0.06881310790777206,
-0.0792858749628067,
-0.0184270441532135,
0.16511406004428864,
0.22110243141651154,
0.3922337591648102,
0.22438634932041168,
0.13821065425872803,
-0.16022242605686188,
-0.11941797286272049,
0.39859989285469055,
-0.18343013525009155,
-0.08150052279233932,
0.152345210313797,
-0.13357818126678467,
-0.03313310071825981,
0.09641946852207184,
-0.129415363073349,
0.1355019509792328,
0.2478066235780716,
-0.14270131289958954,
-0.0006219036877155304,
0.027252674102783203,
-0.17982792854309082,
0.2222771942615509,
0.19782565534114838,
0.1286395788192749,
0.20186516642570496,
0.5253883600234985,
-0.1262485235929489,
-0.23405295610427856,
-0.22392231225967407,
0.24419981241226196,
0.1961282193660736,
-0.29082342982292175,
0.12981010973453522,
-0.06877226382493973,
0.024300768971443176,
-0.08478265255689621,
-0.6795874834060669,
-0.30618810653686523,
-0.09219721704721451,
0.0006515197455883026,
0.4704107642173767,
-0.33090144395828247,
0.0706554427742958,
0.15992683172225952,
0.3159407377243042,
0.07936646789312363,
-0.18853288888931274,
-0.04437362402677536,
-0.34382912516593933,
-0.25352951884269714,
-0.026064636185765266,
0.46301335096359253,
0.14641420543193817,
0.07041864097118378,
0.3701912760734558,
0.022186998277902603,
-0.06104452908039093,
-0.4288596510887146,
0.21847784519195557,
-0.04679907113313675,
0.07783330976963043,
0.0034068897366523743,
0.12915553152561188,
-0.24721203744411469,
-0.2504464387893677,
0.3068673610687256,
0.03602481633424759,
-0.20576167106628418,
0.32711663842201233,
-0.1920829564332962,
0.07442625612020493,
-0.1781022697687149,
0.11519260704517365,
0.21282662451267242,
-0.5418015122413635,
0.3973289132118225,
-0.18551932275295258,
0.003990918397903442,
-0.2795966863632202,
0.26352065801620483,
0.09601008892059326,
0.06791519373655319,
-0.04049726575613022,
0.059400688856840134,
-0.42019131779670715,
0.19610176980495453,
-0.04033263772726059,
-0.188174769282341,
0.041839536279439926,
0.1097165197134018,
0.1519089639186859,
0.16503176093101501,
-0.6058769226074219,
-0.01286236196756363,
-0.07757627218961716,
0.5512674450874329,
-0.34305447340011597,
-0.2375434786081314,
0.1149817407131195,
0.18758068978786469,
-0.016697505488991737,
0.12442358583211899,
-0.14346545934677124,
0.015068188309669495,
-0.007389876991510391,
0.20498797297477722,
-0.10102466493844986,
0.5279220938682556,
0.13047108054161072,
0.7018234729766846,
-0.16545529663562775,
-0.1430087834596634,
0.33132365345954895,
0.2419927716255188,
0.07736510783433914,
0.048163894563913345,
-0.02841293066740036,
-0.11799871921539307,
-0.18098780512809753,
-0.08216635137796402,
-0.006838537752628326,
0.04872739315032959,
-0.11016467958688736,
-0.027632465586066246,
-0.1180320531129837,
-0.2268262803554535,
-0.15881066024303436,
0.3197793960571289,
0.06100717559456825,
-0.11388946324586868,
-0.20074088871479034,
-0.2847958505153656,
-0.01700841449201107,
-0.08031148463487625,
0.05849117413163185,
0.03808983787894249,
0.10930915176868439,
0.11452367901802063,
-0.015752147883176804,
-0.3002431094646454,
-0.03336998075246811,
0.07999861240386963,
0.3141290247440338,
-0.14442752301692963,
0.0518038384616375,
-0.19720858335494995,
0.18430858850479126,
-0.47779303789138794,
0.7541436553001404,
0.46496427059173584,
-0.07626182585954666,
0.13590151071548462,
-0.06636033952236176,
-0.3780810534954071,
-0.06195565313100815,
0.08362981677055359,
0.19823597371578217,
0.5710024237632751,
0.1032126396894455,
-0.4526483118534088,
-0.10598378628492355,
-0.1052926778793335,
0.3224130868911743,
0.014623809605836868,
-0.4784035384654999,
-0.40637344121932983,
-0.4959048926830292,
-0.457832008600235,
-0.055918820202350616,
0.09452845901250839,
0.19011013209819794,
0.10296480357646942,
-0.09873886406421661,
0.27969011664390564,
-0.2547013461589813,
-0.47950637340545654,
0.09781898558139801,
0.1785520315170288,
-0.5503334403038025,
0.14910228550434113,
0.051228735595941544,
0.31933829188346863,
0.5359148383140564,
0.6146830916404724,
0.590986430644989,
-0.21832555532455444,
-0.05383634567260742,
0.3960568606853485,
0.1798863559961319,
0.16794666647911072,
0.16721220314502716,
0.20855772495269775,
-0.17270226776599884,
0.2022818922996521,
0.22147594392299652,
-0.010497720912098885,
0.19086387753486633,
-0.12107626348733902,
-0.0008762726210989058,
0.2911648750305176,
0.5025099515914917,
-0.21723051369190216,
0.15785937011241913,
0.4766685366630554,
0.28344467282295227,
-0.04671666771173477,
0.22268623113632202,
-0.05963493138551712,
0.9461209177970886,
-0.021072842180728912,
0.13255441188812256,
0.5243242979049683,
-0.42520225048065186,
0.5806593894958496,
-0.3188987970352173,
0.09764829277992249,
-0.4774039387702942,
0.34796005487442017,
0.06618022173643112,
-0.21018780767917633,
-0.08619844168424606,
0.06463321298360825,
-0.04271338880062103,
-0.19860470294952393,
-0.08621235936880112,
0.09070894122123718,
-0.11656421422958374,
0.07200505584478378,
-0.02068157307803631,
0.0002180337905883789,
-0.3245546221733093,
-0.006256762892007828,
-0.3452308773994446,
-0.1282552033662796,
-0.1717911660671234,
-0.3250170946121216,
0.04215412214398384,
-0.17573441565036774,
-0.19179342687129974,
0.27093449234962463,
0.1396906077861786,
0.37713950872421265,
0.27483829855918884,
-0.14227506518363953,
-0.007455416023731232,
-0.4400266110897064,
-0.2658150792121887,
-0.1649734526872635,
-0.038579605519771576,
0.22400443255901337,
0.008436579257249832,
-0.12542591989040375,
-0.021885020658373833,
0.12434019148349762,
0.14794714748859406,
-0.17208102345466614,
-0.17584757506847382,
0.146366149187088,
-0.17003430426120758,
-0.18596340715885162,
-0.14072968065738678,
0.1831442266702652,
-0.15189681947231293,
-0.03113069012761116,
-0.06275996565818787,
-0.14789697527885437,
0.08176018297672272,
-0.128449946641922,
0.06835391372442245,
0.002666063606739044,
0.07371871918439865,
-0.31619441509246826,
0.08392003178596497,
-0.3015908896923065,
-0.08405116200447083,
0.2698034942150116,
-0.0315241739153862,
0.14634712040424347,
0.45389029383659363,
0.40275251865386963,
-0.07262209057807922,
-0.095639169216156,
-0.0567292794585228,
0.5515413880348206,
-0.605144739151001,
0.2913154065608978,
-0.15657995641231537,
0.11268819868564606,
0.0965895727276802,
0.317776620388031,
0.2544376254081726,
0.0715055838227272,
0.026548314839601517,
-0.34782475233078003,
-0.2285258173942566,
0.4916565418243408,
-0.0185181125998497,
0.012201707810163498,
0.1027069017291069,
0.4117231070995331,
-0.07805374264717102,
0.19734074175357819,
-0.21987274289131165,
0.30208495259284973,
0.028722813352942467,
0.05645482987165451,
-0.4602075219154358,
-0.2132689356803894,
-0.20159199833869934,
0.25507763028144836,
0.027088599279522896,
0.1679866909980774,
-0.07122506946325302,
-0.12592566013336182,
-0.12761655449867249,
0.10120327770709991,
0.102016881108284,
-0.0968397855758667,
-0.06450218707323074,
-0.10317187011241913,
0.1211114227771759,
0.12978407740592957,
0.13172748684883118,
-0.20998993515968323,
-0.053500980138778687,
-0.3004152476787567,
0.0015182271599769592,
-0.18776541948318481,
-0.36424320936203003,
0.07901668548583984,
-0.033779487013816833,
0.28909656405448914,
0.08048427104949951,
0.2754157781600952,
-0.02370668761432171,
-0.06440620869398117,
-0.22985851764678955,
0.1052856370806694,
0.152957946062088,
-0.0467553585767746,
0.4014988839626312,
-0.32381218671798706,
-0.038765016943216324,
-0.2653615176677704,
0.27564525604248047,
0.45938175916671753,
-0.22526399791240692,
-0.12385697662830353,
0.01526157557964325,
0.16776694357395172,
0.0016634222120046616,
-0.21519118547439575,
-0.21952378749847412,
-0.04977622628211975,
-0.15386952459812164,
-0.07467363029718399,
-0.09042397141456604,
-0.2073935866355896,
-0.17872630059719086,
0.1219562515616417,
0.29474350810050964,
0.2419099658727646,
-0.34636542201042175,
0.37922409176826477,
-0.27893200516700745,
-0.1749602109193802,
0.2887687683105469,
0.1355142444372177,
0.559386134147644,
-0.09074176847934723,
-0.07203657180070877,
0.18086522817611694,
-0.051142655313014984,
0.08335897326469421,
-0.15314683318138123,
-0.42818620800971985,
-0.17864654958248138,
0.36371320486068726,
0.20608429610729218,
-0.24173831939697266,
0.30446869134902954,
0.5248375535011292,
0.40107738971710205,
-0.11268875747919083,
-0.019807986915111542,
0.2256045639514923,
-0.1309850811958313,
0.22233963012695312,
-0.5097845792770386,
-0.1980469971895218,
-0.12368007004261017,
0.38702818751335144,
-0.1253378987312317,
0.055718403309583664,
0.49129825830459595,
0.17829591035842896,
-0.0879882276058197,
-0.6212044954299927,
-0.1130405142903328,
0.07271505892276764,
-0.0714721754193306,
-0.23943841457366943,
0.22984124720096588,
0.6816924214363098,
-0.4974336326122284,
-0.056194696575403214,
-0.21587972342967987,
0.4886174499988556,
0.27109819650650024,
-0.21118149161338806,
-0.4033636748790741,
-0.21839198470115662,
-0.07209066301584244,
-0.09500770270824432,
0.1022532731294632,
0.5172536373138428,
0.34985119104385376,
0.23339612782001495,
0.06629250198602676,
-0.14184127748012543,
0.23030219972133636,
0.1463664323091507,
0.13845176994800568,
0.000585249625146389,
-0.23334673047065735,
-0.23541691899299622,
-0.34432291984558105,
-0.18023358285427094,
-0.2282654047012329,
-0.3921261131763458,
-0.3310353755950928,
0.12118980288505554,
-0.031211037188768387,
-0.13187964260578156,
-0.1365349292755127,
0.0630984976887703,
-0.07263322174549103,
0.6978247761726379,
0.34853535890579224,
0.20587164163589478,
-0.2465088665485382,
-0.26132383942604065,
-0.2471020221710205,
0.47968819737434387,
-0.4091101288795471,
0.19831575453281403,
0.2130555361509323,
0.18338409066200256,
0.10704760253429413,
0.3368973731994629,
-0.06520387530326843,
0.5276257991790771,
-0.1808636635541916,
-0.21479082107543945,
-0.38511279225349426,
0.03682646155357361,
0.2935439944267273,
-0.16676639020442963,
-0.18446160852909088,
-0.15145716071128845,
0.33867350220680237,
-0.17680764198303223,
0.11256473511457443,
-0.11822760105133057,
0.02327253669500351,
0.05392232909798622,
0.08557051420211792,
0.32998472452163696,
0.08187305927276611,
0.32917287945747375,
0.028653860092163086,
-0.14292383193969727,
-0.10798376798629761,
-0.25462934374809265,
-0.1726098358631134,
0.38462379574775696,
0.058152005076408386,
0.41165581345558167,
-0.0787665843963623,
0.0795212984085083,
-0.1733231544494629,
0.10523437708616257,
-0.4348299503326416,
-0.09791164100170135,
0.12186213582754135,
-0.23521146178245544,
0.024975545704364777,
0.10284916311502457,
-0.017111757770180702,
0.11467592418193817,
0.08856936544179916,
0.11370491981506348,
-0.49449437856674194,
-0.1414472460746765,
0.4697197675704956,
-0.3657928705215454,
-0.2979661226272583,
0.49709996581077576,
0.10345209389925003,
0.3452361226081848,
-0.11850882321596146,
-0.5068215131759644,
0.08914429694414139,
0.1896466612815857,
0.05866410583257675,
-0.37224289774894714,
0.22458240389823914,
0.04821459949016571,
-0.06096334010362625,
0.05195166543126106,
0.22357188165187836,
0.18367227911949158,
-0.36517104506492615,
-0.03171267360448837,
-0.12904906272888184
] |
https://github.com/huggingface/datasets/issues/2181 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries) | Hi @lhoestq! Thank you for your prompt reply.
I have experimented with (10<<20, 10<<28, 10<<30, 10<<33, 10<<34), since my machine has 192G of memory, but it's either the above-mentioned error or processed killed because of OOM.
Could you give me a bit of background on why block size needs to be exactly calibrated?
To my understanding, small block sized should run just fine despite its slowness..
| Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance! | 66 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
Hi @lhoestq! Thank you for your prompt reply.
I have experimented with (10<<20, 10<<28, 10<<30, 10<<33, 10<<34), since my machine has 192G of memory, but it's either the above-mentioned error or processed killed because of OOM.
Could you give me a bit of background on why block size needs to be exactly calibrated?
To my understanding, small block sized should run just fine despite its slowness..
| [
0.016556892544031143,
0.012686818838119507,
-0.007510561496019363,
0.34093791246414185,
0.1604531705379486,
-0.26471415162086487,
0.1936325877904892,
0.5859467387199402,
-0.16216063499450684,
-0.08150680363178253,
0.1654731184244156,
0.14416258037090302,
-0.015083088539540768,
0.014562183991074562,
-0.12952084839344025,
-0.19119185209274292,
0.033368244767189026,
0.07827429473400116,
-0.08155332505702972,
0.13550728559494019,
-0.03688661754131317,
0.2328721433877945,
-0.0935274213552475,
0.23239141702651978,
-0.08702807128429413,
-0.07815100997686386,
0.1980639100074768,
0.3374815285205841,
-0.3348844349384308,
-0.4495861828327179,
0.16122518479824066,
-0.2951851487159729,
0.0062587931752204895,
0.3340715765953064,
-0.0001156308499048464,
0.04710552096366882,
0.24958986043930054,
0.10917907953262329,
0.01874280720949173,
-0.2191220372915268,
0.2808353006839752,
-0.3987071216106415,
0.22801190614700317,
-0.16741731762886047,
0.12958493828773499,
-0.4462135136127472,
-0.3999217748641968,
0.3737809360027313,
0.42772960662841797,
-0.12555453181266785,
0.16510137915611267,
0.0912109762430191,
0.2657489776611328,
0.2669146955013275,
0.4368440806865692,
-0.06525062024593353,
0.02739820070564747,
0.5041722059249878,
0.3052024245262146,
-0.23820461332798004,
-0.335480660200119,
-0.1370314061641693,
-0.24959197640419006,
0.13811466097831726,
0.37793225049972534,
-0.11720085889101028,
0.07628121227025986,
0.058968354016542435,
-0.07994316518306732,
0.03772144019603729,
0.2263207733631134,
-0.40860190987586975,
-0.10335946828126907,
-0.07818783074617386,
-0.08564862608909607,
-0.1830739825963974,
0.30791836977005005,
0.38823121786117554,
-0.2103946954011917,
0.06983020901679993,
-0.1914450228214264,
-0.10000098496675491,
-0.1991206705570221,
0.17865148186683655,
-0.3580312132835388,
-0.12594978511333466,
-0.002453545108437538,
0.3322301506996155,
0.23105330765247345,
-0.007611144334077835,
-0.03557528182864189,
0.03110618330538273,
-0.27349382638931274,
-0.0565979890525341,
-0.20946244895458221,
0.01663956791162491,
0.0015149042010307312,
-0.31718313694000244,
0.19064882397651672,
0.2260885387659073,
0.19608604907989502,
-0.06559465825557709,
0.2463151216506958,
0.2574925124645233,
0.6111615896224976,
0.059475239366292953,
-0.352253794670105,
-0.16774751245975494,
0.2054002732038498,
0.23781487345695496,
-0.01948724128305912,
0.06098773330450058,
-0.05920769274234772,
-0.5538619756698608,
0.05948207899928093,
-0.27982693910598755,
0.25977540016174316,
-0.21602413058280945,
-0.21031981706619263,
0.13332237303256989,
-0.7950460314750671,
0.05001147463917732,
0.16625307500362396,
0.24969911575317383,
0.027215998619794846,
0.23634734749794006,
0.048551879823207855,
0.15819598734378815,
0.008959174156188965,
-0.11942119151353836,
-0.007867556065320969,
0.12636804580688477,
-0.152511864900589,
0.0385962538421154,
0.15799188613891602,
-0.13358120620250702,
-0.006416200660169125,
0.11933470517396927,
0.21734756231307983,
-0.21163928508758545,
0.18620672821998596,
0.016617320477962494,
0.04777013882994652,
0.3288208842277527,
-0.05167620629072189,
0.11164071410894394,
-0.05485979840159416,
-0.01265508309006691,
-0.2687699496746063,
0.4798910915851593,
-0.06268786638975143,
-0.34481245279312134,
-0.1742752194404602,
0.10041245818138123,
-0.26061391830444336,
0.265553742647171,
0.004983477294445038,
0.037517301738262177,
0.15041925013065338,
-0.36913180351257324,
0.2161605805158615,
-0.13115112483501434,
0.17783065140247345,
-0.3457722067832947,
0.10316925495862961,
-0.08137404918670654,
-0.6869226694107056,
0.017364203929901123,
0.2560489773750305,
0.17541736364364624,
-0.09443644434213638,
0.5446497797966003,
-0.4150453805923462,
0.1447615921497345,
-0.04595400393009186,
0.16156622767448425,
0.14491665363311768,
0.16062860190868378,
-0.6060854196548462,
0.3728238046169281,
-0.2745351195335388,
0.05764300376176834,
0.030735276639461517,
-0.014605402946472168,
-0.1264384686946869,
-0.02412497065961361,
-0.03010036051273346,
0.35156887769699097,
0.08327767252922058,
0.23094752430915833,
-0.3654412627220154,
-0.23694944381713867,
0.12336357682943344,
0.3634355962276459,
-0.11454500257968903,
-0.41169869899749756,
-0.049331970512866974,
-0.19168885052204132,
0.05531933158636093,
-0.11574187874794006,
0.1517808586359024,
0.4218286871910095,
0.1359187215566635,
-0.11939263343811035,
0.10268701612949371,
0.11307435482740402,
-0.4654298424720764,
0.021459825336933136,
0.07177260518074036,
-0.0631105899810791,
-0.3461885452270508,
-0.08819694072008133,
-0.0301499180495739,
0.24874956905841827,
0.09451162070035934,
0.20600970089435577,
0.03403902053833008,
-0.17311540246009827,
0.07218863070011139,
-0.0024393200874328613,
-0.09863884001970291,
-0.41359010338783264,
0.13343380391597748,
0.07346183061599731,
-0.010111004114151001,
0.390627384185791,
0.0637328252196312,
-0.2933794856071472,
0.06923133879899979,
0.1497812271118164,
-0.033690109848976135,
-0.14471103250980377,
-0.09443841129541397,
0.1845565140247345,
-0.08298864960670471,
0.0026111528277397156,
-0.24477806687355042,
0.12931974232196808,
0.28015226125717163,
-0.3557434678077698,
0.02776428684592247,
0.10324957966804504,
0.07656989991664886,
-0.06545446813106537,
0.22417423129081726,
0.4178517460823059,
-0.3288942277431488,
0.2032138556241989,
0.09631942212581635,
-0.2922596037387848,
0.06881310790777206,
-0.0792858749628067,
-0.0184270441532135,
0.16511406004428864,
0.22110243141651154,
0.3922337591648102,
0.22438634932041168,
0.13821065425872803,
-0.16022242605686188,
-0.11941797286272049,
0.39859989285469055,
-0.18343013525009155,
-0.08150052279233932,
0.152345210313797,
-0.13357818126678467,
-0.03313310071825981,
0.09641946852207184,
-0.129415363073349,
0.1355019509792328,
0.2478066235780716,
-0.14270131289958954,
-0.0006219036877155304,
0.027252674102783203,
-0.17982792854309082,
0.2222771942615509,
0.19782565534114838,
0.1286395788192749,
0.20186516642570496,
0.5253883600234985,
-0.1262485235929489,
-0.23405295610427856,
-0.22392231225967407,
0.24419981241226196,
0.1961282193660736,
-0.29082342982292175,
0.12981010973453522,
-0.06877226382493973,
0.024300768971443176,
-0.08478265255689621,
-0.6795874834060669,
-0.30618810653686523,
-0.09219721704721451,
0.0006515197455883026,
0.4704107642173767,
-0.33090144395828247,
0.0706554427742958,
0.15992683172225952,
0.3159407377243042,
0.07936646789312363,
-0.18853288888931274,
-0.04437362402677536,
-0.34382912516593933,
-0.25352951884269714,
-0.026064636185765266,
0.46301335096359253,
0.14641420543193817,
0.07041864097118378,
0.3701912760734558,
0.022186998277902603,
-0.06104452908039093,
-0.4288596510887146,
0.21847784519195557,
-0.04679907113313675,
0.07783330976963043,
0.0034068897366523743,
0.12915553152561188,
-0.24721203744411469,
-0.2504464387893677,
0.3068673610687256,
0.03602481633424759,
-0.20576167106628418,
0.32711663842201233,
-0.1920829564332962,
0.07442625612020493,
-0.1781022697687149,
0.11519260704517365,
0.21282662451267242,
-0.5418015122413635,
0.3973289132118225,
-0.18551932275295258,
0.003990918397903442,
-0.2795966863632202,
0.26352065801620483,
0.09601008892059326,
0.06791519373655319,
-0.04049726575613022,
0.059400688856840134,
-0.42019131779670715,
0.19610176980495453,
-0.04033263772726059,
-0.188174769282341,
0.041839536279439926,
0.1097165197134018,
0.1519089639186859,
0.16503176093101501,
-0.6058769226074219,
-0.01286236196756363,
-0.07757627218961716,
0.5512674450874329,
-0.34305447340011597,
-0.2375434786081314,
0.1149817407131195,
0.18758068978786469,
-0.016697505488991737,
0.12442358583211899,
-0.14346545934677124,
0.015068188309669495,
-0.007389876991510391,
0.20498797297477722,
-0.10102466493844986,
0.5279220938682556,
0.13047108054161072,
0.7018234729766846,
-0.16545529663562775,
-0.1430087834596634,
0.33132365345954895,
0.2419927716255188,
0.07736510783433914,
0.048163894563913345,
-0.02841293066740036,
-0.11799871921539307,
-0.18098780512809753,
-0.08216635137796402,
-0.006838537752628326,
0.04872739315032959,
-0.11016467958688736,
-0.027632465586066246,
-0.1180320531129837,
-0.2268262803554535,
-0.15881066024303436,
0.3197793960571289,
0.06100717559456825,
-0.11388946324586868,
-0.20074088871479034,
-0.2847958505153656,
-0.01700841449201107,
-0.08031148463487625,
0.05849117413163185,
0.03808983787894249,
0.10930915176868439,
0.11452367901802063,
-0.015752147883176804,
-0.3002431094646454,
-0.03336998075246811,
0.07999861240386963,
0.3141290247440338,
-0.14442752301692963,
0.0518038384616375,
-0.19720858335494995,
0.18430858850479126,
-0.47779303789138794,
0.7541436553001404,
0.46496427059173584,
-0.07626182585954666,
0.13590151071548462,
-0.06636033952236176,
-0.3780810534954071,
-0.06195565313100815,
0.08362981677055359,
0.19823597371578217,
0.5710024237632751,
0.1032126396894455,
-0.4526483118534088,
-0.10598378628492355,
-0.1052926778793335,
0.3224130868911743,
0.014623809605836868,
-0.4784035384654999,
-0.40637344121932983,
-0.4959048926830292,
-0.457832008600235,
-0.055918820202350616,
0.09452845901250839,
0.19011013209819794,
0.10296480357646942,
-0.09873886406421661,
0.27969011664390564,
-0.2547013461589813,
-0.47950637340545654,
0.09781898558139801,
0.1785520315170288,
-0.5503334403038025,
0.14910228550434113,
0.051228735595941544,
0.31933829188346863,
0.5359148383140564,
0.6146830916404724,
0.590986430644989,
-0.21832555532455444,
-0.05383634567260742,
0.3960568606853485,
0.1798863559961319,
0.16794666647911072,
0.16721220314502716,
0.20855772495269775,
-0.17270226776599884,
0.2022818922996521,
0.22147594392299652,
-0.010497720912098885,
0.19086387753486633,
-0.12107626348733902,
-0.0008762726210989058,
0.2911648750305176,
0.5025099515914917,
-0.21723051369190216,
0.15785937011241913,
0.4766685366630554,
0.28344467282295227,
-0.04671666771173477,
0.22268623113632202,
-0.05963493138551712,
0.9461209177970886,
-0.021072842180728912,
0.13255441188812256,
0.5243242979049683,
-0.42520225048065186,
0.5806593894958496,
-0.3188987970352173,
0.09764829277992249,
-0.4774039387702942,
0.34796005487442017,
0.06618022173643112,
-0.21018780767917633,
-0.08619844168424606,
0.06463321298360825,
-0.04271338880062103,
-0.19860470294952393,
-0.08621235936880112,
0.09070894122123718,
-0.11656421422958374,
0.07200505584478378,
-0.02068157307803631,
0.0002180337905883789,
-0.3245546221733093,
-0.006256762892007828,
-0.3452308773994446,
-0.1282552033662796,
-0.1717911660671234,
-0.3250170946121216,
0.04215412214398384,
-0.17573441565036774,
-0.19179342687129974,
0.27093449234962463,
0.1396906077861786,
0.37713950872421265,
0.27483829855918884,
-0.14227506518363953,
-0.007455416023731232,
-0.4400266110897064,
-0.2658150792121887,
-0.1649734526872635,
-0.038579605519771576,
0.22400443255901337,
0.008436579257249832,
-0.12542591989040375,
-0.021885020658373833,
0.12434019148349762,
0.14794714748859406,
-0.17208102345466614,
-0.17584757506847382,
0.146366149187088,
-0.17003430426120758,
-0.18596340715885162,
-0.14072968065738678,
0.1831442266702652,
-0.15189681947231293,
-0.03113069012761116,
-0.06275996565818787,
-0.14789697527885437,
0.08176018297672272,
-0.128449946641922,
0.06835391372442245,
0.002666063606739044,
0.07371871918439865,
-0.31619441509246826,
0.08392003178596497,
-0.3015908896923065,
-0.08405116200447083,
0.2698034942150116,
-0.0315241739153862,
0.14634712040424347,
0.45389029383659363,
0.40275251865386963,
-0.07262209057807922,
-0.095639169216156,
-0.0567292794585228,
0.5515413880348206,
-0.605144739151001,
0.2913154065608978,
-0.15657995641231537,
0.11268819868564606,
0.0965895727276802,
0.317776620388031,
0.2544376254081726,
0.0715055838227272,
0.026548314839601517,
-0.34782475233078003,
-0.2285258173942566,
0.4916565418243408,
-0.0185181125998497,
0.012201707810163498,
0.1027069017291069,
0.4117231070995331,
-0.07805374264717102,
0.19734074175357819,
-0.21987274289131165,
0.30208495259284973,
0.028722813352942467,
0.05645482987165451,
-0.4602075219154358,
-0.2132689356803894,
-0.20159199833869934,
0.25507763028144836,
0.027088599279522896,
0.1679866909980774,
-0.07122506946325302,
-0.12592566013336182,
-0.12761655449867249,
0.10120327770709991,
0.102016881108284,
-0.0968397855758667,
-0.06450218707323074,
-0.10317187011241913,
0.1211114227771759,
0.12978407740592957,
0.13172748684883118,
-0.20998993515968323,
-0.053500980138778687,
-0.3004152476787567,
0.0015182271599769592,
-0.18776541948318481,
-0.36424320936203003,
0.07901668548583984,
-0.033779487013816833,
0.28909656405448914,
0.08048427104949951,
0.2754157781600952,
-0.02370668761432171,
-0.06440620869398117,
-0.22985851764678955,
0.1052856370806694,
0.152957946062088,
-0.0467553585767746,
0.4014988839626312,
-0.32381218671798706,
-0.038765016943216324,
-0.2653615176677704,
0.27564525604248047,
0.45938175916671753,
-0.22526399791240692,
-0.12385697662830353,
0.01526157557964325,
0.16776694357395172,
0.0016634222120046616,
-0.21519118547439575,
-0.21952378749847412,
-0.04977622628211975,
-0.15386952459812164,
-0.07467363029718399,
-0.09042397141456604,
-0.2073935866355896,
-0.17872630059719086,
0.1219562515616417,
0.29474350810050964,
0.2419099658727646,
-0.34636542201042175,
0.37922409176826477,
-0.27893200516700745,
-0.1749602109193802,
0.2887687683105469,
0.1355142444372177,
0.559386134147644,
-0.09074176847934723,
-0.07203657180070877,
0.18086522817611694,
-0.051142655313014984,
0.08335897326469421,
-0.15314683318138123,
-0.42818620800971985,
-0.17864654958248138,
0.36371320486068726,
0.20608429610729218,
-0.24173831939697266,
0.30446869134902954,
0.5248375535011292,
0.40107738971710205,
-0.11268875747919083,
-0.019807986915111542,
0.2256045639514923,
-0.1309850811958313,
0.22233963012695312,
-0.5097845792770386,
-0.1980469971895218,
-0.12368007004261017,
0.38702818751335144,
-0.1253378987312317,
0.055718403309583664,
0.49129825830459595,
0.17829591035842896,
-0.0879882276058197,
-0.6212044954299927,
-0.1130405142903328,
0.07271505892276764,
-0.0714721754193306,
-0.23943841457366943,
0.22984124720096588,
0.6816924214363098,
-0.4974336326122284,
-0.056194696575403214,
-0.21587972342967987,
0.4886174499988556,
0.27109819650650024,
-0.21118149161338806,
-0.4033636748790741,
-0.21839198470115662,
-0.07209066301584244,
-0.09500770270824432,
0.1022532731294632,
0.5172536373138428,
0.34985119104385376,
0.23339612782001495,
0.06629250198602676,
-0.14184127748012543,
0.23030219972133636,
0.1463664323091507,
0.13845176994800568,
0.000585249625146389,
-0.23334673047065735,
-0.23541691899299622,
-0.34432291984558105,
-0.18023358285427094,
-0.2282654047012329,
-0.3921261131763458,
-0.3310353755950928,
0.12118980288505554,
-0.031211037188768387,
-0.13187964260578156,
-0.1365349292755127,
0.0630984976887703,
-0.07263322174549103,
0.6978247761726379,
0.34853535890579224,
0.20587164163589478,
-0.2465088665485382,
-0.26132383942604065,
-0.2471020221710205,
0.47968819737434387,
-0.4091101288795471,
0.19831575453281403,
0.2130555361509323,
0.18338409066200256,
0.10704760253429413,
0.3368973731994629,
-0.06520387530326843,
0.5276257991790771,
-0.1808636635541916,
-0.21479082107543945,
-0.38511279225349426,
0.03682646155357361,
0.2935439944267273,
-0.16676639020442963,
-0.18446160852909088,
-0.15145716071128845,
0.33867350220680237,
-0.17680764198303223,
0.11256473511457443,
-0.11822760105133057,
0.02327253669500351,
0.05392232909798622,
0.08557051420211792,
0.32998472452163696,
0.08187305927276611,
0.32917287945747375,
0.028653860092163086,
-0.14292383193969727,
-0.10798376798629761,
-0.25462934374809265,
-0.1726098358631134,
0.38462379574775696,
0.058152005076408386,
0.41165581345558167,
-0.0787665843963623,
0.0795212984085083,
-0.1733231544494629,
0.10523437708616257,
-0.4348299503326416,
-0.09791164100170135,
0.12186213582754135,
-0.23521146178245544,
0.024975545704364777,
0.10284916311502457,
-0.017111757770180702,
0.11467592418193817,
0.08856936544179916,
0.11370491981506348,
-0.49449437856674194,
-0.1414472460746765,
0.4697197675704956,
-0.3657928705215454,
-0.2979661226272583,
0.49709996581077576,
0.10345209389925003,
0.3452361226081848,
-0.11850882321596146,
-0.5068215131759644,
0.08914429694414139,
0.1896466612815857,
0.05866410583257675,
-0.37224289774894714,
0.22458240389823914,
0.04821459949016571,
-0.06096334010362625,
0.05195166543126106,
0.22357188165187836,
0.18367227911949158,
-0.36517104506492615,
-0.03171267360448837,
-0.12904906272888184
] |
https://github.com/huggingface/datasets/issues/2181 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries) | We're using the JSON loader of pyarrow. It parses the file chunk by chunk to load the dataset.
This issue happens when there's no delimiter in one chunk of data. For json line, the delimiter is the end of line.
So with a big value for chunk_size this should have worked unless you have one extremely long line in your file.
Also what version of pyarrow are you using ?
FInally I wonder if it could be an issue on pyarrow's side when using big json files. (I haven't tested big json files like yours) | Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance! | 95 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
We're using the JSON loader of pyarrow. It parses the file chunk by chunk to load the dataset.
This issue happens when there's no delimiter in one chunk of data. For json line, the delimiter is the end of line.
So with a big value for chunk_size this should have worked unless you have one extremely long line in your file.
Also what version of pyarrow are you using ?
FInally I wonder if it could be an issue on pyarrow's side when using big json files. (I haven't tested big json files like yours) | [
0.016556892544031143,
0.012686818838119507,
-0.007510561496019363,
0.34093791246414185,
0.1604531705379486,
-0.26471415162086487,
0.1936325877904892,
0.5859467387199402,
-0.16216063499450684,
-0.08150680363178253,
0.1654731184244156,
0.14416258037090302,
-0.015083088539540768,
0.014562183991074562,
-0.12952084839344025,
-0.19119185209274292,
0.033368244767189026,
0.07827429473400116,
-0.08155332505702972,
0.13550728559494019,
-0.03688661754131317,
0.2328721433877945,
-0.0935274213552475,
0.23239141702651978,
-0.08702807128429413,
-0.07815100997686386,
0.1980639100074768,
0.3374815285205841,
-0.3348844349384308,
-0.4495861828327179,
0.16122518479824066,
-0.2951851487159729,
0.0062587931752204895,
0.3340715765953064,
-0.0001156308499048464,
0.04710552096366882,
0.24958986043930054,
0.10917907953262329,
0.01874280720949173,
-0.2191220372915268,
0.2808353006839752,
-0.3987071216106415,
0.22801190614700317,
-0.16741731762886047,
0.12958493828773499,
-0.4462135136127472,
-0.3999217748641968,
0.3737809360027313,
0.42772960662841797,
-0.12555453181266785,
0.16510137915611267,
0.0912109762430191,
0.2657489776611328,
0.2669146955013275,
0.4368440806865692,
-0.06525062024593353,
0.02739820070564747,
0.5041722059249878,
0.3052024245262146,
-0.23820461332798004,
-0.335480660200119,
-0.1370314061641693,
-0.24959197640419006,
0.13811466097831726,
0.37793225049972534,
-0.11720085889101028,
0.07628121227025986,
0.058968354016542435,
-0.07994316518306732,
0.03772144019603729,
0.2263207733631134,
-0.40860190987586975,
-0.10335946828126907,
-0.07818783074617386,
-0.08564862608909607,
-0.1830739825963974,
0.30791836977005005,
0.38823121786117554,
-0.2103946954011917,
0.06983020901679993,
-0.1914450228214264,
-0.10000098496675491,
-0.1991206705570221,
0.17865148186683655,
-0.3580312132835388,
-0.12594978511333466,
-0.002453545108437538,
0.3322301506996155,
0.23105330765247345,
-0.007611144334077835,
-0.03557528182864189,
0.03110618330538273,
-0.27349382638931274,
-0.0565979890525341,
-0.20946244895458221,
0.01663956791162491,
0.0015149042010307312,
-0.31718313694000244,
0.19064882397651672,
0.2260885387659073,
0.19608604907989502,
-0.06559465825557709,
0.2463151216506958,
0.2574925124645233,
0.6111615896224976,
0.059475239366292953,
-0.352253794670105,
-0.16774751245975494,
0.2054002732038498,
0.23781487345695496,
-0.01948724128305912,
0.06098773330450058,
-0.05920769274234772,
-0.5538619756698608,
0.05948207899928093,
-0.27982693910598755,
0.25977540016174316,
-0.21602413058280945,
-0.21031981706619263,
0.13332237303256989,
-0.7950460314750671,
0.05001147463917732,
0.16625307500362396,
0.24969911575317383,
0.027215998619794846,
0.23634734749794006,
0.048551879823207855,
0.15819598734378815,
0.008959174156188965,
-0.11942119151353836,
-0.007867556065320969,
0.12636804580688477,
-0.152511864900589,
0.0385962538421154,
0.15799188613891602,
-0.13358120620250702,
-0.006416200660169125,
0.11933470517396927,
0.21734756231307983,
-0.21163928508758545,
0.18620672821998596,
0.016617320477962494,
0.04777013882994652,
0.3288208842277527,
-0.05167620629072189,
0.11164071410894394,
-0.05485979840159416,
-0.01265508309006691,
-0.2687699496746063,
0.4798910915851593,
-0.06268786638975143,
-0.34481245279312134,
-0.1742752194404602,
0.10041245818138123,
-0.26061391830444336,
0.265553742647171,
0.004983477294445038,
0.037517301738262177,
0.15041925013065338,
-0.36913180351257324,
0.2161605805158615,
-0.13115112483501434,
0.17783065140247345,
-0.3457722067832947,
0.10316925495862961,
-0.08137404918670654,
-0.6869226694107056,
0.017364203929901123,
0.2560489773750305,
0.17541736364364624,
-0.09443644434213638,
0.5446497797966003,
-0.4150453805923462,
0.1447615921497345,
-0.04595400393009186,
0.16156622767448425,
0.14491665363311768,
0.16062860190868378,
-0.6060854196548462,
0.3728238046169281,
-0.2745351195335388,
0.05764300376176834,
0.030735276639461517,
-0.014605402946472168,
-0.1264384686946869,
-0.02412497065961361,
-0.03010036051273346,
0.35156887769699097,
0.08327767252922058,
0.23094752430915833,
-0.3654412627220154,
-0.23694944381713867,
0.12336357682943344,
0.3634355962276459,
-0.11454500257968903,
-0.41169869899749756,
-0.049331970512866974,
-0.19168885052204132,
0.05531933158636093,
-0.11574187874794006,
0.1517808586359024,
0.4218286871910095,
0.1359187215566635,
-0.11939263343811035,
0.10268701612949371,
0.11307435482740402,
-0.4654298424720764,
0.021459825336933136,
0.07177260518074036,
-0.0631105899810791,
-0.3461885452270508,
-0.08819694072008133,
-0.0301499180495739,
0.24874956905841827,
0.09451162070035934,
0.20600970089435577,
0.03403902053833008,
-0.17311540246009827,
0.07218863070011139,
-0.0024393200874328613,
-0.09863884001970291,
-0.41359010338783264,
0.13343380391597748,
0.07346183061599731,
-0.010111004114151001,
0.390627384185791,
0.0637328252196312,
-0.2933794856071472,
0.06923133879899979,
0.1497812271118164,
-0.033690109848976135,
-0.14471103250980377,
-0.09443841129541397,
0.1845565140247345,
-0.08298864960670471,
0.0026111528277397156,
-0.24477806687355042,
0.12931974232196808,
0.28015226125717163,
-0.3557434678077698,
0.02776428684592247,
0.10324957966804504,
0.07656989991664886,
-0.06545446813106537,
0.22417423129081726,
0.4178517460823059,
-0.3288942277431488,
0.2032138556241989,
0.09631942212581635,
-0.2922596037387848,
0.06881310790777206,
-0.0792858749628067,
-0.0184270441532135,
0.16511406004428864,
0.22110243141651154,
0.3922337591648102,
0.22438634932041168,
0.13821065425872803,
-0.16022242605686188,
-0.11941797286272049,
0.39859989285469055,
-0.18343013525009155,
-0.08150052279233932,
0.152345210313797,
-0.13357818126678467,
-0.03313310071825981,
0.09641946852207184,
-0.129415363073349,
0.1355019509792328,
0.2478066235780716,
-0.14270131289958954,
-0.0006219036877155304,
0.027252674102783203,
-0.17982792854309082,
0.2222771942615509,
0.19782565534114838,
0.1286395788192749,
0.20186516642570496,
0.5253883600234985,
-0.1262485235929489,
-0.23405295610427856,
-0.22392231225967407,
0.24419981241226196,
0.1961282193660736,
-0.29082342982292175,
0.12981010973453522,
-0.06877226382493973,
0.024300768971443176,
-0.08478265255689621,
-0.6795874834060669,
-0.30618810653686523,
-0.09219721704721451,
0.0006515197455883026,
0.4704107642173767,
-0.33090144395828247,
0.0706554427742958,
0.15992683172225952,
0.3159407377243042,
0.07936646789312363,
-0.18853288888931274,
-0.04437362402677536,
-0.34382912516593933,
-0.25352951884269714,
-0.026064636185765266,
0.46301335096359253,
0.14641420543193817,
0.07041864097118378,
0.3701912760734558,
0.022186998277902603,
-0.06104452908039093,
-0.4288596510887146,
0.21847784519195557,
-0.04679907113313675,
0.07783330976963043,
0.0034068897366523743,
0.12915553152561188,
-0.24721203744411469,
-0.2504464387893677,
0.3068673610687256,
0.03602481633424759,
-0.20576167106628418,
0.32711663842201233,
-0.1920829564332962,
0.07442625612020493,
-0.1781022697687149,
0.11519260704517365,
0.21282662451267242,
-0.5418015122413635,
0.3973289132118225,
-0.18551932275295258,
0.003990918397903442,
-0.2795966863632202,
0.26352065801620483,
0.09601008892059326,
0.06791519373655319,
-0.04049726575613022,
0.059400688856840134,
-0.42019131779670715,
0.19610176980495453,
-0.04033263772726059,
-0.188174769282341,
0.041839536279439926,
0.1097165197134018,
0.1519089639186859,
0.16503176093101501,
-0.6058769226074219,
-0.01286236196756363,
-0.07757627218961716,
0.5512674450874329,
-0.34305447340011597,
-0.2375434786081314,
0.1149817407131195,
0.18758068978786469,
-0.016697505488991737,
0.12442358583211899,
-0.14346545934677124,
0.015068188309669495,
-0.007389876991510391,
0.20498797297477722,
-0.10102466493844986,
0.5279220938682556,
0.13047108054161072,
0.7018234729766846,
-0.16545529663562775,
-0.1430087834596634,
0.33132365345954895,
0.2419927716255188,
0.07736510783433914,
0.048163894563913345,
-0.02841293066740036,
-0.11799871921539307,
-0.18098780512809753,
-0.08216635137796402,
-0.006838537752628326,
0.04872739315032959,
-0.11016467958688736,
-0.027632465586066246,
-0.1180320531129837,
-0.2268262803554535,
-0.15881066024303436,
0.3197793960571289,
0.06100717559456825,
-0.11388946324586868,
-0.20074088871479034,
-0.2847958505153656,
-0.01700841449201107,
-0.08031148463487625,
0.05849117413163185,
0.03808983787894249,
0.10930915176868439,
0.11452367901802063,
-0.015752147883176804,
-0.3002431094646454,
-0.03336998075246811,
0.07999861240386963,
0.3141290247440338,
-0.14442752301692963,
0.0518038384616375,
-0.19720858335494995,
0.18430858850479126,
-0.47779303789138794,
0.7541436553001404,
0.46496427059173584,
-0.07626182585954666,
0.13590151071548462,
-0.06636033952236176,
-0.3780810534954071,
-0.06195565313100815,
0.08362981677055359,
0.19823597371578217,
0.5710024237632751,
0.1032126396894455,
-0.4526483118534088,
-0.10598378628492355,
-0.1052926778793335,
0.3224130868911743,
0.014623809605836868,
-0.4784035384654999,
-0.40637344121932983,
-0.4959048926830292,
-0.457832008600235,
-0.055918820202350616,
0.09452845901250839,
0.19011013209819794,
0.10296480357646942,
-0.09873886406421661,
0.27969011664390564,
-0.2547013461589813,
-0.47950637340545654,
0.09781898558139801,
0.1785520315170288,
-0.5503334403038025,
0.14910228550434113,
0.051228735595941544,
0.31933829188346863,
0.5359148383140564,
0.6146830916404724,
0.590986430644989,
-0.21832555532455444,
-0.05383634567260742,
0.3960568606853485,
0.1798863559961319,
0.16794666647911072,
0.16721220314502716,
0.20855772495269775,
-0.17270226776599884,
0.2022818922996521,
0.22147594392299652,
-0.010497720912098885,
0.19086387753486633,
-0.12107626348733902,
-0.0008762726210989058,
0.2911648750305176,
0.5025099515914917,
-0.21723051369190216,
0.15785937011241913,
0.4766685366630554,
0.28344467282295227,
-0.04671666771173477,
0.22268623113632202,
-0.05963493138551712,
0.9461209177970886,
-0.021072842180728912,
0.13255441188812256,
0.5243242979049683,
-0.42520225048065186,
0.5806593894958496,
-0.3188987970352173,
0.09764829277992249,
-0.4774039387702942,
0.34796005487442017,
0.06618022173643112,
-0.21018780767917633,
-0.08619844168424606,
0.06463321298360825,
-0.04271338880062103,
-0.19860470294952393,
-0.08621235936880112,
0.09070894122123718,
-0.11656421422958374,
0.07200505584478378,
-0.02068157307803631,
0.0002180337905883789,
-0.3245546221733093,
-0.006256762892007828,
-0.3452308773994446,
-0.1282552033662796,
-0.1717911660671234,
-0.3250170946121216,
0.04215412214398384,
-0.17573441565036774,
-0.19179342687129974,
0.27093449234962463,
0.1396906077861786,
0.37713950872421265,
0.27483829855918884,
-0.14227506518363953,
-0.007455416023731232,
-0.4400266110897064,
-0.2658150792121887,
-0.1649734526872635,
-0.038579605519771576,
0.22400443255901337,
0.008436579257249832,
-0.12542591989040375,
-0.021885020658373833,
0.12434019148349762,
0.14794714748859406,
-0.17208102345466614,
-0.17584757506847382,
0.146366149187088,
-0.17003430426120758,
-0.18596340715885162,
-0.14072968065738678,
0.1831442266702652,
-0.15189681947231293,
-0.03113069012761116,
-0.06275996565818787,
-0.14789697527885437,
0.08176018297672272,
-0.128449946641922,
0.06835391372442245,
0.002666063606739044,
0.07371871918439865,
-0.31619441509246826,
0.08392003178596497,
-0.3015908896923065,
-0.08405116200447083,
0.2698034942150116,
-0.0315241739153862,
0.14634712040424347,
0.45389029383659363,
0.40275251865386963,
-0.07262209057807922,
-0.095639169216156,
-0.0567292794585228,
0.5515413880348206,
-0.605144739151001,
0.2913154065608978,
-0.15657995641231537,
0.11268819868564606,
0.0965895727276802,
0.317776620388031,
0.2544376254081726,
0.0715055838227272,
0.026548314839601517,
-0.34782475233078003,
-0.2285258173942566,
0.4916565418243408,
-0.0185181125998497,
0.012201707810163498,
0.1027069017291069,
0.4117231070995331,
-0.07805374264717102,
0.19734074175357819,
-0.21987274289131165,
0.30208495259284973,
0.028722813352942467,
0.05645482987165451,
-0.4602075219154358,
-0.2132689356803894,
-0.20159199833869934,
0.25507763028144836,
0.027088599279522896,
0.1679866909980774,
-0.07122506946325302,
-0.12592566013336182,
-0.12761655449867249,
0.10120327770709991,
0.102016881108284,
-0.0968397855758667,
-0.06450218707323074,
-0.10317187011241913,
0.1211114227771759,
0.12978407740592957,
0.13172748684883118,
-0.20998993515968323,
-0.053500980138778687,
-0.3004152476787567,
0.0015182271599769592,
-0.18776541948318481,
-0.36424320936203003,
0.07901668548583984,
-0.033779487013816833,
0.28909656405448914,
0.08048427104949951,
0.2754157781600952,
-0.02370668761432171,
-0.06440620869398117,
-0.22985851764678955,
0.1052856370806694,
0.152957946062088,
-0.0467553585767746,
0.4014988839626312,
-0.32381218671798706,
-0.038765016943216324,
-0.2653615176677704,
0.27564525604248047,
0.45938175916671753,
-0.22526399791240692,
-0.12385697662830353,
0.01526157557964325,
0.16776694357395172,
0.0016634222120046616,
-0.21519118547439575,
-0.21952378749847412,
-0.04977622628211975,
-0.15386952459812164,
-0.07467363029718399,
-0.09042397141456604,
-0.2073935866355896,
-0.17872630059719086,
0.1219562515616417,
0.29474350810050964,
0.2419099658727646,
-0.34636542201042175,
0.37922409176826477,
-0.27893200516700745,
-0.1749602109193802,
0.2887687683105469,
0.1355142444372177,
0.559386134147644,
-0.09074176847934723,
-0.07203657180070877,
0.18086522817611694,
-0.051142655313014984,
0.08335897326469421,
-0.15314683318138123,
-0.42818620800971985,
-0.17864654958248138,
0.36371320486068726,
0.20608429610729218,
-0.24173831939697266,
0.30446869134902954,
0.5248375535011292,
0.40107738971710205,
-0.11268875747919083,
-0.019807986915111542,
0.2256045639514923,
-0.1309850811958313,
0.22233963012695312,
-0.5097845792770386,
-0.1980469971895218,
-0.12368007004261017,
0.38702818751335144,
-0.1253378987312317,
0.055718403309583664,
0.49129825830459595,
0.17829591035842896,
-0.0879882276058197,
-0.6212044954299927,
-0.1130405142903328,
0.07271505892276764,
-0.0714721754193306,
-0.23943841457366943,
0.22984124720096588,
0.6816924214363098,
-0.4974336326122284,
-0.056194696575403214,
-0.21587972342967987,
0.4886174499988556,
0.27109819650650024,
-0.21118149161338806,
-0.4033636748790741,
-0.21839198470115662,
-0.07209066301584244,
-0.09500770270824432,
0.1022532731294632,
0.5172536373138428,
0.34985119104385376,
0.23339612782001495,
0.06629250198602676,
-0.14184127748012543,
0.23030219972133636,
0.1463664323091507,
0.13845176994800568,
0.000585249625146389,
-0.23334673047065735,
-0.23541691899299622,
-0.34432291984558105,
-0.18023358285427094,
-0.2282654047012329,
-0.3921261131763458,
-0.3310353755950928,
0.12118980288505554,
-0.031211037188768387,
-0.13187964260578156,
-0.1365349292755127,
0.0630984976887703,
-0.07263322174549103,
0.6978247761726379,
0.34853535890579224,
0.20587164163589478,
-0.2465088665485382,
-0.26132383942604065,
-0.2471020221710205,
0.47968819737434387,
-0.4091101288795471,
0.19831575453281403,
0.2130555361509323,
0.18338409066200256,
0.10704760253429413,
0.3368973731994629,
-0.06520387530326843,
0.5276257991790771,
-0.1808636635541916,
-0.21479082107543945,
-0.38511279225349426,
0.03682646155357361,
0.2935439944267273,
-0.16676639020442963,
-0.18446160852909088,
-0.15145716071128845,
0.33867350220680237,
-0.17680764198303223,
0.11256473511457443,
-0.11822760105133057,
0.02327253669500351,
0.05392232909798622,
0.08557051420211792,
0.32998472452163696,
0.08187305927276611,
0.32917287945747375,
0.028653860092163086,
-0.14292383193969727,
-0.10798376798629761,
-0.25462934374809265,
-0.1726098358631134,
0.38462379574775696,
0.058152005076408386,
0.41165581345558167,
-0.0787665843963623,
0.0795212984085083,
-0.1733231544494629,
0.10523437708616257,
-0.4348299503326416,
-0.09791164100170135,
0.12186213582754135,
-0.23521146178245544,
0.024975545704364777,
0.10284916311502457,
-0.017111757770180702,
0.11467592418193817,
0.08856936544179916,
0.11370491981506348,
-0.49449437856674194,
-0.1414472460746765,
0.4697197675704956,
-0.3657928705215454,
-0.2979661226272583,
0.49709996581077576,
0.10345209389925003,
0.3452361226081848,
-0.11850882321596146,
-0.5068215131759644,
0.08914429694414139,
0.1896466612815857,
0.05866410583257675,
-0.37224289774894714,
0.22458240389823914,
0.04821459949016571,
-0.06096334010362625,
0.05195166543126106,
0.22357188165187836,
0.18367227911949158,
-0.36517104506492615,
-0.03171267360448837,
-0.12904906272888184
] |
https://github.com/huggingface/datasets/issues/2181 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries) | I'm using `pyarrow==3.0.0` with `datasets==1.5.0`.
Your point totally makes sense. I will check if my jsonl file contains an extremely long file and let you know.
Here are some different error messages that I got when tweaking `block_size`. I also suspect that this is related to the pyarrow... but I guess it would be wonderful if datasesets could give a clear guide on how to play with large datasets! (I am suddenly experiencing various issue when working with large datasets.. e.g. #1992 )
```python
return paj.ReadOptions(use_threads=self.use_threads, block_size=self.block_size)
File "pyarrow/_json.pyx", line 56, in pyarrow._json.ReadOptions.__init__
File "pyarrow/_json.pyx", line 81, in pyarrow._json.ReadOptions.block_size.__set__
OverflowError: value too large to convert to int32_t
```
```python
line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Exceeded maximum rows
``` | Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance! | 137 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
I'm using `pyarrow==3.0.0` with `datasets==1.5.0`.
Your point totally makes sense. I will check if my jsonl file contains an extremely long file and let you know.
Here are some different error messages that I got when tweaking `block_size`. I also suspect that this is related to the pyarrow... but I guess it would be wonderful if datasesets could give a clear guide on how to play with large datasets! (I am suddenly experiencing various issue when working with large datasets.. e.g. #1992 )
```python
return paj.ReadOptions(use_threads=self.use_threads, block_size=self.block_size)
File "pyarrow/_json.pyx", line 56, in pyarrow._json.ReadOptions.__init__
File "pyarrow/_json.pyx", line 81, in pyarrow._json.ReadOptions.block_size.__set__
OverflowError: value too large to convert to int32_t
```
```python
line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Exceeded maximum rows
``` | [
0.016556892544031143,
0.012686818838119507,
-0.007510561496019363,
0.34093791246414185,
0.1604531705379486,
-0.26471415162086487,
0.1936325877904892,
0.5859467387199402,
-0.16216063499450684,
-0.08150680363178253,
0.1654731184244156,
0.14416258037090302,
-0.015083088539540768,
0.014562183991074562,
-0.12952084839344025,
-0.19119185209274292,
0.033368244767189026,
0.07827429473400116,
-0.08155332505702972,
0.13550728559494019,
-0.03688661754131317,
0.2328721433877945,
-0.0935274213552475,
0.23239141702651978,
-0.08702807128429413,
-0.07815100997686386,
0.1980639100074768,
0.3374815285205841,
-0.3348844349384308,
-0.4495861828327179,
0.16122518479824066,
-0.2951851487159729,
0.0062587931752204895,
0.3340715765953064,
-0.0001156308499048464,
0.04710552096366882,
0.24958986043930054,
0.10917907953262329,
0.01874280720949173,
-0.2191220372915268,
0.2808353006839752,
-0.3987071216106415,
0.22801190614700317,
-0.16741731762886047,
0.12958493828773499,
-0.4462135136127472,
-0.3999217748641968,
0.3737809360027313,
0.42772960662841797,
-0.12555453181266785,
0.16510137915611267,
0.0912109762430191,
0.2657489776611328,
0.2669146955013275,
0.4368440806865692,
-0.06525062024593353,
0.02739820070564747,
0.5041722059249878,
0.3052024245262146,
-0.23820461332798004,
-0.335480660200119,
-0.1370314061641693,
-0.24959197640419006,
0.13811466097831726,
0.37793225049972534,
-0.11720085889101028,
0.07628121227025986,
0.058968354016542435,
-0.07994316518306732,
0.03772144019603729,
0.2263207733631134,
-0.40860190987586975,
-0.10335946828126907,
-0.07818783074617386,
-0.08564862608909607,
-0.1830739825963974,
0.30791836977005005,
0.38823121786117554,
-0.2103946954011917,
0.06983020901679993,
-0.1914450228214264,
-0.10000098496675491,
-0.1991206705570221,
0.17865148186683655,
-0.3580312132835388,
-0.12594978511333466,
-0.002453545108437538,
0.3322301506996155,
0.23105330765247345,
-0.007611144334077835,
-0.03557528182864189,
0.03110618330538273,
-0.27349382638931274,
-0.0565979890525341,
-0.20946244895458221,
0.01663956791162491,
0.0015149042010307312,
-0.31718313694000244,
0.19064882397651672,
0.2260885387659073,
0.19608604907989502,
-0.06559465825557709,
0.2463151216506958,
0.2574925124645233,
0.6111615896224976,
0.059475239366292953,
-0.352253794670105,
-0.16774751245975494,
0.2054002732038498,
0.23781487345695496,
-0.01948724128305912,
0.06098773330450058,
-0.05920769274234772,
-0.5538619756698608,
0.05948207899928093,
-0.27982693910598755,
0.25977540016174316,
-0.21602413058280945,
-0.21031981706619263,
0.13332237303256989,
-0.7950460314750671,
0.05001147463917732,
0.16625307500362396,
0.24969911575317383,
0.027215998619794846,
0.23634734749794006,
0.048551879823207855,
0.15819598734378815,
0.008959174156188965,
-0.11942119151353836,
-0.007867556065320969,
0.12636804580688477,
-0.152511864900589,
0.0385962538421154,
0.15799188613891602,
-0.13358120620250702,
-0.006416200660169125,
0.11933470517396927,
0.21734756231307983,
-0.21163928508758545,
0.18620672821998596,
0.016617320477962494,
0.04777013882994652,
0.3288208842277527,
-0.05167620629072189,
0.11164071410894394,
-0.05485979840159416,
-0.01265508309006691,
-0.2687699496746063,
0.4798910915851593,
-0.06268786638975143,
-0.34481245279312134,
-0.1742752194404602,
0.10041245818138123,
-0.26061391830444336,
0.265553742647171,
0.004983477294445038,
0.037517301738262177,
0.15041925013065338,
-0.36913180351257324,
0.2161605805158615,
-0.13115112483501434,
0.17783065140247345,
-0.3457722067832947,
0.10316925495862961,
-0.08137404918670654,
-0.6869226694107056,
0.017364203929901123,
0.2560489773750305,
0.17541736364364624,
-0.09443644434213638,
0.5446497797966003,
-0.4150453805923462,
0.1447615921497345,
-0.04595400393009186,
0.16156622767448425,
0.14491665363311768,
0.16062860190868378,
-0.6060854196548462,
0.3728238046169281,
-0.2745351195335388,
0.05764300376176834,
0.030735276639461517,
-0.014605402946472168,
-0.1264384686946869,
-0.02412497065961361,
-0.03010036051273346,
0.35156887769699097,
0.08327767252922058,
0.23094752430915833,
-0.3654412627220154,
-0.23694944381713867,
0.12336357682943344,
0.3634355962276459,
-0.11454500257968903,
-0.41169869899749756,
-0.049331970512866974,
-0.19168885052204132,
0.05531933158636093,
-0.11574187874794006,
0.1517808586359024,
0.4218286871910095,
0.1359187215566635,
-0.11939263343811035,
0.10268701612949371,
0.11307435482740402,
-0.4654298424720764,
0.021459825336933136,
0.07177260518074036,
-0.0631105899810791,
-0.3461885452270508,
-0.08819694072008133,
-0.0301499180495739,
0.24874956905841827,
0.09451162070035934,
0.20600970089435577,
0.03403902053833008,
-0.17311540246009827,
0.07218863070011139,
-0.0024393200874328613,
-0.09863884001970291,
-0.41359010338783264,
0.13343380391597748,
0.07346183061599731,
-0.010111004114151001,
0.390627384185791,
0.0637328252196312,
-0.2933794856071472,
0.06923133879899979,
0.1497812271118164,
-0.033690109848976135,
-0.14471103250980377,
-0.09443841129541397,
0.1845565140247345,
-0.08298864960670471,
0.0026111528277397156,
-0.24477806687355042,
0.12931974232196808,
0.28015226125717163,
-0.3557434678077698,
0.02776428684592247,
0.10324957966804504,
0.07656989991664886,
-0.06545446813106537,
0.22417423129081726,
0.4178517460823059,
-0.3288942277431488,
0.2032138556241989,
0.09631942212581635,
-0.2922596037387848,
0.06881310790777206,
-0.0792858749628067,
-0.0184270441532135,
0.16511406004428864,
0.22110243141651154,
0.3922337591648102,
0.22438634932041168,
0.13821065425872803,
-0.16022242605686188,
-0.11941797286272049,
0.39859989285469055,
-0.18343013525009155,
-0.08150052279233932,
0.152345210313797,
-0.13357818126678467,
-0.03313310071825981,
0.09641946852207184,
-0.129415363073349,
0.1355019509792328,
0.2478066235780716,
-0.14270131289958954,
-0.0006219036877155304,
0.027252674102783203,
-0.17982792854309082,
0.2222771942615509,
0.19782565534114838,
0.1286395788192749,
0.20186516642570496,
0.5253883600234985,
-0.1262485235929489,
-0.23405295610427856,
-0.22392231225967407,
0.24419981241226196,
0.1961282193660736,
-0.29082342982292175,
0.12981010973453522,
-0.06877226382493973,
0.024300768971443176,
-0.08478265255689621,
-0.6795874834060669,
-0.30618810653686523,
-0.09219721704721451,
0.0006515197455883026,
0.4704107642173767,
-0.33090144395828247,
0.0706554427742958,
0.15992683172225952,
0.3159407377243042,
0.07936646789312363,
-0.18853288888931274,
-0.04437362402677536,
-0.34382912516593933,
-0.25352951884269714,
-0.026064636185765266,
0.46301335096359253,
0.14641420543193817,
0.07041864097118378,
0.3701912760734558,
0.022186998277902603,
-0.06104452908039093,
-0.4288596510887146,
0.21847784519195557,
-0.04679907113313675,
0.07783330976963043,
0.0034068897366523743,
0.12915553152561188,
-0.24721203744411469,
-0.2504464387893677,
0.3068673610687256,
0.03602481633424759,
-0.20576167106628418,
0.32711663842201233,
-0.1920829564332962,
0.07442625612020493,
-0.1781022697687149,
0.11519260704517365,
0.21282662451267242,
-0.5418015122413635,
0.3973289132118225,
-0.18551932275295258,
0.003990918397903442,
-0.2795966863632202,
0.26352065801620483,
0.09601008892059326,
0.06791519373655319,
-0.04049726575613022,
0.059400688856840134,
-0.42019131779670715,
0.19610176980495453,
-0.04033263772726059,
-0.188174769282341,
0.041839536279439926,
0.1097165197134018,
0.1519089639186859,
0.16503176093101501,
-0.6058769226074219,
-0.01286236196756363,
-0.07757627218961716,
0.5512674450874329,
-0.34305447340011597,
-0.2375434786081314,
0.1149817407131195,
0.18758068978786469,
-0.016697505488991737,
0.12442358583211899,
-0.14346545934677124,
0.015068188309669495,
-0.007389876991510391,
0.20498797297477722,
-0.10102466493844986,
0.5279220938682556,
0.13047108054161072,
0.7018234729766846,
-0.16545529663562775,
-0.1430087834596634,
0.33132365345954895,
0.2419927716255188,
0.07736510783433914,
0.048163894563913345,
-0.02841293066740036,
-0.11799871921539307,
-0.18098780512809753,
-0.08216635137796402,
-0.006838537752628326,
0.04872739315032959,
-0.11016467958688736,
-0.027632465586066246,
-0.1180320531129837,
-0.2268262803554535,
-0.15881066024303436,
0.3197793960571289,
0.06100717559456825,
-0.11388946324586868,
-0.20074088871479034,
-0.2847958505153656,
-0.01700841449201107,
-0.08031148463487625,
0.05849117413163185,
0.03808983787894249,
0.10930915176868439,
0.11452367901802063,
-0.015752147883176804,
-0.3002431094646454,
-0.03336998075246811,
0.07999861240386963,
0.3141290247440338,
-0.14442752301692963,
0.0518038384616375,
-0.19720858335494995,
0.18430858850479126,
-0.47779303789138794,
0.7541436553001404,
0.46496427059173584,
-0.07626182585954666,
0.13590151071548462,
-0.06636033952236176,
-0.3780810534954071,
-0.06195565313100815,
0.08362981677055359,
0.19823597371578217,
0.5710024237632751,
0.1032126396894455,
-0.4526483118534088,
-0.10598378628492355,
-0.1052926778793335,
0.3224130868911743,
0.014623809605836868,
-0.4784035384654999,
-0.40637344121932983,
-0.4959048926830292,
-0.457832008600235,
-0.055918820202350616,
0.09452845901250839,
0.19011013209819794,
0.10296480357646942,
-0.09873886406421661,
0.27969011664390564,
-0.2547013461589813,
-0.47950637340545654,
0.09781898558139801,
0.1785520315170288,
-0.5503334403038025,
0.14910228550434113,
0.051228735595941544,
0.31933829188346863,
0.5359148383140564,
0.6146830916404724,
0.590986430644989,
-0.21832555532455444,
-0.05383634567260742,
0.3960568606853485,
0.1798863559961319,
0.16794666647911072,
0.16721220314502716,
0.20855772495269775,
-0.17270226776599884,
0.2022818922996521,
0.22147594392299652,
-0.010497720912098885,
0.19086387753486633,
-0.12107626348733902,
-0.0008762726210989058,
0.2911648750305176,
0.5025099515914917,
-0.21723051369190216,
0.15785937011241913,
0.4766685366630554,
0.28344467282295227,
-0.04671666771173477,
0.22268623113632202,
-0.05963493138551712,
0.9461209177970886,
-0.021072842180728912,
0.13255441188812256,
0.5243242979049683,
-0.42520225048065186,
0.5806593894958496,
-0.3188987970352173,
0.09764829277992249,
-0.4774039387702942,
0.34796005487442017,
0.06618022173643112,
-0.21018780767917633,
-0.08619844168424606,
0.06463321298360825,
-0.04271338880062103,
-0.19860470294952393,
-0.08621235936880112,
0.09070894122123718,
-0.11656421422958374,
0.07200505584478378,
-0.02068157307803631,
0.0002180337905883789,
-0.3245546221733093,
-0.006256762892007828,
-0.3452308773994446,
-0.1282552033662796,
-0.1717911660671234,
-0.3250170946121216,
0.04215412214398384,
-0.17573441565036774,
-0.19179342687129974,
0.27093449234962463,
0.1396906077861786,
0.37713950872421265,
0.27483829855918884,
-0.14227506518363953,
-0.007455416023731232,
-0.4400266110897064,
-0.2658150792121887,
-0.1649734526872635,
-0.038579605519771576,
0.22400443255901337,
0.008436579257249832,
-0.12542591989040375,
-0.021885020658373833,
0.12434019148349762,
0.14794714748859406,
-0.17208102345466614,
-0.17584757506847382,
0.146366149187088,
-0.17003430426120758,
-0.18596340715885162,
-0.14072968065738678,
0.1831442266702652,
-0.15189681947231293,
-0.03113069012761116,
-0.06275996565818787,
-0.14789697527885437,
0.08176018297672272,
-0.128449946641922,
0.06835391372442245,
0.002666063606739044,
0.07371871918439865,
-0.31619441509246826,
0.08392003178596497,
-0.3015908896923065,
-0.08405116200447083,
0.2698034942150116,
-0.0315241739153862,
0.14634712040424347,
0.45389029383659363,
0.40275251865386963,
-0.07262209057807922,
-0.095639169216156,
-0.0567292794585228,
0.5515413880348206,
-0.605144739151001,
0.2913154065608978,
-0.15657995641231537,
0.11268819868564606,
0.0965895727276802,
0.317776620388031,
0.2544376254081726,
0.0715055838227272,
0.026548314839601517,
-0.34782475233078003,
-0.2285258173942566,
0.4916565418243408,
-0.0185181125998497,
0.012201707810163498,
0.1027069017291069,
0.4117231070995331,
-0.07805374264717102,
0.19734074175357819,
-0.21987274289131165,
0.30208495259284973,
0.028722813352942467,
0.05645482987165451,
-0.4602075219154358,
-0.2132689356803894,
-0.20159199833869934,
0.25507763028144836,
0.027088599279522896,
0.1679866909980774,
-0.07122506946325302,
-0.12592566013336182,
-0.12761655449867249,
0.10120327770709991,
0.102016881108284,
-0.0968397855758667,
-0.06450218707323074,
-0.10317187011241913,
0.1211114227771759,
0.12978407740592957,
0.13172748684883118,
-0.20998993515968323,
-0.053500980138778687,
-0.3004152476787567,
0.0015182271599769592,
-0.18776541948318481,
-0.36424320936203003,
0.07901668548583984,
-0.033779487013816833,
0.28909656405448914,
0.08048427104949951,
0.2754157781600952,
-0.02370668761432171,
-0.06440620869398117,
-0.22985851764678955,
0.1052856370806694,
0.152957946062088,
-0.0467553585767746,
0.4014988839626312,
-0.32381218671798706,
-0.038765016943216324,
-0.2653615176677704,
0.27564525604248047,
0.45938175916671753,
-0.22526399791240692,
-0.12385697662830353,
0.01526157557964325,
0.16776694357395172,
0.0016634222120046616,
-0.21519118547439575,
-0.21952378749847412,
-0.04977622628211975,
-0.15386952459812164,
-0.07467363029718399,
-0.09042397141456604,
-0.2073935866355896,
-0.17872630059719086,
0.1219562515616417,
0.29474350810050964,
0.2419099658727646,
-0.34636542201042175,
0.37922409176826477,
-0.27893200516700745,
-0.1749602109193802,
0.2887687683105469,
0.1355142444372177,
0.559386134147644,
-0.09074176847934723,
-0.07203657180070877,
0.18086522817611694,
-0.051142655313014984,
0.08335897326469421,
-0.15314683318138123,
-0.42818620800971985,
-0.17864654958248138,
0.36371320486068726,
0.20608429610729218,
-0.24173831939697266,
0.30446869134902954,
0.5248375535011292,
0.40107738971710205,
-0.11268875747919083,
-0.019807986915111542,
0.2256045639514923,
-0.1309850811958313,
0.22233963012695312,
-0.5097845792770386,
-0.1980469971895218,
-0.12368007004261017,
0.38702818751335144,
-0.1253378987312317,
0.055718403309583664,
0.49129825830459595,
0.17829591035842896,
-0.0879882276058197,
-0.6212044954299927,
-0.1130405142903328,
0.07271505892276764,
-0.0714721754193306,
-0.23943841457366943,
0.22984124720096588,
0.6816924214363098,
-0.4974336326122284,
-0.056194696575403214,
-0.21587972342967987,
0.4886174499988556,
0.27109819650650024,
-0.21118149161338806,
-0.4033636748790741,
-0.21839198470115662,
-0.07209066301584244,
-0.09500770270824432,
0.1022532731294632,
0.5172536373138428,
0.34985119104385376,
0.23339612782001495,
0.06629250198602676,
-0.14184127748012543,
0.23030219972133636,
0.1463664323091507,
0.13845176994800568,
0.000585249625146389,
-0.23334673047065735,
-0.23541691899299622,
-0.34432291984558105,
-0.18023358285427094,
-0.2282654047012329,
-0.3921261131763458,
-0.3310353755950928,
0.12118980288505554,
-0.031211037188768387,
-0.13187964260578156,
-0.1365349292755127,
0.0630984976887703,
-0.07263322174549103,
0.6978247761726379,
0.34853535890579224,
0.20587164163589478,
-0.2465088665485382,
-0.26132383942604065,
-0.2471020221710205,
0.47968819737434387,
-0.4091101288795471,
0.19831575453281403,
0.2130555361509323,
0.18338409066200256,
0.10704760253429413,
0.3368973731994629,
-0.06520387530326843,
0.5276257991790771,
-0.1808636635541916,
-0.21479082107543945,
-0.38511279225349426,
0.03682646155357361,
0.2935439944267273,
-0.16676639020442963,
-0.18446160852909088,
-0.15145716071128845,
0.33867350220680237,
-0.17680764198303223,
0.11256473511457443,
-0.11822760105133057,
0.02327253669500351,
0.05392232909798622,
0.08557051420211792,
0.32998472452163696,
0.08187305927276611,
0.32917287945747375,
0.028653860092163086,
-0.14292383193969727,
-0.10798376798629761,
-0.25462934374809265,
-0.1726098358631134,
0.38462379574775696,
0.058152005076408386,
0.41165581345558167,
-0.0787665843963623,
0.0795212984085083,
-0.1733231544494629,
0.10523437708616257,
-0.4348299503326416,
-0.09791164100170135,
0.12186213582754135,
-0.23521146178245544,
0.024975545704364777,
0.10284916311502457,
-0.017111757770180702,
0.11467592418193817,
0.08856936544179916,
0.11370491981506348,
-0.49449437856674194,
-0.1414472460746765,
0.4697197675704956,
-0.3657928705215454,
-0.2979661226272583,
0.49709996581077576,
0.10345209389925003,
0.3452361226081848,
-0.11850882321596146,
-0.5068215131759644,
0.08914429694414139,
0.1896466612815857,
0.05866410583257675,
-0.37224289774894714,
0.22458240389823914,
0.04821459949016571,
-0.06096334010362625,
0.05195166543126106,
0.22357188165187836,
0.18367227911949158,
-0.36517104506492615,
-0.03171267360448837,
-0.12904906272888184
] |
https://github.com/huggingface/datasets/issues/2181 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries) | I am getting the same error. When I tweak the block_size, I also find:
`OverflowError: value too large to convert to int32_t`
and
`pyarrow.lib.ArrowInvalid: Exceeded maximum rows`
| Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance! | 27 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
I am getting the same error. When I tweak the block_size, I also find:
`OverflowError: value too large to convert to int32_t`
and
`pyarrow.lib.ArrowInvalid: Exceeded maximum rows`
| [
0.016556892544031143,
0.012686818838119507,
-0.007510561496019363,
0.34093791246414185,
0.1604531705379486,
-0.26471415162086487,
0.1936325877904892,
0.5859467387199402,
-0.16216063499450684,
-0.08150680363178253,
0.1654731184244156,
0.14416258037090302,
-0.015083088539540768,
0.014562183991074562,
-0.12952084839344025,
-0.19119185209274292,
0.033368244767189026,
0.07827429473400116,
-0.08155332505702972,
0.13550728559494019,
-0.03688661754131317,
0.2328721433877945,
-0.0935274213552475,
0.23239141702651978,
-0.08702807128429413,
-0.07815100997686386,
0.1980639100074768,
0.3374815285205841,
-0.3348844349384308,
-0.4495861828327179,
0.16122518479824066,
-0.2951851487159729,
0.0062587931752204895,
0.3340715765953064,
-0.0001156308499048464,
0.04710552096366882,
0.24958986043930054,
0.10917907953262329,
0.01874280720949173,
-0.2191220372915268,
0.2808353006839752,
-0.3987071216106415,
0.22801190614700317,
-0.16741731762886047,
0.12958493828773499,
-0.4462135136127472,
-0.3999217748641968,
0.3737809360027313,
0.42772960662841797,
-0.12555453181266785,
0.16510137915611267,
0.0912109762430191,
0.2657489776611328,
0.2669146955013275,
0.4368440806865692,
-0.06525062024593353,
0.02739820070564747,
0.5041722059249878,
0.3052024245262146,
-0.23820461332798004,
-0.335480660200119,
-0.1370314061641693,
-0.24959197640419006,
0.13811466097831726,
0.37793225049972534,
-0.11720085889101028,
0.07628121227025986,
0.058968354016542435,
-0.07994316518306732,
0.03772144019603729,
0.2263207733631134,
-0.40860190987586975,
-0.10335946828126907,
-0.07818783074617386,
-0.08564862608909607,
-0.1830739825963974,
0.30791836977005005,
0.38823121786117554,
-0.2103946954011917,
0.06983020901679993,
-0.1914450228214264,
-0.10000098496675491,
-0.1991206705570221,
0.17865148186683655,
-0.3580312132835388,
-0.12594978511333466,
-0.002453545108437538,
0.3322301506996155,
0.23105330765247345,
-0.007611144334077835,
-0.03557528182864189,
0.03110618330538273,
-0.27349382638931274,
-0.0565979890525341,
-0.20946244895458221,
0.01663956791162491,
0.0015149042010307312,
-0.31718313694000244,
0.19064882397651672,
0.2260885387659073,
0.19608604907989502,
-0.06559465825557709,
0.2463151216506958,
0.2574925124645233,
0.6111615896224976,
0.059475239366292953,
-0.352253794670105,
-0.16774751245975494,
0.2054002732038498,
0.23781487345695496,
-0.01948724128305912,
0.06098773330450058,
-0.05920769274234772,
-0.5538619756698608,
0.05948207899928093,
-0.27982693910598755,
0.25977540016174316,
-0.21602413058280945,
-0.21031981706619263,
0.13332237303256989,
-0.7950460314750671,
0.05001147463917732,
0.16625307500362396,
0.24969911575317383,
0.027215998619794846,
0.23634734749794006,
0.048551879823207855,
0.15819598734378815,
0.008959174156188965,
-0.11942119151353836,
-0.007867556065320969,
0.12636804580688477,
-0.152511864900589,
0.0385962538421154,
0.15799188613891602,
-0.13358120620250702,
-0.006416200660169125,
0.11933470517396927,
0.21734756231307983,
-0.21163928508758545,
0.18620672821998596,
0.016617320477962494,
0.04777013882994652,
0.3288208842277527,
-0.05167620629072189,
0.11164071410894394,
-0.05485979840159416,
-0.01265508309006691,
-0.2687699496746063,
0.4798910915851593,
-0.06268786638975143,
-0.34481245279312134,
-0.1742752194404602,
0.10041245818138123,
-0.26061391830444336,
0.265553742647171,
0.004983477294445038,
0.037517301738262177,
0.15041925013065338,
-0.36913180351257324,
0.2161605805158615,
-0.13115112483501434,
0.17783065140247345,
-0.3457722067832947,
0.10316925495862961,
-0.08137404918670654,
-0.6869226694107056,
0.017364203929901123,
0.2560489773750305,
0.17541736364364624,
-0.09443644434213638,
0.5446497797966003,
-0.4150453805923462,
0.1447615921497345,
-0.04595400393009186,
0.16156622767448425,
0.14491665363311768,
0.16062860190868378,
-0.6060854196548462,
0.3728238046169281,
-0.2745351195335388,
0.05764300376176834,
0.030735276639461517,
-0.014605402946472168,
-0.1264384686946869,
-0.02412497065961361,
-0.03010036051273346,
0.35156887769699097,
0.08327767252922058,
0.23094752430915833,
-0.3654412627220154,
-0.23694944381713867,
0.12336357682943344,
0.3634355962276459,
-0.11454500257968903,
-0.41169869899749756,
-0.049331970512866974,
-0.19168885052204132,
0.05531933158636093,
-0.11574187874794006,
0.1517808586359024,
0.4218286871910095,
0.1359187215566635,
-0.11939263343811035,
0.10268701612949371,
0.11307435482740402,
-0.4654298424720764,
0.021459825336933136,
0.07177260518074036,
-0.0631105899810791,
-0.3461885452270508,
-0.08819694072008133,
-0.0301499180495739,
0.24874956905841827,
0.09451162070035934,
0.20600970089435577,
0.03403902053833008,
-0.17311540246009827,
0.07218863070011139,
-0.0024393200874328613,
-0.09863884001970291,
-0.41359010338783264,
0.13343380391597748,
0.07346183061599731,
-0.010111004114151001,
0.390627384185791,
0.0637328252196312,
-0.2933794856071472,
0.06923133879899979,
0.1497812271118164,
-0.033690109848976135,
-0.14471103250980377,
-0.09443841129541397,
0.1845565140247345,
-0.08298864960670471,
0.0026111528277397156,
-0.24477806687355042,
0.12931974232196808,
0.28015226125717163,
-0.3557434678077698,
0.02776428684592247,
0.10324957966804504,
0.07656989991664886,
-0.06545446813106537,
0.22417423129081726,
0.4178517460823059,
-0.3288942277431488,
0.2032138556241989,
0.09631942212581635,
-0.2922596037387848,
0.06881310790777206,
-0.0792858749628067,
-0.0184270441532135,
0.16511406004428864,
0.22110243141651154,
0.3922337591648102,
0.22438634932041168,
0.13821065425872803,
-0.16022242605686188,
-0.11941797286272049,
0.39859989285469055,
-0.18343013525009155,
-0.08150052279233932,
0.152345210313797,
-0.13357818126678467,
-0.03313310071825981,
0.09641946852207184,
-0.129415363073349,
0.1355019509792328,
0.2478066235780716,
-0.14270131289958954,
-0.0006219036877155304,
0.027252674102783203,
-0.17982792854309082,
0.2222771942615509,
0.19782565534114838,
0.1286395788192749,
0.20186516642570496,
0.5253883600234985,
-0.1262485235929489,
-0.23405295610427856,
-0.22392231225967407,
0.24419981241226196,
0.1961282193660736,
-0.29082342982292175,
0.12981010973453522,
-0.06877226382493973,
0.024300768971443176,
-0.08478265255689621,
-0.6795874834060669,
-0.30618810653686523,
-0.09219721704721451,
0.0006515197455883026,
0.4704107642173767,
-0.33090144395828247,
0.0706554427742958,
0.15992683172225952,
0.3159407377243042,
0.07936646789312363,
-0.18853288888931274,
-0.04437362402677536,
-0.34382912516593933,
-0.25352951884269714,
-0.026064636185765266,
0.46301335096359253,
0.14641420543193817,
0.07041864097118378,
0.3701912760734558,
0.022186998277902603,
-0.06104452908039093,
-0.4288596510887146,
0.21847784519195557,
-0.04679907113313675,
0.07783330976963043,
0.0034068897366523743,
0.12915553152561188,
-0.24721203744411469,
-0.2504464387893677,
0.3068673610687256,
0.03602481633424759,
-0.20576167106628418,
0.32711663842201233,
-0.1920829564332962,
0.07442625612020493,
-0.1781022697687149,
0.11519260704517365,
0.21282662451267242,
-0.5418015122413635,
0.3973289132118225,
-0.18551932275295258,
0.003990918397903442,
-0.2795966863632202,
0.26352065801620483,
0.09601008892059326,
0.06791519373655319,
-0.04049726575613022,
0.059400688856840134,
-0.42019131779670715,
0.19610176980495453,
-0.04033263772726059,
-0.188174769282341,
0.041839536279439926,
0.1097165197134018,
0.1519089639186859,
0.16503176093101501,
-0.6058769226074219,
-0.01286236196756363,
-0.07757627218961716,
0.5512674450874329,
-0.34305447340011597,
-0.2375434786081314,
0.1149817407131195,
0.18758068978786469,
-0.016697505488991737,
0.12442358583211899,
-0.14346545934677124,
0.015068188309669495,
-0.007389876991510391,
0.20498797297477722,
-0.10102466493844986,
0.5279220938682556,
0.13047108054161072,
0.7018234729766846,
-0.16545529663562775,
-0.1430087834596634,
0.33132365345954895,
0.2419927716255188,
0.07736510783433914,
0.048163894563913345,
-0.02841293066740036,
-0.11799871921539307,
-0.18098780512809753,
-0.08216635137796402,
-0.006838537752628326,
0.04872739315032959,
-0.11016467958688736,
-0.027632465586066246,
-0.1180320531129837,
-0.2268262803554535,
-0.15881066024303436,
0.3197793960571289,
0.06100717559456825,
-0.11388946324586868,
-0.20074088871479034,
-0.2847958505153656,
-0.01700841449201107,
-0.08031148463487625,
0.05849117413163185,
0.03808983787894249,
0.10930915176868439,
0.11452367901802063,
-0.015752147883176804,
-0.3002431094646454,
-0.03336998075246811,
0.07999861240386963,
0.3141290247440338,
-0.14442752301692963,
0.0518038384616375,
-0.19720858335494995,
0.18430858850479126,
-0.47779303789138794,
0.7541436553001404,
0.46496427059173584,
-0.07626182585954666,
0.13590151071548462,
-0.06636033952236176,
-0.3780810534954071,
-0.06195565313100815,
0.08362981677055359,
0.19823597371578217,
0.5710024237632751,
0.1032126396894455,
-0.4526483118534088,
-0.10598378628492355,
-0.1052926778793335,
0.3224130868911743,
0.014623809605836868,
-0.4784035384654999,
-0.40637344121932983,
-0.4959048926830292,
-0.457832008600235,
-0.055918820202350616,
0.09452845901250839,
0.19011013209819794,
0.10296480357646942,
-0.09873886406421661,
0.27969011664390564,
-0.2547013461589813,
-0.47950637340545654,
0.09781898558139801,
0.1785520315170288,
-0.5503334403038025,
0.14910228550434113,
0.051228735595941544,
0.31933829188346863,
0.5359148383140564,
0.6146830916404724,
0.590986430644989,
-0.21832555532455444,
-0.05383634567260742,
0.3960568606853485,
0.1798863559961319,
0.16794666647911072,
0.16721220314502716,
0.20855772495269775,
-0.17270226776599884,
0.2022818922996521,
0.22147594392299652,
-0.010497720912098885,
0.19086387753486633,
-0.12107626348733902,
-0.0008762726210989058,
0.2911648750305176,
0.5025099515914917,
-0.21723051369190216,
0.15785937011241913,
0.4766685366630554,
0.28344467282295227,
-0.04671666771173477,
0.22268623113632202,
-0.05963493138551712,
0.9461209177970886,
-0.021072842180728912,
0.13255441188812256,
0.5243242979049683,
-0.42520225048065186,
0.5806593894958496,
-0.3188987970352173,
0.09764829277992249,
-0.4774039387702942,
0.34796005487442017,
0.06618022173643112,
-0.21018780767917633,
-0.08619844168424606,
0.06463321298360825,
-0.04271338880062103,
-0.19860470294952393,
-0.08621235936880112,
0.09070894122123718,
-0.11656421422958374,
0.07200505584478378,
-0.02068157307803631,
0.0002180337905883789,
-0.3245546221733093,
-0.006256762892007828,
-0.3452308773994446,
-0.1282552033662796,
-0.1717911660671234,
-0.3250170946121216,
0.04215412214398384,
-0.17573441565036774,
-0.19179342687129974,
0.27093449234962463,
0.1396906077861786,
0.37713950872421265,
0.27483829855918884,
-0.14227506518363953,
-0.007455416023731232,
-0.4400266110897064,
-0.2658150792121887,
-0.1649734526872635,
-0.038579605519771576,
0.22400443255901337,
0.008436579257249832,
-0.12542591989040375,
-0.021885020658373833,
0.12434019148349762,
0.14794714748859406,
-0.17208102345466614,
-0.17584757506847382,
0.146366149187088,
-0.17003430426120758,
-0.18596340715885162,
-0.14072968065738678,
0.1831442266702652,
-0.15189681947231293,
-0.03113069012761116,
-0.06275996565818787,
-0.14789697527885437,
0.08176018297672272,
-0.128449946641922,
0.06835391372442245,
0.002666063606739044,
0.07371871918439865,
-0.31619441509246826,
0.08392003178596497,
-0.3015908896923065,
-0.08405116200447083,
0.2698034942150116,
-0.0315241739153862,
0.14634712040424347,
0.45389029383659363,
0.40275251865386963,
-0.07262209057807922,
-0.095639169216156,
-0.0567292794585228,
0.5515413880348206,
-0.605144739151001,
0.2913154065608978,
-0.15657995641231537,
0.11268819868564606,
0.0965895727276802,
0.317776620388031,
0.2544376254081726,
0.0715055838227272,
0.026548314839601517,
-0.34782475233078003,
-0.2285258173942566,
0.4916565418243408,
-0.0185181125998497,
0.012201707810163498,
0.1027069017291069,
0.4117231070995331,
-0.07805374264717102,
0.19734074175357819,
-0.21987274289131165,
0.30208495259284973,
0.028722813352942467,
0.05645482987165451,
-0.4602075219154358,
-0.2132689356803894,
-0.20159199833869934,
0.25507763028144836,
0.027088599279522896,
0.1679866909980774,
-0.07122506946325302,
-0.12592566013336182,
-0.12761655449867249,
0.10120327770709991,
0.102016881108284,
-0.0968397855758667,
-0.06450218707323074,
-0.10317187011241913,
0.1211114227771759,
0.12978407740592957,
0.13172748684883118,
-0.20998993515968323,
-0.053500980138778687,
-0.3004152476787567,
0.0015182271599769592,
-0.18776541948318481,
-0.36424320936203003,
0.07901668548583984,
-0.033779487013816833,
0.28909656405448914,
0.08048427104949951,
0.2754157781600952,
-0.02370668761432171,
-0.06440620869398117,
-0.22985851764678955,
0.1052856370806694,
0.152957946062088,
-0.0467553585767746,
0.4014988839626312,
-0.32381218671798706,
-0.038765016943216324,
-0.2653615176677704,
0.27564525604248047,
0.45938175916671753,
-0.22526399791240692,
-0.12385697662830353,
0.01526157557964325,
0.16776694357395172,
0.0016634222120046616,
-0.21519118547439575,
-0.21952378749847412,
-0.04977622628211975,
-0.15386952459812164,
-0.07467363029718399,
-0.09042397141456604,
-0.2073935866355896,
-0.17872630059719086,
0.1219562515616417,
0.29474350810050964,
0.2419099658727646,
-0.34636542201042175,
0.37922409176826477,
-0.27893200516700745,
-0.1749602109193802,
0.2887687683105469,
0.1355142444372177,
0.559386134147644,
-0.09074176847934723,
-0.07203657180070877,
0.18086522817611694,
-0.051142655313014984,
0.08335897326469421,
-0.15314683318138123,
-0.42818620800971985,
-0.17864654958248138,
0.36371320486068726,
0.20608429610729218,
-0.24173831939697266,
0.30446869134902954,
0.5248375535011292,
0.40107738971710205,
-0.11268875747919083,
-0.019807986915111542,
0.2256045639514923,
-0.1309850811958313,
0.22233963012695312,
-0.5097845792770386,
-0.1980469971895218,
-0.12368007004261017,
0.38702818751335144,
-0.1253378987312317,
0.055718403309583664,
0.49129825830459595,
0.17829591035842896,
-0.0879882276058197,
-0.6212044954299927,
-0.1130405142903328,
0.07271505892276764,
-0.0714721754193306,
-0.23943841457366943,
0.22984124720096588,
0.6816924214363098,
-0.4974336326122284,
-0.056194696575403214,
-0.21587972342967987,
0.4886174499988556,
0.27109819650650024,
-0.21118149161338806,
-0.4033636748790741,
-0.21839198470115662,
-0.07209066301584244,
-0.09500770270824432,
0.1022532731294632,
0.5172536373138428,
0.34985119104385376,
0.23339612782001495,
0.06629250198602676,
-0.14184127748012543,
0.23030219972133636,
0.1463664323091507,
0.13845176994800568,
0.000585249625146389,
-0.23334673047065735,
-0.23541691899299622,
-0.34432291984558105,
-0.18023358285427094,
-0.2282654047012329,
-0.3921261131763458,
-0.3310353755950928,
0.12118980288505554,
-0.031211037188768387,
-0.13187964260578156,
-0.1365349292755127,
0.0630984976887703,
-0.07263322174549103,
0.6978247761726379,
0.34853535890579224,
0.20587164163589478,
-0.2465088665485382,
-0.26132383942604065,
-0.2471020221710205,
0.47968819737434387,
-0.4091101288795471,
0.19831575453281403,
0.2130555361509323,
0.18338409066200256,
0.10704760253429413,
0.3368973731994629,
-0.06520387530326843,
0.5276257991790771,
-0.1808636635541916,
-0.21479082107543945,
-0.38511279225349426,
0.03682646155357361,
0.2935439944267273,
-0.16676639020442963,
-0.18446160852909088,
-0.15145716071128845,
0.33867350220680237,
-0.17680764198303223,
0.11256473511457443,
-0.11822760105133057,
0.02327253669500351,
0.05392232909798622,
0.08557051420211792,
0.32998472452163696,
0.08187305927276611,
0.32917287945747375,
0.028653860092163086,
-0.14292383193969727,
-0.10798376798629761,
-0.25462934374809265,
-0.1726098358631134,
0.38462379574775696,
0.058152005076408386,
0.41165581345558167,
-0.0787665843963623,
0.0795212984085083,
-0.1733231544494629,
0.10523437708616257,
-0.4348299503326416,
-0.09791164100170135,
0.12186213582754135,
-0.23521146178245544,
0.024975545704364777,
0.10284916311502457,
-0.017111757770180702,
0.11467592418193817,
0.08856936544179916,
0.11370491981506348,
-0.49449437856674194,
-0.1414472460746765,
0.4697197675704956,
-0.3657928705215454,
-0.2979661226272583,
0.49709996581077576,
0.10345209389925003,
0.3452361226081848,
-0.11850882321596146,
-0.5068215131759644,
0.08914429694414139,
0.1896466612815857,
0.05866410583257675,
-0.37224289774894714,
0.22458240389823914,
0.04821459949016571,
-0.06096334010362625,
0.05195166543126106,
0.22357188165187836,
0.18367227911949158,
-0.36517104506492615,
-0.03171267360448837,
-0.12904906272888184
] |
https://github.com/huggingface/datasets/issues/2181 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries) | I made more tests. I used a smaller dataset and I was getting the same error, which means that it was not necessarily linked to the dataset size. To make both my smaller and larger datasets work, I got rid of lists with the json file. I had the following data format:
```python
[
{'key': "a", 'value': ['one', 'two', 'three']},
{'key': "b", 'value': ['four', 'five', 'six']}
]
```
I changed to:
```python
{'key': "a", 'value': 'one\ntwo\nthree'},
{'key': "b", 'value': 'four\nfive\nsix']}
```
and that worked!
I used the following to reformat my json file:
```python
with open(file_name, "w", encoding="utf-8") as f:
for item in list_:
f.write(json.dumps(item) + "\n")
```
This works with `block_size_10MB = 10 << 20` or without specifying `block_size`. | Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance! | 120 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
I made more tests. I used a smaller dataset and I was getting the same error, which means that it was not necessarily linked to the dataset size. To make both my smaller and larger datasets work, I got rid of lists with the json file. I had the following data format:
```python
[
{'key': "a", 'value': ['one', 'two', 'three']},
{'key': "b", 'value': ['four', 'five', 'six']}
]
```
I changed to:
```python
{'key': "a", 'value': 'one\ntwo\nthree'},
{'key': "b", 'value': 'four\nfive\nsix']}
```
and that worked!
I used the following to reformat my json file:
```python
with open(file_name, "w", encoding="utf-8") as f:
for item in list_:
f.write(json.dumps(item) + "\n")
```
This works with `block_size_10MB = 10 << 20` or without specifying `block_size`. | [
0.016556892544031143,
0.012686818838119507,
-0.007510561496019363,
0.34093791246414185,
0.1604531705379486,
-0.26471415162086487,
0.1936325877904892,
0.5859467387199402,
-0.16216063499450684,
-0.08150680363178253,
0.1654731184244156,
0.14416258037090302,
-0.015083088539540768,
0.014562183991074562,
-0.12952084839344025,
-0.19119185209274292,
0.033368244767189026,
0.07827429473400116,
-0.08155332505702972,
0.13550728559494019,
-0.03688661754131317,
0.2328721433877945,
-0.0935274213552475,
0.23239141702651978,
-0.08702807128429413,
-0.07815100997686386,
0.1980639100074768,
0.3374815285205841,
-0.3348844349384308,
-0.4495861828327179,
0.16122518479824066,
-0.2951851487159729,
0.0062587931752204895,
0.3340715765953064,
-0.0001156308499048464,
0.04710552096366882,
0.24958986043930054,
0.10917907953262329,
0.01874280720949173,
-0.2191220372915268,
0.2808353006839752,
-0.3987071216106415,
0.22801190614700317,
-0.16741731762886047,
0.12958493828773499,
-0.4462135136127472,
-0.3999217748641968,
0.3737809360027313,
0.42772960662841797,
-0.12555453181266785,
0.16510137915611267,
0.0912109762430191,
0.2657489776611328,
0.2669146955013275,
0.4368440806865692,
-0.06525062024593353,
0.02739820070564747,
0.5041722059249878,
0.3052024245262146,
-0.23820461332798004,
-0.335480660200119,
-0.1370314061641693,
-0.24959197640419006,
0.13811466097831726,
0.37793225049972534,
-0.11720085889101028,
0.07628121227025986,
0.058968354016542435,
-0.07994316518306732,
0.03772144019603729,
0.2263207733631134,
-0.40860190987586975,
-0.10335946828126907,
-0.07818783074617386,
-0.08564862608909607,
-0.1830739825963974,
0.30791836977005005,
0.38823121786117554,
-0.2103946954011917,
0.06983020901679993,
-0.1914450228214264,
-0.10000098496675491,
-0.1991206705570221,
0.17865148186683655,
-0.3580312132835388,
-0.12594978511333466,
-0.002453545108437538,
0.3322301506996155,
0.23105330765247345,
-0.007611144334077835,
-0.03557528182864189,
0.03110618330538273,
-0.27349382638931274,
-0.0565979890525341,
-0.20946244895458221,
0.01663956791162491,
0.0015149042010307312,
-0.31718313694000244,
0.19064882397651672,
0.2260885387659073,
0.19608604907989502,
-0.06559465825557709,
0.2463151216506958,
0.2574925124645233,
0.6111615896224976,
0.059475239366292953,
-0.352253794670105,
-0.16774751245975494,
0.2054002732038498,
0.23781487345695496,
-0.01948724128305912,
0.06098773330450058,
-0.05920769274234772,
-0.5538619756698608,
0.05948207899928093,
-0.27982693910598755,
0.25977540016174316,
-0.21602413058280945,
-0.21031981706619263,
0.13332237303256989,
-0.7950460314750671,
0.05001147463917732,
0.16625307500362396,
0.24969911575317383,
0.027215998619794846,
0.23634734749794006,
0.048551879823207855,
0.15819598734378815,
0.008959174156188965,
-0.11942119151353836,
-0.007867556065320969,
0.12636804580688477,
-0.152511864900589,
0.0385962538421154,
0.15799188613891602,
-0.13358120620250702,
-0.006416200660169125,
0.11933470517396927,
0.21734756231307983,
-0.21163928508758545,
0.18620672821998596,
0.016617320477962494,
0.04777013882994652,
0.3288208842277527,
-0.05167620629072189,
0.11164071410894394,
-0.05485979840159416,
-0.01265508309006691,
-0.2687699496746063,
0.4798910915851593,
-0.06268786638975143,
-0.34481245279312134,
-0.1742752194404602,
0.10041245818138123,
-0.26061391830444336,
0.265553742647171,
0.004983477294445038,
0.037517301738262177,
0.15041925013065338,
-0.36913180351257324,
0.2161605805158615,
-0.13115112483501434,
0.17783065140247345,
-0.3457722067832947,
0.10316925495862961,
-0.08137404918670654,
-0.6869226694107056,
0.017364203929901123,
0.2560489773750305,
0.17541736364364624,
-0.09443644434213638,
0.5446497797966003,
-0.4150453805923462,
0.1447615921497345,
-0.04595400393009186,
0.16156622767448425,
0.14491665363311768,
0.16062860190868378,
-0.6060854196548462,
0.3728238046169281,
-0.2745351195335388,
0.05764300376176834,
0.030735276639461517,
-0.014605402946472168,
-0.1264384686946869,
-0.02412497065961361,
-0.03010036051273346,
0.35156887769699097,
0.08327767252922058,
0.23094752430915833,
-0.3654412627220154,
-0.23694944381713867,
0.12336357682943344,
0.3634355962276459,
-0.11454500257968903,
-0.41169869899749756,
-0.049331970512866974,
-0.19168885052204132,
0.05531933158636093,
-0.11574187874794006,
0.1517808586359024,
0.4218286871910095,
0.1359187215566635,
-0.11939263343811035,
0.10268701612949371,
0.11307435482740402,
-0.4654298424720764,
0.021459825336933136,
0.07177260518074036,
-0.0631105899810791,
-0.3461885452270508,
-0.08819694072008133,
-0.0301499180495739,
0.24874956905841827,
0.09451162070035934,
0.20600970089435577,
0.03403902053833008,
-0.17311540246009827,
0.07218863070011139,
-0.0024393200874328613,
-0.09863884001970291,
-0.41359010338783264,
0.13343380391597748,
0.07346183061599731,
-0.010111004114151001,
0.390627384185791,
0.0637328252196312,
-0.2933794856071472,
0.06923133879899979,
0.1497812271118164,
-0.033690109848976135,
-0.14471103250980377,
-0.09443841129541397,
0.1845565140247345,
-0.08298864960670471,
0.0026111528277397156,
-0.24477806687355042,
0.12931974232196808,
0.28015226125717163,
-0.3557434678077698,
0.02776428684592247,
0.10324957966804504,
0.07656989991664886,
-0.06545446813106537,
0.22417423129081726,
0.4178517460823059,
-0.3288942277431488,
0.2032138556241989,
0.09631942212581635,
-0.2922596037387848,
0.06881310790777206,
-0.0792858749628067,
-0.0184270441532135,
0.16511406004428864,
0.22110243141651154,
0.3922337591648102,
0.22438634932041168,
0.13821065425872803,
-0.16022242605686188,
-0.11941797286272049,
0.39859989285469055,
-0.18343013525009155,
-0.08150052279233932,
0.152345210313797,
-0.13357818126678467,
-0.03313310071825981,
0.09641946852207184,
-0.129415363073349,
0.1355019509792328,
0.2478066235780716,
-0.14270131289958954,
-0.0006219036877155304,
0.027252674102783203,
-0.17982792854309082,
0.2222771942615509,
0.19782565534114838,
0.1286395788192749,
0.20186516642570496,
0.5253883600234985,
-0.1262485235929489,
-0.23405295610427856,
-0.22392231225967407,
0.24419981241226196,
0.1961282193660736,
-0.29082342982292175,
0.12981010973453522,
-0.06877226382493973,
0.024300768971443176,
-0.08478265255689621,
-0.6795874834060669,
-0.30618810653686523,
-0.09219721704721451,
0.0006515197455883026,
0.4704107642173767,
-0.33090144395828247,
0.0706554427742958,
0.15992683172225952,
0.3159407377243042,
0.07936646789312363,
-0.18853288888931274,
-0.04437362402677536,
-0.34382912516593933,
-0.25352951884269714,
-0.026064636185765266,
0.46301335096359253,
0.14641420543193817,
0.07041864097118378,
0.3701912760734558,
0.022186998277902603,
-0.06104452908039093,
-0.4288596510887146,
0.21847784519195557,
-0.04679907113313675,
0.07783330976963043,
0.0034068897366523743,
0.12915553152561188,
-0.24721203744411469,
-0.2504464387893677,
0.3068673610687256,
0.03602481633424759,
-0.20576167106628418,
0.32711663842201233,
-0.1920829564332962,
0.07442625612020493,
-0.1781022697687149,
0.11519260704517365,
0.21282662451267242,
-0.5418015122413635,
0.3973289132118225,
-0.18551932275295258,
0.003990918397903442,
-0.2795966863632202,
0.26352065801620483,
0.09601008892059326,
0.06791519373655319,
-0.04049726575613022,
0.059400688856840134,
-0.42019131779670715,
0.19610176980495453,
-0.04033263772726059,
-0.188174769282341,
0.041839536279439926,
0.1097165197134018,
0.1519089639186859,
0.16503176093101501,
-0.6058769226074219,
-0.01286236196756363,
-0.07757627218961716,
0.5512674450874329,
-0.34305447340011597,
-0.2375434786081314,
0.1149817407131195,
0.18758068978786469,
-0.016697505488991737,
0.12442358583211899,
-0.14346545934677124,
0.015068188309669495,
-0.007389876991510391,
0.20498797297477722,
-0.10102466493844986,
0.5279220938682556,
0.13047108054161072,
0.7018234729766846,
-0.16545529663562775,
-0.1430087834596634,
0.33132365345954895,
0.2419927716255188,
0.07736510783433914,
0.048163894563913345,
-0.02841293066740036,
-0.11799871921539307,
-0.18098780512809753,
-0.08216635137796402,
-0.006838537752628326,
0.04872739315032959,
-0.11016467958688736,
-0.027632465586066246,
-0.1180320531129837,
-0.2268262803554535,
-0.15881066024303436,
0.3197793960571289,
0.06100717559456825,
-0.11388946324586868,
-0.20074088871479034,
-0.2847958505153656,
-0.01700841449201107,
-0.08031148463487625,
0.05849117413163185,
0.03808983787894249,
0.10930915176868439,
0.11452367901802063,
-0.015752147883176804,
-0.3002431094646454,
-0.03336998075246811,
0.07999861240386963,
0.3141290247440338,
-0.14442752301692963,
0.0518038384616375,
-0.19720858335494995,
0.18430858850479126,
-0.47779303789138794,
0.7541436553001404,
0.46496427059173584,
-0.07626182585954666,
0.13590151071548462,
-0.06636033952236176,
-0.3780810534954071,
-0.06195565313100815,
0.08362981677055359,
0.19823597371578217,
0.5710024237632751,
0.1032126396894455,
-0.4526483118534088,
-0.10598378628492355,
-0.1052926778793335,
0.3224130868911743,
0.014623809605836868,
-0.4784035384654999,
-0.40637344121932983,
-0.4959048926830292,
-0.457832008600235,
-0.055918820202350616,
0.09452845901250839,
0.19011013209819794,
0.10296480357646942,
-0.09873886406421661,
0.27969011664390564,
-0.2547013461589813,
-0.47950637340545654,
0.09781898558139801,
0.1785520315170288,
-0.5503334403038025,
0.14910228550434113,
0.051228735595941544,
0.31933829188346863,
0.5359148383140564,
0.6146830916404724,
0.590986430644989,
-0.21832555532455444,
-0.05383634567260742,
0.3960568606853485,
0.1798863559961319,
0.16794666647911072,
0.16721220314502716,
0.20855772495269775,
-0.17270226776599884,
0.2022818922996521,
0.22147594392299652,
-0.010497720912098885,
0.19086387753486633,
-0.12107626348733902,
-0.0008762726210989058,
0.2911648750305176,
0.5025099515914917,
-0.21723051369190216,
0.15785937011241913,
0.4766685366630554,
0.28344467282295227,
-0.04671666771173477,
0.22268623113632202,
-0.05963493138551712,
0.9461209177970886,
-0.021072842180728912,
0.13255441188812256,
0.5243242979049683,
-0.42520225048065186,
0.5806593894958496,
-0.3188987970352173,
0.09764829277992249,
-0.4774039387702942,
0.34796005487442017,
0.06618022173643112,
-0.21018780767917633,
-0.08619844168424606,
0.06463321298360825,
-0.04271338880062103,
-0.19860470294952393,
-0.08621235936880112,
0.09070894122123718,
-0.11656421422958374,
0.07200505584478378,
-0.02068157307803631,
0.0002180337905883789,
-0.3245546221733093,
-0.006256762892007828,
-0.3452308773994446,
-0.1282552033662796,
-0.1717911660671234,
-0.3250170946121216,
0.04215412214398384,
-0.17573441565036774,
-0.19179342687129974,
0.27093449234962463,
0.1396906077861786,
0.37713950872421265,
0.27483829855918884,
-0.14227506518363953,
-0.007455416023731232,
-0.4400266110897064,
-0.2658150792121887,
-0.1649734526872635,
-0.038579605519771576,
0.22400443255901337,
0.008436579257249832,
-0.12542591989040375,
-0.021885020658373833,
0.12434019148349762,
0.14794714748859406,
-0.17208102345466614,
-0.17584757506847382,
0.146366149187088,
-0.17003430426120758,
-0.18596340715885162,
-0.14072968065738678,
0.1831442266702652,
-0.15189681947231293,
-0.03113069012761116,
-0.06275996565818787,
-0.14789697527885437,
0.08176018297672272,
-0.128449946641922,
0.06835391372442245,
0.002666063606739044,
0.07371871918439865,
-0.31619441509246826,
0.08392003178596497,
-0.3015908896923065,
-0.08405116200447083,
0.2698034942150116,
-0.0315241739153862,
0.14634712040424347,
0.45389029383659363,
0.40275251865386963,
-0.07262209057807922,
-0.095639169216156,
-0.0567292794585228,
0.5515413880348206,
-0.605144739151001,
0.2913154065608978,
-0.15657995641231537,
0.11268819868564606,
0.0965895727276802,
0.317776620388031,
0.2544376254081726,
0.0715055838227272,
0.026548314839601517,
-0.34782475233078003,
-0.2285258173942566,
0.4916565418243408,
-0.0185181125998497,
0.012201707810163498,
0.1027069017291069,
0.4117231070995331,
-0.07805374264717102,
0.19734074175357819,
-0.21987274289131165,
0.30208495259284973,
0.028722813352942467,
0.05645482987165451,
-0.4602075219154358,
-0.2132689356803894,
-0.20159199833869934,
0.25507763028144836,
0.027088599279522896,
0.1679866909980774,
-0.07122506946325302,
-0.12592566013336182,
-0.12761655449867249,
0.10120327770709991,
0.102016881108284,
-0.0968397855758667,
-0.06450218707323074,
-0.10317187011241913,
0.1211114227771759,
0.12978407740592957,
0.13172748684883118,
-0.20998993515968323,
-0.053500980138778687,
-0.3004152476787567,
0.0015182271599769592,
-0.18776541948318481,
-0.36424320936203003,
0.07901668548583984,
-0.033779487013816833,
0.28909656405448914,
0.08048427104949951,
0.2754157781600952,
-0.02370668761432171,
-0.06440620869398117,
-0.22985851764678955,
0.1052856370806694,
0.152957946062088,
-0.0467553585767746,
0.4014988839626312,
-0.32381218671798706,
-0.038765016943216324,
-0.2653615176677704,
0.27564525604248047,
0.45938175916671753,
-0.22526399791240692,
-0.12385697662830353,
0.01526157557964325,
0.16776694357395172,
0.0016634222120046616,
-0.21519118547439575,
-0.21952378749847412,
-0.04977622628211975,
-0.15386952459812164,
-0.07467363029718399,
-0.09042397141456604,
-0.2073935866355896,
-0.17872630059719086,
0.1219562515616417,
0.29474350810050964,
0.2419099658727646,
-0.34636542201042175,
0.37922409176826477,
-0.27893200516700745,
-0.1749602109193802,
0.2887687683105469,
0.1355142444372177,
0.559386134147644,
-0.09074176847934723,
-0.07203657180070877,
0.18086522817611694,
-0.051142655313014984,
0.08335897326469421,
-0.15314683318138123,
-0.42818620800971985,
-0.17864654958248138,
0.36371320486068726,
0.20608429610729218,
-0.24173831939697266,
0.30446869134902954,
0.5248375535011292,
0.40107738971710205,
-0.11268875747919083,
-0.019807986915111542,
0.2256045639514923,
-0.1309850811958313,
0.22233963012695312,
-0.5097845792770386,
-0.1980469971895218,
-0.12368007004261017,
0.38702818751335144,
-0.1253378987312317,
0.055718403309583664,
0.49129825830459595,
0.17829591035842896,
-0.0879882276058197,
-0.6212044954299927,
-0.1130405142903328,
0.07271505892276764,
-0.0714721754193306,
-0.23943841457366943,
0.22984124720096588,
0.6816924214363098,
-0.4974336326122284,
-0.056194696575403214,
-0.21587972342967987,
0.4886174499988556,
0.27109819650650024,
-0.21118149161338806,
-0.4033636748790741,
-0.21839198470115662,
-0.07209066301584244,
-0.09500770270824432,
0.1022532731294632,
0.5172536373138428,
0.34985119104385376,
0.23339612782001495,
0.06629250198602676,
-0.14184127748012543,
0.23030219972133636,
0.1463664323091507,
0.13845176994800568,
0.000585249625146389,
-0.23334673047065735,
-0.23541691899299622,
-0.34432291984558105,
-0.18023358285427094,
-0.2282654047012329,
-0.3921261131763458,
-0.3310353755950928,
0.12118980288505554,
-0.031211037188768387,
-0.13187964260578156,
-0.1365349292755127,
0.0630984976887703,
-0.07263322174549103,
0.6978247761726379,
0.34853535890579224,
0.20587164163589478,
-0.2465088665485382,
-0.26132383942604065,
-0.2471020221710205,
0.47968819737434387,
-0.4091101288795471,
0.19831575453281403,
0.2130555361509323,
0.18338409066200256,
0.10704760253429413,
0.3368973731994629,
-0.06520387530326843,
0.5276257991790771,
-0.1808636635541916,
-0.21479082107543945,
-0.38511279225349426,
0.03682646155357361,
0.2935439944267273,
-0.16676639020442963,
-0.18446160852909088,
-0.15145716071128845,
0.33867350220680237,
-0.17680764198303223,
0.11256473511457443,
-0.11822760105133057,
0.02327253669500351,
0.05392232909798622,
0.08557051420211792,
0.32998472452163696,
0.08187305927276611,
0.32917287945747375,
0.028653860092163086,
-0.14292383193969727,
-0.10798376798629761,
-0.25462934374809265,
-0.1726098358631134,
0.38462379574775696,
0.058152005076408386,
0.41165581345558167,
-0.0787665843963623,
0.0795212984085083,
-0.1733231544494629,
0.10523437708616257,
-0.4348299503326416,
-0.09791164100170135,
0.12186213582754135,
-0.23521146178245544,
0.024975545704364777,
0.10284916311502457,
-0.017111757770180702,
0.11467592418193817,
0.08856936544179916,
0.11370491981506348,
-0.49449437856674194,
-0.1414472460746765,
0.4697197675704956,
-0.3657928705215454,
-0.2979661226272583,
0.49709996581077576,
0.10345209389925003,
0.3452361226081848,
-0.11850882321596146,
-0.5068215131759644,
0.08914429694414139,
0.1896466612815857,
0.05866410583257675,
-0.37224289774894714,
0.22458240389823914,
0.04821459949016571,
-0.06096334010362625,
0.05195166543126106,
0.22357188165187836,
0.18367227911949158,
-0.36517104506492615,
-0.03171267360448837,
-0.12904906272888184
] |
https://github.com/huggingface/datasets/issues/2181 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries) | Thanks @hwijeen for reporting and thanks @jpilaul for pointing this out.
Indeed, those are different JSON-like formats:
- the first one is the **standard JSON** format: all the file content is JSON-valid, thus all content is either a JSON object (between curly brackets `{...}`) or a JSON array (between square brackets `[...]`)
- the second one is called **JSON Lines**: the entire file content is not JSON-valid, but only every line (newline-delimited) is JSON-valid
Currently PyArrow only supports **JSON Lines** format:
- https://arrow.apache.org/docs/python/generated/pyarrow.json.read_json.html
> Currently only the line-delimited JSON format is supported.
- https://arrow.apache.org/docs/python/json.html
> Arrow supports reading columnar data from line-delimited JSON files. | Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance! | 104 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
Thanks @hwijeen for reporting and thanks @jpilaul for pointing this out.
Indeed, those are different JSON-like formats:
- the first one is the **standard JSON** format: all the file content is JSON-valid, thus all content is either a JSON object (between curly brackets `{...}`) or a JSON array (between square brackets `[...]`)
- the second one is called **JSON Lines**: the entire file content is not JSON-valid, but only every line (newline-delimited) is JSON-valid
Currently PyArrow only supports **JSON Lines** format:
- https://arrow.apache.org/docs/python/generated/pyarrow.json.read_json.html
> Currently only the line-delimited JSON format is supported.
- https://arrow.apache.org/docs/python/json.html
> Arrow supports reading columnar data from line-delimited JSON files. | [
0.016556892544031143,
0.012686818838119507,
-0.007510561496019363,
0.34093791246414185,
0.1604531705379486,
-0.26471415162086487,
0.1936325877904892,
0.5859467387199402,
-0.16216063499450684,
-0.08150680363178253,
0.1654731184244156,
0.14416258037090302,
-0.015083088539540768,
0.014562183991074562,
-0.12952084839344025,
-0.19119185209274292,
0.033368244767189026,
0.07827429473400116,
-0.08155332505702972,
0.13550728559494019,
-0.03688661754131317,
0.2328721433877945,
-0.0935274213552475,
0.23239141702651978,
-0.08702807128429413,
-0.07815100997686386,
0.1980639100074768,
0.3374815285205841,
-0.3348844349384308,
-0.4495861828327179,
0.16122518479824066,
-0.2951851487159729,
0.0062587931752204895,
0.3340715765953064,
-0.0001156308499048464,
0.04710552096366882,
0.24958986043930054,
0.10917907953262329,
0.01874280720949173,
-0.2191220372915268,
0.2808353006839752,
-0.3987071216106415,
0.22801190614700317,
-0.16741731762886047,
0.12958493828773499,
-0.4462135136127472,
-0.3999217748641968,
0.3737809360027313,
0.42772960662841797,
-0.12555453181266785,
0.16510137915611267,
0.0912109762430191,
0.2657489776611328,
0.2669146955013275,
0.4368440806865692,
-0.06525062024593353,
0.02739820070564747,
0.5041722059249878,
0.3052024245262146,
-0.23820461332798004,
-0.335480660200119,
-0.1370314061641693,
-0.24959197640419006,
0.13811466097831726,
0.37793225049972534,
-0.11720085889101028,
0.07628121227025986,
0.058968354016542435,
-0.07994316518306732,
0.03772144019603729,
0.2263207733631134,
-0.40860190987586975,
-0.10335946828126907,
-0.07818783074617386,
-0.08564862608909607,
-0.1830739825963974,
0.30791836977005005,
0.38823121786117554,
-0.2103946954011917,
0.06983020901679993,
-0.1914450228214264,
-0.10000098496675491,
-0.1991206705570221,
0.17865148186683655,
-0.3580312132835388,
-0.12594978511333466,
-0.002453545108437538,
0.3322301506996155,
0.23105330765247345,
-0.007611144334077835,
-0.03557528182864189,
0.03110618330538273,
-0.27349382638931274,
-0.0565979890525341,
-0.20946244895458221,
0.01663956791162491,
0.0015149042010307312,
-0.31718313694000244,
0.19064882397651672,
0.2260885387659073,
0.19608604907989502,
-0.06559465825557709,
0.2463151216506958,
0.2574925124645233,
0.6111615896224976,
0.059475239366292953,
-0.352253794670105,
-0.16774751245975494,
0.2054002732038498,
0.23781487345695496,
-0.01948724128305912,
0.06098773330450058,
-0.05920769274234772,
-0.5538619756698608,
0.05948207899928093,
-0.27982693910598755,
0.25977540016174316,
-0.21602413058280945,
-0.21031981706619263,
0.13332237303256989,
-0.7950460314750671,
0.05001147463917732,
0.16625307500362396,
0.24969911575317383,
0.027215998619794846,
0.23634734749794006,
0.048551879823207855,
0.15819598734378815,
0.008959174156188965,
-0.11942119151353836,
-0.007867556065320969,
0.12636804580688477,
-0.152511864900589,
0.0385962538421154,
0.15799188613891602,
-0.13358120620250702,
-0.006416200660169125,
0.11933470517396927,
0.21734756231307983,
-0.21163928508758545,
0.18620672821998596,
0.016617320477962494,
0.04777013882994652,
0.3288208842277527,
-0.05167620629072189,
0.11164071410894394,
-0.05485979840159416,
-0.01265508309006691,
-0.2687699496746063,
0.4798910915851593,
-0.06268786638975143,
-0.34481245279312134,
-0.1742752194404602,
0.10041245818138123,
-0.26061391830444336,
0.265553742647171,
0.004983477294445038,
0.037517301738262177,
0.15041925013065338,
-0.36913180351257324,
0.2161605805158615,
-0.13115112483501434,
0.17783065140247345,
-0.3457722067832947,
0.10316925495862961,
-0.08137404918670654,
-0.6869226694107056,
0.017364203929901123,
0.2560489773750305,
0.17541736364364624,
-0.09443644434213638,
0.5446497797966003,
-0.4150453805923462,
0.1447615921497345,
-0.04595400393009186,
0.16156622767448425,
0.14491665363311768,
0.16062860190868378,
-0.6060854196548462,
0.3728238046169281,
-0.2745351195335388,
0.05764300376176834,
0.030735276639461517,
-0.014605402946472168,
-0.1264384686946869,
-0.02412497065961361,
-0.03010036051273346,
0.35156887769699097,
0.08327767252922058,
0.23094752430915833,
-0.3654412627220154,
-0.23694944381713867,
0.12336357682943344,
0.3634355962276459,
-0.11454500257968903,
-0.41169869899749756,
-0.049331970512866974,
-0.19168885052204132,
0.05531933158636093,
-0.11574187874794006,
0.1517808586359024,
0.4218286871910095,
0.1359187215566635,
-0.11939263343811035,
0.10268701612949371,
0.11307435482740402,
-0.4654298424720764,
0.021459825336933136,
0.07177260518074036,
-0.0631105899810791,
-0.3461885452270508,
-0.08819694072008133,
-0.0301499180495739,
0.24874956905841827,
0.09451162070035934,
0.20600970089435577,
0.03403902053833008,
-0.17311540246009827,
0.07218863070011139,
-0.0024393200874328613,
-0.09863884001970291,
-0.41359010338783264,
0.13343380391597748,
0.07346183061599731,
-0.010111004114151001,
0.390627384185791,
0.0637328252196312,
-0.2933794856071472,
0.06923133879899979,
0.1497812271118164,
-0.033690109848976135,
-0.14471103250980377,
-0.09443841129541397,
0.1845565140247345,
-0.08298864960670471,
0.0026111528277397156,
-0.24477806687355042,
0.12931974232196808,
0.28015226125717163,
-0.3557434678077698,
0.02776428684592247,
0.10324957966804504,
0.07656989991664886,
-0.06545446813106537,
0.22417423129081726,
0.4178517460823059,
-0.3288942277431488,
0.2032138556241989,
0.09631942212581635,
-0.2922596037387848,
0.06881310790777206,
-0.0792858749628067,
-0.0184270441532135,
0.16511406004428864,
0.22110243141651154,
0.3922337591648102,
0.22438634932041168,
0.13821065425872803,
-0.16022242605686188,
-0.11941797286272049,
0.39859989285469055,
-0.18343013525009155,
-0.08150052279233932,
0.152345210313797,
-0.13357818126678467,
-0.03313310071825981,
0.09641946852207184,
-0.129415363073349,
0.1355019509792328,
0.2478066235780716,
-0.14270131289958954,
-0.0006219036877155304,
0.027252674102783203,
-0.17982792854309082,
0.2222771942615509,
0.19782565534114838,
0.1286395788192749,
0.20186516642570496,
0.5253883600234985,
-0.1262485235929489,
-0.23405295610427856,
-0.22392231225967407,
0.24419981241226196,
0.1961282193660736,
-0.29082342982292175,
0.12981010973453522,
-0.06877226382493973,
0.024300768971443176,
-0.08478265255689621,
-0.6795874834060669,
-0.30618810653686523,
-0.09219721704721451,
0.0006515197455883026,
0.4704107642173767,
-0.33090144395828247,
0.0706554427742958,
0.15992683172225952,
0.3159407377243042,
0.07936646789312363,
-0.18853288888931274,
-0.04437362402677536,
-0.34382912516593933,
-0.25352951884269714,
-0.026064636185765266,
0.46301335096359253,
0.14641420543193817,
0.07041864097118378,
0.3701912760734558,
0.022186998277902603,
-0.06104452908039093,
-0.4288596510887146,
0.21847784519195557,
-0.04679907113313675,
0.07783330976963043,
0.0034068897366523743,
0.12915553152561188,
-0.24721203744411469,
-0.2504464387893677,
0.3068673610687256,
0.03602481633424759,
-0.20576167106628418,
0.32711663842201233,
-0.1920829564332962,
0.07442625612020493,
-0.1781022697687149,
0.11519260704517365,
0.21282662451267242,
-0.5418015122413635,
0.3973289132118225,
-0.18551932275295258,
0.003990918397903442,
-0.2795966863632202,
0.26352065801620483,
0.09601008892059326,
0.06791519373655319,
-0.04049726575613022,
0.059400688856840134,
-0.42019131779670715,
0.19610176980495453,
-0.04033263772726059,
-0.188174769282341,
0.041839536279439926,
0.1097165197134018,
0.1519089639186859,
0.16503176093101501,
-0.6058769226074219,
-0.01286236196756363,
-0.07757627218961716,
0.5512674450874329,
-0.34305447340011597,
-0.2375434786081314,
0.1149817407131195,
0.18758068978786469,
-0.016697505488991737,
0.12442358583211899,
-0.14346545934677124,
0.015068188309669495,
-0.007389876991510391,
0.20498797297477722,
-0.10102466493844986,
0.5279220938682556,
0.13047108054161072,
0.7018234729766846,
-0.16545529663562775,
-0.1430087834596634,
0.33132365345954895,
0.2419927716255188,
0.07736510783433914,
0.048163894563913345,
-0.02841293066740036,
-0.11799871921539307,
-0.18098780512809753,
-0.08216635137796402,
-0.006838537752628326,
0.04872739315032959,
-0.11016467958688736,
-0.027632465586066246,
-0.1180320531129837,
-0.2268262803554535,
-0.15881066024303436,
0.3197793960571289,
0.06100717559456825,
-0.11388946324586868,
-0.20074088871479034,
-0.2847958505153656,
-0.01700841449201107,
-0.08031148463487625,
0.05849117413163185,
0.03808983787894249,
0.10930915176868439,
0.11452367901802063,
-0.015752147883176804,
-0.3002431094646454,
-0.03336998075246811,
0.07999861240386963,
0.3141290247440338,
-0.14442752301692963,
0.0518038384616375,
-0.19720858335494995,
0.18430858850479126,
-0.47779303789138794,
0.7541436553001404,
0.46496427059173584,
-0.07626182585954666,
0.13590151071548462,
-0.06636033952236176,
-0.3780810534954071,
-0.06195565313100815,
0.08362981677055359,
0.19823597371578217,
0.5710024237632751,
0.1032126396894455,
-0.4526483118534088,
-0.10598378628492355,
-0.1052926778793335,
0.3224130868911743,
0.014623809605836868,
-0.4784035384654999,
-0.40637344121932983,
-0.4959048926830292,
-0.457832008600235,
-0.055918820202350616,
0.09452845901250839,
0.19011013209819794,
0.10296480357646942,
-0.09873886406421661,
0.27969011664390564,
-0.2547013461589813,
-0.47950637340545654,
0.09781898558139801,
0.1785520315170288,
-0.5503334403038025,
0.14910228550434113,
0.051228735595941544,
0.31933829188346863,
0.5359148383140564,
0.6146830916404724,
0.590986430644989,
-0.21832555532455444,
-0.05383634567260742,
0.3960568606853485,
0.1798863559961319,
0.16794666647911072,
0.16721220314502716,
0.20855772495269775,
-0.17270226776599884,
0.2022818922996521,
0.22147594392299652,
-0.010497720912098885,
0.19086387753486633,
-0.12107626348733902,
-0.0008762726210989058,
0.2911648750305176,
0.5025099515914917,
-0.21723051369190216,
0.15785937011241913,
0.4766685366630554,
0.28344467282295227,
-0.04671666771173477,
0.22268623113632202,
-0.05963493138551712,
0.9461209177970886,
-0.021072842180728912,
0.13255441188812256,
0.5243242979049683,
-0.42520225048065186,
0.5806593894958496,
-0.3188987970352173,
0.09764829277992249,
-0.4774039387702942,
0.34796005487442017,
0.06618022173643112,
-0.21018780767917633,
-0.08619844168424606,
0.06463321298360825,
-0.04271338880062103,
-0.19860470294952393,
-0.08621235936880112,
0.09070894122123718,
-0.11656421422958374,
0.07200505584478378,
-0.02068157307803631,
0.0002180337905883789,
-0.3245546221733093,
-0.006256762892007828,
-0.3452308773994446,
-0.1282552033662796,
-0.1717911660671234,
-0.3250170946121216,
0.04215412214398384,
-0.17573441565036774,
-0.19179342687129974,
0.27093449234962463,
0.1396906077861786,
0.37713950872421265,
0.27483829855918884,
-0.14227506518363953,
-0.007455416023731232,
-0.4400266110897064,
-0.2658150792121887,
-0.1649734526872635,
-0.038579605519771576,
0.22400443255901337,
0.008436579257249832,
-0.12542591989040375,
-0.021885020658373833,
0.12434019148349762,
0.14794714748859406,
-0.17208102345466614,
-0.17584757506847382,
0.146366149187088,
-0.17003430426120758,
-0.18596340715885162,
-0.14072968065738678,
0.1831442266702652,
-0.15189681947231293,
-0.03113069012761116,
-0.06275996565818787,
-0.14789697527885437,
0.08176018297672272,
-0.128449946641922,
0.06835391372442245,
0.002666063606739044,
0.07371871918439865,
-0.31619441509246826,
0.08392003178596497,
-0.3015908896923065,
-0.08405116200447083,
0.2698034942150116,
-0.0315241739153862,
0.14634712040424347,
0.45389029383659363,
0.40275251865386963,
-0.07262209057807922,
-0.095639169216156,
-0.0567292794585228,
0.5515413880348206,
-0.605144739151001,
0.2913154065608978,
-0.15657995641231537,
0.11268819868564606,
0.0965895727276802,
0.317776620388031,
0.2544376254081726,
0.0715055838227272,
0.026548314839601517,
-0.34782475233078003,
-0.2285258173942566,
0.4916565418243408,
-0.0185181125998497,
0.012201707810163498,
0.1027069017291069,
0.4117231070995331,
-0.07805374264717102,
0.19734074175357819,
-0.21987274289131165,
0.30208495259284973,
0.028722813352942467,
0.05645482987165451,
-0.4602075219154358,
-0.2132689356803894,
-0.20159199833869934,
0.25507763028144836,
0.027088599279522896,
0.1679866909980774,
-0.07122506946325302,
-0.12592566013336182,
-0.12761655449867249,
0.10120327770709991,
0.102016881108284,
-0.0968397855758667,
-0.06450218707323074,
-0.10317187011241913,
0.1211114227771759,
0.12978407740592957,
0.13172748684883118,
-0.20998993515968323,
-0.053500980138778687,
-0.3004152476787567,
0.0015182271599769592,
-0.18776541948318481,
-0.36424320936203003,
0.07901668548583984,
-0.033779487013816833,
0.28909656405448914,
0.08048427104949951,
0.2754157781600952,
-0.02370668761432171,
-0.06440620869398117,
-0.22985851764678955,
0.1052856370806694,
0.152957946062088,
-0.0467553585767746,
0.4014988839626312,
-0.32381218671798706,
-0.038765016943216324,
-0.2653615176677704,
0.27564525604248047,
0.45938175916671753,
-0.22526399791240692,
-0.12385697662830353,
0.01526157557964325,
0.16776694357395172,
0.0016634222120046616,
-0.21519118547439575,
-0.21952378749847412,
-0.04977622628211975,
-0.15386952459812164,
-0.07467363029718399,
-0.09042397141456604,
-0.2073935866355896,
-0.17872630059719086,
0.1219562515616417,
0.29474350810050964,
0.2419099658727646,
-0.34636542201042175,
0.37922409176826477,
-0.27893200516700745,
-0.1749602109193802,
0.2887687683105469,
0.1355142444372177,
0.559386134147644,
-0.09074176847934723,
-0.07203657180070877,
0.18086522817611694,
-0.051142655313014984,
0.08335897326469421,
-0.15314683318138123,
-0.42818620800971985,
-0.17864654958248138,
0.36371320486068726,
0.20608429610729218,
-0.24173831939697266,
0.30446869134902954,
0.5248375535011292,
0.40107738971710205,
-0.11268875747919083,
-0.019807986915111542,
0.2256045639514923,
-0.1309850811958313,
0.22233963012695312,
-0.5097845792770386,
-0.1980469971895218,
-0.12368007004261017,
0.38702818751335144,
-0.1253378987312317,
0.055718403309583664,
0.49129825830459595,
0.17829591035842896,
-0.0879882276058197,
-0.6212044954299927,
-0.1130405142903328,
0.07271505892276764,
-0.0714721754193306,
-0.23943841457366943,
0.22984124720096588,
0.6816924214363098,
-0.4974336326122284,
-0.056194696575403214,
-0.21587972342967987,
0.4886174499988556,
0.27109819650650024,
-0.21118149161338806,
-0.4033636748790741,
-0.21839198470115662,
-0.07209066301584244,
-0.09500770270824432,
0.1022532731294632,
0.5172536373138428,
0.34985119104385376,
0.23339612782001495,
0.06629250198602676,
-0.14184127748012543,
0.23030219972133636,
0.1463664323091507,
0.13845176994800568,
0.000585249625146389,
-0.23334673047065735,
-0.23541691899299622,
-0.34432291984558105,
-0.18023358285427094,
-0.2282654047012329,
-0.3921261131763458,
-0.3310353755950928,
0.12118980288505554,
-0.031211037188768387,
-0.13187964260578156,
-0.1365349292755127,
0.0630984976887703,
-0.07263322174549103,
0.6978247761726379,
0.34853535890579224,
0.20587164163589478,
-0.2465088665485382,
-0.26132383942604065,
-0.2471020221710205,
0.47968819737434387,
-0.4091101288795471,
0.19831575453281403,
0.2130555361509323,
0.18338409066200256,
0.10704760253429413,
0.3368973731994629,
-0.06520387530326843,
0.5276257991790771,
-0.1808636635541916,
-0.21479082107543945,
-0.38511279225349426,
0.03682646155357361,
0.2935439944267273,
-0.16676639020442963,
-0.18446160852909088,
-0.15145716071128845,
0.33867350220680237,
-0.17680764198303223,
0.11256473511457443,
-0.11822760105133057,
0.02327253669500351,
0.05392232909798622,
0.08557051420211792,
0.32998472452163696,
0.08187305927276611,
0.32917287945747375,
0.028653860092163086,
-0.14292383193969727,
-0.10798376798629761,
-0.25462934374809265,
-0.1726098358631134,
0.38462379574775696,
0.058152005076408386,
0.41165581345558167,
-0.0787665843963623,
0.0795212984085083,
-0.1733231544494629,
0.10523437708616257,
-0.4348299503326416,
-0.09791164100170135,
0.12186213582754135,
-0.23521146178245544,
0.024975545704364777,
0.10284916311502457,
-0.017111757770180702,
0.11467592418193817,
0.08856936544179916,
0.11370491981506348,
-0.49449437856674194,
-0.1414472460746765,
0.4697197675704956,
-0.3657928705215454,
-0.2979661226272583,
0.49709996581077576,
0.10345209389925003,
0.3452361226081848,
-0.11850882321596146,
-0.5068215131759644,
0.08914429694414139,
0.1896466612815857,
0.05866410583257675,
-0.37224289774894714,
0.22458240389823914,
0.04821459949016571,
-0.06096334010362625,
0.05195166543126106,
0.22357188165187836,
0.18367227911949158,
-0.36517104506492615,
-0.03171267360448837,
-0.12904906272888184
] |
https://github.com/huggingface/datasets/issues/2181 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries) | Thanks @albertvillanova for your explanation, it is helpful to know (maybe add to docs?)!
However, the problem I described above happened when I was dealing with jsonl files πΏ
Although I did not thoroughly inspect, I suspect the cause was the one extremely long document in my case. | Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance! | 48 | Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
Thanks @albertvillanova for your explanation, it is helpful to know (maybe add to docs?)!
However, the problem I described above happened when I was dealing with jsonl files πΏ
Although I did not thoroughly inspect, I suspect the cause was the one extremely long document in my case. | [
0.016556892544031143,
0.012686818838119507,
-0.007510561496019363,
0.34093791246414185,
0.1604531705379486,
-0.26471415162086487,
0.1936325877904892,
0.5859467387199402,
-0.16216063499450684,
-0.08150680363178253,
0.1654731184244156,
0.14416258037090302,
-0.015083088539540768,
0.014562183991074562,
-0.12952084839344025,
-0.19119185209274292,
0.033368244767189026,
0.07827429473400116,
-0.08155332505702972,
0.13550728559494019,
-0.03688661754131317,
0.2328721433877945,
-0.0935274213552475,
0.23239141702651978,
-0.08702807128429413,
-0.07815100997686386,
0.1980639100074768,
0.3374815285205841,
-0.3348844349384308,
-0.4495861828327179,
0.16122518479824066,
-0.2951851487159729,
0.0062587931752204895,
0.3340715765953064,
-0.0001156308499048464,
0.04710552096366882,
0.24958986043930054,
0.10917907953262329,
0.01874280720949173,
-0.2191220372915268,
0.2808353006839752,
-0.3987071216106415,
0.22801190614700317,
-0.16741731762886047,
0.12958493828773499,
-0.4462135136127472,
-0.3999217748641968,
0.3737809360027313,
0.42772960662841797,
-0.12555453181266785,
0.16510137915611267,
0.0912109762430191,
0.2657489776611328,
0.2669146955013275,
0.4368440806865692,
-0.06525062024593353,
0.02739820070564747,
0.5041722059249878,
0.3052024245262146,
-0.23820461332798004,
-0.335480660200119,
-0.1370314061641693,
-0.24959197640419006,
0.13811466097831726,
0.37793225049972534,
-0.11720085889101028,
0.07628121227025986,
0.058968354016542435,
-0.07994316518306732,
0.03772144019603729,
0.2263207733631134,
-0.40860190987586975,
-0.10335946828126907,
-0.07818783074617386,
-0.08564862608909607,
-0.1830739825963974,
0.30791836977005005,
0.38823121786117554,
-0.2103946954011917,
0.06983020901679993,
-0.1914450228214264,
-0.10000098496675491,
-0.1991206705570221,
0.17865148186683655,
-0.3580312132835388,
-0.12594978511333466,
-0.002453545108437538,
0.3322301506996155,
0.23105330765247345,
-0.007611144334077835,
-0.03557528182864189,
0.03110618330538273,
-0.27349382638931274,
-0.0565979890525341,
-0.20946244895458221,
0.01663956791162491,
0.0015149042010307312,
-0.31718313694000244,
0.19064882397651672,
0.2260885387659073,
0.19608604907989502,
-0.06559465825557709,
0.2463151216506958,
0.2574925124645233,
0.6111615896224976,
0.059475239366292953,
-0.352253794670105,
-0.16774751245975494,
0.2054002732038498,
0.23781487345695496,
-0.01948724128305912,
0.06098773330450058,
-0.05920769274234772,
-0.5538619756698608,
0.05948207899928093,
-0.27982693910598755,
0.25977540016174316,
-0.21602413058280945,
-0.21031981706619263,
0.13332237303256989,
-0.7950460314750671,
0.05001147463917732,
0.16625307500362396,
0.24969911575317383,
0.027215998619794846,
0.23634734749794006,
0.048551879823207855,
0.15819598734378815,
0.008959174156188965,
-0.11942119151353836,
-0.007867556065320969,
0.12636804580688477,
-0.152511864900589,
0.0385962538421154,
0.15799188613891602,
-0.13358120620250702,
-0.006416200660169125,
0.11933470517396927,
0.21734756231307983,
-0.21163928508758545,
0.18620672821998596,
0.016617320477962494,
0.04777013882994652,
0.3288208842277527,
-0.05167620629072189,
0.11164071410894394,
-0.05485979840159416,
-0.01265508309006691,
-0.2687699496746063,
0.4798910915851593,
-0.06268786638975143,
-0.34481245279312134,
-0.1742752194404602,
0.10041245818138123,
-0.26061391830444336,
0.265553742647171,
0.004983477294445038,
0.037517301738262177,
0.15041925013065338,
-0.36913180351257324,
0.2161605805158615,
-0.13115112483501434,
0.17783065140247345,
-0.3457722067832947,
0.10316925495862961,
-0.08137404918670654,
-0.6869226694107056,
0.017364203929901123,
0.2560489773750305,
0.17541736364364624,
-0.09443644434213638,
0.5446497797966003,
-0.4150453805923462,
0.1447615921497345,
-0.04595400393009186,
0.16156622767448425,
0.14491665363311768,
0.16062860190868378,
-0.6060854196548462,
0.3728238046169281,
-0.2745351195335388,
0.05764300376176834,
0.030735276639461517,
-0.014605402946472168,
-0.1264384686946869,
-0.02412497065961361,
-0.03010036051273346,
0.35156887769699097,
0.08327767252922058,
0.23094752430915833,
-0.3654412627220154,
-0.23694944381713867,
0.12336357682943344,
0.3634355962276459,
-0.11454500257968903,
-0.41169869899749756,
-0.049331970512866974,
-0.19168885052204132,
0.05531933158636093,
-0.11574187874794006,
0.1517808586359024,
0.4218286871910095,
0.1359187215566635,
-0.11939263343811035,
0.10268701612949371,
0.11307435482740402,
-0.4654298424720764,
0.021459825336933136,
0.07177260518074036,
-0.0631105899810791,
-0.3461885452270508,
-0.08819694072008133,
-0.0301499180495739,
0.24874956905841827,
0.09451162070035934,
0.20600970089435577,
0.03403902053833008,
-0.17311540246009827,
0.07218863070011139,
-0.0024393200874328613,
-0.09863884001970291,
-0.41359010338783264,
0.13343380391597748,
0.07346183061599731,
-0.010111004114151001,
0.390627384185791,
0.0637328252196312,
-0.2933794856071472,
0.06923133879899979,
0.1497812271118164,
-0.033690109848976135,
-0.14471103250980377,
-0.09443841129541397,
0.1845565140247345,
-0.08298864960670471,
0.0026111528277397156,
-0.24477806687355042,
0.12931974232196808,
0.28015226125717163,
-0.3557434678077698,
0.02776428684592247,
0.10324957966804504,
0.07656989991664886,
-0.06545446813106537,
0.22417423129081726,
0.4178517460823059,
-0.3288942277431488,
0.2032138556241989,
0.09631942212581635,
-0.2922596037387848,
0.06881310790777206,
-0.0792858749628067,
-0.0184270441532135,
0.16511406004428864,
0.22110243141651154,
0.3922337591648102,
0.22438634932041168,
0.13821065425872803,
-0.16022242605686188,
-0.11941797286272049,
0.39859989285469055,
-0.18343013525009155,
-0.08150052279233932,
0.152345210313797,
-0.13357818126678467,
-0.03313310071825981,
0.09641946852207184,
-0.129415363073349,
0.1355019509792328,
0.2478066235780716,
-0.14270131289958954,
-0.0006219036877155304,
0.027252674102783203,
-0.17982792854309082,
0.2222771942615509,
0.19782565534114838,
0.1286395788192749,
0.20186516642570496,
0.5253883600234985,
-0.1262485235929489,
-0.23405295610427856,
-0.22392231225967407,
0.24419981241226196,
0.1961282193660736,
-0.29082342982292175,
0.12981010973453522,
-0.06877226382493973,
0.024300768971443176,
-0.08478265255689621,
-0.6795874834060669,
-0.30618810653686523,
-0.09219721704721451,
0.0006515197455883026,
0.4704107642173767,
-0.33090144395828247,
0.0706554427742958,
0.15992683172225952,
0.3159407377243042,
0.07936646789312363,
-0.18853288888931274,
-0.04437362402677536,
-0.34382912516593933,
-0.25352951884269714,
-0.026064636185765266,
0.46301335096359253,
0.14641420543193817,
0.07041864097118378,
0.3701912760734558,
0.022186998277902603,
-0.06104452908039093,
-0.4288596510887146,
0.21847784519195557,
-0.04679907113313675,
0.07783330976963043,
0.0034068897366523743,
0.12915553152561188,
-0.24721203744411469,
-0.2504464387893677,
0.3068673610687256,
0.03602481633424759,
-0.20576167106628418,
0.32711663842201233,
-0.1920829564332962,
0.07442625612020493,
-0.1781022697687149,
0.11519260704517365,
0.21282662451267242,
-0.5418015122413635,
0.3973289132118225,
-0.18551932275295258,
0.003990918397903442,
-0.2795966863632202,
0.26352065801620483,
0.09601008892059326,
0.06791519373655319,
-0.04049726575613022,
0.059400688856840134,
-0.42019131779670715,
0.19610176980495453,
-0.04033263772726059,
-0.188174769282341,
0.041839536279439926,
0.1097165197134018,
0.1519089639186859,
0.16503176093101501,
-0.6058769226074219,
-0.01286236196756363,
-0.07757627218961716,
0.5512674450874329,
-0.34305447340011597,
-0.2375434786081314,
0.1149817407131195,
0.18758068978786469,
-0.016697505488991737,
0.12442358583211899,
-0.14346545934677124,
0.015068188309669495,
-0.007389876991510391,
0.20498797297477722,
-0.10102466493844986,
0.5279220938682556,
0.13047108054161072,
0.7018234729766846,
-0.16545529663562775,
-0.1430087834596634,
0.33132365345954895,
0.2419927716255188,
0.07736510783433914,
0.048163894563913345,
-0.02841293066740036,
-0.11799871921539307,
-0.18098780512809753,
-0.08216635137796402,
-0.006838537752628326,
0.04872739315032959,
-0.11016467958688736,
-0.027632465586066246,
-0.1180320531129837,
-0.2268262803554535,
-0.15881066024303436,
0.3197793960571289,
0.06100717559456825,
-0.11388946324586868,
-0.20074088871479034,
-0.2847958505153656,
-0.01700841449201107,
-0.08031148463487625,
0.05849117413163185,
0.03808983787894249,
0.10930915176868439,
0.11452367901802063,
-0.015752147883176804,
-0.3002431094646454,
-0.03336998075246811,
0.07999861240386963,
0.3141290247440338,
-0.14442752301692963,
0.0518038384616375,
-0.19720858335494995,
0.18430858850479126,
-0.47779303789138794,
0.7541436553001404,
0.46496427059173584,
-0.07626182585954666,
0.13590151071548462,
-0.06636033952236176,
-0.3780810534954071,
-0.06195565313100815,
0.08362981677055359,
0.19823597371578217,
0.5710024237632751,
0.1032126396894455,
-0.4526483118534088,
-0.10598378628492355,
-0.1052926778793335,
0.3224130868911743,
0.014623809605836868,
-0.4784035384654999,
-0.40637344121932983,
-0.4959048926830292,
-0.457832008600235,
-0.055918820202350616,
0.09452845901250839,
0.19011013209819794,
0.10296480357646942,
-0.09873886406421661,
0.27969011664390564,
-0.2547013461589813,
-0.47950637340545654,
0.09781898558139801,
0.1785520315170288,
-0.5503334403038025,
0.14910228550434113,
0.051228735595941544,
0.31933829188346863,
0.5359148383140564,
0.6146830916404724,
0.590986430644989,
-0.21832555532455444,
-0.05383634567260742,
0.3960568606853485,
0.1798863559961319,
0.16794666647911072,
0.16721220314502716,
0.20855772495269775,
-0.17270226776599884,
0.2022818922996521,
0.22147594392299652,
-0.010497720912098885,
0.19086387753486633,
-0.12107626348733902,
-0.0008762726210989058,
0.2911648750305176,
0.5025099515914917,
-0.21723051369190216,
0.15785937011241913,
0.4766685366630554,
0.28344467282295227,
-0.04671666771173477,
0.22268623113632202,
-0.05963493138551712,
0.9461209177970886,
-0.021072842180728912,
0.13255441188812256,
0.5243242979049683,
-0.42520225048065186,
0.5806593894958496,
-0.3188987970352173,
0.09764829277992249,
-0.4774039387702942,
0.34796005487442017,
0.06618022173643112,
-0.21018780767917633,
-0.08619844168424606,
0.06463321298360825,
-0.04271338880062103,
-0.19860470294952393,
-0.08621235936880112,
0.09070894122123718,
-0.11656421422958374,
0.07200505584478378,
-0.02068157307803631,
0.0002180337905883789,
-0.3245546221733093,
-0.006256762892007828,
-0.3452308773994446,
-0.1282552033662796,
-0.1717911660671234,
-0.3250170946121216,
0.04215412214398384,
-0.17573441565036774,
-0.19179342687129974,
0.27093449234962463,
0.1396906077861786,
0.37713950872421265,
0.27483829855918884,
-0.14227506518363953,
-0.007455416023731232,
-0.4400266110897064,
-0.2658150792121887,
-0.1649734526872635,
-0.038579605519771576,
0.22400443255901337,
0.008436579257249832,
-0.12542591989040375,
-0.021885020658373833,
0.12434019148349762,
0.14794714748859406,
-0.17208102345466614,
-0.17584757506847382,
0.146366149187088,
-0.17003430426120758,
-0.18596340715885162,
-0.14072968065738678,
0.1831442266702652,
-0.15189681947231293,
-0.03113069012761116,
-0.06275996565818787,
-0.14789697527885437,
0.08176018297672272,
-0.128449946641922,
0.06835391372442245,
0.002666063606739044,
0.07371871918439865,
-0.31619441509246826,
0.08392003178596497,
-0.3015908896923065,
-0.08405116200447083,
0.2698034942150116,
-0.0315241739153862,
0.14634712040424347,
0.45389029383659363,
0.40275251865386963,
-0.07262209057807922,
-0.095639169216156,
-0.0567292794585228,
0.5515413880348206,
-0.605144739151001,
0.2913154065608978,
-0.15657995641231537,
0.11268819868564606,
0.0965895727276802,
0.317776620388031,
0.2544376254081726,
0.0715055838227272,
0.026548314839601517,
-0.34782475233078003,
-0.2285258173942566,
0.4916565418243408,
-0.0185181125998497,
0.012201707810163498,
0.1027069017291069,
0.4117231070995331,
-0.07805374264717102,
0.19734074175357819,
-0.21987274289131165,
0.30208495259284973,
0.028722813352942467,
0.05645482987165451,
-0.4602075219154358,
-0.2132689356803894,
-0.20159199833869934,
0.25507763028144836,
0.027088599279522896,
0.1679866909980774,
-0.07122506946325302,
-0.12592566013336182,
-0.12761655449867249,
0.10120327770709991,
0.102016881108284,
-0.0968397855758667,
-0.06450218707323074,
-0.10317187011241913,
0.1211114227771759,
0.12978407740592957,
0.13172748684883118,
-0.20998993515968323,
-0.053500980138778687,
-0.3004152476787567,
0.0015182271599769592,
-0.18776541948318481,
-0.36424320936203003,
0.07901668548583984,
-0.033779487013816833,
0.28909656405448914,
0.08048427104949951,
0.2754157781600952,
-0.02370668761432171,
-0.06440620869398117,
-0.22985851764678955,
0.1052856370806694,
0.152957946062088,
-0.0467553585767746,
0.4014988839626312,
-0.32381218671798706,
-0.038765016943216324,
-0.2653615176677704,
0.27564525604248047,
0.45938175916671753,
-0.22526399791240692,
-0.12385697662830353,
0.01526157557964325,
0.16776694357395172,
0.0016634222120046616,
-0.21519118547439575,
-0.21952378749847412,
-0.04977622628211975,
-0.15386952459812164,
-0.07467363029718399,
-0.09042397141456604,
-0.2073935866355896,
-0.17872630059719086,
0.1219562515616417,
0.29474350810050964,
0.2419099658727646,
-0.34636542201042175,
0.37922409176826477,
-0.27893200516700745,
-0.1749602109193802,
0.2887687683105469,
0.1355142444372177,
0.559386134147644,
-0.09074176847934723,
-0.07203657180070877,
0.18086522817611694,
-0.051142655313014984,
0.08335897326469421,
-0.15314683318138123,
-0.42818620800971985,
-0.17864654958248138,
0.36371320486068726,
0.20608429610729218,
-0.24173831939697266,
0.30446869134902954,
0.5248375535011292,
0.40107738971710205,
-0.11268875747919083,
-0.019807986915111542,
0.2256045639514923,
-0.1309850811958313,
0.22233963012695312,
-0.5097845792770386,
-0.1980469971895218,
-0.12368007004261017,
0.38702818751335144,
-0.1253378987312317,
0.055718403309583664,
0.49129825830459595,
0.17829591035842896,
-0.0879882276058197,
-0.6212044954299927,
-0.1130405142903328,
0.07271505892276764,
-0.0714721754193306,
-0.23943841457366943,
0.22984124720096588,
0.6816924214363098,
-0.4974336326122284,
-0.056194696575403214,
-0.21587972342967987,
0.4886174499988556,
0.27109819650650024,
-0.21118149161338806,
-0.4033636748790741,
-0.21839198470115662,
-0.07209066301584244,
-0.09500770270824432,
0.1022532731294632,
0.5172536373138428,
0.34985119104385376,
0.23339612782001495,
0.06629250198602676,
-0.14184127748012543,
0.23030219972133636,
0.1463664323091507,
0.13845176994800568,
0.000585249625146389,
-0.23334673047065735,
-0.23541691899299622,
-0.34432291984558105,
-0.18023358285427094,
-0.2282654047012329,
-0.3921261131763458,
-0.3310353755950928,
0.12118980288505554,
-0.031211037188768387,
-0.13187964260578156,
-0.1365349292755127,
0.0630984976887703,
-0.07263322174549103,
0.6978247761726379,
0.34853535890579224,
0.20587164163589478,
-0.2465088665485382,
-0.26132383942604065,
-0.2471020221710205,
0.47968819737434387,
-0.4091101288795471,
0.19831575453281403,
0.2130555361509323,
0.18338409066200256,
0.10704760253429413,
0.3368973731994629,
-0.06520387530326843,
0.5276257991790771,
-0.1808636635541916,
-0.21479082107543945,
-0.38511279225349426,
0.03682646155357361,
0.2935439944267273,
-0.16676639020442963,
-0.18446160852909088,
-0.15145716071128845,
0.33867350220680237,
-0.17680764198303223,
0.11256473511457443,
-0.11822760105133057,
0.02327253669500351,
0.05392232909798622,
0.08557051420211792,
0.32998472452163696,
0.08187305927276611,
0.32917287945747375,
0.028653860092163086,
-0.14292383193969727,
-0.10798376798629761,
-0.25462934374809265,
-0.1726098358631134,
0.38462379574775696,
0.058152005076408386,
0.41165581345558167,
-0.0787665843963623,
0.0795212984085083,
-0.1733231544494629,
0.10523437708616257,
-0.4348299503326416,
-0.09791164100170135,
0.12186213582754135,
-0.23521146178245544,
0.024975545704364777,
0.10284916311502457,
-0.017111757770180702,
0.11467592418193817,
0.08856936544179916,
0.11370491981506348,
-0.49449437856674194,
-0.1414472460746765,
0.4697197675704956,
-0.3657928705215454,
-0.2979661226272583,
0.49709996581077576,
0.10345209389925003,
0.3452361226081848,
-0.11850882321596146,
-0.5068215131759644,
0.08914429694414139,
0.1896466612815857,
0.05866410583257675,
-0.37224289774894714,
0.22458240389823914,
0.04821459949016571,
-0.06096334010362625,
0.05195166543126106,
0.22357188165187836,
0.18367227911949158,
-0.36517104506492615,
-0.03171267360448837,
-0.12904906272888184
] |
https://github.com/huggingface/datasets/issues/2176 | Converting a Value to a ClassLabel | Hi @nelson-liu!
Here is what I do to convert a string to class label:
```python
from datasets import load_dataset, features
dset = load_dataset(...)
col_name = "the string column name"
class_names = dset.unique(col_name)
class_feature = features.ClassLabel(names=sorted(class_names))
dset = dset.map(lambda str_value: {col_name: class_feature.str2int(str_value)}, input_columns=col_name)
dset = dset.cast(features.Features({
...
col_name: class_feature
})
```
| Hi!
In the docs for `cast`, it's noted that `For non-trivial conversion, e.g. string <-> ClassLabel you should use map() to update the Dataset.`
Would it be possible to have an example that demonstrates such a string <-> ClassLabel conversion using `map`? Thanks! | 50 | Converting a Value to a ClassLabel
Hi!
In the docs for `cast`, it's noted that `For non-trivial conversion, e.g. string <-> ClassLabel you should use map() to update the Dataset.`
Would it be possible to have an example that demonstrates such a string <-> ClassLabel conversion using `map`? Thanks!
Hi @nelson-liu!
Here is what I do to convert a string to class label:
```python
from datasets import load_dataset, features
dset = load_dataset(...)
col_name = "the string column name"
class_names = dset.unique(col_name)
class_feature = features.ClassLabel(names=sorted(class_names))
dset = dset.map(lambda str_value: {col_name: class_feature.str2int(str_value)}, input_columns=col_name)
dset = dset.cast(features.Features({
...
col_name: class_feature
})
```
| [
-0.02556551992893219,
-0.19360481202602386,
0.05003330484032631,
0.05938300862908363,
0.6273637413978577,
0.21152490377426147,
0.2829760015010834,
0.0898774266242981,
0.0759948194026947,
-0.05686728656291962,
0.10290462523698807,
0.6814892888069153,
-0.0339193269610405,
0.11583291739225388,
-0.06382942199707031,
-0.20428058505058289,
0.17508795857429504,
0.18273118138313293,
-0.10028742253780365,
-0.05688735470175743,
-0.3199295401573181,
-0.022135784849524498,
-0.4753819704055786,
0.11780375987291336,
-0.018353167921304703,
-0.01316232793033123,
-0.05213955044746399,
-0.1745002567768097,
-0.00951484963297844,
-0.26160702109336853,
-0.0025991778820753098,
-0.2266910970211029,
-0.023529136553406715,
0.404001921415329,
-0.00012303743278607726,
-0.3252842426300049,
0.17134931683540344,
0.12763868272304535,
-0.10272836685180664,
-0.0012640804052352905,
-0.5446990132331848,
0.15091124176979065,
-0.04939436912536621,
-0.31248101592063904,
-0.0679490864276886,
0.4585191011428833,
0.01020674966275692,
-0.35181891918182373,
-0.07972376048564911,
-0.038574397563934326,
0.0643962174654007,
-0.26855430006980896,
0.043348830193281174,
0.15026208758354187,
0.11731274425983429,
-0.06391884386539459,
0.19799412786960602,
0.19619128108024597,
0.5107663869857788,
0.3812743127346039,
-0.023318208754062653,
0.231021448969841,
-0.2420649528503418,
-0.44797322154045105,
0.2709721028804779,
0.14096224308013916,
0.014753486961126328,
-0.34414511919021606,
0.214189350605011,
0.06970512121915817,
0.5089138746261597,
-0.27877360582351685,
-0.24061910808086395,
-0.028924569487571716,
0.2034190446138382,
-0.19265010952949524,
-0.13298147916793823,
0.04531453549861908,
0.15560279786586761,
0.05250902473926544,
-0.5872039794921875,
-0.09474515169858932,
0.009669020771980286,
0.0064494796097278595,
-0.041983187198638916,
0.3577367961406708,
-0.06810617446899414,
0.204217791557312,
-0.18360280990600586,
-0.3301817774772644,
-0.06566915661096573,
-0.1423177868127823,
0.05342625454068184,
0.4511694014072418,
0.028500769287347794,
-0.16225753724575043,
-0.18035635352134705,
0.30800849199295044,
-0.3923473358154297,
-0.4623280167579651,
-0.08256204426288605,
0.20446094870567322,
-0.15353022515773773,
0.23605015873908997,
0.13048429787158966,
-0.0718887597322464,
0.632541298866272,
0.2619616389274597,
-0.03778698295354843,
-0.39720407128334045,
-0.3506867289543152,
0.04709937795996666,
-0.19646024703979492,
-0.0970514640212059,
0.3145182430744171,
0.27562054991722107,
-0.0859178900718689,
-0.20861384272575378,
0.060328513383865356,
-0.06295657902956009,
-0.6144185066223145,
0.16920089721679688,
0.057734884321689606,
0.10276834666728973,
0.15967588126659393,
0.15300896763801575,
0.383162260055542,
0.01273973286151886,
0.33728843927383423,
-0.5151322484016418,
0.025672581046819687,
0.16876229643821716,
-0.05947836861014366,
-0.25461816787719727,
-0.20466797053813934,
0.1303679198026657,
-0.16579477488994598,
0.11046573519706726,
-0.1394721269607544,
-0.2411891371011734,
-0.19136987626552582,
0.35331422090530396,
0.14239519834518433,
0.00919431447982788,
-0.38994142413139343,
0.09196272492408752,
0.36216971278190613,
-0.34464067220687866,
-0.3618513345718384,
0.4646984040737152,
-0.3172391653060913,
0.10522003471851349,
0.24306246638298035,
0.06260742247104645,
0.34319329261779785,
-0.2344118356704712,
-0.015706613659858704,
0.12147204577922821,
0.22058475017547607,
-0.32326143980026245,
0.23051589727401733,
-0.388846218585968,
-0.27177801728248596,
-0.15734639763832092,
0.10969284921884537,
0.14669908583164215,
-0.5220822095870972,
-0.17227813601493835,
0.22047661244869232,
0.14506040513515472,
-0.22466808557510376,
-0.3032837510108948,
-0.0844217985868454,
0.43403083086013794,
0.1755697876214981,
0.06797283887863159,
0.7431442737579346,
-0.404096394777298,
-0.11803264915943146,
0.2816627323627472,
-0.04422426596283913,
-0.551821768283844,
-0.18325874209403992,
0.43644949793815613,
0.18869388103485107,
-0.17592507600784302,
0.12855052947998047,
0.18449009954929352,
-0.2581251561641693,
0.12203563004732132,
0.08490361273288727,
0.037475161254405975,
0.11888749897480011,
-0.11323285102844238,
-0.20430399477481842,
0.420771062374115,
0.12273678928613663,
0.4091434180736542,
-0.02811216562986374,
-0.28784748911857605,
0.34989920258522034,
0.07334363460540771,
-0.03310934826731682,
0.055645089596509933,
-0.15486352145671844,
-0.2334842085838318,
0.1583823561668396,
0.04183032363653183,
0.33167219161987305,
-0.03884785622358322,
0.2497371882200241,
-0.29512447118759155,
-0.032084591686725616,
-0.025787651538848877,
0.23774346709251404,
0.2743285298347473,
0.045092687010765076,
-0.23320862650871277,
0.05765685811638832,
-0.32119566202163696,
0.04450848326086998,
-0.22230404615402222,
-0.14090128242969513,
0.22883018851280212,
-0.044354118406772614,
-0.2813127934932709,
0.12062785029411316,
-0.1339091956615448,
-0.5128310918807983,
-0.11441970616579056,
0.2241096794605255,
0.012601446360349655,
-0.1962091624736786,
0.33646708726882935,
0.023232590407133102,
-0.18750588595867157,
-0.18457165360450745,
0.24070338904857635,
0.19286929070949554,
-0.23624607920646667,
0.2976698875427246,
0.14091938734054565,
0.19620124995708466,
-0.2853606641292572,
-0.3096444606781006,
0.2476767748594284,
-0.05600937828421593,
0.29048678278923035,
-0.09881015121936798,
0.2705559730529785,
-0.02850124053657055,
0.011213082820177078,
-0.09030754119157791,
0.11647546291351318,
-0.41816607117652893,
-0.26356247067451477,
0.1799531877040863,
0.026114948093891144,
-0.24781420826911926,
0.2360076904296875,
0.1281987577676773,
-0.5026355981826782,
0.27059775590896606,
0.11627350747585297,
-0.25144749879837036,
0.3145843744277954,
-0.0029371287673711777,
0.15607836842536926,
0.12078835815191269,
-0.045590613037347794,
0.18692587316036224,
0.11836106330156326,
-0.016255278140306473,
0.14889676868915558,
0.3097299635410309,
0.08467850834131241,
0.15365289151668549,
-0.38009169697761536,
0.0024058991111814976,
0.18142949044704437,
0.23931610584259033,
-0.06281036138534546,
0.13775184750556946,
0.013924960978329182,
-0.33649179339408875,
0.0362226665019989,
0.017507320269942284,
0.2251254916191101,
-0.18677039444446564,
-0.10591572523117065,
0.16858060657978058,
-0.36407098174095154,
-0.18759609758853912,
-0.014082439243793488,
0.06448730826377869,
0.12669989466667175,
-0.20370188355445862,
-0.08952020108699799,
0.15481995046138763,
-0.44965988397598267,
0.09892427921295166,
-0.2649112641811371,
-0.1420232653617859,
-0.07256179302930832,
-0.007744434289634228,
-0.07150471955537796,
0.06439206749200821,
-0.1425611823797226,
0.18503272533416748,
-0.10481570661067963,
-0.5802631974220276,
-0.07101674377918243,
-0.28390562534332275,
-0.19345512986183167,
0.3171651363372803,
-0.2148447185754776,
-0.4116519093513489,
0.1804639846086502,
0.143829345703125,
-0.3101685345172882,
-0.06120281666517258,
0.12443886697292328,
0.05599454417824745,
-0.15478205680847168,
-0.1652977019548416,
-0.061105214059352875,
-0.0006226524710655212,
-0.013154983520507812,
0.1271006017923355,
-0.14389251172542572,
-0.11166630685329437,
-0.2295338660478592,
0.1373450607061386,
0.48097148537635803,
0.2863415479660034,
0.1686648577451706,
0.10298063606023788,
-0.1149902194738388,
0.07882393896579742,
0.06291124224662781,
0.018894433975219727,
0.09586252272129059,
-0.050232596695423126,
-0.12774935364723206,
-0.040573280304670334,
0.0095839723944664,
-0.046898189932107925,
-0.09863749146461487,
0.2942809462547302,
0.025936152786016464,
0.15301918983459473,
0.26649507880210876,
0.39721015095710754,
0.018096642568707466,
-0.04782791808247566,
-0.3397722542285919,
-0.08467461913824081,
0.0018227007240056992,
-0.00031282007694244385,
0.21708688139915466,
0.41922813653945923,
0.001984868198633194,
0.1187845915555954,
-0.12663297355175018,
-0.3776562511920929,
-0.20866736769676208,
-0.21027423441410065,
-0.10635226964950562,
-0.0071306899189949036,
-0.022657401859760284,
-0.10157912969589233,
-0.18954429030418396,
-0.3195202350616455,
-0.08826293051242828,
0.0029033366590738297,
-0.16536815464496613,
0.14349748194217682,
0.10684065520763397,
-0.4341837465763092,
-0.19111227989196777,
0.1427053064107895,
-0.27883249521255493,
-0.0014222562313079834,
-0.2721329629421234,
-0.1227792277932167,
-0.19914978742599487,
-0.11615346372127533,
0.0036395713686943054,
-0.30993491411209106,
-0.029405765235424042,
-0.11333780735731125,
-0.26002785563468933,
-0.19792810082435608,
0.10562838613986969,
0.3141317367553711,
0.2474212944507599,
-0.012400566600263119,
-0.10050879418849945,
-0.02597440779209137,
0.12257730215787888,
0.07892119884490967,
0.598986804485321,
-0.37497854232788086,
0.5384542942047119,
0.39706146717071533,
0.10231007635593414,
0.02209421433508396,
0.09630613029003143,
-0.5713666677474976,
0.2216721475124359,
0.5073201656341553,
0.20087629556655884,
-0.046850722283124924,
-0.02286718413233757,
0.2609044909477234,
0.14103470742702484,
-0.07251805812120438,
0.23244443535804749,
0.11651445925235748,
0.009354215115308762,
-0.16062718629837036,
0.1001962274312973,
0.337353378534317,
0.11288025975227356,
0.2035353034734726,
0.1686588078737259,
-0.22969810664653778,
0.2530900537967682,
0.22454364597797394,
-0.07821910083293915,
-0.024543631821870804,
0.229156032204628,
0.05489103123545647,
-0.23502615094184875,
-0.025267012417316437,
-0.5373614430427551,
0.4027568995952606,
-0.13612206280231476,
-0.30112338066101074,
0.027372365817427635,
0.22378891706466675,
0.6616905331611633,
0.0804574191570282,
0.22983203828334808,
-0.2139788568019867,
0.004138808697462082,
0.047727957367897034,
-0.25155162811279297,
-0.025964371860027313,
0.11312893778085709,
0.22703227400779724,
-0.4178062379360199,
-0.2665724456310272,
0.7585983872413635,
-0.029190566390752792,
-0.3857869505882263,
0.17732323706150055,
0.31002891063690186,
-0.5557984709739685,
0.3557274341583252,
0.5645315051078796,
1.0125477313995361,
-0.3431299924850464,
0.14547193050384521,
-0.24841201305389404,
-0.16213743388652802,
0.5679707527160645,
0.25190258026123047,
0.08802757412195206,
-0.5652982592582703,
0.09169888496398926,
-0.17936347424983978,
-0.09060685336589813,
-0.008954785764217377,
0.596506655216217,
-0.6097907423973083,
0.21075432002544403,
-0.26798945665359497,
0.19739454984664917,
0.21966229379177094,
-0.22790461778640747,
0.18472221493721008,
-0.24315357208251953,
0.025684872642159462,
0.19456852972507477,
0.07894523441791534,
-0.2898958921432495,
0.010672079399228096,
0.14115749299526215,
-0.2379119098186493,
-0.053344085812568665,
-0.20617640018463135,
0.06508883833885193,
-0.04821207746863365,
-0.08135838061571121,
0.23299385607242584,
0.04852135479450226,
0.3747680187225342,
0.6419817209243774,
0.16099312901496887,
0.1660032719373703,
-0.027272896841168404,
0.048769693821668625,
0.027217932045459747,
0.2853086292743683,
0.23384147882461548,
0.17865552008152008,
0.2727909982204437,
0.4090888500213623,
-0.03857163339853287,
0.3694919943809509,
-0.20364835858345032,
-0.05292573198676109,
-0.1899777352809906,
0.016820862889289856,
0.08083032816648483,
-0.5354506969451904,
-0.28838807344436646,
0.16591960191726685,
-0.03949379548430443,
-0.033710286021232605,
0.02462611347436905,
-0.17963723838329315,
-0.16750971972942352,
0.13863925635814667,
0.044759150594472885,
-0.31765997409820557,
0.3458252251148224,
0.3615107536315918,
-0.17834317684173584,
0.10188785195350647,
0.17028412222862244,
-0.04476740211248398,
0.09220737218856812,
-0.07734908163547516,
0.4468339681625366,
0.08180734515190125,
-0.09765356779098511,
0.041678354144096375,
-0.09954354912042618,
-0.20062682032585144,
0.16193947196006775,
0.15827180445194244,
0.07870037853717804,
0.35535937547683716,
-0.2656431794166565,
-0.1228695809841156,
-0.28672558069229126,
-0.05272132158279419,
0.4271599352359772,
0.01772192120552063,
-0.2163185179233551,
0.02495391294360161,
0.0018837470561265945,
-0.09715446084737778,
-0.1648704558610916,
0.1144629418849945,
0.04440417140722275,
0.33076879382133484,
0.25994324684143066,
0.5231437087059021,
-0.2434343695640564,
-0.034891873598098755,
0.026833688840270042,
0.07516579329967499,
0.32604214549064636,
-0.09927700459957123,
-0.01860026642680168,
0.15960204601287842,
0.24550354480743408,
0.15229006111621857,
-0.16518335044384003,
0.10698214173316956,
-0.04868831858038902,
-0.3041028380393982,
-0.16378656029701233,
0.08765769749879837,
-0.06367851793766022,
0.27737388014793396,
0.07761096209287643,
0.2589268684387207,
-0.03970445692539215,
-0.08286266028881073,
0.05898643657565117,
0.25013095140457153,
-0.16561155021190643,
0.2256467044353485,
0.3910965323448181,
0.02436695247888565,
0.09737265110015869,
0.25836241245269775,
0.10757272690534592,
-0.4333234131336212,
0.3887709379196167,
-0.2362118810415268,
0.4785034954547882,
0.16185550391674042,
0.14504782855510712,
-0.13028186559677124,
-0.15665189921855927,
0.11631277203559875,
0.16002380847930908,
0.03879789263010025,
0.005573846399784088,
-0.05678838863968849,
0.4063169062137604,
-0.07776430994272232,
-0.13749279081821442,
0.08813639730215073,
-0.48820218443870544,
0.18370261788368225,
-0.29280000925064087,
-0.19534367322921753,
0.6786149144172668,
-0.45542800426483154,
-0.07749025523662567,
0.512225329875946,
-0.009032387286424637,
0.0824037492275238,
0.3932998776435852,
0.26412469148635864,
-0.017684124410152435,
0.1688561737537384,
0.15424305200576782,
0.19138480722904205,
-0.06634072959423065,
0.20613686740398407,
0.13634580373764038,
0.15091319382190704,
0.4715079367160797,
0.4203930199146271,
-0.0547286719083786,
0.2940467298030853,
0.010015234351158142,
-0.13203832507133484,
-0.6468144655227661,
-0.3869570791721344,
0.06248082220554352,
0.2653103768825531,
-0.1460629105567932,
-0.2055395245552063,
-0.17030921578407288,
0.05670741945505142,
0.08267122507095337,
0.02441512793302536,
-0.20618915557861328,
-0.12745638191699982,
0.7491555213928223,
0.03767421841621399,
0.40007472038269043,
-0.15113121271133423,
-0.48421281576156616,
-0.21260997653007507,
0.25432440638542175,
-0.24701865017414093,
-0.06630031019449234,
-0.1899687498807907,
0.14916843175888062,
0.37785348296165466,
0.16019153594970703,
0.29577207565307617,
0.35906270146369934,
-0.3054679334163666,
0.26645156741142273,
-0.09959810972213745,
-0.16220802068710327,
0.24653005599975586,
0.028770430013537407,
-0.043314605951309204,
-0.17286580801010132,
-0.13320325314998627,
0.070279560983181,
0.010469070635735989,
0.174126997590065,
0.08830161392688751,
0.36122971773147583,
0.1379586160182953,
0.36928269267082214,
0.1229500100016594,
-0.3744259774684906,
0.06836219131946564,
0.059638626873493195,
-0.1512703001499176,
0.025093436241149902,
0.34766101837158203,
-0.3015751838684082,
0.17995676398277283,
0.24588952958583832,
0.018905185163021088,
0.5963385701179504,
0.11286623775959015,
0.24058857560157776,
-0.17612650990486145,
-0.101225845515728,
0.1970672458410263,
-0.3364037275314331,
-0.21549257636070251,
0.18982933461666107,
-0.34424644708633423,
-0.01792873814702034,
-0.15528592467308044,
0.19086337089538574,
0.08335253596305847,
0.12578348815441132,
-0.4912697374820709,
-0.10254716128110886,
0.1621185541152954,
0.36293256282806396,
-0.3980659544467926,
0.29925552010536194,
0.18167464435100555,
-0.05223022773861885,
-0.25833791494369507,
0.1431860327720642,
-0.037066925317049026,
0.005539584904909134,
-0.17364323139190674,
0.07445891201496124,
0.015273701399564743,
-0.2734273672103882,
-0.0163704976439476,
-0.0003851689398288727,
0.3927971124649048,
-0.0876837968826294,
0.1093403771519661,
0.4171191453933716,
-0.11960405111312866,
-0.20286667346954346,
0.30202460289001465,
-0.5358951687812805,
0.018885940313339233,
-0.03439071774482727,
0.06797908246517181,
-0.022097112610936165,
-0.41846832633018494,
-0.01140967383980751,
-0.11289264261722565,
-0.6668356657028198,
0.149390310049057,
-0.48063895106315613,
0.05909312143921852,
0.11798276007175446,
0.15656399726867676,
-0.00014199689030647278,
0.49831587076187134,
0.03987419605255127,
-0.2799820303916931,
0.2041747123003006,
-0.6204321384429932,
-0.40091297030448914,
0.1542608141899109,
0.03699566423892975,
-0.1645599901676178,
0.03003377839922905,
-0.35419294238090515,
-0.08121679723262787,
0.38702455163002014,
-0.024235893040895462,
-0.37892839312553406,
0.14728716015815735,
-0.11237552762031555,
-0.20489388704299927,
-0.2524281144142151,
0.14578920602798462,
-0.11811953037977219,
0.156518816947937,
-0.1777055710554123,
-0.25372427701950073
] |
https://github.com/huggingface/datasets/issues/2176 | Converting a Value to a ClassLabel | Hi! You can use `Dataset.class_encode_column` for this. And in the next release of `datasets` (this feature is only available on `master`), you'll also be able to use `cast` to do the conversion.
An example of conversion via `cast`:
```python
from datasets import Dataset, Features, ClassLabel
d = Dataset.from_dict({"a": ["no", "yes", "no"]})
d = d.cast(Features({"a": ClassLabel(names=["yes", "no"])}))
``` | Hi!
In the docs for `cast`, it's noted that `For non-trivial conversion, e.g. string <-> ClassLabel you should use map() to update the Dataset.`
Would it be possible to have an example that demonstrates such a string <-> ClassLabel conversion using `map`? Thanks! | 57 | Converting a Value to a ClassLabel
Hi!
In the docs for `cast`, it's noted that `For non-trivial conversion, e.g. string <-> ClassLabel you should use map() to update the Dataset.`
Would it be possible to have an example that demonstrates such a string <-> ClassLabel conversion using `map`? Thanks!
Hi! You can use `Dataset.class_encode_column` for this. And in the next release of `datasets` (this feature is only available on `master`), you'll also be able to use `cast` to do the conversion.
An example of conversion via `cast`:
```python
from datasets import Dataset, Features, ClassLabel
d = Dataset.from_dict({"a": ["no", "yes", "no"]})
d = d.cast(Features({"a": ClassLabel(names=["yes", "no"])}))
``` | [
-0.102482371032238,
-0.01344560831785202,
0.05103122070431709,
0.030188851058483124,
0.5588472485542297,
0.22223234176635742,
0.3362889885902405,
0.14872346818447113,
0.04115286096930504,
0.03893569856882095,
0.09335141628980637,
0.7553331255912781,
-0.068466417491436,
0.2130059450864792,
-0.010683142580091953,
-0.14741773903369904,
0.22253291308879852,
0.16914430260658264,
-0.16061197221279144,
-0.0060836635529994965,
-0.26963794231414795,
-0.06020721048116684,
-0.39108186960220337,
0.11803867667913437,
-0.029836712405085564,
0.016493340954184532,
-0.0979561135172844,
-0.2234397828578949,
-0.026211535558104515,
-0.29093146324157715,
0.1038745790719986,
-0.1399301141500473,
-0.0069101592525839806,
0.4270213842391968,
-0.0001227803877554834,
-0.31810933351516724,
0.14416834712028503,
0.11843068897724152,
-0.24726459383964539,
-0.16858486831188202,
-0.6494760513305664,
0.030650367960333824,
-0.03852088004350662,
-0.3742188513278961,
-0.12733221054077148,
0.2887003719806671,
-0.004064114764332771,
-0.41820719838142395,
-0.04299403727054596,
-0.0020329151302576065,
0.07316301763057709,
-0.3639971911907196,
-0.06450486928224564,
0.04850899055600166,
0.08839063346385956,
0.056380994617938995,
0.12485488504171371,
0.18423429131507874,
0.3715249001979828,
0.27350470423698425,
0.057466018944978714,
0.2819778323173523,
-0.15521207451820374,
-0.42193251848220825,
0.3855099081993103,
0.19572414457798004,
-0.03751230984926224,
-0.252549409866333,
0.27412480115890503,
0.1876147985458374,
0.6043146252632141,
-0.33001235127449036,
-0.36490920186042786,
-0.08970078080892563,
0.23112089931964874,
-0.15252481400966644,
-0.1151333823800087,
0.03140214830636978,
0.20504966378211975,
0.11875325441360474,
-0.582944393157959,
-0.11909393221139908,
-0.024919576942920685,
0.05860019847750664,
-0.16438467800617218,
0.29428255558013916,
-0.12835155427455902,
0.15871179103851318,
-0.07666879892349243,
-0.39720815420150757,
-0.029525671154260635,
-0.1304447054862976,
0.03580259531736374,
0.45829856395721436,
0.027472373098134995,
-0.2416648268699646,
-0.16732624173164368,
0.3567253351211548,
-0.32611486315727234,
-0.48513317108154297,
-0.20293737947940826,
0.15663868188858032,
-0.22391241788864136,
0.27602189779281616,
0.19283099472522736,
-0.1407020390033722,
0.6936355829238892,
0.386134535074234,
-0.028170563280582428,
-0.37466326355934143,
-0.2589682936668396,
0.020412670448422432,
-0.31008777022361755,
-0.06914497166872025,
0.24884037673473358,
0.23960691690444946,
-0.17127348482608795,
-0.2764988839626312,
0.05164065957069397,
-0.08611252158880234,
-0.4965808391571045,
0.18851645290851593,
-0.016171377152204514,
0.12959831953048706,
0.1372140645980835,
0.19770318269729614,
0.3271278738975525,
0.08099213242530823,
0.3348374366760254,
-0.4267401397228241,
0.05293142795562744,
0.18498611450195312,
-0.14015701413154602,
-0.20802748203277588,
-0.1741306483745575,
0.15342293679714203,
-0.211618110537529,
0.16503773629665375,
-0.074408158659935,
-0.2059570848941803,
-0.2087240219116211,
0.33132046461105347,
0.19592323899269104,
-0.006934788078069687,
-0.34830722212791443,
0.08369598537683487,
0.3368517756462097,
-0.3679158091545105,
-0.38588428497314453,
0.4462229609489441,
-0.18341532349586487,
0.11833873391151428,
0.15677644312381744,
0.07043137401342392,
0.23706047236919403,
-0.24707478284835815,
-0.06172405928373337,
0.2587129771709442,
0.1784471571445465,
-0.33414795994758606,
0.2238273322582245,
-0.43299978971481323,
-0.3134395182132721,
-0.13539664447307587,
0.19605882465839386,
0.19529324769973755,
-0.6228525042533875,
-0.25362542271614075,
0.14771752059459686,
0.1668604463338852,
-0.357913076877594,
-0.30802974104881287,
-0.08428467065095901,
0.358154296875,
0.22856222093105316,
0.0190088152885437,
0.6234230995178223,
-0.36067697405815125,
-0.1429293006658554,
0.22245408594608307,
-0.017346955835819244,
-0.48566752672195435,
-0.2294941544532776,
0.4254438579082489,
0.2301720380783081,
-0.1285955011844635,
0.15452858805656433,
0.23049645125865936,
-0.24780449271202087,
0.053480543196201324,
0.20614595711231232,
-0.04083266854286194,
0.07216805219650269,
-0.024560855701565742,
-0.23267637193202972,
0.33806368708610535,
0.024282008409500122,
0.32013723254203796,
-0.010719023644924164,
-0.36829259991645813,
0.3121240735054016,
0.053581252694129944,
0.034281566739082336,
0.13071686029434204,
-0.17174479365348816,
-0.30132782459259033,
0.10346212983131409,
0.10059190541505814,
0.3355264365673065,
-0.10868284106254578,
0.1393013298511505,
-0.39758968353271484,
-0.03800584375858307,
-0.04830920696258545,
0.22837167978286743,
0.22796696424484253,
0.02931136265397072,
-0.21072474122047424,
0.07377010583877563,
-0.24310453236103058,
-0.05983599275350571,
-0.1850038319826126,
-0.04577874392271042,
0.19048039615154266,
-0.09053492546081543,
-0.23245252668857574,
0.19951443374156952,
-0.07562839984893799,
-0.49433425068855286,
0.03462489694356918,
0.2136627733707428,
-0.01389828510582447,
-0.14099976420402527,
0.3192681670188904,
0.05102928355336189,
-0.10877007246017456,
-0.17796668410301208,
0.2095789909362793,
0.14571858942508698,
-0.1674661636352539,
0.2967560589313507,
0.05927632376551628,
0.16414214670658112,
-0.20356854796409607,
-0.48175373673439026,
0.331997275352478,
-0.033177170902490616,
0.3289285898208618,
-0.13999858498573303,
0.2973637580871582,
0.004369555041193962,
-0.018421802669763565,
-0.10813091695308685,
0.01768011599779129,
-0.3648090958595276,
-0.25168657302856445,
0.06514222919940948,
-0.005718735978007317,
-0.18638812005519867,
0.2713075280189514,
0.15862032771110535,
-0.4871121048927307,
0.2711837589740753,
0.12842312455177307,
-0.288603276014328,
0.29744282364845276,
0.04473520442843437,
0.30249786376953125,
0.1472984105348587,
-0.002271505305543542,
0.172895610332489,
0.15158605575561523,
-0.024782855063676834,
0.18187467753887177,
0.31610408425331116,
-0.00020676851272583008,
0.11695978045463562,
-0.40137559175491333,
0.017971763387322426,
0.2074981927871704,
0.24599385261535645,
-0.04146537557244301,
0.13288959860801697,
0.03155795484781265,
-0.32306089997291565,
0.08636108785867691,
-0.1658678650856018,
0.17639854550361633,
-0.09595219790935516,
-0.139414444565773,
0.17628084123134613,
-0.3923569619655609,
-0.12645567953586578,
-0.01684373989701271,
-0.005572125315666199,
0.14386910200119019,
-0.18978552520275116,
-0.024126514792442322,
0.0234531257301569,
-0.3705107569694519,
0.13850419223308563,
-0.3754849433898926,
-0.20039162039756775,
-0.03847098723053932,
0.0011812429875135422,
-0.028777211904525757,
0.13510461151599884,
-0.16883669793605804,
0.1265462189912796,
-0.17100638151168823,
-0.49377715587615967,
-0.0775221735239029,
-0.25719815492630005,
-0.07438253611326218,
0.2843078374862671,
-0.1512940526008606,
-0.49427634477615356,
0.2791626453399658,
0.19919684529304504,
-0.22477950155735016,
0.0455034077167511,
0.07202097773551941,
0.07239135354757309,
-0.11349889636039734,
-0.17023250460624695,
-0.09492302685976028,
-0.08586958050727844,
-0.0329708456993103,
0.11116617918014526,
-0.18444162607192993,
-0.06614258885383606,
-0.27293533086776733,
0.17842751741409302,
0.4168480634689331,
0.20805300772190094,
0.04209291934967041,
0.07435966283082962,
-0.12653131783008575,
0.1647246778011322,
-0.03441603109240532,
-0.11413833498954773,
0.08528292179107666,
0.005082016810774803,
-0.15585865080356598,
-0.006620978936553001,
-0.012984994798898697,
-0.0432230643928051,
-0.053867824375629425,
0.2198481559753418,
-0.01040123775601387,
0.1352694183588028,
0.14726828038692474,
0.4149945378303528,
0.001119706779718399,
-0.14115241169929504,
-0.29107266664505005,
-0.0595729723572731,
-0.0053486451506614685,
-0.0419144406914711,
0.2351277470588684,
0.4429776966571808,
0.07189109921455383,
0.10202312469482422,
0.004537314176559448,
-0.4109708070755005,
-0.23340901732444763,
-0.29109036922454834,
0.02504141256213188,
0.07863697409629822,
-0.04370025172829628,
-0.11075899004936218,
-0.17855790257453918,
-0.2044001817703247,
-0.052984818816185,
0.05133112147450447,
-0.0451078936457634,
0.20477820932865143,
0.18394309282302856,
-0.3589772582054138,
-0.22516995668411255,
0.15725700557231903,
-0.4743596911430359,
0.025728393346071243,
-0.20556224882602692,
-0.062356553971767426,
-0.2705596089363098,
-0.003091143909841776,
0.03444216400384903,
-0.3095096945762634,
0.00403653085231781,
-0.09217720478773117,
-0.3471607565879822,
-0.2304239720106125,
0.03593490645289421,
0.23547892272472382,
0.2179487943649292,
0.02544487453997135,
-0.18965491652488708,
0.07201767712831497,
0.06756919622421265,
0.023020131513476372,
0.6679221987724304,
-0.4273219108581543,
0.5020024180412292,
0.41541701555252075,
0.08224497735500336,
-0.11175059527158737,
0.1350252479314804,
-0.5737956166267395,
0.16521377861499786,
0.3380018174648285,
0.15015986561775208,
-0.11607357859611511,
0.0051501039415597916,
0.31713637709617615,
0.11025802791118622,
-0.07619522511959076,
0.15961982309818268,
0.16609500348567963,
0.010899696499109268,
-0.15222935378551483,
0.03821868449449539,
0.31567999720573425,
0.13506567478179932,
0.18761204183101654,
0.08806167542934418,
-0.16440792381763458,
0.32057487964630127,
0.2690275311470032,
-0.050370898097753525,
-0.01460217498242855,
0.16068914532661438,
0.06045540049672127,
-0.05165163427591324,
-0.04806132614612579,
-0.2941022515296936,
0.43354201316833496,
-0.1833832561969757,
-0.3403840661048889,
-0.044895969331264496,
0.19741959869861603,
0.6572783589363098,
0.08161658048629761,
0.2305578887462616,
-0.17667165398597717,
0.05365113168954849,
0.047167643904685974,
-0.2915303409099579,
-0.08290811628103256,
0.16201382875442505,
0.27977269887924194,
-0.4657011330127716,
-0.4254920184612274,
0.8420622944831848,
0.13203278183937073,
-0.3276604115962982,
0.17251673340797424,
0.3686712980270386,
-0.5233215093612671,
0.27790510654449463,
0.5043387413024902,
0.9473294019699097,
-0.3047903776168823,
0.1653297245502472,
-0.236321359872818,
-0.24427548050880432,
0.7182285785675049,
0.17928166687488556,
-0.016993198543787003,
-0.5378987193107605,
0.14262405037879944,
-0.21089310944080353,
-0.08545761555433273,
0.09020284563302994,
0.6362766623497009,
-0.6303170919418335,
0.26427751779556274,
-0.33958619832992554,
0.2504064440727234,
0.19839932024478912,
-0.26422709226608276,
0.03844301402568817,
-0.20218034088611603,
-0.027945328503847122,
0.2114689201116562,
0.19013147056102753,
-0.2990712523460388,
-0.029457658529281616,
0.10876241326332092,
-0.2800680100917816,
0.03062821924686432,
-0.31322377920150757,
0.04091901332139969,
-0.01842442899942398,
-0.059331975877285004,
0.22266720235347748,
-0.06620258092880249,
0.46198570728302,
0.6122443079948425,
0.2149764895439148,
0.22927331924438477,
-0.10289236903190613,
0.11594587564468384,
-0.14249515533447266,
0.3458056151866913,
0.22437582910060883,
0.13318927586078644,
0.26344484090805054,
0.43223848938941956,
-0.12844491004943848,
0.2967672348022461,
-0.0975031927227974,
0.014193214476108551,
-0.054708510637283325,
-0.017779044806957245,
0.15873408317565918,
-0.49300697445869446,
-0.2691996693611145,
0.06797164678573608,
0.08910848200321198,
-0.03507561609148979,
0.04177132993936539,
-0.10126304626464844,
-0.12551264464855194,
0.1390480101108551,
0.07622866332530975,
-0.24249863624572754,
0.3449324071407318,
0.343919575214386,
-0.18215182423591614,
0.06524214893579483,
0.20537886023521423,
0.006416145712137222,
0.06358519196510315,
-0.09970958530902863,
0.4582533836364746,
0.21262770891189575,
-0.028833165764808655,
0.027979645878076553,
-0.021515151485800743,
-0.14722637832164764,
0.10807932913303375,
0.013043161481618881,
0.06211402639746666,
0.30066028237342834,
-0.2657574713230133,
-0.22556498646736145,
-0.21092505753040314,
0.030763965100049973,
0.38102060556411743,
0.116265669465065,
-0.16429084539413452,
-0.045202307403087616,
-0.08503831177949905,
-0.05295206606388092,
-0.17757830023765564,
0.16569022834300995,
0.019229037687182426,
0.31301796436309814,
0.29203468561172485,
0.5760573744773865,
-0.22618234157562256,
-0.09971202909946442,
0.010492810979485512,
0.04405629634857178,
0.2497166097164154,
-0.10571553558111191,
-0.06561561673879623,
0.15374991297721863,
0.2495870292186737,
0.10030271857976913,
-0.12724904716014862,
0.048711732029914856,
-0.09003280103206635,
-0.3458012342453003,
-0.0781140923500061,
0.12192118912935257,
-0.07164233922958374,
0.34157291054725647,
0.08885430544614792,
0.22140541672706604,
-0.07470706105232239,
-0.06644124537706375,
0.11523391306400299,
0.16729119420051575,
-0.2295631319284439,
0.2438088208436966,
0.35260728001594543,
0.02397868037223816,
0.09339472651481628,
0.30004075169563293,
0.12544852495193481,
-0.41525232791900635,
0.35308122634887695,
-0.15960150957107544,
0.5225886702537537,
0.1935805082321167,
0.22272652387619019,
-0.07444654405117035,
-0.14963756501674652,
0.20883172750473022,
0.2787070870399475,
0.050654713064432144,
-0.06901849806308746,
-0.04048631712794304,
0.3598618805408478,
-0.06892156600952148,
-0.09682685136795044,
0.07986314594745636,
-0.4286467432975769,
0.17773404717445374,
-0.23956908285617828,
-0.27969521284103394,
0.571536660194397,
-0.4443783760070801,
0.026005683466792107,
0.7281090617179871,
0.0015258416533470154,
0.09824606776237488,
0.36751314997673035,
0.268555611371994,
0.051102496683597565,
0.3148226737976074,
0.1414249837398529,
0.20934315025806427,
0.1251325160264969,
0.10158741474151611,
0.17279955744743347,
0.06925639510154724,
0.49202316999435425,
0.4458857476711273,
0.049799107015132904,
0.22183090448379517,
0.005744166672229767,
-0.1738164722919464,
-0.6697046756744385,
-0.31083834171295166,
0.0646202489733696,
0.2470429241657257,
-0.08171810209751129,
-0.25358885526657104,
-0.13042402267456055,
0.01641150563955307,
0.07642656564712524,
-0.0063501205295324326,
-0.24973291158676147,
-0.2701638340950012,
0.6889978647232056,
0.020407244563102722,
0.3567948341369629,
-0.24068213999271393,
-0.3713413178920746,
-0.19185671210289001,
0.2836274206638336,
-0.2185600847005844,
-0.16446742415428162,
-0.20433823764324188,
0.1616109311580658,
0.4128430187702179,
0.25347432494163513,
0.3289758861064911,
0.29609790444374084,
-0.25255921483039856,
0.2866925597190857,
-0.2265211045742035,
-0.12287633866071701,
0.2627795338630676,
0.037495147436857224,
-0.07519733905792236,
-0.17711620032787323,
-0.0928870439529419,
0.08702954649925232,
0.008725629188120365,
0.09938089549541473,
0.08067154884338379,
0.41342511773109436,
-0.0030873743817210197,
0.4234214723110199,
0.08701536059379578,
-0.3535322844982147,
0.057624951004981995,
0.04380280524492264,
-0.11436669528484344,
-0.05870802700519562,
0.38796645402908325,
-0.20545338094234467,
0.18640127778053284,
0.16716496646404266,
0.02039344608783722,
0.5367492437362671,
0.138469398021698,
0.25852328538894653,
-0.1671963632106781,
-0.047235921025276184,
0.12768153846263885,
-0.350734144449234,
-0.23939821124076843,
0.11514735221862793,
-0.37692326307296753,
0.03045256994664669,
-0.27238771319389343,
0.22751519083976746,
0.12625962495803833,
0.1535997837781906,
-0.3103211224079132,
-0.1367414891719818,
0.17277510464191437,
0.24929563701152802,
-0.4376141428947449,
0.3154354393482208,
0.23448020219802856,
-0.066465362906456,
-0.2759997248649597,
0.12713082134723663,
-0.01668362505733967,
-0.02811817079782486,
-0.19415061175823212,
0.10707350075244904,
-0.013260592706501484,
-0.42309558391571045,
0.1091451644897461,
0.015333853662014008,
0.4335535764694214,
-0.032301630824804306,
0.11691807955503464,
0.3666043281555176,
-0.05170129984617233,
-0.20281852781772614,
0.3394242525100708,
-0.5303565263748169,
0.05197378993034363,
-0.10597021877765656,
-0.007552511990070343,
0.029968712478876114,
-0.4238434135913849,
-0.10567872226238251,
-0.013514994643628597,
-0.5903428792953491,
0.1491466760635376,
-0.37537848949432373,
-0.05102595314383507,
0.05612035468220711,
0.1542958915233612,
-0.0910513699054718,
0.4783253073692322,
0.03729672729969025,
-0.19491828978061676,
0.2141292542219162,
-0.6025658845901489,
-0.4280565083026886,
0.13579843938350677,
0.043888159096241,
-0.21619468927383423,
-0.07200087606906891,
-0.3086497485637665,
-0.05497049540281296,
0.3521343171596527,
-0.03123284876346588,
-0.31924086809158325,
0.16836056113243103,
-0.09996961057186127,
-0.13240252435207367,
-0.2843121290206909,
0.29345428943634033,
-0.19048631191253662,
0.17557814717292786,
-0.19040268659591675,
-0.30064553022384644
] |
https://github.com/huggingface/datasets/issues/2175 | dataset.search_batch() function outputs all -1 indices sometime. | Actually, I found the answer [here](https://github.com/facebookresearch/faiss/wiki/FAQ#what-does-it-mean-when-a-search-returns--1-ids).
So we have to do some modifications to the code for instances where the index doesn't retrieve any IDs. | I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 25 | dataset.search_batch() function outputs all -1 indices sometime.
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
Actually, I found the answer [here](https://github.com/facebookresearch/faiss/wiki/FAQ#what-does-it-mean-when-a-search-returns--1-ids).
So we have to do some modifications to the code for instances where the index doesn't retrieve any IDs. | [
0.011297248303890228,
-0.37210598587989807,
-0.10199865698814392,
0.01926855370402336,
0.2021878957748413,
-0.09668794274330139,
0.2803094685077667,
0.2968437969684601,
0.13914187252521515,
0.4209126830101013,
-0.23242904245853424,
-0.24345360696315765,
0.10583270341157913,
-0.03389802202582359,
-0.16217459738254547,
0.10814525187015533,
0.27411651611328125,
0.3812989294528961,
-0.05255706608295441,
-0.519672691822052,
-0.31873759627342224,
0.11910899728536606,
-0.028468351811170578,
0.37295085191726685,
-0.2878592014312744,
0.29028040170669556,
-0.027525102719664574,
-0.08939852565526962,
-0.27440646290779114,
-0.4506147503852844,
0.5258823037147522,
-0.3038474917411804,
0.4114503264427185,
0.22609303891658783,
-0.00013125639816280454,
0.12229906022548676,
0.3880336284637451,
-0.03303837403655052,
-0.09780706465244293,
-0.1585952788591385,
-0.056862857192754745,
0.15356484055519104,
0.08321745693683624,
-0.04967348277568817,
0.052969545125961304,
-0.29350706934928894,
0.25834921002388,
-0.07600053399801254,
-0.039287641644477844,
0.2710101306438446,
0.01658746600151062,
-0.10019012540578842,
-0.2166370004415512,
-0.04404705762863159,
0.6340441703796387,
-0.31647777557373047,
0.08086197823286057,
-0.14307820796966553,
0.43597114086151123,
-0.028921110555529594,
0.14901578426361084,
0.1251528263092041,
0.0537862703204155,
-0.02634328603744507,
-0.2640726864337921,
0.1519918292760849,
0.6509356498718262,
-0.347018837928772,
0.1948387622833252,
0.24291744828224182,
0.2132444977760315,
-0.016518019139766693,
-0.342540979385376,
0.1010916456580162,
0.16157716512680054,
0.0643816590309143,
-0.04935085028409958,
0.16998618841171265,
-0.10237269103527069,
0.24921758472919464,
-0.07359645515680313,
0.32261922955513,
-0.2642556428909302,
0.12838928401470184,
0.09210103750228882,
0.30480313301086426,
0.05206733196973801,
0.13653749227523804,
0.12666605412960052,
0.17937424778938293,
0.26145559549331665,
0.1650855988264084,
0.1424204707145691,
0.26675641536712646,
-0.5452938675880432,
-0.03965386375784874,
0.30131980776786804,
-0.2635919749736786,
0.15998119115829468,
-0.33412277698516846,
-0.2958821952342987,
0.01220521330833435,
-0.19061590731143951,
-0.0811455026268959,
0.13480985164642334,
0.030039802193641663,
-0.040957026183605194,
0.08792521804571152,
0.27582699060440063,
-0.44348591566085815,
0.022571709007024765,
0.05646379664540291,
0.14051245152950287,
0.017279844731092453,
-0.06840778887271881,
0.12267670035362244,
0.07078210264444351,
-0.2924741506576538,
-0.3751613199710846,
-0.09220855683088303,
-0.28518304228782654,
0.22879737615585327,
-0.2117736041545868,
0.18732237815856934,
0.3979751169681549,
0.08088278770446777,
-0.04345693066716194,
0.09656871110200882,
-0.19204847514629364,
-0.07218289375305176,
-0.1490161269903183,
-0.16843633353710175,
-0.12902463972568512,
0.02570786327123642,
0.15129432082176208,
-0.4258545935153961,
-0.1803213506937027,
0.06134720891714096,
-0.14172160625457764,
0.19431564211845398,
0.12238375842571259,
-0.17329171299934387,
0.45335254073143005,
0.561536967754364,
-0.11661961674690247,
0.33237898349761963,
0.13577179610729218,
0.04667094349861145,
-0.024434074759483337,
0.008299265056848526,
0.06020127981901169,
-0.5894424915313721,
0.17873860895633698,
0.06596782803535461,
0.015802137553691864,
0.34392011165618896,
0.32026001811027527,
0.333434134721756,
-0.2957112789154053,
0.3365432918071747,
-0.015902608633041382,
-0.40668851137161255,
0.03136106953024864,
-0.02631901577115059,
0.25367796421051025,
0.17408649623394012,
-0.05352552980184555,
0.14472772181034088,
0.01880248822271824,
-0.2671527862548828,
0.10422942787408829,
0.3047012984752655,
0.07768195122480392,
0.28360769152641296,
-0.4879198968410492,
0.19914241135120392,
0.1316750943660736,
-0.282163143157959,
-0.32180866599082947,
0.05694480612874031,
-0.2449696809053421,
-0.6043919920921326,
0.01685848832130432,
0.2755216658115387,
0.26235589385032654,
0.20282912254333496,
0.2860119938850403,
0.19919252395629883,
-0.02237691543996334,
-0.1068088710308075,
-0.4190150201320648,
-0.07491619884967804,
0.26295047998428345,
-0.08065042644739151,
0.2959197461605072,
0.26077792048454285,
0.08971252292394638,
-0.770706832408905,
0.3443845510482788,
0.07831013202667236,
0.0974854826927185,
-0.07595504075288773,
0.36005473136901855,
0.003918655216693878,
0.7175310254096985,
-0.06479053199291229,
-0.08750509470701218,
0.11427082866430283,
-0.3557223677635193,
0.0644310787320137,
0.020077809691429138,
-0.20870359241962433,
-0.014546096324920654,
-0.03296137601137161,
0.06086675077676773,
0.2663138210773468,
-0.06134311109781265,
-0.1442529559135437,
0.28524118661880493,
-0.15069565176963806,
-0.21669040620326996,
0.027903718873858452,
-0.18929006159305573,
-0.1727767437696457,
-0.4619540870189667,
0.28697213530540466,
-0.004456641152501106,
-0.21530818939208984,
0.00803445279598236,
-0.02350742369890213,
0.31085509061813354,
-0.06572394073009491,
0.008328196592628956,
0.1663469821214676,
-0.20152156054973602,
-0.2778990864753723,
0.7204375863075256,
0.10576488822698593,
-0.22752980887889862,
-0.41911250352859497,
0.11127576231956482,
0.4744246006011963,
0.1263323575258255,
-0.19799524545669556,
0.15499761700630188,
0.22418904304504395,
-0.2468896061182022,
0.4735146760940552,
-0.12255745381116867,
-0.0014312807470560074,
0.0749267190694809,
0.14218151569366455,
-0.11487787961959839,
-0.2041199803352356,
0.10195271670818329,
-0.14532063901424408,
-0.11486400663852692,
0.03656478598713875,
-0.2517423629760742,
0.18073680996894836,
-0.15669792890548706,
-0.40205487608909607,
0.037372030317783356,
0.24530375003814697,
0.04684846103191376,
-0.012224361300468445,
0.12389875948429108,
-0.2407313734292984,
0.38526469469070435,
0.14659546315670013,
-0.18584610521793365,
-0.2387988567352295,
-0.18864871561527252,
-0.14946527779102325,
0.09109287708997726,
0.15435612201690674,
-0.2472144365310669,
0.1434973031282425,
0.31178018450737,
-0.07424093037843704,
-0.3294376730918884,
-0.22531941533088684,
-0.3847644329071045,
0.26185643672943115,
-0.28140899538993835,
-0.04557731747627258,
0.05049426108598709,
-0.02714647352695465,
-0.3396143615245819,
-0.09365104138851166,
-0.036269303411245346,
-0.07649300992488861,
0.20386941730976105,
-0.32892197370529175,
-0.050036534667015076,
0.00733115104958415,
-0.1228787750005722,
0.23368732631206512,
0.056492581963539124,
0.3149164319038391,
-0.6124582290649414,
0.061108216643333435,
-0.382764607667923,
-0.2278803139925003,
-0.5138925313949585,
0.30623310804367065,
-0.060401685535907745,
-0.03812401741743088,
-0.5279856324195862,
-0.5108692646026611,
0.14297986030578613,
0.02867306023836136,
-0.10982340574264526,
-0.0350114107131958,
0.32341107726097107,
0.018820807337760925,
-0.2142341285943985,
0.30208227038383484,
-0.0022867554798722267,
-0.08311726897954941,
-0.1791345775127411,
0.17307046055793762,
-0.26974567770957947,
0.37669384479522705,
-0.23275619745254517,
-0.26791316270828247,
-0.031348660588264465,
-0.03881976008415222,
0.13319477438926697,
-0.22064192593097687,
0.12472651898860931,
0.027666814625263214,
0.1237582266330719,
-0.12229359894990921,
-0.01603171043097973,
-0.033728621900081635,
-0.22217708826065063,
-0.20211368799209595,
0.2577732503414154,
0.3072981834411621,
-0.3648935556411743,
-0.24108703434467316,
-0.1581915318965912,
-0.5619205236434937,
0.45069897174835205,
-0.13599920272827148,
-0.13750669360160828,
0.0701928362250328,
0.00016924366354942322,
0.06290622055530548,
0.44138625264167786,
0.11643951386213303,
-0.06912356615066528,
-0.05205170437693596,
-0.24591031670570374,
-0.05218690261244774,
0.3002718687057495,
-0.025120694190263748,
0.2634776830673218,
0.02423006109893322,
-0.09367815405130386,
-0.2716231644153595,
0.7259997129440308,
0.15398019552230835,
-0.07144187390804291,
-0.012289628386497498,
0.1312195509672165,
0.1544189453125,
0.16460222005844116,
0.02832501195371151,
0.2517502009868622,
0.20880690217018127,
-0.3656691312789917,
-0.08243031799793243,
-0.020699147135019302,
0.13677972555160522,
0.27970534563064575,
0.13236117362976074,
-0.14345011115074158,
-0.12019644677639008,
-0.05698435753583908,
0.292582631111145,
0.21898257732391357,
0.024662408977746964,
0.15094009041786194,
-0.09400168061256409,
0.10884270071983337,
0.18913914263248444,
0.06882406771183014,
0.09593570977449417,
0.2566942572593689,
0.3786233365535736,
-0.49722766876220703,
-0.45681917667388916,
0.22427813708782196,
-0.08083649724721909,
0.3757859766483307,
0.23937438428401947,
0.10278139263391495,
0.47887295484542847,
0.25905629992485046,
1.2568012475967407,
-0.1759704202413559,
0.22369076311588287,
0.22330433130264282,
0.11469051241874695,
-0.20947517454624176,
-0.42774084210395813,
-0.3497861325740814,
0.14567041397094727,
0.2816673517227173,
0.304263174533844,
-0.13457052409648895,
-0.28299006819725037,
0.3241879940032959,
-0.08312470465898514,
-0.024704977869987488,
-0.48405179381370544,
-0.4144076108932495,
-0.3878677785396576,
0.35963547229766846,
0.17684224247932434,
0.0704084187746048,
-0.02576262317597866,
-0.12870267033576965,
-0.31837061047554016,
-0.2886585593223572,
0.0842139795422554,
-0.020928196609020233,
0.01367834210395813,
0.10889964550733566,
-0.01007802877575159,
0.05402172729372978,
0.5879079103469849,
-0.03529854863882065,
0.028829630464315414,
0.006331253796815872,
-0.2897154986858368,
0.10976894944906235,
0.1316748559474945,
-0.2149084359407425,
0.1300613135099411,
0.40254178643226624,
-0.037896063178777695,
-0.03797311335802078,
-0.06998810917139053,
0.17396464943885803,
0.02517545595765114,
-0.1724173128604889,
0.3342430591583252,
0.07760836184024811,
-0.21639472246170044,
-0.2567574679851532,
0.6706346869468689,
-0.18972620368003845,
-0.24434739351272583,
-0.045589327812194824,
0.3609125018119812,
-0.12717761099338531,
0.8627623915672302,
0.20363527536392212,
1.02944016456604,
-0.1593867838382721,
0.044949643313884735,
-0.03306589648127556,
-0.05769341439008713,
0.3887159824371338,
-0.13688310980796814,
0.27884167432785034,
-0.33232247829437256,
-0.0388178713619709,
-0.14173157513141632,
-0.10174931585788727,
-0.38785043358802795,
0.47302770614624023,
0.02225067839026451,
0.3106590807437897,
-0.043604910373687744,
-0.2067585289478302,
0.14250850677490234,
0.042078591883182526,
0.4215950071811676,
-0.09972064197063446,
-0.2761314809322357,
-0.026813773438334465,
0.2104555070400238,
0.3512396216392517,
-0.10166838765144348,
-0.020680520683526993,
0.08608488738536835,
-0.01665583997964859,
-0.22634357213974,
-0.211087167263031,
0.06519538164138794,
0.2944015860557556,
0.6096580624580383,
-0.2668305039405823,
-0.1942780613899231,
-0.15850761532783508,
0.5273295044898987,
-0.31097614765167236,
-0.06495116651058197,
-0.06323987245559692,
0.42607876658439636,
0.06473785638809204,
0.065994493663311,
-0.286304235458374,
0.35305172204971313,
0.1669602394104004,
-0.40662381052970886,
-0.02868785709142685,
0.04662308469414711,
0.18258395791053772,
-0.20956583321094513,
0.08373517543077469,
-0.3531547784805298,
-0.11283040791749954,
0.13546594977378845,
0.07353009283542633,
0.146396666765213,
-0.10966567695140839,
-0.032974619418382645,
0.3443635106086731,
-0.24888180196285248,
0.5228216648101807,
0.037922926247119904,
-0.5396444201469421,
0.0018793530762195587,
0.06877901405096054,
0.3131366968154907,
0.10262762010097504,
0.028428498655557632,
-0.09100143611431122,
-0.10678812116384506,
0.004764486104249954,
-0.39827942848205566,
0.2628670036792755,
-0.06571966409683228,
0.36460745334625244,
0.006646683439612389,
-0.052457623183727264,
0.014926658011972904,
-0.06512287259101868,
-0.05351205915212631,
-0.03938724845647812,
-0.6319118738174438,
-0.11182741820812225,
-0.06747844815254211,
0.002082511782646179,
0.04266873747110367,
0.28274279832839966,
0.04362902045249939,
-0.22248125076293945,
0.049410149455070496,
-0.4360685646533966,
-0.15175943076610565,
-0.3070208728313446,
-0.32974714040756226,
0.3338540494441986,
-0.4554998278617859,
0.02339012175798416,
-0.17270292341709137,
-0.09453941881656647,
-0.04044774919748306,
-0.013435553759336472,
-0.14613042771816254,
-0.025727614760398865,
0.0994814783334732,
0.2227836549282074,
0.17635104060173035,
0.25902873277664185,
-0.2526921033859253,
-0.030190974473953247,
-0.1449386179447174,
0.038937561213970184,
0.0625404566526413,
0.611352264881134,
0.06643558293581009,
0.2071971744298935,
0.1814805120229721,
-0.11883338540792465,
0.06742091476917267,
0.16037102043628693,
0.22018112242221832,
0.2092127650976181,
0.009826870635151863,
0.39866071939468384,
-0.24791650474071503,
-0.004566185176372528,
-0.0807427242398262,
0.10797521471977234,
-0.08629335463047028,
0.12453516572713852,
0.06384779512882233,
-0.14485453069210052,
-0.11574959754943848,
0.08028813451528549,
0.07307372987270355,
0.2872042655944824,
-0.36820441484451294,
-0.28899654746055603,
0.08760075271129608,
0.08784791827201843,
-0.07361525297164917,
0.031094778329133987,
0.1891530305147171,
-0.009666074998676777,
-0.08576193451881409,
0.1576615869998932,
-0.08571083843708038,
-0.2770792245864868,
-0.08298513293266296,
0.12124060839414597,
0.38781192898750305,
0.08452649414539337,
-0.46207213401794434,
-0.46831652522087097,
0.2818702757358551,
0.12554854154586792,
0.2182910293340683,
-0.08882026374340057,
0.1867125928401947,
0.598823070526123,
0.10669924318790436,
0.11634428799152374,
0.007810346782207489,
0.1931094378232956,
-0.3157951831817627,
-0.10069435834884644,
0.35794585943222046,
0.4545300006866455,
-0.35133206844329834,
0.0446389839053154,
0.23468202352523804,
0.13337342441082,
-0.11314229667186737,
0.04051714017987251,
0.1585412323474884,
-0.22601281106472015,
0.05375196784734726,
0.07839308679103851,
-0.16731581091880798,
0.2790886461734772,
0.012853629887104034,
0.13422878086566925,
0.015872787684202194,
0.054501134902238846,
0.06463581323623657,
0.20167472958564758,
-0.09540608525276184,
-0.06597154587507248,
-0.1233314648270607,
0.42438241839408875,
0.2690969407558441,
0.02569664642214775,
-0.1349169760942459,
-0.1839722841978073,
0.06241264194250107,
0.32323428988456726,
0.3626469373703003,
0.25444620847702026,
0.405059814453125,
-0.21830902993679047,
0.19436752796173096,
-0.08964380621910095,
-0.17157764732837677,
-0.15433409810066223,
-0.15757030248641968,
-0.22219190001487732,
-0.07097968459129333,
-0.049828991293907166,
0.02491946704685688,
0.025774594396352768,
-0.2098158448934555,
-0.054816681891679764,
0.3915155827999115,
-0.1408577859401703,
-0.005502469837665558,
0.09870990365743637,
-0.06448016315698624,
-0.21788734197616577,
0.12577387690544128,
-0.19870266318321228,
0.23337186872959137,
0.15545503795146942,
-0.09734935313463211,
0.14920172095298767,
0.06340526044368744,
-0.019218768924474716,
-0.28367355465888977,
0.16907814145088196,
0.39737895131111145,
0.32104817032814026,
-0.14044198393821716,
0.1825249344110489,
-0.11473727226257324,
0.053404662758111954,
-0.08133344352245331,
0.2980784475803375,
0.4000991880893707,
0.37927427887916565,
-0.3778192102909088,
-0.20696581900119781,
0.4430239200592041,
0.5543782114982605,
-0.016958435997366905,
0.5559700727462769,
0.13202282786369324,
-0.0057811737060546875,
-0.48081159591674805,
-0.016314560547471046,
0.024672649800777435,
-0.2159029245376587,
0.3507213890552521,
0.07731922715902328,
-0.04026169329881668,
0.11470165103673935,
0.008525542914867401,
0.16125290095806122,
-0.259067565202713,
0.34245744347572327,
0.21824410557746887,
-0.14502204954624176,
0.0004632584750652313,
0.17467474937438965,
-0.3607175052165985,
-0.10428404808044434,
-0.46275851130485535,
-0.12360317260026932,
-0.24728339910507202,
-0.18842579424381256,
-0.20967832207679749,
-0.2898920178413391,
0.0043422081507742405,
0.2782425582408905,
0.2054188996553421,
0.02614486776292324,
-0.1434522122144699,
0.31183144450187683,
-0.5026419162750244,
0.04356800764799118,
-0.1125665083527565,
-0.07710709422826767,
0.2508092522621155,
-0.020080063492059708,
-0.3463621139526367,
-0.30606263875961304,
0.47884491086006165,
-0.33452698588371277,
-0.21703091263771057,
-0.49422207474708557,
0.44171687960624695,
0.3646002411842346,
0.18807083368301392,
-0.6248788237571716,
-0.2481434941291809,
0.17859072983264923,
0.07566831260919571,
-0.3999006748199463,
-0.5030998587608337,
0.11679671704769135,
0.12362702190876007,
-0.133301243185997,
-0.3742964565753937,
0.43909701704978943,
0.0781254917383194,
0.2793935239315033,
-0.31120043992996216
] |
https://github.com/huggingface/datasets/issues/2175 | dataset.search_batch() function outputs all -1 indices sometime. | @lhoestq @patrickvonplaten
I also found another short bug in the retrieval part. Especially, when retrieving documents. If Faiss returns the -1 as the index, the retriever will always use the last element in the dataset.
please check [def get_doc_dicts function](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L222)
Does the use of the HNSW guarantee to retrieve valid indexes always?
| I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 52 | dataset.search_batch() function outputs all -1 indices sometime.
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
@lhoestq @patrickvonplaten
I also found another short bug in the retrieval part. Especially, when retrieving documents. If Faiss returns the -1 as the index, the retriever will always use the last element in the dataset.
please check [def get_doc_dicts function](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L222)
Does the use of the HNSW guarantee to retrieve valid indexes always?
| [
0.015852149575948715,
-0.2806914150714874,
-0.06329280138015747,
0.08496486395597458,
0.08535438776016235,
-0.10384581238031387,
0.2369084358215332,
0.3023107051849365,
0.1052338182926178,
0.34376060962677,
-0.2517731785774231,
-0.21534393727779388,
0.16499033570289612,
-0.26178351044654846,
-0.11690813302993774,
0.05788452923297882,
0.2875572144985199,
0.3696741461753845,
-0.013572491705417633,
-0.5771778225898743,
-0.43647855520248413,
0.045401036739349365,
-0.10874395072460175,
0.35991376638412476,
-0.2922557294368744,
0.17140981554985046,
-0.09354124963283539,
-0.043222829699516296,
-0.2799685299396515,
-0.4463256001472473,
0.5693714022636414,
-0.20512135326862335,
0.49980857968330383,
0.19349411129951477,
-0.00013102446973789483,
0.0607319176197052,
0.3989877700805664,
-0.06738799065351486,
-0.11780823767185211,
-0.10647684335708618,
-0.1419558972120285,
0.08308716118335724,
0.0018897957634180784,
-0.05884718522429466,
0.033088333904743195,
-0.29111555218696594,
0.22276325523853302,
-0.10777287185192108,
-0.0043288469314575195,
0.3318611979484558,
0.021613549441099167,
0.05692049115896225,
-0.17382661998271942,
0.002326610032469034,
0.7081761956214905,
-0.36592984199523926,
0.09851572662591934,
-0.03677869215607643,
0.48124319314956665,
-0.05281640589237213,
0.1526663601398468,
0.18074890971183777,
0.001985587179660797,
0.0009159594774246216,
-0.30937841534614563,
0.2561919391155243,
0.6104990839958191,
-0.2700280547142029,
0.15266680717468262,
0.3558494746685028,
0.3618957996368408,
0.05238475278019905,
-0.406441867351532,
0.050259485840797424,
0.16378965973854065,
0.04326268285512924,
-0.03400152921676636,
0.2212761640548706,
-0.07148954272270203,
0.2482031285762787,
0.016666848212480545,
0.3187112808227539,
-0.30733636021614075,
0.21910986304283142,
0.0984983742237091,
0.2952781021595001,
0.045627981424331665,
0.0873529464006424,
0.15929998457431793,
0.24460014700889587,
0.32560330629348755,
0.011704778298735619,
0.06403575837612152,
0.24949589371681213,
-0.4395672678947449,
0.024455636739730835,
0.2559684216976166,
-0.15714964270591736,
0.13260796666145325,
-0.36598509550094604,
-0.26436847448349,
-0.04381714016199112,
-0.16861028969287872,
-0.03824794292449951,
0.21081280708312988,
0.09811793267726898,
-0.1500433385372162,
0.1708923876285553,
0.3238219618797302,
-0.36537235975265503,
0.020729873329401016,
0.03798448294401169,
0.14822927117347717,
0.04027571529150009,
-0.06102388724684715,
0.08174949884414673,
0.037891678512096405,
-0.39194348454475403,
-0.31663963198661804,
-0.07471111416816711,
-0.2071288526058197,
0.12592928111553192,
-0.3126271069049835,
0.18124981224536896,
0.32506123185157776,
0.19524109363555908,
-0.06457250565290451,
0.19334310293197632,
-0.2017330676317215,
0.010371559299528599,
-0.1967393457889557,
-0.196247860789299,
-0.15734882652759552,
0.0827169343829155,
0.08142359554767609,
-0.36861470341682434,
-0.1698286533355713,
0.08121466636657715,
-0.08155854046344757,
0.16014912724494934,
0.04422818124294281,
-0.20155194401741028,
0.48311635851860046,
0.4733825922012329,
-0.1933668702840805,
0.2601573169231415,
0.07692514359951019,
0.027760125696659088,
-0.07027247548103333,
0.006818998605012894,
0.01623091846704483,
-0.5032622814178467,
0.1661580204963684,
0.0640355721116066,
0.1187811940908432,
0.32643333077430725,
0.31285709142684937,
0.2519632577896118,
-0.14434528350830078,
0.3916180729866028,
0.038527995347976685,
-0.513446033000946,
0.038776952773332596,
-0.07685695588588715,
0.19564571976661682,
0.16601377725601196,
0.009802129119634628,
0.16630138456821442,
0.0855417475104332,
-0.17490972578525543,
0.07669156044721603,
0.3393222689628601,
0.03189106285572052,
0.3072889447212219,
-0.5202444195747375,
0.23227857053279877,
0.10178659856319427,
-0.4268247187137604,
-0.43707436323165894,
0.021766971796751022,
-0.09341078251600266,
-0.4778694212436676,
0.04891224950551987,
0.23617400228977203,
0.4215185046195984,
0.09481446444988251,
0.166885644197464,
0.21422472596168518,
-0.03002781607210636,
-0.16945262253284454,
-0.5196029543876648,
-0.060897015035152435,
0.1508564054965973,
-0.1074659675359726,
0.4080953896045685,
0.30551624298095703,
0.05424881353974342,
-0.6813327670097351,
0.46009090542793274,
0.041638828814029694,
0.0762426108121872,
-0.04913961887359619,
0.31570059061050415,
0.051702968776226044,
0.6557029485702515,
-0.009954921901226044,
-0.09525568038225174,
0.11578232795000076,
-0.3426855504512787,
0.09910189360380173,
0.07025787979364395,
-0.15773120522499084,
0.022370491176843643,
-0.04168027266860008,
-0.04419776424765587,
0.20164106786251068,
-0.06833451986312866,
-0.057170525193214417,
0.23745009303092957,
-0.048814449459314346,
-0.1406458467245102,
0.03893072158098221,
-0.20222216844558716,
-0.13887235522270203,
-0.5094866156578064,
0.30160966515541077,
0.028164850547909737,
-0.128951296210289,
0.005840633064508438,
0.029282912611961365,
0.2807447016239166,
-0.05012763291597366,
-0.04983457550406456,
0.083494171500206,
-0.11358536034822464,
-0.2807568311691284,
0.5495072603225708,
0.16660185158252716,
-0.15285174548625946,
-0.5171639323234558,
0.22302818298339844,
0.5155278444290161,
0.13014021515846252,
-0.24273213744163513,
0.11564619839191437,
0.27060338854789734,
-0.2726709842681885,
0.38280460238456726,
-0.10834313184022903,
-0.05496019870042801,
0.06671727448701859,
0.06635148823261261,
-0.1498883068561554,
-0.20306694507598877,
0.00034701451659202576,
-0.2384689897298813,
-0.061185065656900406,
-0.0635790005326271,
-0.22463545203208923,
0.08345512300729752,
-0.009310681372880936,
-0.39208313822746277,
0.0029279328882694244,
0.2973244786262512,
0.036953315138816833,
-0.05802541598677635,
0.067234568297863,
-0.20135283470153809,
0.3888041377067566,
0.16049712896347046,
-0.12817642092704773,
-0.20559434592723846,
-0.22001701593399048,
-0.18353141844272614,
0.09344775974750519,
0.1413726955652237,
-0.2600218951702118,
0.24912282824516296,
0.19451217353343964,
-0.08415552228689194,
-0.2929004430770874,
-0.11002734303474426,
-0.47574442625045776,
0.1957869827747345,
-0.25644466280937195,
-0.016351472586393356,
0.014886965975165367,
-0.025346504524350166,
-0.42781198024749756,
-0.10202912986278534,
0.0343128927052021,
-0.11448772251605988,
0.1415254771709442,
-0.28029197454452515,
-0.032877299934625626,
0.05129093676805496,
-0.28476518392562866,
0.17778727412223816,
-0.03999784588813782,
0.3042396306991577,
-0.5487374067306519,
0.06670434027910233,
-0.4623083472251892,
-0.22744983434677124,
-0.48073264956474304,
0.2997172176837921,
0.05942469835281372,
-0.02559332549571991,
-0.5072206854820251,
-0.4166651666164398,
0.13378745317459106,
0.10726237297058105,
-0.06639440357685089,
0.0001828353852033615,
0.27998796105384827,
0.027646593749523163,
-0.16417020559310913,
0.32966774702072144,
0.03420679271221161,
-0.11002172529697418,
-0.0985528752207756,
0.14596807956695557,
-0.25611552596092224,
0.2692089378833771,
-0.14410138130187988,
-0.32449018955230713,
-0.07670082151889801,
-0.023815909400582314,
0.023135561496019363,
-0.22854891419410706,
0.03472910821437836,
0.0748743861913681,
0.09231977164745331,
-0.10488846153020859,
-0.07135224342346191,
0.03957726061344147,
-0.20441116392612457,
-0.1953289657831192,
0.31420889496803284,
0.3352862000465393,
-0.40025466680526733,
-0.351968377828598,
-0.27292826771736145,
-0.5548417568206787,
0.4818034768104553,
-0.14903053641319275,
-0.09240979701280594,
0.04997752979397774,
0.04702756181359291,
0.1055966392159462,
0.49301156401634216,
0.1570604145526886,
-0.1823890060186386,
-0.03774435818195343,
-0.32426849007606506,
0.048873286694288254,
0.3383646011352539,
0.01898842304944992,
0.30056947469711304,
0.13813018798828125,
-0.15769222378730774,
-0.30237478017807007,
0.7045295834541321,
0.22326445579528809,
-0.03594387695193291,
0.034788183867931366,
0.22129230201244354,
0.2890366017818451,
0.19632554054260254,
-0.005157136358320713,
0.17919780313968658,
0.1580582857131958,
-0.34944355487823486,
0.03927236795425415,
-0.022123541682958603,
0.11284197866916656,
0.2741546630859375,
0.019925493746995926,
-0.1492031365633011,
-0.18577036261558533,
-0.0051588863134384155,
0.20518922805786133,
0.21684762835502625,
0.06965738534927368,
0.27057215571403503,
0.015457268804311752,
0.014753133058547974,
0.14990369975566864,
0.08689096570014954,
0.18832369148731232,
0.27079471945762634,
0.4090041220188141,
-0.32441237568855286,
-0.4757457375526428,
0.14636264741420746,
-0.008247476071119308,
0.4967692494392395,
0.31244778633117676,
0.11925867944955826,
0.41120046377182007,
0.2638063430786133,
1.1679073572158813,
-0.21857225894927979,
0.2166087031364441,
0.24698644876480103,
0.08770191669464111,
-0.1998641937971115,
-0.48201870918273926,
-0.4562116265296936,
-0.08378458768129349,
0.265109121799469,
0.2621895670890808,
-0.1808609664440155,
-0.181204155087471,
0.2296392321586609,
-0.09463764727115631,
-0.10615736246109009,
-0.47465217113494873,
-0.3367078900337219,
-0.39553341269493103,
0.36414939165115356,
0.17856615781784058,
0.028332257643342018,
-0.02062208577990532,
-0.20301410555839539,
-0.271867960691452,
-0.2557530701160431,
0.09807880967855453,
-0.02987895905971527,
-0.005738475359976292,
0.15312188863754272,
-0.16163527965545654,
0.06157110258936882,
0.6109379529953003,
0.06423240154981613,
0.25196027755737305,
0.06420256197452545,
-0.5061047673225403,
0.19540321826934814,
-0.04093625396490097,
-0.3315083086490631,
0.14868609607219696,
0.46754294633865356,
-0.0435560904443264,
-0.023148328065872192,
-0.03335908055305481,
0.14088526368141174,
-0.003741714172065258,
-0.24205204844474792,
0.3689683973789215,
0.00553353875875473,
-0.29179394245147705,
-0.2453864961862564,
0.6936021447181702,
-0.18499994277954102,
-0.3081677258014679,
-0.004312116652727127,
0.3812161087989807,
-0.2878376841545105,
0.8606345653533936,
0.24845322966575623,
1.0878504514694214,
-0.06843379139900208,
0.13627061247825623,
-0.007668524980545044,
-0.1831633448600769,
0.4024517834186554,
-0.20859500765800476,
0.23472672700881958,
-0.416319876909256,
-0.09984444826841354,
-0.1737683117389679,
-0.13505786657333374,
-0.3575214743614197,
0.5084706544876099,
-0.05026547610759735,
0.3532281517982483,
-0.08855938166379929,
-0.028010491281747818,
0.11356636881828308,
0.09163607656955719,
0.4454284608364105,
-0.1015603095293045,
-0.23628753423690796,
-0.038384757936000824,
0.2732483744621277,
0.34717804193496704,
-0.1548328995704651,
-0.05955979973077774,
0.11473119258880615,
-0.09376608580350876,
-0.30561724305152893,
-0.12309926748275757,
0.1350203901529312,
0.23774906992912292,
0.596858024597168,
-0.22700831294059753,
-0.1667979657649994,
-0.1047329306602478,
0.5608093738555908,
-0.3332357704639435,
-0.11651279032230377,
-0.05116793140769005,
0.40987879037857056,
0.054822370409965515,
0.09978440403938293,
-0.24003534018993378,
0.4137958288192749,
0.13988113403320312,
-0.39058586955070496,
-0.164850115776062,
0.0024677636101841927,
0.11720263957977295,
-0.29334378242492676,
0.042669665068387985,
-0.36704879999160767,
-0.11942651122808456,
0.12697602808475494,
0.0542832687497139,
0.17319627106189728,
-0.10759130120277405,
-0.01525818556547165,
0.27591317892074585,
-0.24650156497955322,
0.6874187588691711,
0.05325667932629585,
-0.5199985504150391,
-0.02964991331100464,
0.07240337878465652,
0.3525431752204895,
0.13330519199371338,
0.02422136440873146,
-0.0723085105419159,
-0.21900245547294617,
-0.03324846178293228,
-0.41199973225593567,
0.21196043491363525,
-0.0836995467543602,
0.3959651291370392,
0.012727731838822365,
0.014481335878372192,
-0.011426351964473724,
-0.12745539844036102,
0.06004796922206879,
-0.1624426543712616,
-0.5828799605369568,
-0.18202811479568481,
0.02139517106115818,
-0.017568834125995636,
0.08569031953811646,
0.36452004313468933,
-0.018708886578679085,
-0.22935423254966736,
0.03901609778404236,
-0.31605562567710876,
-0.15957823395729065,
-0.32168930768966675,
-0.28930750489234924,
0.28339439630508423,
-0.3228820264339447,
0.17565688490867615,
-0.1226782351732254,
-0.05542935058474541,
-0.05471516400575638,
0.04610123485326767,
-0.1090925857424736,
-0.004122627899050713,
0.008413895964622498,
0.22105471789836884,
0.1829683780670166,
0.1836368441581726,
-0.16993895173072815,
-0.04380166530609131,
-0.17100249230861664,
-0.02375870570540428,
-0.028747592121362686,
0.5818436741828918,
0.07387299835681915,
0.3687916696071625,
0.22461634874343872,
-0.04566755145788193,
0.10852570831775665,
0.2580298185348511,
0.1259962022304535,
0.30410289764404297,
0.0026270528323948383,
0.4426374137401581,
-0.18268337845802307,
-0.035002678632736206,
-0.10584257543087006,
0.1277916133403778,
-0.027740225195884705,
0.13211727142333984,
0.10576354712247849,
-0.17537854611873627,
-0.09495064616203308,
-0.005263584665954113,
0.10875408351421356,
0.36647829413414,
-0.34252724051475525,
-0.34853771328926086,
0.1282234489917755,
0.07785435765981674,
-0.098161980509758,
-0.07877165079116821,
0.18227165937423706,
-0.035383015871047974,
-0.159030944108963,
0.16783635318279266,
0.03533599153161049,
-0.3870275914669037,
-0.1926213949918747,
0.02824467420578003,
0.39487403631210327,
0.0312691330909729,
-0.4899244010448456,
-0.22377270460128784,
0.2902984917163849,
0.15630552172660828,
0.1586344987154007,
-0.12499362230300903,
0.17111743986606598,
0.5818679332733154,
0.16244134306907654,
0.1391310840845108,
-0.036025889217853546,
0.24977490305900574,
-0.29621773958206177,
-0.13859327137470245,
0.3591984808444977,
0.4962317645549774,
-0.31779253482818604,
0.07012312859296799,
0.1964794397354126,
0.07366575300693512,
0.08655576407909393,
0.07353808730840683,
0.0206593107432127,
-0.22921214997768402,
0.037022046744823456,
0.022315088659524918,
-0.15084901452064514,
0.1682177186012268,
0.10523349046707153,
0.13281765580177307,
0.0021785087883472443,
0.11947520077228546,
-0.027793191373348236,
0.17321258783340454,
-0.04506252706050873,
-0.07098811119794846,
-0.0273774191737175,
0.29305610060691833,
0.2030257284641266,
-0.01839526742696762,
-0.14309117197990417,
-0.1980169266462326,
0.15770971775054932,
0.3388197124004364,
0.27203062176704407,
0.2620839476585388,
0.43587157130241394,
-0.1678261011838913,
0.05272601172327995,
-0.09101802110671997,
-0.12902161478996277,
-0.1540764421224594,
0.01573791913688183,
-0.22967985272407532,
-0.18824240565299988,
0.06093812361359596,
0.0027875006198883057,
0.04170842841267586,
-0.10891138017177582,
-0.12026919424533844,
0.23780754208564758,
-0.10233116149902344,
0.07368576526641846,
0.1758265346288681,
-0.11364491283893585,
-0.19252631068229675,
0.1888754516839981,
-0.05332888290286064,
0.32005953788757324,
0.3009595572948456,
-0.06984809786081314,
0.2412293553352356,
0.1271773725748062,
-0.02452561818063259,
-0.25535187125205994,
0.21518449485301971,
0.4262215197086334,
0.34797999262809753,
-0.13115577399730682,
0.1695006638765335,
-0.19883906841278076,
0.05312809720635414,
-0.16448339819908142,
0.22720012068748474,
0.3382123112678528,
0.3163145184516907,
-0.307996928691864,
-0.20952601730823517,
0.46140778064727783,
0.5569140911102295,
0.03215017542243004,
0.5386587381362915,
0.1523466855287552,
-0.15548405051231384,
-0.463039755821228,
0.007362569682300091,
-0.0030433014035224915,
-0.337390273809433,
0.22706681489944458,
0.09241143614053726,
-0.03562578558921814,
-0.010150603950023651,
0.17224259674549103,
0.13127484917640686,
-0.2741599977016449,
0.33133313059806824,
0.33382606506347656,
-0.07329210638999939,
-0.048117972910404205,
0.1569274216890335,
-0.30592361092567444,
-0.039972394704818726,
-0.527050256729126,
-0.18931737542152405,
-0.2857976257801056,
-0.10782332718372345,
-0.2614031136035919,
-0.3345791697502136,
-0.10157230496406555,
0.24636384844779968,
0.26685547828674316,
0.041691336780786514,
-0.21556124091148376,
0.280027836561203,
-0.43845146894454956,
0.00029787205858156085,
-0.01899532601237297,
-0.08943022042512894,
0.17921292781829834,
0.023687252774834633,
-0.2966303825378418,
-0.28836584091186523,
0.5323398113250732,
-0.34433379769325256,
-0.1925089955329895,
-0.5042874813079834,
0.3939206600189209,
0.2632348835468292,
0.12758812308311462,
-0.6056139469146729,
-0.20959892868995667,
0.2696826159954071,
0.052232787013053894,
-0.4514892101287842,
-0.44457224011421204,
0.23028148710727692,
0.13784708082675934,
-0.13362576067447662,
-0.38928094506263733,
0.4234294295310974,
-0.013580042868852615,
0.15841740369796753,
-0.2815930247306824
] |
https://github.com/huggingface/datasets/issues/2175 | dataset.search_batch() function outputs all -1 indices sometime. | Hi !
No it happens sometimes to return -1, especially if your dataset is small.
If your dataset is big enough it shouldn't happen in my experience.
Ideally we should ignore all the -1 that are returned. It should be possible to change that in RAG's code | I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 47 | dataset.search_batch() function outputs all -1 indices sometime.
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
Hi !
No it happens sometimes to return -1, especially if your dataset is small.
If your dataset is big enough it shouldn't happen in my experience.
Ideally we should ignore all the -1 that are returned. It should be possible to change that in RAG's code | [
-0.01972270756959915,
-0.43228307366371155,
-0.0812414139509201,
0.047830671072006226,
0.21979737281799316,
-0.09081797301769257,
0.3115731179714203,
0.2803557515144348,
0.13101229071617126,
0.4431155323982239,
-0.25051581859588623,
-0.15310919284820557,
0.09101798385381699,
-0.07913549989461899,
-0.13578008115291595,
0.05326555669307709,
0.2860962748527527,
0.39474594593048096,
-0.10848356783390045,
-0.5481678247451782,
-0.3425455391407013,
0.06544609367847443,
-0.08873286843299866,
0.3915582299232483,
-0.25864285230636597,
0.23409457504749298,
0.011210115626454353,
-0.11451175063848495,
-0.259010374546051,
-0.4190976619720459,
0.5721327662467957,
-0.3347862958908081,
0.5025044679641724,
0.1503540575504303,
-0.00013128004502505064,
0.07663093507289886,
0.3688724637031555,
-0.06254646182060242,
-0.11172088980674744,
-0.16117803752422333,
-0.07398363947868347,
0.17447595298290253,
0.07250147312879562,
-0.03858361765742302,
0.05625516176223755,
-0.2273409068584442,
0.24820587038993835,
-0.11484130471944809,
-0.0062826573848724365,
0.22856879234313965,
0.022043488919734955,
0.02275162562727928,
-0.235611230134964,
0.005363572388887405,
0.6570584774017334,
-0.3688427805900574,
0.07228416949510574,
-0.07498173415660858,
0.4281030595302582,
0.0015934603288769722,
0.09914621710777283,
0.10381066799163818,
0.021078133955597878,
-0.0032235924154520035,
-0.2851937711238861,
0.2080060839653015,
0.6046983599662781,
-0.3206324577331543,
0.1641497015953064,
0.26899901032447815,
0.34006136655807495,
-0.05086134374141693,
-0.36053207516670227,
0.12148291617631912,
0.1793316751718521,
-0.037834346294403076,
-0.06862122565507889,
0.17956005036830902,
-0.09935876727104187,
0.25828978419303894,
-0.03508242964744568,
0.34495118260383606,
-0.29385116696357727,
0.11868788301944733,
0.05710699409246445,
0.35145217180252075,
0.06143360584974289,
0.14581842720508575,
0.17006438970565796,
0.2510417103767395,
0.2481173276901245,
0.12126998603343964,
0.11079312860965729,
0.23530560731887817,
-0.5594884157180786,
-0.014438178390264511,
0.23809018731117249,
-0.22684723138809204,
0.12218093127012253,
-0.31152278184890747,
-0.28448641300201416,
-0.016349975019693375,
-0.156819149851799,
-0.06942782551050186,
0.14001351594924927,
0.04118506237864494,
-0.09607566148042679,
0.12363141030073166,
0.3022826910018921,
-0.4449906349182129,
0.02966940775513649,
0.06451994925737381,
0.1423785537481308,
0.023324068635702133,
-0.04709247872233391,
0.13700968027114868,
0.04719776660203934,
-0.33748263120651245,
-0.36235541105270386,
-0.14188335835933685,
-0.3032473921775818,
0.1603071540594101,
-0.2624214291572571,
0.09670404344797134,
0.3457145690917969,
0.08321741223335266,
-0.10616223514080048,
0.14143100380897522,
-0.18223333358764648,
-0.03282632678747177,
-0.15938572585582733,
-0.1636711061000824,
-0.18206018209457397,
0.072258859872818,
0.0887962281703949,
-0.4495789408683777,
-0.2080676555633545,
0.10577589273452759,
-0.10523147881031036,
0.18181636929512024,
0.09216976165771484,
-0.1559050977230072,
0.38552457094192505,
0.523918867111206,
-0.14505897462368011,
0.3324650228023529,
0.11637341976165771,
0.08802033960819244,
-0.032930970191955566,
0.0009650737047195435,
0.036686092615127563,
-0.5844789743423462,
0.21380074322223663,
0.06069530174136162,
0.017486345022916794,
0.3481498062610626,
0.2698482871055603,
0.21742631494998932,
-0.24866122007369995,
0.38944992423057556,
-0.04299596697092056,
-0.434023916721344,
0.04429977759718895,
-0.05621906369924545,
0.2539735734462738,
0.13598734140396118,
-0.038729529827833176,
0.23696863651275635,
0.041999366134405136,
-0.23903435468673706,
0.16744598746299744,
0.2964872121810913,
0.05064581334590912,
0.28385603427886963,
-0.47021880745887756,
0.17726685106754303,
0.08938763290643692,
-0.30464601516723633,
-0.36888766288757324,
0.0061006392352283,
-0.24538442492485046,
-0.593649685382843,
0.05169540271162987,
0.27510085701942444,
0.3244096636772156,
0.1700240671634674,
0.26763272285461426,
0.25985395908355713,
-0.012801969423890114,
-0.12085606902837753,
-0.44102632999420166,
-0.0023126769810914993,
0.2443331778049469,
-0.06594707816839218,
0.3060711622238159,
0.2945915460586548,
0.06563912332057953,
-0.7135807871818542,
0.40239936113357544,
0.028054622933268547,
0.08393005281686783,
-0.12379255890846252,
0.3473556637763977,
0.0027057453989982605,
0.6791748404502869,
-0.03884519636631012,
-0.09127231687307358,
0.09931019693613052,
-0.36151498556137085,
0.08211833238601685,
0.04514026269316673,
-0.16413547098636627,
-0.013160676695406437,
-0.05660746991634369,
0.03501736745238304,
0.3031966984272003,
-0.07960255444049835,
-0.09478549659252167,
0.2517354488372803,
-0.1156875342130661,
-0.20332397520542145,
0.11155480891466141,
-0.1613626480102539,
-0.13035166263580322,
-0.5231325626373291,
0.28916192054748535,
0.04983184486627579,
-0.18920011818408966,
0.01715988665819168,
0.010507039725780487,
0.2565823793411255,
-0.08577536046504974,
-0.01810586266219616,
0.08277676999568939,
-0.21658650040626526,
-0.23118411004543304,
0.6152417659759521,
0.024523049592971802,
-0.20530085265636444,
-0.4379933178424835,
0.13902367651462555,
0.46313631534576416,
0.14799396693706512,
-0.19948866963386536,
0.22351577877998352,
0.28334349393844604,
-0.2941738963127136,
0.4283117353916168,
-0.18306832015514374,
0.0042767636477947235,
0.0652105063199997,
0.12076251208782196,
-0.13618095219135284,
-0.17156754434108734,
0.08418484777212143,
-0.18067330121994019,
-0.0789753645658493,
0.034361179918050766,
-0.23600852489471436,
0.05758214741945267,
-0.09352950751781464,
-0.393307089805603,
0.006413895636796951,
0.26766476035118103,
0.03749615699052811,
-0.0007018428295850754,
0.1316288858652115,
-0.20414939522743225,
0.35023537278175354,
0.17716389894485474,
-0.1632462441921234,
-0.22393956780433655,
-0.2237664759159088,
-0.14917775988578796,
0.074005126953125,
0.13702109456062317,
-0.19252102077007294,
0.16442427039146423,
0.2711198925971985,
-0.10441598296165466,
-0.3035338222980499,
-0.20416797697544098,
-0.4468975365161896,
0.28020501136779785,
-0.2310415357351303,
-0.021375272423028946,
-0.01573428139090538,
0.053657159209251404,
-0.3988630473613739,
-0.07043521106243134,
0.018924932926893234,
-0.04866921156644821,
0.15977129340171814,
-0.30131053924560547,
-0.014757856726646423,
0.0004011513665318489,
-0.12528447806835175,
0.20681232213974,
-0.020748961716890335,
0.33054298162460327,
-0.5354223251342773,
0.053975909948349,
-0.4510929584503174,
-0.22399871051311493,
-0.515510618686676,
0.23455877602100372,
0.04405142366886139,
-0.04453735798597336,
-0.48742324113845825,
-0.40513473749160767,
0.16485658288002014,
0.038943950086832047,
-0.11756026744842529,
-0.08932409435510635,
0.2565198242664337,
0.019446268677711487,
-0.17565469443798065,
0.2952636182308197,
-0.004065514542162418,
0.02318221889436245,
-0.13105584681034088,
0.2128731608390808,
-0.29882144927978516,
0.32438719272613525,
-0.22685857117176056,
-0.3331538140773773,
-0.03714265674352646,
-0.04388751834630966,
0.08109813928604126,
-0.3079705536365509,
0.0639728233218193,
0.016299579292535782,
0.09800207614898682,
-0.14629334211349487,
-0.07205750793218613,
-0.029819173738360405,
-0.16228319704532623,
-0.20979931950569153,
0.28254222869873047,
0.3656991720199585,
-0.3144036531448364,
-0.3057959973812103,
-0.21151705086231232,
-0.5170468091964722,
0.5374631285667419,
-0.13174651563167572,
-0.12139702588319778,
0.09753578901290894,
-0.01995130255818367,
0.08722163736820221,
0.44350647926330566,
0.09762239456176758,
-0.09278025478124619,
-0.03234755992889404,
-0.22072866559028625,
-0.09217725694179535,
0.3034673035144806,
0.036179911345243454,
0.32366570830345154,
0.07134382426738739,
-0.04286270588636398,
-0.27592384815216064,
0.6984182596206665,
0.1545127034187317,
-0.11293885111808777,
-0.03684452921152115,
0.18659481406211853,
0.13471749424934387,
0.15373557806015015,
0.03954646736383438,
0.21002201735973358,
0.18505646288394928,
-0.41417568922042847,
-0.059465184807777405,
-0.06316522508859634,
0.11154830455780029,
0.26092588901519775,
0.1311185359954834,
-0.08007612079381943,
-0.1254226714372635,
-0.025848327204585075,
0.2546733617782593,
0.22248956561088562,
0.046541403979063034,
0.17556414008140564,
-0.04448799788951874,
0.06487278640270233,
0.1899704933166504,
0.060181763023138046,
0.13947270810604095,
0.25213488936424255,
0.35751602053642273,
-0.5147718191146851,
-0.4327395558357239,
0.19615796208381653,
-0.03797490522265434,
0.38393184542655945,
0.2927119731903076,
0.1412983238697052,
0.48024672269821167,
0.26874589920043945,
1.2012726068496704,
-0.19943208992481232,
0.19689317047595978,
0.20904073119163513,
0.12120877206325531,
-0.2111746072769165,
-0.46620362997055054,
-0.3762187361717224,
0.1179501861333847,
0.262586385011673,
0.314095675945282,
-0.12139855325222015,
-0.22037701308727264,
0.3250310719013214,
0.004448986612260342,
-0.03416287899017334,
-0.5240986943244934,
-0.39977172017097473,
-0.38551923632621765,
0.4010043740272522,
0.21553823351860046,
-0.003957806155085564,
-0.007860815152525902,
-0.1093081533908844,
-0.34803664684295654,
-0.26817816495895386,
0.09217705577611923,
0.009328790009021759,
0.02109527215361595,
0.15828949213027954,
-0.09854844957590103,
0.07326239347457886,
0.5732539892196655,
0.0143447145819664,
0.02522028610110283,
0.006418853998184204,
-0.3854694366455078,
0.13186140358448029,
0.05194050818681717,
-0.28215017914772034,
0.1654084026813507,
0.3774566054344177,
-0.07210283726453781,
-0.04765557497739792,
-0.1110113114118576,
0.15195858478546143,
-0.03526487946510315,
-0.23692524433135986,
0.32075321674346924,
0.10408452153205872,
-0.255793958902359,
-0.2596053183078766,
0.6877686977386475,
-0.21667543053627014,
-0.2821054756641388,
0.039414215832948685,
0.28320592641830444,
-0.18124036490917206,
0.8766025304794312,
0.2455625832080841,
1.0091710090637207,
-0.1843688189983368,
0.07637552917003632,
0.004868535324931145,
-0.07803136855363846,
0.3902865946292877,
-0.1610206663608551,
0.32907456159591675,
-0.37453165650367737,
0.017898479476571083,
-0.15735234320163727,
-0.14096151292324066,
-0.43084830045700073,
0.4691515564918518,
0.010176841169595718,
0.33173519372940063,
-0.04967197775840759,
-0.1418052613735199,
0.11411559581756592,
0.01499660313129425,
0.4707394242286682,
-0.14380228519439697,
-0.2650112509727478,
-0.04568609595298767,
0.2187989503145218,
0.3855186700820923,
-0.12496969848871231,
-0.06349018216133118,
0.13405929505825043,
0.012397173792123795,
-0.264260470867157,
-0.20530831813812256,
0.1748221516609192,
0.24783527851104736,
0.6476368308067322,
-0.2919166684150696,
-0.18214529752731323,
-0.10853765904903412,
0.5909502506256104,
-0.2857287526130676,
-0.028766559436917305,
-0.1408560872077942,
0.3821341395378113,
0.06094156578183174,
0.060908328741788864,
-0.2160618156194687,
0.3016310930252075,
0.14599323272705078,
-0.413807213306427,
-0.06205446273088455,
0.05296675115823746,
0.14210358262062073,
-0.21849599480628967,
0.12493209540843964,
-0.29461508989334106,
-0.05889943987131119,
0.1669793725013733,
0.12281380593776703,
0.2005666047334671,
-0.1120925098657608,
-0.028054561465978622,
0.297649621963501,
-0.24429218471050262,
0.6148086190223694,
0.025306718423962593,
-0.5982123613357544,
0.001728244125843048,
0.005856849253177643,
0.35488951206207275,
0.11540582776069641,
-0.00001467391848564148,
-0.0747385323047638,
-0.1368253529071808,
-0.01884227618575096,
-0.4253595769405365,
0.2005564421415329,
-0.11144208908081055,
0.3863447904586792,
0.017143815755844116,
-0.0314246267080307,
-0.030569840222597122,
-0.1784033179283142,
0.0075119175016880035,
-0.12055958062410355,
-0.6033822894096375,
-0.12589579820632935,
-0.07300714403390884,
-0.04149424284696579,
0.05075753107666969,
0.28739774227142334,
0.034872256219387054,
-0.21759936213493347,
0.05424318462610245,
-0.42366698384284973,
-0.1410946547985077,
-0.32880789041519165,
-0.2730071544647217,
0.33940356969833374,
-0.32670754194259644,
0.07064378261566162,
-0.2071162909269333,
-0.01440395601093769,
-0.02593757025897503,
0.017540425062179565,
-0.17183077335357666,
-0.0019625406712293625,
0.06337355077266693,
0.22240355610847473,
0.14067162573337555,
0.23659513890743256,
-0.21387676894664764,
-0.015044398605823517,
-0.13107292354106903,
0.02328619360923767,
0.07188296318054199,
0.6227107644081116,
0.10438812524080276,
0.22323140501976013,
0.17872558534145355,
-0.11642032116651535,
0.07089725136756897,
0.15967011451721191,
0.1794397085905075,
0.1937544047832489,
0.019263261929154396,
0.4420151114463806,
-0.19103382527828217,
-0.03974836692214012,
-0.16645404696464539,
0.04113690182566643,
-0.10196681320667267,
0.10387879610061646,
0.04752177745103836,
-0.1832726150751114,
-0.0966234803199768,
0.05506299436092377,
0.05867923051118851,
0.284109890460968,
-0.32652944326400757,
-0.32526084780693054,
0.11672700941562653,
0.07482088357210159,
-0.07464037835597992,
0.022998400032520294,
0.11928491294384003,
0.04794808477163315,
-0.1677705943584442,
0.18031856417655945,
-0.09069956094026566,
-0.31600630283355713,
-0.13559168577194214,
0.0782521665096283,
0.4261499345302582,
0.06119580566883087,
-0.45276498794555664,
-0.3825872540473938,
0.2901517450809479,
0.14909128844738007,
0.19673584401607513,
-0.059132467955350876,
0.14515134692192078,
0.6113201379776001,
0.12175144255161285,
0.11075355857610703,
-0.011349696666002274,
0.19959601759910583,
-0.37152186036109924,
-0.13446074724197388,
0.3394748866558075,
0.5218443870544434,
-0.3490315079689026,
0.05087410658597946,
0.2930487394332886,
0.14314702153205872,
-0.0056756483390927315,
0.07803227007389069,
0.08070570975542068,
-0.2815239429473877,
0.019033685326576233,
0.029194001108407974,
-0.1254897117614746,
0.2548189163208008,
0.10087600350379944,
0.21515622735023499,
0.016999755054712296,
0.12448160350322723,
0.09943282604217529,
0.19514301419258118,
-0.059592753648757935,
-0.019255785271525383,
-0.14179357886314392,
0.43726828694343567,
0.15374188125133514,
0.04268615320324898,
-0.1426153928041458,
-0.23691333830356598,
0.09180624783039093,
0.3338097631931305,
0.2461560070514679,
0.24343019723892212,
0.43061956763267517,
-0.19360242784023285,
0.15575268864631653,
-0.1435738056898117,
-0.1213180273771286,
-0.1625489443540573,
-0.10959485173225403,
-0.2291339635848999,
-0.07069271802902222,
-0.02579856850206852,
0.016409048810601234,
0.04099618270993233,
-0.08405992388725281,
-0.09742352366447449,
0.3490951359272003,
-0.13540828227996826,
0.034718096256256104,
0.18588070571422577,
-0.04556996375322342,
-0.2363215684890747,
0.15765103697776794,
-0.11875423789024353,
0.3110809922218323,
0.20127888023853302,
-0.09697305411100388,
0.12268177419900894,
0.09820285439491272,
-0.02625100687146187,
-0.29524803161621094,
0.14855822920799255,
0.40279802680015564,
0.3613179624080658,
-0.15471971035003662,
0.22386865317821503,
-0.12677854299545288,
0.09003500640392303,
-0.14114417135715485,
0.29088109731674194,
0.36006978154182434,
0.33624860644340515,
-0.3147237300872803,
-0.1618637889623642,
0.45264989137649536,
0.5721444487571716,
-0.023368189111351967,
0.5273840427398682,
0.13731469213962555,
-0.06444959342479706,
-0.4177998900413513,
-0.02030189149081707,
-0.006660982966423035,
-0.25974318385124207,
0.323943555355072,
0.10098592191934586,
-0.01860770769417286,
0.04593413695693016,
0.0946531891822815,
0.1754491627216339,
-0.25596392154693604,
0.35420143604278564,
0.22559459507465363,
-0.10320135951042175,
0.040559664368629456,
0.18071116507053375,
-0.32970115542411804,
-0.07462650537490845,
-0.46741610765457153,
-0.23278677463531494,
-0.25862398743629456,
-0.11156823486089706,
-0.22861544787883759,
-0.2888632118701935,
-0.08950591832399368,
0.31013742089271545,
0.22965238988399506,
0.07008321583271027,
-0.13511165976524353,
0.28065893054008484,
-0.4428522288799286,
-0.0036482710856944323,
-0.020424583926796913,
-0.07586576789617538,
0.2608933448791504,
-0.031625114381313324,
-0.3340320587158203,
-0.2992796301841736,
0.48455655574798584,
-0.3352624475955963,
-0.25522565841674805,
-0.45491451025009155,
0.4566246569156647,
0.3513983488082886,
0.1830567717552185,
-0.6376392245292664,
-0.23750793933868408,
0.1805984079837799,
0.03408043831586838,
-0.38833722472190857,
-0.45419183373451233,
0.2193973809480667,
0.13353818655014038,
-0.14331096410751343,
-0.4149547815322876,
0.4335041642189026,
0.034969866275787354,
0.2382240891456604,
-0.3442326784133911
] |
https://github.com/huggingface/datasets/issues/2175 | dataset.search_batch() function outputs all -1 indices sometime. | I also checked with some indexes it returns more -1s. Specially with IVF
when nprobr is very low. It doesn't happen when using HNSW though. But at
the moment if it happens, dataset will always return the last element.
Maybe we should change it to repeat the most last valid retrieved doc id.
What do you think?
On Wed, Apr 7, 2021, 21:09 Quentin Lhoest ***@***.***> wrote:
> Hi !
> No it happens sometimes to return -1, especially if your dataset is small.
> If your dataset is big enough it shouldn't happen.
>
> Ideally we should ignore all the -1 that are returned. It should be
> possible to change that in RAG's code
>
> β
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2175#issuecomment-814746509>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEA4FGTENOTLBEZTXEO2RS3THQOMPANCNFSM42PRVYDA>
> .
>
| I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 150 | dataset.search_batch() function outputs all -1 indices sometime.
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
I also checked with some indexes it returns more -1s. Specially with IVF
when nprobr is very low. It doesn't happen when using HNSW though. But at
the moment if it happens, dataset will always return the last element.
Maybe we should change it to repeat the most last valid retrieved doc id.
What do you think?
On Wed, Apr 7, 2021, 21:09 Quentin Lhoest ***@***.***> wrote:
> Hi !
> No it happens sometimes to return -1, especially if your dataset is small.
> If your dataset is big enough it shouldn't happen.
>
> Ideally we should ignore all the -1 that are returned. It should be
> possible to change that in RAG's code
>
> β
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2175#issuecomment-814746509>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEA4FGTENOTLBEZTXEO2RS3THQOMPANCNFSM42PRVYDA>
> .
>
| [
-0.035219706594944,
-0.3799373209476471,
-0.04781666025519371,
0.0425722636282444,
0.15346083045005798,
-0.08229702711105347,
0.2974614202976227,
0.35949450731277466,
0.15454937517642975,
0.4000557065010071,
-0.27196386456489563,
-0.135530486702919,
0.1801844835281372,
-0.11624766141176224,
-0.10425343364477158,
0.017687171697616577,
0.25105223059654236,
0.41170066595077515,
-0.02389354258775711,
-0.5655052065849304,
-0.34729284048080444,
0.055417656898498535,
-0.16217035055160522,
0.35666143894195557,
-0.27974092960357666,
0.2079564929008484,
-0.026015182957053185,
-0.11031044274568558,
-0.2564624845981598,
-0.476681113243103,
0.5943058133125305,
-0.2659982740879059,
0.48454412817955017,
0.1558331847190857,
-0.00013153976760804653,
0.0446876585483551,
0.387367844581604,
-0.008837820962071419,
-0.1438094526529312,
-0.18188785016536713,
-0.10905927419662476,
0.14462368190288544,
0.043235309422016144,
-0.05545405298471451,
0.02365252375602722,
-0.24602879583835602,
0.230086088180542,
-0.14839643239974976,
-0.023396208882331848,
0.2602907121181488,
0.004412170499563217,
0.10530588775873184,
-0.16525518894195557,
0.041458237916231155,
0.6535950899124146,
-0.29395920038223267,
0.08501962572336197,
-0.05077729746699333,
0.46108970046043396,
-0.03460905700922012,
0.0753294974565506,
0.1881505846977234,
-0.0013297218829393387,
0.016123387962579727,
-0.23802044987678528,
0.29589682817459106,
0.5326966047286987,
-0.29213961958885193,
0.2075953483581543,
0.31359443068504333,
0.4642094373703003,
-0.05972167104482651,
-0.3771155774593353,
0.041651561856269836,
0.19934824109077454,
-0.040703870356082916,
-0.011101879179477692,
0.1670995056629181,
-0.09562963247299194,
0.2709481716156006,
-0.04237368702888489,
0.3521001636981964,
-0.326437383890152,
0.21921396255493164,
0.05221359431743622,
0.2759841978549957,
0.009274741634726524,
0.10889388620853424,
0.20604519546031952,
0.22900432348251343,
0.2474696785211563,
0.06325893104076385,
0.07850541919469833,
0.2596685588359833,
-0.5432365536689758,
-0.044798851013183594,
0.23111343383789062,
-0.14917585253715515,
0.16837337613105774,
-0.3305644989013672,
-0.2783353924751282,
-0.045158639550209045,
-0.1775638312101364,
-0.10954201966524124,
0.22848792374134064,
0.06025167927145958,
-0.0660795196890831,
0.1812397539615631,
0.2954424023628235,
-0.42745378613471985,
0.012169837951660156,
0.03891422227025032,
0.17582611739635468,
0.008305366151034832,
-0.03586840629577637,
0.08133670687675476,
0.06190826743841171,
-0.36790189146995544,
-0.3316135108470917,
-0.10074027627706528,
-0.2808181643486023,
0.16298706829547882,
-0.27309566736221313,
0.13170309364795685,
0.36346718668937683,
0.14635947346687317,
-0.08048471063375473,
0.1096707358956337,
-0.20689766108989716,
-0.06222189590334892,
-0.11175401508808136,
-0.17695699632167816,
-0.2272161990404129,
0.09364563971757889,
0.10303695499897003,
-0.4674133360385895,
-0.21224449574947357,
0.11815602332353592,
-0.10834109783172607,
0.16801734268665314,
0.06290262937545776,
-0.15997128188610077,
0.434266060590744,
0.5060640573501587,
-0.16512350738048553,
0.33694785833358765,
0.10495735704898834,
0.021529845893383026,
-0.07375247031450272,
-0.015577040612697601,
0.004088126122951508,
-0.5431574583053589,
0.14118871092796326,
0.0422842837870121,
0.08652564138174057,
0.273459792137146,
0.2544466555118561,
0.2392122447490692,
-0.19346001744270325,
0.3121081292629242,
0.0012690499424934387,
-0.4304848909378052,
-0.02927505411207676,
-0.018434269353747368,
0.21376362442970276,
0.24217377603054047,
-0.06267417222261429,
0.2080489695072174,
-0.000285404734313488,
-0.12124873697757721,
0.11994311958551407,
0.3533528745174408,
0.033883243799209595,
0.3021080791950226,
-0.5125039219856262,
0.2115641087293625,
0.052959516644477844,
-0.4102326035499573,
-0.48001301288604736,
0.08528807014226913,
-0.2135845273733139,
-0.49504050612449646,
0.04508174583315849,
0.2997731566429138,
0.3912862241268158,
0.15242056548595428,
0.1798938512802124,
0.21902477741241455,
-0.009427690878510475,
-0.12385094910860062,
-0.47381144762039185,
-0.020302481949329376,
0.1659637689590454,
-0.06414459645748138,
0.29357683658599854,
0.29891058802604675,
0.059112194925546646,
-0.6651153564453125,
0.5013080835342407,
0.04303405433893204,
0.065995953977108,
-0.11302682757377625,
0.3581511378288269,
0.007445238530635834,
0.642655611038208,
-0.05027441307902336,
-0.17803046107292175,
0.09409981220960617,
-0.2164573073387146,
0.09103643894195557,
0.030363701283931732,
-0.19744710624217987,
-0.006567591801285744,
-0.07601839303970337,
-0.013374913483858109,
0.26695507764816284,
-0.10852057486772537,
-0.08451314270496368,
0.23474445939064026,
-0.11799751222133636,
-0.2005397081375122,
0.13963575661182404,
-0.19236457347869873,
-0.11655061691999435,
-0.5885258316993713,
0.2917744815349579,
0.0471419021487236,
-0.12169758975505829,
0.012312836945056915,
-0.0259518101811409,
0.24526867270469666,
-0.06732437014579773,
-0.014078225940465927,
0.07870684564113617,
-0.16227376461029053,
-0.23377250134944916,
0.6361720561981201,
0.08797500282526016,
-0.1430281549692154,
-0.4997422695159912,
0.16861023008823395,
0.4223235547542572,
0.10806141048669815,
-0.1674080491065979,
0.08559590578079224,
0.2818096876144409,
-0.24994589388370514,
0.3955380916595459,
-0.17104056477546692,
0.00013914890587329865,
0.002746211364865303,
0.10905693471431732,
-0.16799956560134888,
-0.2835787832736969,
0.0963125228881836,
-0.16645151376724243,
0.02760607749223709,
0.00021679513156414032,
-0.23649626970291138,
0.15795978903770447,
0.04165229946374893,
-0.4263928532600403,
-0.0353490486741066,
0.3183257579803467,
0.045765768736600876,
-0.04293031245470047,
0.08152320981025696,
-0.181658074259758,
0.32003355026245117,
0.2101311981678009,
-0.11901356279850006,
-0.19370006024837494,
-0.21151256561279297,
-0.14239080250263214,
0.14881038665771484,
0.13081470131874084,
-0.2229638397693634,
0.21952354907989502,
0.23868626356124878,
-0.06704086065292358,
-0.3496907651424408,
-0.17298442125320435,
-0.44608163833618164,
0.2864305377006531,
-0.2928536832332611,
-0.02588651329278946,
-0.017516231164336205,
0.007254164665937424,
-0.3990919888019562,
-0.17141303420066833,
0.012936586514115334,
-0.09544667601585388,
0.1556204855442047,
-0.29625624418258667,
0.037246476858854294,
0.028577430173754692,
-0.1710752248764038,
0.27111342549324036,
-0.0011822748929262161,
0.31992968916893005,
-0.5916762948036194,
0.07578817009925842,
-0.4536621570587158,
-0.23656484484672546,
-0.41730913519859314,
0.2427256852388382,
0.09158433973789215,
-0.05344672501087189,
-0.4779876470565796,
-0.4758245050907135,
0.0625491812825203,
0.08820328116416931,
-0.0828448012471199,
-0.003301706165075302,
0.28535374999046326,
0.024389095604419708,
-0.17910194396972656,
0.2776327133178711,
-0.040696144104003906,
-0.05962724983692169,
-0.134344220161438,
0.1894850730895996,
-0.28427520394325256,
0.338792622089386,
-0.14258959889411926,
-0.3792663812637329,
-0.03558902442455292,
-0.04846150800585747,
0.04924424737691879,
-0.3014897108078003,
0.08412919193506241,
0.13592937588691711,
0.09262052923440933,
-0.12237659841775894,
-0.05795669928193092,
-0.05898842215538025,
-0.19917887449264526,
-0.26595911383628845,
0.2765996754169464,
0.352511465549469,
-0.3270428478717804,
-0.3649880588054657,
-0.20875521004199982,
-0.4985119700431824,
0.4951012134552002,
-0.2142508178949356,
-0.08981629461050034,
0.04952645301818848,
0.07541607320308685,
0.09162396192550659,
0.4582165479660034,
0.09854964911937714,
-0.1285070776939392,
-0.033220816403627396,
-0.22225627303123474,
-0.006869617849588394,
0.28885069489479065,
0.005780035629868507,
0.26803505420684814,
0.1182752475142479,
-0.008581023663282394,
-0.28065726161003113,
0.6924853324890137,
0.24542444944381714,
-0.10943365097045898,
0.003299988806247711,
0.1748463660478592,
0.1834658682346344,
0.08504291623830795,
-0.0511145144701004,
0.18429213762283325,
0.12421360611915588,
-0.3602144122123718,
-0.0015487521886825562,
-0.02271173894405365,
0.12544766068458557,
0.26214176416397095,
0.06514796614646912,
-0.14087340235710144,
-0.19068139791488647,
0.0160576980561018,
0.27234339714050293,
0.1903144121170044,
0.06449359655380249,
0.20085927844047546,
-0.07139644026756287,
0.06262403726577759,
0.15907515585422516,
0.13085119426250458,
0.18897220492362976,
0.22790202498435974,
0.37488529086112976,
-0.3430369794368744,
-0.4709906578063965,
0.21466375887393951,
-0.037967171519994736,
0.37487301230430603,
0.29281988739967346,
0.16982439160346985,
0.47619765996932983,
0.26785027980804443,
1.238046407699585,
-0.22073256969451904,
0.23977376520633698,
0.210936039686203,
0.06847099214792252,
-0.13333365321159363,
-0.39338329434394836,
-0.38353824615478516,
0.053919244557619095,
0.2844853103160858,
0.29519277811050415,
-0.13072629272937775,
-0.24515829980373383,
0.3851926326751709,
-0.04329386353492737,
-0.02252020686864853,
-0.560254693031311,
-0.34472158551216125,
-0.3303624987602234,
0.3607953190803528,
0.21422143280506134,
-0.01675320789217949,
-0.03567193076014519,
-0.0863252654671669,
-0.3638101816177368,
-0.2606252133846283,
0.03192773088812828,
-0.004061110317707062,
-0.017243849113583565,
0.15695568919181824,
-0.03519909083843231,
0.12682892382144928,
0.5927979946136475,
0.05632371827960014,
0.13548026978969574,
0.046601552516222,
-0.4220660328865051,
0.11499351263046265,
0.0003930777311325073,
-0.3203991949558258,
0.1439979374408722,
0.45714572072029114,
-0.05280882865190506,
-0.04790913313627243,
-0.023441843688488007,
0.18166330456733704,
-0.04258688911795616,
-0.246225044131279,
0.34281229972839355,
0.12626396119594574,
-0.3059759736061096,
-0.30641528964042664,
0.7411087155342102,
-0.18553510308265686,
-0.267206609249115,
0.10693469643592834,
0.41091692447662354,
-0.2264973670244217,
0.7764759659767151,
0.2357635796070099,
1.0908914804458618,
-0.16599145531654358,
0.09715680778026581,
0.030479546636343002,
-0.11512412130832672,
0.4454537332057953,
-0.18034176528453827,
0.2873792052268982,
-0.40769243240356445,
-0.05889349430799484,
-0.16097189486026764,
-0.12203176319599152,
-0.38679105043411255,
0.49297451972961426,
-0.013428792357444763,
0.29153725504875183,
-0.03278538957238197,
-0.13029104471206665,
0.11764947324991226,
0.1352371871471405,
0.4263618588447571,
-0.17747250199317932,
-0.34942346811294556,
-0.06464515626430511,
0.19640986621379852,
0.3611919581890106,
-0.08172603696584702,
-0.055619291961193085,
0.16964763402938843,
-0.06552065908908844,
-0.30799779295921326,
-0.1957833468914032,
0.1668447107076645,
0.24838115274906158,
0.6050922870635986,
-0.273513525724411,
-0.09261536598205566,
-0.11077547073364258,
0.551693320274353,
-0.2731854021549225,
-0.08252953737974167,
-0.10574313998222351,
0.36893677711486816,
0.08189563453197479,
0.10001450031995773,
-0.2633994519710541,
0.4028354585170746,
0.14852404594421387,
-0.4183519184589386,
-0.12641450762748718,
0.09185349196195602,
0.10447412729263306,
-0.1990513801574707,
0.039983976632356644,
-0.2782662510871887,
-0.12740449607372284,
0.14786376059055328,
0.11528873443603516,
0.17040210962295532,
-0.12565268576145172,
-0.04173353686928749,
0.2570221424102783,
-0.228367418050766,
0.6009514331817627,
0.022977981716394424,
-0.5520161986351013,
-0.025827661156654358,
0.07556316256523132,
0.33898991346359253,
0.09003137052059174,
0.024029366672039032,
-0.006329674273729324,
-0.18687574565410614,
-0.03732934221625328,
-0.3733905851840973,
0.2717146575450897,
-0.19180266559123993,
0.364374577999115,
0.030978349968791008,
0.014221414923667908,
-0.002592136850580573,
-0.16661562025547028,
-0.006824515759944916,
-0.13688448071479797,
-0.6075827479362488,
-0.1545446813106537,
-0.09805218130350113,
0.0054502785205841064,
0.05850799381732941,
0.3379844129085541,
0.052597083151340485,
-0.1713053286075592,
0.02459629811346531,
-0.3661864399909973,
-0.14175739884376526,
-0.3039376139640808,
-0.20612511038780212,
0.30664756894111633,
-0.283474862575531,
0.07533201575279236,
-0.14921003580093384,
-0.07444757223129272,
-0.03822651877999306,
0.012811107560992241,
-0.15304173529148102,
0.005913134664297104,
0.028461605310440063,
0.23105083405971527,
0.12683407962322235,
0.1678781509399414,
-0.1572226881980896,
-0.04145253449678421,
-0.18512330949306488,
-0.0511416494846344,
0.09290453791618347,
0.6247403025627136,
0.13844868540763855,
0.22746799886226654,
0.17121654748916626,
-0.1496950387954712,
0.09279954433441162,
0.17316089570522308,
0.17579469084739685,
0.19084475934505463,
0.033691637217998505,
0.4374406635761261,
-0.21290329098701477,
-0.011223576962947845,
-0.1696380078792572,
0.1339256763458252,
-0.05126330256462097,
0.08515198528766632,
0.08768100291490555,
-0.19784022867679596,
-0.1283256709575653,
0.05891144275665283,
0.11641593277454376,
0.31777751445770264,
-0.3164217174053192,
-0.38021332025527954,
0.06903466582298279,
0.05892490595579147,
-0.11550111323595047,
-0.05409398302435875,
0.12887950241565704,
0.008974911645054817,
-0.1514481157064438,
0.1617995649576187,
-0.081563800573349,
-0.33973968029022217,
-0.14525224268436432,
0.03110503777861595,
0.48147183656692505,
0.01691448502242565,
-0.4494761824607849,
-0.2749437093734741,
0.25504082441329956,
0.1599334180355072,
0.1452343910932541,
-0.05679818615317345,
0.14409548044204712,
0.6504955291748047,
0.06116823852062225,
0.09515508264303207,
-0.004495095461606979,
0.25468626618385315,
-0.3507915735244751,
-0.12052631378173828,
0.393899142742157,
0.5549638271331787,
-0.3658360242843628,
0.11447492986917496,
0.30323874950408936,
0.05907868593931198,
0.049813952296972275,
0.03475113958120346,
0.025807933881878853,
-0.2654341161251068,
0.05352668836712837,
0.04506109654903412,
-0.16811051964759827,
0.2421640157699585,
0.07187706232070923,
0.22194209694862366,
-0.06125841662287712,
0.13216853141784668,
0.05729725956916809,
0.19272810220718384,
-0.059372007846832275,
-0.09587158262729645,
-0.10272706300020218,
0.34660282731056213,
0.24140334129333496,
-0.020310120657086372,
-0.09241616725921631,
-0.22608338296413422,
0.14130039513111115,
0.28348973393440247,
0.28587302565574646,
0.25776049494743347,
0.4385702610015869,
-0.10071487724781036,
0.13427194952964783,
-0.14036160707473755,
-0.11256922036409378,
-0.14826466143131256,
-0.07069344818592072,
-0.25386959314346313,
-0.1201610118150711,
0.006401484832167625,
-0.00043757911771535873,
0.06681196391582489,
-0.11400341987609863,
-0.06170102581381798,
0.33199766278266907,
-0.21305978298187256,
-0.04383217543363571,
0.17632031440734863,
-0.07996395230293274,
-0.2092103362083435,
0.18145763874053955,
-0.08621877431869507,
0.3858223557472229,
0.23779454827308655,
-0.07247942686080933,
0.13833129405975342,
0.10767742246389389,
-0.0228732917457819,
-0.2899654507637024,
0.1609802097082138,
0.4326784014701843,
0.34097757935523987,
-0.18194255232810974,
0.1936616152524948,
-0.1942359358072281,
0.06957582384347916,
-0.12000666558742523,
0.19690243899822235,
0.3757030963897705,
0.2980351448059082,
-0.2654167711734772,
-0.18848221004009247,
0.4569738507270813,
0.523451030254364,
-0.03456275165081024,
0.5137478709220886,
0.15784554183483124,
-0.08581128716468811,
-0.44820648431777954,
0.0031464286148548126,
-0.042922113090753555,
-0.32786205410957336,
0.3053082227706909,
0.13650348782539368,
-0.06282781064510345,
0.004430260509252548,
0.21339398622512817,
0.161473348736763,
-0.25663313269615173,
0.3023572564125061,
0.2806190252304077,
-0.0812230259180069,
-0.004102744162082672,
0.1284439116716385,
-0.3599645495414734,
-0.07007957249879837,
-0.5363723635673523,
-0.12719467282295227,
-0.19235441088676453,
-0.06236809119582176,
-0.20787473022937775,
-0.35852304100990295,
-0.10561651736497879,
0.23349124193191528,
0.2771334648132324,
0.12714575231075287,
-0.18196086585521698,
0.2790573835372925,
-0.43901780247688293,
0.01582278497517109,
-0.06368961185216904,
-0.017800413072109222,
0.24501538276672363,
0.017569100484251976,
-0.34336036443710327,
-0.3317609429359436,
0.49126964807510376,
-0.4107954800128937,
-0.23063144087791443,
-0.4675195813179016,
0.4894462823867798,
0.3603947162628174,
0.1244175061583519,
-0.6537603139877319,
-0.26109594106674194,
0.23949755728244781,
0.022653160616755486,
-0.44192925095558167,
-0.3901978135108948,
0.24655957520008087,
0.15129190683364868,
-0.14034372568130493,
-0.31272631883621216,
0.476462721824646,
-0.029866069555282593,
0.22197800874710083,
-0.3673062324523926
] |
https://github.com/huggingface/datasets/issues/2175 | dataset.search_batch() function outputs all -1 indices sometime. | That would be an easy way to workaround this issue. Feel free to open a PR on `transformers` and ping me ! :) | I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 23 | dataset.search_batch() function outputs all -1 indices sometime.
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
That would be an easy way to workaround this issue. Feel free to open a PR on `transformers` and ping me ! :) | [
-0.02550804801285267,
-0.43428903818130493,
-0.06778901815414429,
0.07370905578136444,
0.255720853805542,
-0.08688485622406006,
0.3684980571269989,
0.28312602639198303,
0.0772833377122879,
0.45287108421325684,
-0.22231824696063995,
-0.19843144714832306,
0.04483785852789879,
-0.06366007030010223,
-0.12569977343082428,
-0.0068470798432827,
0.2816346287727356,
0.4138689637184143,
-0.15383601188659668,
-0.5060522556304932,
-0.2846679091453552,
0.0919228121638298,
-0.09964677691459656,
0.3383357524871826,
-0.2817491292953491,
0.2458031177520752,
0.019946793094277382,
-0.18877127766609192,
-0.22535914182662964,
-0.43201881647109985,
0.5846903324127197,
-0.30236873030662537,
0.48349520564079285,
0.2854866683483124,
-0.00013205329014454037,
0.13871414959430695,
0.4092566967010498,
-0.06083287298679352,
-0.09312953054904938,
-0.1343979388475418,
-0.11204660683870316,
0.18533769249916077,
0.07721095532178879,
-0.06904096901416779,
0.0472479984164238,
-0.21811598539352417,
0.25363829731941223,
-0.09573039412498474,
0.03744988888502121,
0.20918306708335876,
0.022284144535660744,
0.029792480170726776,
-0.21286572515964508,
-0.014026799239218235,
0.6179969906806946,
-0.2804867625236511,
0.028513072058558464,
-0.11675217747688293,
0.45197156071662903,
-0.011791856028139591,
0.107200987637043,
0.11908932030200958,
0.02617744915187359,
-0.02737802267074585,
-0.27427828311920166,
0.17519602179527283,
0.6338202357292175,
-0.30519217252731323,
0.14543932676315308,
0.27702251076698303,
0.3461787700653076,
-0.06269213557243347,
-0.3898916244506836,
0.11321110278367996,
0.1292073279619217,
0.05412593483924866,
-0.054993174970149994,
0.1394113451242447,
-0.10221658647060394,
0.230733260512352,
-0.06319966167211533,
0.331614226102829,
-0.32487383484840393,
0.09697489440441132,
0.06603004038333893,
0.40786534547805786,
0.0728810653090477,
0.11874637007713318,
0.15528227388858795,
0.22170837223529816,
0.34523940086364746,
0.1692686825990677,
0.13844425976276398,
0.256441205739975,
-0.5704569220542908,
-0.03286837413907051,
0.24766799807548523,
-0.30400022864341736,
0.09140455722808838,
-0.36675071716308594,
-0.29848021268844604,
-0.001198694109916687,
-0.13106954097747803,
-0.07309805601835251,
0.15728811919689178,
0.0958084762096405,
-0.15557384490966797,
0.19059599936008453,
0.2899274528026581,
-0.402550607919693,
0.04731552675366402,
0.057168055325746536,
0.13300219178199768,
-0.03414725139737129,
-0.05523582920432091,
0.16393634676933289,
0.05718079209327698,
-0.30145561695098877,
-0.30655455589294434,
-0.18735253810882568,
-0.2294141948223114,
0.1778840571641922,
-0.23364365100860596,
0.1199393942952156,
0.3631219267845154,
0.10389041900634766,
-0.11397171020507812,
0.12860853970050812,
-0.2179737687110901,
0.008041144348680973,
-0.1513519287109375,
-0.17660678923130035,
-0.16284775733947754,
0.026883620768785477,
0.12775486707687378,
-0.3845347464084625,
-0.22268083691596985,
0.07982754707336426,
-0.049985118210315704,
0.18834376335144043,
0.09104388952255249,
-0.12834717333316803,
0.37650004029273987,
0.5422129034996033,
-0.18059194087982178,
0.345710426568985,
0.1473207175731659,
0.06484100222587585,
-0.052305154502391815,
0.0569305345416069,
0.06233098357915878,
-0.563572108745575,
0.21310150623321533,
0.04297923669219017,
-0.0099192438647151,
0.3326793313026428,
0.24447306990623474,
0.2408258616924286,
-0.22675246000289917,
0.3575466573238373,
-0.0646779015660286,
-0.4154816269874573,
0.07505612075328827,
-0.04825454205274582,
0.27193742990493774,
0.1570003181695938,
-0.07592092454433441,
0.1987420916557312,
0.0016798004508018494,
-0.2054326832294464,
0.14765478670597076,
0.30990272760391235,
0.03141409158706665,
0.2916763126850128,
-0.4581267535686493,
0.13962328433990479,
0.0980171486735344,
-0.3492687940597534,
-0.4021480977535248,
-0.013870708644390106,
-0.24244612455368042,
-0.6214392185211182,
0.05720683932304382,
0.28994375467300415,
0.3333924114704132,
0.21205346286296844,
0.19558756053447723,
0.230258047580719,
-0.0019290894269943237,
-0.05027518421411514,
-0.43435367941856384,
-0.08752727508544922,
0.24553656578063965,
-0.06732913106679916,
0.3384166955947876,
0.3327718675136566,
0.05422035977244377,
-0.6487195491790771,
0.3746264576911926,
0.02771439589560032,
0.1122424453496933,
-0.042545877397060394,
0.3574844300746918,
-0.04908125102519989,
0.6802942752838135,
-0.05697651952505112,
-0.09947080165147781,
0.10984223335981369,
-0.40440455079078674,
0.11555667221546173,
-0.07530103623867035,
-0.16746197640895844,
-0.044362179934978485,
-0.028872866183519363,
0.051601532846689224,
0.25742343068122864,
-0.08350339531898499,
-0.13589033484458923,
0.22323757410049438,
-0.17380410432815552,
-0.20038866996765137,
0.08077342808246613,
-0.05301646515727043,
-0.18518897891044617,
-0.5225935578346252,
0.2937072515487671,
0.004301898181438446,
-0.204010009765625,
-0.002849757671356201,
-0.011327661573886871,
0.2704212963581085,
-0.10439780354499817,
-0.0470288060605526,
0.11629009246826172,
-0.2604333162307739,
-0.18677552044391632,
0.6034037470817566,
0.09498211741447449,
-0.2119154930114746,
-0.5101860761642456,
0.13084228336811066,
0.5453124642372131,
0.13325177133083344,
-0.19132593274116516,
0.11681504547595978,
0.28060847520828247,
-0.29843467473983765,
0.4549020230770111,
-0.12230774760246277,
0.03253054618835449,
0.08066947013139725,
0.09504532814025879,
-0.12913349270820618,
-0.1698797196149826,
0.058539777994155884,
-0.1538616120815277,
-0.10189871490001678,
0.057614948600530624,
-0.1809530258178711,
0.07244595140218735,
-0.07085613906383514,
-0.37152230739593506,
0.02882322669029236,
0.23722946643829346,
0.02135368064045906,
0.00449439138174057,
0.10276320576667786,
-0.17429973185062408,
0.34186697006225586,
0.1591803878545761,
-0.1636030524969101,
-0.23215189576148987,
-0.199249267578125,
-0.1335536688566208,
0.06522312760353088,
0.14955615997314453,
-0.2263542264699936,
0.1603022962808609,
0.2735203802585602,
-0.12977375090122223,
-0.2528555393218994,
-0.22568801045417786,
-0.3778073191642761,
0.29277339577674866,
-0.26154273748397827,
0.006166474893689156,
-0.0009528715163469315,
0.08383522182703018,
-0.4358869194984436,
-0.08726824074983597,
-0.037238504737615585,
-0.041308578103780746,
0.1497713029384613,
-0.26325491070747375,
-0.030502164736390114,
0.037662312388420105,
-0.14379218220710754,
0.20316490530967712,
0.033475056290626526,
0.2562788724899292,
-0.5662107467651367,
0.040600042790174484,
-0.4012901484966278,
-0.22675609588623047,
-0.5071387887001038,
0.2500787675380707,
-0.042826421558856964,
-0.0016551893204450607,
-0.4777209758758545,
-0.3937187194824219,
0.15535545349121094,
0.03707649186253548,
-0.0991733968257904,
-0.04532342404127121,
0.23881486058235168,
0.03617217391729355,
-0.17806023359298706,
0.24430401623249054,
-0.0010672480566427112,
-0.05499638617038727,
-0.12762847542762756,
0.21739326417446136,
-0.3013995587825775,
0.3282201290130615,
-0.210544615983963,
-0.3242875337600708,
-0.042646244168281555,
-0.09069602191448212,
0.07543081790208817,
-0.2990776300430298,
0.09413856267929077,
0.07478626072406769,
0.12886203825473785,
-0.16662171483039856,
-0.009845104068517685,
-0.019110606983304024,
-0.1045617163181305,
-0.17942403256893158,
0.33828556537628174,
0.3333112299442291,
-0.32823631167411804,
-0.3087780773639679,
-0.2162126898765564,
-0.4937136173248291,
0.5283081531524658,
-0.09281889349222183,
-0.015731992200016975,
0.0018389280885457993,
-0.06919436156749725,
0.09960804879665375,
0.46002447605133057,
0.19968295097351074,
-0.0514194518327713,
-0.038544945418834686,
-0.2258526086807251,
-0.08312074840068817,
0.300917387008667,
0.058152392506599426,
0.3111124336719513,
0.048288457095623016,
-0.05926510691642761,
-0.2736327350139618,
0.7122144103050232,
0.1361287534236908,
-0.09207126498222351,
-0.0344323068857193,
0.14910277724266052,
0.11367031931877136,
0.15927612781524658,
0.0019230283796787262,
0.16526564955711365,
0.2288835048675537,
-0.41039860248565674,
-0.06568203866481781,
-0.013313746079802513,
0.07730802893638611,
0.2662031352519989,
0.14297962188720703,
-0.12514647841453552,
-0.18105004727840424,
-0.01599842868745327,
0.251552939414978,
0.26697298884391785,
0.014394957572221756,
0.14633709192276,
-0.10241691768169403,
0.05649507790803909,
0.1641010046005249,
0.030996248126029968,
0.09247693419456482,
0.2320389598608017,
0.3905269503593445,
-0.46120232343673706,
-0.43913424015045166,
0.18567365407943726,
-0.04072492942214012,
0.43829429149627686,
0.2652526795864105,
0.1048690602183342,
0.4620370864868164,
0.2753228545188904,
1.2533448934555054,
-0.1682039350271225,
0.2443879246711731,
0.22858454287052155,
0.11216600239276886,
-0.24798353016376495,
-0.45340511202812195,
-0.3643164038658142,
0.09915351122617722,
0.24333688616752625,
0.28625714778900146,
-0.1009635329246521,
-0.27105727791786194,
0.34115666151046753,
-0.041764263063669205,
-0.07707501202821732,
-0.5282347798347473,
-0.3852574825286865,
-0.3984292447566986,
0.40096646547317505,
0.19334754347801208,
0.1002761721611023,
-0.0016867592930793762,
-0.09815505892038345,
-0.3518529236316681,
-0.29774442315101624,
0.05878544598817825,
-0.02353718876838684,
0.014629201963543892,
0.1803557276725769,
-0.08447787165641785,
0.05579641833901405,
0.6131932735443115,
-0.06639859825372696,
-0.005567898973822594,
-0.028414621949195862,
-0.33560043573379517,
0.12289513647556305,
0.10987334698438644,
-0.26993227005004883,
0.12300805747509003,
0.3907279968261719,
-0.06323755532503128,
-0.034763529896736145,
-0.03243892639875412,
0.13707418739795685,
-0.00382428802549839,
-0.24973753094673157,
0.31848710775375366,
0.10942932218313217,
-0.26249566674232483,
-0.2656925320625305,
0.6580672264099121,
-0.1930510252714157,
-0.2695932388305664,
-0.02071867138147354,
0.26560336351394653,
-0.19948731362819672,
0.928918182849884,
0.22118687629699707,
1.0775786638259888,
-0.2336357980966568,
0.12435354292392731,
-0.04022235423326492,
-0.0385022796690464,
0.3738059401512146,
-0.14778681099414825,
0.3885953426361084,
-0.40053626894950867,
-0.05798172205686569,
-0.1568463146686554,
-0.16926369071006775,
-0.4292778968811035,
0.47057241201400757,
-0.04536760598421097,
0.34100595116615295,
-0.09359285235404968,
-0.09927867352962494,
0.11523417383432388,
-0.01866219937801361,
0.5046883225440979,
-0.14514082670211792,
-0.23618173599243164,
-0.045321591198444366,
0.2728787660598755,
0.39184072613716125,
-0.13521169126033783,
-0.08271533250808716,
0.09072859585285187,
-0.018759455531835556,
-0.2966330051422119,
-0.15877202153205872,
0.21263262629508972,
0.33339059352874756,
0.6535942554473877,
-0.27585455775260925,
-0.12972275912761688,
-0.09503471851348877,
0.566845178604126,
-0.2924179136753082,
-0.07119482755661011,
-0.0927342027425766,
0.34237730503082275,
0.058560967445373535,
0.07930972427129745,
-0.20693829655647278,
0.2932893931865692,
0.1730281412601471,
-0.4413437247276306,
-0.0749933049082756,
0.0813831239938736,
0.09703508019447327,
-0.212810218334198,
0.07194291800260544,
-0.343845009803772,
-0.10620266199111938,
0.17611262202262878,
0.0801268145442009,
0.14855824410915375,
-0.13927382230758667,
-0.02437736839056015,
0.2996038794517517,
-0.2540242373943329,
0.634608268737793,
0.0144602470099926,
-0.5885601043701172,
0.061455097049474716,
0.05541340261697769,
0.38626888394355774,
0.09279128909111023,
0.023197893053293228,
-0.04787607118487358,
-0.14284572005271912,
-0.02281505987048149,
-0.43270233273506165,
0.16474688053131104,
-0.1825360357761383,
0.40086668729782104,
-0.033853333443403244,
-0.07178150117397308,
-0.013197320513427258,
-0.12363356351852417,
0.01776660978794098,
-0.062977634370327,
-0.673409640789032,
-0.11474214494228363,
-0.17203880846500397,
-0.03266468644142151,
0.039682451635599136,
0.3249143660068512,
-0.004447564482688904,
-0.21031758189201355,
0.054946862161159515,
-0.3948974907398224,
-0.1477695256471634,
-0.3373640179634094,
-0.3186050057411194,
0.322456955909729,
-0.3186086118221283,
0.010254036635160446,
-0.14541195333003998,
-0.06669646501541138,
-0.05232374370098114,
0.00332428514957428,
-0.14563944935798645,
-0.0006990358233451843,
0.04341311380267143,
0.2336118221282959,
0.1369236707687378,
0.23706679046154022,
-0.24679821729660034,
-0.014883985742926598,
-0.11997318267822266,
0.013237343169748783,
0.03944046050310135,
0.6291819214820862,
0.11466193199157715,
0.26919376850128174,
0.19053910672664642,
-0.0973765179514885,
0.007606614381074905,
0.18058863282203674,
0.21116074919700623,
0.16757971048355103,
0.05017240718007088,
0.4540922939777374,
-0.20531536638736725,
-0.028608430176973343,
-0.17177008092403412,
0.0796862542629242,
-0.05471065640449524,
0.14961779117584229,
0.04220554977655411,
-0.17463034391403198,
-0.11316151916980743,
0.08155029267072678,
0.08655720204114914,
0.27043208479881287,
-0.3065721094608307,
-0.3265145719051361,
0.12690307199954987,
0.07523076236248016,
-0.12259021401405334,
-0.03936531022191048,
0.14163236320018768,
0.03663623705506325,
-0.13125312328338623,
0.16921330988407135,
-0.07518318295478821,
-0.31834936141967773,
-0.04082237184047699,
0.11970251053571701,
0.44196680188179016,
0.02979232743382454,
-0.40902307629585266,
-0.3178194761276245,
0.2936326265335083,
0.12127292156219482,
0.23218171298503876,
-0.10558760166168213,
0.18870264291763306,
0.6046777367591858,
0.09929513931274414,
0.05930440127849579,
-0.07571764290332794,
0.20355366170406342,
-0.37370237708091736,
-0.07051916420459747,
0.3196418583393097,
0.4683905243873596,
-0.26693984866142273,
0.036986496299505234,
0.26983293890953064,
0.11025568842887878,
0.004940928425639868,
0.12369300425052643,
0.10291843861341476,
-0.261501669883728,
0.03463156521320343,
-0.005076860077679157,
-0.07167462259531021,
0.23957687616348267,
0.043363966047763824,
0.15159614384174347,
0.02646232396364212,
0.1367264688014984,
0.10296047478914261,
0.20318184792995453,
-0.05194172263145447,
-0.016780244186520576,
-0.08750049769878387,
0.47515958547592163,
0.17553626000881195,
0.03196634724736214,
-0.15650612115859985,
-0.20821122825145721,
0.12349449098110199,
0.24312324821949005,
0.3446093797683716,
0.26048099994659424,
0.41346225142478943,
-0.2396588921546936,
0.21421313285827637,
-0.12618441879749298,
-0.1410272717475891,
-0.1568867564201355,
-0.1109909862279892,
-0.24647381901741028,
-0.04859863594174385,
-0.08990688621997833,
0.016139710322022438,
0.04052506759762764,
-0.09710383415222168,
-0.11917686462402344,
0.3489648997783661,
-0.0887705534696579,
0.08387655764818192,
0.19340582191944122,
-0.10727831721305847,
-0.19467222690582275,
0.11105050891637802,
-0.14093919098377228,
0.24841567873954773,
0.26117390394210815,
-0.12993179261684418,
0.16210022568702698,
0.11495998501777649,
-0.031718719750642776,
-0.2445860505104065,
0.19481931626796722,
0.38263848423957825,
0.43840959668159485,
-0.14142543077468872,
0.2510775923728943,
-0.1716439574956894,
0.07839991897344589,
-0.09575280547142029,
0.32633885741233826,
0.3865188658237457,
0.3334310054779053,
-0.37614119052886963,
-0.19120612740516663,
0.44799166917800903,
0.5177021622657776,
-0.04603405296802521,
0.5572062730789185,
0.13005390763282776,
-0.030659500509500504,
-0.3718101382255554,
-0.02922976203262806,
0.02062838152050972,
-0.27486321330070496,
0.31734389066696167,
0.17464561760425568,
-0.027472758665680885,
0.01889738440513611,
0.0632612556219101,
0.1854255646467209,
-0.2322799563407898,
0.298627644777298,
0.23765209317207336,
-0.06910328567028046,
0.012623816728591919,
0.17466039955615997,
-0.4002307653427124,
-0.11948414146900177,
-0.4669222831726074,
-0.25813132524490356,
-0.21268554031848907,
-0.1061556339263916,
-0.2768253982067108,
-0.29554370045661926,
-0.11512764543294907,
0.2654784619808197,
0.20900775492191315,
0.032196421176195145,
-0.1818615049123764,
0.29712143540382385,
-0.4628486931324005,
0.03978415206074715,
-0.05340932682156563,
-0.0780033990740776,
0.2556307315826416,
-0.028873775154352188,
-0.34078431129455566,
-0.3159102201461792,
0.47955164313316345,
-0.3244585394859314,
-0.3055860102176666,
-0.4587937593460083,
0.39324915409088135,
0.29714149236679077,
0.19501422345638275,
-0.6422246694564819,
-0.2094748467206955,
0.15843254327774048,
0.04962322115898132,
-0.3588387668132782,
-0.4520333707332611,
0.23274658620357513,
0.12982673943042755,
-0.14569661021232605,
-0.3039949834346771,
0.45538586378097534,
0.03205997496843338,
0.14749997854232788,
-0.3409584164619446
] |
https://github.com/huggingface/datasets/issues/2175 | dataset.search_batch() function outputs all -1 indices sometime. | Sure. Will push everything together with RAG end to end. :) thanks a lot.
On Wed, Apr 7, 2021, 21:16 Quentin Lhoest ***@***.***> wrote:
> That would be an easy way to workaround this issue. Feel free to open a PR
> on transformers and ping me ! :)
>
> β
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2175#issuecomment-814752589>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEA4FGWLROCGARKN7WOJYSTTHQPH5ANCNFSM42PRVYDA>
> .
>
| I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 82 | dataset.search_batch() function outputs all -1 indices sometime.
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
Sure. Will push everything together with RAG end to end. :) thanks a lot.
On Wed, Apr 7, 2021, 21:16 Quentin Lhoest ***@***.***> wrote:
> That would be an easy way to workaround this issue. Feel free to open a PR
> on transformers and ping me ! :)
>
> β
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2175#issuecomment-814752589>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEA4FGWLROCGARKN7WOJYSTTHQPH5ANCNFSM42PRVYDA>
> .
>
| [
-0.028312990441918373,
-0.4459776282310486,
-0.062118303030729294,
0.10841386020183563,
0.2921059727668762,
-0.0717785432934761,
0.354971706867218,
0.3072512745857239,
0.09947532415390015,
0.4373634457588196,
-0.28836920857429504,
-0.17787130177021027,
0.047587454319000244,
-0.040546901524066925,
-0.11869145929813385,
0.009807717055082321,
0.24705970287322998,
0.4063917398452759,
-0.1565123200416565,
-0.5071397423744202,
-0.28627777099609375,
0.1293400228023529,
-0.0813586413860321,
0.32808399200439453,
-0.3517279326915741,
0.2273845672607422,
0.028168490156531334,
-0.13982000946998596,
-0.2862054109573364,
-0.449889212846756,
0.6027762293815613,
-0.2830130457878113,
0.4530467689037323,
0.2541899085044861,
-0.00013016471348237246,
0.11768114566802979,
0.4395864009857178,
-0.06513925641775131,
-0.15178970992565155,
-0.18119065463542938,
-0.08122202754020691,
0.21384476125240326,
0.07269293814897537,
-0.03717788681387901,
0.006092239171266556,
-0.2177123874425888,
0.22476506233215332,
-0.16634319722652435,
0.04188661277294159,
0.18656858801841736,
0.023388270288705826,
0.10176794230937958,
-0.18069586157798767,
-0.07725066691637039,
0.5992838740348816,
-0.270993709564209,
0.0486719012260437,
-0.052349794656038284,
0.4569093883037567,
0.0019476721063256264,
0.0925159677863121,
0.13979972898960114,
0.04614119976758957,
-0.034207019954919815,
-0.20732906460762024,
0.18635688722133636,
0.5528723001480103,
-0.27229243516921997,
0.17107930779457092,
0.26898738741874695,
0.37461093068122864,
-0.09047973901033401,
-0.4090770184993744,
0.07361631840467453,
0.13621565699577332,
0.05647914111614227,
-0.015263929963111877,
0.14179381728172302,
-0.11472122371196747,
0.2588497996330261,
-0.10165088623762131,
0.3451107442378998,
-0.3150438070297241,
0.1087803840637207,
0.07939530909061432,
0.3879111707210541,
-0.003970715217292309,
0.11477778106927872,
0.17750822007656097,
0.23199312388896942,
0.2189956158399582,
0.15652185678482056,
0.14337654411792755,
0.25089338421821594,
-0.5799229145050049,
-0.02688547410070896,
0.2490704357624054,
-0.2496400773525238,
0.1563374400138855,
-0.2913852334022522,
-0.3163476586341858,
0.0053510237485170364,
-0.14512969553470612,
-0.11744975298643112,
0.16910798847675323,
0.13860103487968445,
-0.09160936623811722,
0.12302286177873611,
0.2601276636123657,
-0.3778173327445984,
0.04640020802617073,
0.016573777422308922,
0.1478918194770813,
-0.025117773562669754,
-0.13372443616390228,
0.1508803367614746,
0.06990976631641388,
-0.3211229741573334,
-0.3362395167350769,
-0.18229661881923676,
-0.2384532392024994,
0.15614257752895355,
-0.18566322326660156,
0.19563671946525574,
0.3701728880405426,
0.06157617270946503,
-0.1258406788110733,
0.13417671620845795,
-0.18845804035663605,
-0.008369335904717445,
-0.1735408753156662,
-0.19354484975337982,
-0.2100253701210022,
0.02485537901520729,
0.14465032517910004,
-0.40882107615470886,
-0.18440894782543182,
0.1028485894203186,
-0.04036744683980942,
0.20424377918243408,
0.024063201621174812,
-0.12931230664253235,
0.3815373182296753,
0.5448859333992004,
-0.19576328992843628,
0.3435317277908325,
0.17522546648979187,
0.04626193642616272,
-0.08072242140769958,
0.01046377420425415,
0.056141164153814316,
-0.5754237771034241,
0.18695102632045746,
0.03655693307518959,
-0.02471865341067314,
0.28322649002075195,
0.2651233673095703,
0.273689866065979,
-0.22753536701202393,
0.37016913294792175,
-0.07081910222768784,
-0.37117791175842285,
0.049620095640420914,
-0.031072646379470825,
0.27111268043518066,
0.1841753125190735,
-0.10324972867965698,
0.17016924917697906,
-0.0015587650705128908,
-0.21133092045783997,
0.15765291452407837,
0.3558744192123413,
0.03963636979460716,
0.24296891689300537,
-0.4880303740501404,
0.21157918870449066,
0.04133325815200806,
-0.3464719355106354,
-0.41499757766723633,
0.0347524918615818,
-0.2874717712402344,
-0.5506216287612915,
0.09436709433794022,
0.25393766164779663,
0.29138243198394775,
0.21679311990737915,
0.2211160659790039,
0.17621871829032898,
-0.018413780257105827,
-0.08223824203014374,
-0.44493138790130615,
-0.10949321836233139,
0.18202617764472961,
-0.06683491170406342,
0.2814900577068329,
0.30153876543045044,
0.056757230311632156,
-0.6469029188156128,
0.4162865877151489,
-0.015419844537973404,
0.13331080973148346,
-0.04142818599939346,
0.3924901783466339,
0.008920937776565552,
0.6352490782737732,
-0.06700649857521057,
-0.19974154233932495,
0.1173175796866417,
-0.37232542037963867,
0.1516672521829605,
-0.1041775792837143,
-0.20653681457042694,
-0.07883942127227783,
-0.03190229460597038,
0.04320494830608368,
0.20245833694934845,
-0.09090353548526764,
-0.13432520627975464,
0.27126577496528625,
-0.1845751702785492,
-0.20991060137748718,
0.14256800711154938,
-0.07757019996643066,
-0.16261550784111023,
-0.5799484252929688,
0.3026264011859894,
0.01971708983182907,
-0.18993456661701202,
0.03448415547609329,
0.037985723465681076,
0.2533739507198334,
-0.1179472878575325,
-0.037723783403635025,
0.1215902641415596,
-0.25084537267684937,
-0.1928163319826126,
0.6424351334571838,
0.07207996398210526,
-0.1853334903717041,
-0.5010784864425659,
0.1635938584804535,
0.45505911111831665,
0.13746277987957,
-0.15939727425575256,
0.0422651432454586,
0.3477858006954193,
-0.32754114270210266,
0.4250102639198303,
-0.13453413546085358,
0.03599392622709274,
0.05964042246341705,
0.08462700247764587,
-0.15955665707588196,
-0.2088911235332489,
0.0791568011045456,
-0.14591558277606964,
-0.03214997425675392,
0.07211646437644958,
-0.18100957572460175,
0.11498694866895676,
-0.006555322557687759,
-0.34825006127357483,
-0.004655852913856506,
0.2404887080192566,
-0.030782468616962433,
0.010029084980487823,
0.07758864760398865,
-0.15302710235118866,
0.36847513914108276,
0.19968466460704803,
-0.15380488336086273,
-0.2296268343925476,
-0.17058593034744263,
-0.17616012692451477,
0.10389199107885361,
0.1313125491142273,
-0.2240186482667923,
0.1574561893939972,
0.28515517711639404,
-0.11165717989206314,
-0.2977469563484192,
-0.19656985998153687,
-0.41919293999671936,
0.27301549911499023,
-0.2794298827648163,
-0.011735360138118267,
-0.01679149642586708,
0.05615856498479843,
-0.45195475220680237,
-0.11897572129964828,
-0.0843057632446289,
-0.07987008988857269,
0.14326846599578857,
-0.28322136402130127,
-0.02624559961259365,
0.0633002519607544,
-0.11499331891536713,
0.21003565192222595,
0.06240840256214142,
0.23340874910354614,
-0.603830099105835,
0.03840866684913635,
-0.40867945551872253,
-0.2158355712890625,
-0.4646940231323242,
0.2507132589817047,
0.016667606309056282,
0.03153739869594574,
-0.4577503800392151,
-0.4218870997428894,
0.09028390794992447,
0.05866220220923424,
-0.13873688876628876,
-0.01814400590956211,
0.2579154968261719,
0.02008219063282013,
-0.22821445763111115,
0.23726683855056763,
0.05287277698516846,
-0.09174047410488129,
-0.1654130071401596,
0.19085069000720978,
-0.2420116513967514,
0.3424968421459198,
-0.1977432668209076,
-0.36896005272865295,
-0.012199688702821732,
-0.1239931583404541,
0.1559954285621643,
-0.3126063644886017,
0.06533059477806091,
0.1334221512079239,
0.10339915752410889,
-0.1387467235326767,
-0.0690942257642746,
-0.037608109414577484,
-0.17799052596092224,
-0.18651387095451355,
0.31426480412483215,
0.33718550205230713,
-0.35459595918655396,
-0.3330666124820709,
-0.18315866589546204,
-0.4907529354095459,
0.5181818604469299,
-0.10641351342201233,
-0.06496646255254745,
-0.021928703412413597,
-0.03725730627775192,
0.13504905998706818,
0.4749005138874054,
0.19578325748443604,
-0.08611161261796951,
-0.05339379608631134,
-0.22792184352874756,
-0.10956829786300659,
0.33197787404060364,
0.010725531727075577,
0.2729147970676422,
0.0609411858022213,
-0.04086892306804657,
-0.2583753764629364,
0.7406021952629089,
0.2493864893913269,
-0.07727043330669403,
-0.0038319677114486694,
0.1467563807964325,
0.16960294544696808,
0.10521875321865082,
-0.03487657755613327,
0.20001770555973053,
0.19974009692668915,
-0.3633260130882263,
-0.023181498050689697,
-0.018191639333963394,
0.13791300356388092,
0.2525853216648102,
0.13320063054561615,
-0.12050307542085648,
-0.2060517519712448,
0.013361804187297821,
0.2651364207267761,
0.23669147491455078,
0.05542801693081856,
0.12936797738075256,
-0.10697329044342041,
0.08634686470031738,
0.1686655580997467,
0.06029510870575905,
0.1176760196685791,
0.21970012784004211,
0.3878759741783142,
-0.3853280246257782,
-0.5046992301940918,
0.20424401760101318,
-0.025287773460149765,
0.39774981141090393,
0.23020131886005402,
0.09101990610361099,
0.47607356309890747,
0.2946363687515259,
1.282107949256897,
-0.12572047114372253,
0.21006552875041962,
0.20244204998016357,
0.05219392478466034,
-0.25690045952796936,
-0.3845192790031433,
-0.3927997946739197,
0.10717911273241043,
0.24384519457817078,
0.31985318660736084,
-0.14488989114761353,
-0.30787399411201477,
0.3683765232563019,
-0.03936187922954559,
-0.037790507078170776,
-0.5277113318443298,
-0.35603541135787964,
-0.36415305733680725,
0.3309246897697449,
0.2116028368473053,
0.10230027884244919,
0.037355147302150726,
-0.07243660092353821,
-0.34579595923423767,
-0.26578855514526367,
0.04306255280971527,
0.028514079749584198,
-0.0076312776654958725,
0.18177509307861328,
-0.05452607572078705,
0.07539503276348114,
0.625913143157959,
0.0040588900446891785,
0.035152941942214966,
0.040728066116571426,
-0.33781468868255615,
0.10587279498577118,
0.08306577801704407,
-0.2505224049091339,
0.15620911121368408,
0.47104161977767944,
-0.07780744880437851,
-0.06823837012052536,
-0.004748668521642685,
0.18299981951713562,
-0.01901846006512642,
-0.2835804224014282,
0.294258177280426,
0.12624375522136688,
-0.23077279329299927,
-0.26125311851501465,
0.7115758657455444,
-0.19992969930171967,
-0.23809559643268585,
-0.033841319382190704,
0.37284600734710693,
-0.19449301064014435,
0.8509474992752075,
0.19942212104797363,
1.1119369268417358,
-0.23067806661128998,
0.12413303554058075,
0.013660850003361702,
-0.02294950932264328,
0.42332524061203003,
-0.14782093465328217,
0.3599697947502136,
-0.41688835620880127,
-0.07452288269996643,
-0.1267654448747635,
-0.1625533103942871,
-0.3965691030025482,
0.5001989006996155,
-0.04858535900712013,
0.30752435326576233,
-0.050997961312532425,
-0.09953510761260986,
0.11226470023393631,
0.03227590024471283,
0.4319419264793396,
-0.19584879279136658,
-0.30820325016975403,
-0.04940149188041687,
0.2895001173019409,
0.4239194095134735,
-0.11448763310909271,
-0.13066336512565613,
0.06094120070338249,
-0.04343917965888977,
-0.32669106125831604,
-0.17064130306243896,
0.14958833158016205,
0.31323134899139404,
0.6839640140533447,
-0.28131935000419617,
-0.059747371822595596,
-0.12923507392406464,
0.5940535068511963,
-0.2949206531047821,
-0.09750863164663315,
-0.09328100085258484,
0.29681888222694397,
0.04485449939966202,
0.0878172442317009,
-0.20854441821575165,
0.3264085352420807,
0.16587495803833008,
-0.4087221026420593,
-0.11813434213399887,
0.08871430158615112,
0.10041093826293945,
-0.19457291066646576,
0.039905447512865067,
-0.37297290563583374,
-0.16587412357330322,
0.13465145230293274,
0.06677397340536118,
0.14196451008319855,
-0.12792949378490448,
-0.02854510396718979,
0.29539233446121216,
-0.25025641918182373,
0.5640609264373779,
0.05659153312444687,
-0.5724161267280579,
0.021269507706165314,
0.09878171980381012,
0.3291197121143341,
0.07245030254125595,
0.05013131722807884,
0.0008483827114105225,
-0.1735297590494156,
-0.03317558020353317,
-0.45811527967453003,
0.20368093252182007,
-0.22135058045387268,
0.4114437699317932,
0.011091426014900208,
-0.04994367063045502,
0.011613194830715656,
-0.12677942216396332,
0.04720357432961464,
-0.08723945170640945,
-0.6709449291229248,
-0.13525530695915222,
-0.2030441015958786,
-0.004132762551307678,
0.03961396589875221,
0.3588508665561676,
-0.01332223229110241,
-0.12809529900550842,
0.06523535400629044,
-0.37545791268348694,
-0.16639059782028198,
-0.3348737359046936,
-0.28889530897140503,
0.2904346287250519,
-0.24141857028007507,
-0.027827851474285126,
-0.10078052431344986,
-0.051936425268650055,
-0.04175648093223572,
-0.003018125891685486,
-0.2036743313074112,
-0.005222328007221222,
0.049105849117040634,
0.2304777204990387,
0.12647107243537903,
0.23354782164096832,
-0.21581722795963287,
0.024791371077299118,
-0.15767721831798553,
-0.044103361666202545,
0.11891287565231323,
0.6434119939804077,
0.11680760979652405,
0.26234909892082214,
0.21242769062519073,
-0.14900192618370056,
0.03742083162069321,
0.1779785007238388,
0.21310853958129883,
0.159200519323349,
0.04703734815120697,
0.39569124579429626,
-0.25375837087631226,
-0.03000669926404953,
-0.14422398805618286,
0.10316397249698639,
-0.01787342131137848,
0.17292308807373047,
0.013256046921014786,
-0.17394432425498962,
-0.16851191222667694,
0.12555590271949768,
0.140568345785141,
0.26717379689216614,
-0.2686235010623932,
-0.3306472897529602,
0.10078994184732437,
0.07509015500545502,
-0.13326627016067505,
-0.00014815747272223234,
0.1461532562971115,
0.02951681613922119,
-0.10041557997465134,
0.1746879518032074,
-0.06062968820333481,
-0.2794899344444275,
-0.009492509067058563,
0.11396994441747665,
0.4691479504108429,
0.04925275593996048,
-0.40484336018562317,
-0.28282082080841064,
0.33732870221138,
0.13469620048999786,
0.27483195066452026,
-0.07440759241580963,
0.2376716434955597,
0.6239992380142212,
0.01589314639568329,
0.05428621545433998,
-0.13141843676567078,
0.2484118789434433,
-0.37046292424201965,
-0.1058531105518341,
0.3135046362876892,
0.5167595744132996,
-0.30278322100639343,
0.02180119976401329,
0.24164552986621857,
0.20118677616119385,
-0.020431119948625565,
0.11600187420845032,
0.07082876563072205,
-0.21497277915477753,
0.01911912113428116,
-0.03791750967502594,
-0.07105889916419983,
0.21437111496925354,
0.01649663597345352,
0.1525220423936844,
-0.021142181009054184,
0.14463134109973907,
0.14643198251724243,
0.19266021251678467,
-0.022226810455322266,
-0.10955150425434113,
-0.128951758146286,
0.4419505298137665,
0.21320310235023499,
0.03921612724661827,
-0.12580658495426178,
-0.2113790661096573,
0.12813584506511688,
0.24144728481769562,
0.357592910528183,
0.3136424422264099,
0.3952905237674713,
-0.14623680710792542,
0.2081684023141861,
-0.14725254476070404,
-0.13773976266384125,
-0.17694522440433502,
-0.08194837719202042,
-0.23185601830482483,
-0.09109579026699066,
-0.04671505466103554,
0.02688848040997982,
0.0375409871339798,
-0.15904255211353302,
-0.10367046296596527,
0.34956589341163635,
-0.10567927360534668,
0.05482401326298714,
0.15105634927749634,
-0.08516980707645416,
-0.192474827170372,
0.12483568489551544,
-0.1775253564119339,
0.2826816439628601,
0.23295266926288605,
-0.11942839622497559,
0.18660923838615417,
0.11754194647073746,
-0.012552420608699322,
-0.2626391649246216,
0.19836868345737457,
0.368741512298584,
0.38094836473464966,
-0.16082751750946045,
0.20816417038440704,
-0.22212426364421844,
0.05552701652050018,
-0.0466015599668026,
0.2873364984989166,
0.342075914144516,
0.31291723251342773,
-0.3188911974430084,
-0.17574863135814667,
0.4365795850753784,
0.4873603284358978,
-0.04042943939566612,
0.5094997882843018,
0.11599664390087128,
-0.010998714715242386,
-0.3908464312553406,
-0.048844724893569946,
0.039069898426532745,
-0.2555010914802551,
0.30608057975769043,
0.20374828577041626,
-0.04640766605734825,
-0.0006294418126344681,
0.17172527313232422,
0.1663028597831726,
-0.28352296352386475,
0.271639883518219,
0.26514437794685364,
-0.06830295920372009,
-0.001956343650817871,
0.16003943979740143,
-0.4410412907600403,
-0.12771879136562347,
-0.4847531318664551,
-0.1873941421508789,
-0.1983329951763153,
-0.059411101043224335,
-0.2815764844417572,
-0.3265519440174103,
-0.11159831285476685,
0.2839323580265045,
0.24016334116458893,
0.0392766110599041,
-0.19365209341049194,
0.32001081109046936,
-0.4926873445510864,
0.04147443175315857,
-0.061620499938726425,
-0.0019817836582660675,
0.26173117756843567,
-0.013767413794994354,
-0.3590400218963623,
-0.3816455006599426,
0.5597444772720337,
-0.33553531765937805,
-0.3149103820323944,
-0.4205087721347809,
0.40176138281822205,
0.3072033226490021,
0.1281176209449768,
-0.6617918014526367,
-0.17463694512844086,
0.15161333978176117,
0.057014111429452896,
-0.3895004093647003,
-0.4049234986305237,
0.2210482805967331,
0.08723461627960205,
-0.14237703382968903,
-0.3343049883842468,
0.48106876015663147,
0.011339480057358742,
0.17175622284412384,
-0.34873634576797485
] |
https://github.com/huggingface/datasets/issues/2170 | Wikipedia historic dumps are deleted but hf/datasets hardcodes dump date | It seems that this can be fixed from user's end by including a `date` argument, like this:
`dataset = datasets.load_dataset('wikipedia', '20200501.en', date='20210420')`
You can get available dates from [here](https://dumps.wikimedia.org/enwiki/).
This is not a proper fix however as all the files will still have '20200501' in their file names. | Wikimedia does not keep all historical dumps. For example, as of today https://dumps.wikimedia.org/kowiki/ only provides
```
20201220/ 02-Feb-2021 01:36 -
20210101/ 21-Feb-2021 01:26 -
20210120/ 02-Mar-2021 01:25 -
20210201/ 21-Mar-2021 01:26 -
20210220/ 02-Apr-2021 01:26 -
20210301/ 03-Mar-2021 08:10 -
20210320/ 21-Mar-2021 18:13 -
20210401/ 03-Apr-2021 10:08 -
latest/ 03-Apr-2021 10:08 -
```
However, the wikipedia dataset provided in the library, only supports the following configs, none of which are applicable anymore when disregarding the cached datasets:
```
ValueError: BuilderConfig 20210401.ko not found. Available: ['20200501.aa', '20200501.ab', '20200501.ace', '20200501.ady', '20200501.af', '20200501.ak', '20200501.als', '20200501.am', '20200501.an', '20200501.ang', '20200501.ar', '20200501.arc', '20200501.arz', '20200501.as', '20200501.ast', '20200501.atj', '20200501.av', '20200501.ay', '20200501.az', '20200501.azb', '20200501.ba', '20200501.bar', '20200501.bat-smg', '20200501.bcl', '20200501.be', '20200501.be-x-old', '20200501.bg', '20200501.bh', '20200501.bi', '20200501.bjn', '20200501.bm', '20200501.bn', '20200501.bo', '20200501.bpy', '20200501.br', '20200501.bs', '20200501.bug', '20200501.bxr', '20200501.ca', '20200501.cbk-zam', '20200501.cdo', '20200501.ce', '20200501.ceb', '20200501.ch', '20200501.cho', '20200501.chr', '20200501.chy', '20200501.ckb', '20200501.co', '20200501.cr', '20200501.crh', '20200501.cs', '20200501.csb', '20200501.cu', '20200501.cv', '20200501.cy', '20200501.da', '20200501.de', '20200501.din', '20200501.diq', '20200501.dsb', '20200501.dty', '20200501.dv', '20200501.dz', '20200501.ee', '20200501.el', '20200501.eml', '20200501.en', '20200501.eo', '20200501.es', '20200501.et', '20200501.eu', '20200501.ext', '20200501.fa', '20200501.ff', '20200501.fi', '20200501.fiu-vro', '20200501.fj', '20200501.fo', '20200501.fr', '20200501.frp', '20200501.frr', '20200501.fur', '20200501.fy', '20200501.ga', '20200501.gag', '20200501.gan', '20200501.gd', '20200501.gl', '20200501.glk', '20200501.gn', '20200501.gom', '20200501.gor', '20200501.got', '20200501.gu', '20200501.gv', '20200501.ha', '20200501.hak', '20200501.haw', '20200501.he', '20200501.hi', '20200501.hif', '20200501.ho', '20200501.hr', '20200501.hsb', '20200501.ht', '20200501.hu', '20200501.hy', '20200501.ia', '20200501.id', '20200501.ie', '20200501.ig', '20200501.ii', '20200501.ik', '20200501.ilo', '20200501.inh', '20200501.io', '20200501.is', '20200501.it', '20200501.iu', '20200501.ja', '20200501.jam', '20200501.jbo', '20200501.jv', '20200501.ka', '20200501.kaa', '20200501.kab', '20200501.kbd', '20200501.kbp', '20200501.kg', '20200501.ki', '20200501.kj', '20200501.kk', '20200501.kl', '20200501.km', '20200501.kn', '20200501.ko', '20200501.koi', '20200501.krc', '20200501.ks', '20200501.ksh', '20200501.ku', '20200501.kv', '20200501.kw', '20200501.ky', '20200501.la', '20200501.lad', '20200501.lb', '20200501.lbe', '20200501.lez', '20200501.lfn', '20200501.lg', '20200501.li', '20200501.lij', '20200501.lmo', '20200501.ln', '20200501.lo', '20200501.lrc', '20200501.lt', '20200501.ltg', '20200501.lv', '20200501.mai', '20200501.map-bms', '20200501.mdf', '20200501.mg', '20200501.mh', '20200501.mhr', '20200501.mi', '20200501.min', '20200501.mk', '20200501.ml', '20200501.mn', '20200501.mr', '20200501.mrj', '20200501.ms', '20200501.mt', '20200501.mus', '20200501.mwl', '20200501.my', '20200501.myv', '20200501.mzn', '20200501.na', '20200501.nah', '20200501.nap', '20200501.nds', '20200501.nds-nl', '20200501.ne', '20200501.new', '20200501.ng', '20200501.nl', '20200501.nn', '20200501.no', '20200501.nov', '20200501.nrm', '20200501.nso', '20200501.nv', '20200501.ny', '20200501.oc', '20200501.olo', '20200501.om', '20200501.or', '20200501.os', '20200501.pa', '20200501.pag', '20200501.pam', '20200501.pap', '20200501.pcd', '20200501.pdc', '20200501.pfl', '20200501.pi', '20200501.pih', '20200501.pl', '20200501.pms', '20200501.pnb', '20200501.pnt', '20200501.ps', '20200501.pt', '20200501.qu', '20200501.rm', '20200501.rmy', '20200501.rn', '20200501.ro', '20200501.roa-rup', '20200501.roa-tara', '20200501.ru', '20200501.rue', '20200501.rw', '20200501.sa', '20200501.sah', '20200501.sat', '20200501.sc', '20200501.scn', '20200501.sco', '20200501.sd', '20200501.se', '20200501.sg', '20200501.sh', '20200501.si', '20200501.simple', '20200501.sk', '20200501.sl', '20200501.sm', '20200501.sn', '20200501.so', '20200501.sq', '20200501.sr', '20200501.srn', '20200501.ss', '20200501.st', '20200501.stq', '20200501.su', '20200501.sv', '20200501.sw', '20200501.szl', '20200501.ta', '20200501.tcy', '20200501.te', '20200501.tet', '20200501.tg', '20200501.th', '20200501.ti', '20200501.tk', '20200501.tl', '20200501.tn', '20200501.to', '20200501.tpi', '20200501.tr', '20200501.ts', '20200501.tt', '20200501.tum', '20200501.tw', '20200501.ty', '20200501.tyv', '20200501.udm', '20200501.ug', '20200501.uk', '20200501.ur', '20200501.uz', '20200501.ve', '20200501.vec', '20200501.vep', '20200501.vi', '20200501.vls', '20200501.vo', '20200501.wa', '20200501.war', '20200501.wo', '20200501.wuu', '20200501.xal', '20200501.xh', '20200501.xmf', '20200501.yi', '20200501.yo', '20200501.za', '20200501.zea', '20200501.zh', '20200501.zh-classical', '20200501.zh-min-nan', '20200501.zh-yue', '20200501.zu']
```
The cached datasets:
```
% aws s3 --no-sign-request --endpoint-url https://storage.googleapis.com ls s3://huggingface-nlp/cache/datasets/wikipedia/
PRE 20200501.de/
PRE 20200501.en/
PRE 20200501.fr/
PRE 20200501.frr/
PRE 20200501.it/
PRE 20200501.simple/
``` | 48 | Wikipedia historic dumps are deleted but hf/datasets hardcodes dump date
Wikimedia does not keep all historical dumps. For example, as of today https://dumps.wikimedia.org/kowiki/ only provides
```
20201220/ 02-Feb-2021 01:36 -
20210101/ 21-Feb-2021 01:26 -
20210120/ 02-Mar-2021 01:25 -
20210201/ 21-Mar-2021 01:26 -
20210220/ 02-Apr-2021 01:26 -
20210301/ 03-Mar-2021 08:10 -
20210320/ 21-Mar-2021 18:13 -
20210401/ 03-Apr-2021 10:08 -
latest/ 03-Apr-2021 10:08 -
```
However, the wikipedia dataset provided in the library, only supports the following configs, none of which are applicable anymore when disregarding the cached datasets:
```
ValueError: BuilderConfig 20210401.ko not found. Available: ['20200501.aa', '20200501.ab', '20200501.ace', '20200501.ady', '20200501.af', '20200501.ak', '20200501.als', '20200501.am', '20200501.an', '20200501.ang', '20200501.ar', '20200501.arc', '20200501.arz', '20200501.as', '20200501.ast', '20200501.atj', '20200501.av', '20200501.ay', '20200501.az', '20200501.azb', '20200501.ba', '20200501.bar', '20200501.bat-smg', '20200501.bcl', '20200501.be', '20200501.be-x-old', '20200501.bg', '20200501.bh', '20200501.bi', '20200501.bjn', '20200501.bm', '20200501.bn', '20200501.bo', '20200501.bpy', '20200501.br', '20200501.bs', '20200501.bug', '20200501.bxr', '20200501.ca', '20200501.cbk-zam', '20200501.cdo', '20200501.ce', '20200501.ceb', '20200501.ch', '20200501.cho', '20200501.chr', '20200501.chy', '20200501.ckb', '20200501.co', '20200501.cr', '20200501.crh', '20200501.cs', '20200501.csb', '20200501.cu', '20200501.cv', '20200501.cy', '20200501.da', '20200501.de', '20200501.din', '20200501.diq', '20200501.dsb', '20200501.dty', '20200501.dv', '20200501.dz', '20200501.ee', '20200501.el', '20200501.eml', '20200501.en', '20200501.eo', '20200501.es', '20200501.et', '20200501.eu', '20200501.ext', '20200501.fa', '20200501.ff', '20200501.fi', '20200501.fiu-vro', '20200501.fj', '20200501.fo', '20200501.fr', '20200501.frp', '20200501.frr', '20200501.fur', '20200501.fy', '20200501.ga', '20200501.gag', '20200501.gan', '20200501.gd', '20200501.gl', '20200501.glk', '20200501.gn', '20200501.gom', '20200501.gor', '20200501.got', '20200501.gu', '20200501.gv', '20200501.ha', '20200501.hak', '20200501.haw', '20200501.he', '20200501.hi', '20200501.hif', '20200501.ho', '20200501.hr', '20200501.hsb', '20200501.ht', '20200501.hu', '20200501.hy', '20200501.ia', '20200501.id', '20200501.ie', '20200501.ig', '20200501.ii', '20200501.ik', '20200501.ilo', '20200501.inh', '20200501.io', '20200501.is', '20200501.it', '20200501.iu', '20200501.ja', '20200501.jam', '20200501.jbo', '20200501.jv', '20200501.ka', '20200501.kaa', '20200501.kab', '20200501.kbd', '20200501.kbp', '20200501.kg', '20200501.ki', '20200501.kj', '20200501.kk', '20200501.kl', '20200501.km', '20200501.kn', '20200501.ko', '20200501.koi', '20200501.krc', '20200501.ks', '20200501.ksh', '20200501.ku', '20200501.kv', '20200501.kw', '20200501.ky', '20200501.la', '20200501.lad', '20200501.lb', '20200501.lbe', '20200501.lez', '20200501.lfn', '20200501.lg', '20200501.li', '20200501.lij', '20200501.lmo', '20200501.ln', '20200501.lo', '20200501.lrc', '20200501.lt', '20200501.ltg', '20200501.lv', '20200501.mai', '20200501.map-bms', '20200501.mdf', '20200501.mg', '20200501.mh', '20200501.mhr', '20200501.mi', '20200501.min', '20200501.mk', '20200501.ml', '20200501.mn', '20200501.mr', '20200501.mrj', '20200501.ms', '20200501.mt', '20200501.mus', '20200501.mwl', '20200501.my', '20200501.myv', '20200501.mzn', '20200501.na', '20200501.nah', '20200501.nap', '20200501.nds', '20200501.nds-nl', '20200501.ne', '20200501.new', '20200501.ng', '20200501.nl', '20200501.nn', '20200501.no', '20200501.nov', '20200501.nrm', '20200501.nso', '20200501.nv', '20200501.ny', '20200501.oc', '20200501.olo', '20200501.om', '20200501.or', '20200501.os', '20200501.pa', '20200501.pag', '20200501.pam', '20200501.pap', '20200501.pcd', '20200501.pdc', '20200501.pfl', '20200501.pi', '20200501.pih', '20200501.pl', '20200501.pms', '20200501.pnb', '20200501.pnt', '20200501.ps', '20200501.pt', '20200501.qu', '20200501.rm', '20200501.rmy', '20200501.rn', '20200501.ro', '20200501.roa-rup', '20200501.roa-tara', '20200501.ru', '20200501.rue', '20200501.rw', '20200501.sa', '20200501.sah', '20200501.sat', '20200501.sc', '20200501.scn', '20200501.sco', '20200501.sd', '20200501.se', '20200501.sg', '20200501.sh', '20200501.si', '20200501.simple', '20200501.sk', '20200501.sl', '20200501.sm', '20200501.sn', '20200501.so', '20200501.sq', '20200501.sr', '20200501.srn', '20200501.ss', '20200501.st', '20200501.stq', '20200501.su', '20200501.sv', '20200501.sw', '20200501.szl', '20200501.ta', '20200501.tcy', '20200501.te', '20200501.tet', '20200501.tg', '20200501.th', '20200501.ti', '20200501.tk', '20200501.tl', '20200501.tn', '20200501.to', '20200501.tpi', '20200501.tr', '20200501.ts', '20200501.tt', '20200501.tum', '20200501.tw', '20200501.ty', '20200501.tyv', '20200501.udm', '20200501.ug', '20200501.uk', '20200501.ur', '20200501.uz', '20200501.ve', '20200501.vec', '20200501.vep', '20200501.vi', '20200501.vls', '20200501.vo', '20200501.wa', '20200501.war', '20200501.wo', '20200501.wuu', '20200501.xal', '20200501.xh', '20200501.xmf', '20200501.yi', '20200501.yo', '20200501.za', '20200501.zea', '20200501.zh', '20200501.zh-classical', '20200501.zh-min-nan', '20200501.zh-yue', '20200501.zu']
```
The cached datasets:
```
% aws s3 --no-sign-request --endpoint-url https://storage.googleapis.com ls s3://huggingface-nlp/cache/datasets/wikipedia/
PRE 20200501.de/
PRE 20200501.en/
PRE 20200501.fr/
PRE 20200501.frr/
PRE 20200501.it/
PRE 20200501.simple/
```
It seems that this can be fixed from user's end by including a `date` argument, like this:
`dataset = datasets.load_dataset('wikipedia', '20200501.en', date='20210420')`
You can get available dates from [here](https://dumps.wikimedia.org/enwiki/).
This is not a proper fix however as all the files will still have '20200501' in their file names. | [
-0.048047035932540894,
0.33998146653175354,
-0.022192146629095078,
0.03158038854598999,
-0.31937915086746216,
0.15651261806488037,
0.30782821774482727,
0.5392641425132751,
0.1764220893383026,
0.10108529031276703,
-0.07535628974437714,
0.0723978728055954,
0.2024516463279724,
-0.2449929267168045,
-0.1113700121641159,
-0.18283431231975555,
0.030912227928638458,
0.07726728916168213,
-0.11007650196552277,
-0.29345929622650146,
-0.19434864819049835,
0.14166319370269775,
-0.2975402772426605,
-0.10013334453105927,
-0.1351923793554306,
0.12826840579509735,
-0.12122699618339539,
-0.17317697405815125,
-0.23676298558712006,
-0.28251367807388306,
0.2279287725687027,
0.21499593555927277,
0.21509499847888947,
0.24454107880592346,
-0.00011261004692642018,
-0.022417347878217697,
0.4396786093711853,
-0.07291557639837265,
-0.6998178362846375,
0.33756738901138306,
-0.4934147000312805,
-0.2081645429134369,
-0.2113407403230667,
-0.2803381085395813,
0.024962257593870163,
0.05990166217088699,
0.15230508148670197,
-0.01416541263461113,
0.28619709610939026,
0.144876167178154,
0.23609726130962372,
-0.022791560739278793,
0.22547577321529388,
-0.1685294657945633,
0.3714102804660797,
0.31398439407348633,
-0.1705525517463684,
-0.14583849906921387,
-0.3366083800792694,
-0.014552935026586056,
-0.08039707690477371,
0.5216310620307922,
-0.04834947735071182,
-0.2389984279870987,
0.10126587003469467,
-0.18348465859889984,
-0.16643065214157104,
-0.16723677515983582,
0.4476560056209564,
0.35671237111091614,
0.55803382396698,
-0.14204943180084229,
-0.1736137419939041,
0.0477038249373436,
-0.26918885111808777,
-0.31199437379837036,
0.3322288691997528,
0.18795830011367798,
-0.07432010769844055,
0.08673650026321411,
0.043437521904706955,
-0.18673905730247498,
-0.12355591356754303,
0.4326102137565613,
-0.2945711314678192,
0.6903666257858276,
0.04759414494037628,
-0.02005111426115036,
-0.2650398910045624,
-0.08622018992900848,
-0.012931889854371548,
-0.3165675401687622,
0.03356199339032173,
0.34125468134880066,
0.10461154580116272,
-0.19927509129047394,
-0.034066326916217804,
0.17065924406051636,
0.19529637694358826,
-0.2298508733510971,
-0.12470558285713196,
0.17287090420722961,
0.14369960129261017,
-0.08445597440004349,
0.2835518717765808,
-0.2561609745025635,
0.21811938285827637,
0.1479284018278122,
0.4882200360298157,
0.3513464331626892,
-0.1992553174495697,
-0.023483704775571823,
0.34284934401512146,
0.052937205880880356,
-0.07476739585399628,
-0.12167385965585709,
0.17432346940040588,
-0.33965975046157837,
0.19490501284599304,
0.1505921185016632,
0.10672124475240707,
-0.3127457797527313,
-0.31354644894599915,
0.32758525013923645,
-0.17235295474529266,
0.055000193417072296,
-0.0030669569969177246,
-0.18209287524223328,
-0.12463022023439407,
-0.1386280208826065,
-0.15262988209724426,
-0.005744138732552528,
0.11832965910434723,
0.12840835750102997,
0.2885454297065735,
-0.13581296801567078,
0.31619665026664734,
0.2317119836807251,
-0.0991327315568924,
0.11458295583724976,
-0.17414721846580505,
0.01527400128543377,
0.2022375464439392,
0.3797014653682709,
0.03826708719134331,
0.1678481101989746,
-0.15361054241657257,
-0.24505819380283356,
-0.30760830640792847,
-0.09090320020914078,
-0.269233375787735,
0.0034933649003505707,
-0.31598854064941406,
0.20366434752941132,
0.13090142607688904,
0.023593494668602943,
0.03761007636785507,
0.14190201461315155,
0.19539469480514526,
-0.20023620128631592,
0.009289458394050598,
-0.031865738332271576,
-0.029563017189502716,
-0.12040911614894867,
0.26621556282043457,
0.1527356654405594,
-0.1783030778169632,
-0.11484268307685852,
-0.07417881488800049,
0.3705843687057495,
0.18592222034931183,
0.110727459192276,
-0.0983731597661972,
0.09297384321689606,
-0.11227058619260788,
-0.23850800096988678,
0.2569867670536041,
-0.04885166138410568,
-0.24773013591766357,
-0.14228765666484833,
0.5185167193412781,
0.1292574256658554,
-0.035100676119327545,
-0.18898406624794006,
0.5140383243560791,
-0.26607465744018555,
0.005418017506599426,
0.1362958699464798,
0.15007540583610535,
-0.09669521450996399,
-0.1010836511850357,
-0.33238059282302856,
0.0940825343132019,
-0.1349021941423416,
0.5809414982795715,
-0.046330712735652924,
0.3364218771457672,
0.6471557021141052,
0.3777391016483307,
0.06752851605415344,
0.2076520025730133,
0.37226665019989014,
-0.11826391518115997,
-0.08959431946277618,
0.2840394675731659,
-0.2195199429988861,
-0.3384566605091095,
0.21574726700782776,
-0.11195381730794907,
0.14230266213417053,
0.05727943405508995,
-0.29916656017303467,
-0.2290913164615631,
0.003607235848903656,
-0.15781563520431519,
-0.19220633804798126,
0.27097946405410767,
0.11604560911655426,
0.26965704560279846,
0.3821338713169098,
0.07074856758117676,
-0.29116731882095337,
-0.08037453889846802,
0.022443747147917747,
-0.17430411279201508,
0.24834086000919342,
-0.31439104676246643,
0.09481380879878998,
0.010476216673851013,
0.16299788653850555,
0.26247671246528625,
0.04679591953754425,
0.13765442371368408,
-0.11328843981027603,
0.10754772275686264,
0.12485650181770325,
-0.0343475341796875,
0.022876843810081482,
0.2571221590042114,
-0.23771633207798004,
0.10162783414125443,
0.386240690946579,
-0.06603299826383591,
-0.10896605998277664,
-0.3348831236362457,
0.20103688538074493,
0.3396961987018585,
-0.008181527256965637,
-0.09627392888069153,
-0.0002621244639158249,
0.2850741147994995,
-0.07284872233867645,
0.11751201003789902,
-0.4912272095680237,
-0.1852966845035553,
0.29301849007606506,
-0.19068782031536102,
0.08774655312299728,
-0.09460104256868362,
0.2002779245376587,
0.6361349821090698,
-0.028358085080981255,
0.03606843948364258,
0.3035472333431244,
-0.3020723760128021,
-0.38531720638275146,
0.3101593255996704,
-0.1874304860830307,
-0.37067145109176636,
0.17906536161899567,
0.2985031306743622,
-0.18427276611328125,
-0.19115963578224182,
-0.1008622869849205,
0.3368107080459595,
0.0546802282333374,
0.20218771696090698,
0.05540316551923752,
0.31103378534317017,
0.29440170526504517,
-0.31056448817253113,
0.18805216252803802,
-0.16997328400611877,
0.08562576025724411,
-0.0013885647058486938,
-0.011256986297667027,
-0.5644824504852295,
0.07846043258905411,
0.1482224464416504,
-0.0970536470413208,
-0.5503888130187988,
-0.6236142516136169,
0.2578137516975403,
0.07974646985530853,
-0.12178118526935577,
0.18368326127529144,
-0.2991449236869812,
0.22596092522144318,
0.11158324778079987,
0.22931325435638428,
-0.3595901429653168,
-0.3663402795791626,
-0.1580597460269928,
0.07998058199882507,
0.026751361787319183,
-0.16274462640285492,
0.21041564643383026,
-0.14022992551326752,
-0.5127976536750793,
-0.4433472156524658,
-0.6245269179344177,
0.32142117619514465,
-0.07787135988473892,
-0.05956803262233734,
0.14824700355529785,
0.28761932253837585,
0.04461825639009476,
-0.3598259389400482,
-0.04456246644258499,
-0.08452067524194717,
-0.0961180031299591,
-0.10448351502418518,
-0.34067800641059875,
0.24044586718082428,
-0.059571996331214905,
0.1670764982700348,
-0.13409456610679626,
-0.19534681737422943,
-0.15557509660720825,
0.4140327274799347,
0.07721681892871857,
0.21951626241207123,
-0.08506764471530914,
-0.32200223207473755,
0.00558051373809576,
0.20860032737255096,
-0.412655234336853,
-0.34479811787605286,
0.5001904964447021,
-0.32947245240211487,
-0.3419498801231384,
0.16938690841197968,
-0.07016909867525101,
-0.07873193919658661,
0.016381025314331055,
-0.4505985975265503,
0.17963741719722748,
0.02719375304877758,
0.3788491189479828,
0.38918381929397583,
-0.026034830138087273,
0.2755752503871918,
0.03485780954360962,
-0.04465428739786148,
-0.08652876317501068,
0.007620666176080704,
-0.11138614267110825,
-0.058064572513103485,
0.36126598715782166,
0.1532095968723297,
0.09827870875597,
0.046685341745615005,
0.9649460315704346,
0.1296079456806183,
0.17526116967201233,
0.2703438401222229,
0.09337057918310165,
0.42291176319122314,
-0.29684242606163025,
0.031347885727882385,
0.08885934948921204,
0.050677962601184845,
0.14417468011379242,
0.2668754756450653,
0.1142919585108757,
-0.3368982970714569,
0.040147632360458374,
-0.056186825037002563,
-0.14041092991828918,
-0.45073485374450684,
-0.21839600801467896,
0.13956263661384583,
0.17397768795490265,
0.22082582116127014,
0.16417810320854187,
-0.31812119483947754,
-0.40526124835014343,
0.3040076792240143,
0.16441865265369415,
0.04708598926663399,
0.14401105046272278,
-0.20753854513168335,
0.12678125500679016,
-0.5879553556442261,
0.1699392944574356,
-0.04509095847606659,
0.06303052604198456,
-0.1274251937866211,
0.0217733234167099,
-0.09628280997276306,
0.05952924117445946,
-0.04205559194087982,
-0.23885680735111237,
0.2718629539012909,
0.269173800945282,
0.023976854979991913,
-0.14056971669197083,
0.020569484680891037,
-0.04792875796556473,
0.10306283086538315,
0.274225115776062,
0.2927272915840149,
-0.3884563744068146,
-0.13394734263420105,
0.452069491147995,
0.31494656205177307,
-0.13134612143039703,
0.03200433403253555,
0.11038710176944733,
-0.11655605584383011,
-0.19302739202976227,
-0.31796830892562866,
0.042857371270656586,
0.14881248772144318,
-0.2054591178894043,
0.10105963051319122,
-0.21213650703430176,
0.09568552672863007,
-0.0005827397108078003,
-0.0347556434571743,
0.11804433166980743,
0.3438912034034729,
-0.07562226802110672,
-0.02435726672410965,
0.22250714898109436,
0.1363649070262909,
-0.007210567593574524,
0.023102760314941406,
-0.0037994161248207092,
-0.12155734747648239,
-0.2037765085697174,
-0.05870986729860306,
0.19973357021808624,
-0.052016112953424454,
0.01658216118812561,
-0.04439026117324829,
0.05225009471178055,
-0.10275612026453018,
-0.20347943902015686,
-0.19042210280895233,
-0.0853029415011406,
-0.3912641108036041,
0.03386155515909195,
0.4699322581291199,
-0.034334804862737656,
0.051362618803977966,
0.3707818388938904,
0.21550457179546356,
-0.4664897322654724,
0.3854551911354065,
0.2939126193523407,
0.8347738981246948,
0.18987663090229034,
0.18815964460372925,
0.18202412128448486,
0.11017826199531555,
0.3675711750984192,
0.05272617191076279,
0.052154041826725006,
-0.11553185433149338,
0.07539916783571243,
-0.02288120612502098,
0.31587332487106323,
-0.04706136882305145,
-0.21191738545894623,
-0.14701035618782043,
0.3688458800315857,
-0.11563766747713089,
0.4955008924007416,
-0.029531551524996758,
0.12090162932872772,
0.06728105247020721,
-0.10791894793510437,
-0.2309720516204834,
0.15451936423778534,
0.11463239789009094,
0.20689664781093597,
-0.11539661139249802,
-0.09144303947687149,
0.2895864248275757,
-0.17510399222373962,
-0.4062294363975525,
-0.09567274898290634,
0.026174195110797882,
0.3426235318183899,
-0.039042290300130844,
-0.28347906470298767,
-0.22383613884449005,
0.3323228061199188,
0.2916032075881958,
0.09758484363555908,
-0.06024300307035446,
0.18618737161159515,
-0.2744441032409668,
-0.2148987203836441,
-0.10298379510641098,
0.1444682478904724,
0.04790462553501129,
-0.19173169136047363,
-0.09402191638946533,
0.23433950543403625,
-0.2672803997993469,
-0.38929086923599243,
-0.10912749171257019,
-0.09151020646095276,
-0.174540713429451,
0.3141994774341583,
-0.056118614971637726,
-0.07803142070770264,
-0.1603637933731079,
-0.4524395763874054,
0.1582748293876648,
-0.15624983608722687,
0.26982665061950684,
0.05582859367132187,
-0.029670756310224533,
-0.17785847187042236,
-0.2163669764995575,
0.3298381567001343,
0.04668447747826576,
0.17151689529418945,
0.6110996007919312,
0.24237678945064545,
-0.3313795328140259,
-0.15855151414871216,
-0.14880485832691193,
-0.3503170609474182,
-0.12262053787708282,
0.0027596349827945232,
-0.41304653882980347,
0.011888980865478516,
-0.17973071336746216,
0.3767557144165039,
0.01775815710425377,
-0.2951880693435669,
-0.1263609379529953,
-0.3745442032814026,
-0.028725232928991318,
0.2725766897201538,
-0.10914304852485657,
0.051079168915748596,
0.16479060053825378,
-0.017024964094161987,
-0.10537966340780258,
0.13817808032035828,
-0.3056139647960663,
0.08776117116212845,
0.029215188696980476,
0.11465927213430405,
-0.24993160367012024,
-0.037622615694999695,
-0.17587712407112122,
-0.06790497899055481,
0.10592183470726013,
-0.1951121836900711,
0.00846402533352375,
-0.21144622564315796,
-0.20958653092384338,
0.13488829135894775,
-0.02348184585571289,
-0.04720181226730347,
-0.029244814068078995,
-0.14378556609153748,
-0.09965360164642334,
-0.2585892975330353,
0.020112667232751846,
0.06723525375127792,
0.07666976004838943,
0.29182589054107666,
0.30379772186279297,
0.045949067920446396,
0.05381157994270325,
0.09720154851675034,
0.17595458030700684,
0.5515092015266418,
0.03191341087222099,
0.36991459131240845,
-0.045582983642816544,
-0.10206344723701477,
-0.10024457424879074,
0.2322753667831421,
-0.531022310256958,
-0.1332031786441803,
0.6618322134017944,
-0.019181564450263977,
-0.17777062952518463,
0.5489699244499207,
0.07900436967611313,
-0.08906808495521545,
-0.04430399835109711,
-0.1241973266005516,
-0.06725966930389404,
0.2155483514070511,
-0.4151809811592102,
-0.17106059193611145,
0.3353060483932495,
0.04698646813631058,
0.13765324652194977,
0.09362338483333588,
0.2512536942958832,
-0.43990325927734375,
0.21326717734336853,
0.26945769786834717,
0.0880521610379219,
-0.22219066321849823,
0.37085121870040894,
0.2173083871603012,
0.11693036556243896,
0.2881016135215759,
-0.0560479611158371,
0.17150945961475372,
-0.018421314656734467,
-0.035476796329021454,
0.2547605335712433,
0.10022669285535812,
0.3619266748428345,
0.014144901186227798,
0.20708435773849487,
-0.2588250935077667,
0.3600996732711792,
0.26143136620521545,
-0.07489100098609924,
0.1805955171585083,
0.20450341701507568,
-0.40468335151672363,
0.3852646052837372,
0.02912023663520813,
-0.3738875091075897,
0.2746956944465637,
-0.13842341303825378,
-0.22399020195007324,
-0.2610626816749573,
-0.2730075716972351,
0.2544856369495392,
0.09049081802368164,
0.13105054199695587,
-0.31754451990127563,
0.26288193464279175,
0.014609895646572113,
-0.1453612744808197,
-0.26871028542518616,
0.640450656414032,
-0.1838209629058838,
0.3839748203754425,
-0.1375797837972641,
0.03410503268241882,
-0.06871059536933899,
-0.0616256445646286,
0.03596206381917,
0.08602496981620789,
0.22028449177742004,
-0.14114467799663544,
-0.1487487405538559,
0.04844076931476593,
-0.028617873787879944,
-0.19278684258460999,
-0.16969937086105347,
0.0362561009824276,
0.089939184486866,
-0.2654727101325989,
0.39616185426712036,
0.15181948244571686,
-0.11176522076129913,
-0.5383564233779907,
0.22009699046611786,
0.13985826075077057,
0.02461014688014984,
-0.22565793991088867,
0.029410313814878464,
-0.19245100021362305,
0.3682521879673004,
0.0251920148730278,
-0.03315221518278122,
-0.018604476004838943,
0.17549368739128113,
0.08182884752750397,
0.3540492355823517,
-0.13482622802257538,
0.11125540733337402,
0.0014080703258514404,
0.2195775806903839,
0.3295508027076721,
-0.30241119861602783,
0.024655958637595177,
-0.3585798144340515,
-0.26940304040908813,
-0.11629665642976761,
-0.422475665807724,
-0.13058416545391083,
0.39181679487228394,
0.35652774572372437,
0.1863860785961151,
-0.09477590024471283,
0.278900682926178,
-0.2075871378183365,
0.05506746470928192,
-0.014028497040271759,
-0.30559539794921875,
0.035951290279626846,
0.17218364775180817,
0.14919409155845642,
-0.2695629596710205,
-0.40087631344795227,
0.3634430766105652,
-0.17326079308986664,
0.08566109091043472,
-0.0778290182352066,
0.07113361358642578,
0.20796369016170502,
0.04335876181721687,
-0.026394322514533997,
0.21284343302249908,
-0.07169373333454132,
-0.28810355067253113,
-0.32271701097488403,
-0.14223459362983704,
0.16424475610256195,
0.036643341183662415,
0.15612322092056274,
-0.3485833406448364,
0.28435957431793213,
-0.042389146983623505,
-0.1827995628118515,
-0.046338051557540894,
0.7152363061904907,
-0.057321697473526,
0.16161072254180908,
-0.2237076759338379,
0.08776578307151794,
-0.09716178476810455,
0.10194520652294159,
0.27238401770591736,
0.16900888085365295,
-0.18905995786190033,
0.11294868588447571,
-0.09423696994781494,
-0.5099190473556519,
0.09744508564472198,
-0.4027149975299835,
-0.45803019404411316,
-0.3972792327404022,
-0.06402282416820526,
0.07657979428768158,
0.17583930492401123,
-0.24689969420433044,
0.04945717006921768,
0.3798075318336487,
-0.24478471279144287,
0.03996418043971062,
0.0038366587832570076,
-0.013142991811037064,
0.17203275859355927,
-0.08839409053325653,
0.2015591710805893,
0.08908264338970184,
-0.4260410964488983,
-0.5251036882400513,
-0.2948700189590454
] |
https://github.com/huggingface/datasets/issues/2166 | Regarding Test Sets for the GEM datasets | Hi @vyraun ! The test references for CommonGen are not publicly available: you can reach out to the original dataset authors if you would like to ask for them, but we will not be releasing them as part of GEM (March 31st was the release date for the test set inputs, references are incidentally released for some of the test sets but shouldn't really be used for benchmark submissions)
cc @sebastiangehrmann | @yjernite Hi, are the test sets for the GEM datasets scheduled to be [added soon](https://gem-benchmark.com/shared_task)?
e.g.
```
from datasets import load_dataset
DATASET_NAME="common_gen"
data = load_dataset("gem", DATASET_NAME)
```
The test set doesn't have the target or references.
```
data['test'][0]
{'concept_set_id': 0, 'concepts': ['drill', 'field', 'run', 'team'], 'gem_id': 'common_gen-test-0', 'gem_parent_id': 'common_gen-test-0', 'references': [], 'target': ''}
```
| 71 | Regarding Test Sets for the GEM datasets
@yjernite Hi, are the test sets for the GEM datasets scheduled to be [added soon](https://gem-benchmark.com/shared_task)?
e.g.
```
from datasets import load_dataset
DATASET_NAME="common_gen"
data = load_dataset("gem", DATASET_NAME)
```
The test set doesn't have the target or references.
```
data['test'][0]
{'concept_set_id': 0, 'concepts': ['drill', 'field', 'run', 'team'], 'gem_id': 'common_gen-test-0', 'gem_parent_id': 'common_gen-test-0', 'references': [], 'target': ''}
```
Hi @vyraun ! The test references for CommonGen are not publicly available: you can reach out to the original dataset authors if you would like to ask for them, but we will not be releasing them as part of GEM (March 31st was the release date for the test set inputs, references are incidentally released for some of the test sets but shouldn't really be used for benchmark submissions)
cc @sebastiangehrmann | [
-0.3199135959148407,
-0.09612463414669037,
-0.19731605052947998,
0.18443527817726135,
-0.09195997565984726,
0.11846659332513809,
0.28373172879219055,
0.3940262198448181,
-0.10528646409511566,
-0.016125261783599854,
0.1892586201429367,
0.2699713110923767,
-0.33448153734207153,
0.1294025480747223,
-0.004284472204744816,
0.20620714128017426,
0.013771295547485352,
0.0532652921974659,
-0.13668057322502136,
-0.182785302400589,
-0.0030421987175941467,
0.2782808244228363,
-0.10434917360544205,
0.06742167472839355,
-0.45644986629486084,
-0.21059803664684296,
-0.1491967886686325,
0.1274920403957367,
-0.029293259605765343,
-0.2702150344848633,
0.30684739351272583,
0.17258499562740326,
-0.13285106420516968,
0.4753214418888092,
-0.00010484537051524967,
-0.09247569739818573,
0.2723984122276306,
-0.13548579812049866,
-0.26515698432922363,
-0.3887256979942322,
-0.3688608705997467,
-0.09957348555326462,
-0.03750927746295929,
-0.10745573043823242,
-0.10798250138759613,
-0.04699055105447769,
-0.10611560940742493,
-0.4838305413722992,
0.0354260578751564,
0.24017325043678284,
0.28406938910484314,
0.3282463252544403,
-0.07391529530286789,
-0.225685253739357,
0.15417464077472687,
-0.28875142335891724,
-0.2577029764652252,
0.23720885813236237,
0.04595235735177994,
0.0304731335490942,
0.20492197573184967,
0.10843083262443542,
0.06876613944768906,
0.15357129275798798,
0.13781365752220154,
0.11919309198856354,
-0.013843439519405365,
-0.3732497990131378,
-0.14427730441093445,
0.24804452061653137,
0.6280166506767273,
-0.35022878646850586,
-0.4814595878124237,
-0.156306654214859,
-0.2806762754917145,
-0.05166281387209892,
0.023211222141981125,
0.2364029437303543,
-0.1203913539648056,
0.17197498679161072,
-0.32854244112968445,
-0.3881804645061493,
0.0009275302290916443,
-0.28652840852737427,
0.12069071829319,
0.058967504650354385,
-0.07000259310007095,
-0.11940690129995346,
-0.05996650829911232,
-0.0071770139038562775,
-0.12041258066892624,
-0.1025010496377945,
-0.1917671114206314,
0.038368888199329376,
-0.36210307478904724,
-0.4651753008365631,
-0.1759568154811859,
-0.11255111545324326,
0.33325567841529846,
0.4292494058609009,
0.5199063420295715,
0.1588802933692932,
-0.18183395266532898,
0.15022262930870056,
0.3433416485786438,
0.18931317329406738,
0.3401162326335907,
-0.11886728554964066,
0.15065643191337585,
-0.09514395147562027,
-0.15574045479297638,
0.29064029455184937,
-0.08177884668111801,
-0.15658025443553925,
-0.008930947631597519,
0.10216914117336273,
0.08562833815813065,
-0.1682281196117401,
-0.20937751233577728,
0.163099005818367,
0.2056979537010193,
-0.2603711783885956,
-0.15411201119422913,
0.12182998657226562,
-0.05691197142004967,
-0.16057297587394714,
-0.3958008289337158,
0.10403212904930115,
-0.11886245757341385,
-0.3285268545150757,
-0.19781991839408875,
0.05627625063061714,
0.005447801202535629,
0.0675542801618576,
0.14925998449325562,
-0.20128491520881653,
0.4375043511390686,
-0.07457787543535233,
0.2316794991493225,
-0.05670589208602905,
0.32547470927238464,
-0.018985193222761154,
0.06892864406108856,
0.2251051515340805,
-0.06935286521911621,
0.2178829461336136,
-0.03238183632493019,
-0.1107456237077713,
-0.310033917427063,
0.3561432957649231,
-0.12946707010269165,
-0.16466452181339264,
0.31786322593688965,
0.24247513711452484,
-0.621073305606842,
-0.24334242939949036,
-0.30211588740348816,
0.41538548469543457,
-0.09818700700998306,
-0.20410755276679993,
-0.020338773727416992,
-0.1193993091583252,
0.06823553144931793,
-0.21436305344104767,
0.3045640289783478,
0.110317662358284,
-0.11114352941513062,
-0.08007228374481201,
0.22170688211917877,
-0.040788281708955765,
0.05178293213248253,
0.05405426770448685,
-0.042764902114868164,
-0.24300479888916016,
-0.05723388493061066,
0.17360205948352814,
0.3769562244415283,
-0.15897926688194275,
-0.13494007289409637,
-0.03315672278404236,
-0.21711446344852448,
-0.1006631851196289,
0.14981704950332642,
-0.08050402253866196,
0.16729338467121124,
-0.13743987679481506,
-0.18568161129951477,
0.12184541672468185,
-0.20289139449596405,
0.018454482778906822,
-0.42381012439727783,
-0.2053619623184204,
0.3437221050262451,
-0.06821419298648834,
0.010360438376665115,
-0.29394739866256714,
0.007806912064552307,
0.015527921728789806,
0.13620799779891968,
0.1302017718553543,
-0.12279599159955978,
0.21045903861522675,
0.18684785068035126,
-0.3276835083961487,
0.09442262351512909,
-0.0963011160492897,
-0.19950252771377563,
0.3398898243904114,
0.36153656244277954,
0.16208544373512268,
0.667542576789856,
-0.1309022605419159,
-0.39886602759361267,
0.10484793037176132,
-0.1167537122964859,
-0.24482879042625427,
0.12769915163516998,
0.02248137816786766,
0.06401166319847107,
-0.04094890505075455,
-0.26487207412719727,
-0.12056706100702286,
-0.27823078632354736,
-0.0588955357670784,
0.1076679676771164,
0.45149892568588257,
-0.10033433884382248,
-0.0928502082824707,
0.1537720263004303,
0.05974925309419632,
-0.05923077464103699,
-0.16797499358654022,
-0.04498336836695671,
0.21496474742889404,
0.23450247943401337,
0.3967016935348511,
0.5926070213317871,
0.48322683572769165,
0.1302337497472763,
-0.4008481800556183,
0.005455970764160156,
-0.1421518325805664,
-0.012101812288165092,
0.07825546711683273,
-0.004094719886779785,
0.5423493385314941,
-0.004758946597576141,
-0.024400360882282257,
0.1844097226858139,
-0.040017206221818924,
0.016011828556656837,
0.022838566452264786,
-0.14251062273979187,
0.07880139350891113,
0.006102949380874634,
-0.29629388451576233,
-0.17349304258823395,
0.07475853711366653,
-0.1455049365758896,
0.10939787328243256,
0.32034677267074585,
0.016372330486774445,
-0.04211825877428055,
0.06585882604122162,
-0.0669589415192604,
-0.3520914316177368,
-0.0452132374048233,
0.23166753351688385,
0.2718406319618225,
0.2748383581638336,
0.518314003944397,
-0.16752474009990692,
0.07181146740913391,
0.11772039532661438,
0.27470189332962036,
0.16202619671821594,
0.36123237013816833,
0.06413868814706802,
0.013986526988446712,
-0.030353061854839325,
0.07873983681201935,
0.0004977993667125702,
0.2543192505836487,
-0.012608341872692108,
-0.2655350863933563,
-0.18245212733745575,
-0.05299234390258789,
0.495504230260849,
-0.14873391389846802,
-0.2569099962711334,
-0.2974277436733246,
-0.1817663311958313,
0.1917511522769928,
-0.20663535594940186,
0.1184532642364502,
0.14405374228954315,
-0.10227477550506592,
0.16838830709457397,
-0.3601236939430237,
-0.010455811396241188,
-0.36288338899612427,
-0.29072919487953186,
-0.06913179904222488,
0.24975624680519104,
0.02022317796945572,
-0.1943964958190918,
0.5272140502929688,
-0.024931931868195534,
-0.033368393778800964,
0.025106295943260193,
-0.33808764815330505,
-0.020647160708904266,
-0.23342318832874298,
0.6151623725891113,
-0.021351955831050873,
0.1114935427904129,
-0.12273405492305756,
-0.050487127155065536,
0.15101660788059235,
-0.367094486951828,
-0.20250561833381653,
-0.4389241337776184,
0.03942004591226578,
0.16747120022773743,
0.014184016734361649,
-0.728732705116272,
-0.31397104263305664,
-0.13643339276313782,
0.0277884379029274,
0.07813338935375214,
0.02079480141401291,
0.09374316036701202,
-0.07628422230482101,
-0.013615828938782215,
0.24639521539211273,
0.12306320667266846,
-0.1112484484910965,
-0.2469577044248581,
0.070965476334095,
-0.2565825581550598,
-0.2834365665912628,
0.008268464356660843,
-0.23424850404262543,
0.5369318127632141,
-0.2553293704986572,
-0.4300386905670166,
0.1072041466832161,
0.13850317895412445,
0.17006897926330566,
0.3131312429904938,
-0.3208162188529968,
-0.0004080161452293396,
0.07823850214481354,
-0.26346293091773987,
-0.2218330204486847,
-0.2145446389913559,
0.019222624599933624,
0.13012659549713135,
0.00014179199934005737,
0.22009506821632385,
-0.05047143995761871,
0.1129409670829773,
1.2106729745864868,
0.3273594081401825,
-0.219505175948143,
0.0636017769575119,
-0.19271543622016907,
0.07518012076616287,
-0.022197917103767395,
-0.12518145143985748,
-0.15122435986995697,
0.08742078393697739,
-0.18557702004909515,
0.17364107072353363,
0.2079460322856903,
-0.04672744870185852,
-0.12022728472948074,
0.09990110993385315,
-0.27889522910118103,
-0.07511818408966064,
-0.2139841914176941,
-0.3132949471473694,
0.1975214034318924,
0.11571571230888367,
-0.1154131144285202,
-0.04772249609231949,
-0.10135312378406525,
-0.03833648934960365,
0.1806686818599701,
0.013311132788658142,
-0.18006333708763123,
-0.5068638920783997,
-0.011303993873298168,
-0.04311361908912659,
0.2794249653816223,
0.07951655238866806,
0.16193793714046478,
-0.16195885837078094,
-0.053528495132923126,
-0.03298035264015198,
-0.13304857909679413,
-0.03554971516132355,
-0.3102976679801941,
0.02616911381483078,
0.1630445271730423,
-0.21689271926879883,
-0.008113803341984749,
0.0866062194108963,
0.011535976082086563,
0.056601107120513916,
0.48076194524765015,
-0.048989832401275635,
0.04975865036249161,
-0.37071946263313293,
0.02352321334183216,
0.04252243787050247,
-0.18899808824062347,
0.2285548597574234,
-0.1610233038663864,
-0.10480538755655289,
-0.16232824325561523,
0.03505587950348854,
0.017996327951550484,
-0.07483191043138504,
-0.5981103777885437,
-0.14241544902324677,
0.10414990037679672,
0.044302307069301605,
0.4162410497665405,
-0.022028101608157158,
0.2759789228439331,
0.20454253256320953,
0.45969921350479126,
0.4485517740249634,
-0.18588100373744965,
0.0823456272482872,
0.3713401257991791,
-0.07989349961280823,
0.3677317798137665,
0.07147116959095001,
-0.1460966169834137,
0.5774688720703125,
0.2619872987270355,
0.028113678097724915,
-0.18518370389938354,
-0.10397444665431976,
-0.2885439991950989,
-0.30334705114364624,
0.1477828174829483,
0.13475294411182404,
0.08646824955940247,
-0.20019583404064178,
-0.6305395364761353,
0.19750100374221802,
0.2010253667831421,
-0.35368025302886963,
0.35937565565109253,
-0.0789748877286911,
0.040888458490371704,
0.07144159078598022,
0.016114182770252228,
0.7185249924659729,
0.031130507588386536,
0.040837615728378296,
-0.06336760520935059,
-0.08313969522714615,
-0.058295585215091705,
-0.1969098597764969,
-0.06501249969005585,
-0.45128685235977173,
-0.3052612841129303,
0.06463546305894852,
-0.23999875783920288,
0.09653688967227936,
0.04617340862751007,
0.0533527247607708,
0.21372534334659576,
0.07489953935146332,
-0.09268741309642792,
-0.02791350893676281,
0.11692427098751068,
0.19150139391422272,
0.25687175989151,
0.07795517891645432,
0.19293086230754852,
0.069170281291008,
0.1767725944519043,
0.14893171191215515,
-0.08961638808250427,
-0.2012273222208023,
-0.3708190321922302,
-0.517616868019104,
-0.031612224876880646,
-0.05101320520043373,
-0.11267818510532379,
0.025628715753555298,
-0.4053792357444763,
0.21617825329303741,
0.5042456984519958,
0.1690029799938202,
-0.02111002430319786,
-0.09405435621738434,
0.23469844460487366,
-0.20692574977874756,
0.17750690877437592,
0.2685362994670868,
0.26439839601516724,
0.29870426654815674,
-0.17362523078918457,
-0.29506492614746094,
0.22390812635421753,
-0.23795105516910553,
0.12177808582782745,
-0.20315730571746826,
-0.035672493278980255,
0.28828030824661255,
-0.2387648969888687,
0.17265458405017853,
0.04296671226620674,
-0.05366365611553192,
-0.2230571210384369,
0.2215283066034317,
0.18275883793830872,
-0.05918343365192413,
0.14842259883880615,
0.27330970764160156,
-0.16222967207431793,
-0.033139195293188095,
0.3201949894428253,
0.18136298656463623,
-0.09814433753490448,
0.4658168852329254,
-0.06539931893348694,
-0.03768574073910713,
-0.3925323188304901,
0.39458349347114563,
0.3197173774242401,
-0.16131708025932312,
0.13431651890277863,
-0.08279231190681458,
0.08195652067661285,
0.15264414250850677,
0.5572658777236938,
0.31547677516937256,
0.00911661982536316,
-0.15291568636894226,
-0.12012626230716705,
-0.01605924591422081,
0.07212363183498383,
-0.30676326155662537,
0.4167076051235199,
-0.18846091628074646,
-0.5972598195075989,
0.036075592041015625,
0.283835232257843,
-0.42200079560279846,
0.09865382313728333,
-0.18594232201576233,
0.10166098922491074,
0.11570833623409271,
0.04262496531009674,
0.310792475938797,
0.021316783502697945,
0.21265025436878204,
-0.2934311628341675,
-0.17010734975337982,
-0.3000240623950958,
-0.08177095651626587,
0.10477876663208008,
-0.12810006737709045,
0.04129393398761749,
-0.38666772842407227,
0.0008956398814916611,
-0.05657210573554039,
-0.02353750541806221,
0.07731074094772339,
-0.18034067749977112,
0.04967982694506645,
0.43355056643486023,
0.13282226026058197,
0.113992840051651,
-0.03134071081876755,
0.09870372712612152,
0.05904624983668327,
0.6497113108634949,
0.054072167724370956,
0.10726216435432434,
0.2401762753725052,
-0.11768358945846558,
-0.09703478962182999,
0.10327749699354172,
0.0982733741402626,
-0.15665915608406067,
0.2506430745124817,
-0.18245309591293335,
0.18130575120449066,
0.15215711295604706,
0.3487754762172699,
-0.07823939621448517,
-0.21794092655181885,
0.18713067471981049,
0.0157743152230978,
0.2566325068473816,
-0.07911853492259979,
-0.10024678707122803,
0.15079365670681,
0.05538884922862053,
0.11269800364971161,
0.1759253442287445,
0.5118086338043213,
-0.012166805565357208,
0.14192520081996918,
0.16052046418190002,
0.2285178005695343,
-0.2283696085214615,
0.350443035364151,
-0.17747671902179718,
-0.07844720780849457,
0.03971172124147415,
0.113749660551548,
0.033849358558654785,
0.13017205893993378,
-0.14714625477790833,
0.11981649696826935,
0.6880674362182617,
0.34557557106018066,
-0.02186800166964531,
0.002971053123474121,
-0.19395999610424042,
0.2410518079996109,
-0.13619276881217957,
0.10806405544281006,
0.04136583209037781,
0.09500770270824432,
0.6839951872825623,
-0.0069869039580225945,
0.1802152842283249,
-0.24071532487869263,
-0.2542263865470886,
0.04743390902876854,
-0.04683935269713402,
0.18620772659778595,
-0.3324165344238281,
-0.24058739840984344,
-0.0999501496553421,
-0.04670773819088936,
0.11155422031879425,
0.29171639680862427,
-0.05828322470188141,
0.18531814217567444,
-0.14132992923259735,
0.323801726102829,
0.23308727145195007,
-0.046406425535678864,
-0.29486504197120667,
0.22502288222312927,
-0.016324177384376526,
-0.08544446527957916,
0.1405864953994751,
0.39345303177833557,
0.3710730969905853,
-0.10666671395301819,
-0.37427833676338196,
-0.20255227386951447,
0.04032522067427635,
-0.1668349653482437,
-0.022620204836130142,
0.34008994698524475,
-0.11548982560634613,
-0.3748779892921448,
0.34899449348449707,
0.27705422043800354,
-0.060615986585617065,
-0.0007209964096546173,
0.17012180387973785,
-0.12068009376525879,
-0.2029057741165161,
0.5408695936203003,
0.017191922292113304,
-0.0640416368842125,
-0.015046227723360062,
0.021383725106716156,
-0.32217496633529663,
-0.26379454135894775,
0.3815346658229828,
-0.029941638931632042,
-0.07206102460622787,
-0.06755515933036804,
0.13555337488651276,
-0.05337946489453316,
0.4942828416824341,
-0.019115593284368515,
0.3656119704246521,
-0.29197102785110474,
-0.16072382032871246,
-0.22648848593235016,
0.07165136188268661,
0.5041435956954956,
0.13392312824726105,
0.12251187860965729,
0.0957554429769516,
0.1908077895641327,
0.17249053716659546,
0.19691339135169983,
-0.22080141305923462,
-0.08691193163394928,
0.3794533908367157,
-0.42135104537010193,
-0.01967238262295723,
-0.34920012950897217,
0.12962961196899414,
0.019105985760688782,
0.0250668004155159,
-0.11469852924346924,
-0.2825486958026886,
-0.012156583368778229,
-0.2955877184867859,
-0.24376541376113892,
0.40591737627983093,
0.05619381368160248,
0.40257301926612854,
-0.14560174942016602,
0.8773338794708252,
0.013224903494119644,
-0.15779702365398407,
-0.005294386297464371,
-0.46946051716804504,
0.17087602615356445,
-0.026008330285549164,
-0.26998773217201233,
0.061311230063438416,
-0.063088059425354,
-0.06511986255645752,
-0.09582176059484482,
-0.2657933533191681,
0.05011770874261856,
0.03948128968477249,
-0.018856383860111237,
-0.2808690369129181,
-0.1967357099056244,
-0.011931827291846275,
0.21823973953723907,
0.2776322066783905,
-0.05985884368419647,
0.12448938190937042,
-0.15242232382297516,
0.022665681317448616,
0.4759708344936371,
0.07156510651111603,
0.03383808955550194,
-0.43231266736984253,
0.22096386551856995,
0.22726446390151978,
-0.017858395352959633,
-0.44358211755752563,
-0.10766058415174484,
0.5402593016624451,
0.12895283102989197,
-0.07591351866722107,
0.19785647094249725,
0.321353942155838,
0.12043651938438416,
-0.015420107170939445,
0.15946024656295776,
-0.3088410198688507,
0.07376933842897415,
-0.11962223052978516,
-0.05943484231829643
] |
https://github.com/huggingface/datasets/issues/2165 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset | Hi,
a HF dataset can be converted to a Torch Dataset with a simple wrapper as follows:
```python
from torch.utils.data import Dataset
class HFDataset(Dataset):
def __init__(self, dset):
self.dset = dset
def __getitem__(self, idx):
return self.dset[idx]
def __len__(self):
return len(self.dset)
train_ds = HFDataset(train_ds)
```
@lhoestq Since the Arrow Dataset already provides `__getitem__` and `__len__`, I think we could use the [virtual subclass](https://docs.python.org/3/library/abc.html#abc.ABCMeta.register) mechanism from the `abc` module to elegantly solve this issue. This mechanism would allow the Arrow Dataset to be used in place of the Torch Dataset because the `isinstance(instance of Arrow Dataset, TorchDataset)` check would return True (DeepSpeed has this check [here](https://github.com/microsoft/DeepSpeed/blob/ab5534fc4c0f8ca21ada321f9730d723aa31288b/deepspeed/runtime/engine.py#L823)).
And it requires a minimal change in the `arrow_dataset.py` file:
```python
if config.TORCH_AVAILABLE:
from torch.utils.data import Dataset as TorchDataset
TorchDataset.register(Dataset)
``` | Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 124 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
Hi,
a HF dataset can be converted to a Torch Dataset with a simple wrapper as follows:
```python
from torch.utils.data import Dataset
class HFDataset(Dataset):
def __init__(self, dset):
self.dset = dset
def __getitem__(self, idx):
return self.dset[idx]
def __len__(self):
return len(self.dset)
train_ds = HFDataset(train_ds)
```
@lhoestq Since the Arrow Dataset already provides `__getitem__` and `__len__`, I think we could use the [virtual subclass](https://docs.python.org/3/library/abc.html#abc.ABCMeta.register) mechanism from the `abc` module to elegantly solve this issue. This mechanism would allow the Arrow Dataset to be used in place of the Torch Dataset because the `isinstance(instance of Arrow Dataset, TorchDataset)` check would return True (DeepSpeed has this check [here](https://github.com/microsoft/DeepSpeed/blob/ab5534fc4c0f8ca21ada321f9730d723aa31288b/deepspeed/runtime/engine.py#L823)).
And it requires a minimal change in the `arrow_dataset.py` file:
```python
if config.TORCH_AVAILABLE:
from torch.utils.data import Dataset as TorchDataset
TorchDataset.register(Dataset)
``` | [
-0.2578473687171936,
-0.2652204632759094,
0.09229055047035217,
0.3382234573364258,
0.19224409759044647,
0.22271451354026794,
-0.03027305379509926,
0.3457014560699463,
-0.1513579934835434,
-0.18866340816020966,
-0.34864741563796997,
0.324899286031723,
-0.19426940381526947,
-0.14205330610275269,
0.18684060871601105,
-0.2680394649505615,
0.16732749342918396,
-0.0773855596780777,
-0.24669623374938965,
-0.15441074967384338,
-0.13866585493087769,
-0.12028874456882477,
0.07646413147449493,
0.07471274584531784,
0.06710029393434525,
0.09340379387140274,
0.09477810561656952,
0.1692151427268982,
-0.023705987259745598,
-0.3378916084766388,
0.2977360785007477,
0.06488638371229172,
0.5751038789749146,
0.25614750385284424,
-0.00012732316099572927,
0.27603185176849365,
0.09355781227350235,
-0.07557715475559235,
0.03127973899245262,
-0.06703153252601624,
-0.05232837051153183,
-0.03477594256401062,
0.19301781058311462,
-0.10164736956357956,
-0.3808221220970154,
-0.5978338718414307,
-0.17272265255451202,
-0.5317306518554688,
0.04688514024019241,
0.47963958978652954,
0.052202679216861725,
0.23595285415649414,
-0.015918325632810593,
0.07264114171266556,
0.2887389361858368,
-0.09783412516117096,
-0.18215203285217285,
0.14891546964645386,
0.0003684386610984802,
0.11054350435733795,
-0.144072026014328,
0.18996675312519073,
-0.16283807158470154,
-0.004865184426307678,
0.4622434079647064,
-0.19837677478790283,
-0.38285213708877563,
-0.1405881941318512,
-0.11103782802820206,
0.44824913144111633,
0.17853111028671265,
-0.3304382562637329,
-0.1622338593006134,
0.09137796610593796,
-0.04022783786058426,
-0.14710469543933868,
-0.3329947590827942,
0.15912973880767822,
0.013326678425073624,
0.14572086930274963,
0.03419352322816849,
-0.03485332801938057,
-0.1720404028892517,
0.05667784810066223,
0.17030489444732666,
0.25678449869155884,
0.11480638384819031,
0.20050948858261108,
0.11223487555980682,
-0.30056053400039673,
0.4763331413269043,
-0.2886345386505127,
0.019953735172748566,
-0.12535050511360168,
-0.10233151912689209,
-0.0023473314940929413,
-0.3257407546043396,
-0.07702856510877609,
0.4265948235988617,
0.10552437603473663,
0.35005617141723633,
0.31157881021499634,
-0.1508314460515976,
0.048858724534511566,
-0.07834143936634064,
-0.10557246208190918,
0.10026807337999344,
0.2584202289581299,
-0.0067846402525901794,
-0.24173037707805634,
0.012630138546228409,
0.2741793692111969,
-0.055022791028022766,
-0.3046225607395172,
0.0989656001329422,
-0.00022304803133010864,
-0.12256938964128494,
-0.14708317816257477,
-0.29468289017677307,
-0.09638183563947678,
-0.33445093035697937,
0.004502441268414259,
0.165803000330925,
0.19509665668010712,
-0.00691627711057663,
0.155990868806839,
0.4160037636756897,
0.5736424922943115,
-0.2732749283313751,
-0.04428288713097572,
0.039262805134058,
0.1037556529045105,
-0.020407551899552345,
-0.2133432924747467,
-0.06195071339607239,
-0.18951480090618134,
0.0589851438999176,
-0.027274608612060547,
-0.13819926977157593,
0.20872512459754944,
0.4373680353164673,
-0.13682305812835693,
0.2677765488624573,
0.034186288714408875,
0.0437847338616848,
0.010727709159255028,
0.3737199008464813,
0.4464452862739563,
-0.2962796092033386,
0.2520727515220642,
-0.35425880551338196,
-0.22941268980503082,
-0.029993196949362755,
0.02910945937037468,
0.15189123153686523,
-0.3381064832210541,
-0.25967809557914734,
0.3441299498081207,
-0.047192759811878204,
0.05709640309214592,
0.04228804633021355,
-0.45226991176605225,
-0.39209818840026855,
-0.1631953865289688,
0.2866367995738983,
0.2642969489097595,
-0.4543378949165344,
-0.10825949907302856,
0.06696474552154541,
-0.1349179595708847,
0.11498186737298965,
0.22266480326652527,
-0.23855257034301758,
-0.021237194538116455,
-0.3799104690551758,
-0.11902952194213867,
0.5021677613258362,
-0.3953184485435486,
0.05041135102510452,
0.06121653690934181,
0.13708600401878357,
-0.08835849165916443,
0.06132291629910469,
0.060832053422927856,
-0.12937460839748383,
-0.12115731835365295,
0.17774231731891632,
0.19317185878753662,
-0.15149718523025513,
-0.2278323620557785,
-0.12857221066951752,
-0.198190376162529,
0.3369714617729187,
-0.048943571746349335,
0.20178541541099548,
0.21323102712631226,
-0.14835092425346375,
-0.31614232063293457,
0.2712278664112091,
-0.018926601856946945,
0.1627960503101349,
0.2168646901845932,
-0.29543933272361755,
0.17372824251651764,
-0.051365926861763,
0.11182364076375961,
0.07116332650184631,
0.1300416886806488,
0.06477624922990799,
0.07387450337409973,
0.10800780355930328,
0.03627518564462662,
-0.19979780912399292,
0.18032237887382507,
-0.11324681341648102,
0.017049651592969894,
-0.06583180278539658,
-0.08469849824905396,
-0.14952057600021362,
-0.24796178936958313,
-0.04766496643424034,
0.2230955958366394,
-0.4051269590854645,
0.15768902003765106,
-0.5375215411186218,
0.2642348110675812,
0.1351727694272995,
0.15161488950252533,
-0.04618988186120987,
0.2652031481266022,
0.08879872411489487,
0.030628636479377747,
-0.17220351099967957,
0.21927639842033386,
0.03699682652950287,
-0.07043051719665527,
0.2098781168460846,
0.29183992743492126,
0.10836897045373917,
-0.9760194420814514,
0.405599981546402,
0.4391723871231079,
0.1616523414850235,
-0.02631979063153267,
-0.06549433618783951,
0.7372555136680603,
0.27746301889419556,
0.3000273108482361,
-0.024951618164777756,
0.013337193056941032,
0.02030852995812893,
0.17961326241493225,
-0.2465766966342926,
0.04844265431165695,
-0.15903215110301971,
0.06465791165828705,
0.3350362479686737,
-0.06736677139997482,
-0.2600281834602356,
0.0720839649438858,
-0.06378407776355743,
-0.06975512206554413,
0.08923943340778351,
0.26960885524749756,
-0.5429382920265198,
-0.020052477717399597,
0.28408730030059814,
-0.1175013929605484,
0.24781551957130432,
0.12579913437366486,
0.24532915651798248,
0.019235674291849136,
-0.15483582019805908,
0.11667715013027191,
0.31369563937187195,
0.10292444378137589,
0.37336498498916626,
-0.0712377056479454,
0.02625240571796894,
-0.06058967486023903,
-0.27551740407943726,
-0.02742733433842659,
-0.1287207156419754,
-0.10861906409263611,
-0.4903787076473236,
0.23093737661838531,
-0.3518226742744446,
0.047706879675388336,
-0.31231650710105896,
-0.125967338681221,
0.06941330432891846,
-0.17676672339439392,
-0.10421609878540039,
-0.02950417622923851,
0.140805184841156,
0.11300398409366608,
-0.4155536890029907,
-0.29490017890930176,
0.1695127636194229,
-0.4143013656139374,
0.05176611244678497,
-0.16805173456668854,
-0.18295994400978088,
-0.08210904896259308,
0.10179244726896286,
-0.01412426121532917,
0.3234539330005646,
0.23526309430599213,
-0.036473240703344345,
-0.4555361866950989,
-0.12376701831817627,
0.08573193848133087,
-0.16822627186775208,
0.11825615167617798,
0.16633084416389465,
0.04599878937005997,
0.24557025730609894,
0.031515929847955704,
0.08449921756982803,
0.06413697451353073,
-0.03130210563540459,
0.09451161324977875,
-0.406016081571579,
0.17351855337619781,
0.3860553801059723,
-0.1754041612148285,
-0.3225274682044983,
-0.2034178227186203,
-0.40239620208740234,
0.05764180049300194,
0.05360652506351471,
-0.017600730061531067,
0.35702255368232727,
0.16868050396442413,
0.2799852192401886,
-0.004859333857893944,
-0.12544502317905426,
-0.0701351910829544,
0.3763887286186218,
-0.0555458664894104,
-0.2689592242240906,
-0.14321404695510864,
-0.322836697101593,
0.20733313262462616,
0.3074101209640503,
-0.3161610960960388,
0.06216434761881828,
-0.23116563260555267,
0.36002570390701294,
0.013612322509288788,
-0.02506343089044094,
0.3019002377986908,
-0.17037881910800934,
0.10239580273628235,
-0.1909874677658081,
-0.21498356759548187,
-0.023028075695037842,
-0.27904629707336426,
0.295226514339447,
0.35442009568214417,
0.4846104681491852,
-0.1506832242012024,
1.0412967205047607,
-0.04656820744276047,
-0.3697226047515869,
0.39737582206726074,
-0.12642519176006317,
0.1498176008462906,
-0.1833273470401764,
-0.2263837456703186,
-0.11054826527833939,
-0.22651726007461548,
0.28025150299072266,
0.07997950911521912,
-0.10034595429897308,
-0.17052222788333893,
0.06933604925870895,
0.12144863605499268,
-0.030639570206403732,
-0.16608627140522003,
0.23295509815216064,
-0.8961455225944519,
0.01768668368458748,
0.002134067937731743,
0.1300472915172577,
-0.3229358494281769,
0.02317919209599495,
0.07322809100151062,
0.21521732211112976,
0.1483137458562851,
0.18050970137119293,
-0.3862231969833374,
0.20531131327152252,
-0.23714697360992432,
0.4286133050918579,
0.056274332106113434,
0.47419390082359314,
0.14644847810268402,
-0.1573113203048706,
-0.02516133338212967,
-0.014780621975660324,
0.24043793976306915,
-0.12795811891555786,
-0.09472647309303284,
0.07710231840610504,
-0.09215223789215088,
-0.5414336919784546,
-0.024600928649306297,
0.08466944098472595,
-0.11949194222688675,
-0.14289718866348267,
-0.06924310326576233,
-0.14836576581001282,
-0.387834370136261,
0.04759099334478378,
-0.05777348577976227,
-0.09820081293582916,
0.3453837037086487,
-0.007008802145719528,
-0.26758909225463867,
0.00008560158312320709,
-0.0048480406403541565,
0.11225318163633347,
-0.06894446909427643,
-0.10972633957862854,
-0.21792756021022797,
-0.45579466223716736,
-0.009742217138409615,
0.2941734790802002,
-0.20024292171001434,
0.2585790157318115,
-0.1388329118490219,
0.07534162700176239,
-0.1527339667081833,
0.28499236702919006,
0.2438029944896698,
0.4379943013191223,
-0.1970749944448471,
-0.2902020514011383,
0.009669276885688305,
0.3952711820602417,
0.3297526240348816,
0.15254829823970795,
-0.12252195179462433,
0.23076462745666504,
0.07327239215373993,
-0.2015489786863327,
-0.35930776596069336,
0.0972253829240799,
0.22850383818149567,
0.043652791529893875,
-0.378101646900177,
-0.5780892372131348,
0.7419284582138062,
0.26881858706474304,
0.14544114470481873,
0.19537796080112457,
0.35539376735687256,
-0.3011118173599243,
0.6170402765274048,
0.33953243494033813,
0.9867919087409973,
-0.0691075325012207,
0.3258780241012573,
0.054207101464271545,
-0.2959997057914734,
0.0721045434474945,
-0.05043431743979454,
-0.05822791904211044,
-0.4126890301704407,
-0.14770932495594025,
-0.1338685154914856,
-0.16220906376838684,
0.005724672228097916,
0.06891411542892456,
0.31536343693733215,
0.17802834510803223,
-0.0744580402970314,
-0.03839096799492836,
0.09624028950929642,
0.07236876338720322,
-0.17905661463737488,
-0.2455155849456787,
0.04996197670698166,
0.13404640555381775,
-0.1460225135087967,
0.034926194697618484,
0.026711061596870422,
-0.23254115879535675,
-0.21484719216823578,
-0.047487493604421616,
-0.09264609962701797,
0.09688593447208405,
-0.4661184549331665,
0.17137326300144196,
-0.10452263057231903,
-0.7122542858123779,
0.33750805258750916,
0.28543680906295776,
0.3511962890625,
-0.1926301121711731,
-0.13501963019371033,
0.15177805721759796,
0.39610525965690613,
-0.037302665412425995,
0.02676631510257721,
-0.22335335612297058,
0.4106798470020294,
0.10689162462949753,
0.03535305708646774,
0.017552927136421204,
-0.0071007623337209225,
-0.3052247166633606,
-0.31451016664505005,
-0.12452353537082672,
0.5930761694908142,
-0.2819995880126953,
-0.37190642952919006,
0.23803062736988068,
-0.09270906448364258,
-0.06759297102689743,
0.00904370192438364,
0.06960645318031311,
-0.11062493920326233,
-0.010709531605243683,
0.13454842567443848,
-0.30212587118148804,
0.06001409888267517,
0.35905835032463074,
0.24006688594818115,
0.3162532150745392,
0.3917657732963562,
0.16924652457237244,
-0.055695995688438416,
-0.006531849503517151,
0.29756057262420654,
1.0077922344207764,
-0.24587446451187134,
-0.009940789081156254,
-0.11704768985509872,
-0.1609710454940796,
0.10379774123430252,
-0.1634286642074585,
0.00810297206044197,
-0.055374570190906525,
-0.10876739025115967,
-0.1185111403465271,
-0.45559942722320557,
0.07485654950141907,
-0.40610721707344055,
0.24913302063941956,
-0.1225534975528717,
0.017225930467247963,
-0.3211314380168915,
0.015514733269810677,
-0.1448335200548172,
0.11273057013750076,
0.26514139771461487,
0.13708344101905823,
-0.11976602673530579,
0.1266104280948639,
0.006929134950041771,
0.17730671167373657,
0.0005028042942285538,
0.07910528033971786,
-0.18282221257686615,
-0.10518991947174072,
-0.27314621210098267,
0.19610165059566498,
0.06831386685371399,
-0.15516038239002228,
0.09948596358299255,
-0.28535032272338867,
-0.22290697693824768,
-0.03649508208036423,
0.16837339103221893,
0.2067488431930542,
0.005913950502872467,
0.22947430610656738,
0.3034990131855011,
-0.025920294225215912,
-0.21059034764766693,
0.038348883390426636,
0.3125869929790497,
0.39469850063323975,
-0.06054707616567612,
0.09654736518859863,
-0.1757993996143341,
-0.29312410950660706,
-0.38735291361808777,
0.1752183437347412,
0.47208160161972046,
0.027349894866347313,
0.23117181658744812,
-0.039882972836494446,
0.1024806797504425,
-0.22998981177806854,
0.2298423945903778,
0.379203200340271,
-0.06111426278948784,
0.04719358682632446,
0.023112399503588676,
-0.06482750922441483,
-0.3075177073478699,
-0.056864820420742035,
-0.3594824969768524,
-0.4126647114753723,
0.00031144171953201294,
0.11422589421272278,
0.08261531591415405,
0.6105093955993652,
-0.1618749350309372,
-0.24634143710136414,
0.008111974224448204,
-0.29253411293029785,
-0.0741097629070282,
0.4579828977584839,
0.2106725424528122,
0.03257559612393379,
0.3636944890022278,
0.09115269780158997,
0.31566253304481506,
0.2562748193740845,
0.32176658511161804,
0.9033663868904114,
0.5328702926635742,
0.05199966952204704,
0.43402278423309326,
-0.3633098006248474,
-0.2659893333911896,
0.23427598178386688,
0.14085298776626587,
0.20214197039604187,
0.11766679584980011,
0.40407422184944153,
-0.0051707373932003975,
-0.4713330864906311,
0.06427711993455887,
0.05147525668144226,
0.045438628643751144,
-0.381563276052475,
-0.17366008460521698,
0.011679261922836304,
-0.33814653754234314,
-0.15981552004814148,
-0.3009895384311676,
-0.20254214107990265,
-0.027390778064727783,
0.17431822419166565,
-0.013437941670417786,
-0.10402204096317291,
0.054718129336833954,
0.23190340399742126,
-0.15014153718948364,
-0.042954716831445694,
0.07670427858829498,
-0.09779560565948486,
-0.09068842232227325,
0.05011017620563507,
0.23828521370887756,
0.17931315302848816,
0.038745082914829254,
-0.31017374992370605,
-0.030237268656492233,
0.5008479952812195,
-0.15785019099712372,
0.2633671164512634,
-0.11670403182506561,
0.03303147479891777,
-0.08956383168697357,
0.33503490686416626,
-0.004501622170209885,
0.04566599056124687,
-0.001875080168247223,
-0.036082129925489426,
-0.011833013966679573,
-0.08065448701381683,
0.46867692470550537,
0.0381002202630043,
0.01397668570280075,
-0.17364469170570374,
0.08243554830551147,
-0.2970455288887024,
-0.14477190375328064,
0.6065618991851807,
-0.1959422528743744,
0.12753060460090637,
0.03945677727460861,
-0.015610948204994202,
-0.055997077375650406,
0.2712171673774719,
0.29096829891204834,
0.01285644993185997,
-0.4178183078765869,
0.056424424052238464,
-0.2842060923576355,
-0.06004824489355087,
-0.0816405862569809,
0.06322440505027771,
-0.016659894958138466,
0.005641605705022812,
0.3884035348892212,
0.01998228020966053,
-0.004637658596038818,
-0.03725004196166992,
0.2183651477098465,
0.45700424909591675,
0.02432747557759285,
-0.23599351942539215,
-0.1582067757844925,
0.34398046135902405,
-0.047092847526073456,
-0.3401719033718109,
-0.18343819677829742,
0.26652222871780396,
-0.09882943332195282,
0.04169240593910217,
-0.2853512465953827,
0.5871300101280212,
-0.055839650332927704,
0.36129701137542725,
0.013454018160700798,
0.4425632357597351,
-0.19351288676261902,
0.05624731630086899,
0.05606125295162201,
-0.05141965672373772,
-0.435149222612381,
0.18677383661270142,
-0.16839513182640076,
0.3249015808105469,
-0.01797311007976532,
-0.21465788781642914,
-0.05552326515316963,
0.11308147758245468,
-0.019212843850255013,
-0.48316943645477295,
-0.3689865171909332,
0.5198549628257751,
-0.33630988001823425,
0.05452221259474754,
0.21587403118610382,
0.5405635833740234,
0.15996219217777252,
0.28158822655677795,
-0.2493225336074829,
-0.1977890580892563,
0.5602641105651855,
0.08794645220041275,
-0.012767614796757698,
0.10009327530860901,
-0.09095525741577148,
0.2509337365627289,
0.08420806378126144,
-0.3041745126247406,
-0.10447545349597931,
0.13969002664089203,
-0.22591054439544678,
0.0817541778087616,
0.13318970799446106,
0.29299136996269226,
0.2363063544034958,
-0.3110002279281616,
0.400189608335495,
0.15462860465049744,
0.07438965886831284,
-0.13391517102718353,
-0.2898061275482178
] |
https://github.com/huggingface/datasets/issues/2165 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset | Interesting ! Thanks for sharing this @mariosasko . I like the idea
This looks like something we should add IMO | Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 20 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
Interesting ! Thanks for sharing this @mariosasko . I like the idea
This looks like something we should add IMO | [
-0.27043142914772034,
-0.35523155331611633,
0.057833876460790634,
0.32740235328674316,
0.13080257177352905,
0.22874748706817627,
-0.07467082142829895,
0.3752875328063965,
-0.1519821137189865,
-0.2421412318944931,
-0.3885171115398407,
0.3905746340751648,
-0.24195609986782074,
0.015907226130366325,
0.17494705319404602,
-0.30655384063720703,
0.22153860330581665,
0.08797638863325119,
-0.2604885995388031,
-0.18445023894309998,
-0.11503733694553375,
-0.09072155505418777,
0.06238630414009094,
0.10662395507097244,
0.07540810108184814,
0.021876709535717964,
0.06036980450153351,
0.13617047667503357,
-0.09120961278676987,
-0.3727338910102844,
0.16201898455619812,
0.08058103919029236,
0.6023116111755371,
0.2542232275009155,
-0.00012946498463861644,
0.12140928208827972,
0.0471353605389595,
-0.1353144645690918,
0.13334845006465912,
-0.06488415598869324,
-0.1909475028514862,
-0.016053173691034317,
0.19828270375728607,
-0.14454050362110138,
-0.31250065565109253,
-0.5852580666542053,
-0.08645522594451904,
-0.33028894662857056,
0.1317974030971527,
0.5674700140953064,
0.04482103884220123,
0.2532973885536194,
0.04113037511706352,
0.041368842124938965,
0.27099141478538513,
-0.1340620517730713,
-0.1894199699163437,
0.05144711583852768,
-0.044957950711250305,
0.15641914308071136,
-0.18687719106674194,
0.17607499659061432,
-0.13300007581710815,
0.026119418442249298,
0.355538547039032,
-0.308077871799469,
-0.3637714087963104,
-0.18336935341358185,
-0.05359654873609543,
0.543658971786499,
0.21230953931808472,
-0.24707451462745667,
-0.05360541492700577,
0.1764546036720276,
-0.040647584944963455,
-0.18321946263313293,
-0.4047416150569916,
0.2438117116689682,
-0.034479111433029175,
0.13898324966430664,
-0.019372692331671715,
-0.22091880440711975,
-0.15992556512355804,
0.04965876042842865,
0.23374485969543457,
0.33251047134399414,
0.08632524311542511,
0.17209774255752563,
0.21955721080303192,
-0.31765294075012207,
0.43504786491394043,
-0.23008784651756287,
0.013685431331396103,
-0.19053439795970917,
-0.08447949588298798,
-0.053600210696458817,
-0.36785250902175903,
-0.08700034767389297,
0.4450829327106476,
0.09143014252185822,
0.1940547078847885,
0.3110402822494507,
-0.18772730231285095,
0.08765352517366409,
-0.16550064086914062,
-0.21148745715618134,
0.13208405673503876,
0.23687845468521118,
0.015188459306955338,
-0.2638654112815857,
-0.035054273903369904,
0.2685379087924957,
-0.10659220069646835,
-0.4033835232257843,
0.02686423435807228,
0.013290639966726303,
-0.15536047518253326,
-0.19462135434150696,
-0.17890730500221252,
-0.22019441425800323,
-0.2744255065917969,
-0.041535280644893646,
0.025533800944685936,
0.24320515990257263,
-0.019785955548286438,
0.03248242288827896,
0.2451164275407791,
0.649962306022644,
-0.1770288348197937,
-0.12006175518035889,
0.02318936213850975,
0.11862118542194366,
-0.010445058345794678,
-0.178273543715477,
-0.09017708897590637,
-0.18368570506572723,
0.08311007916927338,
-0.031197447329759598,
-0.28378796577453613,
0.10421478748321533,
0.37554511427879333,
-0.10940386354923248,
0.28867286443710327,
0.03508898615837097,
0.11428986489772797,
0.007826771587133408,
0.2785111963748932,
0.41194844245910645,
-0.331003874540329,
0.27175208926200867,
-0.5120925307273865,
-0.1923474371433258,
-0.1678926944732666,
0.025982029736042023,
0.17663435637950897,
-0.3390815556049347,
-0.417864054441452,
0.3362244665622711,
0.0006459802389144897,
0.13933663070201874,
0.011186309158802032,
-0.4340934157371521,
-0.37839609384536743,
-0.19090557098388672,
0.19558221101760864,
0.26190608739852905,
-0.3799600601196289,
-0.1437559425830841,
0.1453680843114853,
-0.17730483412742615,
0.21097712218761444,
0.31444549560546875,
-0.20827580988407135,
0.06457361578941345,
-0.4396534562110901,
-0.04549025744199753,
0.6284143924713135,
-0.3011910915374756,
0.1494976431131363,
0.11732344329357147,
0.1322217434644699,
-0.27067118883132935,
0.11664724349975586,
-0.018161557614803314,
-0.07844569534063339,
-0.0447084978222847,
0.14495672285556793,
0.22853834927082062,
-0.13093715906143188,
-0.1571481078863144,
-0.12416145205497742,
-0.3072412610054016,
0.48663878440856934,
-0.0557224415242672,
0.2174057811498642,
0.29466238617897034,
-0.11261790245771408,
-0.27943965792655945,
0.3269387185573578,
-0.06871761381626129,
0.1383548080921173,
0.24324001371860504,
-0.3034927248954773,
0.026178963482379913,
-0.07940502464771271,
0.10948290675878525,
0.1647336184978485,
-0.042701222002506256,
0.016246318817138672,
0.003379538655281067,
0.07950383424758911,
0.08111471682786942,
-0.2249482274055481,
0.16495490074157715,
-0.11564727127552032,
0.07490719854831696,
-0.0818222388625145,
-0.07527357339859009,
-0.17248021066188812,
-0.15606437623500824,
-0.042330607771873474,
0.20441845059394836,
-0.37093091011047363,
0.11213484406471252,
-0.5357996225357056,
0.2550239861011505,
0.09916001558303833,
0.11605969816446304,
0.08696253597736359,
0.2077869176864624,
0.09993122518062592,
0.003445457201451063,
-0.13132500648498535,
0.18196216225624084,
0.0038002473302185535,
0.05477140471339226,
0.39072179794311523,
0.3828897178173065,
0.07894168794155121,
-1.040831208229065,
0.3747016191482544,
0.42308929562568665,
0.1125190332531929,
-0.11400412023067474,
-0.08389363437891006,
0.7048978209495544,
0.19837522506713867,
0.20451140403747559,
-0.023392032831907272,
-0.08078978210687637,
0.08933871239423752,
0.1275877207517624,
-0.20397277176380157,
0.04505421966314316,
-0.0958147943019867,
-0.03246443346142769,
0.28999367356300354,
-0.029849397018551826,
-0.39106327295303345,
-0.026577673852443695,
0.061163149774074554,
0.008654531091451645,
0.09781009703874588,
0.3565203845500946,
-0.5009667277336121,
-0.13339385390281677,
0.2598284184932709,
-0.3266514539718628,
0.12455635517835617,
0.1496167778968811,
0.16681234538555145,
0.031500231474637985,
-0.05194718763232231,
0.03576305881142616,
0.26762855052948,
-0.02450503408908844,
0.45647719502449036,
0.038347914814949036,
0.09882280975580215,
-0.08274402469396591,
-0.3403327465057373,
0.013574045151472092,
-0.14815518260002136,
-0.04268736392259598,
-0.4770849347114563,
0.12968645989894867,
-0.3740539252758026,
-0.10771320760250092,
-0.3232429623603821,
0.016059914603829384,
0.092294842004776,
-0.0635075569152832,
-0.1585208773612976,
-0.03738367184996605,
0.2656472623348236,
0.126450777053833,
-0.419235497713089,
-0.23996616899967194,
0.21902969479560852,
-0.2623656392097473,
-0.045945439487695694,
-0.18874278664588928,
-0.07974698394536972,
-0.0820251852273941,
0.09140173345804214,
0.016128817573189735,
0.29418304562568665,
0.141269713640213,
0.14447976648807526,
-0.4242697060108185,
-0.14204668998718262,
0.0025839507579803467,
-0.0993427187204361,
0.06977911293506622,
0.1595064103603363,
0.141195610165596,
0.2244943231344223,
0.05674125999212265,
0.04318417236208916,
0.041101545095443726,
-0.0407087542116642,
0.1077582985162735,
-0.41616782546043396,
0.14138421416282654,
0.4955778419971466,
-0.1301065981388092,
-0.32753413915634155,
-0.2123824954032898,
-0.3685063123703003,
0.0493372343480587,
0.14444172382354736,
-0.16093264520168304,
0.3607039153575897,
0.10277228057384491,
0.17351940274238586,
-0.024891002103686333,
-0.06947226077318192,
-0.09421853721141815,
0.34645017981529236,
-0.07779819518327713,
-0.2930298447608948,
-0.17459474503993988,
-0.2663951814174652,
0.11516855657100677,
0.19905304908752441,
-0.3448430895805359,
0.1793666034936905,
-0.15670999884605408,
0.3103543221950531,
-0.0029998868703842163,
-0.05152881145477295,
0.3110347390174866,
-0.1472959667444229,
0.14524595439434052,
-0.1825830638408661,
-0.20987176895141602,
-0.0008981898427009583,
-0.17389258742332458,
0.3357553780078888,
0.4362908899784088,
0.45673513412475586,
-0.21104179322719574,
0.9687736630439758,
-0.014885514974594116,
-0.3842714726924896,
0.5177222490310669,
-0.16331449151039124,
0.10342097282409668,
-0.19182053208351135,
-0.253487229347229,
-0.03869001194834709,
-0.08022934198379517,
0.36677300930023193,
0.09741640090942383,
-0.12482375651597977,
-0.1807948350906372,
0.08650116622447968,
0.10670310258865356,
-0.10537301003932953,
-0.059336740523576736,
0.23457033932209015,
-0.8194181323051453,
-0.07268210500478745,
0.0025316625833511353,
-0.006836779415607452,
-0.2437284290790558,
-0.055677469819784164,
0.07772460579872131,
0.3136206269264221,
0.2601487338542938,
0.22059164941310883,
-0.37070661783218384,
0.1837083250284195,
-0.2120569348335266,
0.38508814573287964,
-0.05284350365400314,
0.4841066300868988,
0.10417820513248444,
-0.06411278992891312,
0.031852006912231445,
-0.030621785670518875,
0.3866938352584839,
-0.18755879998207092,
-0.09140177071094513,
0.019415773451328278,
-0.025963194668293,
-0.44393447041511536,
-0.00572555884718895,
0.041316572576761246,
-0.043361615389585495,
-0.11644852161407471,
0.1831139326095581,
-0.15467557311058044,
-0.359622985124588,
-0.0006948318332433701,
0.0029354242142289877,
-0.11380897462368011,
0.273746520280838,
0.07681597769260406,
-0.20456820726394653,
0.0357518345117569,
0.053690239787101746,
-0.016444027423858643,
-0.09900005161762238,
-0.11606664955615997,
-0.2233147919178009,
-0.4766242206096649,
0.06452000141143799,
0.24873757362365723,
-0.20388951897621155,
0.19204044342041016,
-0.07865910232067108,
-0.040460165590047836,
-0.2650974988937378,
0.29619985818862915,
0.2615867853164673,
0.27473580837249756,
-0.26952922344207764,
-0.17951571941375732,
-0.012042388319969177,
0.3011477589607239,
0.3822053074836731,
0.08538508415222168,
-0.06862495839595795,
0.2815307676792145,
0.06289321184158325,
-0.09583117067813873,
-0.3378954231739044,
0.14919894933700562,
0.29030293226242065,
-0.0034240460954606533,
-0.5377708077430725,
-0.46171408891677856,
0.7115876078605652,
0.24235506355762482,
0.11238738894462585,
0.21737860143184662,
0.2269865721464157,
-0.272728830575943,
0.7211721539497375,
0.22165623307228088,
1.1427092552185059,
-0.16345854103565216,
0.3277300298213959,
-0.06890255212783813,
-0.31519436836242676,
0.1440814882516861,
-0.1366245448589325,
-0.04385737329721451,
-0.5092172622680664,
-0.13374558091163635,
-0.1724209189414978,
-0.21025565266609192,
0.0005087181925773621,
0.11151371896266937,
0.30663248896598816,
0.17367994785308838,
-0.09073487669229507,
-0.04309896007180214,
0.0739055797457695,
0.13399051129817963,
-0.012721806764602661,
-0.21522226929664612,
-0.04967901110649109,
0.08126108348369598,
-0.245500847697258,
0.042851902544498444,
0.02263842150568962,
-0.3167787790298462,
-0.08576519787311554,
-0.012804605066776276,
-0.06291370093822479,
0.13334140181541443,
-0.3916153609752655,
0.20868118107318878,
-0.10200753808021545,
-0.7172006368637085,
0.24800685048103333,
0.3210870027542114,
0.337093710899353,
-0.13277554512023926,
-0.146202951669693,
0.16360674798488617,
0.47435876727104187,
-0.1735900491476059,
-0.012284400872886181,
-0.09253855049610138,
0.26936954259872437,
0.0069939009845256805,
-0.005127087235450745,
0.059247296303510666,
0.04368789121508598,
-0.3624270558357239,
-0.3166554570198059,
-0.16381953656673431,
0.4906708002090454,
-0.24663451313972473,
-0.5456699728965759,
0.20049059391021729,
-0.06260418891906738,
-0.04925058037042618,
-0.007877126336097717,
0.09405001997947693,
-0.0801146999001503,
0.08029967546463013,
0.27698686718940735,
-0.35899823904037476,
0.06917291134595871,
0.3846988081932068,
0.18743807077407837,
0.3788060247898102,
0.37876757979393005,
0.16624371707439423,
-0.08434613794088364,
-0.05816255882382393,
0.2729898989200592,
0.8475380539894104,
-0.21127787232398987,
-0.055036697536706924,
-0.10177985578775406,
-0.06672439724206924,
0.1764790415763855,
-0.15383636951446533,
-0.024277709424495697,
-0.010791540145874023,
-0.00105942040681839,
-0.16843262314796448,
-0.3776630461215973,
-0.009420864284038544,
-0.503751814365387,
0.20987799763679504,
0.03229004144668579,
-0.0655001848936081,
-0.3649931848049164,
0.07162046432495117,
-0.13086052238941193,
0.18925346434116364,
0.23059114813804626,
0.13269972801208496,
-0.11989711225032806,
0.15194866061210632,
-0.030875368043780327,
0.14198388159275055,
-0.005904205143451691,
0.021319672465324402,
-0.1980639100074768,
-0.1242232546210289,
-0.2340458631515503,
0.21405582129955292,
0.10165111720561981,
-0.1233232244849205,
0.10855095833539963,
-0.25307929515838623,
-0.2654303312301636,
0.03491336107254028,
0.16093949973583221,
0.20661616325378418,
0.08623882383108139,
0.2973310053348541,
0.3402448296546936,
-0.10258651524782181,
-0.2123933881521225,
0.07548373192548752,
0.34584879875183105,
0.3790521025657654,
-0.13848136365413666,
0.1107969582080841,
-0.18132051825523376,
-0.2900877594947815,
-0.36617881059646606,
0.1722216010093689,
0.5551642775535583,
0.017663897946476936,
0.23928311467170715,
-0.0788116604089737,
0.1425163298845291,
-0.24200774729251862,
0.22218553721904755,
0.3790287971496582,
-0.10635959357023239,
0.0677398070693016,
0.05940346419811249,
-0.07549619674682617,
-0.2994276285171509,
-0.03850426524877548,
-0.21731629967689514,
-0.31411057710647583,
-0.07237587869167328,
0.02721799910068512,
0.12553748488426208,
0.5410736799240112,
-0.14367365837097168,
-0.29654690623283386,
0.04479898884892464,
-0.34515702724456787,
-0.13957886397838593,
0.3816301226615906,
0.2292925864458084,
0.008081916719675064,
0.36783429980278015,
0.235091432929039,
0.3199833035469055,
0.1539037823677063,
0.4099702835083008,
0.849285364151001,
0.6417725682258606,
0.07545267790555954,
0.43855470418930054,
-0.41199177503585815,
-0.3295014798641205,
0.2571867108345032,
0.14325278997421265,
0.12585031986236572,
0.15022385120391846,
0.49332961440086365,
0.17036135494709015,
-0.5665960907936096,
0.07169613242149353,
0.1914036124944687,
0.03463611379265785,
-0.451396644115448,
-0.13021434843540192,
0.04139263182878494,
-0.3098054528236389,
-0.12442727386951447,
-0.31043779850006104,
-0.12338680028915405,
-0.05510592460632324,
0.22585172951221466,
0.05662798136472702,
-0.0724426805973053,
0.1049899086356163,
0.20623010396957397,
-0.1139235869050026,
-0.07132750749588013,
0.15494169294834137,
-0.13506723940372467,
-0.05420635640621185,
0.05789778381586075,
0.16626910865306854,
0.24391618371009827,
-0.008227832615375519,
-0.3018837571144104,
-0.04543403908610344,
0.4646236300468445,
-0.1645202338695526,
0.3403019607067108,
-0.07361970841884613,
0.20812565088272095,
-0.10074268281459808,
0.34295952320098877,
-0.005963475443422794,
0.0626545250415802,
0.13542965054512024,
0.028716059401631355,
-0.0066625215113162994,
0.0180636215955019,
0.24813136458396912,
0.11463668942451477,
0.029433704912662506,
-0.17421908676624298,
-0.011243008077144623,
-0.3586731255054474,
-0.04960127919912338,
0.6691648364067078,
-0.23963578045368195,
0.11439860612154007,
0.0804414227604866,
-0.006269203498959541,
-0.06502780318260193,
0.18416303396224976,
0.3714640736579895,
0.10799241065979004,
-0.39489778876304626,
0.022380121052265167,
-0.19569233059883118,
0.03926955908536911,
0.026424534618854523,
0.10666179656982422,
-0.08346907794475555,
-0.003041737712919712,
0.3395574986934662,
0.00023090094327926636,
-0.06147943437099457,
-0.03343551978468895,
0.20423857867717743,
0.5422481298446655,
0.01929037645459175,
-0.10772757232189178,
-0.2591685652732849,
0.36382487416267395,
-0.14410817623138428,
-0.320435494184494,
-0.09034241735935211,
0.20910276472568512,
-0.08477206528186798,
-0.0010734330862760544,
-0.2335558533668518,
0.5360312461853027,
-0.08566169440746307,
0.33627963066101074,
-0.07337850332260132,
0.4900249242782593,
-0.29592782258987427,
0.11958242207765579,
0.17392106354236603,
-0.08419739454984665,
-0.40165403485298157,
0.2119206190109253,
-0.0927230715751648,
0.260518342256546,
-0.002980093937367201,
-0.13208839297294617,
-0.04409808665513992,
0.12067639827728271,
-0.12072762101888657,
-0.44787442684173584,
-0.2386038601398468,
0.49750521779060364,
-0.23892927169799805,
-0.09641850739717484,
0.2845882177352905,
0.46317875385284424,
0.18801751732826233,
0.2012939751148224,
-0.16083572804927826,
-0.1496623456478119,
0.5671274065971375,
0.15856371819972992,
-0.047942958772182465,
0.08319681882858276,
-0.10939158499240875,
0.26542729139328003,
0.060367755591869354,
-0.36336949467658997,
-0.10270814597606659,
0.15576674044132233,
-0.27133452892303467,
0.1184529960155487,
0.21746084094047546,
0.2340918332338333,
0.27198249101638794,
-0.30036282539367676,
0.40939003229141235,
0.21303603053092957,
0.05073493719100952,
-0.27397415041923523,
-0.3515225052833557
] |
https://github.com/huggingface/datasets/issues/2165 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset | @mariosasko
Thx for your code!
It perfectly works with a small modification for HF NLP dataset:
```
original_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds = HFDataset(train_ds['train']) # needs splitting
``` | Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 28 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
@mariosasko
Thx for your code!
It perfectly works with a small modification for HF NLP dataset:
```
original_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds = HFDataset(train_ds['train']) # needs splitting
``` | [
-0.22635556757450104,
-0.3335738778114319,
0.0703146755695343,
0.3271580934524536,
0.1331762969493866,
0.19714394211769104,
-0.06429538130760193,
0.3733653724193573,
-0.13911867141723633,
-0.26625722646713257,
-0.39848288893699646,
0.38498401641845703,
-0.17945002019405365,
-0.009580949321389198,
0.15543587505817413,
-0.3008972108364105,
0.178121417760849,
0.07672901451587677,
-0.20330175757408142,
-0.2192835658788681,
-0.09847331047058105,
-0.0496380552649498,
0.021122097969055176,
0.12588320672512054,
0.006090681068599224,
0.059689417481422424,
0.046823494136333466,
0.20683768391609192,
-0.04797268658876419,
-0.32900652289390564,
0.18562285602092743,
0.03522267937660217,
0.5887833833694458,
0.25462260842323303,
-0.00013067440886516124,
0.12323315441608429,
0.04751386120915413,
-0.15390078723430634,
0.11026033759117126,
-0.10599435865879059,
-0.12513840198516846,
-0.03743979334831238,
0.19238677620887756,
-0.12359669059515,
-0.35272452235221863,
-0.5381256937980652,
-0.09823572635650635,
-0.29003584384918213,
0.18213126063346863,
0.5682992339134216,
0.043983519077301025,
0.23808419704437256,
-0.00017419829964637756,
0.050214048475027084,
0.26545950770378113,
-0.11581869423389435,
-0.13780102133750916,
0.07706230878829956,
-0.09518332779407501,
0.11447350680828094,
-0.26860174536705017,
0.14280542731285095,
-0.15033061802387238,
0.07208314538002014,
0.3074951171875,
-0.33642396330833435,
-0.4187687039375305,
-0.1907428503036499,
-0.0029426738619804382,
0.5164995193481445,
0.19757643342018127,
-0.21646654605865479,
-0.048600271344184875,
0.14610183238983154,
-0.10835084319114685,
-0.17058047652244568,
-0.367074579000473,
0.23056969046592712,
-0.03364552929997444,
0.1331617683172226,
0.03742879629135132,
-0.1993558406829834,
-0.15867723524570465,
0.09753312170505524,
0.20563524961471558,
0.3252076506614685,
0.07350040227174759,
0.1826859712600708,
0.2181074619293213,
-0.3050093650817871,
0.39311113953590393,
-0.20962993800640106,
-0.032205451279878616,
-0.1784205585718155,
-0.15225626528263092,
-0.022695105522871017,
-0.3895270824432373,
-0.05817962437868118,
0.45481348037719727,
0.08933226764202118,
0.1379813700914383,
0.34015223383903503,
-0.1559872329235077,
0.035880982875823975,
-0.11799024045467377,
-0.19611336290836334,
0.1375550627708435,
0.27985885739326477,
-0.016792625188827515,
-0.3020291328430176,
-0.07872430980205536,
0.23334497213363647,
-0.08404182642698288,
-0.4121381342411041,
0.053519267588853836,
0.017904644832015038,
-0.1774987280368805,
-0.21506452560424805,
-0.20469136536121368,
-0.26066961884498596,
-0.29442206025123596,
-0.05633402615785599,
0.03823831304907799,
0.2656320333480835,
0.040187668055295944,
0.05008715018630028,
0.19525454938411713,
0.6915658116340637,
-0.2502996325492859,
-0.1751052439212799,
0.011274278163909912,
0.10563167929649353,
-0.02203211560845375,
-0.1828763782978058,
-0.10407960414886475,
-0.21473918855190277,
0.15932896733283997,
-0.00578043470159173,
-0.28558629751205444,
0.1035446971654892,
0.3521377146244049,
-0.17353197932243347,
0.2845807671546936,
0.055372849106788635,
0.12028396129608154,
0.07898829877376556,
0.33188068866729736,
0.39525938034057617,
-0.3046817481517792,
0.26006385684013367,
-0.510075032711029,
-0.2010757476091385,
-0.1981968730688095,
0.010650518350303173,
0.15031738579273224,
-0.2748127579689026,
-0.42428478598594666,
0.30674314498901367,
0.027170903980731964,
0.13640087842941284,
0.016712196171283722,
-0.4317053556442261,
-0.3108101487159729,
-0.18709200620651245,
0.21454426646232605,
0.22372649610042572,
-0.3245929181575775,
-0.11323262006044388,
0.12279713898897171,
-0.16304229199886322,
0.23242321610450745,
0.311899334192276,
-0.2270779311656952,
0.09367983043193817,
-0.4663161039352417,
0.008099272847175598,
0.6656386852264404,
-0.3257722556591034,
0.10225860029459,
0.16353760659694672,
0.09834790229797363,
-0.23118726909160614,
0.10865925252437592,
-0.05539312958717346,
-0.07971081882715225,
-0.038585662841796875,
0.1303541511297226,
0.23086291551589966,
-0.09462142735719681,
-0.16227833926677704,
-0.16585323214530945,
-0.26392003893852234,
0.5142818093299866,
-0.08722963184118271,
0.23487643897533417,
0.3476690948009491,
-0.09089017659425735,
-0.20524777472019196,
0.3716835379600525,
-0.041416559368371964,
0.10369206219911575,
0.21421769261360168,
-0.32562923431396484,
0.05354542285203934,
-0.07302209734916687,
0.09211504459381104,
0.13507230579853058,
-0.02525385655462742,
0.049859412014484406,
-0.03396337479352951,
0.08811284601688385,
0.1063457727432251,
-0.28137126564979553,
0.14845523238182068,
-0.1486712247133255,
0.017672890797257423,
-0.11032161116600037,
-0.06775476038455963,
-0.20253613591194153,
-0.17613545060157776,
-0.0231420136988163,
0.2861519753932953,
-0.3305155038833618,
0.12785109877586365,
-0.49232161045074463,
0.2535891830921173,
0.06751338392496109,
0.105631522834301,
0.13625885546207428,
0.19692149758338928,
0.15360654890537262,
-0.030504459515213966,
-0.1565905511379242,
0.2011709213256836,
0.04904433712363243,
0.009149037301540375,
0.3590289354324341,
0.23267872631549835,
0.09661883860826492,
-1.0042275190353394,
0.3522101938724518,
0.4355176091194153,
0.1550198793411255,
-0.14522650837898254,
-0.002177312970161438,
0.6890761852264404,
0.20101338624954224,
0.23653465509414673,
-0.06106191873550415,
-0.05086930841207504,
0.09425510466098785,
0.10493291914463043,
-0.1251613050699234,
0.03965335339307785,
-0.08508376777172089,
-0.0466093085706234,
0.27584534883499146,
-0.0639290064573288,
-0.39974939823150635,
-0.014944098889827728,
0.1547488272190094,
-0.009732449427247047,
0.07510007917881012,
0.35637366771698,
-0.5196492671966553,
-0.12478446215391159,
0.324444979429245,
-0.35470151901245117,
0.1424793004989624,
0.1628664880990982,
0.17630508542060852,
0.0010702498257160187,
-0.04386138916015625,
0.019941646605730057,
0.26277682185173035,
0.031221479177474976,
0.4762645363807678,
0.032803039997816086,
0.12532195448875427,
-0.09374100714921951,
-0.32037708163261414,
0.057868827134370804,
-0.13905437290668488,
-0.035298317670822144,
-0.4970807433128357,
0.18079009652137756,
-0.4068140685558319,
-0.12398283928632736,
-0.29877761006355286,
-0.022442493587732315,
0.039681077003479004,
-0.10913164168596268,
-0.23862604796886444,
0.030258115381002426,
0.30403998494148254,
0.09530890733003616,
-0.4173562824726105,
-0.33438193798065186,
0.21978352963924408,
-0.2575613260269165,
-0.04908575862646103,
-0.15214800834655762,
-0.1422961950302124,
-0.0792502909898758,
0.08743390440940857,
0.06422595679759979,
0.2967342734336853,
0.16061361134052277,
0.11777190864086151,
-0.38945719599723816,
-0.11650602519512177,
0.010481242090463638,
-0.13329708576202393,
0.09989187866449356,
0.17260399460792542,
0.13349103927612305,
0.17225557565689087,
0.07611200958490372,
0.059228911995887756,
0.0346762016415596,
-0.032095201313495636,
0.1489347517490387,
-0.35903143882751465,
0.1663263589143753,
0.43728598952293396,
-0.10952221602201462,
-0.2783701717853546,
-0.2167595475912094,
-0.3826256990432739,
0.047543857246637344,
0.17328719794750214,
-0.11515454202890396,
0.3042674660682678,
0.13163428008556366,
0.21176466345787048,
-0.0758674144744873,
-0.12157990783452988,
-0.05383330211043358,
0.360645592212677,
-0.07762585580348969,
-0.328157901763916,
-0.15597252547740936,
-0.24947337806224823,
0.08842054754495621,
0.2179972231388092,
-0.3521411418914795,
0.15934182703495026,
-0.15641990303993225,
0.3416546881198883,
-0.055347807705402374,
-0.03492679446935654,
0.3035986125469208,
-0.18439339101314545,
0.14710602164268494,
-0.21142542362213135,
-0.24880550801753998,
0.06132940202951431,
-0.14836463332176208,
0.3629370331764221,
0.36497387290000916,
0.4517155587673187,
-0.1608111709356308,
0.9838789105415344,
-0.030314702540636063,
-0.3359050154685974,
0.5201296806335449,
-0.1261214166879654,
0.08623931556940079,
-0.2030794322490692,
-0.2672261595726013,
-0.029866019263863564,
-0.07996252179145813,
0.44893795251846313,
0.1056017354130745,
-0.13562238216400146,
-0.14750945568084717,
0.0822240561246872,
0.04557746276259422,
-0.1306183934211731,
-0.0660998523235321,
0.2251463383436203,
-0.8449305295944214,
-0.10567576438188553,
0.07272227108478546,
0.056975074112415314,
-0.24497011303901672,
-0.07267142087221146,
0.056468795984983444,
0.3254699110984802,
0.21426793932914734,
0.2519318461418152,
-0.37840744853019714,
0.17345334589481354,
-0.20460665225982666,
0.4338722229003906,
-0.045995958149433136,
0.5219181180000305,
0.12480166554450989,
-0.06831344962120056,
0.09064452350139618,
-0.03238406404852867,
0.47751152515411377,
-0.173808291554451,
-0.07067505270242691,
0.035920917987823486,
-0.025581296533346176,
-0.44654175639152527,
0.01725691184401512,
0.05622399225831032,
0.06975344568490982,
-0.08930303156375885,
0.14197608828544617,
-0.1395866423845291,
-0.4577147960662842,
-0.05268453061580658,
0.01573263853788376,
-0.07819673418998718,
0.26795902848243713,
0.02754361554980278,
-0.24180155992507935,
0.030198609456419945,
0.03250470012426376,
0.015047738328576088,
-0.04810042306780815,
-0.14406190812587738,
-0.20422862470149994,
-0.48583337664604187,
0.007013328373432159,
0.28831231594085693,
-0.19571109116077423,
0.23733094334602356,
-0.08844871073961258,
-0.07364381104707718,
-0.28731587529182434,
0.3368115723133087,
0.20561006665229797,
0.27703094482421875,
-0.18541967868804932,
-0.1713089644908905,
0.013295736163854599,
0.23249457776546478,
0.3811321258544922,
0.09956160187721252,
-0.06342627853155136,
0.2771749198436737,
0.022714894264936447,
-0.05968382954597473,
-0.3146490752696991,
0.1943282037973404,
0.3171253204345703,
-0.014080929569900036,
-0.5217669606208801,
-0.44279468059539795,
0.6736050248146057,
0.1517963856458664,
0.10310173034667969,
0.18249912559986115,
0.29057660698890686,
-0.2887246012687683,
0.6902831196784973,
0.1923065036535263,
1.0491652488708496,
-0.14960451424121857,
0.309143602848053,
-0.019248519092798233,
-0.35498422384262085,
0.19148173928260803,
-0.06200697273015976,
-0.012719796970486641,
-0.5064069628715515,
-0.09888749569654465,
-0.16967755556106567,
-0.1890803575515747,
0.04566773772239685,
0.10843390971422195,
0.34597036242485046,
0.21184112131595612,
-0.10811302065849304,
-0.03563067689538002,
0.09321416914463043,
0.1610933244228363,
0.02460016869008541,
-0.2186436653137207,
-0.04765789210796356,
0.08670549094676971,
-0.27873748540878296,
0.140986368060112,
0.04541833698749542,
-0.3511814475059509,
-0.13161402940750122,
-0.0653836578130722,
-0.038733065128326416,
0.13584011793136597,
-0.38781073689460754,
0.19128067791461945,
-0.09557481110095978,
-0.7221965193748474,
0.3027072250843048,
0.2570643126964569,
0.3729010224342346,
-0.15253429114818573,
-0.07597188651561737,
0.15172219276428223,
0.4544076919555664,
-0.12207944691181183,
-0.016547277569770813,
-0.10290051996707916,
0.2754591107368469,
0.002133093774318695,
-0.01214173436164856,
0.014478020370006561,
0.04960227385163307,
-0.3540499210357666,
-0.3075191378593445,
-0.10082948207855225,
0.4927372336387634,
-0.28247079253196716,
-0.5382115244865417,
0.1809414029121399,
-0.028042618185281754,
-0.04040955752134323,
-0.03116956725716591,
0.07601689547300339,
-0.10065655410289764,
0.023176267743110657,
0.21960993111133575,
-0.35773441195487976,
0.04794865846633911,
0.3908984065055847,
0.2444620132446289,
0.3545529544353485,
0.4260512888431549,
0.12838144600391388,
-0.0747564285993576,
-0.05517313629388809,
0.242757648229599,
0.7975456118583679,
-0.2431238293647766,
-0.0955933928489685,
-0.08284879475831985,
-0.0964287668466568,
0.1759667545557022,
-0.12295939028263092,
-0.10006122291088104,
0.018757250159978867,
-0.003702603280544281,
-0.22400949895381927,
-0.38726526498794556,
-0.05016665160655975,
-0.5921082496643066,
0.12927882373332977,
0.044595710933208466,
0.00958946906030178,
-0.3298637568950653,
0.11907891929149628,
-0.11903457343578339,
0.18446402251720428,
0.25473666191101074,
0.15834856033325195,
-0.16658854484558105,
0.11880536377429962,
-0.0005617015995085239,
0.11660023033618927,
-0.007235746830701828,
0.07704371958971024,
-0.18513739109039307,
-0.12359774857759476,
-0.24329984188079834,
0.22950631380081177,
0.09409686923027039,
-0.13066884875297546,
0.07513421773910522,
-0.2411135584115982,
-0.2445298433303833,
0.07273682951927185,
0.1853950023651123,
0.17553630471229553,
0.11176958680152893,
0.3480851352214813,
0.3641878664493561,
-0.06773363798856735,
-0.22775593400001526,
0.04972291737794876,
0.3066651523113251,
0.3425447642803192,
-0.16063939034938812,
0.11043806374073029,
-0.16177676618099213,
-0.21476490795612335,
-0.424792617559433,
0.11443363130092621,
0.5022952556610107,
-0.0028916746377944946,
0.18572762608528137,
-0.10264420509338379,
0.128824383020401,
-0.25578537583351135,
0.1771666258573532,
0.3922424018383026,
-0.06526979804039001,
-0.009279617108404636,
0.09549368917942047,
-0.09238272905349731,
-0.3175991475582123,
-0.0011597761185839772,
-0.20002290606498718,
-0.3673338294029236,
-0.10381971299648285,
0.06875887513160706,
0.13706690073013306,
0.5545266270637512,
-0.12598170340061188,
-0.3066503703594208,
0.05448902025818825,
-0.3451067805290222,
-0.10119014978408813,
0.409255713224411,
0.19761843979358673,
0.021436437964439392,
0.3923996686935425,
0.21957099437713623,
0.24280375242233276,
0.2284489870071411,
0.38463273644447327,
0.8282761573791504,
0.6093147993087769,
0.0693632960319519,
0.409319132566452,
-0.4392857849597931,
-0.3943209946155548,
0.2902410626411438,
0.16126355528831482,
0.09551312029361725,
0.0909389927983284,
0.530884861946106,
0.13459058105945587,
-0.6116361021995544,
0.12439506500959396,
0.14171725511550903,
0.039436619728803635,
-0.3871905207633972,
-0.07206675410270691,
0.09424129873514175,
-0.336029589176178,
-0.16893906891345978,
-0.30474698543548584,
-0.13192832469940186,
-0.025773189961910248,
0.23667365312576294,
0.03769383952021599,
-0.07704818993806839,
0.04558906704187393,
0.18577519059181213,
-0.13839593529701233,
-0.07016459852457047,
0.17031581699848175,
-0.16934756934642792,
-0.016369201242923737,
0.10898657143115997,
0.12224338203668594,
0.220677450299263,
-0.023698948323726654,
-0.30864301323890686,
-0.10270046442747116,
0.4592534601688385,
-0.16922354698181152,
0.34259751439094543,
-0.036606963723897934,
0.20299527049064636,
-0.05997088924050331,
0.3750295639038086,
-0.03271317481994629,
0.06789176911115646,
0.12415000796318054,
0.040582723915576935,
0.006633711978793144,
-0.024257278069853783,
0.3539983630180359,
0.06748516857624054,
0.022848404943943024,
-0.1710180640220642,
-0.05099222809076309,
-0.3561058044433594,
-0.04261593520641327,
0.5597943067550659,
-0.2557029724121094,
0.1359277367591858,
0.052556708455085754,
-0.010677100159227848,
-0.10172103345394135,
0.1591455340385437,
0.31135988235473633,
0.11355827003717422,
-0.39168593287467957,
0.012819677591323853,
-0.20288605988025665,
0.019314683973789215,
-0.014397505670785904,
0.07285574823617935,
-0.05212866887450218,
-0.0008851457387208939,
0.3236847519874573,
-0.052913814783096313,
-0.08827567100524902,
-0.032137587666511536,
0.23488284647464752,
0.49951061606407166,
0.04541625455021858,
-0.10065965354442596,
-0.32444334030151367,
0.3683188855648041,
-0.15438085794448853,
-0.36482441425323486,
-0.05249733105301857,
0.2208983302116394,
-0.10171805322170258,
0.030808396637439728,
-0.21376284956932068,
0.5447202920913696,
-0.05813527852296829,
0.27091097831726074,
-0.03448457270860672,
0.48496443033218384,
-0.25457763671875,
0.1276673525571823,
0.16713696718215942,
-0.06644506752490997,
-0.41731035709381104,
0.19330790638923645,
-0.10383440554141998,
0.329813152551651,
-0.018028952181339264,
-0.05237399414181709,
-0.04869990795850754,
0.1613541841506958,
-0.10318302363157272,
-0.39791789650917053,
-0.21048526465892792,
0.548027753829956,
-0.26089373230934143,
-0.06806645542383194,
0.3363810181617737,
0.5139485597610474,
0.17067936062812805,
0.20593707263469696,
-0.22714783251285553,
-0.15671361982822418,
0.5854460597038269,
0.10267887264490128,
-0.0993436872959137,
0.11654503643512726,
-0.04906304180622101,
0.30459389090538025,
0.017185987904667854,
-0.37082719802856445,
-0.16778899729251862,
0.1889810413122177,
-0.2670780122280121,
0.1175098568201065,
0.24228230118751526,
0.204919695854187,
0.24561141431331635,
-0.28228628635406494,
0.371687114238739,
0.2165394425392151,
0.009061383083462715,
-0.18761716783046722,
-0.33824437856674194
] |
https://github.com/huggingface/datasets/issues/2165 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset | @lhoestq Sadly, from Python 3.7 onwards `torch.utils.data.Dataset` doesn't support the virtual subclass mechanism due to `typing.Generic` type no longer having `abc.ABCMeta` as its metaclass.
With that in mind, another option is to remove a direct type check (`isinstance(dataset, torch.utils.data.Dataset)`) in `deepspeed.initalize` and to rewrite the checks in a manner similar to `torch.utils.data.DataLoader` ([link](https://github.com/pytorch/pytorch/blob/b80c6f863f2327c712c478f67c248b94d66b65ac/torch/utils/data/dataloader.py#L197-L239)). This is exactly why the `DataLoader` works with arbitrary objects that provide `__getitem__` and `__len__` (and in our case, the `ArrowDataset`). By doing so, their code wouldn't be any stricter in comparison to the `DataLoader`.
So if you agree, I can open an issue in their repo and fix this if they like the idea. | Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 108 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
@lhoestq Sadly, from Python 3.7 onwards `torch.utils.data.Dataset` doesn't support the virtual subclass mechanism due to `typing.Generic` type no longer having `abc.ABCMeta` as its metaclass.
With that in mind, another option is to remove a direct type check (`isinstance(dataset, torch.utils.data.Dataset)`) in `deepspeed.initalize` and to rewrite the checks in a manner similar to `torch.utils.data.DataLoader` ([link](https://github.com/pytorch/pytorch/blob/b80c6f863f2327c712c478f67c248b94d66b65ac/torch/utils/data/dataloader.py#L197-L239)). This is exactly why the `DataLoader` works with arbitrary objects that provide `__getitem__` and `__len__` (and in our case, the `ArrowDataset`). By doing so, their code wouldn't be any stricter in comparison to the `DataLoader`.
So if you agree, I can open an issue in their repo and fix this if they like the idea. | [
-0.1920575201511383,
-0.27040258049964905,
0.09888172149658203,
0.3232179880142212,
0.23827874660491943,
0.18831780552864075,
-0.045659687370061874,
0.3633686602115631,
-0.15260280668735504,
-0.22917602956295013,
-0.2917282283306122,
0.39241930842399597,
-0.250336229801178,
-0.1537752002477646,
0.1516399085521698,
-0.24070587754249573,
0.18115924298763275,
0.0032431185245513916,
-0.2698724865913391,
-0.1991647183895111,
-0.10945198684930801,
-0.1029917299747467,
0.02908487617969513,
0.05086232349276543,
0.09440876543521881,
0.10401780158281326,
0.08164288848638535,
0.18081572651863098,
-0.11283399909734726,
-0.36320072412490845,
0.3348349630832672,
0.06315187364816666,
0.568320631980896,
0.3380843698978424,
-0.00012859248090535402,
0.24953807890415192,
0.1516086459159851,
-0.09541286528110504,
-0.048618197441101074,
0.005868509411811829,
-0.03109891712665558,
-0.1078798919916153,
0.2537961006164551,
-0.07936856150627136,
-0.25851768255233765,
-0.624151885509491,
-0.12276972830295563,
-0.502662181854248,
0.06640207767486572,
0.42837080359458923,
0.04635098576545715,
0.3282429575920105,
0.012055475264787674,
0.09522183239459991,
0.286197304725647,
-0.03775755316019058,
-0.16470858454704285,
0.19395463168621063,
0.058613069355487823,
0.16335727274417877,
-0.18330621719360352,
0.08652307093143463,
-0.14907824993133545,
0.023656781762838364,
0.4681118130683899,
-0.25377702713012695,
-0.3934954106807709,
-0.1979161500930786,
-0.16129586100578308,
0.5067217350006104,
0.2559041678905487,
-0.3469005227088928,
-0.22401218116283417,
0.07796285301446915,
-0.06182647496461868,
-0.14765362441539764,
-0.21785971522331238,
0.10449448972940445,
-0.07631351798772812,
0.07510441541671753,
0.07574673742055893,
0.016529005020856857,
-0.18769583106040955,
0.10106626152992249,
0.14766155183315277,
0.16803857684135437,
0.11178233474493027,
0.16887876391410828,
0.19945402443408966,
-0.343660831451416,
0.37805846333503723,
-0.217182457447052,
0.002182088792324066,
-0.14520518481731415,
-0.10317794978618622,
-0.10812512785196304,
-0.3531707525253296,
-0.15286138653755188,
0.38303616642951965,
0.1301051676273346,
0.34539511799812317,
0.33181634545326233,
-0.2277628481388092,
0.0814983919262886,
-0.02498946711421013,
-0.11775687336921692,
0.16235610842704773,
0.2724098861217499,
0.015454519540071487,
-0.19622628390789032,
0.08204281330108643,
0.2925752103328705,
-0.1423645168542862,
-0.3170526921749115,
0.11862790584564209,
0.06235023960471153,
-0.12326719611883163,
-0.13597248494625092,
-0.1813092678785324,
-0.1504845917224884,
-0.23495832085609436,
0.02146804705262184,
0.1157316192984581,
0.16441240906715393,
-0.001016849186271429,
0.21844276785850525,
0.3691667914390564,
0.5446547865867615,
-0.2553096413612366,
-0.1770910620689392,
0.07802429050207138,
0.11073538661003113,
-0.07501102238893509,
-0.22175858914852142,
0.021519910544157028,
-0.17923559248447418,
0.017028335481882095,
-0.06731343269348145,
-0.13049620389938354,
0.30811217427253723,
0.2849658131599426,
-0.13992878794670105,
0.2640918791294098,
0.06629353761672974,
-0.08420409262180328,
0.04116051644086838,
0.36408424377441406,
0.4290807843208313,
-0.3253016471862793,
0.24489596486091614,
-0.33672061562538147,
-0.17679858207702637,
-0.16088144481182098,
0.004170198924839497,
0.13244186341762543,
-0.33560749888420105,
-0.39408209919929504,
0.19874043762683868,
0.004903540015220642,
0.011957254260778427,
0.08231459558010101,
-0.5586115121841431,
-0.23679298162460327,
-0.1953953206539154,
0.2141403704881668,
0.21059271693229675,
-0.46526026725769043,
-0.11483071744441986,
-0.03234792500734329,
-0.11100047826766968,
0.1935071051120758,
0.3073977828025818,
-0.21783937513828278,
-0.02567862719297409,
-0.3970094621181488,
-0.020456481724977493,
0.5086789727210999,
-0.2867499589920044,
0.024785839021205902,
0.1531434953212738,
0.10481347143650055,
-0.09576979279518127,
0.12150502949953079,
0.04646419361233711,
-0.05267208442091942,
-0.13972888886928558,
0.18753908574581146,
0.1678769439458847,
-0.12295421957969666,
-0.27291902899742126,
-0.10683839023113251,
-0.2577293813228607,
0.36197495460510254,
-0.037105243653059006,
0.13005149364471436,
0.2110430896282196,
-0.12136702984571457,
-0.28312167525291443,
0.28624698519706726,
-0.024285268038511276,
0.10684698075056076,
0.15027359127998352,
-0.2012929469347,
0.17831064760684967,
0.018390432000160217,
0.023305613547563553,
0.005224164575338364,
0.15415599942207336,
0.009973406791687012,
0.029707225039601326,
-0.03486400842666626,
0.03752543777227402,
-0.12549716234207153,
0.16465838253498077,
-0.035509999841451645,
0.0571015402674675,
-0.07780394703149796,
-0.06947728991508484,
-0.23638421297073364,
-0.27424460649490356,
-0.12255662679672241,
0.07876455038785934,
-0.4409388303756714,
0.17839373648166656,
-0.554984986782074,
0.1552935391664505,
0.1712523251771927,
0.11830627918243408,
-0.05334439501166344,
0.24899163842201233,
0.05491320416331291,
-0.029341714456677437,
-0.16526827216148376,
0.1796412169933319,
0.12389476597309113,
-0.06341679394245148,
0.22381886839866638,
0.28955549001693726,
0.06665091216564178,
-0.8759512305259705,
0.33861905336380005,
0.47764071822166443,
0.17583425343036652,
-0.060628730803728104,
-0.030687764286994934,
0.6746483445167542,
0.26992419362068176,
0.2855539917945862,
-0.032992199063301086,
-0.009947866201400757,
0.06263381242752075,
0.2108587920665741,
-0.2279217392206192,
0.011573702096939087,
-0.141720712184906,
0.1783377230167389,
0.25374287366867065,
0.03832508996129036,
-0.2435821294784546,
0.023118771612644196,
0.02860058657824993,
-0.10752953588962555,
0.11853626370429993,
0.3567153215408325,
-0.5336498618125916,
-0.017126981168985367,
0.22578638792037964,
-0.15429602563381195,
0.22039590775966644,
0.07978254556655884,
0.248636394739151,
-0.05732478201389313,
-0.10599929839372635,
0.05149310827255249,
0.3088962435722351,
0.07816269248723984,
0.3587365448474884,
-0.032341815531253815,
0.055945347994565964,
-0.05592605099081993,
-0.35729914903640747,
0.04823627695441246,
-0.10549364238977432,
-0.09156399965286255,
-0.5114284157752991,
0.20865823328495026,
-0.44898664951324463,
0.055884554982185364,
-0.3178321123123169,
-0.11460833251476288,
-0.013848178088665009,
-0.16889788210391998,
-0.1546972692012787,
0.01971580646932125,
0.12071330845355988,
0.13623274862766266,
-0.40019333362579346,
-0.13815273344516754,
0.20740044116973877,
-0.4670451581478119,
0.04833800345659256,
-0.12860552966594696,
-0.23921874165534973,
-0.11042062938213348,
0.14449486136436462,
-0.1327439844608307,
0.2613071799278259,
0.20397233963012695,
0.021145526319742203,
-0.44114217162132263,
-0.1653212010860443,
0.08430430293083191,
-0.1655038297176361,
0.07243859022855759,
0.22610601782798767,
0.07665904611349106,
0.3106871247291565,
-0.0076394653879106045,
0.06992140412330627,
-0.03798456862568855,
-0.09564893692731857,
0.17082564532756805,
-0.3793533146381378,
0.22293898463249207,
0.3711144030094147,
-0.13600066304206848,
-0.3164055347442627,
-0.23796921968460083,
-0.3310389518737793,
0.04638461396098137,
0.12178149819374084,
-0.008948429487645626,
0.36334505677223206,
0.13981130719184875,
0.2525959610939026,
0.07530917227268219,
-0.07465239614248276,
-0.0394740104675293,
0.4306192100048065,
0.021085100248456,
-0.3091743290424347,
-0.1776055544614792,
-0.3541424870491028,
0.16679324209690094,
0.3370668292045593,
-0.3112230896949768,
0.07426435500383377,
-0.25074413418769836,
0.343851238489151,
0.04757048189640045,
-0.030473215505480766,
0.309901624917984,
-0.14629416167736053,
0.07252222299575806,
-0.20306411385536194,
-0.1782546192407608,
-0.01807769387960434,
-0.25162273645401,
0.3121640384197235,
0.3920454978942871,
0.49291661381721497,
-0.11538603901863098,
1.0432757139205933,
-0.1220419853925705,
-0.5147126317024231,
0.4142383337020874,
-0.11474402993917465,
0.14295803010463715,
-0.12260115891695023,
-0.29986754059791565,
-0.08536551892757416,
-0.2901655435562134,
0.2939034700393677,
0.03131895512342453,
-0.16018342971801758,
-0.24809832870960236,
0.14130304753780365,
0.18543070554733276,
-0.06073729693889618,
-0.173649862408638,
0.37949463725090027,
-0.8608567714691162,
-0.08093740791082382,
-0.0547402948141098,
0.14585435390472412,
-0.35030829906463623,
-0.044295620173215866,
0.07883131504058838,
0.28060561418533325,
0.12999729812145233,
0.14428715407848358,
-0.27638161182403564,
0.12738922238349915,
-0.1922663450241089,
0.49281978607177734,
0.02623344585299492,
0.6061599254608154,
0.16826345026493073,
-0.24154844880104065,
-0.026608668267726898,
-0.04798078164458275,
0.33680564165115356,
-0.12013841420412064,
-0.028486385941505432,
0.1070726066827774,
-0.1537744402885437,
-0.5539860725402832,
-0.041631344705820084,
-0.00919869914650917,
0.0008517303504049778,
-0.08809392154216766,
-0.011580564081668854,
-0.20628777146339417,
-0.34950703382492065,
-0.004223622381687164,
-0.020443301647901535,
-0.07428433746099472,
0.23956476151943207,
-0.06189153715968132,
-0.17567646503448486,
0.015379944816231728,
-0.00852522999048233,
0.12514728307724,
-0.005999446846544743,
-0.18493083119392395,
-0.1844237893819809,
-0.46653181314468384,
-0.07280278205871582,
0.31932005286216736,
-0.1954096555709839,
0.2066606879234314,
-0.09137681126594543,
-0.02706097811460495,
-0.1993323564529419,
0.377690851688385,
0.3188766539096832,
0.4460635185241699,
-0.19585828483104706,
-0.31458598375320435,
0.10877431929111481,
0.35743448138237,
0.31971094012260437,
0.17730072140693665,
-0.16952233016490936,
0.2552005350589752,
0.10320395231246948,
-0.16564004123210907,
-0.39904317259788513,
0.14850912988185883,
0.33377140760421753,
-0.013987915590405464,
-0.38497334718704224,
-0.556472897529602,
0.7538570761680603,
0.30352529883384705,
0.15606185793876648,
0.338297963142395,
0.2668629586696625,
-0.2794845700263977,
0.5248182415962219,
0.4079272747039795,
1.0512207746505737,
-0.05097862333059311,
0.3578876852989197,
0.05956524983048439,
-0.19120466709136963,
0.17383137345314026,
-0.03421328589320183,
0.010781756602227688,
-0.4742812216281891,
-0.15919576585292816,
-0.17777086794376373,
-0.19905827939510345,
0.08075112104415894,
0.06776436418294907,
0.30017057061195374,
0.1468988060951233,
-0.15689852833747864,
0.1233602911233902,
0.14438466727733612,
0.13700337707996368,
-0.21085822582244873,
-0.2943650186061859,
0.038703709840774536,
0.08077137172222137,
-0.15262371301651,
0.03237023949623108,
0.08394096791744232,
-0.24761365354061127,
-0.17760665714740753,
-0.06239967420697212,
-0.17433729767799377,
0.09836553782224655,
-0.3862040340900421,
0.20854486525058746,
-0.04305073991417885,
-0.6213812232017517,
0.3718838393688202,
0.208966463804245,
0.33464664220809937,
-0.20721717178821564,
-0.11452479660511017,
0.08988691866397858,
0.4293409585952759,
-0.06048903986811638,
-0.01883694715797901,
-0.19887053966522217,
0.4383508861064911,
0.11583790928125381,
0.10285643488168716,
-0.004148028790950775,
0.004006710834801197,
-0.3716764450073242,
-0.17884503304958344,
-0.14186705648899078,
0.48844385147094727,
-0.3600061535835266,
-0.3033035099506378,
0.07324158400297165,
-0.10577262938022614,
-0.026954451575875282,
-0.013533726334571838,
0.06605754792690277,
-0.0794525146484375,
-0.02982500195503235,
0.22055134177207947,
-0.30704033374786377,
0.10492247343063354,
0.3794654607772827,
0.2592761814594269,
0.27610713243484497,
0.45092013478279114,
0.16587325930595398,
-0.08420585095882416,
-0.08403117954730988,
0.2752796709537506,
0.9381103515625,
-0.24178862571716309,
0.11315015703439713,
-0.07072287797927856,
-0.18239498138427734,
0.10092544555664062,
-0.133483424782753,
0.10555310547351837,
0.011717386543750763,
-0.17845465242862701,
-0.2008000910282135,
-0.4730120599269867,
0.10668472200632095,
-0.48858508467674255,
0.25222232937812805,
-0.1127747967839241,
-0.0003829188644886017,
-0.24782982468605042,
0.005085377022624016,
-0.12946370244026184,
0.11282216012477875,
0.20816238224506378,
0.07669249176979065,
-0.15839627385139465,
0.1341678500175476,
-0.0013010322581976652,
0.1834418624639511,
-0.0373186431825161,
0.10088684409856796,
-0.2249792367219925,
-0.0719657838344574,
-0.20948059856891632,
0.21160104870796204,
0.07883478701114655,
-0.04870465397834778,
0.10032214224338531,
-0.2600996494293213,
-0.22485651075839996,
-0.04550381749868393,
0.10098865628242493,
0.0768970400094986,
-0.025003261864185333,
0.33618858456611633,
0.3974801301956177,
-0.017613597214221954,
-0.20656201243400574,
0.08564376831054688,
0.24875731766223907,
0.41112232208251953,
-0.028435684740543365,
0.09199542552232742,
-0.1686858832836151,
-0.25212007761001587,
-0.31871306896209717,
0.2463507354259491,
0.4437054395675659,
0.0474105104804039,
0.21995052695274353,
-0.07451395690441132,
0.06952311098575592,
-0.32064905762672424,
0.2149876356124878,
0.48665523529052734,
-0.057818736881017685,
-0.05455870181322098,
-0.01142134703695774,
-0.07570704072713852,
-0.27054768800735474,
-0.04550345614552498,
-0.27412545680999756,
-0.3820188641548157,
0.009301606565713882,
0.09254362434148788,
0.11222590506076813,
0.562079906463623,
-0.08930499851703644,
-0.25668537616729736,
0.07064114511013031,
-0.2954810857772827,
-0.02838454768061638,
0.4573878049850464,
0.15717987716197968,
0.017833009362220764,
0.45574015378952026,
0.15624205768108368,
0.3069688677787781,
0.21311768889427185,
0.3235090672969818,
0.8402155041694641,
0.508361279964447,
0.024186041206121445,
0.4163288474082947,
-0.4468282163143158,
-0.17026665806770325,
0.37619924545288086,
0.28408128023147583,
0.11533816158771515,
0.1381603330373764,
0.4704506993293762,
-0.04124847427010536,
-0.4836512804031372,
0.016467658802866936,
-0.014304809272289276,
0.04095336049795151,
-0.3381246328353882,
-0.34274914860725403,
-0.014206573367118835,
-0.415567547082901,
-0.21365007758140564,
-0.32846158742904663,
-0.1840657889842987,
-0.03105001151561737,
0.15358203649520874,
-0.05736471712589264,
-0.2048218697309494,
0.01624012552201748,
0.18458613753318787,
-0.14904797077178955,
-0.08617293834686279,
0.09847386181354523,
-0.0619475394487381,
-0.053334422409534454,
0.08440183848142624,
0.18122325837612152,
0.23018163442611694,
0.15608492493629456,
-0.3443410098552704,
-0.0796007439494133,
0.39750123023986816,
-0.13329948484897614,
0.2858164310455322,
-0.006614353507757187,
0.032928530126810074,
-0.050483863800764084,
0.31877729296684265,
-0.00403077807277441,
0.0654802918434143,
0.02102663554251194,
-0.007260140031576157,
0.050919387489557266,
-0.0689644068479538,
0.5326982736587524,
0.13243091106414795,
0.03254513442516327,
-0.14822697639465332,
0.05407654494047165,
-0.3688839077949524,
-0.15570703148841858,
0.6477059721946716,
-0.16623085737228394,
0.11106587201356888,
0.05026024952530861,
-0.014434441924095154,
-0.02330905571579933,
0.36885106563568115,
0.364702045917511,
0.018968012183904648,
-0.346632719039917,
0.07383252680301666,
-0.3001280426979065,
0.022968895733356476,
-0.02104296162724495,
0.004511544480919838,
0.03398452326655388,
0.06137748807668686,
0.5213211178779602,
0.03175937384366989,
-0.04746580123901367,
0.06047442927956581,
0.11810704320669174,
0.3871953785419464,
-0.03129810467362404,
-0.24243809282779694,
-0.1258305460214615,
0.34303706884384155,
-0.1222839429974556,
-0.39576661586761475,
-0.09551383554935455,
0.17921863496303558,
-0.08824311196804047,
0.07778483629226685,
-0.33487311005592346,
0.6279917359352112,
0.0028240159153938293,
0.3965126872062683,
0.01397094689309597,
0.47735390067100525,
-0.14560654759407043,
-0.0347251370549202,
0.049061331897974014,
-0.07068052887916565,
-0.4631294310092926,
0.21105533838272095,
-0.14996515214443207,
0.3279792070388794,
-0.03599770367145538,
-0.14421960711479187,
-0.11814089119434357,
0.15517549216747284,
-0.1119900494813919,
-0.44634541869163513,
-0.3844429850578308,
0.5214527249336243,
-0.3229983448982239,
-0.04727442190051079,
0.16728022694587708,
0.47119659185409546,
0.16613884270191193,
0.24362339079380035,
-0.2501739263534546,
-0.2161932736635208,
0.5785569548606873,
-0.03633950650691986,
-0.10522472858428955,
0.02364565059542656,
-0.04734271764755249,
0.2287590503692627,
0.19119028747081757,
-0.31085532903671265,
-0.11465030163526535,
0.13731162250041962,
-0.20192399621009827,
0.1190904974937439,
0.1711321771144867,
0.2146119624376297,
0.2068580836057663,
-0.37513503432273865,
0.43970349431037903,
0.12387409061193466,
0.08258556574583054,
-0.2764619290828705,
-0.3310409188270569
] |
https://github.com/huggingface/datasets/issues/2165 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset | That makes sense ! Feel free to open an issue on their repo and discuss this idea | Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 17 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
That makes sense ! Feel free to open an issue on their repo and discuss this idea | [
-0.26200199127197266,
-0.3059774339199066,
0.048273418098688126,
0.33868950605392456,
0.11748912185430527,
0.22666704654693604,
-0.09718725085258484,
0.3648379445075989,
-0.1662658154964447,
-0.21851859986782074,
-0.3497868776321411,
0.39448297023773193,
-0.252158522605896,
-0.0014389976859092712,
0.16799582540988922,
-0.29346299171447754,
0.20711033046245575,
0.07876916229724884,
-0.24266278743743896,
-0.21805225312709808,
-0.1317133605480194,
-0.07211771607398987,
0.05615070462226868,
0.1099013090133667,
0.04537595808506012,
0.03876957297325134,
0.06313434988260269,
0.1353645920753479,
-0.11498070508241653,
-0.35633572936058044,
0.21669645607471466,
0.03833489120006561,
0.5877939462661743,
0.25219184160232544,
-0.00012786308070644736,
0.11648829281330109,
0.05868096277117729,
-0.11476672440767288,
0.10686659812927246,
-0.09299038350582123,
-0.17437401413917542,
-0.02082125097513199,
0.20102784037590027,
-0.13191553950309753,
-0.3075416088104248,
-0.5764226317405701,
-0.06901831924915314,
-0.3266124725341797,
0.10394877940416336,
0.5637232065200806,
0.058213748037815094,
0.2589327096939087,
0.05552384629845619,
0.026206394657492638,
0.3165857791900635,
-0.14755751192569733,
-0.19017957150936127,
0.0691053569316864,
-0.0712912380695343,
0.12841126322746277,
-0.1900322139263153,
0.17560145258903503,
-0.15787945687770844,
0.044820040464401245,
0.3596791625022888,
-0.3286310136318207,
-0.35917267203330994,
-0.19280605018138885,
-0.06823065876960754,
0.5270514488220215,
0.2203395962715149,
-0.21351391077041626,
-0.03895551711320877,
0.18023622035980225,
-0.07327497005462646,
-0.19672195613384247,
-0.37875351309776306,
0.19826361536979675,
-0.01625116355717182,
0.12707766890525818,
-0.0345081090927124,
-0.20569805800914764,
-0.1423492133617401,
0.07158375531435013,
0.17240971326828003,
0.37339282035827637,
0.07660073786973953,
0.17458891868591309,
0.2233617901802063,
-0.3262197971343994,
0.40414953231811523,
-0.20092786848545074,
0.00329633429646492,
-0.19297157227993011,
-0.12471389770507812,
-0.032815419137477875,
-0.3565468490123749,
-0.06986527889966965,
0.45705729722976685,
0.13223212957382202,
0.2172509878873825,
0.308916836977005,
-0.19651155173778534,
0.08499765396118164,
-0.16746239364147186,
-0.20688599348068237,
0.1313788741827011,
0.24106313288211823,
0.01712789013981819,
-0.27038097381591797,
-0.016132516786456108,
0.2712004482746124,
-0.104106105864048,
-0.3959653675556183,
0.003995705395936966,
0.0003850962966680527,
-0.1091182678937912,
-0.21029877662658691,
-0.19645261764526367,
-0.20792555809020996,
-0.268463134765625,
-0.050248801708221436,
0.01887780800461769,
0.21638846397399902,
-0.012028874829411507,
0.050680577754974365,
0.2428293377161026,
0.6414878964424133,
-0.20446182787418365,
-0.09720083326101303,
0.00294767739251256,
0.09248384833335876,
-0.010187182575464249,
-0.1769012063741684,
-0.08996857702732086,
-0.14998652040958405,
0.10728693008422852,
-0.031997520476579666,
-0.2831273674964905,
0.15497712790966034,
0.35882148146629333,
-0.09773430228233337,
0.25971347093582153,
0.05837497115135193,
0.07690408825874329,
0.036185577511787415,
0.2901768386363983,
0.4265042543411255,
-0.3359185755252838,
0.26602864265441895,
-0.5100513696670532,
-0.18353429436683655,
-0.1684630960226059,
0.04245460778474808,
0.157941073179245,
-0.3772471845149994,
-0.40597203373908997,
0.3280166685581207,
-0.01733170449733734,
0.11695563793182373,
0.06178101897239685,
-0.4518921375274658,
-0.33730778098106384,
-0.19283048808574677,
0.19110599160194397,
0.22454705834388733,
-0.3925149440765381,
-0.12916135787963867,
0.12343329936265945,
-0.1684451550245285,
0.21708759665489197,
0.33017268776893616,
-0.21599699556827545,
0.03130533918738365,
-0.4144066572189331,
-0.011135108768939972,
0.6295618414878845,
-0.29437050223350525,
0.1210271567106247,
0.09770819544792175,
0.10296700894832611,
-0.28215500712394714,
0.12509872019290924,
-0.01958850957453251,
-0.10651787370443344,
-0.037088457494974136,
0.15843859314918518,
0.2269480675458908,
-0.1056133359670639,
-0.17474183440208435,
-0.11870074272155762,
-0.3208872973918915,
0.477276086807251,
-0.06656157970428467,
0.20130272209644318,
0.2817780077457428,
-0.10686271637678146,
-0.24522481858730316,
0.31792938709259033,
-0.07251809537410736,
0.11543064564466476,
0.24616461992263794,
-0.28074708580970764,
0.025296002626419067,
-0.07725822925567627,
0.1072368398308754,
0.13061153888702393,
-0.030407752841711044,
0.03517746180295944,
0.002821754664182663,
0.09033063054084778,
0.06970061361789703,
-0.22876393795013428,
0.17787359654903412,
-0.10922709107398987,
0.044742971658706665,
-0.06740264594554901,
-0.062288060784339905,
-0.1602267026901245,
-0.17943540215492249,
-0.06043224781751633,
0.1831255406141281,
-0.3872933089733124,
0.12126058340072632,
-0.579386293888092,
0.21930617094039917,
0.09257438033819199,
0.12128175795078278,
0.07030609250068665,
0.20917212963104248,
0.12791234254837036,
-0.004675543867051601,
-0.1303330659866333,
0.18741124868392944,
-0.022134218364953995,
0.07341405004262924,
0.3958810567855835,
0.3856075406074524,
0.08284620195627213,
-1.0582388639450073,
0.39520061016082764,
0.4471336901187897,
0.11199664324522018,
-0.09612477570772171,
-0.06956570595502853,
0.6733701229095459,
0.19186706840991974,
0.20597609877586365,
-0.0288748349994421,
-0.07679173350334167,
0.11045365035533905,
0.1275683492422104,
-0.20365743339061737,
0.06596867740154266,
-0.08608604967594147,
-0.016657736152410507,
0.3008365333080292,
-0.01849748007953167,
-0.3902417719364166,
-0.025535233318805695,
0.10848665237426758,
0.009615257382392883,
0.0751609355211258,
0.3450945019721985,
-0.5225215554237366,
-0.15044966340065002,
0.2817337214946747,
-0.3142380118370056,
0.120088592171669,
0.1677168905735016,
0.23514626920223236,
0.01987236551940441,
-0.09473485499620438,
-0.001371609978377819,
0.27855783700942993,
-0.0029333606362342834,
0.45717674493789673,
0.014075953513383865,
0.08454758673906326,
-0.0685097873210907,
-0.3553749620914459,
0.013591617345809937,
-0.15949353575706482,
-0.028302552178502083,
-0.4566037952899933,
0.14716394245624542,
-0.4094289541244507,
-0.13251234591007233,
-0.2963464558124542,
-0.016523510217666626,
0.08006182312965393,
-0.09482965618371964,
-0.1525072455406189,
-0.04119410738348961,
0.2538251280784607,
0.08885280787944794,
-0.4279695749282837,
-0.25914841890335083,
0.22842071950435638,
-0.25011277198791504,
-0.07652705907821655,
-0.17940519750118256,
-0.10350068658590317,
-0.062471114099025726,
0.09335190802812576,
0.01215561293065548,
0.2956852912902832,
0.12029222398996353,
0.1410048007965088,
-0.4283619523048401,
-0.11820478737354279,
0.005406264215707779,
-0.13147282600402832,
0.044643521308898926,
0.19537702202796936,
0.1535251885652542,
0.19182929396629333,
0.05395704507827759,
0.05748313292860985,
0.00929170660674572,
-0.0366961732506752,
0.11312106251716614,
-0.43220382928848267,
0.16734638810157776,
0.47262445092201233,
-0.15728408098220825,
-0.3136516511440277,
-0.21829813718795776,
-0.337382435798645,
0.08252140879631042,
0.14189079403877258,
-0.1249806359410286,
0.3699382543563843,
0.1498875617980957,
0.18453635275363922,
-0.01778378337621689,
-0.09114197641611099,
-0.07601195573806763,
0.344948947429657,
-0.0636734664440155,
-0.2971722185611725,
-0.13097696006298065,
-0.23795467615127563,
0.12143932282924652,
0.22877991199493408,
-0.35492372512817383,
0.16841135919094086,
-0.18700672686100006,
0.32279643416404724,
0.0330062136054039,
-0.017031608149409294,
0.325039267539978,
-0.17847993969917297,
0.113430455327034,
-0.18289193511009216,
-0.2321368157863617,
-0.01093880832195282,
-0.1593884825706482,
0.38651832938194275,
0.41344794631004333,
0.4659537672996521,
-0.20013056695461273,
0.9793556928634644,
-0.014101911336183548,
-0.37779107689857483,
0.5141609311103821,
-0.1381683647632599,
0.10836908966302872,
-0.19418928027153015,
-0.2245258390903473,
-0.03680752217769623,
-0.10049518942832947,
0.3606390953063965,
0.09456104785203934,
-0.12775114178657532,
-0.1838701367378235,
0.10196340084075928,
0.11885148286819458,
-0.13415928184986115,
-0.046394508332014084,
0.2515125274658203,
-0.8417853116989136,
-0.10521668940782547,
0.015522755682468414,
-0.015247777104377747,
-0.25735965371131897,
-0.07367299497127533,
0.05080270767211914,
0.297407865524292,
0.22277864813804626,
0.21176421642303467,
-0.4028933048248291,
0.19661934673786163,
-0.2293703258037567,
0.43888890743255615,
-0.08127324283123016,
0.48644426465034485,
0.09754052758216858,
-0.07950089871883392,
0.051580145955085754,
-0.06457559764385223,
0.3845900297164917,
-0.17647820711135864,
-0.12001971900463104,
0.0444984994828701,
-0.010380629450082779,
-0.4325411915779114,
0.0031332634389400482,
0.011212818324565887,
-0.01995675079524517,
-0.09841509163379669,
0.16896797716617584,
-0.15141946077346802,
-0.3656146228313446,
0.005857594311237335,
0.005432197358459234,
-0.09784027934074402,
0.3364616930484772,
0.060464102774858475,
-0.26071739196777344,
0.046172045171260834,
0.04320547357201576,
-0.022343017160892487,
-0.08556167781352997,
-0.13297072052955627,
-0.2263629138469696,
-0.4594127833843231,
0.057705678045749664,
0.255159854888916,
-0.20105291903018951,
0.2151528298854828,
-0.1025257557630539,
-0.09147560596466064,
-0.2516607642173767,
0.3307197391986847,
0.2434738576412201,
0.3105362355709076,
-0.23246869444847107,
-0.17770829796791077,
0.011596369557082653,
0.3291948139667511,
0.39913222193717957,
0.11612356454133987,
-0.04860376939177513,
0.27984219789505005,
0.07269026339054108,
-0.10825110971927643,
-0.3122853934764862,
0.15562762320041656,
0.3349762558937073,
-0.006093508563935757,
-0.5391892194747925,
-0.46979495882987976,
0.7293049693107605,
0.25885429978370667,
0.1164349764585495,
0.18404613435268402,
0.22640003263950348,
-0.25939977169036865,
0.6836551427841187,
0.2476068139076233,
1.1105153560638428,
-0.15059587359428406,
0.3254765272140503,
-0.05538298189640045,
-0.3049466013908386,
0.19743135571479797,
-0.13907752931118011,
-0.03728475421667099,
-0.4860219657421112,
-0.11307533085346222,
-0.17401123046875,
-0.20288626849651337,
0.02124636620283127,
0.12517282366752625,
0.32906001806259155,
0.18445399403572083,
-0.07731212675571442,
-0.038989488035440445,
0.07932175695896149,
0.1365746110677719,
-0.019958989694714546,
-0.1847100406885147,
-0.0652608722448349,
0.10121680796146393,
-0.2433091551065445,
0.05941395461559296,
0.016227345913648605,
-0.3013005256652832,
-0.10524305701255798,
-0.05084959417581558,
-0.06330613046884537,
0.1296350359916687,
-0.39919981360435486,
0.18225276470184326,
-0.09628038108348846,
-0.7509377002716064,
0.2139519304037094,
0.2963103950023651,
0.34202104806900024,
-0.15960095822811127,
-0.14808352291584015,
0.16836659610271454,
0.4576699137687683,
-0.1613239198923111,
-0.0013215073850005865,
-0.09381739795207977,
0.2785464823246002,
0.0020789317786693573,
0.021858908236026764,
0.06191971153020859,
0.04779863357543945,
-0.3985946774482727,
-0.3425137400627136,
-0.15302824974060059,
0.471191942691803,
-0.23644758760929108,
-0.5164051651954651,
0.20928511023521423,
-0.0526452511548996,
-0.06172697991132736,
0.0075549958273768425,
0.10046858340501785,
-0.0716264545917511,
0.07385498285293579,
0.2897489070892334,
-0.3646854758262634,
0.043640218675136566,
0.38051530718803406,
0.20729273557662964,
0.3583512008190155,
0.37871408462524414,
0.1604647934436798,
-0.08770102262496948,
-0.07133280485868454,
0.2488459050655365,
0.8871480822563171,
-0.24459952116012573,
-0.07498402893543243,
-0.09945150464773178,
-0.07879550755023956,
0.21010459959506989,
-0.144738107919693,
0.007223799824714661,
0.0007947906851768494,
-0.047039907425642014,
-0.16083943843841553,
-0.3713754713535309,
0.03235848993062973,
-0.500892162322998,
0.21499207615852356,
0.0250551775097847,
-0.08578252792358398,
-0.349396288394928,
0.0549616776406765,
-0.14309006929397583,
0.18654301762580872,
0.21903537213802338,
0.12052246928215027,
-0.10125767439603806,
0.1273953914642334,
-0.013158561661839485,
0.15125897526741028,
0.0032077860087156296,
0.019438423216342926,
-0.19980882108211517,
-0.14107131958007812,
-0.23077259957790375,
0.20485258102416992,
0.10360179841518402,
-0.14947445690631866,
0.08143742382526398,
-0.2535153925418854,
-0.24879735708236694,
0.039264075458049774,
0.13886699080467224,
0.18485167622566223,
0.10143111646175385,
0.2950350344181061,
0.3234408497810364,
-0.06259166449308395,
-0.18498748540878296,
0.05616503953933716,
0.3580038547515869,
0.34860461950302124,
-0.15931956470012665,
0.11673374474048615,
-0.17488184571266174,
-0.29425570368766785,
-0.35239988565444946,
0.1472957283258438,
0.524092972278595,
0.027755891904234886,
0.20106998085975647,
-0.06555759161710739,
0.13213281333446503,
-0.24863305687904358,
0.21286822855472565,
0.40671348571777344,
-0.09343711286783218,
0.05603618919849396,
0.07849085330963135,
-0.0621013417840004,
-0.30874043703079224,
-0.05842496454715729,
-0.20660355687141418,
-0.3107799291610718,
-0.0911203995347023,
0.001104690134525299,
0.13924112915992737,
0.5642006993293762,
-0.11395199596881866,
-0.2999235987663269,
0.05018913000822067,
-0.3612254858016968,
-0.11782895028591156,
0.4179742932319641,
0.19008618593215942,
0.01650068163871765,
0.3872236907482147,
0.24784399569034576,
0.3203355669975281,
0.17479971051216125,
0.3979458808898926,
0.8507419228553772,
0.648827075958252,
0.06591290235519409,
0.43148812651634216,
-0.3954395055770874,
-0.36992689967155457,
0.2533232867717743,
0.1470925509929657,
0.1307244598865509,
0.17131611704826355,
0.5190116763114929,
0.13686740398406982,
-0.5436132550239563,
0.0644952580332756,
0.17601698637008667,
0.02153005450963974,
-0.4329627454280853,
-0.16276592016220093,
0.04467322677373886,
-0.3134477734565735,
-0.14613619446754456,
-0.3626265823841095,
-0.11905074119567871,
-0.02269432693719864,
0.19189855456352234,
0.015150569379329681,
-0.08941685408353806,
0.10094687342643738,
0.16291336715221405,
-0.14495053887367249,
-0.058366771787405014,
0.16317786276340485,
-0.16065986454486847,
-0.045653536915779114,
0.05035214126110077,
0.18547439575195312,
0.24727822840213776,
-0.019069265574216843,
-0.2948697507381439,
-0.07160037755966187,
0.46386581659317017,
-0.1851457953453064,
0.3130325973033905,
-0.04947088658809662,
0.18719524145126343,
-0.11256781220436096,
0.3060000240802765,
0.012617448344826698,
0.05036793649196625,
0.1502804458141327,
0.007372725754976273,
0.00018551014363765717,
-0.0016835592687129974,
0.2825617790222168,
0.08210311084985733,
0.009857334196567535,
-0.16401349008083344,
-0.010839767754077911,
-0.3895702660083771,
-0.06287781149148941,
0.6542885303497314,
-0.2125011533498764,
0.12707781791687012,
0.06971313804388046,
0.001059655100107193,
-0.04405156150460243,
0.18331918120384216,
0.36985132098197937,
0.10648912191390991,
-0.3608699440956116,
0.029092520475387573,
-0.2346724420785904,
0.03965397924184799,
0.023565426468849182,
0.10588730871677399,
-0.08424647152423859,
-0.009763850830495358,
0.3654394745826721,
0.008063260465860367,
-0.06159090995788574,
-0.04781317710876465,
0.19488394260406494,
0.5103933215141296,
0.025160934776067734,
-0.10594943165779114,
-0.257678747177124,
0.3504762649536133,
-0.14830999076366425,
-0.3171128034591675,
-0.05636787787079811,
0.24027293920516968,
-0.07939009368419647,
-0.030105385929346085,
-0.23076368868350983,
0.545112669467926,
-0.05868705362081528,
0.32271939516067505,
-0.05440588295459747,
0.5014356374740601,
-0.2844737768173218,
0.10690423101186752,
0.12471632659435272,
-0.08370701968669891,
-0.4017587900161743,
0.21891388297080994,
-0.1264355182647705,
0.27326589822769165,
0.01072230190038681,
-0.10017037391662598,
-0.025706682354211807,
0.13738839328289032,
-0.1320917010307312,
-0.4687424302101135,
-0.2303672730922699,
0.4813532829284668,
-0.23962020874023438,
-0.14004358649253845,
0.29078409075737,
0.4693763554096222,
0.2053036093711853,
0.16072054207324982,
-0.16765543818473816,
-0.15600550174713135,
0.5634087324142456,
0.1537974625825882,
-0.04107183218002319,
0.08228112757205963,
-0.11214649677276611,
0.31605851650238037,
0.06591849774122238,
-0.35616573691368103,
-0.11336109787225723,
0.14870427548885345,
-0.292699933052063,
0.12811192870140076,
0.22719843685626984,
0.24101628363132477,
0.262063205242157,
-0.31641265749931335,
0.425103098154068,
0.21945741772651672,
0.051638104021549225,
-0.24757660925388336,
-0.34964072704315186
] |
https://github.com/huggingface/datasets/issues/2165 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset | @y-rokutan Hi, now if you install `deepspeed` from master (this feature will be available in the next official release), the code should work without subclassing. Let us know if you still have any issues. | Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 34 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
@y-rokutan Hi, now if you install `deepspeed` from master (this feature will be available in the next official release), the code should work without subclassing. Let us know if you still have any issues. | [
-0.263549268245697,
-0.3762311339378357,
0.08587254583835602,
0.3691844940185547,
0.18167565762996674,
0.3435535132884979,
-0.051824335008859634,
0.4010281264781952,
-0.165042906999588,
-0.25844961404800415,
-0.3508142828941345,
0.3204565644264221,
-0.2445642203092575,
0.014273440465331078,
0.196675106883049,
-0.3255869150161743,
0.21076089143753052,
0.028244704008102417,
-0.21179509162902832,
-0.25634562969207764,
-0.2183748334646225,
-0.06600619107484818,
0.0091976597905159,
0.13869857788085938,
-0.0008857711218297482,
0.03126971423625946,
0.0924517959356308,
0.15846389532089233,
-0.11161454766988754,
-0.366057425737381,
0.294160395860672,
0.06597870588302612,
0.6609081029891968,
0.24739933013916016,
-0.00013030196714680642,
0.15169976651668549,
0.04855809360742569,
-0.09975458681583405,
0.15978042781352997,
-0.08682791888713837,
-0.2239151895046234,
0.027900082990527153,
0.20707780122756958,
-0.12897327542304993,
-0.4146132171154022,
-0.6126390099525452,
-0.034718871116638184,
-0.3231692314147949,
0.1267072558403015,
0.45202916860580444,
0.03574347496032715,
0.1441904902458191,
0.0045097507536411285,
0.043958842754364014,
0.24776560068130493,
-0.19347034394741058,
-0.18542596697807312,
0.09366025030612946,
-0.0743710845708847,
0.14101409912109375,
-0.22509661316871643,
0.08562788367271423,
-0.15295720100402832,
0.02568645216524601,
0.47446367144584656,
-0.3056490123271942,
-0.3226052224636078,
-0.26473283767700195,
-0.073393315076828,
0.5432499051094055,
0.21579501032829285,
-0.22982099652290344,
-0.10460399836301804,
0.18222162127494812,
-0.05505887791514397,
-0.23111003637313843,
-0.3596682548522949,
0.2333776354789734,
0.017058677971363068,
0.13052281737327576,
0.011207359842956066,
-0.12991449236869812,
-0.18630842864513397,
0.08756005018949509,
0.28060999512672424,
0.3632267713546753,
0.08510956168174744,
0.15120334923267365,
0.21552062034606934,
-0.24191199243068695,
0.34367069602012634,
-0.22627902030944824,
0.007046382874250412,
-0.18125398457050323,
-0.1346869021654129,
-0.05331295356154442,
-0.3148995339870453,
-0.08490655571222305,
0.37813061475753784,
0.12880900502204895,
0.17400316894054413,
0.37701815366744995,
-0.1272422820329666,
0.07303165644407272,
-0.13475792109966278,
-0.12469305098056793,
0.21712812781333923,
0.23737730085849762,
0.0385422557592392,
-0.2505725622177124,
-0.02053787186741829,
0.2715173661708832,
-0.15027356147766113,
-0.2897733449935913,
-0.04687640815973282,
0.051492318511009216,
-0.15154090523719788,
-0.17653681337833405,
-0.16655437648296356,
-0.18649867177009583,
-0.3177582323551178,
-0.05143177881836891,
0.047508515417575836,
0.23430567979812622,
0.05501123145222664,
0.04738986864686012,
0.26831382513046265,
0.6924924254417419,
-0.20338724553585052,
-0.11858735233545303,
0.03223355486989021,
0.11748301982879639,
-0.09596778452396393,
-0.1980101466178894,
-0.08002504706382751,
-0.15646296739578247,
0.019053982570767403,
0.026323087513446808,
-0.30155491828918457,
0.13010914623737335,
0.3758249878883362,
-0.09967535734176636,
0.22881335020065308,
0.04590403661131859,
0.03180072829127312,
0.07376419007778168,
0.3789960443973541,
0.44135886430740356,
-0.3008754253387451,
0.271504282951355,
-0.4328228235244751,
-0.2426430583000183,
-0.11569015681743622,
-0.013098563067615032,
0.18897120654582977,
-0.27560245990753174,
-0.41656240820884705,
0.37203630805015564,
0.01635122299194336,
0.13438546657562256,
0.010878659784793854,
-0.46011072397232056,
-0.4295724034309387,
-0.17029832303524017,
0.22511516511440277,
0.1835806518793106,
-0.40520429611206055,
-0.14380958676338196,
0.0620037205517292,
-0.14788131415843964,
0.2841463088989258,
0.2974843680858612,
-0.1768793761730194,
0.016513168811798096,
-0.3843536376953125,
-0.017885565757751465,
0.5604597926139832,
-0.22820577025413513,
0.1074005588889122,
0.11666383594274521,
0.10414643585681915,
-0.21937261521816254,
0.17307224869728088,
0.04082680866122246,
-0.04296262562274933,
-0.06212044134736061,
0.12277583032846451,
0.22298459708690643,
-0.12181949615478516,
-0.21116816997528076,
-0.10403861105442047,
-0.22912663221359253,
0.43878209590911865,
-0.060331523418426514,
0.2165643870830536,
0.3418140411376953,
-0.15439778566360474,
-0.25810107588768005,
0.3750075399875641,
-0.03828519955277443,
0.14169764518737793,
0.21982461214065552,
-0.26987960934638977,
0.12131629884243011,
-0.06756617873907089,
0.08898823708295822,
0.20086336135864258,
0.05101115256547928,
0.060785360634326935,
0.06598140299320221,
0.16568270325660706,
0.05065391957759857,
-0.16641607880592346,
0.10742896050214767,
-0.13527658581733704,
0.0021145492792129517,
-0.10622327774763107,
-0.0797211229801178,
-0.27418282628059387,
-0.26910436153411865,
-0.09040272235870361,
0.23402798175811768,
-0.450022429227829,
0.14283886551856995,
-0.5754757523536682,
0.1612214893102646,
0.13053961098194122,
0.14296993613243103,
0.05620291084051132,
0.18025586009025574,
0.09345134347677231,
-0.0646032765507698,
-0.14355239272117615,
0.20073357224464417,
0.04850129783153534,
-0.09766659140586853,
0.37837836146354675,
0.25024309754371643,
0.0699363425374031,
-1.0497533082962036,
0.34319978952407837,
0.4532100260257721,
0.09235110878944397,
-0.1317552626132965,
-0.03819793462753296,
0.684837281703949,
0.2695319950580597,
0.22144204378128052,
-0.03695395588874817,
-0.04385364055633545,
0.0043836962431669235,
0.13373170793056488,
-0.2001352310180664,
0.0169999822974205,
-0.12307710945606232,
-0.07098296284675598,
0.26629430055618286,
-0.014630494639277458,
-0.36104679107666016,
-0.03654342144727707,
0.04661623761057854,
-0.03579797223210335,
0.1359194815158844,
0.33268874883651733,
-0.5043022036552429,
-0.058315929025411606,
0.2491912990808487,
-0.16095933318138123,
0.12412839382886887,
0.1438809633255005,
0.20885013043880463,
0.007288821041584015,
-0.10114064067602158,
0.028205525130033493,
0.28731822967529297,
0.023693114519119263,
0.37784692645072937,
-0.06375452876091003,
-0.018888169899582863,
-0.07088262587785721,
-0.3746260404586792,
0.09858483076095581,
-0.1449112743139267,
-0.06933034211397171,
-0.4895896315574646,
0.1309630274772644,
-0.44845345616340637,
-0.07114721089601517,
-0.22241300344467163,
-0.017748020589351654,
0.044177643954753876,
-0.049512527883052826,
-0.17791369557380676,
-0.02104516699910164,
0.2825019061565399,
0.1720360964536667,
-0.4338255226612091,
-0.26075756549835205,
0.20051319897174835,
-0.29891476035118103,
0.021510444581508636,
-0.14391972124576569,
-0.11556033045053482,
-0.08675606548786163,
0.12914901971817017,
-0.0038977600634098053,
0.2609843313694,
0.1594066619873047,
0.056651584804058075,
-0.28994375467300415,
-0.16495954990386963,
-0.0274357870221138,
-0.21374116837978363,
0.10000642389059067,
0.1556868851184845,
0.1725543886423111,
0.15562787652015686,
0.02780720964074135,
0.10508441925048828,
0.016012342646718025,
-0.03903375566005707,
0.09904246777296066,
-0.3585253953933716,
0.16762350499629974,
0.42556270956993103,
-0.168935626745224,
-0.21580812335014343,
-0.2354135662317276,
-0.37358665466308594,
0.030824188143014908,
0.12545360624790192,
-0.13268692791461945,
0.2924010753631592,
0.06981755048036575,
0.21856065094470978,
0.004667286761105061,
-0.0764477401971817,
-0.07432782649993896,
0.383773535490036,
-0.02126953937113285,
-0.32307013869285583,
-0.15052805840969086,
-0.2576107382774353,
0.10674771666526794,
0.1544966846704483,
-0.3151586651802063,
0.195271834731102,
-0.21764875948429108,
0.2480795681476593,
0.07064323127269745,
-0.10142500698566437,
0.344176709651947,
-0.15428006649017334,
0.14131870865821838,
-0.17260223627090454,
-0.28862226009368896,
0.0019524246454238892,
-0.18911674618721008,
0.38909265398979187,
0.3815203011035919,
0.5699660181999207,
-0.18612825870513916,
0.988328218460083,
-0.03730923682451248,
-0.33128389716148376,
0.5028914213180542,
-0.08491566777229309,
0.09293019771575928,
-0.16949692368507385,
-0.3107755482196808,
-0.03276859596371651,
-0.12090611457824707,
0.310707688331604,
0.11394079029560089,
-0.12509018182754517,
-0.19880127906799316,
0.11345928907394409,
0.16787731647491455,
-0.018129609525203705,
-0.051774006336927414,
0.2330695390701294,
-0.8297375440597534,
-0.09125124663114548,
-0.021602870896458626,
0.12280494719743729,
-0.2273719161748886,
-0.05013520270586014,
0.012153049930930138,
0.32785484194755554,
0.19790786504745483,
0.2163318246603012,
-0.3806890845298767,
0.157745361328125,
-0.21932852268218994,
0.4085034132003784,
-0.07046058028936386,
0.49123698472976685,
0.09337449073791504,
-0.09499719738960266,
0.08615794032812119,
0.022069374099373817,
0.36333656311035156,
-0.17934517562389374,
-0.030841879546642303,
0.11176156997680664,
-0.12612152099609375,
-0.47556254267692566,
-0.05588166043162346,
0.029604632407426834,
-0.046233125030994415,
-0.06907115876674652,
0.046701185405254364,
-0.14274947345256805,
-0.4097149968147278,
0.0651431530714035,
-0.14421086013317108,
-0.08700884133577347,
0.24945376813411713,
-0.041237350553274155,
-0.21789610385894775,
0.036909475922584534,
0.07786443084478378,
0.028341105207800865,
-0.05562150850892067,
-0.1522572934627533,
-0.23645997047424316,
-0.4242432713508606,
-0.036636725068092346,
0.3029748201370239,
-0.23551015555858612,
0.21332484483718872,
-0.04166330397129059,
-0.04845498502254486,
-0.23233705759048462,
0.30774199962615967,
0.27004367113113403,
0.28549724817276,
-0.20154331624507904,
-0.17154988646507263,
0.08808059245347977,
0.32639792561531067,
0.41926196217536926,
0.12284515798091888,
-0.12598326802253723,
0.24963125586509705,
0.08540644496679306,
-0.16993850469589233,
-0.387694388628006,
0.12045726180076599,
0.39084580540657043,
0.0005142278969287872,
-0.510920524597168,
-0.5484150052070618,
0.7228654623031616,
0.21016007661819458,
0.10959360003471375,
0.18107396364212036,
0.17940407991409302,
-0.25315967202186584,
0.6627233028411865,
0.22559046745300293,
1.1227080821990967,
-0.15672534704208374,
0.30880311131477356,
-0.09893988817930222,
-0.22540727257728577,
0.1381104439496994,
-0.09557657688856125,
0.08039691299200058,
-0.4583057761192322,
-0.223197340965271,
-0.21681000292301178,
-0.17977303266525269,
0.07529808580875397,
0.1701575517654419,
0.3530701696872711,
0.1755506694316864,
-0.11299441754817963,
0.024955688044428825,
0.13064737617969513,
0.1007460355758667,
-0.012815795838832855,
-0.21094724535942078,
-0.04582492262125015,
0.07141280919313431,
-0.18207506835460663,
0.04819544404745102,
0.02355393022298813,
-0.3256043791770935,
-0.09105867147445679,
-0.04902324825525284,
-0.09715503454208374,
0.14397045969963074,
-0.3985101282596588,
0.20582933723926544,
-0.13750658929347992,
-0.7237468361854553,
0.38121500611305237,
0.32801544666290283,
0.37232017517089844,
-0.16270259022712708,
-0.09402745217084885,
0.1356169432401657,
0.3901247978210449,
-0.15751144289970398,
-0.038642361760139465,
-0.11927754431962967,
0.2890605926513672,
0.04284504055976868,
0.010076403617858887,
-0.01115032285451889,
0.032005663961172104,
-0.4106135964393616,
-0.30228298902511597,
-0.15439948439598083,
0.4988343119621277,
-0.2720610201358795,
-0.4807465970516205,
0.14920373260974884,
-0.03856661543250084,
-0.08650372922420502,
-0.008498739451169968,
0.040865618735551834,
-0.13144215941429138,
0.060504041612148285,
0.27166834473609924,
-0.358627587556839,
0.034023746848106384,
0.42360201478004456,
0.27879977226257324,
0.45501166582107544,
0.38252347707748413,
0.21734102070331573,
-0.03117682784795761,
-0.07441873848438263,
0.3133802115917206,
0.9300650358200073,
-0.10525095462799072,
-0.0382368341088295,
-0.03907597064971924,
-0.11283863335847855,
0.21142297983169556,
-0.17192798852920532,
0.058747801929712296,
0.01831952854990959,
-0.0646200180053711,
-0.14654436707496643,
-0.3974839746952057,
0.03509979695081711,
-0.5616660118103027,
0.2371179610490799,
-0.013126594945788383,
-0.04437107965350151,
-0.28601235151290894,
0.11061761528253555,
-0.11059334129095078,
0.1045892983675003,
0.16528429090976715,
0.10901232063770294,
-0.05357668548822403,
0.1778019666671753,
0.03951716423034668,
0.16979362070560455,
-0.02886178530752659,
0.02142886444926262,
-0.2437860369682312,
-0.08562108129262924,
-0.20437772572040558,
0.203452929854393,
0.1092086210846901,
-0.07051451504230499,
0.10990709066390991,
-0.22085891664028168,
-0.32137712836265564,
0.03537878394126892,
0.1673649400472641,
0.12908118963241577,
0.06027720496058464,
0.3388199508190155,
0.33204564452171326,
-0.09922032803297043,
-0.2505175471305847,
0.011737173423171043,
0.24766848981380463,
0.3977494239807129,
-0.1052657887339592,
0.047907039523124695,
-0.13438406586647034,
-0.2938900887966156,
-0.3598112463951111,
0.12823699414730072,
0.4391295909881592,
0.013845657929778099,
0.24018219113349915,
-0.11846765875816345,
0.1339881420135498,
-0.20980946719646454,
0.20711897313594818,
0.3725751042366028,
0.0018703355453908443,
0.0330052375793457,
-0.060983285307884216,
-0.09308631718158722,
-0.3016679286956787,
-0.04225534200668335,
-0.1800866574048996,
-0.3002394139766693,
-0.09028871357440948,
0.028997644782066345,
0.10322490334510803,
0.5535038709640503,
-0.13857115805149078,
-0.2539669871330261,
0.060276612639427185,
-0.32150155305862427,
-0.0014768661931157112,
0.424654483795166,
0.19858698546886444,
0.04896830394864082,
0.4345267415046692,
0.24018697440624237,
0.3080201745033264,
0.2676522731781006,
0.47435253858566284,
0.8348225355148315,
0.5884383916854858,
0.07747240364551544,
0.3680681586265564,
-0.459123820066452,
-0.2820628881454468,
0.38823044300079346,
0.15682612359523773,
0.07903916388750076,
0.06880126148462296,
0.5054247975349426,
0.0001396099105477333,
-0.6188641786575317,
0.015946755185723305,
0.06850191205739975,
0.014384178444743156,
-0.3718112111091614,
-0.22343756258487701,
0.09958859533071518,
-0.2777837812900543,
-0.17214596271514893,
-0.34054234623908997,
-0.10368713736534119,
-0.06774115562438965,
0.1796111762523651,
-0.0009893551468849182,
-0.07814060151576996,
-0.041669897735118866,
0.1533588171005249,
-0.12693163752555847,
-0.06148987635970116,
0.1845897138118744,
-0.22943301498889923,
-0.033086515963077545,
0.09507091343402863,
0.18652136623859406,
0.1773933619260788,
0.03411797061562538,
-0.2639222741127014,
-0.0837150365114212,
0.47286009788513184,
-0.14625470340251923,
0.3952940106391907,
-0.057339660823345184,
0.22481589019298553,
-0.03145265951752663,
0.32004791498184204,
-0.034909747540950775,
0.08015336096286774,
0.09224192798137665,
0.022972796112298965,
0.04397430643439293,
-0.02264736406505108,
0.34866461157798767,
0.08217225968837738,
0.0068172886967659,
-0.14282555878162384,
0.007871031761169434,
-0.3138802945613861,
-0.017992869019508362,
0.6848989129066467,
-0.24694131314754486,
0.07724819332361221,
0.053672224283218384,
-0.027470707893371582,
-0.057334545999765396,
0.27777692675590515,
0.31006956100463867,
-0.060111887753009796,
-0.3868311941623688,
-0.00884447991847992,
-0.24154700338840485,
0.03322345018386841,
0.0033741965889930725,
0.14208030700683594,
-0.043140653520822525,
-0.03739486634731293,
0.40609461069107056,
-0.028631016612052917,
-0.011779040098190308,
-0.03283029422163963,
0.12358514219522476,
0.5267847776412964,
0.05778827145695686,
-0.06984570622444153,
-0.21287505328655243,
0.3947781026363373,
-0.1954043060541153,
-0.28329479694366455,
-0.08279158174991608,
0.18952617049217224,
-0.1277543157339096,
0.10083267092704773,
-0.21376582980155945,
0.5065087080001831,
-0.10213832557201385,
0.350951611995697,
-0.03591714799404144,
0.5236024856567383,
-0.257808119058609,
0.1195465698838234,
0.16061827540397644,
-0.07642911374568939,
-0.4228771924972534,
0.23571214079856873,
-0.13276153802871704,
0.345450758934021,
-0.052275098860263824,
-0.15111622214317322,
-0.03333591669797897,
0.17698484659194946,
-0.08932001888751984,
-0.44723325967788696,
-0.2921123802661896,
0.5438435673713684,
-0.3005524277687073,
-0.09012395888566971,
0.32355302572250366,
0.4553418457508087,
0.19365966320037842,
0.14639629423618317,
-0.1793062537908554,
-0.18811765313148499,
0.5304231643676758,
0.0859735980629921,
-0.08857648074626923,
0.02145380899310112,
-0.09126067161560059,
0.23739245533943176,
0.10986169427633286,
-0.24356845021247864,
-0.1449953019618988,
0.09512507170438766,
-0.19035875797271729,
0.046983424574136734,
0.2565314471721649,
0.24106146395206451,
0.21349026262760162,
-0.29934582114219666,
0.3301883637905121,
0.16737523674964905,
0.017165107652544975,
-0.2032986879348755,
-0.3716498017311096
] |
https://github.com/huggingface/datasets/issues/2165 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset | Worth mentioning that any function that expects a `torch..Dataset` (like `torch..DataLoader`) will fail a mypy-esque typecheck if a `datasets.Dataset` is passed, even though it implements the interface correctly (I think). The virtual subclass idea was a good one- I wonder if there's another workaround given the Generic issue. What we're really talking about is something similar to the structural subtyping semantics that `typing.Protocol` defines. If `torch..DataLoader` accepted anything that supports `__getitem__` and `__len__` methods this would be much easier. Not sure if there's a way to do this without the wrapper from the perspective of `datasets`. | Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 96 | How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
Worth mentioning that any function that expects a `torch..Dataset` (like `torch..DataLoader`) will fail a mypy-esque typecheck if a `datasets.Dataset` is passed, even though it implements the interface correctly (I think). The virtual subclass idea was a good one- I wonder if there's another workaround given the Generic issue. What we're really talking about is something similar to the structural subtyping semantics that `typing.Protocol` defines. If `torch..DataLoader` accepted anything that supports `__getitem__` and `__len__` methods this would be much easier. Not sure if there's a way to do this without the wrapper from the perspective of `datasets`. | [
-0.20782165229320526,
-0.23314863443374634,
0.13846825063228607,
0.2725796103477478,
0.2668265402317047,
0.15376204252243042,
-0.003107864409685135,
0.32406845688819885,
-0.07489681243896484,
-0.22039954364299774,
-0.35762107372283936,
0.39065977931022644,
-0.26360395550727844,
0.10520795732736588,
0.27979978919029236,
-0.2113586664199829,
0.17726348340511322,
-0.05013084411621094,
-0.16595162451267242,
-0.15954789519309998,
-0.17714814841747284,
-0.11840221285820007,
0.05477079749107361,
0.09357232600450516,
0.14250674843788147,
0.06500501930713654,
0.07860109210014343,
0.23799556493759155,
-0.17920340597629547,
-0.27688243985176086,
0.3760773837566376,
0.19686946272850037,
0.43615105748176575,
0.19047558307647705,
-0.00012953244731761515,
0.25560975074768066,
0.1330808699131012,
-0.1514335572719574,
-0.03501252830028534,
0.02313615381717682,
-0.09568476676940918,
-0.005803826730698347,
0.16609665751457214,
-0.06087739020586014,
-0.2630535960197449,
-0.6010510921478271,
-0.08138078451156616,
-0.3644053041934967,
-0.012869708240032196,
0.35846462845802307,
0.020621545612812042,
0.3547849655151367,
0.0011107809841632843,
0.055976320058107376,
0.29982078075408936,
0.006313122808933258,
-0.15172111988067627,
0.08913344144821167,
-0.11015534400939941,
0.15644681453704834,
-0.20031628012657166,
0.017144042998552322,
-0.18288695812225342,
-0.05045008286833763,
0.47895318269729614,
-0.2569853365421295,
-0.4116527736186981,
-0.11101989448070526,
-0.11488799005746841,
0.5390318632125854,
0.18960587680339813,
-0.3263987898826599,
-0.2952815592288971,
0.06471779197454453,
-0.11267230659723282,
-0.19417722523212433,
-0.23951366543769836,
0.03744274377822876,
0.016802310943603516,
0.1477465182542801,
0.1189093217253685,
-0.0822051540017128,
-0.14843425154685974,
0.15078087151050568,
0.15865758061408997,
0.1897275447845459,
0.05542992055416107,
0.20076751708984375,
0.1981997787952423,
-0.36640483140945435,
0.3242430090904236,
-0.2328350841999054,
-0.005538035184144974,
-0.12537731230258942,
-0.018496494740247726,
-0.1147717535495758,
-0.23626470565795898,
0.06874613463878632,
0.46413537859916687,
0.07203619182109833,
0.19629724323749542,
0.4362742304801941,
-0.3657403886318207,
0.16526447236537933,
-0.003539957106113434,
-0.1884426325559616,
0.126877099275589,
0.3190458118915558,
0.013614904135465622,
-0.18656213581562042,
0.1171434223651886,
0.2503781318664551,
-0.06322650611400604,
-0.1424945890903473,
-0.021400820463895798,
0.06877211481332779,
-0.009540380910038948,
-0.13767559826374054,
-0.1544177085161209,
-0.21739846467971802,
-0.24259230494499207,
0.007189712952822447,
0.17316299676895142,
0.19891825318336487,
0.04642850160598755,
0.2016889750957489,
0.32460904121398926,
0.566238522529602,
-0.29752448201179504,
-0.14079931378364563,
0.038650382310152054,
0.08529448509216309,
-0.09981735050678253,
-0.20872534811496735,
-0.036785516887903214,
-0.11106713116168976,
-0.12894384562969208,
0.008311311714351177,
-0.07742814719676971,
0.2705898880958557,
0.2934504449367523,
0.011203024536371231,
0.2924000918865204,
-0.008866313844919205,
-0.05064266920089722,
0.033993691205978394,
0.35929805040359497,
0.30191099643707275,
-0.37595903873443604,
0.13564440608024597,
-0.45473700761795044,
-0.19878417253494263,
-0.08288106322288513,
-0.018759969621896744,
0.04015003889799118,
-0.2016352117061615,
-0.3906702399253845,
0.25858452916145325,
-0.01831810176372528,
-0.02445482462644577,
0.018487975001335144,
-0.48663145303726196,
-0.37681135535240173,
-0.2238229513168335,
0.21635067462921143,
0.1883440911769867,
-0.41762614250183105,
-0.18189316987991333,
0.04400668665766716,
-0.19816938042640686,
0.19140928983688354,
0.2892550528049469,
-0.22263085842132568,
-0.052131183445453644,
-0.3271154761314392,
0.059764519333839417,
0.5643672347068787,
-0.19064319133758545,
-0.030381927266716957,
0.12912610173225403,
0.12000627815723419,
-0.003957988694310188,
0.062287479639053345,
0.005282332189381123,
-0.09187337011098862,
-0.10141487419605255,
0.21989403665065765,
0.20004062354564667,
-0.17933271825313568,
-0.2974880039691925,
-0.13093607127666473,
-0.24009446799755096,
0.29082900285720825,
-0.14764747023582458,
0.1456647664308548,
0.28558748960494995,
-0.1942008137702942,
-0.27341485023498535,
0.32362937927246094,
-0.07212810218334198,
0.14527784287929535,
0.07808345556259155,
-0.28978604078292847,
0.30682700872421265,
0.028097793459892273,
-0.003913385793566704,
0.11661115288734436,
0.11883635073900223,
0.04604211449623108,
0.08011844754219055,
0.015689589083194733,
-0.10313002020120621,
-0.12848412990570068,
0.15922962129116058,
-0.008431609719991684,
0.12845508754253387,
-0.09957971423864365,
0.043202802538871765,
-0.39557042717933655,
-0.2482413798570633,
-0.11257630586624146,
0.08000072091817856,
-0.3220641314983368,
0.198542520403862,
-0.6167334318161011,
0.11333516240119934,
0.14748238027095795,
0.15288163721561432,
-0.08258448541164398,
0.2855967879295349,
0.013497404754161835,
-0.020543929189443588,
-0.05652563273906708,
0.20217734575271606,
0.21150942146778107,
-0.061880841851234436,
0.19039762020111084,
0.3349080979824066,
0.00722839031368494,
-0.8401792645454407,
0.3379890024662018,
0.41514238715171814,
0.14320850372314453,
-0.10163262486457825,
-0.0548333004117012,
0.7059510946273804,
0.260623037815094,
0.24269798398017883,
-0.08179646730422974,
-0.012058253400027752,
0.06490034610033035,
0.19665534794330597,
-0.38720887899398804,
-0.04615826904773712,
-0.21019722521305084,
0.05730006843805313,
0.2363511472940445,
0.13347680866718292,
-0.31349676847457886,
0.026352792978286743,
0.10327087342739105,
-0.1176699697971344,
0.21390631794929504,
0.3229413330554962,
-0.3895615041255951,
0.004323683679103851,
0.2237345278263092,
-0.15597796440124512,
0.17825165390968323,
0.12813700735569,
0.23651883006095886,
-0.014614192768931389,
-0.18256105482578278,
0.09602730721235275,
0.26787716150283813,
0.1079963892698288,
0.20844130218029022,
-0.1348012387752533,
-0.010652082040905952,
-0.0330476239323616,
-0.31678885221481323,
0.11502930521965027,
-0.21002577245235443,
-0.20247332751750946,
-0.6494216322898865,
0.24548809230327606,
-0.6445004343986511,
-0.16794705390930176,
-0.21179883182048798,
-0.1283806711435318,
0.07380445301532745,
-0.13254058361053467,
-0.18382039666175842,
-0.16103912889957428,
0.15742309391498566,
0.18043090403079987,
-0.42077019810676575,
-0.08761967718601227,
0.14539141952991486,
-0.36174049973487854,
0.16350087523460388,
-0.17362166941165924,
-0.13492006063461304,
-0.14027556777000427,
0.16722485423088074,
-0.011636769399046898,
0.3143472671508789,
0.274506151676178,
-0.07496431469917297,
-0.2894778549671173,
-0.23045340180397034,
0.15698832273483276,
-0.1682230830192566,
0.10512107610702515,
0.4179944097995758,
0.10870999842882156,
0.25765031576156616,
-0.011658272705972195,
0.1355409473180771,
0.09528198838233948,
-0.11420372873544693,
0.17117594182491302,
-0.3422293961048126,
0.14665856957435608,
0.28566813468933105,
-0.0005156248807907104,
-0.271135151386261,
-0.24741792678833008,
-0.1315760463476181,
-0.10560862720012665,
0.10403470695018768,
0.10522311180830002,
0.2524414360523224,
0.07727104425430298,
0.1599103808403015,
0.002424870617687702,
-0.11607666313648224,
-0.14524094760417938,
0.2762696444988251,
0.0449746809899807,
-0.19614966213703156,
-0.20275665819644928,
-0.3262168765068054,
0.12032729387283325,
0.3483859896659851,
-0.1995398849248886,
0.12154567986726761,
-0.08806727081537247,
0.2964407205581665,
0.1406218409538269,
-0.0328138992190361,
0.27014634013175964,
-0.02817726694047451,
0.11905871331691742,
-0.23908960819244385,
-0.27767354249954224,
-0.047040678560733795,
-0.3374866545200348,
0.28476211428642273,
0.5173730850219727,
0.4786030054092407,
-0.15771998465061188,
0.8596721291542053,
-0.0879078358411789,
-0.4088982343673706,
0.42524421215057373,
-0.12491024285554886,
0.18478511273860931,
-0.11037763208150864,
-0.40131938457489014,
-0.0969163104891777,
-0.26688846945762634,
0.23963294923305511,
0.09140876680612564,
-0.15379735827445984,
-0.2068270444869995,
0.16393661499023438,
0.15237624943256378,
-0.026430372148752213,
-0.2613154351711273,
0.43991735577583313,
-0.8675208687782288,
-0.10504020005464554,
-0.05782057344913483,
0.07954854518175125,
-0.3812004029750824,
0.0011200886219739914,
0.06862080097198486,
0.28585222363471985,
0.11661513149738312,
0.15811674296855927,
-0.3939726650714874,
0.10594025254249573,
-0.1882931888103485,
0.47575199604034424,
0.019164038822054863,
0.5118653774261475,
0.08791211247444153,
-0.17265892028808594,
-0.06965827941894531,
0.02681693248450756,
0.2896451950073242,
-0.27804723381996155,
-0.08059459924697876,
0.1641324758529663,
-0.039040058851242065,
-0.534752368927002,
0.006622709333896637,
-0.04393162578344345,
0.10038156807422638,
-0.04514347389340401,
0.11031360924243927,
-0.23950538039207458,
-0.33788853883743286,
0.029497260227799416,
-0.05537514388561249,
-0.032688066363334656,
0.23068267107009888,
-0.13152830302715302,
-0.20918089151382446,
0.04844166338443756,
-0.0030787959694862366,
0.11653219908475876,
-0.10950598865747452,
-0.10238485783338547,
-0.2505790591239929,
-0.4138956367969513,
-0.04362402856349945,
0.3718595504760742,
-0.22878924012184143,
0.20822849869728088,
-0.05869889631867409,
-0.053722262382507324,
-0.24063482880592346,
0.4764305651187897,
0.28513333201408386,
0.37947678565979004,
-0.36005842685699463,
-0.30472180247306824,
0.0356576107442379,
0.3138699233531952,
0.41744834184646606,
0.18769796192646027,
-0.14442089200019836,
0.3934047818183899,
0.13328571617603302,
-0.21150745451450348,
-0.5201488733291626,
0.18429113924503326,
0.33284714818000793,
-0.013912543654441833,
-0.4928368926048279,
-0.644583523273468,
0.7689058780670166,
0.22181278467178345,
0.05442515015602112,
0.31210848689079285,
0.3377506732940674,
-0.33398252725601196,
0.6794013381004333,
0.25778037309646606,
1.0996050834655762,
-0.034668222069740295,
0.32743364572525024,
-0.03187835216522217,
-0.12322377413511276,
0.29905977845191956,
-0.05143636465072632,
0.03741912543773651,
-0.3626801669597626,
-0.19201628863811493,
-0.2310723215341568,
-0.187017023563385,
-0.006634935736656189,
0.11296013742685318,
0.18871691823005676,
0.15788350999355316,
-0.2065265029668808,
0.08652026206254959,
0.18635819852352142,
0.1434389054775238,
-0.14305247366428375,
-0.31334659457206726,
-0.07257379591464996,
0.0737973004579544,
-0.20184706151485443,
-0.024766698479652405,
0.06961345672607422,
-0.268863320350647,
-0.1569671630859375,
-0.09392412006855011,
-0.1439596712589264,
0.040299564599990845,
-0.46788543462753296,
0.170050710439682,
0.00672508031129837,
-0.4388858675956726,
0.377315491437912,
0.21779853105545044,
0.3210294246673584,
-0.08406321704387665,
-0.10621576011180878,
0.0549587681889534,
0.3936527669429779,
-0.08699954301118851,
-0.06475366652011871,
-0.18847119808197021,
0.43130120635032654,
0.1897946000099182,
0.03877612203359604,
-0.12237457185983658,
0.013479807414114475,
-0.2651402950286865,
-0.33953145146369934,
-0.14208409190177917,
0.5508437156677246,
-0.44965529441833496,
-0.3465375304222107,
0.03027169406414032,
0.000845588743686676,
-0.011415278539061546,
-0.034391872584819794,
0.08813586086034775,
-0.014705261215567589,
0.0936475619673729,
0.26091358065605164,
-0.3039741814136505,
0.07500223815441132,
0.381547749042511,
0.1440960019826889,
0.3418433964252472,
0.33463799953460693,
0.13665804266929626,
-0.08587244898080826,
-0.03548092395067215,
0.3121761977672577,
0.993911623954773,
-0.1061716228723526,
0.019671479240059853,
-0.13178737461566925,
-0.21800881624221802,
0.08514897525310516,
-0.2070150375366211,
0.15076103806495667,
0.04912443459033966,
-0.18729110062122345,
-0.17220640182495117,
-0.3375902473926544,
0.2550197243690491,
-0.3870530128479004,
0.2985132038593292,
-0.07947362959384918,
0.2165440022945404,
-0.303598552942276,
0.031146401539444923,
-0.13466739654541016,
0.03423156589269638,
0.1797304004430771,
0.07051137834787369,
-0.029118351638317108,
0.20590740442276,
0.05742986127734184,
0.06964904069900513,
-0.03490552678704262,
0.06241602078080177,
-0.1884789615869522,
-0.04580888897180557,
-0.29141613841056824,
0.22479476034641266,
0.0019307918846607208,
0.006970873102545738,
0.2205762267112732,
-0.17550963163375854,
-0.20887139439582825,
-0.10034606605768204,
0.09767268598079681,
0.09968417137861252,
0.004706554114818573,
0.3070245683193207,
0.34420323371887207,
0.09261933714151382,
-0.1428007185459137,
0.09784743189811707,
0.33703845739364624,
0.42642176151275635,
-0.08940402418375015,
0.04380624368786812,
-0.20299388468265533,
-0.2533397674560547,
-0.18702703714370728,
0.3083280622959137,
0.5461502075195312,
0.03025110810995102,
0.18831267952919006,
0.019639331847429276,
0.02371983602643013,
-0.22994570434093475,
0.24870488047599792,
0.5658823251724243,
-0.005865701474249363,
0.05096212029457092,
-0.0675119161605835,
-0.10535306483507156,
-0.22703777253627777,
-0.032121691852808,
-0.08632098138332367,
-0.32708775997161865,
-0.013116490095853806,
0.15742453932762146,
0.01619446650147438,
0.5776230096817017,
-0.1346445232629776,
-0.3196709156036377,
0.006696863099932671,
-0.288191556930542,
-0.02203221805393696,
0.5073306560516357,
0.09647229313850403,
0.07377909123897552,
0.3497420847415924,
0.1650417298078537,
0.3461248278617859,
0.22993187606334686,
0.4368549883365631,
0.7877061367034912,
0.46160975098609924,
0.1401689648628235,
0.4382711946964264,
-0.513947069644928,
-0.19590187072753906,
0.4214676320552826,
0.25648045539855957,
0.20172807574272156,
0.07504990696907043,
0.6161072254180908,
-0.060015346854925156,
-0.4812822639942169,
0.146074578166008,
0.12530028820037842,
0.0005469843745231628,
-0.46329230070114136,
-0.33779850602149963,
-0.029596008360385895,
-0.4231979250907898,
-0.28465861082077026,
-0.30856451392173767,
-0.1266382932662964,
-0.024193421006202698,
0.07431945949792862,
0.07718054950237274,
-0.13943599164485931,
-0.07294152677059174,
0.0746726468205452,
-0.0849192664027214,
-0.11246074736118317,
0.11328967660665512,
-0.1118333637714386,
-0.021452821791172028,
0.10889467597007751,
0.13552452623844147,
0.24910694360733032,
0.09237571805715561,
-0.2736179530620575,
-0.0808619037270546,
0.3471696376800537,
-0.1542697250843048,
0.2459338903427124,
-0.15304724872112274,
0.05725955218076706,
-0.07288619875907898,
0.34272676706314087,
-0.06301062554121017,
0.0821189358830452,
-0.01552765816450119,
-0.05368654802441597,
0.05727744102478027,
-0.06250202655792236,
0.5547094941139221,
0.11998891830444336,
0.08661117404699326,
-0.12351280450820923,
0.05931708589196205,
-0.4033990502357483,
-0.10100987553596497,
0.6918378472328186,
-0.05525689572095871,
0.15585383772850037,
0.08799303323030472,
-0.023886457085609436,
0.03569713234901428,
0.35713860392570496,
0.2786397337913513,
-0.0012063980102539062,
-0.314378023147583,
0.0869772881269455,
-0.28241902589797974,
0.019121520221233368,
-0.053867291659116745,
0.013389511033892632,
0.047250550240278244,
0.01942606084048748,
0.5246508121490479,
-0.03390564024448395,
-0.08803021907806396,
-0.05129007622599602,
0.17099159955978394,
0.3318524658679962,
0.09240478277206421,
-0.24487023055553436,
-0.17400963604450226,
0.24480751156806946,
-0.07572603225708008,
-0.34582406282424927,
-0.16139976680278778,
0.31071367859840393,
-0.1198502704501152,
0.0009038951247930527,
-0.27220696210861206,
0.4618012011051178,
-0.17199036478996277,
0.3024441599845886,
0.034804828464984894,
0.5514158010482788,
-0.24094954133033752,
-0.04860889911651611,
0.11555683612823486,
-0.08890517055988312,
-0.49555283784866333,
0.2672637403011322,
-0.16801826655864716,
0.2821674346923828,
-0.09521079063415527,
-0.1633874475955963,
-0.15327765047550201,
0.10780379176139832,
-0.04388326779007912,
-0.4155339300632477,
-0.393042653799057,
0.558059811592102,
-0.38654497265815735,
-0.15107344090938568,
0.18413510918617249,
0.5083804726600647,
0.14094896614551544,
0.2737414836883545,
-0.12288873642683029,
-0.209421768784523,
0.5849859714508057,
0.053679198026657104,
0.007691334933042526,
-0.011904783546924591,
-0.10610616207122803,
0.13650330901145935,
0.17028282582759857,
-0.36201292276382446,
-0.14436136186122894,
0.1439765840768814,
-0.2070530652999878,
0.04954901710152626,
0.1811148226261139,
0.2289019674062729,
0.19709725677967072,
-0.42075231671333313,
0.4470781981945038,
0.1964857280254364,
0.04160775989294052,
-0.10218532383441925,
-0.31209278106689453
] |
https://github.com/huggingface/datasets/issues/2162 | visualization for cc100 is broken | This looks like an issue with the cc100 dataset itself but not sure
Did you try loading cc100 on your machine ? | Hi
visualization through dataset viewer for cc100 is broken
https://huggingface.co/datasets/viewer/
thanks a lot
| 22 | visualization for cc100 is broken
Hi
visualization through dataset viewer for cc100 is broken
https://huggingface.co/datasets/viewer/
thanks a lot
This looks like an issue with the cc100 dataset itself but not sure
Did you try loading cc100 on your machine ? | [
-0.5656793713569641,
-0.20044384896755219,
-0.0850355327129364,
0.12931975722312927,
0.20950736105442047,
-0.0013308003544807434,
0.16415362060070038,
0.13681326806545258,
-0.06592383980751038,
0.4231899380683899,
-0.05236528068780899,
0.23769991099834442,
0.12892717123031616,
0.42699751257896423,
-0.01760995015501976,
-0.24116861820220947,
0.05329000949859619,
0.4060421288013458,
-0.3985910415649414,
0.021252885460853577,
0.0434119775891304,
0.05233360081911087,
-0.17398051917552948,
-0.06936037540435791,
-0.18125875294208527,
-0.29199671745300293,
-0.09574422985315323,
0.1488845944404602,
-0.2506379783153534,
-0.43228474259376526,
0.060996539890766144,
0.180722177028656,
0.11141930520534515,
0.3614215552806854,
-0.00009482885070610791,
0.052082568407058716,
0.32733017206192017,
0.172123983502388,
-0.17503486573696136,
0.16179212927818298,
-0.3436121642589569,
-0.0873224139213562,
0.2742396593093872,
-0.054834891110658646,
-0.17835292220115662,
0.1911073476076126,
-0.020406348630785942,
-0.030797207728028297,
0.327545166015625,
-0.24726299941539764,
0.4222188889980316,
0.23498722910881042,
0.03989068791270256,
-0.3050335943698883,
-0.160533607006073,
0.19317881762981415,
-0.11319222301244736,
0.1625884473323822,
0.16078567504882812,
-0.015757163986563683,
-0.08940839022397995,
0.29109567403793335,
0.1937400996685028,
-0.006556602194905281,
0.034078508615493774,
-0.1106693372130394,
-0.03676609694957733,
-0.23604464530944824,
0.2474202811717987,
0.047484513372182846,
0.4210411608219147,
0.07936468720436096,
0.1486472189426422,
0.18156084418296814,
-0.06954053789377213,
-0.6380496621131897,
0.1570042371749878,
0.10094840824604034,
0.0964079350233078,
0.24300505220890045,
-0.3762998580932617,
-0.06776870042085648,
-0.201734259724617,
-0.013840176165103912,
-0.24214482307434082,
-0.12515145540237427,
-0.21394383907318115,
0.006143655627965927,
0.07153463363647461,
0.034672822803258896,
-0.0787411630153656,
0.2379068285226822,
-0.30313265323638916,
-0.09224133938550949,
-0.298785537481308,
-0.0159614160656929,
0.1302255094051361,
0.49076205492019653,
0.05839119851589203,
0.11888433247804642,
0.31250035762786865,
0.1956053078174591,
0.21199187636375427,
0.20651495456695557,
0.10312265157699585,
0.0831063985824585,
-0.29761719703674316,
0.10052566230297089,
0.47916358709335327,
0.351007342338562,
-0.07939156889915466,
-0.25926220417022705,
-0.11658119410276413,
-0.2494167685508728,
-0.11206011474132538,
-0.0014790333807468414,
0.06834033131599426,
-0.1943024843931198,
-0.29142531752586365,
0.09962329268455505,
0.06284049898386002,
0.18320780992507935,
0.09657417982816696,
0.4411555230617523,
0.008664880879223347,
0.13574349880218506,
0.021574415266513824,
0.1259841024875641,
-0.15456274151802063,
-0.26537230610847473,
-0.2535616457462311,
-0.09377425909042358,
-0.22491370141506195,
-0.0452786386013031,
0.1392563432455063,
-0.3511645495891571,
0.14861419796943665,
0.28433066606521606,
0.24389059841632843,
-0.09970545768737793,
-0.0786505937576294,
0.02312992885708809,
-0.08411826938390732,
0.2223770171403885,
0.09201417863368988,
-0.037153005599975586,
0.1359325796365738,
-0.0663181021809578,
0.34012866020202637,
-0.1389589011669159,
-0.10465259104967117,
-0.10581181943416595,
-0.30979490280151367,
0.3111567497253418,
-0.03933287411928177,
0.03188061714172363,
-0.1348150670528412,
0.041536420583724976,
0.005444914102554321,
-0.0063714757561683655,
-0.12715518474578857,
0.06903275847434998,
-0.048579126596450806,
-0.10653353482484818,
0.217698872089386,
0.21769556403160095,
-0.5703335404396057,
0.027573421597480774,
-0.1413707435131073,
-0.1999807059764862,
0.004347890615463257,
0.18735800683498383,
-0.18150269985198975,
-0.0876334086060524,
-0.18116627633571625,
-0.09831597656011581,
-0.16263484954833984,
-0.28282710909843445,
-0.38762757182121277,
0.1866450309753418,
-0.001775205135345459,
-0.07989506423473358,
-0.11609285324811935,
-0.2375924438238144,
0.28932344913482666,
-0.015316289849579334,
-0.3430398404598236,
-0.2110932618379593,
0.017612792551517487,
-0.012784572318196297,
-0.24090823531150818,
-0.21671725809574127,
0.08388781547546387,
-0.0764976292848587,
0.14790189266204834,
0.11055408418178558,
0.1725352704524994,
-0.2935749888420105,
0.26613664627075195,
-0.14850977063179016,
0.11610393226146698,
0.09127484261989594,
0.27041858434677124,
-0.1600845456123352,
-0.11287681013345718,
-0.041610635817050934,
-0.0674104318022728,
0.02047783136367798,
0.06061389297246933,
0.27168965339660645,
0.039632346481084824,
-0.00886693224310875,
-0.2549171447753906,
-0.033510252833366394,
-0.33412015438079834,
-0.16765029728412628,
0.3803720772266388,
0.092168889939785,
-0.23157696425914764,
0.0005186125636100769,
-0.04211587831377983,
0.17583471536636353,
0.012630248442292213,
0.04837539419531822,
0.17617401480674744,
0.34336504340171814,
-0.2752549648284912,
-0.06377208977937698,
0.1673245131969452,
-0.07196038216352463,
0.24556761980056763,
-0.10132768005132675,
-0.16431593894958496,
0.4407142996788025,
-0.14860358834266663,
0.40094178915023804,
0.10418882966041565,
-0.1629094034433365,
0.3613377511501312,
-0.6228362917900085,
0.11093474924564362,
-0.0870218276977539,
0.07603751122951508,
0.15922805666923523,
-0.08455763012170792,
-0.09613294899463654,
0.0773143470287323,
-0.07383333891630173,
-0.0045654624700546265,
0.1905115842819214,
0.22807884216308594,
0.0030773095786571503,
-0.019435573369264603,
-0.2421627789735794,
0.18822193145751953,
0.21593360602855682,
0.305804967880249,
-0.18307368457317352,
-0.36810389161109924,
0.15845878422260284,
0.1430669128894806,
0.15361224114894867,
0.010932181030511856,
-0.0728267952799797,
-0.34986066818237305,
0.021334674209356308,
0.3850715160369873,
0.008043278008699417,
-0.13213805854320526,
0.18495768308639526,
-0.07704393565654755,
0.08161377906799316,
-0.14884330332279205,
-0.027676541358232498,
0.029779531061649323,
-0.057545006275177,
0.31873321533203125,
0.0401705726981163,
0.017339864745736122,
-0.15413455665111542,
-0.5369297862052917,
0.03959159180521965,
0.005850054323673248,
0.20605666935443878,
-0.2513284981250763,
-0.08868174254894257,
-0.32336705923080444,
-0.11304176598787308,
0.23107527196407318,
0.03949471563100815,
0.0922844260931015,
-0.2377569079399109,
0.01399814710021019,
0.19692091643810272,
-0.11816847324371338,
0.2624605596065521,
0.0012001581490039825,
0.21367259323596954,
0.02817682735621929,
0.5410408973693848,
-0.26186317205429077,
-0.14423823356628418,
-0.18406599760055542,
0.28971371054649353,
0.08712782710790634,
-0.079061359167099,
0.18421877920627594,
-0.08101528882980347,
0.2908613681793213,
-0.17307479679584503,
-0.38513800501823425,
0.29106640815734863,
-0.12834186851978302,
0.19045618176460266,
-0.0026750490069389343,
0.26652592420578003,
-0.38708603382110596,
-0.020362962037324905,
0.1880904734134674,
-0.04133642464876175,
-0.060684025287628174,
-0.003181152045726776,
-0.015959208831191063,
-0.3020132780075073,
-0.22410593926906586,
0.07514257729053497,
-0.1735679656267166,
-0.3436998128890991,
0.03845071792602539,
0.14644445478916168,
0.06400934606790543,
0.1747078150510788,
0.22892571985721588,
-0.09797652065753937,
0.14812766015529633,
-0.05952783674001694,
-0.30038028955459595,
-0.5974053740501404,
0.16325731575489044,
-0.5660866498947144,
-0.4630771577358246,
0.14092008769512177,
0.12434251606464386,
0.40929538011550903,
0.0419115386903286,
-0.3749949336051941,
0.17336539924144745,
-0.08018876612186432,
-0.03436075523495674,
0.1711723655462265,
-0.11608868837356567,
0.10288223624229431,
0.15234382450580597,
-0.22729265689849854,
-0.14228416979312897,
-0.2734929025173187,
-0.09797783941030502,
-0.1062643751502037,
0.11594037711620331,
-0.2867876887321472,
0.08071893453598022,
0.10476887226104736,
0.4419479966163635,
0.1123192310333252,
-0.07413184642791748,
0.42392730712890625,
-0.08622348308563232,
0.560135006904602,
-0.16112840175628662,
-0.33772534132003784,
0.14694713056087494,
-0.15075615048408508,
-0.09886277467012405,
0.21959063410758972,
0.0591345950961113,
-0.35339003801345825,
-0.3039926290512085,
0.03548632934689522,
-0.28143176436424255,
-0.22383706271648407,
-0.35381048917770386,
0.08351688086986542,
0.2517739236354828,
0.06457692384719849,
0.2820879817008972,
0.10811381042003632,
-0.1622389256954193,
0.12948842346668243,
0.12009188532829285,
0.03532767668366432,
-0.14148782193660736,
-0.4134142994880676,
-0.20497378706932068,
-0.373468279838562,
0.1895400732755661,
-0.10998276621103287,
-0.050212811678647995,
-0.1996527910232544,
-0.08420418947935104,
0.05140895023941994,
-0.10568983107805252,
0.34230971336364746,
-0.06834956258535385,
-0.0004599764943122864,
0.09547412395477295,
-0.17320440709590912,
0.06567402929067612,
0.029512714594602585,
-0.10480846464633942,
0.14322520792484283,
-0.15826135873794556,
-0.10509605705738068,
0.003760389983654022,
0.07841844111680984,
0.18479607999324799,
0.009939535520970821,
-0.16996276378631592,
-0.020420530810952187,
-0.09388448297977448,
0.09788990765810013,
-0.2449435591697693,
-0.20760798454284668,
-0.22072942554950714,
-0.010095680132508278,
-0.22726497054100037,
-0.26618754863739014,
-0.1380920112133026,
-0.3244817852973938,
0.018523864448070526,
0.4938950538635254,
0.38630563020706177,
-0.0652049258351326,
0.08601236343383789,
0.2924593687057495,
0.3374374806880951,
0.3303751051425934,
0.31288906931877136,
0.13700027763843536,
-0.20719262957572937,
0.2907998561859131,
-0.13133122026920319,
0.09286504983901978,
0.26177817583084106,
0.04302673786878586,
-0.01529695838689804,
0.210019052028656,
0.2225782871246338,
-0.3074877858161926,
0.19807147979736328,
0.2529595196247101,
0.16795971989631653,
-0.4825790226459503,
0.05804494023323059,
0.36932867765426636,
0.0141710564494133,
-0.05972416698932648,
0.12629447877407074,
0.21007177233695984,
-0.08132224529981613,
-0.13512854278087616,
0.1255875825881958,
0.7209936380386353,
0.00010486319661140442,
-0.21221137046813965,
0.1130358949303627,
-0.10086773335933685,
0.30437523126602173,
0.04243917763233185,
0.019462626427412033,
-0.28171154856681824,
-0.2667107880115509,
-0.07360981404781342,
0.03702107444405556,
0.22095009684562683,
-0.06855576485395432,
-0.25385069847106934,
0.055441103875637054,
-0.18386588990688324,
0.34192797541618347,
-0.04565076529979706,
-0.049699462950229645,
0.05743301659822464,
-0.06690798699855804,
0.05411364883184433,
0.3630204498767853,
-0.07970848679542542,
0.09391111880540848,
-0.29616579413414,
0.013389469124376774,
0.0031091608107089996,
0.06705623865127563,
-0.24290522933006287,
0.09201999008655548,
-0.2276490032672882,
0.1686825007200241,
-0.19230182468891144,
-0.500930666923523,
0.16038276255130768,
0.06378212571144104,
0.09756286442279816,
0.3254850208759308,
-0.3234698176383972,
0.4022996723651886,
-0.04578166455030441,
-0.18143272399902344,
-0.18332383036613464,
0.305518239736557,
0.010198242962360382,
-0.15017303824424744,
-0.1779605746269226,
0.17418532073497772,
0.1115855723619461,
-0.01943187788128853,
0.04753081500530243,
0.11790837347507477,
0.19312810897827148,
-0.022288326174020767,
0.1926681399345398,
0.007136158645153046,
0.0033142566680908203,
-0.3757091760635376,
0.27850836515426636,
-0.05118061602115631,
0.0666462704539299,
-0.036099888384342194,
0.4344736635684967,
0.06692217290401459,
-0.11596766114234924,
0.06375632435083389,
-0.1367868185043335,
-0.13178646564483643,
0.17776204645633698,
0.26018333435058594,
-0.27656304836273193,
-0.3988589942455292,
-0.06568459421396255,
0.15718883275985718,
-0.28176403045654297,
0.07230239361524582,
0.08054804056882858,
0.0077478885650634766,
0.01406366191804409,
0.35135582089424133,
0.13929560780525208,
-0.16858309507369995,
-0.07230894267559052,
-0.21362584829330444,
-0.49828559160232544,
-0.07734684646129608,
-0.22938044369220734,
0.23541748523712158,
0.12222503870725632,
0.27311643958091736,
0.06964409351348877,
0.02191636897623539,
-0.4724561274051666,
-0.04379040747880936,
-0.19930905103683472,
-0.09296903014183044,
0.17796139419078827,
-0.027719683945178986,
0.012217367999255657,
-0.1333380490541458,
0.2816723883152008,
0.24275757372379303,
-0.17529615759849548,
-0.3853912353515625,
-0.0153473149985075,
0.02148301899433136,
0.09503678232431412,
-0.3926621973514557,
0.17593437433242798,
0.29734015464782715,
-0.03332887217402458,
-0.05784696340560913,
0.07390809059143066,
-0.1647574007511139,
0.0900408923625946,
0.01863115280866623,
-0.23373572528362274,
-0.04746295511722565,
0.023973383009433746,
-0.17954856157302856,
0.2719550132751465,
0.25207722187042236,
-0.06991389393806458,
-0.09980383515357971,
0.12868906557559967,
-0.12205298244953156,
0.1165042296051979,
0.16644589602947235,
-0.03659145534038544,
0.1958782970905304,
0.4097903370857239,
-0.27004367113113403,
0.267236590385437,
0.01040148176252842,
0.3953765630722046,
0.01230890303850174,
0.03975653648376465,
0.0226722601801157,
0.1892244815826416,
0.4355755150318146,
-0.2832295596599579,
0.13622988760471344,
0.0024189427495002747,
0.006533294916152954,
0.26108041405677795,
-0.10329561680555344,
0.270855188369751,
-0.1254647672176361,
-0.06175321340560913,
0.08123224228620529,
0.3503272533416748,
-0.19078822433948517,
0.34123024344444275,
0.4016759693622589,
-0.05283394828438759,
0.15062227845191956,
0.06422580033540726,
0.23557624220848083,
-0.018195800483226776,
0.43459129333496094,
-0.16188859939575195,
-0.01789983920753002,
0.14880871772766113,
0.1640518754720688,
0.22024768590927124,
-0.17205528914928436,
0.0562383309006691,
0.13357771933078766,
-0.1476079821586609,
-0.01155022531747818,
0.1621236801147461,
0.41966691613197327,
0.02232486754655838,
-0.3306177854537964,
-0.310075044631958,
0.1664961576461792,
-0.17593467235565186,
0.11144760251045227,
-0.48765820264816284,
-0.19298744201660156,
-0.01605905219912529,
0.1783459186553955,
0.003438767045736313,
0.013933893293142319,
0.33288446068763733,
-0.034871906042099,
-0.04872076213359833,
-0.5029996633529663,
0.08374346792697906,
0.21778875589370728,
0.26398101449012756,
0.024269621819257736,
0.20617404580116272,
0.22655870020389557,
-0.00029912590980529785,
0.15322421491146088,
0.42859458923339844,
0.3149453103542328,
0.06771187484264374,
0.03591541200876236,
-0.05326687544584274,
0.10896049439907074,
-0.20519007742404938,
0.02734261006116867,
-0.11499273777008057,
0.21296419203281403,
0.09507163614034653,
0.18850629031658173,
0.2647566497325897,
-0.28276264667510986,
0.08257873356342316,
-0.02168971672654152,
0.21637971699237823,
-0.10220776498317719,
-0.38749459385871887,
-0.29823943972587585,
-0.09773322939872742,
-0.08610812574625015,
-0.38908541202545166,
-0.3332911729812622,
0.13233835995197296,
0.2015293538570404,
-0.2986508905887604,
0.07817892730236053,
-0.35215529799461365,
0.16486762464046478,
0.06405134499073029,
0.4023212492465973,
0.24316824972629547,
0.20078915357589722,
-0.12501803040504456,
-0.44833505153656006,
-0.35040995478630066,
0.1526513397693634,
0.10330119729042053,
-0.03988560661673546,
-0.30577340722084045,
0.05118590593338013,
0.09183228760957718,
0.1235852837562561,
0.4952954649925232,
0.00017905374988913536,
0.194451704621315,
-0.059419602155685425,
-0.27529245615005493,
0.1799759864807129,
0.009461969137191772,
0.019516166299581528,
-0.1272803246974945,
-0.06612028926610947,
0.2582795321941376,
-0.002193059306591749,
0.22108647227287292,
-0.14908018708229065,
0.20312926173210144,
-0.43496260046958923,
-0.20294705033302307,
0.3208516836166382,
0.17924022674560547,
0.37668901681900024,
-0.1100781261920929,
-0.0005272049456834793,
-0.08581230044364929,
-0.22894558310508728,
-0.09352006763219833,
0.24924400448799133,
0.2223966121673584,
0.32298746705055237,
0.1318788230419159,
-0.12634336948394775,
-0.02908683381974697,
0.04932175949215889,
0.2770044207572937,
0.3405129313468933,
-0.2955278754234314,
0.10763517022132874,
0.07874234765768051,
-0.2278827726840973,
0.2594726085662842,
0.10596491396427155,
-0.04097006469964981,
-0.07556477189064026,
-0.1921972632408142,
-0.36571192741394043,
0.189242422580719,
-0.26037439703941345,
-0.3046204745769501,
-0.08421381562948227,
-0.0746048241853714,
0.36608049273490906,
-0.08510828018188477,
-0.2530288100242615,
0.06960154324769974,
0.07327012717723846,
-0.11211679130792618,
-0.09573984146118164,
0.36570146679878235,
-0.08921824395656586,
-0.06521371752023697,
0.12434753775596619,
0.5360304117202759,
0.3529989719390869,
-0.18800219893455505,
0.047364894300699234,
-0.09686336666345596
] |
https://github.com/huggingface/datasets/issues/2162 | visualization for cc100 is broken | Hi
loading works fine, but the viewer only is broken
thanks
On Wed, Apr 7, 2021 at 12:17 PM Quentin Lhoest ***@***.***>
wrote:
> This looks like an issue with the cc100 dataset itself but not sure
> Did you try loading cc100 on your machine ?
>
> β
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2162#issuecomment-814793809>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMRUO33JSOYGT6RETWLTHQWNLANCNFSM42IUOR6Q>
> .
>
| Hi
visualization through dataset viewer for cc100 is broken
https://huggingface.co/datasets/viewer/
thanks a lot
| 80 | visualization for cc100 is broken
Hi
visualization through dataset viewer for cc100 is broken
https://huggingface.co/datasets/viewer/
thanks a lot
Hi
loading works fine, but the viewer only is broken
thanks
On Wed, Apr 7, 2021 at 12:17 PM Quentin Lhoest ***@***.***>
wrote:
> This looks like an issue with the cc100 dataset itself but not sure
> Did you try loading cc100 on your machine ?
>
> β
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2162#issuecomment-814793809>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMRUO33JSOYGT6RETWLTHQWNLANCNFSM42IUOR6Q>
> .
>
| [
-0.48923343420028687,
-0.257188081741333,
-0.015440335497260094,
0.16780653595924377,
0.2279231697320938,
0.03674129396677017,
0.14369530975818634,
0.08045899868011475,
-0.03847810626029968,
0.31800705194473267,
-0.14256513118743896,
0.24562838673591614,
0.14194147288799286,
0.45386984944343567,
0.09490715712308884,
-0.3206588625907898,
0.1359129548072815,
0.37639620900154114,
-0.44169530272483826,
0.08689257502555847,
0.05582910031080246,
0.10354531556367874,
-0.10633174329996109,
-0.10492017865180969,
-0.16526049375534058,
-0.24349722266197205,
-0.19587841629981995,
0.25512024760246277,
-0.21488726139068604,
-0.4934452474117279,
0.09096040576696396,
0.27492937445640564,
0.10347294062376022,
0.3986738622188568,
-0.00010222049604635686,
0.04995568096637726,
0.3971208930015564,
0.17688629031181335,
-0.23136308789253235,
-0.015535742044448853,
-0.33410167694091797,
-0.08573460578918457,
0.3056439757347107,
0.07060319930315018,
-0.0899706706404686,
0.18968088924884796,
-0.04611380398273468,
-0.07809089124202728,
0.4632002115249634,
-0.32634466886520386,
0.33147820830345154,
0.18981921672821045,
0.21638990938663483,
-0.23562487959861755,
-0.2317935824394226,
0.31521710753440857,
-0.11301501840353012,
0.32447609305381775,
0.13396641612052917,
0.018841005861759186,
-0.13884535431861877,
0.2810085415840149,
0.14350031316280365,
-0.058177415281534195,
0.23583635687828064,
-0.14434024691581726,
-0.13057297468185425,
-0.2075546830892563,
0.1319212168455124,
0.13678644597530365,
0.44917556643486023,
-0.025795146822929382,
0.003973448649048805,
0.15259429812431335,
-0.1334012746810913,
-0.704844057559967,
0.25100216269493103,
0.07593642920255661,
0.1342732161283493,
0.2552894651889801,
-0.4646978974342346,
-0.09145847707986832,
-0.18061092495918274,
-0.005314387381076813,
-0.2083679586648941,
-0.27318844199180603,
-0.27043965458869934,
0.049746073782444,
0.08473749458789825,
0.03784400224685669,
-0.13175399601459503,
0.2829217314720154,
-0.30702754855155945,
-0.030471958220005035,
-0.33267292380332947,
-0.02333788387477398,
0.05956515669822693,
0.6086743474006653,
0.16614839434623718,
0.14318180084228516,
0.262011855840683,
0.17863696813583374,
0.1625325083732605,
0.16373726725578308,
0.1870710700750351,
0.11508943140506744,
-0.25755733251571655,
0.004103850573301315,
0.3975895643234253,
0.3946669101715088,
-0.02491997741162777,
-0.2377852499485016,
-0.10149180144071579,
-0.1884736865758896,
-0.2739534378051758,
-0.05252061039209366,
0.05030135065317154,
-0.2563164532184601,
-0.28351667523384094,
0.09522546827793121,
-0.029853885993361473,
0.21551024913787842,
0.10240675508975983,
0.46679794788360596,
-0.022231683135032654,
0.16679885983467102,
-0.05651109293103218,
0.08948642015457153,
-0.11223351210355759,
-0.28358662128448486,
-0.17146456241607666,
-0.10277120769023895,
-0.26459941267967224,
0.09699086844921112,
0.10568083822727203,
-0.589585542678833,
0.10902052372694016,
0.3119136691093445,
0.2893701195716858,
-0.1508764773607254,
-0.2520389258861542,
0.03491205722093582,
-0.15314853191375732,
0.21801456809043884,
-0.018214283511042595,
-0.013320132158696651,
0.13822071254253387,
-0.057659704238176346,
0.29596441984176636,
-0.12414509803056717,
-0.17905202507972717,
-0.13239042460918427,
-0.29806071519851685,
0.19887372851371765,
-0.20291736721992493,
0.030147701501846313,
-0.2107231616973877,
0.12860432267189026,
-0.08018022030591965,
-0.06552695482969284,
-0.1545432209968567,
0.18276475369930267,
-0.09192901849746704,
-0.06996897608041763,
0.2726300060749054,
0.34141606092453003,
-0.6863186955451965,
0.011348851025104523,
-0.21062150597572327,
-0.21426409482955933,
-0.13147255778312683,
0.22220750153064728,
-0.15358804166316986,
-0.21641048789024353,
-0.18732129037380219,
-0.10396254062652588,
-0.3795117139816284,
-0.3386237323284149,
-0.3993177115917206,
0.2244601845741272,
0.01472531259059906,
0.10207266360521317,
-0.16245678067207336,
-0.3465771973133087,
0.21973754465579987,
-0.10736120492219925,
-0.4080578088760376,
-0.33956319093704224,
0.04833093285560608,
-0.09069737792015076,
-0.22022885084152222,
-0.22078350186347961,
-0.02483276277780533,
-0.15676641464233398,
0.03270528465509415,
0.052421461790800095,
0.23983147740364075,
-0.2631925344467163,
0.2512971758842468,
-0.10580897331237793,
0.0842958390712738,
0.1203727051615715,
0.24425162374973297,
-0.03529009968042374,
-0.03898107260465622,
-0.031640492379665375,
-0.16325944662094116,
0.09352821856737137,
0.11004599928855896,
0.1650075912475586,
0.07949027419090271,
0.01777198538184166,
-0.2871534824371338,
0.07847432792186737,
-0.2831757068634033,
-0.2864532172679901,
0.22926649451255798,
-0.00785033404827118,
-0.220486581325531,
-0.0568297803401947,
-0.12917986512184143,
0.2829446494579315,
-0.03502632677555084,
0.04034721851348877,
0.08128887414932251,
0.36085835099220276,
-0.2117711752653122,
0.06639552861452103,
0.11696180701255798,
0.015976272523403168,
0.23513057827949524,
-0.14773555099964142,
-0.1826760172843933,
0.4865570068359375,
-0.1353316605091095,
0.4932324290275574,
0.06395922601222992,
-0.1806655377149582,
0.4445703327655792,
-0.6863836050033569,
0.10425906628370285,
-0.14366035163402557,
0.03198067843914032,
0.11435534805059433,
-0.19964706897735596,
-0.09510047733783722,
-0.025860514491796494,
-0.0602663978934288,
-0.004764702171087265,
0.30026304721832275,
0.1752490997314453,
0.020874809473752975,
-0.11294330656528473,
-0.2815243601799011,
0.3239423930644989,
0.10328234732151031,
0.3746679723262787,
-0.11043404042720795,
-0.36450034379959106,
0.09445067495107651,
0.05894161015748978,
0.06639328598976135,
-0.15056145191192627,
-0.021242111921310425,
-0.42463892698287964,
0.05879298597574234,
0.4740257263183594,
0.020240280777215958,
-0.1344059556722641,
0.10915913432836533,
-0.1784777194261551,
0.16406366229057312,
-0.11478927731513977,
-0.005477291531860828,
0.05626628175377846,
0.015374012291431427,
0.37797001004219055,
-0.05947473645210266,
-0.009043969213962555,
-0.041256047785282135,
-0.48896509408950806,
-0.006591435521841049,
-0.03604057431221008,
0.18843595683574677,
-0.314846009016037,
-0.05446375906467438,
-0.2563505470752716,
-0.11359110474586487,
0.16149967908859253,
-0.0664471760392189,
-0.02940569818019867,
-0.22484581172466278,
-0.10753944516181946,
0.2443355917930603,
-0.0882512629032135,
0.20959194004535675,
0.03737780824303627,
0.22590556740760803,
-0.07693685591220856,
0.5092434883117676,
-0.3830864727497101,
-0.08804880827665329,
-0.18970352411270142,
0.2072618454694748,
0.15183566510677338,
-0.1588687151670456,
0.1316143125295639,
-0.05411183089017868,
0.22304074466228485,
-0.13549233973026276,
-0.4229271113872528,
0.351303368806839,
-0.27893251180648804,
0.28259384632110596,
0.018032103776931763,
0.17444559931755066,
-0.5256004333496094,
0.014982749707996845,
0.20190571248531342,
-0.01658390648663044,
-0.025955382734537125,
-0.031012017279863358,
0.030759185552597046,
-0.2149367779493332,
-0.17705588042736053,
0.13573108613491058,
-0.09729596227407455,
-0.2872207462787628,
0.24487318098545074,
0.11409702897071838,
0.0695607140660286,
0.29953065514564514,
0.19814200699329376,
-0.005370600614696741,
0.08947291970252991,
-0.15706193447113037,
-0.26176831126213074,
-0.6501926779747009,
0.11457571387290955,
-0.5803597569465637,
-0.4522841274738312,
0.16404646635055542,
0.18337637186050415,
0.4095662534236908,
0.022309308871626854,
-0.44188517332077026,
0.2004326432943344,
-0.04923875629901886,
-0.07743939757347107,
0.1694943606853485,
-0.23716716468334198,
-0.0520736426115036,
0.1274534910917282,
-0.14676478505134583,
-0.12210125476121902,
-0.24605919420719147,
-0.2049298882484436,
-0.18489119410514832,
0.11141183227300644,
-0.2083914577960968,
0.13523809611797333,
0.18872381746768951,
0.46922600269317627,
0.31779050827026367,
0.017900541424751282,
0.36387693881988525,
-0.025651419535279274,
0.6060581207275391,
-0.09403827041387558,
-0.3954615592956543,
0.16101200878620148,
-0.2635267674922943,
-0.11060886830091476,
0.22454530000686646,
0.16382333636283875,
-0.2813155949115753,
-0.33299416303634644,
-0.02139396220445633,
-0.19019854068756104,
-0.2044193148612976,
-0.402208149433136,
-0.09520688652992249,
0.23654818534851074,
0.09455558657646179,
0.3012015223503113,
0.1872934252023697,
-0.2381775677204132,
0.12189136445522308,
0.22283869981765747,
0.13787558674812317,
-0.05634009465575218,
-0.33330607414245605,
-0.15502534806728363,
-0.45983123779296875,
0.19127070903778076,
-0.1192055493593216,
-0.024597156792879105,
-0.16214804351329803,
0.08971831947565079,
0.04313487559556961,
-0.11668751388788223,
0.4323551058769226,
0.0834415853023529,
-0.06579640507698059,
0.020660504698753357,
-0.2793538570404053,
0.027450891211628914,
0.13447730243206024,
0.003659803420305252,
0.1915418952703476,
-0.17581968009471893,
0.007738351821899414,
0.03325876593589783,
-0.022678500041365623,
0.24419167637825012,
0.10924273729324341,
-0.1373886615037918,
-0.12335598468780518,
-0.05920778587460518,
0.08763664215803146,
-0.26003530621528625,
-0.27877891063690186,
-0.1868245005607605,
-0.009048869833350182,
-0.27682730555534363,
-0.24536551535129547,
-0.03097682259976864,
-0.2705956697463989,
0.13441067934036255,
0.4063967764377594,
0.37717926502227783,
-0.0564550906419754,
0.114896759390831,
0.4774949252605438,
0.3243747055530548,
0.35286951065063477,
0.3981165289878845,
0.1790291965007782,
-0.262801855802536,
0.19749236106872559,
-0.01775532215833664,
0.14508576691150665,
0.28581199049949646,
-0.03252854198217392,
-0.06537698954343796,
0.3229691982269287,
0.1560710370540619,
-0.40143921971321106,
0.02181985415518284,
0.281457781791687,
0.2107096016407013,
-0.5869057178497314,
-0.03201106935739517,
0.4865456521511078,
0.04252275452017784,
0.024436742067337036,
0.1429227888584137,
0.4273276925086975,
-0.015476102009415627,
-0.17933039367198944,
0.21951159834861755,
0.7822974920272827,
-0.08522072434425354,
-0.24416658282279968,
0.16090676188468933,
-0.07244916260242462,
0.5282050967216492,
0.09206606447696686,
-0.005201537162065506,
-0.2392440140247345,
-0.2635157108306885,
-0.10815156996250153,
0.01926734670996666,
0.3487837016582489,
-0.03471197932958603,
-0.19786973297595978,
0.0767204612493515,
-0.1154654324054718,
0.3633243441581726,
0.02748812362551689,
-0.020958105102181435,
-0.03176233172416687,
-0.12437200546264648,
0.05240670591592789,
0.27418744564056396,
-0.07102315127849579,
0.1198074072599411,
-0.3207530975341797,
0.01899675279855728,
-0.039503730833530426,
0.07270829379558563,
-0.413409948348999,
0.06681717187166214,
-0.21398259699344635,
0.09724963456392288,
-0.15454399585723877,
-0.521837592124939,
0.33608943223953247,
0.12673187255859375,
0.05281561613082886,
0.30627351999282837,
-0.40491563081741333,
0.36054179072380066,
-0.1570582091808319,
-0.2065267413854599,
-0.11925821751356125,
0.30925315618515015,
0.07696680724620819,
-0.11473502963781357,
-0.11591339111328125,
0.14322154223918915,
0.07446759194135666,
0.052813127636909485,
-0.004548415541648865,
0.1390678584575653,
0.1204417273402214,
-0.019872920587658882,
0.19864408671855927,
-0.0818975567817688,
0.044800300151109695,
-0.35379064083099365,
0.18257224559783936,
-0.023615941405296326,
0.09822442382574081,
-0.04612681269645691,
0.3708561360836029,
0.044084206223487854,
-0.10256297886371613,
0.08997974544763565,
-0.22720879316329956,
-0.23614519834518433,
0.25920307636260986,
0.3711192011833191,
-0.2947307229042053,
-0.2603667378425598,
-0.037325818091630936,
0.16206002235412598,
-0.42185500264167786,
0.07103999704122543,
0.08793193846940994,
0.19647367298603058,
-0.04136376827955246,
0.3043954074382782,
0.19344812631607056,
-0.21461939811706543,
0.04775499925017357,
-0.24648290872573853,
-0.5051094889640808,
0.009553037583827972,
-0.2503124475479126,
0.26476097106933594,
0.206770122051239,
0.3871718943119049,
0.055886924266815186,
0.12404616177082062,
-0.3818437457084656,
-0.015748795121908188,
-0.10784497857093811,
-0.16502811014652252,
0.2736262381076813,
0.06803940236568451,
0.090804323554039,
-0.1712992787361145,
0.19918467104434967,
0.3404521346092224,
-0.17695893347263336,
-0.24234378337860107,
-0.08687637746334076,
0.06640858948230743,
0.08107498288154602,
-0.4429329037666321,
0.18422849476337433,
0.29477113485336304,
0.016844753175973892,
-0.10070900619029999,
0.1171611100435257,
-0.05225992202758789,
0.14383842051029205,
-0.03337746858596802,
-0.258340984582901,
-0.035427920520305634,
-0.09010037779808044,
-0.18449142575263977,
0.38270390033721924,
0.3077848553657532,
-0.12130581587553024,
-0.07690779119729996,
0.08126755058765411,
-0.11508499085903168,
0.08315388113260269,
0.20454812049865723,
-0.07813243567943573,
0.10853353142738342,
0.5183011889457703,
-0.25599807500839233,
0.28009748458862305,
-0.03504357486963272,
0.4954099953174591,
0.05932055413722992,
0.050178948789834976,
0.08271784335374832,
0.22209256887435913,
0.2963467240333557,
-0.21599744260311127,
0.22253501415252686,
0.029618509113788605,
0.07776674628257751,
0.12358710169792175,
-0.09785563498735428,
0.2934839427471161,
-0.12487399578094482,
-0.023082584142684937,
-0.012955905869603157,
0.42667222023010254,
-0.13937143981456757,
0.4329890310764313,
0.46494895219802856,
-0.09626288712024689,
0.18184985220432281,
0.06755516678094864,
0.258151113986969,
-0.008932895958423615,
0.4877113699913025,
-0.19898346066474915,
-0.13946066796779633,
-0.0077656470239162445,
0.3162933886051178,
0.19672851264476776,
-0.2686852216720581,
-0.00737367570400238,
0.13343732059001923,
-0.13987287878990173,
0.03449472784996033,
0.12661023437976837,
0.5635015964508057,
-0.04012839496135712,
-0.3392045199871063,
-0.2308545559644699,
0.19407202303409576,
-0.0562957301735878,
0.06960779428482056,
-0.42852064967155457,
-0.19247186183929443,
-0.03273254632949829,
0.20306727290153503,
-0.03585490956902504,
-0.07697884738445282,
0.3292374610900879,
0.0425860658288002,
-0.060081228613853455,
-0.5967035293579102,
0.004718126729130745,
0.26014283299446106,
0.31364142894744873,
0.02915317937731743,
0.19828245043754578,
0.22660495340824127,
0.04345996677875519,
0.09612533450126648,
0.4073173701763153,
0.3040820360183716,
0.023355314508080482,
0.16395603120326996,
-0.03635140508413315,
0.0734027549624443,
-0.14778918027877808,
0.180588960647583,
-0.00042392872273921967,
0.19012078642845154,
0.05772211402654648,
0.22343219816684723,
0.16607427597045898,
-0.19326473772525787,
0.05686284601688385,
-0.040409814566373825,
0.350234717130661,
-0.23004522919654846,
-0.29445692896842957,
-0.3778141140937805,
-0.05212376266717911,
-0.042773932218551636,
-0.37640008330345154,
-0.3126111924648285,
0.1954144835472107,
0.20652782917022705,
-0.30356359481811523,
0.0059867966920137405,
-0.3602224290370941,
0.10302184522151947,
0.16525492072105408,
0.37525442242622375,
0.37393835186958313,
0.2587442994117737,
-0.18403439223766327,
-0.41791051626205444,
-0.3763246536254883,
0.1055428609251976,
0.12155430018901825,
0.16093948483467102,
-0.22280652821063995,
-0.06358766555786133,
0.10662038624286652,
0.15463800728321075,
0.40494590997695923,
-0.053175948560237885,
0.21474936604499817,
-0.05186377465724945,
-0.12926757335662842,
0.1912102997303009,
-0.025518201291561127,
0.042574960738420486,
-0.13272540271282196,
0.07175474613904953,
0.31973522901535034,
0.08254781365394592,
0.07009874284267426,
-0.20583753287792206,
0.2681622803211212,
-0.432308554649353,
-0.3078067898750305,
0.21391935646533966,
0.2149381935596466,
0.3701920509338379,
-0.029863327741622925,
-0.13194391131401062,
-0.2877647876739502,
-0.2584184408187866,
-0.17558333277702332,
0.287980854511261,
0.16830170154571533,
0.37120553851127625,
0.09346815198659897,
-0.2876012921333313,
-0.04175121337175369,
0.09864373505115509,
0.20294032990932465,
0.3742448389530182,
-0.42300939559936523,
0.09801684319972992,
-0.04673140123486519,
-0.21172815561294556,
0.31608250737190247,
0.27552852034568787,
-0.03861001133918762,
0.0674130767583847,
-0.2401774376630783,
-0.3253992199897766,
0.28844547271728516,
-0.4104398787021637,
-0.17380055785179138,
0.01597633585333824,
-0.062203481793403625,
0.46381038427352905,
-0.24784663319587708,
-0.34570401906967163,
0.021963007748126984,
0.06501428037881851,
-0.05132225155830383,
-0.01970892772078514,
0.33155786991119385,
-0.1098204255104065,
-0.061832718551158905,
0.09846730530261993,
0.6605510711669922,
0.3390098810195923,
-0.20019225776195526,
0.18688111007213593,
-0.029874691739678383
] |
https://github.com/huggingface/datasets/issues/2162 | visualization for cc100 is broken | Hi! This visualization tool is deprecated now. The viewer at https://huggingface.co/datasets/cc100 works fine, so I'm closing this issue. | Hi
visualization through dataset viewer for cc100 is broken
https://huggingface.co/datasets/viewer/
thanks a lot
| 18 | visualization for cc100 is broken
Hi
visualization through dataset viewer for cc100 is broken
https://huggingface.co/datasets/viewer/
thanks a lot
Hi! This visualization tool is deprecated now. The viewer at https://huggingface.co/datasets/cc100 works fine, so I'm closing this issue. | [
-0.5799177885055542,
-0.22593533992767334,
-0.09621959924697876,
0.06830741465091705,
0.1526748538017273,
0.02734467387199402,
0.19279438257217407,
0.1392853707075119,
-0.14177274703979492,
0.37907087802886963,
-0.13473939895629883,
0.36978259682655334,
0.0783781111240387,
0.3802352547645569,
0.04122183099389076,
-0.26705503463745117,
0.19380521774291992,
0.32020705938339233,
-0.4314933121204376,
0.13277532160282135,
0.007132589817047119,
0.18517079949378967,
-0.2939576506614685,
-0.0896633118391037,
-0.12493391335010529,
-0.2008097618818283,
-0.18191517889499664,
0.04788060486316681,
-0.2504723072052002,
-0.5551697015762329,
0.1175006628036499,
0.26977652311325073,
0.1763661801815033,
0.42714282870292664,
-0.00010037266474682838,
0.012480013072490692,
0.43841665983200073,
0.253353476524353,
-0.26222237944602966,
0.02235245704650879,
-0.31623226404190063,
-0.11982981860637665,
0.33636489510536194,
0.03747870773077011,
-0.19341617822647095,
0.09074489027261734,
-0.03298799693584442,
-0.0698978453874588,
0.3716409206390381,
-0.31049877405166626,
0.34481486678123474,
0.17036773264408112,
0.15049435198307037,
-0.2938109040260315,
-0.20305973291397095,
0.369382381439209,
-0.2120055854320526,
0.19122466444969177,
0.3234616816043854,
-0.02131367288529873,
-0.08136718720197678,
0.29409050941467285,
0.11205577850341797,
-0.12224005162715912,
0.20797798037528992,
-0.14176562428474426,
-0.09015070647001266,
-0.2261033058166504,
0.20824041962623596,
0.07646430283784866,
0.5534952878952026,
-0.0328139066696167,
0.05820979177951813,
0.1602441668510437,
-0.14566785097122192,
-0.6137786507606506,
0.09802120923995972,
0.078111931681633,
0.11953164637088776,
0.28090280294418335,
-0.46461987495422363,
-0.16162098944187164,
-0.24031378328800201,
-0.005726464092731476,
-0.2513161897659302,
-0.12765321135520935,
-0.3383163511753082,
0.037956353276968,
0.175472691655159,
0.028057225048542023,
-0.019772343337535858,
0.21689479053020477,
-0.2829969823360443,
-0.036959487944841385,
-0.338650107383728,
-0.12089881300926208,
0.15961319208145142,
0.5478036999702454,
0.14866045117378235,
0.186387836933136,
0.28264322876930237,
0.2115812599658966,
0.1919233202934265,
0.20489376783370972,
0.16536596417427063,
0.06271475553512573,
-0.09091610461473465,
0.07996699959039688,
0.49684280157089233,
0.40744152665138245,
0.04444410279393196,
-0.21637961268424988,
-0.1134558618068695,
-0.302893728017807,
-0.1493368297815323,
-0.04951709508895874,
0.10832756757736206,
-0.13234883546829224,
-0.3425256609916687,
0.008080081082880497,
0.04404266178607941,
0.173824280500412,
0.15785135328769684,
0.41708388924598694,
-0.042962413281202316,
0.10701902955770493,
-0.07868066430091858,
0.14312994480133057,
-0.11867009103298187,
-0.35048192739486694,
-0.18038257956504822,
-0.029846984893083572,
-0.24899551272392273,
-0.09479217231273651,
0.06709381937980652,
-0.5508509874343872,
0.05719998478889465,
0.2408808022737503,
0.24076828360557556,
-0.08909475803375244,
-0.1758512705564499,
0.03034590184688568,
-0.1273128092288971,
0.11162640154361725,
-0.07535955309867859,
-0.1367424577474594,
0.08084110915660858,
-0.09224638342857361,
0.2939924895763397,
-0.1080247238278389,
-0.20964562892913818,
-0.10861683636903763,
-0.4588826298713684,
0.19870105385780334,
-0.027053115889430046,
0.08261941373348236,
-0.16561079025268555,
0.23678645491600037,
-0.13983812928199768,
-0.039071012288331985,
-0.16499698162078857,
0.16838404536247253,
-0.17048336565494537,
-0.14779500663280487,
0.2084111124277115,
0.27681833505630493,
-0.6871246695518494,
-0.01950523629784584,
-0.241739884018898,
-0.32430702447891235,
-0.17586404085159302,
0.05575915798544884,
-0.1952502280473709,
-0.17058470845222473,
-0.21186761558055878,
-0.19425341486930847,
-0.15913891792297363,
-0.3416669964790344,
-0.35396629571914673,
0.19387264549732208,
0.03805306553840637,
-0.054714079946279526,
-0.2023105025291443,
-0.25365176796913147,
0.2829448878765106,
-0.16712479293346405,
-0.4051358699798584,
-0.26391828060150146,
0.09417541325092316,
-0.08350621908903122,
-0.12917117774486542,
-0.22076719999313354,
0.07168219983577728,
-0.10522016882896423,
0.04095476120710373,
0.07336501777172089,
0.28413718938827515,
-0.2879214286804199,
0.27084025740623474,
-0.05038784071803093,
0.07148819416761398,
0.13198113441467285,
0.30687975883483887,
-0.12231096625328064,
-0.04371776431798935,
-0.12176358699798584,
-0.2250182032585144,
0.016659464687108994,
0.17433197796344757,
0.1302528977394104,
-0.06645514070987701,
-0.07418541610240936,
-0.2949749231338501,
0.13053247332572937,
-0.28349849581718445,
-0.164178729057312,
0.2969608008861542,
-0.04862590134143829,
-0.13238845765590668,
0.01414787769317627,
-0.08968033641576767,
0.14092880487442017,
-0.03515706956386566,
0.04270453006029129,
0.1480129510164261,
0.3487086296081543,
-0.1826137751340866,
0.11424297094345093,
0.22088557481765747,
0.023368053138256073,
0.2130206823348999,
-0.11727029830217361,
-0.13590958714485168,
0.49647924304008484,
-0.11365705728530884,
0.5002670288085938,
0.12706640362739563,
-0.1558942049741745,
0.3807583153247833,
-0.6567314267158508,
0.14131852984428406,
-0.12585307657718658,
0.010147170163691044,
0.17122867703437805,
-0.15777811408042908,
-0.12171031534671783,
0.0381525382399559,
-0.04494153708219528,
-0.04579343646764755,
0.21908897161483765,
0.16224220395088196,
0.049645718187093735,
-0.12759990990161896,
-0.27036190032958984,
0.15918098390102386,
0.18140053749084473,
0.35885438323020935,
-0.17888197302818298,
-0.3097279965877533,
0.12727601826190948,
0.06862058490514755,
0.036742549389600754,
-0.07756433635950089,
0.030295340344309807,
-0.4117037355899811,
0.05883028358221054,
0.5316951274871826,
-0.05053587630391121,
-0.10876806080341339,
0.11836052685976028,
-0.07503920793533325,
0.13820722699165344,
-0.05010176822543144,
0.013371111825108528,
0.11331983655691147,
-0.0024886280298233032,
0.2653510570526123,
-0.10981986671686172,
-0.012418663129210472,
-0.13207212090492249,
-0.4606078565120697,
0.020344838500022888,
-0.10622790455818176,
0.16245053708553314,
-0.17622290551662445,
-0.08232112973928452,
-0.3969389796257019,
-0.20003411173820496,
0.22082626819610596,
0.07559866458177567,
0.0396004319190979,
-0.24751347303390503,
-0.036097556352615356,
0.2503962814807892,
-0.11679999530315399,
0.21594864130020142,
-0.04550822079181671,
0.34569859504699707,
-0.07198228687047958,
0.5188423991203308,
-0.3251788020133972,
-0.08087747544050217,
-0.19945141673088074,
0.2435121238231659,
0.13335077464580536,
-0.12532645463943481,
0.20207351446151733,
-0.07712801545858383,
0.3216216564178467,
-0.34078165888786316,
-0.46399638056755066,
0.4149678349494934,
-0.08119112253189087,
0.17731820046901703,
0.11772201955318451,
0.1305883228778839,
-0.4553823471069336,
0.04072672873735428,
0.11130207031965256,
-0.09691949933767319,
-0.014420682564377785,
-0.03878817334771156,
0.015636509284377098,
-0.20320475101470947,
-0.1627204567193985,
0.22471842169761658,
-0.23239921033382416,
-0.26489365100860596,
0.16670840978622437,
0.09176403284072876,
0.08707014471292496,
0.2250422090291977,
0.25538650155067444,
-0.04135958105325699,
0.07838387787342072,
-0.09120769798755646,
-0.2272367775440216,
-0.651867687702179,
0.08201383799314499,
-0.554816484451294,
-0.3795691430568695,
0.21412387490272522,
0.1670544594526291,
0.3908727765083313,
0.04510892927646637,
-0.34473562240600586,
0.19704210758209229,
-0.03280065208673477,
0.015980374068021774,
0.21447521448135376,
-0.08546429127454758,
-0.01245056837797165,
0.21165919303894043,
-0.17391438782215118,
-0.13127943873405457,
-0.18021561205387115,
-0.2437831461429596,
-0.20399320125579834,
0.13283196091651917,
-0.008675351738929749,
0.08359348773956299,
0.23717638850212097,
0.4460068345069885,
0.24718061089515686,
-0.1182207465171814,
0.36635133624076843,
-0.07161136716604233,
0.6755087375640869,
-0.09393682330846786,
-0.343747079372406,
0.12574481964111328,
-0.20657745003700256,
-0.005916984751820564,
0.20811960101127625,
0.15654492378234863,
-0.30931103229522705,
-0.35361793637275696,
-0.015354100614786148,
-0.24576321244239807,
-0.169393852353096,
-0.4283551573753357,
-0.09424495697021484,
0.25203773379325867,
-0.001378362998366356,
0.3019792139530182,
0.11100822687149048,
-0.25257518887519836,
0.202579066157341,
0.10991331189870834,
0.1260005086660385,
-0.12911748886108398,
-0.28207993507385254,
-0.1699875146150589,
-0.49664610624313354,
0.28542762994766235,
-0.08630643039941788,
-0.06686597317457199,
-0.08081229776144028,
0.07232528179883957,
-0.03546972572803497,
-0.06909691542387009,
0.34942367672920227,
-0.05730415880680084,
-0.03443054109811783,
0.08908064663410187,
-0.15553221106529236,
0.09360188990831375,
0.09737297892570496,
-0.0007198862731456757,
0.24388106167316437,
-0.2357865422964096,
0.04705032706260681,
0.02189180999994278,
-0.069241464138031,
0.321232408285141,
0.05768357962369919,
-0.097866490483284,
-0.06044647842645645,
-0.030448036268353462,
0.14219632744789124,
-0.16040264070034027,
-0.2957631051540375,
-0.168971449136734,
-0.019059650599956512,
-0.28790631890296936,
-0.28070205450057983,
-0.09292753785848618,
-0.38482344150543213,
-0.0087052583694458,
0.42406582832336426,
0.3924407660961151,
-0.05890101194381714,
0.03269559517502785,
0.3731490671634674,
0.3270763158798218,
0.412894606590271,
0.27917319536209106,
0.13890907168388367,
-0.35706627368927,
0.2735946774482727,
0.013365202583372593,
0.28704866766929626,
0.24479126930236816,
-0.11921743303537369,
-0.01752997189760208,
0.16656307876110077,
0.1937999725341797,
-0.3430401086807251,
0.03378283232450485,
0.31462982296943665,
0.26445290446281433,
-0.5136514902114868,
-0.015515511855483055,
0.4279595613479614,
0.11276875436306,
-0.0007710903882980347,
0.1808331161737442,
0.3086300492286682,
-0.03942272067070007,
-0.2692621946334839,
0.24849647283554077,
0.8201932311058044,
0.061746153980493546,
-0.33845242857933044,
0.0641368180513382,
-0.2222941368818283,
0.4861657917499542,
0.032285794615745544,
0.006810421124100685,
-0.2896861732006073,
-0.2543366849422455,
-0.07933706045150757,
-0.004338420927524567,
0.3793322443962097,
-0.046221815049648285,
-0.19929926097393036,
0.09881307184696198,
-0.17861126363277435,
0.4561849534511566,
0.053188957273960114,
0.004496198147535324,
-0.04218045622110367,
-0.04791662469506264,
0.12003162503242493,
0.2820033133029938,
-0.08493328094482422,
0.04735051840543747,
-0.31501126289367676,
0.001642162911593914,
0.0848744809627533,
0.10635481774806976,
-0.3013056218624115,
0.07259736210107803,
-0.18019719421863556,
0.23588263988494873,
-0.13260427117347717,
-0.5778412222862244,
0.36796507239341736,
0.15793685615062714,
0.0329265221953392,
0.29241639375686646,
-0.3519311547279358,
0.3197866678237915,
-0.10592078417539597,
-0.16510559618473053,
-0.1785767823457718,
0.36671459674835205,
0.09009120613336563,
-0.1361701488494873,
-0.1401388794183731,
0.2128312587738037,
0.11252221465110779,
-0.06716680526733398,
-0.04236563295125961,
0.1738707423210144,
0.22414356470108032,
0.02833859808743,
0.25732141733169556,
-0.06006033718585968,
0.009402137249708176,
-0.32265713810920715,
0.21171784400939941,
0.013129100203514099,
0.09284240007400513,
-0.029170691967010498,
0.3301387131214142,
0.07612764835357666,
-0.05933870002627373,
0.02790430188179016,
-0.17231720685958862,
-0.31111153960227966,
0.13958069682121277,
0.26320314407348633,
-0.32620590925216675,
-0.28280484676361084,
0.037651821970939636,
0.1663207858800888,
-0.2700730562210083,
0.1619821935892105,
0.06362976133823395,
0.1290998011827469,
-0.04311626777052879,
0.30946189165115356,
0.045605603605508804,
-0.18039602041244507,
-0.05479936674237251,
-0.1981797069311142,
-0.5061773657798767,
-0.04281945526599884,
-0.2809860408306122,
0.24919793009757996,
0.10944945365190506,
0.2501012682914734,
0.06621703505516052,
-0.09179971367120743,
-0.41287583112716675,
-0.03859025239944458,
-0.03838808462023735,
-0.24691814184188843,
0.17872613668441772,
0.059019528329372406,
-0.13103367388248444,
-0.12198394536972046,
0.19001737236976624,
0.3304051160812378,
-0.226066455245018,
-0.2517739534378052,
-0.061238616704940796,
0.07643646001815796,
0.06955146789550781,
-0.4013770818710327,
0.2190122902393341,
0.25627458095550537,
-0.044559407979249954,
-0.06795089691877365,
0.06522640585899353,
-0.06563091278076172,
0.12340789288282394,
-0.02689199522137642,
-0.2960803806781769,
0.038197215646505356,
0.0884922444820404,
-0.18698185682296753,
0.41408029198646545,
0.3657130002975464,
-0.10273667424917221,
-0.03626725822687149,
0.13667018711566925,
-0.13047337532043457,
0.1315300166606903,
0.2529388964176178,
-0.016201190650463104,
0.10304535925388336,
0.44694608449935913,
-0.25665444135665894,
0.25106021761894226,
-0.03473919630050659,
0.4918936789035797,
0.06686665862798691,
0.07440062612295151,
0.03436233848333359,
0.3039693236351013,
0.3151651918888092,
-0.21865180134773254,
0.049098387360572815,
0.03022618778049946,
0.12201572209596634,
0.19131802022457123,
-0.16675615310668945,
0.2666797339916229,
-0.051240403205156326,
-0.005105361342430115,
-0.016214367002248764,
0.3933086395263672,
-0.20962968468666077,
0.45459219813346863,
0.5419144630432129,
-0.0013175159692764282,
0.21192286908626556,
0.10369700938463211,
0.3305595815181732,
0.031559959053993225,
0.47553932666778564,
-0.18736448884010315,
-0.009061018005013466,
0.05887313932180405,
0.2040681093931198,
0.2842157483100891,
-0.15863582491874695,
0.027793170884251595,
0.14121396839618683,
-0.24504855275154114,
-0.0009234100580215454,
0.13370868563652039,
0.4955936670303345,
-0.011056509800255299,
-0.3000227212905884,
-0.27546074986457825,
0.2370809018611908,
-0.10921984165906906,
0.07769414782524109,
-0.42863163352012634,
-0.1898776888847351,
-0.03857136145234108,
0.1642903834581375,
-0.025651540607213974,
-0.08433310687541962,
0.26959607005119324,
-0.09353882074356079,
-0.027441203594207764,
-0.5097653269767761,
0.11969077587127686,
0.2806994616985321,
0.3795965909957886,
0.0686831921339035,
0.03127077966928482,
0.15981504321098328,
0.10549837350845337,
0.05850209295749664,
0.45597565174102783,
0.3109782636165619,
0.02791387028992176,
0.08264483511447906,
-0.2312847226858139,
0.005439360626041889,
-0.20627236366271973,
0.17111696302890778,
-0.016648076474666595,
0.1484123170375824,
0.06913816183805466,
0.20171122252941132,
0.15813462436199188,
-0.19452841579914093,
0.0691889151930809,
0.05469336733222008,
0.2825569808483124,
-0.2733772397041321,
-0.4011450707912445,
-0.4149543046951294,
-0.1887773871421814,
0.0069257952272892,
-0.3372665345668793,
-0.25703513622283936,
0.1071196049451828,
0.2551538348197937,
-0.24771937727928162,
-0.008904514834284782,
-0.388201504945755,
0.13068200647830963,
0.18750201165676117,
0.29506367444992065,
0.28568029403686523,
0.2564816474914551,
-0.08138290792703629,
-0.5297933220863342,
-0.3931703567504883,
0.07725773751735687,
0.19633033871650696,
0.11264470219612122,
-0.21912941336631775,
-0.008710497990250587,
0.09932112693786621,
0.24371205270290375,
0.4408804774284363,
-0.007600031327456236,
0.2286137491464615,
-0.11738044023513794,
-0.1778993159532547,
0.1368822157382965,
0.055021218955516815,
0.056593701243400574,
-0.10554549098014832,
0.006633095443248749,
0.17141392827033997,
-0.013207708485424519,
0.10960071533918381,
-0.1928405463695526,
0.3368243873119354,
-0.3960677981376648,
-0.293546199798584,
0.29422616958618164,
0.13797757029533386,
0.30031371116638184,
-0.0908544659614563,
0.00043509341776371,
-0.16249831020832062,
-0.1204056441783905,
-0.11298897117376328,
0.3248237073421478,
0.19755735993385315,
0.2409505546092987,
0.07947667688131332,
-0.2506072223186493,
0.0012278648791834712,
0.06027030944824219,
0.2871800661087036,
0.3397212028503418,
-0.3618485927581787,
0.011394059285521507,
0.07210435718297958,
-0.180881530046463,
0.27529317140579224,
0.15657258033752441,
-0.09822626411914825,
-0.04835962504148483,
-0.15514205396175385,
-0.3952760398387909,
0.1075851246714592,
-0.37969550490379333,
-0.2953091561794281,
-0.07770387083292007,
-0.14949288964271545,
0.4372990131378174,
-0.22698058187961578,
-0.2181645631790161,
0.03263663500547409,
0.06097659841179848,
-0.024849794805049896,
0.07477861642837524,
0.4075115919113159,
-0.029738280922174454,
0.027100931853055954,
0.10965090990066528,
0.6535191535949707,
0.3617287278175354,
-0.12328783422708511,
0.12118172645568848,
-0.1576819121837616
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.