html_url
stringlengths 48
51
| title
stringlengths 5
268
| comments
stringlengths 63
51.8k
| body
stringlengths 0
36.2k
⌀ | comment_length
int64 16
1.52k
| text
stringlengths 164
54.1k
| embeddings
sequence |
---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/2400 | Concatenate several datasets with removed columns is not working. | Hi,
did you fill out the env info section manually or by copy-pasting the output of the `datasets-cli env` command?
This code should work without issues on 1.6.2 version (I'm working on master (1.6.2.dev0 version) and can't reproduce this error). | ## Describe the bug
You can't concatenate datasets when you removed columns before.
## Steps to reproduce the bug
```python
from datasets import load_dataset, concatenate_datasets
wikiann= load_dataset("wikiann","en")
wikiann["train"] = wikiann["train"].remove_columns(["langs","spans"])
wikiann["test"] = wikiann["test"].remove_columns(["langs","spans"])
assert wikiann["train"].features.type == wikiann["test"].features.type
concate = concatenate_datasets([wikiann["train"],wikiann["test"]])
```
## Expected results
Merged dataset
## Actual results
```python
ValueError: External features info don't match the dataset:
Got
{'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'ner_tags': Sequence(feature=ClassLabel(num_classes=7, names=['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC'], names_file=None, id=None), length=-1, id=None), 'langs': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'spans': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)}
with type
struct<langs: list<item: string>, ner_tags: list<item: int64>, spans: list<item: string>, tokens: list<item: string>>
but expected something like
{'ner_tags': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)}
with type
struct<ner_tags: list<item: int64>, tokens: list<item: string>>
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: ~1.6.2~ 1.5.0
- Platform: macos
- Python version: 3.8.5
- PyArrow version: 3.0.0
| 40 | Concatenate several datasets with removed columns is not working.
## Describe the bug
You can't concatenate datasets when you removed columns before.
## Steps to reproduce the bug
```python
from datasets import load_dataset, concatenate_datasets
wikiann= load_dataset("wikiann","en")
wikiann["train"] = wikiann["train"].remove_columns(["langs","spans"])
wikiann["test"] = wikiann["test"].remove_columns(["langs","spans"])
assert wikiann["train"].features.type == wikiann["test"].features.type
concate = concatenate_datasets([wikiann["train"],wikiann["test"]])
```
## Expected results
Merged dataset
## Actual results
```python
ValueError: External features info don't match the dataset:
Got
{'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'ner_tags': Sequence(feature=ClassLabel(num_classes=7, names=['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC'], names_file=None, id=None), length=-1, id=None), 'langs': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'spans': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)}
with type
struct<langs: list<item: string>, ner_tags: list<item: int64>, spans: list<item: string>, tokens: list<item: string>>
but expected something like
{'ner_tags': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)}
with type
struct<ner_tags: list<item: int64>, tokens: list<item: string>>
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: ~1.6.2~ 1.5.0
- Platform: macos
- Python version: 3.8.5
- PyArrow version: 3.0.0
Hi,
did you fill out the env info section manually or by copy-pasting the output of the `datasets-cli env` command?
This code should work without issues on 1.6.2 version (I'm working on master (1.6.2.dev0 version) and can't reproduce this error). | [
-0.0503960066,
-0.1630987227,
-0.0372492559,
0.2921581268,
0.0712868497,
0.1608152837,
0.4275568128,
0.3972991109,
-0.1280240417,
0.0971979126,
-0.2116854042,
0.2830113173,
0.1164147109,
0.2401472479,
-0.3315172493,
-0.2897304296,
0.3033925295,
-0.0497660302,
-0.1116108745,
0.0089246444,
-0.2896187305,
0.1585722715,
-0.5898991823,
-0.081241563,
-0.2130751312,
0.3191352785,
-0.4302579463,
0.0101837255,
0.015857989,
-0.0107661188,
0.2489322275,
0.0348747745,
0.0911832005,
0.2840431929,
-0.0001121243,
-0.1066203564,
0.2169154882,
-0.0981468782,
-0.051017575,
-0.0768577084,
-0.3660039604,
-0.3289981484,
0.0968494639,
-0.1380753964,
0.0926095694,
-0.3934739232,
-0.5519917607,
-0.3150902689,
-0.0737220943,
0.3357468247,
0.1743546426,
0.1843101084,
0.1966743469,
0.0580197312,
0.0981648639,
-0.1065448374,
-0.1400445849,
-0.3029307425,
-0.0800747722,
-0.2223573029,
0.4281582832,
0.2023565769,
-0.1775318086,
-0.2188141793,
-0.1169998273,
0.2738664746,
-0.134968102,
-0.3314729035,
-0.0674609244,
0.177102685,
0.5298751593,
-0.1704702526,
-0.0786018074,
-0.1111544669,
0.1492635757,
-0.3533153832,
0.107100606,
0.2344941646,
0.0967378616,
0.0004621155,
-0.0760482028,
0.1861792952,
-0.0712402388,
0.1990371197,
0.0029847156,
0.3789431751,
0.180226773,
0.0926469341,
-0.0005086384,
-0.2979044616,
0.2016519904,
-0.4510839283,
-0.1082626134,
0.100753814,
-0.6059804559,
-0.0505557507,
-0.0591488034,
-0.2208835632,
0.1962035745,
0.066828087,
-0.3245202899,
-0.0843992457,
0.1913086325,
0.1033208817,
0.1777589023,
0.4177725315,
-0.1163803861,
0.2942093611,
-0.208963871,
0.1199078411,
-0.0970709622,
0.0832020938,
0.0753659979,
-0.0561548471,
0.0701389238,
0.101112619,
0.3909550011,
-0.0969192684,
-0.1147806123,
0.1432805061,
-0.3422622681,
0.0044987611,
-0.196939081,
-0.1263697445,
-0.166724354,
0.5428575277,
0.0377590246,
0.3465742171,
0.1597054154,
-0.0662206933,
-0.2639190555,
0.0068229954,
-0.0230931826,
-0.3497839272,
-0.0136381108,
-0.072977744,
0.0252170246,
0.3798221648,
0.0718707889,
-0.0370391682,
-0.2197399437,
-0.1956978589,
0.278252095,
-0.0406233296,
0.0026138255,
-0.2228979021,
0.4038160741,
-0.1640161574,
0.0380967855,
-0.0434405878,
-0.5051544309,
-0.1425156295,
-0.681855917,
0.2404864877,
0.0318958648,
0.010436439,
-0.1410257369,
0.1947816908,
0.129994601,
0.2286320776,
-0.1718494296,
-0.2043319643,
0.0844892785,
-0.1165862903,
0.3006383777,
0.1032013223,
-0.2258981764,
0.0896845162,
0.2380649447,
0.0241857767,
0.4148752391,
0.1680235416,
0.0080548376,
0.0937930048,
-0.3190903962,
-0.0370071828,
0.4073168635,
-0.3568254411,
-0.0753335357,
0.0344849303,
0.0019471323,
0.3965250254,
0.0630724356,
-0.1725126505,
-0.0213230532,
0.1155074537,
0.3902070224,
0.3771299422,
0.0085254014,
-0.0484942086,
-0.095287025,
-0.3098082244,
0.3817209899,
-0.0649058074,
0.0163192321,
0.2972752452,
0.1458044797,
-0.3483154774,
0.3754388988,
-0.2316850573,
-0.0468885824,
0.3996680379,
0.1350972354,
0.0140621252,
-0.0787637532,
-0.0277048927,
-0.6223954558,
0.0030916929,
0.0060157506,
0.1521739811,
0.0274600964,
-0.1527983844,
-0.0295594074,
-0.1535814703,
-0.2728900015,
0.0649764612,
0.1627151221,
0.1823696941,
0.0888013169,
-0.1181533113,
-0.2229299247,
0.4120449126,
-0.0862700045,
0.0703942999,
-0.340765059,
0.3083176017,
-0.1723787934,
0.0329284444,
0.1073515862,
0.3806808591,
0.3077315688,
0.0311498493,
-0.1154230833,
0.3030855954,
-0.1770814955,
-0.159483254,
-0.1415891945,
-0.1729777455,
0.0314047225,
-0.1056802869,
-0.2074013352,
-0.0851075053,
-0.0073307902,
-0.0969134867,
-0.0933884531,
0.1859097034,
-0.0348241664,
0.3872606456,
0.0237941947,
0.0162367839,
0.203612268,
-0.1143120751,
-0.0444548726,
-0.1632091999,
0.195617944,
0.057159327,
-0.2243571728,
0.0947121456,
-0.350966841,
0.10102164,
0.4427135289,
0.3745529354,
-0.2229185104,
-0.0197399501,
-0.2566658556,
-0.0503714979,
0.0802753493,
-0.0437158197,
0.5458467603,
0.2856975496,
-0.1391587406,
0.2237299532,
0.1402378082,
-0.0241757352,
0.1097460985,
0.1719201058,
0.0535751991,
0.4272286296,
0.3137720227,
0.149044618,
-0.0310777426,
-0.1394142509,
0.0814508572,
0.115404889,
-0.2603967488,
0.0682633519,
-0.4254441559,
-0.3282282352,
-0.0643064082,
-0.4015088081,
-0.1965871602,
-0.525354147,
-0.2588236928,
-0.0019736725,
-0.2272168249,
0.3588677049,
-0.2451853305,
-0.140782699,
0.1112646386,
-0.3164883852,
-0.1617890745,
-0.0060378574,
-0.0109859295,
0.1099303588,
-0.02841991,
-0.0724930093,
-0.1141832769,
-0.1195506528,
-0.0290250182,
-0.2793536782,
-0.1802816391,
0.0783890337,
-0.4108566344,
-0.005951033,
0.0833569542,
-0.1461046487,
0.0428667553,
-0.551466763,
0.2130685449,
0.3447150588,
-0.0989944786,
0.3531974554,
0.1951988786,
-0.0460551083,
-0.039807789,
-0.4187428355,
-0.17644988,
-0.3359155953,
0.0367101915,
0.0865778252,
0.0953494012,
0.2800818086,
0.1913310289,
-0.1775089204,
0.0875430182,
0.0280539654,
-0.1698317677,
-0.1727427989,
0.1965536624,
0.0289863646,
-0.1954084635,
0.0377024859,
-0.0466095656,
0.1134587973,
0.1409338117,
-0.1158430278,
-0.0908903703,
-0.1276451796,
0.3326512277,
-0.1209752932,
0.2143720388,
0.1329699904,
0.1540290862,
0.0231207609,
0.0787505135,
0.0280148275,
0.04315947,
0.1299303174,
0.3429623246,
-0.2213285267,
0.1372575909,
-0.1495713294,
0.1375368088,
0.3419878781,
-0.0257241335,
0.2826380432,
0.0222583245,
0.3406071365,
-0.1352031827,
-0.5328832269,
-0.1271973252,
-0.0814227313,
0.3290214539,
-0.0329635218,
-0.2476579547,
-0.1753962338,
-0.1729934961,
0.2439470589,
-0.0694781095,
-0.0917683467,
-0.0333739556,
-0.2583685517,
0.2206794024,
0.1147602424,
-0.2689763904,
-0.1551439166,
-0.1641209275,
-0.0245633014,
0.0801433846,
0.0375047103,
-0.1497063935,
-0.6010103226,
0.0100807203,
-0.2405245155,
0.3405512571,
0.2059508115,
0.4148747921,
0.2138052136,
-0.3147108555,
-0.3111157715,
0.0981570035,
0.301088959,
-0.2733204961,
-0.5399458408,
0.5859165788,
0.2233325839,
-0.1713490188,
-0.4675940871,
-0.1997633576,
-0.1970877349,
0.2386061102,
0.5842802525,
-0.1334955543,
-0.1447023451,
0.5269442797,
0.6180106997,
0.1199457571,
0.0410641506,
-0.3213901818,
-0.0627564192,
-0.4176594019,
-0.2730885148,
-0.0228933152,
0.5833280683,
-0.410741061,
-0.1739819795,
-0.1997661144,
-0.4016900957,
0.2125873864,
-0.2919646502,
0.3892845213,
0.1077712104,
0.2085870802,
-0.4233525097,
0.4858822525,
0.1032778323,
0.4562622011,
0.1394289881,
-0.5673012137,
0.0167691018,
-0.1674881577,
0.7560819983,
-0.1930586994,
-0.1519739479,
0.4494768977,
-0.5763666034,
0.3119747937,
0.0449158363,
0.2468322664,
0.3549003899,
0.0151376911,
-0.1996214539,
-0.0914012864,
0.0281820167,
0.1854790002,
0.0522524081,
0.5647614598,
-0.0058149677,
-0.2855692506,
-0.0244534127,
-0.2005772889,
0.7556130886,
0.3028385639,
0.0208409503,
0.0965692028,
0.1147252247,
0.3575701416,
-0.0204634462,
0.3085601926,
-0.3534912169,
-0.1734674126,
-0.0389286615,
-0.1595135629,
0.1411316544,
-0.3761196136,
-0.3558761477,
0.2786337733,
-0.4931744039,
0.7269926667,
-0.0347010158,
0.1887212247,
0.105944097,
-0.2008256912,
-0.0680051222,
0.0378719643,
0.0580185205,
-0.1867532432,
-0.1229828745,
0.0072534201,
-0.0799763277,
-0.1067745686,
0.0135246748,
0.4419245124,
0.0047341329,
0.4068090022,
-0.0896739736,
-0.3423573375,
-0.0609224215,
0.4606699646,
0.2999408245,
0.0102737006,
0.1020506397,
-0.2231282145,
0.1134876907,
-0.0160718057,
0.0467897952,
-0.3310846984,
-0.0681070387,
0.0927122533,
-0.3878519535,
0.3156063557,
0.1516723484,
-0.3560872972,
-0.2975388765,
0.108422026,
0.0818375051,
-0.4882442653,
-0.1700426489,
0.1675436646,
-0.0017362385,
-0.2665569782,
0.1225983575,
-0.0974289402,
-0.2891639471,
0.2967381477,
-0.0802770406,
-0.2868709266,
-0.196472019,
0.3217976689,
0.2862679958,
0.0131936399,
0.4645836949,
0.1284362525,
0.1328780353,
-0.0833978429,
0.0675330088,
-0.1073502302,
-0.1771721095,
-0.0076978519,
-0.1745206416,
0.0185001828,
-0.0949165002,
0.5044788122,
-0.2347290218,
0.2245811671,
0.1139486656,
-0.1793146431,
-0.3401867747,
0.1036678627,
-0.1466754228,
0.0892512277,
-0.0959018469,
0.3043539226,
-0.1747480184,
0.1204192042,
-0.2747636437,
-0.0956492051,
-0.2462106198,
0.1867582351,
0.118991971,
-0.0417106524,
0.0259538312,
-0.1496902257,
0.1464573294,
0.195709914,
0.2536361217,
-0.2474796772,
-0.0826306939,
0.0871707276,
0.2038489878,
-0.0752917677,
-0.0900729001,
-0.0664058328,
-0.2871436179,
-0.1995355487,
-0.1168174744,
-0.0653049648,
-0.0417942069,
0.2797826231,
-0.1537990868,
-0.076409325,
-0.0361266918,
0.0254086796,
-0.0409435146,
0.0646221936,
-0.2511433959,
-0.0639560744,
-0.2318918705,
-0.0310026072,
-0.2864588797,
0.0251832996,
-0.1243510172,
0.3092533946,
0.289490819,
-0.1083314791,
-0.296526134,
-0.1483741254,
0.2037280053,
0.2329981774,
-0.1955139041,
0.0803614184,
0.067455098,
0.1903171986,
-0.4417675138,
-0.2918824553,
0.0822319463,
0.1420914531,
0.0977671295,
0.1850872487,
0.2802192569,
-0.1555012614,
-0.0577223077,
-0.0908956751,
0.3061230779,
0.1604911238,
0.4371008873,
0.4279777408,
0.0571258366,
0.1286177784,
0.1029726192,
0.2378234416,
-0.0384996571,
0.1931986064,
0.1888799518,
-0.0699631572,
0.2364191264,
-0.1155470982,
0.0791443363,
-0.1605755389,
0.3062427044,
0.0459762402,
0.0083454968,
0.1092525646,
-0.017033115,
-0.1481679529,
-0.0365287364,
-0.3210126758,
-0.0650918409,
0.3818078935,
-0.1106384099,
0.1032074392,
-0.0424410962,
-0.1661800295,
0.1270097643,
-0.0202534869,
0.1957321763,
0.0077175396,
0.3294889927,
-0.1101320758,
-0.0789017379,
-0.0990317389,
0.2678999603,
0.5671158433,
0.3819376826,
-0.204012841,
-0.056276381,
0.2738363147,
0.1424812227,
-0.0493476465,
0.2027293444,
0.545558691,
0.267303586,
0.0571306311,
-0.0507815219,
0.0271807089,
-0.2287234217,
0.0995411873,
0.2750028372,
0.0248398036,
-0.3396690786,
0.2354067117,
0.1432967484,
-0.1791846603,
0.0670434535,
0.091158919,
0.1455983818,
-0.5377768874,
0.4148104787,
0.1168232113,
-0.2847914994,
-0.0198487341,
0.0530581884,
-0.0716051459,
0.0064346371,
0.6549488306,
0.4100562632,
0.2773193717,
0.0786547586,
0.1211827248,
0.1426076293,
0.2290958464,
0.4957562089,
0.0465817302,
-0.4582918882,
-0.2425279468,
-0.4170463085,
-0.0589076467,
-0.0299219284,
-0.1018602103,
0.1288497597,
0.2419572175,
0.2251465172,
0.1913025975,
-0.0598403513,
0.2551975846,
0.2330653369,
-0.2104758471,
-0.6309732199,
-0.2250907868,
0.0253400151,
0.0410836115,
0.0213105604,
-0.3583007753,
0.3948849142,
0.1316540986,
0.0789852366,
-0.1651489735,
0.0224082246,
0.1879859716,
0.0349590145,
-0.0051148254,
0.2527993619,
0.3567376733,
-0.0489393622,
-0.0415806063,
-0.0485596508,
-0.1991137266,
-0.1130390838,
0.1264914572,
-0.1278740019,
0.1283636093,
-0.1019973457,
0.1006889641,
-0.1587142795,
0.1035265848,
0.4020659029,
0.105574809,
-0.3391430378,
0.0887741446,
0.2914124727,
0.0935690105,
0.1896457821,
0.5305510163,
-0.0892121419,
0.4117043316,
-0.1116232798,
-0.4936123192,
0.287214458,
0.0231087487,
-0.653719306,
-0.1910222471,
0.1563528627,
0.2566809356,
0.1443291306,
-0.3373327255,
-0.0105280094,
0.489920646,
-0.1523715407,
-0.1201292276,
0.3732355237,
0.0071298978,
0.2497647256,
0.0244184416,
-0.1045160443,
0.1468237191,
-0.1472361833,
0.0055602393,
0.0045180744
] |
https://github.com/huggingface/datasets/issues/2396 | strange datasets from OSCAR corpus | Hi ! Thanks for reporting
cc @pjox is this an issue from the data ?
Anyway we should at least mention that OSCAR could contain such contents in the dataset card, you're totally right @jerryIsHere | ![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png)
![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png)
From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data.
7 training instances is obviously not a right number.
As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl.
And even if you don't read Yue Chinese, you can tell the first six instance are problematic.
(It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app)
It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted.
I will try to inform the host of OSCAR corpus later.
Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue.
> Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it?
Thanks a lot, the new post is here:
https://github.com/oscar-corpus/oscar-website/issues/11 | 35 | strange datasets from OSCAR corpus
![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png)
![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png)
From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data.
7 training instances is obviously not a right number.
As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl.
And even if you don't read Yue Chinese, you can tell the first six instance are problematic.
(It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app)
It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted.
I will try to inform the host of OSCAR corpus later.
Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue.
> Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it?
Thanks a lot, the new post is here:
https://github.com/oscar-corpus/oscar-website/issues/11
Hi ! Thanks for reporting
cc @pjox is this an issue from the data ?
Anyway we should at least mention that OSCAR could contain such contents in the dataset card, you're totally right @jerryIsHere | [
0.2676994801,
0.0570944957,
-0.0023011297,
0.5770169497,
0.1565005481,
0.0609704219,
-0.012423533,
0.2492677718,
-0.264593184,
0.0486130267,
-0.5796422958,
-0.1079981253,
0.043104548,
-0.0511755645,
-0.0094941296,
-0.3019306958,
0.1105531976,
0.0599582195,
0.0344042145,
-0.3692538142,
-0.1291410327,
0.2438741475,
-0.0991413966,
0.0684381947,
-0.0104774935,
-0.1464855075,
-0.254902482,
-0.0072283177,
-0.3976081908,
0.0282757506,
0.1691302359,
0.1257214844,
0.0447248705,
0.37858513,
-0.0001098784,
-0.1675401628,
0.2241497636,
-0.0326168537,
0.1237275675,
-0.0597776733,
0.1777799129,
0.042733416,
-0.0099442219,
0.034117993,
-0.2434697151,
-0.2776964903,
0.0040472397,
0.149794668,
0.2936551571,
0.4105725884,
0.237998575,
0.0630981252,
-0.1171705648,
-0.1336971074,
0.2072796971,
-0.0323363207,
-0.24816975,
0.181034565,
0.466270417,
0.0761904046,
-0.1121682301,
0.0576443151,
0.0283337403,
-0.1012540385,
0.2170054615,
-0.1111784726,
-0.2650503516,
-0.4842263758,
0.2932801843,
0.5078215599,
0.3079799414,
-0.081157133,
-0.2589428425,
-0.2738282382,
0.0988937244,
-0.2739087343,
0.2932353318,
0.3606120944,
0.0745743588,
0.2289150208,
-0.208894819,
0.1954556853,
-0.1180684119,
0.4085971117,
-0.267852217,
-0.1681364477,
-0.2238403857,
0.0197891295,
0.0670833364,
-0.0670696571,
0.039549388,
-0.2790006697,
0.0216593575,
0.2727841735,
-0.1698678136,
-0.1353236884,
0.0378284343,
0.4480692148,
0.1993469447,
-0.1269876808,
-0.0557643361,
0.1898595989,
-0.3269470632,
-0.0471593551,
0.3354088366,
0.1453732699,
-0.1572799832,
-0.1377138644,
0.1423855275,
0.1614498049,
0.0849002227,
0.2207644135,
-0.0777042881,
-0.0842675045,
-0.2245462835,
-0.3745215535,
0.099155806,
-0.3770411313,
-0.2749187052,
0.3003402948,
-0.624471724,
0.2917197645,
0.0357687175,
0.1298946738,
-0.1998815686,
0.0667816624,
-0.0167154316,
0.2029190063,
-0.1194480807,
-0.0397364832,
-0.1921681166,
0.2545001209,
-0.2170648128,
0.2372610271,
0.040141955,
-0.2705197036,
0.2493536174,
0.1856438518,
0.3698459864,
-0.1369045675,
-0.0799854472,
-0.400462985,
-0.0195613317,
0.0929224342,
-0.1745464206,
0.1127901524,
0.061473798,
-0.3261083364,
-0.1222706661,
-0.1741285622,
-0.3078811169,
-0.1431827992,
0.0786642954,
0.1830639839,
-0.433542341,
0.032701645,
-0.3430887461,
0.3751344383,
0.0194555093,
0.3101086617,
0.3069824278,
-0.084839493,
-0.2614413798,
0.110479489,
-0.1510210782,
0.3771541715,
-0.0065250127,
-0.0835282654,
-0.1661024988,
0.081506893,
0.3079615235,
0.2400635034,
-0.0228676517,
-0.0866744295,
-0.2789590955,
0.1016658992,
-0.0555677526,
-0.2338881493,
-0.3346046209,
0.2996107638,
0.1844695956,
0.2973281145,
-0.144299686,
-0.1274281889,
0.2322860658,
-0.2734361291,
0.2217366993,
0.1740205735,
0.0513250567,
-0.0272632148,
-0.3290060163,
-0.1187136993,
-0.358599335,
0.0662764236,
0.1302719414,
0.0879967436,
0.0359007455,
0.0622564442,
0.3574251533,
0.0268749483,
0.0745496899,
0.1326261312,
-0.1339470446,
0.402363807,
0.1660580635,
0.0027953156,
0.0745985582,
0.2480974942,
-0.3026051819,
0.5085479617,
0.0180826038,
-0.2257504314,
-0.1997610033,
-0.2386164367,
-0.2820660472,
-0.2455313504,
0.1467761099,
-0.1849620342,
0.0019979251,
0.30761078,
0.0463868827,
0.045598574,
-0.2320448607,
0.0228442308,
-0.547008872,
0.1783733517,
0.0564265586,
0.1313602477,
0.1921941191,
0.2265802622,
0.0022634377,
-0.1288476735,
0.0188173372,
0.0711187497,
-0.3784909248,
0.521687746,
0.0105423536,
0.3390643299,
0.4842692018,
-0.3351529539,
0.1867596805,
0.0962928385,
0.2057124078,
-0.0595745146,
-0.1192198247,
0.4944601357,
0.1703857034,
-0.1687860191,
0.0706617162,
0.0164972506,
0.2834598124,
-0.1336001307,
-0.2227507085,
-0.2548027635,
0.4240825772,
0.1479568332,
0.4548327327,
0.1943279952,
-0.4106912017,
0.2209001034,
0.0080121979,
-0.044288002,
0.2007292658,
0.3062257469,
-0.1937875152,
-0.0257210154,
0.0227153171,
0.2468970567,
0.1487172991,
0.062574327,
-0.0749768466,
0.3186786771,
-0.069458887,
-0.3558131754,
0.1118463874,
0.1962321997,
0.4446724951,
0.0999087319,
0.3605707586,
0.220251292,
-0.7133965492,
0.1260080934,
-0.0119817331,
0.3289735615,
-0.1542911977,
0.2327584475,
-0.1093547195,
-0.3838165104,
-0.4255993068,
-0.0526060648,
-0.1197228059,
-0.0765789747,
0.191711843,
-0.0079618488,
-0.0710901767,
-0.0606718734,
-0.2533045113,
0.2126710564,
-0.2307348847,
0.392039299,
-0.0970006436,
-0.0001322352,
-0.1199718788,
0.1299188882,
0.1205607876,
0.0156219611,
0.4261786044,
-0.2234459519,
-0.1449936479,
-0.2055268735,
-0.5277352333,
0.3550098836,
-0.0370326787,
-0.0828410909,
-0.0709609985,
-0.1230317056,
-0.2948218882,
-0.0460333377,
0.0550757833,
-0.175223574,
-0.1702313125,
0.0568536259,
-0.1404700428,
-0.0086306725,
0.0384072661,
-0.4563490152,
-0.2169179916,
-0.0600898899,
0.2215564549,
0.1342096329,
0.1609429866,
0.4600667655,
-0.2288878858,
0.1400549263,
0.166989252,
0.0807905272,
-0.5246050954,
-0.3567253649,
0.3421807289,
-0.3204014599,
-0.4378070831,
-0.2066510022,
-0.2681742013,
-0.1136471257,
0.0419771969,
-0.3773082793,
-0.5895928144,
-0.2654288113,
-0.1950020939,
0.3902938366,
-0.3890118599,
0.0661181435,
-0.3487098813,
-0.112431407,
0.0002544705,
0.3013919592,
-0.0172217134,
0.0075143566,
0.2562911808,
-0.2389841378,
0.5512990355,
0.0627559274,
0.3488254547,
0.2001669407,
0.0785249323,
0.400772512,
0.1514521241,
0.2562437057,
-0.0319217183,
-0.1340350211,
0.3567915559,
-0.1609951854,
-0.0110349357,
0.4110299051,
0.1014013663,
-0.2588827014,
-0.0115149496,
0.1257116944,
-0.2704856396,
-0.2327978015,
0.0137274414,
-0.07529746,
-0.044432506,
0.0619645566,
-0.0168284699,
0.2466300577,
-0.4781700671,
-0.0459050015,
0.0849938691,
-0.0483801365,
-0.0480611958,
-0.1555661559,
0.0361824445,
-0.6853791475,
0.1299281716,
0.0055808709,
0.2157565355,
-0.0981486216,
0.3015868068,
0.2229269147,
0.1142503172,
0.6046194434,
-0.0360773206,
0.0197584815,
0.0640880466,
-0.1593836844,
-0.2227322906,
-0.1761955917,
-0.4290164113,
0.2636867762,
0.2155921459,
0.2350153923,
-0.1400402635,
-0.0076077371,
0.2108382285,
0.0438339114,
-0.1988007128,
0.0452604145,
-0.0140934754,
-0.5783288479,
0.0204859693,
-0.0566006526,
0.2570241094,
0.2461137772,
-0.2465656698,
-0.1783546358,
0.0273979083,
0.3921889067,
0.522521019,
0.0822656453,
0.0778020024,
0.5562985539,
0.1265050024,
0.0485970862,
0.2794079483,
0.2785665393,
0.7305169702,
-0.1383528411,
-0.4596142471,
-0.0787005797,
-0.3730381429,
-0.0539413206,
0.5012979507,
0.0733193234,
-0.0461696647,
-0.3145385385,
-0.0212492514,
-0.2173009813,
0.198285237,
0.3673543334,
0.0678473562,
-0.3099004328,
-0.3381646276,
0.6486570239,
0.097301513,
-0.2117161602,
-0.0075569977,
0.2658584416,
-0.2391377687,
0.3573745191,
0.0122723598,
0.9542486072,
-0.1912833899,
-0.0442245081,
0.2648424506,
0.2007788718,
0.4890200496,
0.0048598391,
0.0470101051,
-0.2552780509,
-0.4762347937,
-0.0891338363,
0.1125535294,
0.1524897963,
0.2524734139,
0.0504169352,
0.1695686728,
0.1507982016,
-0.330752492,
-0.004624112,
-0.0930545032,
-0.1097792834,
-0.1424430609,
-0.3858086765,
0.2335759848,
0.087882258,
0.4907716811,
-0.0251332093,
0.0482202321,
-0.3262658715,
0.010600864,
-0.5220405459,
0.0588062704,
0.1309582144,
-0.0944527686,
0.3296044171,
-0.5177643895,
0.2315042913,
0.0937839225,
0.3234202266,
-0.2126330733,
-0.2467212975,
0.3399108648,
-0.08340507,
-0.3022832572,
0.3012397587,
-0.0905866846,
0.3471257389,
-0.123499468,
-0.1297504306,
0.1222686991,
0.2607761323,
0.1445858777,
-0.2115231007,
-0.0985135809,
-0.089008674,
-0.1729493886,
-0.4047576189,
-0.1194864213,
-0.1400159448,
-0.1010031849,
0.1534444839,
-0.0157408156,
0.0184021704,
-0.0176605489,
0.0893050209,
-0.3160210848,
-0.0297372751,
0.4177771211,
0.2908809781,
-0.0866725668,
0.3345596194,
0.5006688237,
-0.0924456194,
-0.0569557287,
-0.1356572956,
0.1240206361,
-0.3993451595,
0.0166615024,
-0.1371002644,
-0.1621250063,
-0.1353638321,
0.0718336403,
-0.0321013816,
-0.1690672785,
0.0348089226,
-0.4083507955,
0.0484291054,
0.0493493788,
0.3094580472,
0.0582227744,
-0.0381123275,
0.0904551595,
0.2750758827,
0.149887085,
-0.3072505295,
0.2171389312,
-0.2439663112,
0.033765018,
-0.1528746337,
0.0050278981,
0.034568917,
-0.2459266782,
-0.0381523669,
0.0866532102,
-0.1406109035,
-0.178469345,
-0.0995470956,
0.1121714413,
-0.0125543959,
-0.351252079,
0.2863206863,
0.1491298527,
-0.0890474021,
-0.2008609027,
0.1019808874,
0.5271870494,
0.2051793486,
-0.0790417939,
0.0798614621,
-0.1667253971,
0.0778204799,
-0.0986040309,
0.0689814463,
0.3401398063,
0.183900699,
-0.0672479793,
0.1160736308,
-0.2392150015,
-0.0607520975,
-0.0328316763,
-0.3738976121,
-0.242621094,
0.4297307134,
-0.0269520618,
0.2511415482,
0.695482254,
0.0882527381,
0.3521151841,
-0.3342870772,
0.0167473443,
-0.0096740592,
0.1583520472,
-0.3926721215,
-0.0477949344,
-0.0476358086,
0.2072641253,
-0.0001072674,
0.0749140754,
0.0460642278,
-0.0229939558,
-0.2722862065,
0.0080512799,
0.5071797371,
0.0163920242,
0.2085095942,
0.068945244,
0.1197311804,
0.0585185103,
0.2436465472,
-0.0928816944,
0.2050594538,
0.2713140547,
-0.010676682,
0.333224535,
-0.2813111246,
0.3489291668,
0.3693646193,
-0.319589287,
0.0136309192,
0.5468187928,
-0.2157414556,
0.2831244767,
0.1977006346,
0.2938272059,
0.1392150521,
-0.1310461909,
-0.3772866428,
0.1210150793,
-0.0039987736,
-0.1015879884,
-0.0990434363,
-0.3409675956,
-0.1125146523,
0.1773216724,
-0.3309967816,
-0.1919043511,
0.2041881531,
-0.0504715741,
-0.4578523338,
-0.3864656985,
0.0886507258,
-0.0775413364,
0.3063215315,
0.0372156538,
0.3571665287,
0.2162102759,
-0.1343721151,
0.1002373546,
0.5791754723,
0.1290082484,
0.1282622814,
0.3204133213,
0.2209008038,
-0.1628934741,
0.0165251214,
0.0122793894,
0.1575546563,
0.1201130226,
-0.0991982073,
0.0856006145,
0.1103232577,
-0.1372420341,
0.2281876504,
0.0672516227,
0.1438182592,
-0.1229054853,
0.4894862771,
-0.1464985013,
0.0709642544,
-0.2475922704,
0.0226247646,
-0.3075388372,
0.261752069,
0.2810643017,
-0.2151383609,
0.1608296633,
-0.1471678615,
0.089927651,
-0.0447109267,
0.353295356,
0.5815427303,
-0.009842868,
-0.0143457362,
-0.0663925037,
-0.5804971457,
0.4264127612,
-0.2836047411,
0.1714901775,
0.0004595945,
0.1692209542,
0.024556933,
0.1825414449,
-0.3031068444,
0.3341661692,
-0.1446927935,
-0.1285569072,
-0.3643918931,
0.1117888987,
-0.2892953753,
0.1427313387,
-0.0977641866,
-0.0098534152,
0.3696788847,
-0.376472652,
0.0249699615,
-0.1294028759,
0.0040033613,
-0.4783973396,
-0.0495419055,
0.2290339917,
0.2319303006,
0.0133246435,
-0.1163656637,
-0.0666053221,
-0.2615003288,
-0.2494397163,
-0.0704268888,
0.4824528694,
-0.0602830686,
-0.1318703741,
0.1580566615,
-0.0932492763,
0.240411669,
0.3770560026,
0.0144607127,
-0.1739256978,
-0.4429990053,
0.0399761647,
-0.1874049902,
-0.0352261811,
-0.0608852394,
0.5569927096,
-0.1725474,
-0.139238134,
0.0391083062,
-0.5822048187,
0.3299416602,
-0.5559082627,
0.1658034772,
-0.2232459784,
0.1830238104,
0.0688658804,
-0.2526191771,
-0.4450644255,
0.1104289368,
0.1024454758,
-0.0768703222,
-0.1648369581,
-0.0664818659,
-0.064132385,
-0.1986687332,
-0.1243120581,
0.2940546572,
0.2435920388,
-0.2361121476,
0.3124827147,
-0.0227928404
] |
https://github.com/huggingface/datasets/issues/2396 | strange datasets from OSCAR corpus | Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? | ![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png)
![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png)
From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data.
7 training instances is obviously not a right number.
As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl.
And even if you don't read Yue Chinese, you can tell the first six instance are problematic.
(It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app)
It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted.
I will try to inform the host of OSCAR corpus later.
Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue.
> Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it?
Thanks a lot, the new post is here:
https://github.com/oscar-corpus/oscar-website/issues/11 | 93 | strange datasets from OSCAR corpus
![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png)
![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png)
From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data.
7 training instances is obviously not a right number.
As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl.
And even if you don't read Yue Chinese, you can tell the first six instance are problematic.
(It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app)
It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted.
I will try to inform the host of OSCAR corpus later.
Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue.
> Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it?
Thanks a lot, the new post is here:
https://github.com/oscar-corpus/oscar-website/issues/11
Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? | [
0.2676994801,
0.0570944957,
-0.0023011297,
0.5770169497,
0.1565005481,
0.0609704219,
-0.012423533,
0.2492677718,
-0.264593184,
0.0486130267,
-0.5796422958,
-0.1079981253,
0.043104548,
-0.0511755645,
-0.0094941296,
-0.3019306958,
0.1105531976,
0.0599582195,
0.0344042145,
-0.3692538142,
-0.1291410327,
0.2438741475,
-0.0991413966,
0.0684381947,
-0.0104774935,
-0.1464855075,
-0.254902482,
-0.0072283177,
-0.3976081908,
0.0282757506,
0.1691302359,
0.1257214844,
0.0447248705,
0.37858513,
-0.0001098784,
-0.1675401628,
0.2241497636,
-0.0326168537,
0.1237275675,
-0.0597776733,
0.1777799129,
0.042733416,
-0.0099442219,
0.034117993,
-0.2434697151,
-0.2776964903,
0.0040472397,
0.149794668,
0.2936551571,
0.4105725884,
0.237998575,
0.0630981252,
-0.1171705648,
-0.1336971074,
0.2072796971,
-0.0323363207,
-0.24816975,
0.181034565,
0.466270417,
0.0761904046,
-0.1121682301,
0.0576443151,
0.0283337403,
-0.1012540385,
0.2170054615,
-0.1111784726,
-0.2650503516,
-0.4842263758,
0.2932801843,
0.5078215599,
0.3079799414,
-0.081157133,
-0.2589428425,
-0.2738282382,
0.0988937244,
-0.2739087343,
0.2932353318,
0.3606120944,
0.0745743588,
0.2289150208,
-0.208894819,
0.1954556853,
-0.1180684119,
0.4085971117,
-0.267852217,
-0.1681364477,
-0.2238403857,
0.0197891295,
0.0670833364,
-0.0670696571,
0.039549388,
-0.2790006697,
0.0216593575,
0.2727841735,
-0.1698678136,
-0.1353236884,
0.0378284343,
0.4480692148,
0.1993469447,
-0.1269876808,
-0.0557643361,
0.1898595989,
-0.3269470632,
-0.0471593551,
0.3354088366,
0.1453732699,
-0.1572799832,
-0.1377138644,
0.1423855275,
0.1614498049,
0.0849002227,
0.2207644135,
-0.0777042881,
-0.0842675045,
-0.2245462835,
-0.3745215535,
0.099155806,
-0.3770411313,
-0.2749187052,
0.3003402948,
-0.624471724,
0.2917197645,
0.0357687175,
0.1298946738,
-0.1998815686,
0.0667816624,
-0.0167154316,
0.2029190063,
-0.1194480807,
-0.0397364832,
-0.1921681166,
0.2545001209,
-0.2170648128,
0.2372610271,
0.040141955,
-0.2705197036,
0.2493536174,
0.1856438518,
0.3698459864,
-0.1369045675,
-0.0799854472,
-0.400462985,
-0.0195613317,
0.0929224342,
-0.1745464206,
0.1127901524,
0.061473798,
-0.3261083364,
-0.1222706661,
-0.1741285622,
-0.3078811169,
-0.1431827992,
0.0786642954,
0.1830639839,
-0.433542341,
0.032701645,
-0.3430887461,
0.3751344383,
0.0194555093,
0.3101086617,
0.3069824278,
-0.084839493,
-0.2614413798,
0.110479489,
-0.1510210782,
0.3771541715,
-0.0065250127,
-0.0835282654,
-0.1661024988,
0.081506893,
0.3079615235,
0.2400635034,
-0.0228676517,
-0.0866744295,
-0.2789590955,
0.1016658992,
-0.0555677526,
-0.2338881493,
-0.3346046209,
0.2996107638,
0.1844695956,
0.2973281145,
-0.144299686,
-0.1274281889,
0.2322860658,
-0.2734361291,
0.2217366993,
0.1740205735,
0.0513250567,
-0.0272632148,
-0.3290060163,
-0.1187136993,
-0.358599335,
0.0662764236,
0.1302719414,
0.0879967436,
0.0359007455,
0.0622564442,
0.3574251533,
0.0268749483,
0.0745496899,
0.1326261312,
-0.1339470446,
0.402363807,
0.1660580635,
0.0027953156,
0.0745985582,
0.2480974942,
-0.3026051819,
0.5085479617,
0.0180826038,
-0.2257504314,
-0.1997610033,
-0.2386164367,
-0.2820660472,
-0.2455313504,
0.1467761099,
-0.1849620342,
0.0019979251,
0.30761078,
0.0463868827,
0.045598574,
-0.2320448607,
0.0228442308,
-0.547008872,
0.1783733517,
0.0564265586,
0.1313602477,
0.1921941191,
0.2265802622,
0.0022634377,
-0.1288476735,
0.0188173372,
0.0711187497,
-0.3784909248,
0.521687746,
0.0105423536,
0.3390643299,
0.4842692018,
-0.3351529539,
0.1867596805,
0.0962928385,
0.2057124078,
-0.0595745146,
-0.1192198247,
0.4944601357,
0.1703857034,
-0.1687860191,
0.0706617162,
0.0164972506,
0.2834598124,
-0.1336001307,
-0.2227507085,
-0.2548027635,
0.4240825772,
0.1479568332,
0.4548327327,
0.1943279952,
-0.4106912017,
0.2209001034,
0.0080121979,
-0.044288002,
0.2007292658,
0.3062257469,
-0.1937875152,
-0.0257210154,
0.0227153171,
0.2468970567,
0.1487172991,
0.062574327,
-0.0749768466,
0.3186786771,
-0.069458887,
-0.3558131754,
0.1118463874,
0.1962321997,
0.4446724951,
0.0999087319,
0.3605707586,
0.220251292,
-0.7133965492,
0.1260080934,
-0.0119817331,
0.3289735615,
-0.1542911977,
0.2327584475,
-0.1093547195,
-0.3838165104,
-0.4255993068,
-0.0526060648,
-0.1197228059,
-0.0765789747,
0.191711843,
-0.0079618488,
-0.0710901767,
-0.0606718734,
-0.2533045113,
0.2126710564,
-0.2307348847,
0.392039299,
-0.0970006436,
-0.0001322352,
-0.1199718788,
0.1299188882,
0.1205607876,
0.0156219611,
0.4261786044,
-0.2234459519,
-0.1449936479,
-0.2055268735,
-0.5277352333,
0.3550098836,
-0.0370326787,
-0.0828410909,
-0.0709609985,
-0.1230317056,
-0.2948218882,
-0.0460333377,
0.0550757833,
-0.175223574,
-0.1702313125,
0.0568536259,
-0.1404700428,
-0.0086306725,
0.0384072661,
-0.4563490152,
-0.2169179916,
-0.0600898899,
0.2215564549,
0.1342096329,
0.1609429866,
0.4600667655,
-0.2288878858,
0.1400549263,
0.166989252,
0.0807905272,
-0.5246050954,
-0.3567253649,
0.3421807289,
-0.3204014599,
-0.4378070831,
-0.2066510022,
-0.2681742013,
-0.1136471257,
0.0419771969,
-0.3773082793,
-0.5895928144,
-0.2654288113,
-0.1950020939,
0.3902938366,
-0.3890118599,
0.0661181435,
-0.3487098813,
-0.112431407,
0.0002544705,
0.3013919592,
-0.0172217134,
0.0075143566,
0.2562911808,
-0.2389841378,
0.5512990355,
0.0627559274,
0.3488254547,
0.2001669407,
0.0785249323,
0.400772512,
0.1514521241,
0.2562437057,
-0.0319217183,
-0.1340350211,
0.3567915559,
-0.1609951854,
-0.0110349357,
0.4110299051,
0.1014013663,
-0.2588827014,
-0.0115149496,
0.1257116944,
-0.2704856396,
-0.2327978015,
0.0137274414,
-0.07529746,
-0.044432506,
0.0619645566,
-0.0168284699,
0.2466300577,
-0.4781700671,
-0.0459050015,
0.0849938691,
-0.0483801365,
-0.0480611958,
-0.1555661559,
0.0361824445,
-0.6853791475,
0.1299281716,
0.0055808709,
0.2157565355,
-0.0981486216,
0.3015868068,
0.2229269147,
0.1142503172,
0.6046194434,
-0.0360773206,
0.0197584815,
0.0640880466,
-0.1593836844,
-0.2227322906,
-0.1761955917,
-0.4290164113,
0.2636867762,
0.2155921459,
0.2350153923,
-0.1400402635,
-0.0076077371,
0.2108382285,
0.0438339114,
-0.1988007128,
0.0452604145,
-0.0140934754,
-0.5783288479,
0.0204859693,
-0.0566006526,
0.2570241094,
0.2461137772,
-0.2465656698,
-0.1783546358,
0.0273979083,
0.3921889067,
0.522521019,
0.0822656453,
0.0778020024,
0.5562985539,
0.1265050024,
0.0485970862,
0.2794079483,
0.2785665393,
0.7305169702,
-0.1383528411,
-0.4596142471,
-0.0787005797,
-0.3730381429,
-0.0539413206,
0.5012979507,
0.0733193234,
-0.0461696647,
-0.3145385385,
-0.0212492514,
-0.2173009813,
0.198285237,
0.3673543334,
0.0678473562,
-0.3099004328,
-0.3381646276,
0.6486570239,
0.097301513,
-0.2117161602,
-0.0075569977,
0.2658584416,
-0.2391377687,
0.3573745191,
0.0122723598,
0.9542486072,
-0.1912833899,
-0.0442245081,
0.2648424506,
0.2007788718,
0.4890200496,
0.0048598391,
0.0470101051,
-0.2552780509,
-0.4762347937,
-0.0891338363,
0.1125535294,
0.1524897963,
0.2524734139,
0.0504169352,
0.1695686728,
0.1507982016,
-0.330752492,
-0.004624112,
-0.0930545032,
-0.1097792834,
-0.1424430609,
-0.3858086765,
0.2335759848,
0.087882258,
0.4907716811,
-0.0251332093,
0.0482202321,
-0.3262658715,
0.010600864,
-0.5220405459,
0.0588062704,
0.1309582144,
-0.0944527686,
0.3296044171,
-0.5177643895,
0.2315042913,
0.0937839225,
0.3234202266,
-0.2126330733,
-0.2467212975,
0.3399108648,
-0.08340507,
-0.3022832572,
0.3012397587,
-0.0905866846,
0.3471257389,
-0.123499468,
-0.1297504306,
0.1222686991,
0.2607761323,
0.1445858777,
-0.2115231007,
-0.0985135809,
-0.089008674,
-0.1729493886,
-0.4047576189,
-0.1194864213,
-0.1400159448,
-0.1010031849,
0.1534444839,
-0.0157408156,
0.0184021704,
-0.0176605489,
0.0893050209,
-0.3160210848,
-0.0297372751,
0.4177771211,
0.2908809781,
-0.0866725668,
0.3345596194,
0.5006688237,
-0.0924456194,
-0.0569557287,
-0.1356572956,
0.1240206361,
-0.3993451595,
0.0166615024,
-0.1371002644,
-0.1621250063,
-0.1353638321,
0.0718336403,
-0.0321013816,
-0.1690672785,
0.0348089226,
-0.4083507955,
0.0484291054,
0.0493493788,
0.3094580472,
0.0582227744,
-0.0381123275,
0.0904551595,
0.2750758827,
0.149887085,
-0.3072505295,
0.2171389312,
-0.2439663112,
0.033765018,
-0.1528746337,
0.0050278981,
0.034568917,
-0.2459266782,
-0.0381523669,
0.0866532102,
-0.1406109035,
-0.178469345,
-0.0995470956,
0.1121714413,
-0.0125543959,
-0.351252079,
0.2863206863,
0.1491298527,
-0.0890474021,
-0.2008609027,
0.1019808874,
0.5271870494,
0.2051793486,
-0.0790417939,
0.0798614621,
-0.1667253971,
0.0778204799,
-0.0986040309,
0.0689814463,
0.3401398063,
0.183900699,
-0.0672479793,
0.1160736308,
-0.2392150015,
-0.0607520975,
-0.0328316763,
-0.3738976121,
-0.242621094,
0.4297307134,
-0.0269520618,
0.2511415482,
0.695482254,
0.0882527381,
0.3521151841,
-0.3342870772,
0.0167473443,
-0.0096740592,
0.1583520472,
-0.3926721215,
-0.0477949344,
-0.0476358086,
0.2072641253,
-0.0001072674,
0.0749140754,
0.0460642278,
-0.0229939558,
-0.2722862065,
0.0080512799,
0.5071797371,
0.0163920242,
0.2085095942,
0.068945244,
0.1197311804,
0.0585185103,
0.2436465472,
-0.0928816944,
0.2050594538,
0.2713140547,
-0.010676682,
0.333224535,
-0.2813111246,
0.3489291668,
0.3693646193,
-0.319589287,
0.0136309192,
0.5468187928,
-0.2157414556,
0.2831244767,
0.1977006346,
0.2938272059,
0.1392150521,
-0.1310461909,
-0.3772866428,
0.1210150793,
-0.0039987736,
-0.1015879884,
-0.0990434363,
-0.3409675956,
-0.1125146523,
0.1773216724,
-0.3309967816,
-0.1919043511,
0.2041881531,
-0.0504715741,
-0.4578523338,
-0.3864656985,
0.0886507258,
-0.0775413364,
0.3063215315,
0.0372156538,
0.3571665287,
0.2162102759,
-0.1343721151,
0.1002373546,
0.5791754723,
0.1290082484,
0.1282622814,
0.3204133213,
0.2209008038,
-0.1628934741,
0.0165251214,
0.0122793894,
0.1575546563,
0.1201130226,
-0.0991982073,
0.0856006145,
0.1103232577,
-0.1372420341,
0.2281876504,
0.0672516227,
0.1438182592,
-0.1229054853,
0.4894862771,
-0.1464985013,
0.0709642544,
-0.2475922704,
0.0226247646,
-0.3075388372,
0.261752069,
0.2810643017,
-0.2151383609,
0.1608296633,
-0.1471678615,
0.089927651,
-0.0447109267,
0.353295356,
0.5815427303,
-0.009842868,
-0.0143457362,
-0.0663925037,
-0.5804971457,
0.4264127612,
-0.2836047411,
0.1714901775,
0.0004595945,
0.1692209542,
0.024556933,
0.1825414449,
-0.3031068444,
0.3341661692,
-0.1446927935,
-0.1285569072,
-0.3643918931,
0.1117888987,
-0.2892953753,
0.1427313387,
-0.0977641866,
-0.0098534152,
0.3696788847,
-0.376472652,
0.0249699615,
-0.1294028759,
0.0040033613,
-0.4783973396,
-0.0495419055,
0.2290339917,
0.2319303006,
0.0133246435,
-0.1163656637,
-0.0666053221,
-0.2615003288,
-0.2494397163,
-0.0704268888,
0.4824528694,
-0.0602830686,
-0.1318703741,
0.1580566615,
-0.0932492763,
0.240411669,
0.3770560026,
0.0144607127,
-0.1739256978,
-0.4429990053,
0.0399761647,
-0.1874049902,
-0.0352261811,
-0.0608852394,
0.5569927096,
-0.1725474,
-0.139238134,
0.0391083062,
-0.5822048187,
0.3299416602,
-0.5559082627,
0.1658034772,
-0.2232459784,
0.1830238104,
0.0688658804,
-0.2526191771,
-0.4450644255,
0.1104289368,
0.1024454758,
-0.0768703222,
-0.1648369581,
-0.0664818659,
-0.064132385,
-0.1986687332,
-0.1243120581,
0.2940546572,
0.2435920388,
-0.2361121476,
0.3124827147,
-0.0227928404
] |
https://github.com/huggingface/datasets/issues/2391 | Missing original answers in kilt-TriviaQA | That could be useful indeed! Feel free to open a PR on the dataset card if you already have some code that runs, otherwise we'll take care of it soon :) | I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets
## Describe the bug
The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question.
However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`)
## How to fix
It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data
cc @yjernite who previously answered to an issue about KILT and TriviaQA :)
| 31 | Missing original answers in kilt-TriviaQA
I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets
## Describe the bug
The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question.
However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`)
## How to fix
It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data
cc @yjernite who previously answered to an issue about KILT and TriviaQA :)
That could be useful indeed! Feel free to open a PR on the dataset card if you already have some code that runs, otherwise we'll take care of it soon :) | [
0.5064163208,
-0.3483676016,
-0.0351328589,
0.062851347,
-0.1213427335,
-0.1011348441,
0.0344418846,
0.3133408725,
0.1268100291,
0.183856383,
0.1640157402,
0.4927674234,
0.1122972146,
0.4052691162,
-0.2509844005,
0.3889524341,
-0.0829043239,
-0.0019128356,
-0.0266752802,
-0.3187006116,
-0.2322146147,
0.2161709517,
-0.1054577753,
-0.0127490843,
-0.4187037647,
0.1789602935,
-0.1225840971,
0.0886475816,
0.1447681189,
-0.3618234694,
0.413816303,
-0.0295041725,
-0.0571990274,
-0.0511863977,
-0.0001163995,
-0.2085259259,
0.035524819,
-0.1410207003,
-0.4676490724,
-0.0007739159,
-0.521279037,
0.0164579619,
-0.0597768053,
-0.1613025367,
-0.0574857518,
0.2864459455,
-0.0024453194,
-0.0210052077,
0.3094421029,
0.2542654872,
0.1770557165,
-0.0932436511,
-0.063484706,
-0.1800222546,
0.0356936604,
0.2446767837,
-0.1647233367,
0.1539989561,
-0.1439373344,
-0.0503537692,
0.027917264,
0.3840642571,
0.1803432703,
0.1095791161,
-0.2104801238,
-0.1323058456,
0.123659201,
-0.2465540171,
0.4007653594,
0.2841538489,
0.2348447293,
0.1206987128,
-0.3248026967,
-0.1977265477,
0.0932545289,
0.288092494,
-0.0109731797,
0.124402605,
-0.1363507807,
-0.2952623069,
-0.2086616158,
-0.0256460365,
-0.0678828135,
-0.0072238967,
-0.1617988795,
0.2719787359,
0.1087462083,
0.0416884236,
-0.1180526018,
-0.0647104383,
0.2020544708,
-0.0071486486,
-0.2675994635,
0.2320916206,
-0.4236135185,
-0.2010637373,
0.1482282877,
0.0433905944,
0.2846263349,
-0.2984972596,
0.0577426739,
0.1936497092,
-0.2878255546,
-0.1157379076,
0.2814103961,
0.2249251008,
0.5015595555,
-0.4662691355,
-0.0686961189,
0.1793821156,
-0.1848452687,
-0.1055987626,
-0.0697759762,
0.0285257325,
-0.1266582906,
-0.1790532917,
0.0918542668,
-0.3960404098,
-0.2203079313,
0.0945568606,
-0.3354539871,
0.0928725824,
-0.0802250579,
0.0914257318,
-0.3331408501,
0.4611908793,
-0.1675018072,
0.2119442672,
-0.3096481264,
-0.297835052,
-0.1636329889,
-0.1647340357,
0.0661305636,
0.0875091851,
0.2834362388,
-0.278739512,
0.422896266,
0.2885068655,
0.0934127495,
-0.1077328324,
-0.0583772212,
-0.1930044889,
0.0104149738,
0.1265090704,
0.0996810421,
0.1406674534,
0.1707727462,
-0.0101907915,
0.1328337491,
0.3715587258,
-0.4798250198,
-0.3926905394,
-0.174383834,
0.227559343,
-0.0689651519,
-0.1529335678,
-0.0981712341,
0.2556854188,
-0.1350388378,
-0.133900851,
-0.0644676462,
-0.349491626,
-0.086791724,
-0.2528089285,
0.4844784439,
0.1443109512,
-0.2544129193,
0.2270886749,
-0.202878803,
0.0399901979,
-0.2231206745,
0.1565095782,
-0.0392994098,
0.3329614401,
-0.1608744413,
-0.0407971106,
-0.1055179909,
-0.4473586977,
-0.2160708904,
-0.3647001684,
0.4545494616,
0.3787329197,
-0.2407922596,
0.1538426876,
0.0745166242,
0.1185931861,
-0.0344055034,
0.0907154381,
-0.129979074,
-0.1017843857,
-0.3159195185,
-0.3424828351,
0.1604640484,
0.2800522745,
0.0927960426,
-0.0462394282,
0.2145368606,
0.1177989319,
0.2015680224,
0.1085857004,
-0.2322514355,
0.290335238,
0.4023077488,
0.1829578876,
0.15446648,
0.1252217591,
-0.2956437171,
0.1648567915,
-0.5367686749,
0.0007432455,
0.3756138682,
-0.2755928636,
-0.5543509722,
0.1562987864,
-0.155464381,
-0.5120692253,
0.1259925812,
-0.1458701342,
0.2678461671,
0.0769694149,
0.031922143,
0.2687184513,
-0.2909153104,
-0.1769287884,
-0.1592978835,
0.264077574,
-0.0194361974,
-0.1374593377,
-0.0875338241,
0.6361722946,
0.2696982622,
0.3276681602,
-0.0062108939,
0.2320401669,
0.1752085984,
0.161221087,
0.4861150682,
-0.0401578061,
0.2118988931,
-0.0589990988,
-0.2136869878,
0.2125496119,
-0.0642789379,
-0.0561989397,
-0.3204428852,
0.2087257504,
0.1455164701,
0.1726151258,
-0.1378974766,
0.1327902377,
-0.2151974142,
-0.2184008807,
0.2137720585,
0.0241880342,
-0.0226678401,
-0.2658396065,
-0.5356954932,
-0.0312538669,
-0.3318930864,
0.3433722854,
0.2486389428,
0.2554908693,
-0.004929658,
0.06348975,
-0.1412683427,
-0.0893694013,
0.469045341,
-0.2126733661,
0.1278369576,
0.1664651632,
-0.1282390356,
-0.061342869,
0.018238632,
-0.0580956265,
-0.0592055805,
-0.0200527888,
0.2152728438,
0.2801454067,
0.66231215,
0.1440823972,
-0.103091836,
0.4766433537,
-0.0511284582,
-0.077192679,
-0.0545728765,
-0.1799444109,
-0.4775120616,
-0.1386463791,
0.0692699775,
0.0777662545,
-0.1331334412,
-0.4419930279,
0.4497722089,
0.3484995067,
-0.1111548319,
0.1979822069,
0.0012840336,
0.1198355705,
-0.2222642004,
0.0496326014,
-0.3405995369,
-0.4228144586,
-0.4497848153,
0.1223604307,
-0.3683999479,
-0.0903135836,
0.2718049884,
-0.0971282199,
-0.3501996696,
-0.5005817413,
-0.5326230526,
0.0099324649,
0.1049495563,
0.430773586,
-0.0346925072,
0.3675714433,
-0.6405918002,
-0.2677502036,
0.3842472136,
-0.035001602,
-0.1797938794,
0.0280368514,
0.0755791366,
0.1794505566,
-0.1399717033,
-0.5063707232,
-0.0688336715,
-0.0853636637,
0.2127437741,
0.2330765128,
0.1755037755,
0.2980680168,
0.0535350852,
-0.1522396654,
-0.0593042485,
-0.0652663261,
-0.4701879919,
-0.1478022337,
0.3093011975,
-0.1650630534,
-0.3541281223,
0.143508777,
-0.0879174918,
0.2715162337,
-0.0638272762,
-0.5980349779,
-0.6656984091,
0.0528208762,
0.4026942849,
-0.2056807131,
-0.0943505839,
0.1341779828,
-0.1361101419,
-0.019553503,
-0.0448330939,
-0.0250645112,
0.4879376292,
0.4266467392,
0.5124357343,
0.1280545145,
0.0136330938,
0.3042175472,
0.7666117549,
0.1936043203,
0.5757523775,
0.1775550842,
-0.2589358091,
0.1625187993,
-0.0556802526,
-0.1149139404,
0.5098049641,
-0.0782856718,
0.1934150755,
0.2823206484,
0.0999527574,
0.5670222044,
0.0473700091,
0.3638904393,
-0.3983491957,
-0.4199627042,
-0.2484638542,
-0.1325902045,
0.3250522316,
0.2249946296,
0.1674161106,
-0.0775938928,
-0.4030823708,
0.2956232727,
-0.1099242866,
0.1770301759,
0.0153234331,
-0.218057096,
-0.2417610437,
-0.1092476174,
0.1904703081,
0.0765499771,
0.1864432544,
-0.0629483163,
0.1542727649,
0.2369973361,
-0.0557326302,
0.7960609198,
0.0846255869,
-0.1019816697,
-0.1867233813,
0.0651674122,
-0.2904496193,
-0.3532453179,
-0.0397936627,
-0.3415673971,
0.017859878,
0.2351998836,
-0.2499166429,
-0.0148185184,
0.100959003,
0.1128629893,
-0.2615754902,
0.1712521464,
-0.0988670811,
-0.3827979267,
-0.2567311823,
-0.0967592224,
-0.0950371921,
0.2531132102,
-0.0929269344,
0.0238670446,
-0.0120585784,
0.1606690437,
0.048075676,
0.2413031012,
0.2478300184,
0.0851692483,
0.1172997653,
-0.0155269792,
-0.1903510988,
0.0668429211,
0.3774356842,
0.2302327305,
0.1837606728,
0.0732126385,
-0.2065120637,
0.3932704329,
0.2801288366,
0.080728136,
0.200147137,
-0.1146989316,
-0.0163935684,
-0.293294102,
0.1788849682,
0.1789172888,
-0.2708421946,
0.0600630753,
-0.0104098283,
0.2207984626,
-0.1354477257,
-0.093642503,
0.0685278848,
0.2277284414,
-0.0387287848,
0.0613759495,
0.2984565198,
0.8620376587,
0.2510137558,
0.0091867568,
0.2357155234,
-0.1889041662,
0.1107188091,
-0.2218528837,
0.2238613069,
-0.3860092163,
-0.0746997744,
0.1703315228,
0.0738083571,
-0.2233559638,
0.0923313275,
0.1011161506,
0.3213031292,
0.1428891718,
0.2470902205,
-0.0429476388,
0.1438777,
-0.1422431469,
-0.0621833093,
0.0630841032,
0.2091885507,
-0.1976955086,
0.3709492683,
-0.1852801144,
-0.1061221659,
-0.0573603846,
0.1074712351,
-0.1681905687,
0.229709357,
-0.4546372294,
0.2138389051,
0.603626132,
-0.2568201125,
-0.2494294941,
0.4904197156,
0.3904776275,
0.2837065756,
-0.1608926207,
0.2527780235,
0.3619238734,
0.290569067,
0.1596662551,
0.3011652529,
-0.0441928469,
-0.2004941255,
-0.2744787335,
0.2391583622,
-0.260687232,
0.1532790959,
-0.5899586082,
-0.0484357588,
0.1494725943,
-0.0534892827,
-0.158460319,
-0.0726190209,
0.1473391056,
-0.1602448225,
0.1208743304,
-0.2276440859,
0.1610536575,
0.2469839752,
-0.0065851826,
-0.1457179338,
-0.1351133734,
0.3775751293,
0.0743239075,
0.0356283374,
0.6234514117,
-0.1352861524,
-0.0762972161,
-0.0436789952,
0.0039995806,
-0.4881559312,
-0.0785831809,
0.0283738449,
0.0598426908,
-0.2092086375,
0.0018561656,
0.6113401651,
0.097705856,
-0.0517054498,
0.110868603,
-0.404242605,
-0.0231329575,
0.5424614549,
-0.1096954346,
-0.0116478046,
0.0896497741,
-0.0129198423,
-0.0821532086,
0.0850661471,
-0.3287647367,
-0.1148814112,
-0.3234304488,
0.2987614572,
-0.286850065,
0.0571610667,
0.1276665032,
-0.1636978686,
0.052079536,
-0.0788235739,
-0.0122042615,
-0.2355417758,
-0.3841150701,
0.0905057341,
0.2504946887,
0.1839332432,
-0.0198664796,
-0.3337650597,
-0.0573526807,
0.0127568599,
0.032504335,
0.2387199253,
-0.0132550085,
0.1852123737,
-0.0736940503,
0.3311599195,
-0.2495121211,
0.1607384831,
0.0807546452,
0.0236900188,
0.11169599,
-0.2004225105,
-0.1917162091,
0.061990913,
-0.0235578623,
-0.013496222,
-0.0685671195,
-0.2220323384,
0.10840372,
-0.0838566273,
-0.0439924411,
0.0526224524,
-0.0861190259,
-0.1279668361,
-0.2177358717,
0.0286181588,
0.2521515787,
0.1769890934,
-0.2502526641,
0.2626270056,
-0.1607588083,
-0.1608956605,
-0.1667324156,
0.1170606464,
0.3037761748,
-0.290340513,
0.5298941731,
0.2549228072,
-0.2279789001,
-0.6408810019,
0.2101259232,
0.0719326064,
-0.091448769,
-0.0221448764,
0.0974087194,
-0.3312942684,
-0.2036069781,
0.0768248588,
0.0181048196,
0.1511263847,
0.279766351,
-0.0919450372,
0.4834866524,
0.1185493395,
0.0429405272,
0.0517751873,
-0.1283736378,
0.237288177,
0.096829012,
0.3769880831,
-0.1475057602,
-0.3596106768,
-0.1484083235,
0.1534835994,
-0.2363643199,
-0.0405377932,
-0.0969622582,
-0.1626701653,
-0.1764696985,
0.1278990358,
0.0158061255,
-0.2733189464,
0.0212887898,
0.2561478317,
-0.364754051,
-0.3657858074,
-0.2174110264,
0.2296735197,
0.4608757198,
0.1824727654,
0.4139092565,
-0.0393181406,
0.1923698187,
0.2209994942,
0.3500201106,
-0.0721746907,
0.1619297564,
-0.1938936859,
-0.0745090991,
0.1242268384,
0.0568599738,
0.285476923,
0.2052728534,
0.3876185417,
-0.1374131441,
0.2548477054,
0.1557369232,
-0.1746134758,
-0.1642605662,
-0.0253731776,
-0.0942303017,
-0.2613268197,
0.2215276808,
0.237608999,
-0.0374143124,
0.2884162664,
0.0523323156,
-0.0962535217,
-0.1368665248,
-0.3797747791,
0.3199315071,
0.0954285413,
-0.0156356059,
0.0930591822,
-0.140991956,
-0.0770709068,
0.312487632,
-0.1272167116,
-0.2280490547,
-0.1602300256,
-0.492916286,
-0.0255816393,
0.2238792479,
0.056335263,
0.2680438161,
-0.0726590753,
-0.1488177627,
-0.0042561507,
-0.1019183025,
-0.5042895079,
0.2965970039,
-0.0493114963,
-0.2549830079,
0.0658002719,
-0.0294590257,
-0.2064829171,
0.0119884461,
-0.0348473117,
0.2386119962,
0.0460577868,
-0.0678528994,
0.2699090242,
-0.264944911,
0.1679949909,
-0.0620010495,
-0.1175930873,
0.0600353219,
0.0688101426,
0.0579307266,
-0.0877125338,
0.2034638375,
-0.2216169685,
0.0733707696,
-0.2331160009,
-0.4398469925,
0.3352455497,
0.305905968,
-0.2100490928,
0.0481629483,
0.3895557523,
0.3441241086,
0.0108145028,
-0.2174220383,
0.2059719115,
0.0136941355,
0.0295110364,
0.3768521845,
0.1416677386,
-0.0194895957,
0.28243047,
-0.2910395563,
-0.2156056613,
0.3001194894,
-0.230503276,
-0.125900209,
-0.2456978261,
0.393378526,
-0.2405365407,
-0.1775013357,
-0.5544109344,
-0.3222294152,
0.3366211951,
0.0032442894,
0.4184282422,
0.0111278333,
-0.1815104634,
0.0367988683,
0.0118321199,
0.0938415155,
0.0879662558,
0.03024978,
0.1788501441,
-0.0241481438
] |
https://github.com/huggingface/datasets/issues/2391 | Missing original answers in kilt-TriviaQA | I can open a PR but there is 2 details to fix:
- the name for the corresponding key (e.g. `original_answer`)
- how to implement it: I’m not sure what happens when you map `lambda x: {'input': ...}` as it keeps the other keys (e.g. `output`) intact but here since we want to set a nested value (e.g. `x['output']['original_answer']`) I implemented it with a regular function (not lambda), see below
```py
def add_original_answer(x, trivia_qa, triviaqa_map):
i = triviaqa_map[x['id']]
x['output']['original_answer'] = trivia_qa['validation'][i]['answer']['value']
return x
``` | I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets
## Describe the bug
The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question.
However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`)
## How to fix
It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data
cc @yjernite who previously answered to an issue about KILT and TriviaQA :)
| 84 | Missing original answers in kilt-TriviaQA
I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets
## Describe the bug
The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question.
However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`)
## How to fix
It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data
cc @yjernite who previously answered to an issue about KILT and TriviaQA :)
I can open a PR but there is 2 details to fix:
- the name for the corresponding key (e.g. `original_answer`)
- how to implement it: I’m not sure what happens when you map `lambda x: {'input': ...}` as it keeps the other keys (e.g. `output`) intact but here since we want to set a nested value (e.g. `x['output']['original_answer']`) I implemented it with a regular function (not lambda), see below
```py
def add_original_answer(x, trivia_qa, triviaqa_map):
i = triviaqa_map[x['id']]
x['output']['original_answer'] = trivia_qa['validation'][i]['answer']['value']
return x
``` | [
0.5155783892,
-0.3537393212,
0.0327611715,
0.0395883359,
-0.1053856537,
-0.0799774751,
-0.0295904893,
0.2565176487,
0.0855737627,
0.1321028769,
0.0442917421,
0.5437101722,
0.1936984211,
0.4238487482,
-0.1813196242,
0.3287058473,
0.0641256198,
0.1050168648,
0.1597806513,
-0.2960395515,
-0.3145171702,
0.2330384105,
-0.1170248538,
0.1646068394,
-0.130622685,
0.0120374104,
-0.2015924305,
0.2183436453,
0.2492161989,
-0.3835994899,
0.3044092059,
-0.0027334713,
-0.1335723251,
-0.06837634,
-0.0001235717,
-0.2483267188,
0.0100177275,
-0.2631391585,
-0.4476842582,
0.0135608809,
-0.5491893291,
0.0013693557,
-0.2267562896,
-0.2673228383,
0.0246862825,
0.0820417926,
-0.002338982,
-0.1811884195,
0.2089126408,
0.1528657973,
0.0594027527,
-0.145780921,
0.1589806527,
-0.049478177,
0.0174913779,
0.0762602314,
-0.1484266967,
0.169586882,
-0.1361151338,
-0.0244752653,
0.1385615021,
0.2619100511,
0.1054640189,
0.0110791354,
-0.1540764272,
-0.0243228991,
0.1023156494,
-0.2442404926,
0.411876142,
0.1882627755,
0.1229106337,
-0.2038340569,
-0.4319515824,
-0.2443826795,
0.103671439,
-0.018734999,
-0.0171044376,
0.0892702937,
-0.2156307846,
-0.2821561098,
-0.0009044552,
-0.2265104055,
-0.0220115799,
0.1320801675,
-0.0550721474,
0.3479348123,
0.2165877521,
0.1588948071,
-0.1401011497,
-0.0632673129,
0.3329878151,
-0.1604585201,
-0.1640904397,
0.3152609766,
-0.3240540624,
-0.1331783235,
0.1900512427,
0.0019529609,
0.2189771682,
-0.4318749309,
-0.0086094132,
0.1560152173,
-0.2777461708,
-0.0269537233,
0.2008717656,
0.2189192772,
0.5501308441,
-0.2920517921,
-0.070745714,
0.203440249,
-0.1683297008,
-0.1551695466,
0.0187577978,
0.1357350349,
-0.0358963273,
-0.0002321522,
0.1213157475,
-0.2009129375,
-0.3044296205,
0.3365493119,
-0.5707328916,
0.1031195894,
-0.2290993333,
0.1706619859,
-0.1619615853,
0.4370583594,
-0.119920902,
0.2700348794,
-0.2904261053,
-0.1402240396,
-0.0887849256,
-0.0078456113,
0.094883047,
0.2193796635,
0.1299308091,
-0.355532676,
0.4627597928,
0.3198025227,
0.1934593022,
-0.0461262017,
-0.0313190632,
-0.1281019747,
0.0169502366,
0.1240086854,
0.1192687899,
0.0273675658,
0.2130440176,
-0.2978677154,
0.0743860379,
0.3816874027,
-0.3751221597,
-0.3407920897,
-0.1022927314,
0.0808340088,
-0.1557133943,
-0.0852612481,
-0.11028938,
0.3784492612,
-0.0152194854,
-0.1495496631,
-0.0393541418,
-0.310698837,
-0.1329431087,
-0.3905703723,
0.4902428091,
0.1699145585,
-0.3541274965,
0.3064571023,
-0.2360414267,
0.0928541347,
-0.306645453,
-0.0370561816,
-0.0763023868,
0.4838705063,
-0.1619307548,
0.0490618683,
-0.2314926684,
-0.4575139582,
-0.3383844197,
-0.3009568453,
0.4830965102,
0.4284087718,
-0.0870442614,
0.0214252882,
0.0319996141,
0.0131466622,
0.0061034705,
-0.104041025,
-0.1317989975,
-0.2140954882,
-0.1762364507,
-0.194440797,
-0.0496318452,
0.0566415675,
0.0829335302,
0.1037128791,
0.2835062444,
0.2077236325,
0.1905882508,
0.0045286021,
-0.1778163761,
0.3082347512,
0.3007473946,
0.1162421927,
0.1203728691,
0.0259790011,
-0.3274591863,
0.1223378554,
-0.6618936062,
-0.0308635775,
0.136994496,
-0.333181262,
-0.549390614,
0.3154107034,
-0.1641771495,
-0.6335079074,
0.0482663773,
-0.0674959347,
0.2100675702,
-0.0569681153,
-0.0661990121,
0.2212015092,
-0.1994565427,
-0.1854482293,
-0.2481948584,
0.1694598794,
-0.0260957386,
-0.0751715079,
-0.1915442795,
0.5666312575,
0.3558174968,
0.3527082801,
0.0031317084,
0.3100955486,
0.2255420983,
0.0509440079,
0.4634572864,
0.072398968,
0.225365445,
0.0820313692,
-0.1245187372,
0.2991172969,
0.0801992938,
0.0168047734,
-0.3568075895,
0.421233654,
0.2299393862,
0.0837262422,
-0.1474851072,
-0.0554866865,
-0.2449641079,
-0.2046158761,
0.1883870363,
-0.0484555736,
-0.1712996066,
-0.2022147924,
-0.5047810078,
-0.1734986454,
-0.3660628498,
0.4657457471,
0.1779553741,
0.0015859482,
0.0422771685,
-0.0474726222,
-0.1407784522,
-0.0348972343,
0.4081187248,
-0.0663325936,
0.3968330324,
0.1243699417,
-0.1609615237,
-0.0058461721,
-0.0208608452,
0.0360130221,
0.1278192699,
-0.0164295807,
0.0743784234,
0.4520232975,
0.6341478229,
0.0820694342,
-0.0746799931,
0.4535390735,
-0.0603400134,
0.0384704955,
-0.1819292903,
-0.1642486602,
-0.421443671,
0.0934764966,
0.0367738977,
0.1953790784,
0.0722394139,
-0.5293930769,
0.3032275736,
0.4172868729,
-0.0395127758,
0.2344897687,
0.0452240892,
0.0601691194,
-0.0857850909,
-0.0692596436,
-0.2800637484,
-0.4454112053,
-0.3175086081,
0.010132825,
-0.494892776,
-0.2119403034,
0.1414637268,
0.1508734375,
-0.3360290527,
-0.6223651767,
-0.6542857289,
-0.0059413114,
-0.0045574624,
0.5484635234,
0.0428466536,
0.3344561756,
-0.6263719797,
-0.428275615,
0.3463863432,
0.1127222106,
-0.3175829053,
0.0224677157,
-0.0236435495,
0.1038111597,
0.0179197844,
-0.5704702735,
-0.048938036,
-0.0977130085,
0.1817075014,
0.0674072504,
0.2584237754,
0.1028781533,
0.0457066596,
-0.2438625395,
0.1191973835,
-0.1969715208,
-0.5478495955,
0.083673656,
0.3846224248,
-0.2477895916,
-0.2864776552,
-0.0700972155,
-0.3900153935,
0.2580226064,
-0.0927010402,
-0.4573445618,
-0.6468148232,
0.1500908434,
0.5276088715,
-0.1340633929,
0.0861619338,
0.156402871,
0.0242379382,
0.0743473321,
-0.1985613108,
-0.1410774887,
0.4161970019,
0.3931503594,
0.5974636078,
0.3126396537,
0.0723790526,
0.3485156,
0.7757429481,
0.2300545573,
0.5763298869,
0.1780344099,
-0.318638742,
0.1277626008,
-0.0349830985,
-0.2192827165,
0.2881553769,
-0.1039442047,
0.2534275055,
0.2045450658,
0.0285414048,
0.3737112582,
0.1092813015,
0.2637450099,
-0.3957765102,
-0.4265752137,
-0.2401213497,
-0.1653010696,
0.4256435931,
0.1469210088,
0.1787017137,
-0.2362691611,
-0.3038224578,
0.283318162,
-0.2621351182,
0.1519654244,
0.0429619811,
-0.1555480808,
-0.2987035513,
-0.2114509195,
0.343215853,
0.1276803166,
0.1706937551,
0.0484019965,
0.1696100384,
0.2524091005,
-0.1208020076,
0.8238653541,
-0.0635684431,
-0.1314237863,
-0.1152851805,
-0.0395146571,
-0.2656169236,
-0.1850187182,
0.0102542946,
-0.1166956946,
0.0241240039,
0.3816296756,
-0.3781967163,
0.0880155116,
-0.0164089687,
0.0268289167,
-0.3905110657,
0.0672973767,
-0.1110440269,
-0.4707729518,
-0.430236578,
-0.0862657875,
-0.1416790038,
0.4008592665,
0.1594100147,
0.218169421,
-0.0276574753,
0.2795981467,
0.2141217291,
0.2251775265,
0.2607109845,
0.1595425606,
0.0613125861,
-0.0761818886,
-0.2943119407,
0.0192232616,
0.5156427026,
0.1271863878,
0.2365972996,
0.0179175101,
-0.1256865412,
0.3058917522,
0.3533262908,
0.041207701,
0.2249420583,
-0.1922954321,
0.0153246783,
-0.2425510585,
0.0591745079,
0.1155352741,
-0.2436769903,
0.090133056,
-0.1724966764,
0.1682243794,
-0.294755429,
-0.3521321416,
0.0868889093,
0.2420436442,
-0.1013926864,
0.3036595881,
0.3035931587,
0.9488306642,
0.3353247941,
0.1135623977,
0.3608900905,
-0.2075496614,
0.025886273,
-0.2734703124,
0.1519682705,
-0.3740268052,
-0.0625595078,
0.0572387911,
0.058363039,
-0.21417059,
0.1685254872,
0.0524642132,
0.438444227,
0.2437237948,
0.1848824024,
0.070223175,
0.1409516633,
-0.0924056396,
-0.0747848004,
0.0029518809,
0.0531416796,
-0.1154730916,
0.3401060104,
-0.0908747911,
-0.1692329198,
-0.221032843,
0.0344555452,
-0.2264447808,
0.1442913264,
-0.5238332152,
0.3133120537,
0.4568420649,
-0.275767833,
-0.2541196346,
0.7030181885,
0.4300964773,
0.2325907648,
-0.0726566017,
0.2624037266,
0.5008449554,
0.2284640372,
0.2381438613,
0.2171832919,
-0.01821086,
-0.0843091384,
-0.294090122,
0.3372737467,
-0.2506560087,
0.108956039,
-0.6670832038,
-0.057519827,
-0.0427642986,
-0.1426392943,
-0.1850874722,
-0.0336047187,
0.1458842605,
-0.2189787328,
-0.009564192,
-0.253606528,
0.092219159,
0.2272177935,
-0.2408323735,
-0.1084251106,
-0.066855669,
0.447865665,
0.1054670513,
0.1571367681,
0.6415700912,
-0.2098604441,
-0.0364835337,
0.0930471644,
0.0646643862,
-0.450322032,
-0.0296363868,
0.1232794076,
0.0214888807,
-0.3334922791,
-0.1061204225,
0.4281900823,
0.1537293047,
0.0174188893,
0.1043467671,
-0.4397272468,
-0.144571811,
0.4621884227,
-0.1176214144,
0.0034608545,
0.2142082602,
0.0082862917,
-0.2010959089,
0.2436837256,
-0.2319590151,
-0.1701850444,
-0.1865473688,
0.1614428461,
0.027546376,
0.1224576086,
0.2052404433,
-0.0890578702,
0.0160149559,
-0.1305373609,
0.04446413,
-0.116553694,
-0.4527631998,
0.1614402384,
0.1164233163,
0.2653884292,
-0.0771369785,
-0.3488804102,
0.0651356429,
-0.0611052103,
0.124157913,
0.3242110908,
0.0399473496,
0.3424029946,
0.016631512,
0.2856267095,
-0.1570259631,
-0.0011670141,
0.0997797772,
0.1727513075,
0.2072711289,
-0.0285780113,
-0.2126388401,
0.0460992828,
0.0600511767,
0.0381191447,
-0.0444412343,
-0.2118047476,
0.331448704,
0.1655602902,
-0.119649455,
-0.0943983123,
-0.0308666136,
-0.1426912695,
-0.2555017769,
0.1220722795,
0.0399626121,
0.0314756706,
-0.3359081745,
0.1770798713,
-0.0440030731,
-0.2765420675,
-0.1121823266,
0.2542098165,
0.3468829393,
-0.2870000303,
0.3937594593,
0.1090271473,
-0.1169776097,
-0.6292847991,
-0.0057365745,
0.2432085872,
0.0002799484,
-0.0183629375,
0.2823642492,
-0.1612990052,
-0.1265545785,
0.2200453728,
0.1001470909,
0.0030181599,
0.3094757795,
-0.0766093582,
0.4954618216,
0.1501494944,
0.1288390756,
0.0092945518,
-0.0002636995,
0.1924198866,
0.2308570296,
0.2963754237,
0.131861493,
-0.3133872151,
0.0684033111,
0.3214661181,
-0.1737070829,
-0.2978072464,
-0.1678691208,
-0.1606390923,
-0.1957281977,
0.0136511242,
0.0772793069,
-0.407787025,
0.1681638807,
0.18260324,
-0.2792727649,
-0.2892889977,
-0.1758626848,
0.2151628137,
0.5069208145,
0.0770093799,
0.3692753315,
0.1024636552,
0.1428623646,
0.1320139617,
0.2746455669,
0.0674813464,
0.0623274855,
-0.384232223,
0.1307675838,
0.2049895227,
-0.0276889801,
0.356719017,
0.1330911964,
0.3253229558,
0.0434277356,
0.3325112462,
0.012808444,
-0.104585655,
-0.1991183758,
0.1404849589,
-0.0553095601,
-0.1745199859,
0.2698665559,
0.2881717682,
-0.0493475609,
0.4204520285,
0.1491864026,
-0.1316371262,
-0.2629208863,
-0.2125597894,
0.265126735,
0.226115346,
0.0008919736,
0.0369848497,
-0.0291609373,
-0.1942655891,
0.3717499077,
-0.1683084071,
-0.2988695204,
0.0201076474,
-0.462151736,
-0.0688240156,
0.2794606686,
-0.2333638072,
0.2594430149,
-0.1044082642,
0.080486536,
-0.0147826523,
-0.2231648266,
-0.6184479594,
0.179928422,
0.1711009741,
-0.16298531,
-0.0195141938,
0.0812342912,
-0.108370401,
0.0270613953,
-0.072505787,
0.0882159919,
0.2514558434,
-0.1119470075,
0.242081821,
-0.3079431951,
0.2020717561,
-0.2945340872,
-0.1013776436,
0.1801870763,
0.0555456392,
-0.1379781216,
-0.0538955405,
0.3241064548,
-0.0261426717,
-0.0984108895,
-0.1921047568,
-0.385335505,
0.3587112129,
0.2550291717,
-0.4032896459,
0.0664923266,
0.2871657312,
0.3047099113,
-0.1547923535,
-0.2566093504,
0.4110642672,
-0.0902856961,
0.061522007,
0.2689650953,
0.2679349482,
-0.0887554809,
0.5461468697,
-0.1659618914,
-0.3539322615,
0.4041137993,
-0.3229782283,
-0.0972537994,
0.005164234,
0.3167740703,
-0.3020549715,
-0.0745035931,
-0.4578880072,
-0.2353713959,
0.3377518058,
-0.0885355249,
0.1365432292,
0.0259773489,
-0.3285059035,
-0.0027854841,
-0.0035058924,
0.1100813374,
0.1873666942,
-0.0189366397,
0.0626483932,
-0.1144460887
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | Looks like there are multiple issues regarding this (#2386, #2322) and it's a WIP #2329. Currently these datasets are being loaded in-memory which is causing this issue. Quoting @mariosasko here for a quick fix:
> set `keep_in_memory` to `False` when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them)
| Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 69 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
Looks like there are multiple issues regarding this (#2386, #2322) and it's a WIP #2329. Currently these datasets are being loaded in-memory which is causing this issue. Quoting @mariosasko here for a quick fix:
> set `keep_in_memory` to `False` when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them)
| [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | Hi ! Since `datasets` 1.6.0 we no longer keep small datasets (<250MB) on disk and load them in RAM instead by default. This makes data processing and iterating on data faster. However datasets in RAM currently have no way to reload previous results from the cache (since nothing is written on disk). We are working on making the caching work for datasets in RAM.
Until then, I'd recommend passing `keep_in_memory=False` to the calls to `load_dataset` like here:
https://github.com/huggingface/transformers/blob/223943872e8c9c3fc11db3c6e93da07f5177423f/examples/pytorch/language-modeling/run_clm.py#L233
This way you say explicitly that you want your dataset to stay on the disk, and it will be able to recover previously computed results from the cache. | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 106 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
Hi ! Since `datasets` 1.6.0 we no longer keep small datasets (<250MB) on disk and load them in RAM instead by default. This makes data processing and iterating on data faster. However datasets in RAM currently have no way to reload previous results from the cache (since nothing is written on disk). We are working on making the caching work for datasets in RAM.
Until then, I'd recommend passing `keep_in_memory=False` to the calls to `load_dataset` like here:
https://github.com/huggingface/transformers/blob/223943872e8c9c3fc11db3c6e93da07f5177423f/examples/pytorch/language-modeling/run_clm.py#L233
This way you say explicitly that you want your dataset to stay on the disk, and it will be able to recover previously computed results from the cache. | [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | OK, It doesn't look like we can use the proposed workaround - see https://github.com/huggingface/transformers/issues/11801
Could you please add an env var for us to be able to turn off this unwanted in our situation behavior? It is really problematic for dev work, when one needs to restart the training very often and needs a quick startup time. Manual editing of standard scripts is not a practical option when one uses examples.
This could also be a problem for tests, which will be slower because of lack of cache, albeit usually we use tiny datasets there. I think we want caching for tests.
Thank you. | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 104 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
OK, It doesn't look like we can use the proposed workaround - see https://github.com/huggingface/transformers/issues/11801
Could you please add an env var for us to be able to turn off this unwanted in our situation behavior? It is really problematic for dev work, when one needs to restart the training very often and needs a quick startup time. Manual editing of standard scripts is not a practical option when one uses examples.
This could also be a problem for tests, which will be slower because of lack of cache, albeit usually we use tiny datasets there. I think we want caching for tests.
Thank you. | [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | Hi @stas00,
You are right: an env variable is needed to turn off this behavior. I am adding it.
For the moment there is a config parameter to turn off this behavior: `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None`
You can find this info in the docs:
- in the docstring of the parameter `keep_in_memory` of the function [`load_datasets`](https://huggingface.co/docs/datasets/package_reference/loading_methods.html#datasets.load_dataset):
- in a Note in the docs about [Loading a Dataset](https://huggingface.co/docs/datasets/loading_datasets.html#from-the-huggingface-hub)
> The default in 🤗Datasets is to memory-map the dataset on drive if its size is larger than datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES (default 250 MiB); otherwise, the dataset is copied in-memory. This behavior can be disabled by setting datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None, and in this case the dataset is not loaded in memory. | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 115 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
Hi @stas00,
You are right: an env variable is needed to turn off this behavior. I am adding it.
For the moment there is a config parameter to turn off this behavior: `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None`
You can find this info in the docs:
- in the docstring of the parameter `keep_in_memory` of the function [`load_datasets`](https://huggingface.co/docs/datasets/package_reference/loading_methods.html#datasets.load_dataset):
- in a Note in the docs about [Loading a Dataset](https://huggingface.co/docs/datasets/loading_datasets.html#from-the-huggingface-hub)
> The default in 🤗Datasets is to memory-map the dataset on drive if its size is larger than datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES (default 250 MiB); otherwise, the dataset is copied in-memory. This behavior can be disabled by setting datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None, and in this case the dataset is not loaded in memory. | [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | Yes, but this still requires one to edit the standard example scripts, so if I'm doing that already I just as well can add `keep_in_memory=False`.
May be the low hanging fruit is to add `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` env var to match the config, and if the user sets it to 0, then it'll be the same as `keep_in_memory=False` or `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0`? | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 58 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
Yes, but this still requires one to edit the standard example scripts, so if I'm doing that already I just as well can add `keep_in_memory=False`.
May be the low hanging fruit is to add `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` env var to match the config, and if the user sets it to 0, then it'll be the same as `keep_in_memory=False` or `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0`? | [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | @stas00, however, for the moment, setting the value to `0` is equivalent to the opposite, i.e. `keep_in_memory=True`. This means the max size until which I load in memory is 0 bytes.
Tell me if this is logical/convenient, or I should change it. | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 42 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
@stas00, however, for the moment, setting the value to `0` is equivalent to the opposite, i.e. `keep_in_memory=True`. This means the max size until which I load in memory is 0 bytes.
Tell me if this is logical/convenient, or I should change it. | [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | In my PR, to turn off current default bahavior, you should set env variable to one of: `{"", "OFF", "NO", "FALSE"}`.
For example:
```
MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=
``` | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 26 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
In my PR, to turn off current default bahavior, you should set env variable to one of: `{"", "OFF", "NO", "FALSE"}`.
For example:
```
MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=
``` | [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | IMHO, this behaviour is not very intuitive, as 0 is a normal quantity of bytes. So `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` to me reads as don't cache ever.
Also "SIZE_IN_BYTES" that can take one of `{"", "OFF", "NO", "FALSE"}` is also quite odd.
I think supporting a very simple `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` that can accept any numerical value to match the name of the variable, requires minimal logic and is very straightforward.
So if you could adjust this logic - then `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` is all that's needed to not do in-memory datasets.
Does it make sense? | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 89 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
IMHO, this behaviour is not very intuitive, as 0 is a normal quantity of bytes. So `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` to me reads as don't cache ever.
Also "SIZE_IN_BYTES" that can take one of `{"", "OFF", "NO", "FALSE"}` is also quite odd.
I think supporting a very simple `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` that can accept any numerical value to match the name of the variable, requires minimal logic and is very straightforward.
So if you could adjust this logic - then `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` is all that's needed to not do in-memory datasets.
Does it make sense? | [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | I understand your point @stas00, as I am not very convinced with current implementation.
My concern is: which numerical value should then pass a user who wants `keep_in_memory=True` by default, independently of dataset size? Currently it is `0` for this case. | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 41 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
I understand your point @stas00, as I am not very convinced with current implementation.
My concern is: which numerical value should then pass a user who wants `keep_in_memory=True` by default, independently of dataset size? Currently it is `0` for this case. | [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | That's a good question, and again the normal bytes can be used for that:
```
MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=1e12 # (~2**40)
```
Since it's unlikely that anybody will have more than 1TB RAM.
It's also silly that it uses BYTES and not MBYTES - that level of refinement doesn't seem to be of a practical use in this context.
Not sure when it was added and if there are back-compat issues here, but perhaps it could be renamed `MAX_IN_MEMORY_DATASET_SIZE` and support 1M, 1G, 1T, etc.
But scientific notation is quite intuitive too, as each 000 zeros is the next M, G, T multiplier. Minus the discrepancy of 1024 vs 1000, which adds up. And it is easy to write down `1e12`, as compared to `1099511627776` (2**40). (`1.1e12` is more exact).
| Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 127 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
That's a good question, and again the normal bytes can be used for that:
```
MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=1e12 # (~2**40)
```
Since it's unlikely that anybody will have more than 1TB RAM.
It's also silly that it uses BYTES and not MBYTES - that level of refinement doesn't seem to be of a practical use in this context.
Not sure when it was added and if there are back-compat issues here, but perhaps it could be renamed `MAX_IN_MEMORY_DATASET_SIZE` and support 1M, 1G, 1T, etc.
But scientific notation is quite intuitive too, as each 000 zeros is the next M, G, T multiplier. Minus the discrepancy of 1024 vs 1000, which adds up. And it is easy to write down `1e12`, as compared to `1099511627776` (2**40). (`1.1e12` is more exact).
| [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | Great! Thanks, @stas00.
I am implementing your suggestion to turn off default value when set to `0`.
For the other suggestion (allowing different metric prefixes), I will discuss with @lhoestq to agree on its implementation. | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 35 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
Great! Thanks, @stas00.
I am implementing your suggestion to turn off default value when set to `0`.
For the other suggestion (allowing different metric prefixes), I will discuss with @lhoestq to agree on its implementation. | [
-0.2158486694,
0.0203109235,
0.0422427356,
0.140415296,
0.1821745038,
0.0462313406,
0.1409807801,
0.3139567971,
0.0551588237,
-0.0644534901,
-0.2359383404,
-0.0579473227,
-0.0247007441,
-0.3315779269,
-0.1081902683,
0.01980526,
0.2144650817,
0.0230759755,
-0.1678414047,
-0.040968895,
-0.1443585455,
0.2673946321,
-0.1282917261,
-0.2286375165,
-0.6212522388,
0.1536581814,
-0.0539874658,
-0.0578288883,
-0.1436337084,
-0.3942034245,
0.3681198657,
0.2826850414,
0.1136954576,
0.4599286914,
-0.00012043,
0.1595690101,
0.2031689137,
0.0211554281,
-0.4104934931,
-0.0573552512,
0.0354542769,
-0.0839592665,
0.021498559,
0.1640308052,
-0.2790544927,
-0.0306375809,
0.1911178231,
-0.5746432543,
0.4524192512,
0.343296349,
0.1602972746,
0.5254043341,
-0.1487578154,
-0.0378798544,
-0.0608341321,
-0.0301155783,
-0.3328551352,
0.0926358923,
0.1314036399,
0.0842167661,
-0.2770287097,
0.3524882495,
0.0979853868,
-0.0218211748,
0.1613364667,
0.0107816663,
-0.1585709602,
0.0202848036,
0.2987550199,
0.107061848,
0.3787645698,
-0.2141121924,
-0.5825325847,
-0.3364525735,
-0.3538716733,
0.0064527732,
0.3440108299,
-0.0655078143,
0.1379140466,
0.3956797123,
-0.4331495166,
-0.0684467182,
0.0699942112,
-0.0044333343,
0.0611455105,
0.206685707,
-0.1162462384,
-0.09949404,
0.1231022179,
0.1499092877,
0.1937526911,
-0.1635283083,
-0.1091247797,
0.2992787659,
-0.3559891284,
-0.0108129177,
0.1666994244,
0.0396616049,
0.0110875396,
0.1188241094,
0.0640141144,
0.1364049017,
0.0925285891,
-0.2549794018,
-0.0728774443,
0.5833616257,
0.1947102398,
0.2663052976,
0.0184179936,
0.0475956164,
-0.1567291617,
-0.0962337628,
-0.044799488,
-0.2194099426,
0.2228745371,
-0.0724639073,
0.1600193828,
-0.1779887825,
-0.0083684064,
0.1688309759,
0.0522615612,
-0.1071199328,
0.1425202489,
0.2979216874,
-0.1997741312,
0.2688976228,
-0.0717917457,
-0.1660918593,
-0.2827946544,
0.0425895452,
-0.3636681736,
-0.0625567064,
-0.2846520841,
0.2555701137,
0.2676335871,
-0.3724181354,
0.4367185533,
0.1324851215,
0.2268449962,
0.0182677191,
0.0358225666,
-0.1124995947,
0.3517662287,
0.1498366594,
-0.4831207097,
0.410464555,
0.0979267359,
0.1543204784,
-0.280134052,
-0.0345046744,
-0.1624662727,
-0.2589810193,
0.1788690239,
0.0967070311,
-0.4759323001,
-0.2851255834,
0.1238626689,
0.2492317408,
0.3530566394,
-0.182639733,
0.0576877445,
-0.0546473637,
-0.310860008,
-0.0424192213,
0.2072170228,
0.6110783219,
-0.09871912,
-0.2701895535,
0.3160685897,
0.0783185139,
0.1078270972,
0.2469792813,
-0.1151804626,
-0.2041630298,
-0.0944093317,
-0.0451541208,
0.2127513289,
-0.2799162567,
-0.6564029455,
0.0895091444,
0.0316259339,
0.278686434,
0.0627192035,
-0.0304138511,
0.1169165596,
-0.2188136876,
-0.1698887199,
0.1760188937,
0.0873951167,
0.110323526,
-0.4886097014,
-0.3197337091,
0.0049683764,
0.0149406064,
0.1607400775,
0.142574355,
-0.2066913396,
0.1983792484,
0.0647580102,
0.1064673141,
0.238235265,
0.4176748693,
-0.0577851757,
-0.2508042157,
0.2393510789,
-0.2066843361,
-0.467990607,
0.3813742399,
-0.058200039,
0.1504364014,
0.0513899215,
-0.0919353291,
-0.3147407174,
-0.1900457442,
-0.3224793971,
-0.4129860401,
0.0291998219,
0.0835615322,
0.4664491713,
-0.0627888814,
-0.2708916962,
0.4161112309,
0.1776853651,
0.2026192248,
-0.1979152411,
-0.036707215,
-0.0714994296,
-0.1292345822,
-0.3720751405,
-0.0548153892,
0.1507512629,
-0.2703868151,
-0.1646062881,
0.4357373118,
-0.054974664,
0.1264849007,
-0.0163793843,
0.2787241042,
0.1310153455,
0.209483996,
0.1261973828,
0.1861442626,
-0.1718522906,
-0.0207075682,
-0.0400914103,
0.3744084835,
0.1988713294,
0.2121003121,
0.1096511111,
-0.0578964315,
-0.0523810796,
0.02003612,
-0.0271951742,
-0.3291667402,
0.2592808008,
-0.0970330536,
0.6289584041,
0.191528067,
0.0682515875,
0.2737975717,
0.7349140644,
0.1994312555,
-0.2323369682,
0.1495768279,
-0.2541773915,
-0.3552417457,
0.1600754857,
0.2808412313,
0.3655431867,
0.0967630148,
0.4016495049,
0.1217315122,
-0.0592813827,
-0.0925820395,
0.1318966597,
-0.1037679464,
0.036556378,
-0.0743079707,
0.0565556102,
0.2631290555,
-0.3260218203,
0.1360273212,
0.0117202392,
0.1084351391,
-0.1194188148,
0.2409163117,
-0.336722225,
0.2784648538,
-0.1354537159,
-0.1432010531,
-0.3787071109,
-0.203541711,
-0.0489368178,
0.1152366623,
-0.0025186804,
0.3248541653,
-0.256709367,
0.1713043451,
-0.0361293368,
-0.3038980663,
-0.496830821,
-0.1464487463,
-0.2653333843,
-0.0522760861,
-0.0077606048,
-0.3781482875,
-0.0417968109,
-0.1704155654,
-0.2427745014,
-0.1978736073,
-0.329761982,
0.1543191224,
-0.0725530162,
-0.028923573,
-0.0718470886,
0.0568932965,
-0.1304772794,
0.0907302797,
0.1732175499,
-0.3506851792,
-0.1693695635,
-0.0369206853,
0.0841069371,
0.1431047618,
-0.2130723149,
-0.2104904056,
0.00770638,
-0.279115051,
0.1315923333,
-0.1691374779,
-0.0363108888,
0.5730288029,
0.0180481169,
0.0493542254,
-0.1541989446,
0.1935799122,
-0.2817361653,
-0.5460475683,
0.4480658174,
-0.006834622,
-0.3691210747,
-0.1439014375,
0.0137627078,
0.1789386421,
0.3921637237,
-0.1815631688,
-0.2465930581,
-0.3960889876,
0.001106562,
0.2109923065,
0.065863654,
0.6789278984,
-0.0120128151,
-0.0564475805,
-0.2156408727,
-0.1154806316,
0.1403701901,
-0.1744908392,
0.3218704462,
-0.2863911986,
0.1133488715,
0.2614365816,
0.6822907329,
0.2117649168,
-0.0542891622,
0.2297441512,
0.2226075083,
0.483584255,
-0.3701801896,
-0.2817358673,
-0.0303611364,
-0.2276446074,
0.0423182361,
0.1051365435,
0.285408318,
0.1345895082,
-0.1757141203,
0.0838289708,
0.0781061351,
-0.281355083,
0.0397143699,
-0.3440361619,
0.3322950304,
0.4198824763,
0.3526899219,
-0.2939575016,
-0.0616108552,
0.0850310773,
0.1677764803,
0.2416333556,
0.161315769,
-0.1308392435,
0.6268690825,
-0.7827768326,
0.2176954448,
-0.0210798867,
0.2715782225,
0.1171681359,
-0.2589392364,
0.0737982988,
-0.0793791711,
0.4684255421,
0.034529157,
-0.0915623829,
0.0898291394,
-0.2584152222,
-0.3263618648,
-0.067605108,
0.0506653935,
0.0655270144,
0.523058176,
0.3059910238,
-0.2612778842,
-0.5721395016,
-0.0025242378,
0.0265633818,
0.0670711398,
-0.0700508803,
-0.3095417321,
-0.0107316663,
-0.0510094389,
-0.0454557091,
0.2116694599,
0.0512174442,
0.0097733503,
0.2060351223,
-0.2357091606,
-0.0749703646,
0.11236348,
0.0876083747,
0.2482483983,
-0.1353748739,
0.2141055763,
0.3516710401,
0.0993541926,
-0.1307244897,
0.377035141,
-0.1581926942,
-0.5206752419,
-0.0382084474,
0.2025383711,
-0.1003959402,
0.3610545397,
-0.1493228674,
-0.0494242795,
0.1187868342,
0.0308992062,
-0.0949647576,
0.345708102,
0.2662644386,
0.1549057662,
-0.3207556903,
-0.4492102861,
0.4268123806,
0.0861392543,
-0.0303660538,
0.3022579849,
0.3320180774,
-0.188754946,
0.1381395906,
-0.0381239131,
0.7185451388,
0.1204462945,
0.3983497918,
0.1804790497,
-0.1022649109,
0.4165362716,
0.1965264827,
0.2679466307,
-0.1517042816,
-0.3694928288,
0.0400470756,
-0.0396895185,
0.0779863074,
0.1464402676,
-0.0772886202,
0.3025547266,
0.1651714295,
0.2353437096,
0.1526457965,
0.1048943922,
-0.1742328852,
-0.0978282988,
-0.0854356512,
0.1495160311,
-0.0977483392,
0.352014482,
-0.0446071886,
-0.0288664252,
0.022839075,
-0.312212497,
-0.1936958134,
0.0801446512,
-0.4066698849,
0.1365056038,
0.3283131123,
-0.3234780133,
0.100186266,
0.0218601711,
0.4756086767,
-0.1211264431,
-0.1954515874,
0.2320105135,
-0.1895306706,
0.1707836688,
0.1086138114,
-0.1773972511,
0.385437727,
0.1122100502,
0.037697304,
-0.3645130396,
-0.2503794432,
-0.4268317819,
0.1346518397,
0.0056337095,
-0.1293732077,
-0.2019222975,
0.0396192633,
0.057724271,
-0.1295119822,
-0.21135436,
0.1154869944,
0.0673517287,
0.0494732521,
0.0662551075,
-0.1544150412,
-0.2119869441,
-0.176406309,
0.626465559,
-0.1077432483,
-0.5085909367,
0.460670948,
-0.0396039076,
-0.2720076442,
-0.0072723581,
-0.2138534784,
0.2910131216,
-0.5071918964,
0.2666520476,
-0.0812652186,
-0.3147021532,
0.0867410675,
0.1454059184,
0.0332268104,
-0.063296698,
-0.2446780652,
0.0686210096,
-0.5114697814,
0.0086053433,
-0.2004598826,
0.2193789929,
-0.0729593635,
0.0024337978,
-0.0114567382,
0.1509162337,
-0.2475846559,
0.0313372947,
0.0655499771,
-0.020034356,
0.0715787038,
-0.4475182891,
0.519418478,
-0.2106148899,
-0.0788262263,
0.0893335417,
-0.3692189157,
-0.1395171881,
-0.2798084915,
0.1558232009,
0.0201898906,
-0.0632978156,
-0.1017560139,
0.2242701501,
-0.1317823231,
-0.3850981295,
0.2663278878,
0.4267377853,
-0.0859409198,
0.2177351564,
0.1543671936,
0.2008512169,
0.1570764631,
-0.1120453924,
-0.1153179556,
0.0805330276,
0.0798638314,
0.2323436737,
0.0232998021,
0.0737445951,
-0.0667180419,
0.0598420165,
0.2692275345,
-0.0168120563,
0.2843047678,
-0.2442565709,
-0.1633826196,
0.176594466,
0.2694582343,
0.2560468912,
0.2352304757,
-0.3531940281,
0.0514986739,
0.1367588639,
-0.0665065274,
-0.0913145244,
0.2504136264,
0.1206495017,
0.160510093,
0.0472540222,
0.0817921385,
0.1953168213,
0.5193353891,
0.2348037064,
0.5798426867,
-0.2966856956,
0.3942885995,
0.1455291808,
0.3598192632,
0.1383571178,
0.6228570342,
0.059275955,
0.0088253738,
0.0637839586,
-0.184096992,
0.445197612,
-0.1497718692,
0.2619172037,
-0.1469973475,
-0.2622158527,
-0.1380574405,
0.0083397441,
-0.1496462971,
0.2342555374,
-0.1990002245,
0.3088903129,
-0.2092136443,
-0.1399447322,
-0.1402633935,
0.0096943006,
-0.1827801764,
-0.3270059228,
0.2731035948,
0.0293131862,
-0.025441939,
0.0349011198,
-0.0406330116,
0.0132084293,
0.3504337072,
-0.1268635988,
0.0577685572,
-0.2136364877,
-0.1655309051,
-0.0869895071,
0.3347527683,
-0.0947559699,
0.3914242983,
-0.1091879308,
-0.1141858697,
-0.0627324954,
0.5630705357,
0.2443891764,
0.2078852952,
0.0332925245,
0.1316380799,
-0.1075237915,
-0.0311997961,
-0.1029128581,
0.3895375729,
-0.0637682527,
-0.1537948549,
0.0288897064,
0.0281647369,
-0.0744892582,
0.0483429432,
-0.4329918027,
0.0131909996,
-0.2983935177,
0.5955237746,
-0.1327138692,
-0.2584170699,
-0.0577879921,
0.1808202565,
-0.1852998734,
0.1427331418,
0.1971942335,
-0.1472712308,
0.0389882959,
-0.2511452436,
0.0460631102,
0.2118886113,
0.5874788165,
0.4427197278,
0.0371642672,
-0.204915911,
-0.0314138196,
-0.5466334224,
0.0109710079,
0.1660830826,
0.4006887078,
-0.0006393788,
0.0278088655,
-0.1901564598,
0.0617382489,
0.0248270463,
0.1584179848,
-0.0657322928,
-0.1259836257,
-0.3469353318,
0.2608810067,
0.013286191,
0.0004393531,
0.1867111772,
-0.2607450187,
0.086799942,
0.0810846239,
-0.0324986055,
-0.1374961585,
0.0821659118,
0.0162175465,
-0.1607308984,
0.2406504452,
0.3036294878,
-0.0884026438,
0.17020078,
-0.1911835968,
-0.6736297607,
-0.0930991173,
-0.189581424,
-0.0692993775,
-0.1484890729,
0.3655909598,
-0.3894749284,
-0.4164467752,
-0.2334034294,
0.2534013689,
0.1525860727,
-0.0286043771,
-0.1299515069,
-0.0457868427,
-0.1260606498,
0.2234052867,
0.2347220182,
0.4405472279,
-0.0294995103,
0.1446452886,
-0.6241056919,
-0.3679642975,
0.4854189754,
-0.3664085865,
-0.2516691685,
-0.1198853105,
0.1506163776,
0.3509043455,
-0.4559533,
-0.7183161974,
0.0642746761,
0.154393971,
0.046818126,
-0.2576727569,
0.2499379963,
0.0383853093,
0.1265489608,
-0.1445230544,
0.5700886846,
0.2609197497,
-0.1883663535,
-0.0265071653,
-0.1023058519
] |
https://github.com/huggingface/datasets/issues/2377 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather | Hi ! This is because we are actually using the arrow streaming format. We plan to switch to the arrow IPC format.
More info at #1933 | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
| 26 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
Hi ! This is because we are actually using the arrow streaming format. We plan to switch to the arrow IPC format.
More info at #1933 | [
-0.204033345,
0.1602187455,
-0.0240917876,
0.3715009391,
0.148974359,
0.2544103265,
-0.0069091367,
0.5975213647,
-0.516123414,
-0.1188539118,
-0.3667039871,
0.6461248398,
-0.0722651407,
-0.7478834987,
0.0741809383,
0.2550879121,
0.1921529323,
0.102844052,
-0.0828898773,
-0.0657772049,
-0.0897657871,
0.2092616558,
-0.0571897328,
0.2752653658,
-0.3663752675,
-0.0884740427,
0.0842270181,
0.2411668748,
0.0667257309,
-0.3410416543,
0.3246595562,
-0.1335391104,
0.0821229443,
0.173512429,
-0.0001142378,
0.1800326854,
0.3546250463,
-0.1144415662,
-0.2745328844,
0.0962589905,
0.301307559,
0.0216187071,
0.2277007997,
-0.359959662,
0.2159608305,
-0.4508233666,
0.0920100361,
-0.1863127649,
0.4654638469,
0.5436745286,
0.188056156,
0.1298347712,
0.2479707152,
0.1184635907,
0.6443870068,
0.0946036279,
-0.1738113314,
0.6543807983,
-0.1060600653,
-0.1333583593,
-0.2428011596,
-0.0375035405,
-0.2614391446,
-0.0618282035,
-0.0463791117,
0.1491947621,
-0.1361510009,
-0.2698399723,
-0.0836420879,
-0.0086210584,
0.2848904431,
-0.5713866949,
-0.389667958,
0.0149827031,
0.1416035891,
-0.1129796207,
0.2031398267,
0.2324095666,
-0.200864017,
0.2662529349,
0.3600384295,
0.1051339433,
-0.3550492525,
0.1775663495,
0.1963575929,
-0.3350891769,
-0.1383094937,
0.0752854869,
0.1055062935,
0.2164953947,
0.4860535562,
0.0233403202,
-0.1866554916,
-0.0319986828,
-0.0597096905,
0.1197859347,
-0.0345685408,
0.0261295624,
0.1266892254,
0.2536792755,
0.3568299413,
0.0311269015,
-0.0248766877,
0.2956559956,
-0.2425468117,
-0.2075382322,
-0.0120288376,
-0.2447334528,
0.484991014,
-0.0072270199,
-0.1094051525,
-0.1298021525,
0.087342374,
-0.1138178334,
0.3794026971,
-0.2756098509,
0.3993116021,
-0.1765917391,
-0.43215096,
0.0621130094,
-0.1248619109,
0.1126480997,
-0.0811193064,
0.2452443838,
0.0682344809,
-0.134880349,
0.1660973281,
0.4020652473,
-0.1224161461,
-0.3004592359,
-0.0893307552,
-0.0793374404,
0.1035904363,
0.0683883727,
0.1880318671,
-0.2568870187,
0.223765865,
0.1502271742,
0.0028201996,
0.0867315531,
-0.0153812859,
-0.3452115655,
0.0290861819,
0.1992775798,
0.1487946361,
0.2066224664,
0.0915317163,
-0.2093016505,
-0.123040393,
0.1477117091,
-0.2002524287,
-0.0906479731,
-0.2770586908,
0.1281216145,
0.0046727001,
-0.0147557212,
-0.6079194546,
-0.0893438235,
0.0797854885,
-0.3689201772,
0.0663041547,
-0.2139709443,
0.2391681373,
-0.5171179175,
0.1966969073,
0.1987008452,
-0.4703055918,
0.3383231461,
-0.1878841519,
-0.1323551536,
0.169974193,
0.2364610434,
-0.1800810695,
-0.0397697054,
-0.3184486628,
0.3659441173,
0.6282647252,
-0.2115263939,
-0.5290194154,
0.0265540481,
0.0094443643,
-0.092477262,
0.1212491319,
0.1006610915,
0.1923575103,
-0.0783826485,
0.0730787665,
0.1113946438,
0.1752781123,
-0.0964543447,
-0.4493742883,
0.0013989712,
-0.1251826882,
0.0139611755,
-0.3602589667,
-0.2302973121,
0.4638053775,
-0.3822006881,
0.3907344043,
0.015933603,
0.2205719352,
0.1957496405,
0.3198069632,
-0.051800862,
-0.0862395987,
-0.1210417673,
-0.3550289273,
0.0492106266,
0.0426890366,
-0.2842831314,
-0.3007984757,
-0.3553683162,
-0.0504072607,
0.0846613497,
-0.1455824077,
0.0046240897,
0.1144099161,
-0.0577396415,
0.1321228594,
0.4265020192,
-0.1304387897,
-0.077421762,
-0.1839459836,
0.1863156259,
0.0773608536,
0.3832539916,
-0.1710476577,
-0.425255686,
0.054678224,
-0.0013698319,
-0.0663409904,
-0.0181769803,
-0.163592279,
0.4444544911,
-0.1048484445,
-0.0027794938,
0.1065696403,
0.002723142,
0.0258761719,
-0.4440296888,
0.0702935681,
0.2675186396,
0.2114115357,
0.114754267,
-0.161866188,
0.402580142,
0.2345503867,
-0.0526556969,
-0.0595328361,
-0.0763814375,
0.2920066714,
0.1740583032,
0.0049439147,
0.092657797,
-0.0624663606,
0.0698853359,
0.403308481,
-0.2243362963,
-0.293695271,
0.1701294184,
0.4582484961,
0.1070466116,
0.2035186291,
0.1900099218,
-0.458040446,
-0.0727927163,
0.2644940019,
0.0998545289,
0.3613568246,
0.2305189967,
0.1219336614,
-0.1843563765,
-0.3392295539,
-0.2428062409,
0.1225640178,
0.1036587358,
0.300548315,
0.2048086375,
0.3009167612,
-0.0272122305,
-0.5037738681,
-0.1916364282,
-0.0973268002,
0.0238300078,
-0.2101463377,
0.2568070292,
-0.2381263077,
-0.3353671134,
-0.2172451466,
-0.124832809,
-0.1586040705,
-0.3103270829,
-0.036553245,
0.5780174732,
0.0232730079,
-0.1116035953,
-0.15079391,
-0.0620745085,
0.2144188881,
-0.1583543271,
-0.3896925449,
0.0800496861,
-0.5274574161,
0.0443884954,
0.3925109208,
-0.0837988704,
0.3802197576,
0.1537794024,
0.1395401508,
-0.4493103325,
0.0021022167,
-0.1122933924,
-0.2809177339,
0.4190345109,
-0.3382552862,
0.1093487218,
-0.2637508214,
-0.0891235918,
0.1717898995,
-0.0154296858,
-0.1937984526,
0.125768289,
0.0371738635,
-0.0071289311,
-0.0095252702,
-0.1934446543,
-0.1541960239,
-0.342751354,
0.2794510722,
-0.0502472632,
0.0650001913,
-0.0202809889,
0.2540158331,
0.4780291617,
0.0682369918,
0.0917005017,
0.0518787913,
-0.1818200052,
0.7161718607,
-0.1722094119,
-0.3640956283,
0.163356781,
-0.0550006814,
0.1100773588,
0.0610598959,
-0.5219791532,
-0.2839546502,
-0.0068109715,
0.6309648156,
-0.0663887486,
-0.0105875656,
0.1917035431,
0.0353513584,
-0.0799476355,
-0.0474483371,
0.0840426385,
-0.1530013531,
0.0323281959,
0.0995264053,
-0.1042971611,
0.3168240488,
-0.0642554834,
0.6338437796,
0.1460450441,
0.0935228989,
0.538261354,
-0.3165525794,
0.3479830623,
-0.1960763484,
-0.0964331627,
-0.3640477359,
-0.3192086816,
0.0621136278,
0.0054773944,
0.0595305189,
-0.1623477936,
0.1042287052,
0.018826453,
-0.3889210224,
-0.3310845196,
0.1735130101,
-0.1545098275,
-0.1018871367,
-0.034069553,
0.1319406331,
0.3461709917,
-0.2330644876,
0.1495909691,
0.3263343573,
0.1793848872,
0.1115911007,
0.1782160252,
-0.198720172,
-0.3324723542,
0.2440049052,
-0.0607049018,
0.1120345965,
0.0934567377,
-0.1182399318,
0.2939034104,
-0.1168985814,
0.5011331439,
0.1405365914,
-0.0242127925,
0.270257473,
0.2670385838,
-0.6215154529,
-0.0747948736,
-0.0314127617,
0.0143585177,
-0.0601670891,
0.2260793597,
-0.0339014642,
0.0088194273,
-0.187679559,
0.2643364668,
-0.0638044626,
0.1802324951,
-0.214540571,
-0.2797142267,
-0.2812091708,
-0.0233745072,
0.1515545845,
-0.0318395309,
-0.2828216255,
-0.2102070302,
-0.2041366696,
-0.2065012157,
0.0623887517,
0.1213790327,
0.3808790445,
-0.2450422347,
0.1007574052,
-0.0931306034,
-0.0102143623,
0.5208442807,
0.5118019581,
0.2257419676,
-0.4611843228,
-0.1422623694,
-0.1319178641,
0.0384695418,
0.1068287194,
-0.2773244381,
-0.0265362915,
-0.2617265284,
-0.1741290241,
0.0648768842,
0.0540834256,
0.257291466,
-0.3083183467,
-0.0706755519,
-0.0182438754,
0.7317119241,
0.1117015854,
0.083665669,
0.2863130271,
0.3211806118,
-0.1072593927,
0.4641643465,
0.2122834921,
0.7479273677,
0.0431379601,
0.464358896,
0.5308563709,
-0.2122959495,
0.0160338785,
-0.1649823636,
0.1785255075,
-0.3695943058,
-0.0326737538,
-0.0299426951,
0.0134264883,
-0.1000159979,
0.0142354183,
0.0010388782,
-0.0607742891,
0.0199610386,
0.0011285149,
-0.0676588193,
-0.1116180271,
-0.2184181511,
-0.0588074178,
-0.135392949,
0.1330666393,
0.0535560735,
-0.0894671232,
0.1921916008,
-0.3127533197,
-0.5645930171,
0.0088158781,
-0.1491818726,
0.1572378427,
-0.1951978356,
0.4169199467,
-0.1762772053,
-0.591145277,
-0.130322054,
0.2761574686,
-0.2100260407,
-0.2087076455,
-0.112874411,
-0.138305828,
0.3252480626,
-0.1204837337,
-0.1416928023,
-0.2638708353,
0.3116107583,
-0.0208357535,
0.0903756991,
0.1997550726,
-0.0059992606,
-0.2222361416,
0.2424610257,
0.1891069114,
0.2453872859,
-0.1029239148,
-0.1039517596,
-0.3850194514,
-0.3170558512,
-0.2708206773,
0.1112982482,
0.0607353449,
0.1559604406,
-0.002987837,
-0.0495333858,
-0.0772051066,
0.0608416907,
0.5257677436,
-0.1084992364,
0.1239104941,
0.3488389552,
-0.2154363543,
-0.24444969,
-0.1800950617,
0.3286754489,
0.0323289223,
-0.7142596841,
0.3077316582,
-0.0378187336,
0.3314643204,
-0.2094838619,
-0.1696857214,
0.1757104397,
-0.2275859267,
-0.2607496679,
-0.3319695592,
-0.3052559793,
0.2826493084,
0.1260707378,
0.0277666003,
0.1368634254,
-0.2062248737,
0.1197326779,
-0.2620997727,
-0.232812494,
0.1825926602,
0.2293157727,
-0.0286843125,
-0.001306396,
0.12938416,
0.2112013847,
0.0492570661,
0.1066417247,
0.2611011863,
0.0131676169,
-0.207766071,
-0.0308490712,
0.1410414577,
0.0917199478,
-0.0365271121,
-0.0383392014,
-0.2797231376,
-0.0027394982,
-0.1004420817,
-0.1471172869,
-0.1317086518,
-0.0407160744,
-0.0580727085,
0.4979650676,
0.2660638094,
-0.0053355922,
0.0013510749,
-0.1619921476,
0.1802116036,
-0.1033187658,
0.0690187141,
-0.1313321441,
-0.0996304974,
-0.3911685944,
-0.0428951792,
-0.1632250547,
0.0117554003,
0.2443060577,
-0.2647139728,
-0.1916571558,
0.0381720513,
0.2037822455,
0.4649303257,
-0.1592676044,
-0.1972119063,
0.3094662428,
0.1419488937,
-0.0694745332,
-0.0542083308,
-0.0278009735,
-0.1513533443,
-0.110650301,
-0.0502442047,
-0.0706548467,
-0.0053176531,
-0.1682128608,
-0.0643656179,
0.0870014057,
-0.1888094842,
-0.0426290482,
0.2759281695,
0.142425105,
0.150259003,
0.2690135837,
-0.0499709956,
0.3420373797,
0.5846757293,
-0.0860494152,
0.2105796933,
0.2341169417,
-0.1995136142,
-0.1195699424,
-0.2119223177,
-0.2484054416,
-0.3364699483,
0.0029922742,
0.2138612121,
0.2108574808,
0.6503987908,
0.1061396599,
-0.1071250588,
0.039161738,
0.1595211923,
-0.0988774374,
0.1020454615,
0.0903358757,
-0.0435120352,
0.1965126693,
0.073773928,
-0.3059619367,
-0.2051435113,
0.1116174236,
0.3435762525,
-0.1187390462,
-0.0592507049,
0.1965910494,
0.1987668425,
0.2077501565,
-0.0424805544,
0.0357107408,
0.2661929429,
0.0226391256,
-0.2092640996,
-0.0500581041,
0.4795773625,
0.0533769503,
-0.0390315242,
0.1192434952,
-0.0269424096,
-0.0728558674,
-0.0308473092,
0.0892176256,
0.2304476947,
0.2329434752,
0.2975414395,
0.1788154244,
-0.1063543931,
-0.0122931888,
-0.1355466992,
0.1412943304,
0.0330217928,
0.2003348172,
-0.2876666188,
-0.398026228,
-0.2061076313,
-0.2261143327,
-0.0600928254,
0.1351623833,
0.3732070625,
-0.0087249558,
-0.0343862958,
-0.0231072549,
0.0742298737,
-0.0843385682,
0.2900454998,
0.4074525833,
0.0998023525,
-0.1530340463,
-0.0733733773,
-0.4634936452,
0.175820604,
-0.1239107251,
0.117874667,
-0.0990303084,
0.2496946454,
0.0420529768,
0.0901106969,
0.153499037,
-0.234108299,
0.2216780931,
0.5094463825,
-0.2163202465,
-0.0703231171,
-0.0387988165,
-0.0673304796,
-0.0695791841,
-0.4108841121,
0.2714143097,
-0.1225954667,
0.1092187241,
-0.0908554196,
-0.1614264101,
0.1238616928,
0.2390543967,
0.6692216992,
-0.1242609918,
0.2127549052,
-0.0750221834,
-0.0866603181,
-0.300046593,
0.0526146553,
-0.0731734335,
0.1781777889,
0.0002241073,
0.5266051292,
-0.0404524058,
-0.3038600683,
-0.1741481572,
0.3072148561,
-0.0574831814,
-0.0235129893,
-0.0527945943,
0.0384702422,
-0.1573578119,
0.1157291979,
-0.0578010008,
0.0271866713,
0.0116743017,
0.2189774066,
-0.4629122317,
-0.6108027101,
0.4128867984,
-0.3112292588,
-0.0361098722,
0.2989270091,
0.427426368,
0.2502655387,
0.0931094959,
-0.3529935181,
-0.1512596905,
0.475854069,
-0.2447625548,
-0.235105738,
0.2724817395,
0.0116762491,
0.1664250344,
-0.0315091275,
0.5087145567,
0.0213005543,
-0.2097076029,
0.0494026393,
-0.4608905315
] |
https://github.com/huggingface/datasets/issues/2373 | Loading dataset from local path | Version below works, checked again in the docs, and data_files should be a path.
```
ds = datasets.load_dataset('my_script.py',
data_files='/data/dir/corpus.txt',
cache_dir='.')
``` | I'm trying to load a local dataset with the code below
```
ds = datasets.load_dataset('my_script.py',
data_files='corpus.txt',
data_dir='/data/dir',
cache_dir='.')
```
But internally a BuilderConfig is created, which tries to use getmtime on the data_files string, without using data_dir. Is this a bug or am I not using the load_dataset correctly?
https://github.com/huggingface/datasets/blob/bc61954083f74e6460688202e9f77dde2475319c/src/datasets/builder.py#L153 | 21 | Loading dataset from local path
I'm trying to load a local dataset with the code below
```
ds = datasets.load_dataset('my_script.py',
data_files='corpus.txt',
data_dir='/data/dir',
cache_dir='.')
```
But internally a BuilderConfig is created, which tries to use getmtime on the data_files string, without using data_dir. Is this a bug or am I not using the load_dataset correctly?
https://github.com/huggingface/datasets/blob/bc61954083f74e6460688202e9f77dde2475319c/src/datasets/builder.py#L153
Version below works, checked again in the docs, and data_files should be a path.
```
ds = datasets.load_dataset('my_script.py',
data_files='/data/dir/corpus.txt',
cache_dir='.')
``` | [
-0.363489449,
0.2240850776,
0.0534441322,
0.4514978528,
0.1415302753,
-0.120705992,
0.4987969398,
0.0649359003,
0.1139451861,
0.1279035211,
0.1670623124,
0.116478838,
-0.0000267204,
0.1618969738,
0.2033522278,
0.2234761715,
-0.0005673284,
0.076843597,
-0.156112045,
-0.0686447993,
-0.2324314117,
0.1196477115,
-0.0156469326,
0.187180534,
-0.3966725767,
0.3161482811,
0.0041333116,
0.6595540047,
0.0201507173,
-0.1594539583,
0.4635253847,
-0.0194132421,
0.2626408935,
0.6896223426,
-0.0001233973,
0.3195055425,
0.4197117686,
-0.1370546222,
-0.4451926947,
-0.3630020022,
-0.3213690519,
-0.1205847636,
0.2730470002,
-0.1177718341,
-0.3139305711,
0.1684602499,
0.1296429634,
-0.4796314836,
0.1251051873,
0.351261884,
0.0864336044,
0.1955179274,
-0.4008835554,
-0.0074886153,
0.0875305608,
0.4546239078,
0.0039397925,
0.2868139744,
0.2027193755,
-0.0509556942,
0.0403104126,
-0.1094473526,
-0.1145520583,
0.1670666635,
0.7290756702,
0.2044696212,
0.2462955862,
0.1195370778,
0.1271799207,
0.2097668648,
0.8114515543,
-0.2189273387,
-0.3567316532,
-0.3475877643,
-0.2959794998,
-0.1321895272,
0.2913792729,
0.1959008276,
-0.3283091486,
0.1550275385,
-0.2826428711,
-0.1759109646,
-0.0385546833,
0.3217870295,
0.0216449723,
0.2445594966,
-0.1323623657,
0.2320984751,
-0.1640595198,
0.0989939794,
0.3219019175,
-0.3972790539,
-0.0250573922,
0.2357770801,
0.1988210678,
0.3457134962,
0.04927665,
0.4159117937,
-0.0402158797,
0.0188085958,
-0.0486784279,
0.0319595672,
-0.0594863258,
0.1328590959,
0.4287556112,
0.0450415872,
0.1661294997,
0.1457969695,
0.1568095833,
0.0159143843,
-0.1326693892,
-0.1107087061,
-0.0979728252,
-0.4574614167,
-0.1004281417,
-0.1933716536,
0.2295648456,
-0.1493963599,
0.0464507714,
-0.2724028826,
0.2526025772,
-0.0867490321,
0.3000947535,
0.3881671727,
-0.1646870375,
-0.1338104308,
-0.0842713565,
0.2251118124,
-0.1790876836,
0.0483150184,
-0.3583277762,
-0.2650710344,
-0.2043488175,
0.0276560988,
-0.047333587,
-0.2438426465,
0.2838293612,
-0.0513348095,
0.1549018472,
-0.1537652165,
-0.1994173974,
0.1364163905,
0.1271741986,
0.3635896444,
-0.2581694126,
0.1701277345,
0.2217474133,
-0.3667538166,
-0.2471633703,
0.2983252406,
-0.3065573275,
-0.5425300002,
0.0149520263,
0.0559001639,
-0.2124391049,
0.0018626075,
-0.0638151467,
-0.1449575275,
0.441324085,
0.011180127,
-0.139673084,
-0.0297439713,
-0.5766783953,
-0.0687705055,
0.29720065,
0.6269581318,
-0.4744592905,
-0.2299793214,
-0.0354948044,
-0.1582821757,
0.1261748672,
0.0954365134,
-0.51795578,
0.5660897493,
-0.275198102,
-0.2663212121,
0.5033832192,
-0.449216634,
-0.1094801947,
0.5727272034,
-0.2467739284,
-0.1474410295,
0.0393460952,
0.1660746485,
-0.1855109036,
-0.1198167801,
0.294033289,
0.4177987874,
-0.0429036319,
0.1091134474,
-0.0920206308,
-0.1166870892,
0.1799335629,
0.1157259345,
-0.0208537038,
0.2262751907,
0.15642187,
-0.1143685728,
0.1603841037,
-0.0202936474,
0.0939986035,
0.2106742263,
-0.2537524998,
0.0658290908,
0.1278433204,
0.1546733081,
-0.5286967158,
0.3985970616,
-0.0480762944,
-0.156933412,
0.069554612,
-0.0701723844,
-0.1584973484,
0.1753198802,
-0.433298707,
0.0715499595,
-0.1169657931,
0.2941358089,
-0.0104165776,
-0.1862040013,
-0.2625555396,
0.0907972082,
-0.0827615708,
0.1009163782,
-0.2276256531,
-0.0032432918,
0.0723079368,
-0.0139830932,
-0.2208838761,
0.1398983002,
0.0464977883,
-0.1580699384,
-0.1367745399,
0.3328722417,
0.1175290942,
0.4391639233,
-0.1691030413,
0.0723801106,
0.0857854784,
0.2635890841,
0.1544681489,
0.0564927869,
0.1003274918,
-0.193791762,
-0.1297208071,
0.2046454996,
-0.1600630283,
0.3911743462,
-0.0227399338,
-0.0961444229,
0.1777774394,
0.0437284447,
-0.1670853794,
-0.0535983108,
-0.0064442805,
0.0601863712,
0.4769271612,
0.280921787,
-0.1788140982,
0.0292529948,
0.0615938343,
-0.0224736948,
-0.0784141719,
0.0449130125,
-0.1692572981,
-0.1153311878,
-0.0713188648,
0.0733583495,
0.3055044711,
0.0455872603,
0.1843349934,
0.0199744757,
0.071400784,
-0.3972023726,
0.1588451564,
0.0964899808,
0.0015544654,
0.1022952721,
-0.2346717119,
-0.2873327732,
-0.1957287639,
0.2077186555,
0.0872740075,
-0.0018092744,
-0.5557534099,
0.2986184061,
-0.337338388,
-0.232200712,
-0.3124392629,
-0.5424561501,
-0.1791621149,
-0.1586727798,
-0.1613503247,
0.1112185419,
-0.0387293696,
-0.0187356286,
-0.0045747068,
0.1716790199,
-0.0236295965,
-0.6744971871,
-0.1274791658,
-0.2660990059,
-0.3435391784,
-0.1125139743,
0.4159897864,
0.0857206732,
-0.0353803858,
-0.3524414003,
-0.0573636219,
-0.1474470943,
0.2198317498,
0.3596021533,
0.093291454,
0.7534447312,
0.188326478,
0.0202101357,
0.2376393527,
0.0874290317,
0.2951363027,
0.1826606989,
0.0183565151,
-0.0442108251,
0.0366414152,
-0.0859251916,
-0.3417371809,
-0.0414707661,
-0.2050754875,
-0.1807594895,
0.1391965747,
0.2741292715,
0.1545014083,
0.6428108215,
0.1556605399,
0.0804976821,
-0.141939804,
0.1903128773,
-0.1223630607,
-0.8258020878,
0.0887812823,
-0.1459877491,
-0.2825870812,
-0.1199321002,
-0.0368200429,
0.1750048399,
-0.1200869456,
-0.3841402233,
0.0165021438,
0.0389106758,
0.193417713,
0.3129931986,
-0.026875129,
0.1477225721,
-0.1665029824,
0.1391679645,
-0.1151885539,
-0.2201763093,
0.304744035,
-0.0463769287,
0.0681140199,
0.3982469141,
0.2701753676,
-0.349062413,
0.65814358,
-0.0419467278,
-0.1354843527,
0.2687523067,
-0.3474255502,
0.5696569681,
-0.367719233,
-0.1921462864,
0.1278746128,
0.2734453082,
-0.5633012652,
0.3523603082,
0.3173483908,
0.0421454906,
-0.2780067921,
-0.1425398588,
-0.0093342122,
-0.2635150254,
-0.0356825963,
-0.035774298,
-0.0839616582,
0.2509799898,
0.2607079446,
-0.1420858204,
-0.1288409829,
-0.0528032184,
0.5240061283,
0.1827688664,
0.0712559819,
-0.0331552923,
0.0538782291,
-0.3607848883,
0.0930322781,
-0.0018490449,
0.071194835,
-0.0294783562,
-0.074777402,
0.1303322464,
0.0075900592,
0.5740776658,
-0.0426574163,
0.2700052559,
0.1973786503,
-0.1476930082,
-0.4956389368,
-0.005018143,
0.3244315684,
0.3547224104,
-0.2119251043,
0.5544855595,
0.0248033199,
-0.3523009717,
-0.1425226629,
0.2888290286,
-0.3024063706,
-0.2755252719,
-0.2828814387,
-0.0908587947,
-0.1693260223,
-0.1359178275,
-0.2644425631,
0.1604723334,
0.3173456788,
-0.0542618968,
0.0199960303,
0.2740507126,
-0.101223655,
-0.2405221164,
0.2603542507,
-0.051234968,
0.191895321,
0.3695372939,
0.2724651992,
0.1330740005,
0.4891783297,
-0.1525875777,
0.0589672215,
0.1066778377,
-0.1138428971,
0.2623549104,
0.3542262614,
-0.2661116421,
-0.2850041986,
0.4355878234,
-0.0714087561,
-0.4431217909,
0.1451994628,
0.0650888532,
-0.0585037842,
-0.0124944104,
-0.7041834593,
0.3211223185,
-0.0287691243,
-0.0916711912,
0.3414561749,
-0.2761050463,
-0.3676847517,
0.0366568454,
0.0514569916,
0.5803368688,
-0.1109288186,
0.339307189,
0.4912239313,
0.1037689075,
-0.1205616444,
-0.0198098551,
-0.1163486242,
-0.3502037227,
0.0732995197,
-0.0753940493,
-0.2070188969,
0.0714950338,
0.409873575,
0.0838324577,
0.3290243447,
-0.2101151496,
0.4944486618,
0.0073866639,
0.2272139937,
0.0601578616,
-0.3534419239,
-0.0565702952,
0.0522744618,
0.0642606393,
0.2843469083,
-0.1775837392,
0.0962953568,
0.0419203155,
-0.1211866438,
0.1079060435,
0.0236523021,
-0.1989727616,
0.0379890651,
0.1669693887,
-0.3038422763,
-0.3285155296,
0.3571902215,
0.1855636537,
-0.0842098147,
-0.2812746167,
0.1942756623,
-0.145204708,
0.1037391722,
-0.1615617275,
-0.0587676093,
0.1501357853,
-0.036412064,
0.0087478729,
-0.3542819321,
-0.3601641357,
-0.3469101191,
0.2884582877,
0.0409502946,
0.0974465758,
-0.1604704708,
-0.3576006889,
0.0155941192,
0.3156900704,
-0.0022197233,
0.0440254733,
0.1933983266,
-0.0006955405,
0.0494026728,
-0.0000185473,
-0.5221162438,
-0.1139212772,
0.2639819086,
-0.0591951646,
0.1399028003,
0.4883066714,
0.1480214447,
-0.1267179847,
-0.0911749825,
0.286424011,
0.2808635831,
-0.0819670483,
0.0818639249,
0.2499215603,
0.071975559,
0.0344534852,
0.446149528,
0.1257202923,
-0.1293548793,
-0.2481327653,
-0.3615416288,
-0.3472001255,
0.0599977337,
-0.1547264308,
0.1391312927,
0.2028879374,
-0.0808751583,
0.1917209476,
-0.2964780927,
-0.1524127126,
-0.0502971746,
0.0777826905,
0.0693687573,
0.2164886296,
0.2236101329,
0.3147010803,
-0.0005696797,
-0.0675304234,
-0.3426747024,
-0.2485057712,
-0.0901540145,
-0.026139589,
0.2068738937,
0.0122203203,
-0.0691916943,
0.0507297553,
-0.3420844078,
-0.3368497193,
-0.2921672463,
0.2289037257,
0.2773242891,
-0.0991030931,
-0.0458298773,
0.2431880832,
0.1326759011,
-0.0690466911,
0.1624124199,
-0.0383188017,
0.3669086397,
-0.0795844942,
0.1248299628,
-0.3500242829,
-0.0815616697,
0.19670102,
0.2148935944,
0.049061425,
0.1604731381,
0.3099259734,
-0.4675813317,
0.1803602874,
0.1435189247,
0.4164133072,
0.2039122581,
-0.1885020733,
0.0596926026,
0.215694353,
-0.0126174903,
-0.0489646345,
-0.1370922476,
0.1080820486,
0.0304838419,
-0.0306820646,
0.3173308074,
0.1685622633,
-0.0803698823,
-0.0899006948,
0.047122702,
0.4480670393,
-0.0706882551,
-0.0507536195,
0.3608308733,
-0.1141712591,
0.3597214818,
0.2721738219,
0.3458630145,
0.1139603332,
0.5598084927,
-0.0526596718,
0.0000241443,
0.204020068,
0.1723182052,
-0.1634257883,
-0.5923697352,
0.325355947,
0.2390280217,
-0.1098720804,
-0.1611026973,
-0.1157060415,
0.5343711376,
-0.2219631821,
0.2505010366,
-0.2162911445,
0.1709718108,
-0.1029276028,
-0.4251090586,
-0.3079393208,
-0.1412217468,
0.2282506526,
-0.0186242536,
-0.1614609063,
-0.0644496903,
-0.1494418681,
-0.164506793,
0.1885361075,
0.0629337728,
0.3134794533,
-0.0528450869,
-0.4776818752,
-0.2475821078,
0.3105484247,
-0.2090510726,
0.1323186159,
0.3261495531,
0.0168296359,
0.2841067016,
0.3334079087,
0.0473641604,
-0.096279338,
-0.0710704103,
-0.1093626916,
-0.3242406547,
0.1764924675,
-0.3072254658,
0.082076259,
0.4704862833,
0.0694293827,
-0.0697877631,
0.0879536122,
0.1533008814,
0.3244490623,
-0.2235337496,
0.3136500716,
0.1243326813,
-0.0068722563,
-0.0762720183,
0.1700991839,
-0.2068654895,
-0.0677667484,
0.6105200648,
0.0770612359,
0.3127715588,
-0.0215630755,
-0.0132975718,
-0.0179822184,
0.6097305417,
0.1546901017,
0.2649401426,
-0.2072949857,
0.0087387934,
-0.7007185817,
0.0271120369,
-0.0970677063,
0.3181783855,
0.1544744372,
0.1189378351,
0.1033613384,
0.0525311828,
0.0455734767,
-0.0127333645,
0.1066085324,
-0.1811339706,
0.2178355008,
-0.3707607388,
-0.2538195252,
0.1991680413,
0.0606619678,
-0.4984826446,
0.0805629119,
-0.3372356296,
-0.0870113298,
0.064045161,
0.0036407737,
0.2089639753,
-0.0651071519,
0.2528848648,
-0.1077313051,
0.132312879,
0.061413303,
0.066924803,
-0.482973516,
-0.2013025135,
-0.3909192383,
0.0929685086,
-0.5008544326,
0.0383651853,
-0.623685658,
0.1119698435,
-0.6095497608,
-0.0392555855,
0.1357253641,
-0.1387304664,
-0.0422171466,
-0.0555077977,
-0.4150231779,
0.1858196259,
0.1746158153,
0.0111051379,
-0.0177153926,
0.1192524582,
0.0035478743,
-0.0809879825,
0.6704128385,
-0.2766203284,
-0.2386037856,
-0.0440809764,
-0.0726570636,
0.0300049223,
-0.3232818842,
-0.2278571725,
0.1609710008,
0.4065620601,
-0.0712540075,
0.0153428512,
-0.2961615324,
-0.0806935728,
0.2529430687,
-0.1226013899,
0.1222221777,
0.0161477011,
-0.2187941074,
-0.2271167338,
-0.3131070733
] |
https://github.com/huggingface/datasets/issues/2363 | Trying to use metric.compute but get OSError | also, I test the function on some little data , get the same message:
```
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datasets import load_metric
>>> metric = load_metric('accuracy')
>>> metric.add_batch(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0])
2021-05-15 16:39:17.240991: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
>>> metric.compute()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 112, in pyarrow.lib.check_status
OSError: error closing file
``` | I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
| 113 | Trying to use metric.compute but get OSError
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
also, I test the function on some little data , get the same message:
```
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datasets import load_metric
>>> metric = load_metric('accuracy')
>>> metric.add_batch(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0])
2021-05-15 16:39:17.240991: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
>>> metric.compute()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 112, in pyarrow.lib.check_status
OSError: error closing file
``` | [
-0.394418478,
-0.2529712617,
-0.0330116637,
0.3631942272,
0.2531315088,
-0.1011047661,
0.2328527421,
0.1392672658,
0.2106888741,
0.6745792627,
-0.0271203984,
0.0674139038,
-0.0561969616,
0.0007949398,
-0.1410536468,
-0.1666644216,
-0.1239941716,
0.0129454276,
0.0000074526,
0.0780162886,
-0.3373334706,
0.042493891,
-0.220392853,
0.0718220174,
-0.0541989356,
-0.2079252005,
0.2063430995,
0.0426137038,
-0.5113475323,
-0.2387506366,
0.2351525426,
-0.3208842874,
0.2170305699,
0.8475165963,
-0.0001149249,
0.1326400638,
0.0087183174,
-0.1004111767,
-0.0945495516,
-0.276072979,
0.2104710191,
-0.2102965713,
0.0614109375,
-0.289495647,
0.1416247338,
-0.0250015426,
-0.2049154043,
-0.3347910643,
0.2580508292,
0.5588134527,
0.1094385833,
0.4805770218,
0.0571893603,
-0.1703309417,
-0.3747950494,
-0.3442456722,
0.0392584838,
0.6707535386,
-0.0942459181,
-0.125006333,
-0.0927235708,
-0.039755743,
0.2341279536,
0.0877324864,
0.2065164447,
-0.1326482892,
0.8326200247,
-0.2251913846,
-0.1489873677,
-0.0572967082,
0.1004799902,
0.0542259552,
-0.366227001,
0.3212555349,
-0.0640982538,
-0.712377131,
-0.0083441641,
-0.0554776341,
-0.329859525,
-0.166353628,
-0.3520747125,
-0.0161975995,
-0.4670946896,
0.0650908649,
-0.2273940444,
0.2691726983,
-0.1618949473,
0.0761634856,
0.3142354488,
0.3356448412,
0.0720362514,
-0.028517697,
0.1678746492,
0.2304374874,
-0.5341532826,
-0.0079721762,
-0.1267389506,
-0.0935946926,
-0.2341202796,
-0.2478043437,
0.3044143319,
0.0229339451,
0.239227891,
0.2780314088,
-0.1958613992,
0.8154184222,
0.0828206986,
0.1414982378,
0.0289001521,
0.3671554327,
-0.0761498138,
-0.0763366222,
-0.0666470677,
-0.392814368,
0.3305636048,
0.1671795994,
-0.178950116,
-0.0470933914,
-0.510324955,
-0.0825716779,
-0.3074187636,
-0.1921124309,
0.3589553237,
0.0782149658,
-0.1096400619,
0.1300759912,
0.2878339291,
0.190228954,
-0.2090027928,
-0.1163055673,
-0.2376889586,
0.3253224194,
-0.2651516497,
0.1427434236,
-0.2088132054,
-0.2825700641,
0.2108990997,
-0.0339324512,
0.2929007411,
-0.3727438748,
0.1489909142,
-0.1023261547,
-0.0621560216,
0.0755861551,
0.1042394266,
-0.2266152948,
0.4715833068,
-0.1889018118,
0.1012285426,
0.0352441184,
-0.6336894035,
-0.4329086244,
0.0577112883,
0.2142497599,
-0.1043528393,
0.1175898239,
-0.2650555074,
0.0452633165,
0.3239226937,
0.1826910079,
-0.0352028124,
-0.1126694232,
-0.4177842438,
-0.1472108364,
0.2840805948,
-0.2580545247,
-0.2451669872,
0.011953529,
0.052797392,
-0.0917612985,
0.231234327,
0.2382896245,
-0.1830745041,
0.6743611097,
-0.0939318761,
-0.2390214354,
0.5787591338,
-0.5383848548,
-0.035706643,
-0.217271179,
-0.1931012124,
-0.1919910908,
0.1511499435,
-0.1073567197,
0.0182100683,
0.0467908047,
0.4387016892,
0.0395710096,
-0.0889608636,
-0.3561968803,
-0.1995180249,
0.2851070464,
0.2279099673,
0.0419763103,
0.4570362866,
0.2853617072,
0.1695155054,
-0.0684717447,
0.1887973547,
-0.0180304851,
-0.2879210413,
-0.0030240526,
0.0400318615,
-0.3892464936,
0.2894600034,
-0.0779186487,
0.2788539529,
0.2235237807,
-0.2466221601,
0.0826150551,
0.3609800637,
0.2236857712,
-0.4406271875,
0.2417327464,
-0.1057093516,
-0.0480109379,
0.073394537,
-0.2125058025,
0.2519194484,
-0.0479268245,
-0.0860950127,
0.0504068434,
-0.4933127165,
-0.0235677157,
-0.1894488037,
0.0653731748,
-0.1262326092,
-0.0448607579,
-0.1458983123,
-0.0153135331,
0.1543094069,
0.055686716,
-0.2693293691,
0.4298384488,
0.2029632032,
-0.145607084,
-0.0144351535,
0.1559267342,
-0.147483781,
0.1328603923,
-0.0093298377,
-0.1915466189,
0.2004588693,
-0.1141058803,
0.0535787456,
0.3843779862,
0.1535724252,
0.017122725,
-0.1076229438,
0.0651368499,
-0.0502189398,
0.2021970004,
0.0288015381,
0.0270196758,
0.4426709414,
-0.35932374,
0.0580618382,
-0.3788808286,
0.3278770447,
-0.4405203462,
0.3899682462,
-0.0393587388,
0.060110677,
-0.0102306744,
0.1284068525,
-0.0726183429,
-0.3743265271,
-0.2551704049,
0.4715957642,
-0.047885675,
0.0405350439,
0.0953617841,
-0.0711543038,
-0.0679309592,
0.0304416157,
0.3493913114,
0.2070940137,
0.0212725922,
0.0449010469,
-0.0521537103,
-0.0465462208,
-0.1306070387,
-0.0280886889,
0.3493730426,
-0.2255888879,
0.1348802298,
0.075287044,
0.2183084637,
-0.1993990541,
-0.154515624,
-0.2003658563,
-0.3204384148,
0.0115701184,
0.1411632597,
0.320889473,
-0.1376408786,
0.1372113079,
0.1250700206,
0.4607314467,
0.2262209803,
0.2846038938,
-0.1636530608,
0.0487441011,
0.0333902426,
-0.09795627,
-0.2158229053,
0.2466625124,
-0.3523682058,
0.0774699673,
-0.0886009336,
-0.184565261,
-0.159978345,
0.0074018631,
0.2293599397,
0.1024661362,
-0.0420798659,
-0.2556741536,
0.0428052843,
0.2096295953,
-0.2503046989,
-0.3007626235,
0.3745561242,
-0.0587506555,
-0.0117410645,
-0.1317934245,
-0.1412437111,
-0.1016193181,
-0.2883879542,
-0.0360812247,
0.2483189851,
0.2062901407,
0.2738166153,
-0.0056970501,
0.3814318478,
0.4019246995,
-0.054301925,
-0.1986670941,
-0.5474499464,
0.2148371637,
-0.0925638601,
-0.2276468873,
0.070164904,
-0.0187874939,
0.167781949,
0.1912883222,
-0.2886451185,
-0.673584044,
0.1889113933,
0.2871622145,
-0.2609938681,
0.1604723036,
0.2804620862,
-0.3490062952,
-0.0287137348,
-0.2814408243,
-0.1038910896,
0.2245209217,
0.0848217532,
0.2112159729,
-0.2210720927,
0.4646461904,
0.0941405818,
0.6489884853,
0.0296455994,
-0.1281049401,
0.2985831499,
0.1537394822,
0.2447574884,
-0.003853549,
-0.1338460147,
0.0489934385,
0.1064162478,
-0.203870669,
0.1017023697,
-0.0557486378,
0.0651225969,
-0.3501720726,
-0.2313647568,
0.0471410453,
-0.0168844685,
-0.0369389281,
-0.4160639048,
0.3232345879,
-0.0301212501,
0.2697741091,
-0.2884371579,
0.1355518997,
0.1357631981,
0.1578711718,
0.128801316,
-0.056892924,
-0.0139697082,
-0.1706570089,
-0.2526802123,
0.393802017,
0.0498393811,
0.2946968973,
-0.0771578997,
0.3258002996,
-0.1086524129,
0.1709338725,
0.6087875366,
-0.131252721,
0.0350222066,
0.1956073195,
-0.2016817629,
-0.3555333912,
-0.0019051344,
-0.3041400909,
0.1678827852,
0.0728453323,
0.7506991625,
-0.0244573057,
0.0154516706,
-0.0228768531,
0.37950477,
-0.222904712,
-0.3866359293,
-0.2590599358,
-0.239826262,
0.2020210177,
0.054264944,
0.023445826,
0.3708870113,
0.1194966659,
0.2322508842,
-0.0566957965,
0.1982782781,
0.0937500447,
-0.064909555,
0.0116167171,
-0.1418976337,
-0.1390070766,
0.0540931076,
-0.0561867841,
0.2651712,
0.0636063069,
-0.0457776301,
-0.5454135537,
0.177790314,
0.1208342984,
0.2388089895,
-0.0866865516,
-0.2268005759,
-0.1198795736,
-0.0450633653,
0.2277987301,
0.1475596428,
0.1014588252,
0.2041600347,
0.3210228384,
-0.2983635366,
0.0091704708,
0.4024378359,
0.2755219936,
0.1890116483,
0.1654897034,
-0.237207368,
-0.1963228583,
0.0678782836,
0.3185478747,
0.4146771729,
0.0382899642,
-0.3658927679,
0.5241261125,
0.2566723228,
0.1425121725,
-0.2115785629,
0.181475535,
-0.1015440896,
-0.4452895224,
-0.1305098534,
-0.2162657976,
0.1773559451,
-0.1759330034,
-0.1006760001,
0.5212773085,
-0.2374328673,
-0.0595537126,
0.2230504751,
0.0124298967,
-0.2171097547,
-0.1357540041,
-0.1735382229,
0.094317399,
-0.1034940332,
0.1680276245,
-0.2548356056,
-0.0296273883,
-0.0258480124,
-0.0543107092,
0.0665848628,
-0.1761956513,
-0.3191463947,
0.2255783528,
0.1246949211,
-0.3070839643,
0.0238982569,
0.2432398945,
0.5752543807,
-0.0661971644,
0.0134255039,
-0.0124695348,
-0.1434543878,
-0.0496823937,
0.1397003829,
-0.1298238635,
0.2827932537,
-0.2351443321,
0.0005084184,
0.106917426,
-0.2279692292,
-0.3003261983,
0.4230243266,
0.0332099125,
0.1173312366,
0.0298741963,
0.0688448772,
-0.3049265146,
-0.1818190962,
-0.1941626817,
0.1032954082,
0.1751458049,
-0.4289219677,
0.3889810145,
-0.0574684292,
-0.3750255108,
0.213892445,
0.1949263811,
0.2153657526,
-0.2504064441,
0.2916766703,
-0.0620118938,
-0.1055544838,
-0.0586543828,
-0.1661616117,
0.0028953694,
-0.0192075726,
0.1990187019,
0.0185671784,
0.3529015183,
0.0213243626,
0.2117163092,
0.301718235,
0.051145371,
-0.1592126638,
-0.7366718054,
-0.20209831,
0.0577509217,
-0.0001069277,
-0.1427346319,
-0.1370644718,
0.2167482078,
-0.1322852075,
0.1760246158,
-0.2509112954,
-0.0105601586,
-0.2350026518,
0.1568699777,
0.0424211919,
-0.1487172097,
0.2262823433,
0.1627237946,
0.0156819429,
0.2249861062,
-0.2116451561,
-0.1787357479,
0.1025298908,
0.1621220857,
-0.0598122701,
-0.0652417392,
0.3917288482,
0.0371190384,
-0.3599073589,
0.0558811277,
-0.2302164435,
0.3071427643,
-0.1411302984,
-0.1288599223,
0.1621955335,
0.6288256049,
0.0902845189,
0.0673453137,
0.0052260943,
0.2742750049,
-0.2251277268,
0.1829316467,
-0.2780633569,
-0.1428376287,
-0.3569366038,
-0.1561432332,
0.0151987514,
-0.1730258912,
0.2919383049,
-0.2861344814,
0.0282903593,
-0.2088742703,
0.3628515899,
0.0899800286,
-0.1975496411,
0.0473190099,
0.0589776076,
0.1172167733,
-0.0800810307,
0.1394035965,
0.1728707999,
0.0388543941,
0.0148111023,
0.3321512938,
-0.0110752694,
0.1098472476,
-0.0826833323,
-0.08213038,
0.0725665167,
0.0972758681,
-0.0420321003,
-0.1037477702,
-0.1657616645,
0.147765398,
0.4743666053,
0.0668723136,
0.2182660401,
0.0428019539,
-0.152281478,
0.3543892801,
0.1275818497,
-0.0173841603,
-0.2526035607,
-0.0494093001,
-0.1836318672,
0.0211604796,
-0.0532548763,
-0.106214352,
-0.248904407,
0.0879067108,
-0.4121104777,
0.1509921849,
-0.2156969309,
0.1265389025,
-0.0160518456,
0.3691641986,
-0.3033032119,
-0.2289079726,
0.0783939436,
-0.216038242,
0.2938553691,
0.1115009785,
-0.2649544775,
-0.0027566405,
-0.2185143828,
0.1251318455,
-0.4348649085,
0.5451757312,
0.2303568274,
-0.3177499175,
0.1950152516,
0.221161142,
0.2615062892,
-0.083058551,
0.3307036459,
0.4944124818,
0.431109935,
-0.0547134094,
0.1025846004,
0.1507226229,
-0.1535886526,
0.1190044582,
0.159270674,
0.1158063859,
-0.2425834984,
0.5202121139,
0.1174397543,
-0.2335673273,
0.3855020702,
-0.2376740575,
0.4925023913,
-0.3898622096,
0.0585531853,
-0.0203451067,
0.034127064,
-0.3185690939,
-0.0753841996,
-0.1556570381,
0.1755644381,
-0.199976176,
0.0327101797,
0.0760911033,
-0.078606315,
0.0525699519,
-0.298938632,
0.3373306394,
0.3318252563,
0.2973656952,
-0.3848652542,
-0.006085502,
-0.4286866784,
0.139140889,
0.0209710393,
0.0802478716,
-0.0116072167,
0.0408270285,
0.042142652,
0.2475108802,
0.481651634,
0.0979122072,
0.1235921755,
0.2023984343,
-0.4470590055,
-0.1758024395,
-0.1573080868,
-0.3478933573,
0.0999621451,
-0.2129719406,
-0.0290637426,
-0.3214378655,
0.084248282,
0.0336777493,
-0.0423012786,
0.2320405841,
0.6045472622,
0.2200199664,
0.0672276095,
0.4585680664,
0.0525992624,
0.1894749403,
0.323218137,
-0.0218699574,
-0.2543054819,
0.0623141713,
-0.0039304192,
0.2870962918,
-0.0663461536,
-0.287136972,
-0.1954174638,
0.6739624739,
0.0616978258,
-0.5848381519,
-0.0630174577,
0.121439226,
0.0211715959,
-0.1331174523,
0.4323014915,
0.0667987838,
0.1964480132,
0.2162304074,
-0.2929870188,
0.0216373242,
0.4165512621,
-0.1725697815,
-0.3824043274,
-0.0623852499,
0.1373431087,
0.1988154203,
-0.2434105873,
-0.4655199647,
0.0824157223,
0.4198484719,
-0.142369017,
-0.1497413069,
0.1252377033,
-0.3407676816,
0.2748541534,
0.2406638265,
0.0039694128,
-0.2093466371,
-0.2314016223,
-0.0217550416,
-0.1318711042
] |
https://github.com/huggingface/datasets/issues/2363 | Trying to use metric.compute but get OSError | Hi @hyusterr,
If you look at the example provided in `metrics/accuracy.py`, it only does `metric.compute()` to calculate the accuracy. Here's an example:
```
from datasets import load_metric
metric = load_metric('accuracy')
output = metric.compute(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0])
print(output['accuracy']) # 0.5
```
| I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
| 44 | Trying to use metric.compute but get OSError
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
Hi @hyusterr,
If you look at the example provided in `metrics/accuracy.py`, it only does `metric.compute()` to calculate the accuracy. Here's an example:
```
from datasets import load_metric
metric = load_metric('accuracy')
output = metric.compute(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0])
print(output['accuracy']) # 0.5
```
| [
-0.394418478,
-0.2529712617,
-0.0330116637,
0.3631942272,
0.2531315088,
-0.1011047661,
0.2328527421,
0.1392672658,
0.2106888741,
0.6745792627,
-0.0271203984,
0.0674139038,
-0.0561969616,
0.0007949398,
-0.1410536468,
-0.1666644216,
-0.1239941716,
0.0129454276,
0.0000074526,
0.0780162886,
-0.3373334706,
0.042493891,
-0.220392853,
0.0718220174,
-0.0541989356,
-0.2079252005,
0.2063430995,
0.0426137038,
-0.5113475323,
-0.2387506366,
0.2351525426,
-0.3208842874,
0.2170305699,
0.8475165963,
-0.0001149249,
0.1326400638,
0.0087183174,
-0.1004111767,
-0.0945495516,
-0.276072979,
0.2104710191,
-0.2102965713,
0.0614109375,
-0.289495647,
0.1416247338,
-0.0250015426,
-0.2049154043,
-0.3347910643,
0.2580508292,
0.5588134527,
0.1094385833,
0.4805770218,
0.0571893603,
-0.1703309417,
-0.3747950494,
-0.3442456722,
0.0392584838,
0.6707535386,
-0.0942459181,
-0.125006333,
-0.0927235708,
-0.039755743,
0.2341279536,
0.0877324864,
0.2065164447,
-0.1326482892,
0.8326200247,
-0.2251913846,
-0.1489873677,
-0.0572967082,
0.1004799902,
0.0542259552,
-0.366227001,
0.3212555349,
-0.0640982538,
-0.712377131,
-0.0083441641,
-0.0554776341,
-0.329859525,
-0.166353628,
-0.3520747125,
-0.0161975995,
-0.4670946896,
0.0650908649,
-0.2273940444,
0.2691726983,
-0.1618949473,
0.0761634856,
0.3142354488,
0.3356448412,
0.0720362514,
-0.028517697,
0.1678746492,
0.2304374874,
-0.5341532826,
-0.0079721762,
-0.1267389506,
-0.0935946926,
-0.2341202796,
-0.2478043437,
0.3044143319,
0.0229339451,
0.239227891,
0.2780314088,
-0.1958613992,
0.8154184222,
0.0828206986,
0.1414982378,
0.0289001521,
0.3671554327,
-0.0761498138,
-0.0763366222,
-0.0666470677,
-0.392814368,
0.3305636048,
0.1671795994,
-0.178950116,
-0.0470933914,
-0.510324955,
-0.0825716779,
-0.3074187636,
-0.1921124309,
0.3589553237,
0.0782149658,
-0.1096400619,
0.1300759912,
0.2878339291,
0.190228954,
-0.2090027928,
-0.1163055673,
-0.2376889586,
0.3253224194,
-0.2651516497,
0.1427434236,
-0.2088132054,
-0.2825700641,
0.2108990997,
-0.0339324512,
0.2929007411,
-0.3727438748,
0.1489909142,
-0.1023261547,
-0.0621560216,
0.0755861551,
0.1042394266,
-0.2266152948,
0.4715833068,
-0.1889018118,
0.1012285426,
0.0352441184,
-0.6336894035,
-0.4329086244,
0.0577112883,
0.2142497599,
-0.1043528393,
0.1175898239,
-0.2650555074,
0.0452633165,
0.3239226937,
0.1826910079,
-0.0352028124,
-0.1126694232,
-0.4177842438,
-0.1472108364,
0.2840805948,
-0.2580545247,
-0.2451669872,
0.011953529,
0.052797392,
-0.0917612985,
0.231234327,
0.2382896245,
-0.1830745041,
0.6743611097,
-0.0939318761,
-0.2390214354,
0.5787591338,
-0.5383848548,
-0.035706643,
-0.217271179,
-0.1931012124,
-0.1919910908,
0.1511499435,
-0.1073567197,
0.0182100683,
0.0467908047,
0.4387016892,
0.0395710096,
-0.0889608636,
-0.3561968803,
-0.1995180249,
0.2851070464,
0.2279099673,
0.0419763103,
0.4570362866,
0.2853617072,
0.1695155054,
-0.0684717447,
0.1887973547,
-0.0180304851,
-0.2879210413,
-0.0030240526,
0.0400318615,
-0.3892464936,
0.2894600034,
-0.0779186487,
0.2788539529,
0.2235237807,
-0.2466221601,
0.0826150551,
0.3609800637,
0.2236857712,
-0.4406271875,
0.2417327464,
-0.1057093516,
-0.0480109379,
0.073394537,
-0.2125058025,
0.2519194484,
-0.0479268245,
-0.0860950127,
0.0504068434,
-0.4933127165,
-0.0235677157,
-0.1894488037,
0.0653731748,
-0.1262326092,
-0.0448607579,
-0.1458983123,
-0.0153135331,
0.1543094069,
0.055686716,
-0.2693293691,
0.4298384488,
0.2029632032,
-0.145607084,
-0.0144351535,
0.1559267342,
-0.147483781,
0.1328603923,
-0.0093298377,
-0.1915466189,
0.2004588693,
-0.1141058803,
0.0535787456,
0.3843779862,
0.1535724252,
0.017122725,
-0.1076229438,
0.0651368499,
-0.0502189398,
0.2021970004,
0.0288015381,
0.0270196758,
0.4426709414,
-0.35932374,
0.0580618382,
-0.3788808286,
0.3278770447,
-0.4405203462,
0.3899682462,
-0.0393587388,
0.060110677,
-0.0102306744,
0.1284068525,
-0.0726183429,
-0.3743265271,
-0.2551704049,
0.4715957642,
-0.047885675,
0.0405350439,
0.0953617841,
-0.0711543038,
-0.0679309592,
0.0304416157,
0.3493913114,
0.2070940137,
0.0212725922,
0.0449010469,
-0.0521537103,
-0.0465462208,
-0.1306070387,
-0.0280886889,
0.3493730426,
-0.2255888879,
0.1348802298,
0.075287044,
0.2183084637,
-0.1993990541,
-0.154515624,
-0.2003658563,
-0.3204384148,
0.0115701184,
0.1411632597,
0.320889473,
-0.1376408786,
0.1372113079,
0.1250700206,
0.4607314467,
0.2262209803,
0.2846038938,
-0.1636530608,
0.0487441011,
0.0333902426,
-0.09795627,
-0.2158229053,
0.2466625124,
-0.3523682058,
0.0774699673,
-0.0886009336,
-0.184565261,
-0.159978345,
0.0074018631,
0.2293599397,
0.1024661362,
-0.0420798659,
-0.2556741536,
0.0428052843,
0.2096295953,
-0.2503046989,
-0.3007626235,
0.3745561242,
-0.0587506555,
-0.0117410645,
-0.1317934245,
-0.1412437111,
-0.1016193181,
-0.2883879542,
-0.0360812247,
0.2483189851,
0.2062901407,
0.2738166153,
-0.0056970501,
0.3814318478,
0.4019246995,
-0.054301925,
-0.1986670941,
-0.5474499464,
0.2148371637,
-0.0925638601,
-0.2276468873,
0.070164904,
-0.0187874939,
0.167781949,
0.1912883222,
-0.2886451185,
-0.673584044,
0.1889113933,
0.2871622145,
-0.2609938681,
0.1604723036,
0.2804620862,
-0.3490062952,
-0.0287137348,
-0.2814408243,
-0.1038910896,
0.2245209217,
0.0848217532,
0.2112159729,
-0.2210720927,
0.4646461904,
0.0941405818,
0.6489884853,
0.0296455994,
-0.1281049401,
0.2985831499,
0.1537394822,
0.2447574884,
-0.003853549,
-0.1338460147,
0.0489934385,
0.1064162478,
-0.203870669,
0.1017023697,
-0.0557486378,
0.0651225969,
-0.3501720726,
-0.2313647568,
0.0471410453,
-0.0168844685,
-0.0369389281,
-0.4160639048,
0.3232345879,
-0.0301212501,
0.2697741091,
-0.2884371579,
0.1355518997,
0.1357631981,
0.1578711718,
0.128801316,
-0.056892924,
-0.0139697082,
-0.1706570089,
-0.2526802123,
0.393802017,
0.0498393811,
0.2946968973,
-0.0771578997,
0.3258002996,
-0.1086524129,
0.1709338725,
0.6087875366,
-0.131252721,
0.0350222066,
0.1956073195,
-0.2016817629,
-0.3555333912,
-0.0019051344,
-0.3041400909,
0.1678827852,
0.0728453323,
0.7506991625,
-0.0244573057,
0.0154516706,
-0.0228768531,
0.37950477,
-0.222904712,
-0.3866359293,
-0.2590599358,
-0.239826262,
0.2020210177,
0.054264944,
0.023445826,
0.3708870113,
0.1194966659,
0.2322508842,
-0.0566957965,
0.1982782781,
0.0937500447,
-0.064909555,
0.0116167171,
-0.1418976337,
-0.1390070766,
0.0540931076,
-0.0561867841,
0.2651712,
0.0636063069,
-0.0457776301,
-0.5454135537,
0.177790314,
0.1208342984,
0.2388089895,
-0.0866865516,
-0.2268005759,
-0.1198795736,
-0.0450633653,
0.2277987301,
0.1475596428,
0.1014588252,
0.2041600347,
0.3210228384,
-0.2983635366,
0.0091704708,
0.4024378359,
0.2755219936,
0.1890116483,
0.1654897034,
-0.237207368,
-0.1963228583,
0.0678782836,
0.3185478747,
0.4146771729,
0.0382899642,
-0.3658927679,
0.5241261125,
0.2566723228,
0.1425121725,
-0.2115785629,
0.181475535,
-0.1015440896,
-0.4452895224,
-0.1305098534,
-0.2162657976,
0.1773559451,
-0.1759330034,
-0.1006760001,
0.5212773085,
-0.2374328673,
-0.0595537126,
0.2230504751,
0.0124298967,
-0.2171097547,
-0.1357540041,
-0.1735382229,
0.094317399,
-0.1034940332,
0.1680276245,
-0.2548356056,
-0.0296273883,
-0.0258480124,
-0.0543107092,
0.0665848628,
-0.1761956513,
-0.3191463947,
0.2255783528,
0.1246949211,
-0.3070839643,
0.0238982569,
0.2432398945,
0.5752543807,
-0.0661971644,
0.0134255039,
-0.0124695348,
-0.1434543878,
-0.0496823937,
0.1397003829,
-0.1298238635,
0.2827932537,
-0.2351443321,
0.0005084184,
0.106917426,
-0.2279692292,
-0.3003261983,
0.4230243266,
0.0332099125,
0.1173312366,
0.0298741963,
0.0688448772,
-0.3049265146,
-0.1818190962,
-0.1941626817,
0.1032954082,
0.1751458049,
-0.4289219677,
0.3889810145,
-0.0574684292,
-0.3750255108,
0.213892445,
0.1949263811,
0.2153657526,
-0.2504064441,
0.2916766703,
-0.0620118938,
-0.1055544838,
-0.0586543828,
-0.1661616117,
0.0028953694,
-0.0192075726,
0.1990187019,
0.0185671784,
0.3529015183,
0.0213243626,
0.2117163092,
0.301718235,
0.051145371,
-0.1592126638,
-0.7366718054,
-0.20209831,
0.0577509217,
-0.0001069277,
-0.1427346319,
-0.1370644718,
0.2167482078,
-0.1322852075,
0.1760246158,
-0.2509112954,
-0.0105601586,
-0.2350026518,
0.1568699777,
0.0424211919,
-0.1487172097,
0.2262823433,
0.1627237946,
0.0156819429,
0.2249861062,
-0.2116451561,
-0.1787357479,
0.1025298908,
0.1621220857,
-0.0598122701,
-0.0652417392,
0.3917288482,
0.0371190384,
-0.3599073589,
0.0558811277,
-0.2302164435,
0.3071427643,
-0.1411302984,
-0.1288599223,
0.1621955335,
0.6288256049,
0.0902845189,
0.0673453137,
0.0052260943,
0.2742750049,
-0.2251277268,
0.1829316467,
-0.2780633569,
-0.1428376287,
-0.3569366038,
-0.1561432332,
0.0151987514,
-0.1730258912,
0.2919383049,
-0.2861344814,
0.0282903593,
-0.2088742703,
0.3628515899,
0.0899800286,
-0.1975496411,
0.0473190099,
0.0589776076,
0.1172167733,
-0.0800810307,
0.1394035965,
0.1728707999,
0.0388543941,
0.0148111023,
0.3321512938,
-0.0110752694,
0.1098472476,
-0.0826833323,
-0.08213038,
0.0725665167,
0.0972758681,
-0.0420321003,
-0.1037477702,
-0.1657616645,
0.147765398,
0.4743666053,
0.0668723136,
0.2182660401,
0.0428019539,
-0.152281478,
0.3543892801,
0.1275818497,
-0.0173841603,
-0.2526035607,
-0.0494093001,
-0.1836318672,
0.0211604796,
-0.0532548763,
-0.106214352,
-0.248904407,
0.0879067108,
-0.4121104777,
0.1509921849,
-0.2156969309,
0.1265389025,
-0.0160518456,
0.3691641986,
-0.3033032119,
-0.2289079726,
0.0783939436,
-0.216038242,
0.2938553691,
0.1115009785,
-0.2649544775,
-0.0027566405,
-0.2185143828,
0.1251318455,
-0.4348649085,
0.5451757312,
0.2303568274,
-0.3177499175,
0.1950152516,
0.221161142,
0.2615062892,
-0.083058551,
0.3307036459,
0.4944124818,
0.431109935,
-0.0547134094,
0.1025846004,
0.1507226229,
-0.1535886526,
0.1190044582,
0.159270674,
0.1158063859,
-0.2425834984,
0.5202121139,
0.1174397543,
-0.2335673273,
0.3855020702,
-0.2376740575,
0.4925023913,
-0.3898622096,
0.0585531853,
-0.0203451067,
0.034127064,
-0.3185690939,
-0.0753841996,
-0.1556570381,
0.1755644381,
-0.199976176,
0.0327101797,
0.0760911033,
-0.078606315,
0.0525699519,
-0.298938632,
0.3373306394,
0.3318252563,
0.2973656952,
-0.3848652542,
-0.006085502,
-0.4286866784,
0.139140889,
0.0209710393,
0.0802478716,
-0.0116072167,
0.0408270285,
0.042142652,
0.2475108802,
0.481651634,
0.0979122072,
0.1235921755,
0.2023984343,
-0.4470590055,
-0.1758024395,
-0.1573080868,
-0.3478933573,
0.0999621451,
-0.2129719406,
-0.0290637426,
-0.3214378655,
0.084248282,
0.0336777493,
-0.0423012786,
0.2320405841,
0.6045472622,
0.2200199664,
0.0672276095,
0.4585680664,
0.0525992624,
0.1894749403,
0.323218137,
-0.0218699574,
-0.2543054819,
0.0623141713,
-0.0039304192,
0.2870962918,
-0.0663461536,
-0.287136972,
-0.1954174638,
0.6739624739,
0.0616978258,
-0.5848381519,
-0.0630174577,
0.121439226,
0.0211715959,
-0.1331174523,
0.4323014915,
0.0667987838,
0.1964480132,
0.2162304074,
-0.2929870188,
0.0216373242,
0.4165512621,
-0.1725697815,
-0.3824043274,
-0.0623852499,
0.1373431087,
0.1988154203,
-0.2434105873,
-0.4655199647,
0.0824157223,
0.4198484719,
-0.142369017,
-0.1497413069,
0.1252377033,
-0.3407676816,
0.2748541534,
0.2406638265,
0.0039694128,
-0.2093466371,
-0.2314016223,
-0.0217550416,
-0.1318711042
] |
https://github.com/huggingface/datasets/issues/2363 | Trying to use metric.compute but get OSError | I thought I can use Metric to collect predictions and references, this follows the step from huggingface's sample colab.
BTW, I fix the problem by setting other cache_dir in load_metric, but I'm still wondering about the mechanism. | I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
| 37 | Trying to use metric.compute but get OSError
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
I thought I can use Metric to collect predictions and references, this follows the step from huggingface's sample colab.
BTW, I fix the problem by setting other cache_dir in load_metric, but I'm still wondering about the mechanism. | [
-0.394418478,
-0.2529712617,
-0.0330116637,
0.3631942272,
0.2531315088,
-0.1011047661,
0.2328527421,
0.1392672658,
0.2106888741,
0.6745792627,
-0.0271203984,
0.0674139038,
-0.0561969616,
0.0007949398,
-0.1410536468,
-0.1666644216,
-0.1239941716,
0.0129454276,
0.0000074526,
0.0780162886,
-0.3373334706,
0.042493891,
-0.220392853,
0.0718220174,
-0.0541989356,
-0.2079252005,
0.2063430995,
0.0426137038,
-0.5113475323,
-0.2387506366,
0.2351525426,
-0.3208842874,
0.2170305699,
0.8475165963,
-0.0001149249,
0.1326400638,
0.0087183174,
-0.1004111767,
-0.0945495516,
-0.276072979,
0.2104710191,
-0.2102965713,
0.0614109375,
-0.289495647,
0.1416247338,
-0.0250015426,
-0.2049154043,
-0.3347910643,
0.2580508292,
0.5588134527,
0.1094385833,
0.4805770218,
0.0571893603,
-0.1703309417,
-0.3747950494,
-0.3442456722,
0.0392584838,
0.6707535386,
-0.0942459181,
-0.125006333,
-0.0927235708,
-0.039755743,
0.2341279536,
0.0877324864,
0.2065164447,
-0.1326482892,
0.8326200247,
-0.2251913846,
-0.1489873677,
-0.0572967082,
0.1004799902,
0.0542259552,
-0.366227001,
0.3212555349,
-0.0640982538,
-0.712377131,
-0.0083441641,
-0.0554776341,
-0.329859525,
-0.166353628,
-0.3520747125,
-0.0161975995,
-0.4670946896,
0.0650908649,
-0.2273940444,
0.2691726983,
-0.1618949473,
0.0761634856,
0.3142354488,
0.3356448412,
0.0720362514,
-0.028517697,
0.1678746492,
0.2304374874,
-0.5341532826,
-0.0079721762,
-0.1267389506,
-0.0935946926,
-0.2341202796,
-0.2478043437,
0.3044143319,
0.0229339451,
0.239227891,
0.2780314088,
-0.1958613992,
0.8154184222,
0.0828206986,
0.1414982378,
0.0289001521,
0.3671554327,
-0.0761498138,
-0.0763366222,
-0.0666470677,
-0.392814368,
0.3305636048,
0.1671795994,
-0.178950116,
-0.0470933914,
-0.510324955,
-0.0825716779,
-0.3074187636,
-0.1921124309,
0.3589553237,
0.0782149658,
-0.1096400619,
0.1300759912,
0.2878339291,
0.190228954,
-0.2090027928,
-0.1163055673,
-0.2376889586,
0.3253224194,
-0.2651516497,
0.1427434236,
-0.2088132054,
-0.2825700641,
0.2108990997,
-0.0339324512,
0.2929007411,
-0.3727438748,
0.1489909142,
-0.1023261547,
-0.0621560216,
0.0755861551,
0.1042394266,
-0.2266152948,
0.4715833068,
-0.1889018118,
0.1012285426,
0.0352441184,
-0.6336894035,
-0.4329086244,
0.0577112883,
0.2142497599,
-0.1043528393,
0.1175898239,
-0.2650555074,
0.0452633165,
0.3239226937,
0.1826910079,
-0.0352028124,
-0.1126694232,
-0.4177842438,
-0.1472108364,
0.2840805948,
-0.2580545247,
-0.2451669872,
0.011953529,
0.052797392,
-0.0917612985,
0.231234327,
0.2382896245,
-0.1830745041,
0.6743611097,
-0.0939318761,
-0.2390214354,
0.5787591338,
-0.5383848548,
-0.035706643,
-0.217271179,
-0.1931012124,
-0.1919910908,
0.1511499435,
-0.1073567197,
0.0182100683,
0.0467908047,
0.4387016892,
0.0395710096,
-0.0889608636,
-0.3561968803,
-0.1995180249,
0.2851070464,
0.2279099673,
0.0419763103,
0.4570362866,
0.2853617072,
0.1695155054,
-0.0684717447,
0.1887973547,
-0.0180304851,
-0.2879210413,
-0.0030240526,
0.0400318615,
-0.3892464936,
0.2894600034,
-0.0779186487,
0.2788539529,
0.2235237807,
-0.2466221601,
0.0826150551,
0.3609800637,
0.2236857712,
-0.4406271875,
0.2417327464,
-0.1057093516,
-0.0480109379,
0.073394537,
-0.2125058025,
0.2519194484,
-0.0479268245,
-0.0860950127,
0.0504068434,
-0.4933127165,
-0.0235677157,
-0.1894488037,
0.0653731748,
-0.1262326092,
-0.0448607579,
-0.1458983123,
-0.0153135331,
0.1543094069,
0.055686716,
-0.2693293691,
0.4298384488,
0.2029632032,
-0.145607084,
-0.0144351535,
0.1559267342,
-0.147483781,
0.1328603923,
-0.0093298377,
-0.1915466189,
0.2004588693,
-0.1141058803,
0.0535787456,
0.3843779862,
0.1535724252,
0.017122725,
-0.1076229438,
0.0651368499,
-0.0502189398,
0.2021970004,
0.0288015381,
0.0270196758,
0.4426709414,
-0.35932374,
0.0580618382,
-0.3788808286,
0.3278770447,
-0.4405203462,
0.3899682462,
-0.0393587388,
0.060110677,
-0.0102306744,
0.1284068525,
-0.0726183429,
-0.3743265271,
-0.2551704049,
0.4715957642,
-0.047885675,
0.0405350439,
0.0953617841,
-0.0711543038,
-0.0679309592,
0.0304416157,
0.3493913114,
0.2070940137,
0.0212725922,
0.0449010469,
-0.0521537103,
-0.0465462208,
-0.1306070387,
-0.0280886889,
0.3493730426,
-0.2255888879,
0.1348802298,
0.075287044,
0.2183084637,
-0.1993990541,
-0.154515624,
-0.2003658563,
-0.3204384148,
0.0115701184,
0.1411632597,
0.320889473,
-0.1376408786,
0.1372113079,
0.1250700206,
0.4607314467,
0.2262209803,
0.2846038938,
-0.1636530608,
0.0487441011,
0.0333902426,
-0.09795627,
-0.2158229053,
0.2466625124,
-0.3523682058,
0.0774699673,
-0.0886009336,
-0.184565261,
-0.159978345,
0.0074018631,
0.2293599397,
0.1024661362,
-0.0420798659,
-0.2556741536,
0.0428052843,
0.2096295953,
-0.2503046989,
-0.3007626235,
0.3745561242,
-0.0587506555,
-0.0117410645,
-0.1317934245,
-0.1412437111,
-0.1016193181,
-0.2883879542,
-0.0360812247,
0.2483189851,
0.2062901407,
0.2738166153,
-0.0056970501,
0.3814318478,
0.4019246995,
-0.054301925,
-0.1986670941,
-0.5474499464,
0.2148371637,
-0.0925638601,
-0.2276468873,
0.070164904,
-0.0187874939,
0.167781949,
0.1912883222,
-0.2886451185,
-0.673584044,
0.1889113933,
0.2871622145,
-0.2609938681,
0.1604723036,
0.2804620862,
-0.3490062952,
-0.0287137348,
-0.2814408243,
-0.1038910896,
0.2245209217,
0.0848217532,
0.2112159729,
-0.2210720927,
0.4646461904,
0.0941405818,
0.6489884853,
0.0296455994,
-0.1281049401,
0.2985831499,
0.1537394822,
0.2447574884,
-0.003853549,
-0.1338460147,
0.0489934385,
0.1064162478,
-0.203870669,
0.1017023697,
-0.0557486378,
0.0651225969,
-0.3501720726,
-0.2313647568,
0.0471410453,
-0.0168844685,
-0.0369389281,
-0.4160639048,
0.3232345879,
-0.0301212501,
0.2697741091,
-0.2884371579,
0.1355518997,
0.1357631981,
0.1578711718,
0.128801316,
-0.056892924,
-0.0139697082,
-0.1706570089,
-0.2526802123,
0.393802017,
0.0498393811,
0.2946968973,
-0.0771578997,
0.3258002996,
-0.1086524129,
0.1709338725,
0.6087875366,
-0.131252721,
0.0350222066,
0.1956073195,
-0.2016817629,
-0.3555333912,
-0.0019051344,
-0.3041400909,
0.1678827852,
0.0728453323,
0.7506991625,
-0.0244573057,
0.0154516706,
-0.0228768531,
0.37950477,
-0.222904712,
-0.3866359293,
-0.2590599358,
-0.239826262,
0.2020210177,
0.054264944,
0.023445826,
0.3708870113,
0.1194966659,
0.2322508842,
-0.0566957965,
0.1982782781,
0.0937500447,
-0.064909555,
0.0116167171,
-0.1418976337,
-0.1390070766,
0.0540931076,
-0.0561867841,
0.2651712,
0.0636063069,
-0.0457776301,
-0.5454135537,
0.177790314,
0.1208342984,
0.2388089895,
-0.0866865516,
-0.2268005759,
-0.1198795736,
-0.0450633653,
0.2277987301,
0.1475596428,
0.1014588252,
0.2041600347,
0.3210228384,
-0.2983635366,
0.0091704708,
0.4024378359,
0.2755219936,
0.1890116483,
0.1654897034,
-0.237207368,
-0.1963228583,
0.0678782836,
0.3185478747,
0.4146771729,
0.0382899642,
-0.3658927679,
0.5241261125,
0.2566723228,
0.1425121725,
-0.2115785629,
0.181475535,
-0.1015440896,
-0.4452895224,
-0.1305098534,
-0.2162657976,
0.1773559451,
-0.1759330034,
-0.1006760001,
0.5212773085,
-0.2374328673,
-0.0595537126,
0.2230504751,
0.0124298967,
-0.2171097547,
-0.1357540041,
-0.1735382229,
0.094317399,
-0.1034940332,
0.1680276245,
-0.2548356056,
-0.0296273883,
-0.0258480124,
-0.0543107092,
0.0665848628,
-0.1761956513,
-0.3191463947,
0.2255783528,
0.1246949211,
-0.3070839643,
0.0238982569,
0.2432398945,
0.5752543807,
-0.0661971644,
0.0134255039,
-0.0124695348,
-0.1434543878,
-0.0496823937,
0.1397003829,
-0.1298238635,
0.2827932537,
-0.2351443321,
0.0005084184,
0.106917426,
-0.2279692292,
-0.3003261983,
0.4230243266,
0.0332099125,
0.1173312366,
0.0298741963,
0.0688448772,
-0.3049265146,
-0.1818190962,
-0.1941626817,
0.1032954082,
0.1751458049,
-0.4289219677,
0.3889810145,
-0.0574684292,
-0.3750255108,
0.213892445,
0.1949263811,
0.2153657526,
-0.2504064441,
0.2916766703,
-0.0620118938,
-0.1055544838,
-0.0586543828,
-0.1661616117,
0.0028953694,
-0.0192075726,
0.1990187019,
0.0185671784,
0.3529015183,
0.0213243626,
0.2117163092,
0.301718235,
0.051145371,
-0.1592126638,
-0.7366718054,
-0.20209831,
0.0577509217,
-0.0001069277,
-0.1427346319,
-0.1370644718,
0.2167482078,
-0.1322852075,
0.1760246158,
-0.2509112954,
-0.0105601586,
-0.2350026518,
0.1568699777,
0.0424211919,
-0.1487172097,
0.2262823433,
0.1627237946,
0.0156819429,
0.2249861062,
-0.2116451561,
-0.1787357479,
0.1025298908,
0.1621220857,
-0.0598122701,
-0.0652417392,
0.3917288482,
0.0371190384,
-0.3599073589,
0.0558811277,
-0.2302164435,
0.3071427643,
-0.1411302984,
-0.1288599223,
0.1621955335,
0.6288256049,
0.0902845189,
0.0673453137,
0.0052260943,
0.2742750049,
-0.2251277268,
0.1829316467,
-0.2780633569,
-0.1428376287,
-0.3569366038,
-0.1561432332,
0.0151987514,
-0.1730258912,
0.2919383049,
-0.2861344814,
0.0282903593,
-0.2088742703,
0.3628515899,
0.0899800286,
-0.1975496411,
0.0473190099,
0.0589776076,
0.1172167733,
-0.0800810307,
0.1394035965,
0.1728707999,
0.0388543941,
0.0148111023,
0.3321512938,
-0.0110752694,
0.1098472476,
-0.0826833323,
-0.08213038,
0.0725665167,
0.0972758681,
-0.0420321003,
-0.1037477702,
-0.1657616645,
0.147765398,
0.4743666053,
0.0668723136,
0.2182660401,
0.0428019539,
-0.152281478,
0.3543892801,
0.1275818497,
-0.0173841603,
-0.2526035607,
-0.0494093001,
-0.1836318672,
0.0211604796,
-0.0532548763,
-0.106214352,
-0.248904407,
0.0879067108,
-0.4121104777,
0.1509921849,
-0.2156969309,
0.1265389025,
-0.0160518456,
0.3691641986,
-0.3033032119,
-0.2289079726,
0.0783939436,
-0.216038242,
0.2938553691,
0.1115009785,
-0.2649544775,
-0.0027566405,
-0.2185143828,
0.1251318455,
-0.4348649085,
0.5451757312,
0.2303568274,
-0.3177499175,
0.1950152516,
0.221161142,
0.2615062892,
-0.083058551,
0.3307036459,
0.4944124818,
0.431109935,
-0.0547134094,
0.1025846004,
0.1507226229,
-0.1535886526,
0.1190044582,
0.159270674,
0.1158063859,
-0.2425834984,
0.5202121139,
0.1174397543,
-0.2335673273,
0.3855020702,
-0.2376740575,
0.4925023913,
-0.3898622096,
0.0585531853,
-0.0203451067,
0.034127064,
-0.3185690939,
-0.0753841996,
-0.1556570381,
0.1755644381,
-0.199976176,
0.0327101797,
0.0760911033,
-0.078606315,
0.0525699519,
-0.298938632,
0.3373306394,
0.3318252563,
0.2973656952,
-0.3848652542,
-0.006085502,
-0.4286866784,
0.139140889,
0.0209710393,
0.0802478716,
-0.0116072167,
0.0408270285,
0.042142652,
0.2475108802,
0.481651634,
0.0979122072,
0.1235921755,
0.2023984343,
-0.4470590055,
-0.1758024395,
-0.1573080868,
-0.3478933573,
0.0999621451,
-0.2129719406,
-0.0290637426,
-0.3214378655,
0.084248282,
0.0336777493,
-0.0423012786,
0.2320405841,
0.6045472622,
0.2200199664,
0.0672276095,
0.4585680664,
0.0525992624,
0.1894749403,
0.323218137,
-0.0218699574,
-0.2543054819,
0.0623141713,
-0.0039304192,
0.2870962918,
-0.0663461536,
-0.287136972,
-0.1954174638,
0.6739624739,
0.0616978258,
-0.5848381519,
-0.0630174577,
0.121439226,
0.0211715959,
-0.1331174523,
0.4323014915,
0.0667987838,
0.1964480132,
0.2162304074,
-0.2929870188,
0.0216373242,
0.4165512621,
-0.1725697815,
-0.3824043274,
-0.0623852499,
0.1373431087,
0.1988154203,
-0.2434105873,
-0.4655199647,
0.0824157223,
0.4198484719,
-0.142369017,
-0.1497413069,
0.1252377033,
-0.3407676816,
0.2748541534,
0.2406638265,
0.0039694128,
-0.2093466371,
-0.2314016223,
-0.0217550416,
-0.1318711042
] |
https://github.com/huggingface/datasets/issues/2363 | Trying to use metric.compute but get OSError | I tried this code on a colab notebook and it worked fine (with gpu enabled):
```
from datasets import load_metric
metric = load_metric('accuracy')
output = metric.add_batch(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0])
final_score = metric.compute()
print(final_score) # 0.5
```
Also, in `load_metric`, I saw `cache_dir` is optional and it defaults to `~/.datasets/` | I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
| 53 | Trying to use metric.compute but get OSError
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
I tried this code on a colab notebook and it worked fine (with gpu enabled):
```
from datasets import load_metric
metric = load_metric('accuracy')
output = metric.add_batch(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0])
final_score = metric.compute()
print(final_score) # 0.5
```
Also, in `load_metric`, I saw `cache_dir` is optional and it defaults to `~/.datasets/` | [
-0.394418478,
-0.2529712617,
-0.0330116637,
0.3631942272,
0.2531315088,
-0.1011047661,
0.2328527421,
0.1392672658,
0.2106888741,
0.6745792627,
-0.0271203984,
0.0674139038,
-0.0561969616,
0.0007949398,
-0.1410536468,
-0.1666644216,
-0.1239941716,
0.0129454276,
0.0000074526,
0.0780162886,
-0.3373334706,
0.042493891,
-0.220392853,
0.0718220174,
-0.0541989356,
-0.2079252005,
0.2063430995,
0.0426137038,
-0.5113475323,
-0.2387506366,
0.2351525426,
-0.3208842874,
0.2170305699,
0.8475165963,
-0.0001149249,
0.1326400638,
0.0087183174,
-0.1004111767,
-0.0945495516,
-0.276072979,
0.2104710191,
-0.2102965713,
0.0614109375,
-0.289495647,
0.1416247338,
-0.0250015426,
-0.2049154043,
-0.3347910643,
0.2580508292,
0.5588134527,
0.1094385833,
0.4805770218,
0.0571893603,
-0.1703309417,
-0.3747950494,
-0.3442456722,
0.0392584838,
0.6707535386,
-0.0942459181,
-0.125006333,
-0.0927235708,
-0.039755743,
0.2341279536,
0.0877324864,
0.2065164447,
-0.1326482892,
0.8326200247,
-0.2251913846,
-0.1489873677,
-0.0572967082,
0.1004799902,
0.0542259552,
-0.366227001,
0.3212555349,
-0.0640982538,
-0.712377131,
-0.0083441641,
-0.0554776341,
-0.329859525,
-0.166353628,
-0.3520747125,
-0.0161975995,
-0.4670946896,
0.0650908649,
-0.2273940444,
0.2691726983,
-0.1618949473,
0.0761634856,
0.3142354488,
0.3356448412,
0.0720362514,
-0.028517697,
0.1678746492,
0.2304374874,
-0.5341532826,
-0.0079721762,
-0.1267389506,
-0.0935946926,
-0.2341202796,
-0.2478043437,
0.3044143319,
0.0229339451,
0.239227891,
0.2780314088,
-0.1958613992,
0.8154184222,
0.0828206986,
0.1414982378,
0.0289001521,
0.3671554327,
-0.0761498138,
-0.0763366222,
-0.0666470677,
-0.392814368,
0.3305636048,
0.1671795994,
-0.178950116,
-0.0470933914,
-0.510324955,
-0.0825716779,
-0.3074187636,
-0.1921124309,
0.3589553237,
0.0782149658,
-0.1096400619,
0.1300759912,
0.2878339291,
0.190228954,
-0.2090027928,
-0.1163055673,
-0.2376889586,
0.3253224194,
-0.2651516497,
0.1427434236,
-0.2088132054,
-0.2825700641,
0.2108990997,
-0.0339324512,
0.2929007411,
-0.3727438748,
0.1489909142,
-0.1023261547,
-0.0621560216,
0.0755861551,
0.1042394266,
-0.2266152948,
0.4715833068,
-0.1889018118,
0.1012285426,
0.0352441184,
-0.6336894035,
-0.4329086244,
0.0577112883,
0.2142497599,
-0.1043528393,
0.1175898239,
-0.2650555074,
0.0452633165,
0.3239226937,
0.1826910079,
-0.0352028124,
-0.1126694232,
-0.4177842438,
-0.1472108364,
0.2840805948,
-0.2580545247,
-0.2451669872,
0.011953529,
0.052797392,
-0.0917612985,
0.231234327,
0.2382896245,
-0.1830745041,
0.6743611097,
-0.0939318761,
-0.2390214354,
0.5787591338,
-0.5383848548,
-0.035706643,
-0.217271179,
-0.1931012124,
-0.1919910908,
0.1511499435,
-0.1073567197,
0.0182100683,
0.0467908047,
0.4387016892,
0.0395710096,
-0.0889608636,
-0.3561968803,
-0.1995180249,
0.2851070464,
0.2279099673,
0.0419763103,
0.4570362866,
0.2853617072,
0.1695155054,
-0.0684717447,
0.1887973547,
-0.0180304851,
-0.2879210413,
-0.0030240526,
0.0400318615,
-0.3892464936,
0.2894600034,
-0.0779186487,
0.2788539529,
0.2235237807,
-0.2466221601,
0.0826150551,
0.3609800637,
0.2236857712,
-0.4406271875,
0.2417327464,
-0.1057093516,
-0.0480109379,
0.073394537,
-0.2125058025,
0.2519194484,
-0.0479268245,
-0.0860950127,
0.0504068434,
-0.4933127165,
-0.0235677157,
-0.1894488037,
0.0653731748,
-0.1262326092,
-0.0448607579,
-0.1458983123,
-0.0153135331,
0.1543094069,
0.055686716,
-0.2693293691,
0.4298384488,
0.2029632032,
-0.145607084,
-0.0144351535,
0.1559267342,
-0.147483781,
0.1328603923,
-0.0093298377,
-0.1915466189,
0.2004588693,
-0.1141058803,
0.0535787456,
0.3843779862,
0.1535724252,
0.017122725,
-0.1076229438,
0.0651368499,
-0.0502189398,
0.2021970004,
0.0288015381,
0.0270196758,
0.4426709414,
-0.35932374,
0.0580618382,
-0.3788808286,
0.3278770447,
-0.4405203462,
0.3899682462,
-0.0393587388,
0.060110677,
-0.0102306744,
0.1284068525,
-0.0726183429,
-0.3743265271,
-0.2551704049,
0.4715957642,
-0.047885675,
0.0405350439,
0.0953617841,
-0.0711543038,
-0.0679309592,
0.0304416157,
0.3493913114,
0.2070940137,
0.0212725922,
0.0449010469,
-0.0521537103,
-0.0465462208,
-0.1306070387,
-0.0280886889,
0.3493730426,
-0.2255888879,
0.1348802298,
0.075287044,
0.2183084637,
-0.1993990541,
-0.154515624,
-0.2003658563,
-0.3204384148,
0.0115701184,
0.1411632597,
0.320889473,
-0.1376408786,
0.1372113079,
0.1250700206,
0.4607314467,
0.2262209803,
0.2846038938,
-0.1636530608,
0.0487441011,
0.0333902426,
-0.09795627,
-0.2158229053,
0.2466625124,
-0.3523682058,
0.0774699673,
-0.0886009336,
-0.184565261,
-0.159978345,
0.0074018631,
0.2293599397,
0.1024661362,
-0.0420798659,
-0.2556741536,
0.0428052843,
0.2096295953,
-0.2503046989,
-0.3007626235,
0.3745561242,
-0.0587506555,
-0.0117410645,
-0.1317934245,
-0.1412437111,
-0.1016193181,
-0.2883879542,
-0.0360812247,
0.2483189851,
0.2062901407,
0.2738166153,
-0.0056970501,
0.3814318478,
0.4019246995,
-0.054301925,
-0.1986670941,
-0.5474499464,
0.2148371637,
-0.0925638601,
-0.2276468873,
0.070164904,
-0.0187874939,
0.167781949,
0.1912883222,
-0.2886451185,
-0.673584044,
0.1889113933,
0.2871622145,
-0.2609938681,
0.1604723036,
0.2804620862,
-0.3490062952,
-0.0287137348,
-0.2814408243,
-0.1038910896,
0.2245209217,
0.0848217532,
0.2112159729,
-0.2210720927,
0.4646461904,
0.0941405818,
0.6489884853,
0.0296455994,
-0.1281049401,
0.2985831499,
0.1537394822,
0.2447574884,
-0.003853549,
-0.1338460147,
0.0489934385,
0.1064162478,
-0.203870669,
0.1017023697,
-0.0557486378,
0.0651225969,
-0.3501720726,
-0.2313647568,
0.0471410453,
-0.0168844685,
-0.0369389281,
-0.4160639048,
0.3232345879,
-0.0301212501,
0.2697741091,
-0.2884371579,
0.1355518997,
0.1357631981,
0.1578711718,
0.128801316,
-0.056892924,
-0.0139697082,
-0.1706570089,
-0.2526802123,
0.393802017,
0.0498393811,
0.2946968973,
-0.0771578997,
0.3258002996,
-0.1086524129,
0.1709338725,
0.6087875366,
-0.131252721,
0.0350222066,
0.1956073195,
-0.2016817629,
-0.3555333912,
-0.0019051344,
-0.3041400909,
0.1678827852,
0.0728453323,
0.7506991625,
-0.0244573057,
0.0154516706,
-0.0228768531,
0.37950477,
-0.222904712,
-0.3866359293,
-0.2590599358,
-0.239826262,
0.2020210177,
0.054264944,
0.023445826,
0.3708870113,
0.1194966659,
0.2322508842,
-0.0566957965,
0.1982782781,
0.0937500447,
-0.064909555,
0.0116167171,
-0.1418976337,
-0.1390070766,
0.0540931076,
-0.0561867841,
0.2651712,
0.0636063069,
-0.0457776301,
-0.5454135537,
0.177790314,
0.1208342984,
0.2388089895,
-0.0866865516,
-0.2268005759,
-0.1198795736,
-0.0450633653,
0.2277987301,
0.1475596428,
0.1014588252,
0.2041600347,
0.3210228384,
-0.2983635366,
0.0091704708,
0.4024378359,
0.2755219936,
0.1890116483,
0.1654897034,
-0.237207368,
-0.1963228583,
0.0678782836,
0.3185478747,
0.4146771729,
0.0382899642,
-0.3658927679,
0.5241261125,
0.2566723228,
0.1425121725,
-0.2115785629,
0.181475535,
-0.1015440896,
-0.4452895224,
-0.1305098534,
-0.2162657976,
0.1773559451,
-0.1759330034,
-0.1006760001,
0.5212773085,
-0.2374328673,
-0.0595537126,
0.2230504751,
0.0124298967,
-0.2171097547,
-0.1357540041,
-0.1735382229,
0.094317399,
-0.1034940332,
0.1680276245,
-0.2548356056,
-0.0296273883,
-0.0258480124,
-0.0543107092,
0.0665848628,
-0.1761956513,
-0.3191463947,
0.2255783528,
0.1246949211,
-0.3070839643,
0.0238982569,
0.2432398945,
0.5752543807,
-0.0661971644,
0.0134255039,
-0.0124695348,
-0.1434543878,
-0.0496823937,
0.1397003829,
-0.1298238635,
0.2827932537,
-0.2351443321,
0.0005084184,
0.106917426,
-0.2279692292,
-0.3003261983,
0.4230243266,
0.0332099125,
0.1173312366,
0.0298741963,
0.0688448772,
-0.3049265146,
-0.1818190962,
-0.1941626817,
0.1032954082,
0.1751458049,
-0.4289219677,
0.3889810145,
-0.0574684292,
-0.3750255108,
0.213892445,
0.1949263811,
0.2153657526,
-0.2504064441,
0.2916766703,
-0.0620118938,
-0.1055544838,
-0.0586543828,
-0.1661616117,
0.0028953694,
-0.0192075726,
0.1990187019,
0.0185671784,
0.3529015183,
0.0213243626,
0.2117163092,
0.301718235,
0.051145371,
-0.1592126638,
-0.7366718054,
-0.20209831,
0.0577509217,
-0.0001069277,
-0.1427346319,
-0.1370644718,
0.2167482078,
-0.1322852075,
0.1760246158,
-0.2509112954,
-0.0105601586,
-0.2350026518,
0.1568699777,
0.0424211919,
-0.1487172097,
0.2262823433,
0.1627237946,
0.0156819429,
0.2249861062,
-0.2116451561,
-0.1787357479,
0.1025298908,
0.1621220857,
-0.0598122701,
-0.0652417392,
0.3917288482,
0.0371190384,
-0.3599073589,
0.0558811277,
-0.2302164435,
0.3071427643,
-0.1411302984,
-0.1288599223,
0.1621955335,
0.6288256049,
0.0902845189,
0.0673453137,
0.0052260943,
0.2742750049,
-0.2251277268,
0.1829316467,
-0.2780633569,
-0.1428376287,
-0.3569366038,
-0.1561432332,
0.0151987514,
-0.1730258912,
0.2919383049,
-0.2861344814,
0.0282903593,
-0.2088742703,
0.3628515899,
0.0899800286,
-0.1975496411,
0.0473190099,
0.0589776076,
0.1172167733,
-0.0800810307,
0.1394035965,
0.1728707999,
0.0388543941,
0.0148111023,
0.3321512938,
-0.0110752694,
0.1098472476,
-0.0826833323,
-0.08213038,
0.0725665167,
0.0972758681,
-0.0420321003,
-0.1037477702,
-0.1657616645,
0.147765398,
0.4743666053,
0.0668723136,
0.2182660401,
0.0428019539,
-0.152281478,
0.3543892801,
0.1275818497,
-0.0173841603,
-0.2526035607,
-0.0494093001,
-0.1836318672,
0.0211604796,
-0.0532548763,
-0.106214352,
-0.248904407,
0.0879067108,
-0.4121104777,
0.1509921849,
-0.2156969309,
0.1265389025,
-0.0160518456,
0.3691641986,
-0.3033032119,
-0.2289079726,
0.0783939436,
-0.216038242,
0.2938553691,
0.1115009785,
-0.2649544775,
-0.0027566405,
-0.2185143828,
0.1251318455,
-0.4348649085,
0.5451757312,
0.2303568274,
-0.3177499175,
0.1950152516,
0.221161142,
0.2615062892,
-0.083058551,
0.3307036459,
0.4944124818,
0.431109935,
-0.0547134094,
0.1025846004,
0.1507226229,
-0.1535886526,
0.1190044582,
0.159270674,
0.1158063859,
-0.2425834984,
0.5202121139,
0.1174397543,
-0.2335673273,
0.3855020702,
-0.2376740575,
0.4925023913,
-0.3898622096,
0.0585531853,
-0.0203451067,
0.034127064,
-0.3185690939,
-0.0753841996,
-0.1556570381,
0.1755644381,
-0.199976176,
0.0327101797,
0.0760911033,
-0.078606315,
0.0525699519,
-0.298938632,
0.3373306394,
0.3318252563,
0.2973656952,
-0.3848652542,
-0.006085502,
-0.4286866784,
0.139140889,
0.0209710393,
0.0802478716,
-0.0116072167,
0.0408270285,
0.042142652,
0.2475108802,
0.481651634,
0.0979122072,
0.1235921755,
0.2023984343,
-0.4470590055,
-0.1758024395,
-0.1573080868,
-0.3478933573,
0.0999621451,
-0.2129719406,
-0.0290637426,
-0.3214378655,
0.084248282,
0.0336777493,
-0.0423012786,
0.2320405841,
0.6045472622,
0.2200199664,
0.0672276095,
0.4585680664,
0.0525992624,
0.1894749403,
0.323218137,
-0.0218699574,
-0.2543054819,
0.0623141713,
-0.0039304192,
0.2870962918,
-0.0663461536,
-0.287136972,
-0.1954174638,
0.6739624739,
0.0616978258,
-0.5848381519,
-0.0630174577,
0.121439226,
0.0211715959,
-0.1331174523,
0.4323014915,
0.0667987838,
0.1964480132,
0.2162304074,
-0.2929870188,
0.0216373242,
0.4165512621,
-0.1725697815,
-0.3824043274,
-0.0623852499,
0.1373431087,
0.1988154203,
-0.2434105873,
-0.4655199647,
0.0824157223,
0.4198484719,
-0.142369017,
-0.1497413069,
0.1252377033,
-0.3407676816,
0.2748541534,
0.2406638265,
0.0039694128,
-0.2093466371,
-0.2314016223,
-0.0217550416,
-0.1318711042
] |
https://github.com/huggingface/datasets/issues/2363 | Trying to use metric.compute but get OSError | Hi ! By default it caches the predictions and references used to compute the metric in `~/.cache/huggingface/datasets/metrics` (not `~/.datasets/`). Let me update the documentation @bhavitvyamalik .
The cache is used to store all the predictions and references passed to `add_batch` for example in order to compute the metric later when `compute` is called.
I think the issue might come from the cache directory that is used by default. Can you check that you have the right permissions ? Otherwise feel free to set `cache_dir` to another location. | I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
| 87 | Trying to use metric.compute but get OSError
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError?
```python
195 for epoch in range(num_train_epochs):
196 model.train()
197 for step, batch in enumerate(train_loader):
198 # print(batch['input_ids'].shape)
199 outputs = model(**batch)
200
201 loss = outputs.loss
202 loss /= gradient_accumulation_steps
203 accelerator.backward(loss)
204
205 predictions = outputs.logits.argmax(dim=-1)
206 metric.add_batch(
207 predictions=accelerator.gather(predictions),
208 references=accelerator.gather(batch['labels'])
209 )
210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics})
211
212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1:
213 train_metrics = metric.compute()
```
the error message is as below:
```
Traceback (most recent call last):
File "run_multi.py", line 273, in <module>
main()
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "run_multi.py", line 213, in main
train_metrics = metric.compute()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute
self._finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize
self.writer.finalize()
File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize
self.stream.close()
File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: error closing file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.6.1
- Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)"
- Python version: python3.8.5
- PyArrow version: 4.0.0
Hi ! By default it caches the predictions and references used to compute the metric in `~/.cache/huggingface/datasets/metrics` (not `~/.datasets/`). Let me update the documentation @bhavitvyamalik .
The cache is used to store all the predictions and references passed to `add_batch` for example in order to compute the metric later when `compute` is called.
I think the issue might come from the cache directory that is used by default. Can you check that you have the right permissions ? Otherwise feel free to set `cache_dir` to another location. | [
-0.394418478,
-0.2529712617,
-0.0330116637,
0.3631942272,
0.2531315088,
-0.1011047661,
0.2328527421,
0.1392672658,
0.2106888741,
0.6745792627,
-0.0271203984,
0.0674139038,
-0.0561969616,
0.0007949398,
-0.1410536468,
-0.1666644216,
-0.1239941716,
0.0129454276,
0.0000074526,
0.0780162886,
-0.3373334706,
0.042493891,
-0.220392853,
0.0718220174,
-0.0541989356,
-0.2079252005,
0.2063430995,
0.0426137038,
-0.5113475323,
-0.2387506366,
0.2351525426,
-0.3208842874,
0.2170305699,
0.8475165963,
-0.0001149249,
0.1326400638,
0.0087183174,
-0.1004111767,
-0.0945495516,
-0.276072979,
0.2104710191,
-0.2102965713,
0.0614109375,
-0.289495647,
0.1416247338,
-0.0250015426,
-0.2049154043,
-0.3347910643,
0.2580508292,
0.5588134527,
0.1094385833,
0.4805770218,
0.0571893603,
-0.1703309417,
-0.3747950494,
-0.3442456722,
0.0392584838,
0.6707535386,
-0.0942459181,
-0.125006333,
-0.0927235708,
-0.039755743,
0.2341279536,
0.0877324864,
0.2065164447,
-0.1326482892,
0.8326200247,
-0.2251913846,
-0.1489873677,
-0.0572967082,
0.1004799902,
0.0542259552,
-0.366227001,
0.3212555349,
-0.0640982538,
-0.712377131,
-0.0083441641,
-0.0554776341,
-0.329859525,
-0.166353628,
-0.3520747125,
-0.0161975995,
-0.4670946896,
0.0650908649,
-0.2273940444,
0.2691726983,
-0.1618949473,
0.0761634856,
0.3142354488,
0.3356448412,
0.0720362514,
-0.028517697,
0.1678746492,
0.2304374874,
-0.5341532826,
-0.0079721762,
-0.1267389506,
-0.0935946926,
-0.2341202796,
-0.2478043437,
0.3044143319,
0.0229339451,
0.239227891,
0.2780314088,
-0.1958613992,
0.8154184222,
0.0828206986,
0.1414982378,
0.0289001521,
0.3671554327,
-0.0761498138,
-0.0763366222,
-0.0666470677,
-0.392814368,
0.3305636048,
0.1671795994,
-0.178950116,
-0.0470933914,
-0.510324955,
-0.0825716779,
-0.3074187636,
-0.1921124309,
0.3589553237,
0.0782149658,
-0.1096400619,
0.1300759912,
0.2878339291,
0.190228954,
-0.2090027928,
-0.1163055673,
-0.2376889586,
0.3253224194,
-0.2651516497,
0.1427434236,
-0.2088132054,
-0.2825700641,
0.2108990997,
-0.0339324512,
0.2929007411,
-0.3727438748,
0.1489909142,
-0.1023261547,
-0.0621560216,
0.0755861551,
0.1042394266,
-0.2266152948,
0.4715833068,
-0.1889018118,
0.1012285426,
0.0352441184,
-0.6336894035,
-0.4329086244,
0.0577112883,
0.2142497599,
-0.1043528393,
0.1175898239,
-0.2650555074,
0.0452633165,
0.3239226937,
0.1826910079,
-0.0352028124,
-0.1126694232,
-0.4177842438,
-0.1472108364,
0.2840805948,
-0.2580545247,
-0.2451669872,
0.011953529,
0.052797392,
-0.0917612985,
0.231234327,
0.2382896245,
-0.1830745041,
0.6743611097,
-0.0939318761,
-0.2390214354,
0.5787591338,
-0.5383848548,
-0.035706643,
-0.217271179,
-0.1931012124,
-0.1919910908,
0.1511499435,
-0.1073567197,
0.0182100683,
0.0467908047,
0.4387016892,
0.0395710096,
-0.0889608636,
-0.3561968803,
-0.1995180249,
0.2851070464,
0.2279099673,
0.0419763103,
0.4570362866,
0.2853617072,
0.1695155054,
-0.0684717447,
0.1887973547,
-0.0180304851,
-0.2879210413,
-0.0030240526,
0.0400318615,
-0.3892464936,
0.2894600034,
-0.0779186487,
0.2788539529,
0.2235237807,
-0.2466221601,
0.0826150551,
0.3609800637,
0.2236857712,
-0.4406271875,
0.2417327464,
-0.1057093516,
-0.0480109379,
0.073394537,
-0.2125058025,
0.2519194484,
-0.0479268245,
-0.0860950127,
0.0504068434,
-0.4933127165,
-0.0235677157,
-0.1894488037,
0.0653731748,
-0.1262326092,
-0.0448607579,
-0.1458983123,
-0.0153135331,
0.1543094069,
0.055686716,
-0.2693293691,
0.4298384488,
0.2029632032,
-0.145607084,
-0.0144351535,
0.1559267342,
-0.147483781,
0.1328603923,
-0.0093298377,
-0.1915466189,
0.2004588693,
-0.1141058803,
0.0535787456,
0.3843779862,
0.1535724252,
0.017122725,
-0.1076229438,
0.0651368499,
-0.0502189398,
0.2021970004,
0.0288015381,
0.0270196758,
0.4426709414,
-0.35932374,
0.0580618382,
-0.3788808286,
0.3278770447,
-0.4405203462,
0.3899682462,
-0.0393587388,
0.060110677,
-0.0102306744,
0.1284068525,
-0.0726183429,
-0.3743265271,
-0.2551704049,
0.4715957642,
-0.047885675,
0.0405350439,
0.0953617841,
-0.0711543038,
-0.0679309592,
0.0304416157,
0.3493913114,
0.2070940137,
0.0212725922,
0.0449010469,
-0.0521537103,
-0.0465462208,
-0.1306070387,
-0.0280886889,
0.3493730426,
-0.2255888879,
0.1348802298,
0.075287044,
0.2183084637,
-0.1993990541,
-0.154515624,
-0.2003658563,
-0.3204384148,
0.0115701184,
0.1411632597,
0.320889473,
-0.1376408786,
0.1372113079,
0.1250700206,
0.4607314467,
0.2262209803,
0.2846038938,
-0.1636530608,
0.0487441011,
0.0333902426,
-0.09795627,
-0.2158229053,
0.2466625124,
-0.3523682058,
0.0774699673,
-0.0886009336,
-0.184565261,
-0.159978345,
0.0074018631,
0.2293599397,
0.1024661362,
-0.0420798659,
-0.2556741536,
0.0428052843,
0.2096295953,
-0.2503046989,
-0.3007626235,
0.3745561242,
-0.0587506555,
-0.0117410645,
-0.1317934245,
-0.1412437111,
-0.1016193181,
-0.2883879542,
-0.0360812247,
0.2483189851,
0.2062901407,
0.2738166153,
-0.0056970501,
0.3814318478,
0.4019246995,
-0.054301925,
-0.1986670941,
-0.5474499464,
0.2148371637,
-0.0925638601,
-0.2276468873,
0.070164904,
-0.0187874939,
0.167781949,
0.1912883222,
-0.2886451185,
-0.673584044,
0.1889113933,
0.2871622145,
-0.2609938681,
0.1604723036,
0.2804620862,
-0.3490062952,
-0.0287137348,
-0.2814408243,
-0.1038910896,
0.2245209217,
0.0848217532,
0.2112159729,
-0.2210720927,
0.4646461904,
0.0941405818,
0.6489884853,
0.0296455994,
-0.1281049401,
0.2985831499,
0.1537394822,
0.2447574884,
-0.003853549,
-0.1338460147,
0.0489934385,
0.1064162478,
-0.203870669,
0.1017023697,
-0.0557486378,
0.0651225969,
-0.3501720726,
-0.2313647568,
0.0471410453,
-0.0168844685,
-0.0369389281,
-0.4160639048,
0.3232345879,
-0.0301212501,
0.2697741091,
-0.2884371579,
0.1355518997,
0.1357631981,
0.1578711718,
0.128801316,
-0.056892924,
-0.0139697082,
-0.1706570089,
-0.2526802123,
0.393802017,
0.0498393811,
0.2946968973,
-0.0771578997,
0.3258002996,
-0.1086524129,
0.1709338725,
0.6087875366,
-0.131252721,
0.0350222066,
0.1956073195,
-0.2016817629,
-0.3555333912,
-0.0019051344,
-0.3041400909,
0.1678827852,
0.0728453323,
0.7506991625,
-0.0244573057,
0.0154516706,
-0.0228768531,
0.37950477,
-0.222904712,
-0.3866359293,
-0.2590599358,
-0.239826262,
0.2020210177,
0.054264944,
0.023445826,
0.3708870113,
0.1194966659,
0.2322508842,
-0.0566957965,
0.1982782781,
0.0937500447,
-0.064909555,
0.0116167171,
-0.1418976337,
-0.1390070766,
0.0540931076,
-0.0561867841,
0.2651712,
0.0636063069,
-0.0457776301,
-0.5454135537,
0.177790314,
0.1208342984,
0.2388089895,
-0.0866865516,
-0.2268005759,
-0.1198795736,
-0.0450633653,
0.2277987301,
0.1475596428,
0.1014588252,
0.2041600347,
0.3210228384,
-0.2983635366,
0.0091704708,
0.4024378359,
0.2755219936,
0.1890116483,
0.1654897034,
-0.237207368,
-0.1963228583,
0.0678782836,
0.3185478747,
0.4146771729,
0.0382899642,
-0.3658927679,
0.5241261125,
0.2566723228,
0.1425121725,
-0.2115785629,
0.181475535,
-0.1015440896,
-0.4452895224,
-0.1305098534,
-0.2162657976,
0.1773559451,
-0.1759330034,
-0.1006760001,
0.5212773085,
-0.2374328673,
-0.0595537126,
0.2230504751,
0.0124298967,
-0.2171097547,
-0.1357540041,
-0.1735382229,
0.094317399,
-0.1034940332,
0.1680276245,
-0.2548356056,
-0.0296273883,
-0.0258480124,
-0.0543107092,
0.0665848628,
-0.1761956513,
-0.3191463947,
0.2255783528,
0.1246949211,
-0.3070839643,
0.0238982569,
0.2432398945,
0.5752543807,
-0.0661971644,
0.0134255039,
-0.0124695348,
-0.1434543878,
-0.0496823937,
0.1397003829,
-0.1298238635,
0.2827932537,
-0.2351443321,
0.0005084184,
0.106917426,
-0.2279692292,
-0.3003261983,
0.4230243266,
0.0332099125,
0.1173312366,
0.0298741963,
0.0688448772,
-0.3049265146,
-0.1818190962,
-0.1941626817,
0.1032954082,
0.1751458049,
-0.4289219677,
0.3889810145,
-0.0574684292,
-0.3750255108,
0.213892445,
0.1949263811,
0.2153657526,
-0.2504064441,
0.2916766703,
-0.0620118938,
-0.1055544838,
-0.0586543828,
-0.1661616117,
0.0028953694,
-0.0192075726,
0.1990187019,
0.0185671784,
0.3529015183,
0.0213243626,
0.2117163092,
0.301718235,
0.051145371,
-0.1592126638,
-0.7366718054,
-0.20209831,
0.0577509217,
-0.0001069277,
-0.1427346319,
-0.1370644718,
0.2167482078,
-0.1322852075,
0.1760246158,
-0.2509112954,
-0.0105601586,
-0.2350026518,
0.1568699777,
0.0424211919,
-0.1487172097,
0.2262823433,
0.1627237946,
0.0156819429,
0.2249861062,
-0.2116451561,
-0.1787357479,
0.1025298908,
0.1621220857,
-0.0598122701,
-0.0652417392,
0.3917288482,
0.0371190384,
-0.3599073589,
0.0558811277,
-0.2302164435,
0.3071427643,
-0.1411302984,
-0.1288599223,
0.1621955335,
0.6288256049,
0.0902845189,
0.0673453137,
0.0052260943,
0.2742750049,
-0.2251277268,
0.1829316467,
-0.2780633569,
-0.1428376287,
-0.3569366038,
-0.1561432332,
0.0151987514,
-0.1730258912,
0.2919383049,
-0.2861344814,
0.0282903593,
-0.2088742703,
0.3628515899,
0.0899800286,
-0.1975496411,
0.0473190099,
0.0589776076,
0.1172167733,
-0.0800810307,
0.1394035965,
0.1728707999,
0.0388543941,
0.0148111023,
0.3321512938,
-0.0110752694,
0.1098472476,
-0.0826833323,
-0.08213038,
0.0725665167,
0.0972758681,
-0.0420321003,
-0.1037477702,
-0.1657616645,
0.147765398,
0.4743666053,
0.0668723136,
0.2182660401,
0.0428019539,
-0.152281478,
0.3543892801,
0.1275818497,
-0.0173841603,
-0.2526035607,
-0.0494093001,
-0.1836318672,
0.0211604796,
-0.0532548763,
-0.106214352,
-0.248904407,
0.0879067108,
-0.4121104777,
0.1509921849,
-0.2156969309,
0.1265389025,
-0.0160518456,
0.3691641986,
-0.3033032119,
-0.2289079726,
0.0783939436,
-0.216038242,
0.2938553691,
0.1115009785,
-0.2649544775,
-0.0027566405,
-0.2185143828,
0.1251318455,
-0.4348649085,
0.5451757312,
0.2303568274,
-0.3177499175,
0.1950152516,
0.221161142,
0.2615062892,
-0.083058551,
0.3307036459,
0.4944124818,
0.431109935,
-0.0547134094,
0.1025846004,
0.1507226229,
-0.1535886526,
0.1190044582,
0.159270674,
0.1158063859,
-0.2425834984,
0.5202121139,
0.1174397543,
-0.2335673273,
0.3855020702,
-0.2376740575,
0.4925023913,
-0.3898622096,
0.0585531853,
-0.0203451067,
0.034127064,
-0.3185690939,
-0.0753841996,
-0.1556570381,
0.1755644381,
-0.199976176,
0.0327101797,
0.0760911033,
-0.078606315,
0.0525699519,
-0.298938632,
0.3373306394,
0.3318252563,
0.2973656952,
-0.3848652542,
-0.006085502,
-0.4286866784,
0.139140889,
0.0209710393,
0.0802478716,
-0.0116072167,
0.0408270285,
0.042142652,
0.2475108802,
0.481651634,
0.0979122072,
0.1235921755,
0.2023984343,
-0.4470590055,
-0.1758024395,
-0.1573080868,
-0.3478933573,
0.0999621451,
-0.2129719406,
-0.0290637426,
-0.3214378655,
0.084248282,
0.0336777493,
-0.0423012786,
0.2320405841,
0.6045472622,
0.2200199664,
0.0672276095,
0.4585680664,
0.0525992624,
0.1894749403,
0.323218137,
-0.0218699574,
-0.2543054819,
0.0623141713,
-0.0039304192,
0.2870962918,
-0.0663461536,
-0.287136972,
-0.1954174638,
0.6739624739,
0.0616978258,
-0.5848381519,
-0.0630174577,
0.121439226,
0.0211715959,
-0.1331174523,
0.4323014915,
0.0667987838,
0.1964480132,
0.2162304074,
-0.2929870188,
0.0216373242,
0.4165512621,
-0.1725697815,
-0.3824043274,
-0.0623852499,
0.1373431087,
0.1988154203,
-0.2434105873,
-0.4655199647,
0.0824157223,
0.4198484719,
-0.142369017,
-0.1497413069,
0.1252377033,
-0.3407676816,
0.2748541534,
0.2406638265,
0.0039694128,
-0.2093466371,
-0.2314016223,
-0.0217550416,
-0.1318711042
] |
https://github.com/huggingface/datasets/issues/2356 | How to Add New Metrics Guide | Hi ! sorry for the late response
It would be fantastic to have a guide for adding metrics as well ! Currently we only have this template here:
https://github.com/huggingface/datasets/blob/master/templates/new_metric_script.py
We can also include test utilities for metrics in the guide.
We have a pytest suite with commands that you can use to make sure your metric works as expected.
It has two useful commands:
1. This commands tests the code in the `Examples:` desction of the docstring of the metric:
```
pytest tests/test_metric_common.py::LocalMetricTest::test_load_metric_<metric_name>
```
This will run this code for example:
https://github.com/huggingface/datasets/blob/e0787aa2a781cc15a80f7597f56d1f12e23df4c9/metrics/accuracy/accuracy.py#L40-L45
Moreover this test is meant to be fast so users are free to add patches to the metric to avoid intensive computations.
And example of intensive call patch can be found here:
https://github.com/huggingface/datasets/blob/e0787aa2a781cc15a80f7597f56d1f12e23df4c9/tests/test_metric_common.py#L138-L151
2. This test runs the same thing as 1. except that it doesn't use patches (the real metric is used):
```
RUN_SLOW=1 pytest tests/test_metric_common.py::LocalMetricTest::test_load_metric_<metric_name>
```
Finally additional metric-specific tests can be added to `test_metric_common.py`.
Voila :) Feel free to ping me if you have any question or if I can help
| **Is your feature request related to a problem? Please describe.**
Currently there is an absolutely fantastic guide for how to contribute a new dataset to the library. However, there isn't one for adding new metrics.
**Describe the solution you'd like**
I'd like for a guide in a similar style to the dataset guide for adding metrics. I believe many of the content in the dataset guide such as setup can be easily copied over with minimal changes. Also, from what I've seen with existing metrics, it shouldn't be as complicated, especially in documentation of the metric, mainly just citation and usage. The most complicated part I see would be in automated tests that run the new metrics, but y'all's test suite seem pretty comprehensive, so it might not be that hard.
**Describe alternatives you've considered**
One alternative would be just not having the metrics be community generated and so would not need a step by step guide. New metrics would just be proposed as issues and the internal team would take care of them. However, I think it makes more sense to have a step by step guide for contributors to follow.
**Additional context**
I'd be happy to help with creating this guide as I am very interested in adding software engineering metrics to the library :nerd_face:, the part I would need guidance on would be testing.
P.S. Love the library and community y'all have built! :hugs:
| 176 | How to Add New Metrics Guide
**Is your feature request related to a problem? Please describe.**
Currently there is an absolutely fantastic guide for how to contribute a new dataset to the library. However, there isn't one for adding new metrics.
**Describe the solution you'd like**
I'd like for a guide in a similar style to the dataset guide for adding metrics. I believe many of the content in the dataset guide such as setup can be easily copied over with minimal changes. Also, from what I've seen with existing metrics, it shouldn't be as complicated, especially in documentation of the metric, mainly just citation and usage. The most complicated part I see would be in automated tests that run the new metrics, but y'all's test suite seem pretty comprehensive, so it might not be that hard.
**Describe alternatives you've considered**
One alternative would be just not having the metrics be community generated and so would not need a step by step guide. New metrics would just be proposed as issues and the internal team would take care of them. However, I think it makes more sense to have a step by step guide for contributors to follow.
**Additional context**
I'd be happy to help with creating this guide as I am very interested in adding software engineering metrics to the library :nerd_face:, the part I would need guidance on would be testing.
P.S. Love the library and community y'all have built! :hugs:
Hi ! sorry for the late response
It would be fantastic to have a guide for adding metrics as well ! Currently we only have this template here:
https://github.com/huggingface/datasets/blob/master/templates/new_metric_script.py
We can also include test utilities for metrics in the guide.
We have a pytest suite with commands that you can use to make sure your metric works as expected.
It has two useful commands:
1. This commands tests the code in the `Examples:` desction of the docstring of the metric:
```
pytest tests/test_metric_common.py::LocalMetricTest::test_load_metric_<metric_name>
```
This will run this code for example:
https://github.com/huggingface/datasets/blob/e0787aa2a781cc15a80f7597f56d1f12e23df4c9/metrics/accuracy/accuracy.py#L40-L45
Moreover this test is meant to be fast so users are free to add patches to the metric to avoid intensive computations.
And example of intensive call patch can be found here:
https://github.com/huggingface/datasets/blob/e0787aa2a781cc15a80f7597f56d1f12e23df4c9/tests/test_metric_common.py#L138-L151
2. This test runs the same thing as 1. except that it doesn't use patches (the real metric is used):
```
RUN_SLOW=1 pytest tests/test_metric_common.py::LocalMetricTest::test_load_metric_<metric_name>
```
Finally additional metric-specific tests can be added to `test_metric_common.py`.
Voila :) Feel free to ping me if you have any question or if I can help
| [
0.0184294712,
0.0091659082,
-0.0002698584,
-0.1558316499,
0.0394448303,
0.0882946551,
-0.0663277581,
0.030540023,
0.0264216457,
0.0817609876,
0.0160234831,
0.2692243457,
-0.1336125731,
0.2791261971,
0.2526021898,
-0.1617622823,
-0.1102727205,
-0.0691409409,
0.1617093384,
0.0204251334,
-0.0027736595,
-0.0218740087,
0.3294087648,
0.0545108244,
-0.116463989,
-0.0480869748,
-0.133072257,
0.0665189177,
-0.4833086133,
-0.6584534645,
0.1586212814,
0.1352891326,
-0.1188627854,
0.4845243692,
-0.0001103193,
-0.3142381608,
0.2092063874,
-0.0670048296,
-0.1198501438,
-0.441141963,
0.0299326424,
-0.7234879732,
0.1960806102,
-0.0932006985,
0.0312845334,
-0.1347152591,
-0.1554332525,
0.1224787086,
-0.0282173995,
0.1885772645,
0.2130105644,
0.0976779312,
0.0443957411,
-0.3083942533,
-0.2603304386,
0.3114707768,
-0.4239771366,
0.5435324907,
0.3079589009,
0.170069173,
0.0951610729,
-0.0022228637,
0.033640705,
-0.0354853012,
0.6798272729,
-0.0897223055,
0.0804406628,
0.1071781069,
-0.3254211843,
0.3772414029,
0.4795587063,
-0.3143449724,
-0.3093028367,
-0.2831798196,
0.1683873832,
-0.4429859817,
-0.2639275491,
-0.135382548,
-0.0871685371,
-0.2493705601,
-0.2669562995,
-0.4700169265,
-0.2433304042,
0.1533593833,
0.1787812263,
0.0073760636,
0.0057961093,
-0.101596117,
0.2997993231,
0.138474226,
-0.4045344889,
0.0882185847,
-0.0804801732,
0.3847279251,
0.0626205131,
-0.4114015698,
0.2671385407,
0.0210766532,
0.4693698883,
0.1305869669,
0.3220777512,
0.0416282602,
-0.3315682709,
0.101988934,
0.0697239488,
0.0302170385,
0.2064803988,
0.0259624254,
0.0907070562,
0.3396169543,
0.4559907019,
-0.2520835698,
0.3968578577,
-0.0956555381,
0.0499761291,
0.0685843974,
0.1471227556,
-0.3993324637,
-0.0377426296,
-0.3121260107,
0.4328280985,
-0.4076388776,
0.4414563477,
0.0897252858,
-0.0520035997,
-0.2915799916,
-0.3402694762,
0.3253028393,
-0.1487538517,
0.207591936,
-0.0739264488,
0.1344437152,
-0.3010629416,
0.515218854,
0.1827647239,
-0.2941655517,
0.2420092374,
0.1666760743,
0.1522644162,
-0.1999547035,
0.0022771298,
0.2404258549,
0.0478420295,
-0.0570169128,
-0.1238345355,
0.1695910543,
-0.1199384183,
-0.2851222157,
-0.3717524707,
-0.0453538224,
-0.3488803804,
-0.4204467833,
-0.2678242922,
0.1413258761,
-0.3109638989,
-0.3429505229,
-0.106087409,
0.493329972,
-0.389429599,
-0.196914807,
0.0484505519,
0.4269000888,
-0.2820624113,
-0.3100943267,
0.0637530386,
0.3579251766,
-0.3396799564,
-0.2324163616,
-0.2341897935,
0.0253998917,
-0.1374935359,
-0.0389815159,
-0.0297507066,
0.1589484364,
0.0738943666,
-0.1113870665,
0.5824445486,
-0.2802071869,
0.221557349,
0.0327620953,
-0.0853185952,
-0.256529659,
-0.1304361522,
0.4572604299,
0.0265267808,
-0.2065903395,
-0.2832885683,
0.0571034029,
-0.1942892522,
-0.247290194,
-0.1541686952,
-0.123775132,
0.2240419686,
-0.1152998284,
-0.0695192516,
-0.0026221185,
0.4326040149,
-0.0192569457,
-0.17845276,
-0.102321744,
-0.2335808724,
0.2795449793,
0.5255981684,
-0.0219730549,
0.2193111032,
-0.2187479287,
-0.156349197,
-0.0179752745,
0.1284735799,
-0.1166482046,
0.3591012359,
-0.1786888838,
-0.4749299586,
-0.0524333827,
0.0522366017,
0.0669764876,
0.0221097469,
-0.3339252174,
-0.0420153774,
0.0546155125,
-0.1838304102,
-0.0239482969,
-0.3259169757,
0.443764329,
-0.0501363203,
0.016187191,
0.0387044512,
0.031718526,
0.0827145875,
0.5306406617,
0.2860187292,
0.0981434286,
-0.0662295893,
0.1483385563,
0.0292118769,
0.0674833506,
0.2121865451,
0.6915305257,
0.5469901562,
-0.0805036873,
0.2035463899,
-0.2614834607,
-0.095627524,
-0.1592146456,
-0.2688033879,
0.2466148585,
-0.3072992265,
0.1097350866,
-0.1203328148,
0.0513708405,
-0.0616922304,
-0.0289072003,
-0.1241117492,
-0.1857162416,
0.1790336668,
-0.0951610357,
-0.0663761124,
-0.0675026998,
0.2252748609,
0.2073012888,
0.1898092479,
-0.1084431261,
0.0301644783,
0.3718456328,
0.136754021,
-0.1395901442,
-0.1679078788,
0.0820076093,
0.1165528893,
0.2425190955,
0.0056012576,
0.0916837677,
-0.3783508241,
-0.1168579161,
-0.0895686448,
0.1801924407,
-0.3604495525,
-0.0228366181,
0.0145991473,
0.1239489391,
0.0442002192,
-0.0018289798,
-0.1631916016,
0.1606388241,
-0.1625337452,
-0.1156408042,
0.0826387182,
0.0563558973,
-0.0095748799,
-0.2589282095,
-0.3223094046,
-0.2484736294,
0.206988737,
-0.0176498666,
0.1311489642,
-0.0120333303,
0.1771419495,
0.3136781156,
-0.353840977,
-0.0062787998,
-0.1025251672,
-0.2769830823,
-0.014699134,
0.1558508277,
0.0837278664,
-0.0107058529,
0.542370975,
0.0823426694,
0.3953064978,
-0.4368831217,
-0.8153740764,
-0.0724794641,
-0.1126618087,
0.6125947833,
0.0842715576,
0.0896968171,
0.1166645065,
-0.2269664407,
0.0211907607,
-0.1636059433,
0.0361228026,
0.046170529,
-0.3235256076,
0.0530880764,
-0.1868778318,
-0.2284998745,
-0.0836724266,
-0.3801618814,
0.1529833674,
0.1903476566,
0.0673880726,
0.2270582318,
0.0454428792,
0.0681230724,
-0.0045256149,
0.2067424953,
-0.099007003,
0.0303439107,
0.2220390141,
-0.3982442021,
-0.120857656,
0.2529188097,
0.0172525253,
0.2168857008,
-0.1977648586,
-0.2195444554,
-0.7192445397,
0.063344568,
0.3662299514,
0.15673998,
0.3119514585,
0.1860899925,
0.0312190559,
0.0116890203,
-0.0507836416,
-0.5496695042,
-0.0624052547,
0.3355003297,
0.2113074511,
-0.1976544857,
0.2261877954,
0.1639119387,
0.5142987967,
0.1251869351,
-0.1498402506,
0.2382321358,
0.0807624683,
0.5520674586,
0.0971254855,
-0.234464407,
0.0834278017,
0.1130743548,
0.1381235272,
0.0112292869,
0.4134221971,
-0.0473345667,
-0.059586063,
-0.1769430339,
-0.1702030152,
0.0639381856,
0.0918139666,
0.0583685972,
0.2405310869,
-0.2475563735,
-0.0099524157,
-0.5171265006,
-0.4916657507,
0.1898653358,
0.6618599892,
0.1130466536,
0.1411304921,
-0.3002955019,
-0.2005688548,
-0.3676934838,
0.0851903111,
0.2254045755,
-0.3414385617,
-0.3552615345,
0.1465354562,
-0.0313886143,
0.1897523999,
-0.173022747,
-0.2952411473,
-0.5991569757,
0.2447572201,
0.0904885679,
-0.0445320196,
0.1522836387,
0.1154046431,
0.3179457188,
0.1051432267,
0.2786825895,
-0.3807909489,
-0.1559418738,
0.2681198418,
0.4588249028,
-0.0700059608,
-0.0444757603,
0.152883783,
-0.4423781037,
0.0944518,
0.0025819163,
-0.3348359466,
0.1386281103,
0.3370296061,
-0.1488550305,
0.253372252,
0.0784652606,
0.2578749359,
0.0262879599,
0.0526404306,
0.3170264065,
0.0884936899,
0.14094235,
-0.2362566143,
-0.0629438534,
0.0061256713,
-0.1569485664,
0.1550160497,
-0.0296908282,
-0.2291727513,
0.5229884386,
0.0898674354,
0.2265154868,
0.507243216,
-0.1621755064,
0.0462646373,
-0.3842122555,
0.1118187532,
0.0300922636,
0.2098208815,
-0.3015300035,
-0.3861687481,
0.5291602015,
0.062726222,
-0.1092025861,
0.6401627064,
0.2059102058,
0.1134096608,
0.0134446686,
0.1225930005,
0.8073385358,
-0.1980906874,
-0.2586928308,
0.0910704434,
-0.4162580073,
0.4987085462,
-0.1907400787,
-0.25564605,
-0.2205878347,
0.0898179486,
0.0656921566,
-0.0381288789,
0.02049651,
-0.2923636734,
-0.0121047394,
0.285682857,
-0.129908368,
-0.0704245716,
-0.0226379149,
0.4557739496,
0.0465858467,
-0.3004559577,
0.2458120733,
0.2028038949,
-0.1255788207,
-0.0508204885,
-0.0916768163,
-0.1765006036,
-0.0268974956,
0.0362505019,
-0.3564400077,
-0.5494885445,
0.2038482428,
-0.1903164536,
0.2237991989,
-0.4408729374,
0.2794647813,
-0.0170745812,
0.5803317428,
0.0122540873,
-0.2243372649,
0.1015141532,
-0.6351746321,
0.0541653447,
-0.071161963,
0.0436095819,
0.2332554907,
-0.1384501159,
0.0471987426,
0.2041131258,
0.0631218776,
-0.2692432404,
-0.1460915059,
-0.1066578999,
0.0170499533,
-0.3227482736,
0.2849550545,
0.1865736097,
0.1908509284,
-0.2029922009,
0.1163508072,
0.4865888357,
-0.0669852644,
0.1861119866,
0.179746002,
0.0426102318,
-0.2171355039,
-0.19579117,
-0.0896972865,
-0.4844110608,
-0.1337011904,
-0.1219653636,
-0.1105272397,
-0.0928991064,
-0.149239704,
0.1604575664,
-0.078003712,
-0.1232777685,
0.2798511386,
0.0764323398,
0.1370574832,
0.2057882845,
0.1991372406,
-0.0557146817,
-0.1154419556,
-0.1009296179,
-0.1944977939,
0.1754544675,
-0.2165114135,
0.1490337998,
-0.5839188695,
-0.0183276609,
0.026489405,
0.3320847452,
-0.3175541162,
-0.0264535155,
0.1045344099,
0.1118404046,
0.2753577828,
0.0294271968,
-0.1566527784,
-0.1903883666,
-0.0623637401,
-0.2546937764,
-0.1563498378,
-0.109145008,
-0.3250699043,
0.1531178951,
-0.2212013006,
0.0898000374,
-0.0839981437,
0.0411266871,
0.047148589,
0.1006318703,
0.0109005142,
0.0874089152,
-0.1541683078,
0.0948507339,
-0.2594508529,
0.0788020715,
0.0737435147,
0.0457841754,
0.214307487,
0.4922336042,
0.089311488,
0.1163203865,
-0.1913698465,
0.0406656787,
0.1258862466,
0.2075708956,
0.1541229188,
-0.2356119454,
0.0355450623,
0.27820912,
0.0968460068,
0.2868941426,
0.0373785459,
-0.1993084699,
0.0351721272,
0.3389793336,
0.0153883584,
0.1513997167,
0.0328002162,
-0.0844231546,
0.0770938396,
0.1764705777,
0.2765747309,
0.0741945207,
0.5186918974,
0.2016318142,
0.3859260976,
-0.1801867485,
0.0759761855,
-0.0941985697,
0.178739056,
-0.1183590889,
0.0894714445,
-0.0716501474,
0.5985190272,
0.1002665982,
0.0165919065,
-0.2216982096,
-0.085074909,
0.3150953352,
0.0589005947,
0.070120208,
0.0637237281,
0.0152085852,
0.1097333729,
-0.147644341,
0.3266406357,
-0.2443139404,
0.1892071515,
0.5347027183,
-0.036141891,
-0.271805644,
-0.0539486147,
-0.1050116718,
0.1287908107,
0.0659517422,
-0.2847745419,
-0.1338752955,
-0.1962340176,
-0.2545788288,
0.2274822444,
-0.3350023925,
0.1266346276,
-0.2393220514,
0.1538041681,
-0.0168616548,
0.043013569,
0.2615386546,
0.236461103,
0.0756507069,
-0.0086820535,
-0.1007964239,
0.0309829749,
-0.0299992152,
0.3788923621,
0.1901303828,
-0.1459892541,
0.0140392026,
0.4152963161,
-0.1666007936,
-0.0902855471,
0.3696527481,
0.1923997253,
-0.1116636023,
-0.1447280347,
-0.1476630419,
0.1399004906,
-0.1301927119,
0.3774017096,
-0.4194702208,
-0.1162066013,
-0.3492374122,
0.3389997482,
0.3243455887,
-0.1370758563,
-0.1120394394,
-0.2174185067,
-0.0691750422,
-0.0427201577,
0.5133609772,
-0.053081207,
-0.1748453081,
-0.2077673972,
0.1112168953,
0.2073676288,
-0.1023727879,
0.3140538037,
0.3296168447,
-0.222901836,
-0.118085891,
-0.4054397047,
-0.2519229054,
0.1538627297,
0.1275790483,
0.0210711807,
-0.0239094216,
-0.0661354512,
0.3210528791,
0.3211807907,
0.0025881366,
0.172450155,
-0.182783708,
-0.3393130898,
-0.1350644231,
0.0585566387,
-0.2547018528,
-0.1227250546,
0.3190797269,
-0.0818207562,
-0.4071909487,
-0.0169707015,
-0.1636161953,
0.1709463,
0.2222642452,
0.5071327686,
0.2640213966,
0.0503473803,
0.4483631849,
0.1060719714,
-0.0998587981,
-0.1260730326,
-0.0330130123,
0.1640866399,
0.0844275579,
-0.1180991009,
0.2994469106,
0.0042781904,
-0.2160636187,
-0.2486466914,
0.5709847808,
0.087832734,
-0.1702437997,
-0.0867073163,
0.051918529,
-0.0879798234,
-0.1736575067,
0.319154799,
0.3881105483,
0.0766369551,
0.4116770923,
0.0779702216,
-0.0692611784,
0.2546756268,
-0.0881049111,
0.1379312128,
0.0783842355,
0.2493886352,
0.474598974,
-0.043943543,
-0.5338281989,
-0.0624818057,
0.2976030409,
-0.0779589936,
-0.1717202663,
0.5125024915,
-0.1398001611,
-0.0533152185,
-0.118873477,
-0.023522852,
0.0585028827,
-0.1079892963,
0.1956655979,
-0.0109939687
] |
https://github.com/huggingface/datasets/issues/2350 | `FaissIndex.save` throws error on GPU | Just in case, this is a workaround that I use in my code and it seems to do the job.
```python
if use_gpu_index:
data["train"]._indexes["text_emb"].faiss_index = faiss.index_gpu_to_cpu(data["train"]._indexes["text_emb"].faiss_index)
``` | ## Describe the bug
After training an index with a factory string `OPQ16_128,IVF512,PQ32` on GPU, `.save_faiss_index` throws this error.
```
File "index_wikipedia.py", line 119, in <module>
data["train"].save_faiss_index("text_emb", index_save_path)
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 470, in save_faiss_index
index.save(file)
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 334, in save
faiss.write_index(index, str(file))
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/faiss/swigfaiss_avx2.py", line 5654, in write_index
return _swigfaiss.write_index(*args)
RuntimeError: Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) at /root/miniconda3/conda-bld/faiss-pkg_1613235005464/work/faiss/impl/index_write.cpp:453: don't know how to serialize this type of index
```
## Steps to reproduce the bug
Any dataset will do, I just selected a familiar one.
```python
import numpy as np
import datasets
INDEX_STR = "OPQ16_128,IVF512,PQ32"
INDEX_SAVE_PATH = "will_not_save.faiss"
data = datasets.load_dataset("Fraser/news-category-dataset", split=f"train[:10000]")
def encode(item):
return {"text_emb": np.random.randn(768).astype(np.float32)}
data = data.map(encode)
data.add_faiss_index(column="text_emb", string_factory=INDEX_STR, train_size=10_000, device=0)
data.save_faiss_index("text_emb", INDEX_SAVE_PATH)
```
## Expected results
Saving the index
## Actual results
Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) ... don't know how to serialize this type of index
## Environment info
- `datasets` version: 1.6.2
- Platform: Linux-4.15.0-142-generic-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyTorch version (GPU?): 1.8.1+cu111 (True)
- Tensorflow version (GPU?): 2.2.0 (False)
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No
I will be proposing a fix in a couple of minutes | 27 | `FaissIndex.save` throws error on GPU
## Describe the bug
After training an index with a factory string `OPQ16_128,IVF512,PQ32` on GPU, `.save_faiss_index` throws this error.
```
File "index_wikipedia.py", line 119, in <module>
data["train"].save_faiss_index("text_emb", index_save_path)
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 470, in save_faiss_index
index.save(file)
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 334, in save
faiss.write_index(index, str(file))
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/faiss/swigfaiss_avx2.py", line 5654, in write_index
return _swigfaiss.write_index(*args)
RuntimeError: Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) at /root/miniconda3/conda-bld/faiss-pkg_1613235005464/work/faiss/impl/index_write.cpp:453: don't know how to serialize this type of index
```
## Steps to reproduce the bug
Any dataset will do, I just selected a familiar one.
```python
import numpy as np
import datasets
INDEX_STR = "OPQ16_128,IVF512,PQ32"
INDEX_SAVE_PATH = "will_not_save.faiss"
data = datasets.load_dataset("Fraser/news-category-dataset", split=f"train[:10000]")
def encode(item):
return {"text_emb": np.random.randn(768).astype(np.float32)}
data = data.map(encode)
data.add_faiss_index(column="text_emb", string_factory=INDEX_STR, train_size=10_000, device=0)
data.save_faiss_index("text_emb", INDEX_SAVE_PATH)
```
## Expected results
Saving the index
## Actual results
Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) ... don't know how to serialize this type of index
## Environment info
- `datasets` version: 1.6.2
- Platform: Linux-4.15.0-142-generic-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyTorch version (GPU?): 1.8.1+cu111 (True)
- Tensorflow version (GPU?): 2.2.0 (False)
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No
I will be proposing a fix in a couple of minutes
Just in case, this is a workaround that I use in my code and it seems to do the job.
```python
if use_gpu_index:
data["train"]._indexes["text_emb"].faiss_index = faiss.index_gpu_to_cpu(data["train"]._indexes["text_emb"].faiss_index)
``` | [
-0.1138691455,
0.2311162949,
0.0493214503,
0.2159425914,
0.3592372239,
0.1624384522,
0.5158486962,
0.5090634823,
0.2508895695,
0.224903509,
0.0669302344,
0.2369600236,
0.050932359,
-0.0680038705,
-0.1380848289,
-0.0389069952,
0.2700771391,
0.2628393471,
0.1573567986,
-0.1693147719,
-0.4407012165,
0.0116728647,
-0.0017448704,
0.257628262,
-0.248583585,
-0.0446780398,
-0.0931607932,
0.016883513,
-0.1002745479,
-0.4397268593,
0.0679613501,
-0.2787280679,
0.4836602807,
0.3083126843,
-0.0001119511,
0.1615926325,
0.286671102,
-0.1724366099,
-0.2263426036,
0.1483052224,
-0.0678203702,
0.1392590702,
0.0382677577,
-0.2912574708,
-0.1710163802,
-0.2987514138,
0.0940963924,
-0.2719935179,
-0.1236022338,
0.3052642643,
0.2272422463,
-0.1925358623,
0.3093000054,
-0.1131988615,
0.1893390119,
-0.020289978,
-0.1342299581,
0.0498116091,
-0.3920942247,
0.3410639465,
0.2851161957,
0.3660791218,
-0.0126445899,
-0.4190100729,
-0.2800433636,
0.1759341657,
0.6013678908,
-0.2439564764,
0.1166469976,
-0.0416834876,
0.1341055036,
-0.2888171673,
-0.3871855736,
0.1896888465,
0.2492047846,
-0.493991822,
-0.0477071479,
0.0656197071,
0.0472118109,
0.2803215086,
0.5671786666,
-0.108020559,
-0.1454776973,
-0.0482442752,
0.1810243726,
0.0769713745,
-0.0455701984,
0.2025453746,
-0.0905094817,
-0.2889377475,
-0.1879067272,
-0.0037434942,
0.0984283537,
-0.0547393262,
-0.3431198895,
0.0062902016,
-0.1757071465,
-0.4342458844,
-0.0055380575,
-0.0066522355,
-0.4312519431,
-0.0083484417,
0.2703358829,
0.1188529953,
-0.3501146436,
0.1605632305,
0.0097817974,
-0.1619333029,
0.1525248438,
0.0218437556,
-0.2132830322,
-0.092239663,
-0.1168508381,
0.1236491203,
-0.1891163439,
-0.0733327568,
0.2162268311,
-0.2217504233,
-0.5828652382,
0.3758403361,
-0.3595431745,
0.1377797872,
0.0111376746,
0.5140860081,
0.0791314691,
0.0501047708,
0.1652792841,
0.2339882255,
-0.1110546216,
-0.1419422776,
-0.2111120224,
-0.1108440608,
0.2596276104,
0.2357220501,
-0.1644800454,
-0.3422321379,
-0.0027450093,
0.0669748709,
-0.3403435946,
-0.0236200429,
0.1093345061,
-0.280696094,
0.0028566306,
0.3031328022,
0.100942038,
0.07515461,
0.191299364,
-0.3268494606,
-0.1066071466,
0.0402041636,
0.067436628,
-0.1408487856,
-0.3724989295,
0.2187590003,
0.2860941291,
-0.1972839385,
0.6523477435,
0.0753621608,
0.3555600047,
0.1765327007,
0.0953454673,
-0.0676179081,
-0.0979847386,
-0.3917904496,
0.3624822199,
0.1430673301,
-0.1860331297,
-0.0113126514,
0.0957460776,
0.0662761703,
0.3802832961,
0.568328619,
0.3160373569,
0.2390822619,
-0.2121520787,
0.4203567803,
0.2726423442,
-0.3779994845,
-0.2802849412,
0.1330712587,
-0.1357295513,
-0.212863192,
0.2011709213,
0.0591535904,
0.1582609713,
-0.0584350042,
0.4598633945,
0.1182975695,
0.0650318787,
-0.1088543758,
-0.4900941253,
-0.5541248918,
0.2036343813,
0.1098533422,
0.0084761204,
-0.191882953,
-0.1755235791,
-0.5428338647,
0.2811938226,
-0.243264243,
-0.0737854019,
0.0249402765,
0.723315835,
0.1537611037,
0.242379263,
-0.0366045199,
0.1383714229,
-0.0622229278,
-0.1854722649,
-0.0290440638,
-0.1147089526,
-0.2371760756,
-0.022327194,
0.0183745269,
0.0365043506,
0.0494049005,
0.1141125038,
0.0131479139,
-0.1199357435,
0.3434324563,
-0.2094555944,
0.0398115925,
-0.3076531887,
0.0626213923,
-0.2081639022,
0.0722264498,
-0.3703282773,
-0.4066973925,
-0.142586723,
0.1701208651,
0.3474283218,
-0.1863130778,
0.012518202,
0.3988081217,
0.0344949216,
-0.1558331698,
0.1012303308,
0.0262101907,
-0.0489242636,
-0.2536348701,
0.0307388082,
0.5145238638,
0.1880790293,
0.1472201049,
-0.0048774239,
0.3355097771,
0.1963059306,
-0.0242391657,
-0.0846970826,
0.1306782216,
0.4605296254,
-0.0087656789,
-0.0339583047,
-0.2989698648,
0.028429307,
0.0268369373,
0.055595085,
-0.0418341979,
-0.6681858301,
0.2340367287,
0.2718898952,
0.0009315135,
0.5030540228,
0.0890597627,
-0.341886282,
0.0547041148,
-0.0895657614,
-0.5434656143,
0.2345535904,
0.1372828931,
-0.1467339993,
-0.1237029359,
-0.3353570402,
-0.1771038026,
0.4169139266,
-0.225594461,
0.0904396325,
0.1040293127,
0.1014714465,
0.0593896173,
-0.1880998462,
0.0337482281,
-0.169674024,
0.0177565683,
-0.3170365691,
0.1562784761,
-0.1312712431,
0.0134497359,
-0.2444274575,
-0.1842755377,
-0.0321662575,
0.0443147868,
0.0538875312,
0.130515784,
-0.1142221242,
0.284424752,
-0.3202934265,
0.3281573355,
0.4209783673,
-0.1238970235,
-0.0517934896,
-0.0182623006,
-0.326608628,
-0.0397241823,
0.0600189455,
-0.0189725049,
0.1622941494,
-0.0822021216,
-0.0453143045,
-0.2157860398,
-0.0934123546,
0.0835175142,
-0.1467778236,
0.3859786391,
-0.0344997011,
0.087015681,
0.0051548169,
-0.0344139524,
0.1084698811,
0.0458990037,
-0.0604748428,
-0.001914163,
-0.1769493818,
0.0319456272,
-0.1569328606,
-0.2086741775,
-0.1914224774,
-0.234245196,
0.2827096581,
-0.037362393,
0.2085960805,
0.151017189,
0.0411781035,
0.214814052,
0.1120457277,
-0.0829845816,
-0.3446110785,
-0.1167995036,
0.3281378448,
-0.0233736336,
-0.4875138104,
0.0882835016,
0.0634187236,
-0.1923592389,
-0.0627997443,
-0.0927179977,
0.347402215,
-0.038161248,
0.0832142979,
-0.1545875371,
0.1555234492,
0.2991628051,
-0.0797350928,
-0.0500683375,
-0.1272292286,
-0.148306489,
0.2376612276,
0.0784067363,
0.3545718491,
-0.208663851,
0.3585047722,
-0.0277996566,
0.448690176,
0.2896329463,
-0.3432822824,
0.2418364882,
-0.0633316487,
0.2357193679,
-0.0512965955,
-0.1933169961,
0.218862921,
0.0113079343,
-0.2435845733,
0.1216403916,
-0.3592105508,
0.0010471031,
0.2625234723,
0.1317617148,
-0.012519733,
-0.2619677186,
0.1138251945,
-0.0019277022,
0.305988431,
-0.1639090329,
0.3812544942,
0.0767233148,
0.140803799,
0.2754313052,
0.4634264112,
0.2528237402,
-0.0780756697,
0.1676055342,
-0.1933820695,
-0.3587156534,
0.2600286603,
0.0077128881,
0.7269448638,
-0.0758042112,
-0.1717392206,
0.2119946927,
-0.0452222265,
0.7033803463,
-0.1883672923,
-0.3067085445,
0.3672283888,
0.351564914,
-0.5859757662,
-0.1705936491,
-0.1365605742,
0.0983963013,
0.0748950467,
0.4549066126,
-0.0962125883,
-0.1658407301,
0.0827239305,
0.0176608711,
-0.3054206967,
-0.2055088133,
-0.3597078323,
-0.293201834,
-0.1851568818,
0.2824060619,
-0.2168986797,
0.2141836435,
-0.0700113326,
0.26651299,
-0.5732186437,
-0.1213621423,
-0.0349179544,
-0.009225565,
0.3289050162,
-0.1224835217,
0.112945959,
0.0889959931,
0.0880522579,
0.2154995948,
-0.0249008387,
0.1573174894,
0.0749243051,
0.1120041832,
-0.0866683945,
0.0969558358,
0.2478042394,
-0.1018242687,
0.0557657108,
-0.1926346272,
-0.0416370034,
-0.3843398988,
-0.0372368433,
0.2731849551,
-0.0681487769,
-0.3149105906,
-0.0548361577,
0.5327312946,
-0.0808580965,
-0.0924988985,
0.0570369661,
0.2378221005,
-0.2765053809,
0.7876929641,
0.5123695135,
0.8745912313,
-0.0249332618,
0.2387754917,
0.3136333227,
-0.4298108518,
0.4504747391,
-0.0873856768,
0.3265615702,
-0.6909171343,
-0.2089762092,
0.0071771909,
0.0387978181,
0.1789016128,
-0.3683886528,
-0.495811522,
-0.0103024738,
-0.2931319475,
-0.0426608063,
0.0684217885,
0.1311559379,
-0.1014822721,
-0.3177872002,
-0.1130018905,
0.1260935813,
0.193921268,
-0.0398439765,
-0.0478851683,
-0.1176904589,
-0.1201883405,
0.0173484087,
-0.2380907387,
0.1713313013,
-0.0718619227,
0.4490129054,
-0.2436018884,
-0.1858197004,
-0.2332134545,
-0.3181995451,
0.5306910872,
-0.1426224113,
-0.1438913643,
-0.1689334959,
-0.0461880937,
-0.0520060956,
-0.0457247198,
-0.2577606738,
0.4293530583,
0.1032443866,
-0.1271426529,
0.0039666104,
0.156139493,
-0.0028366104,
-0.2947388589,
-0.136777401,
-0.416727066,
-0.1705375612,
-0.2591064572,
-0.2123646736,
0.1281217933,
-0.1432859153,
0.1266584247,
0.1254922003,
-0.2148132026,
0.3663401306,
-0.1937053502,
-0.1992467046,
-0.0968681872,
0.3377800584,
0.1716618985,
0.2284013331,
0.4187210202,
-0.0312776081,
-0.1312449574,
-0.2868304253,
-0.0087425793,
0.0588746108,
0.1039059907,
0.0444735438,
-0.3001900315,
-0.1903581023,
-0.0765731931,
-0.0567489564,
0.0982519984,
-0.4079139829,
-0.3621656299,
-0.1988673061,
-0.398455143,
0.0485118777,
-0.0694915354,
0.1906041503,
-0.03423848,
0.2257738709,
-0.1961165518,
-0.2054575533,
-0.3127098978,
0.0522203073,
-0.2639786899,
0.1025277749,
-0.1675952077,
-0.0767601058,
0.1980797499,
-0.0422762968,
0.1842721701,
0.2328882962,
0.027504921,
-0.1886849105,
-0.3180930912,
0.0942925364,
0.0779787004,
0.0868214965,
-0.1164680347,
-0.0805213973,
-0.1669327915,
-0.0123438304,
-0.1684745252,
0.183195278,
-0.0591790341,
0.175237596,
-0.0839024335,
0.1367416829,
-0.0152717717,
-0.0047836378,
0.1312591136,
0.3450071514,
0.0749551654,
0.1724461168,
-0.4182550013,
0.0649812669,
-0.1920061111,
0.0097521003,
0.222051397,
0.1787427366,
0.1739415675,
-0.2661897838,
-0.3385116458,
0.096096769,
-0.0441370457,
0.2958496213,
-0.3334262073,
-0.1905688196,
0.195924297,
0.2207363546,
-0.0675948262,
-0.0342424326,
0.2121055722,
-0.3065634668,
-0.1031314805,
0.2337244451,
0.3573592603,
0.2369273901,
-0.3551805019,
0.1168408692,
0.2302568704,
0.3061249554,
-0.0172345117,
0.0000809965,
0.1974563301,
0.1980651319,
0.1406739652,
0.161626339,
0.5372235179,
0.7073375583,
0.0098227542,
0.1949502677,
0.2588997781,
-0.0168180484,
-0.0678320602,
0.0341057256,
0.2200885713,
0.0367187448,
-0.0308129732,
0.0902555436,
-0.0053168922,
0.1024517342,
-0.2976326048,
-0.3377820551,
-0.0103421323,
0.2341648638,
-0.2971341312,
-0.1746609062,
-0.0157436375,
0.1265752763,
-0.0371047817,
-0.182404682,
0.027761776,
0.1088751927,
-0.0475754514,
0.1855153739,
-0.1767651737,
-0.1655456573,
-0.2276673466,
0.5172174573,
0.3538101912,
-0.2013292611,
0.0686092749,
0.0342889652,
-0.1833888888,
-0.2204373628,
0.2049186677,
0.4763281941,
0.4229626656,
-0.4053071439,
0.3371579051,
-0.0608101077,
0.012129778,
0.0333169065,
-0.1948700547,
0.050251063,
0.0437496379,
0.2616242766,
0.1441911459,
-0.0435962714,
-0.1528134495,
0.2445412725,
0.428522706,
-0.0031449499,
-0.0318155736,
-0.2115763277,
0.0656908005,
-0.0291514285,
-0.0721508488,
-0.337993592,
0.3102941215,
0.4012340605,
-0.0870112926,
0.2544296086,
0.1473804265,
0.0780670121,
-0.120724842,
0.2295897603,
0.1237015873,
-0.0928326175,
-0.2431090772,
0.0275109485,
-0.1323099285,
0.2722802162,
-0.0667427033,
0.14015086,
0.1952127963,
0.5284093022,
0.0032889303,
-0.2131547928,
0.2024679929,
0.1564046443,
0.3337158561,
0.3043870926,
-0.2011166662,
-0.0649316832,
-0.370244354,
-0.1155201048,
-0.0019272896,
-0.2382215858,
0.3254855871,
0.0106038172,
0.1508497894,
-0.1065703705,
-0.2740843892,
-0.0899967402,
-0.2683734298,
0.8571717739,
0.1699065566,
-0.1377745867,
-0.2573096752,
-0.3393689394,
-0.0660358146,
0.0179766435,
-0.3312303126,
0.0966607779,
-0.017148776,
0.2599119544,
-0.2001358122,
-0.240179956,
-0.3278621137,
0.6025986075,
0.1020162329,
-0.1882015616,
-0.2061789334,
0.3153870404,
-0.2367210686,
-0.1087485775,
0.0324265435,
0.2104197741,
0.0471044891,
0.5866947174,
-0.1895519197,
-0.2843568325,
0.5402364731,
-0.3223814368,
-0.2281229794,
-0.1142281964,
0.419339776,
0.3192805946,
0.3078448474,
-0.5473870039,
-0.0813800395,
0.2216363847,
0.0549649894,
-0.1970958561,
-0.1857769489,
0.2253253013,
-0.052556403,
-0.1044452414,
0.0102511812,
0.0774495229,
0.1365795434,
0.0969917178,
-0.295792073
] |
https://github.com/huggingface/datasets/issues/2347 | Add an API to access the language and pretty name of a dataset | Hi ! With @bhavitvyamalik we discussed about having something like
```python
from datasets import load_dataset_card
dataset_card = load_dataset_card("squad")
print(dataset_card.metadata.pretty_name)
# Stanford Question Answering Dataset (SQuAD)
print(dataset_card.metadata.languages)
# ["en"]
```
What do you think ?
I don't know if you already have a way to load the model tags in `transformers` but we can agree on the API to have something consistent.
Also note that the pretty name would only be used to show users something prettier than a dataset id, but in the end the source of truth will stay the dataset id (here `squad`). | It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts. | 95 | Add an API to access the language and pretty name of a dataset
It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts.
Hi ! With @bhavitvyamalik we discussed about having something like
```python
from datasets import load_dataset_card
dataset_card = load_dataset_card("squad")
print(dataset_card.metadata.pretty_name)
# Stanford Question Answering Dataset (SQuAD)
print(dataset_card.metadata.languages)
# ["en"]
```
What do you think ?
I don't know if you already have a way to load the model tags in `transformers` but we can agree on the API to have something consistent.
Also note that the pretty name would only be used to show users something prettier than a dataset id, but in the end the source of truth will stay the dataset id (here `squad`). | [
-0.1883868426,
0.11107862,
-0.1189652979,
0.3318738341,
0.3078960478,
0.1275812238,
0.2714891434,
0.2705739737,
-0.1630475968,
0.2370298654,
0.1823675483,
0.5307033658,
-0.2200145423,
0.342644304,
0.2076427042,
-0.1973492205,
-0.0799135193,
-0.0694942623,
0.0691230595,
-0.0689915642,
-0.1761094034,
-0.0907500759,
0.1633300781,
0.1583646834,
-0.0301874354,
0.0261958279,
-0.0522683188,
-0.3547732532,
-0.0490883738,
-0.3833292127,
0.0265067481,
0.2685778737,
0.2704099715,
0.0535486788,
-0.0001118513,
-0.1514769495,
0.428049475,
-0.0854012892,
-0.3574965596,
-0.3493790925,
-0.3073885441,
-0.1295088679,
0.1739203185,
-0.3760477602,
-0.1767500043,
-0.3267529011,
0.2022294998,
-0.3540715277,
0.2644024491,
-0.0619541928,
0.1767700464,
0.1459210515,
-0.1946243346,
-0.0098480983,
0.1031239107,
0.6372218728,
-0.1374300569,
0.071920827,
0.3668981194,
-0.0315235369,
0.0537886396,
0.4254775047,
0.145702824,
-0.0992738679,
0.1142931804,
0.2550069988,
0.0585156418,
-0.2441238165,
0.1967639625,
0.3080095947,
0.600446701,
-0.3262732029,
-0.5997582078,
-0.3656830192,
-0.0221375301,
0.0269222036,
-0.105964683,
0.1007208675,
0.0055736718,
0.3257198036,
0.0648370534,
-0.1178198531,
-0.3247562647,
0.1506287456,
0.2871362865,
0.6731764674,
0.0636098012,
0.2226890475,
-0.2268858105,
-0.0536066443,
0.2841744125,
-0.2307619452,
-0.0192713682,
0.3466572464,
0.0307829268,
-0.2591351867,
0.0764826611,
-0.0677653253,
0.0404176898,
0.2686680853,
0.0246034861,
0.2520868778,
-0.1839672923,
0.0570520684,
0.1863695681,
-0.0583456494,
0.3656690419,
0.3474369049,
0.1395955086,
-0.2905346155,
0.3369953334,
-0.1128103435,
-0.4009592831,
0.3998141289,
0.1455466002,
0.2362406403,
0.1147174016,
0.0293195974,
0.1392042935,
0.0995039716,
-0.0031157692,
-0.1937729716,
0.0437826328,
0.2090447992,
-0.1029656231,
0.4838325083,
-0.0575313345,
-0.0558884665,
0.2619755268,
-0.2849515378,
-0.0396051705,
-0.0428766944,
-0.1556304693,
0.2016426623,
0.1335631758,
0.470970273,
0.1575269401,
-0.2021085173,
0.0211380348,
0.0888661593,
0.5216777921,
-0.1072576195,
0.1699402034,
-0.1429650933,
-0.1553064883,
0.2478838712,
0.0340854079,
-0.331638217,
-0.3818341792,
0.090975225,
-0.1794747859,
-0.0662013963,
-0.2235243767,
0.2019514143,
-0.1236778945,
-0.0743872449,
-0.3969189227,
0.5461207032,
0.0621866062,
-0.0336481705,
0.0947901309,
0.0439008847,
-0.0805866644,
-0.0177110545,
-0.100854218,
0.480706811,
-0.3225236833,
-0.3198376298,
0.1414938718,
-0.1929110885,
-0.163778007,
-0.1636964679,
-0.4127162695,
0.2781626582,
0.0034138362,
-0.0515935607,
0.4448739886,
-0.4333395362,
-0.0318216011,
0.1604064852,
-0.0531951487,
-0.0830704495,
0.286857754,
0.2067543715,
0.1231192872,
0.0766080543,
-0.0214544274,
0.4316634536,
-0.1471987516,
0.013513946,
0.0924811885,
-0.578383863,
0.1879703552,
0.4853287339,
0.1501317024,
-0.0893119201,
0.0238715149,
0.2388888001,
0.4389699996,
-0.1998254955,
0.0331596136,
-0.1284460574,
0.2546329796,
-0.0727190971,
0.1066724658,
-0.2864491642,
-0.4631744623,
0.0916081369,
-0.1845387667,
0.3253057599,
-0.207203567,
-0.3501713574,
0.1826663464,
0.0691854507,
-0.1576731503,
0.2429236025,
0.1133721396,
-0.0418596081,
-0.1135340109,
-0.133060813,
-0.1494901478,
0.0675100908,
-0.0991158932,
-0.088989459,
-0.5047963858,
-0.0932680219,
0.0735903904,
0.1328448504,
-0.3385686576,
0.0157208648,
-0.1293935031,
-0.1548282653,
-0.0818669572,
0.0013927645,
0.3518503308,
0.1150770336,
0.1976158768,
0.6180113554,
0.2905842066,
-0.2617431879,
0.0504497178,
0.3226176202,
0.2168333828,
0.0121785607,
-0.3475639224,
0.3583141863,
-0.0680054799,
0.273709923,
0.0967420265,
-0.1490738094,
0.4255136847,
0.1746968478,
-0.3774280548,
-0.3048306406,
-0.0601773933,
0.1465277821,
0.1475243419,
-0.056813851,
0.0001652212,
0.1434460431,
0.5072765946,
-0.0879035518,
0.0534010939,
0.0310846362,
-0.0818456411,
-0.0111307623,
0.0422718488,
0.2109894454,
0.222706303,
0.2407680303,
-0.2791874409,
-0.0600429587,
0.2837832868,
-0.0428529382,
0.2694918811,
0.4083030522,
0.0491667688,
-0.2313788831,
-0.0485485718,
0.1354129314,
0.0925141126,
-0.516659677,
0.1762729287,
0.0856548995,
-0.10000512,
0.2704933286,
0.1103067473,
-0.329791069,
-0.3040925562,
-0.3567902446,
-0.1466908157,
-0.2314636856,
0.0276812967,
-0.4174094498,
-0.2768649161,
0.1285557598,
-0.1056589484,
0.2818369865,
-0.2166181803,
-0.2801746428,
-0.0808821023,
-0.6389325857,
-0.1828709096,
0.0282986704,
0.1939236522,
-0.1233167499,
0.4811226428,
-0.1316089481,
0.2442051619,
0.0948466361,
-0.5168856382,
0.2221329808,
0.1477459371,
0.1503617615,
0.0017753153,
-0.0010786168,
0.3242390454,
-0.0951401368,
0.0896562934,
-0.1282000691,
0.2495244592,
-0.0675788373,
-0.0633379444,
-0.247516945,
-0.1216360033,
-0.3174871206,
-0.6008813381,
-0.1647494286,
0.0497584976,
-0.0585565418,
0.1887987256,
0.3861450553,
-0.1314360797,
0.2721607983,
-0.1665878743,
-0.04428716,
-0.1468529999,
-0.0880572721,
0.1331968755,
-0.1097837538,
-0.1724703759,
-0.1961835474,
-0.2997510135,
0.269659251,
-0.2651051283,
0.0918115973,
-0.1628442705,
-0.0597254708,
0.0677619576,
0.0137445629,
0.0391950049,
0.3031950295,
0.1896316856,
0.0316593871,
0.1381981224,
-0.1563608199,
0.1373775899,
0.0796182901,
0.0916442797,
-0.0959927142,
0.1144301891,
-0.2332942188,
0.4291268587,
-0.0579686575,
-0.2486727685,
0.0941293463,
0.1176649332,
-0.03987756,
0.1980216503,
-0.2120457292,
-0.1962481439,
-0.069876723,
-0.1064827293,
0.3461345136,
-0.0721689537,
-0.4198966622,
-0.2104190737,
-0.0121269012,
-0.2709895074,
-0.2303487509,
0.4262936115,
-0.247102499,
0.0294648539,
0.1658519357,
0.1617810875,
-0.3989670277,
-0.0047366237,
0.058627855,
0.0179060251,
0.0122404778,
-0.1063570604,
-0.4593088329,
-0.208337009,
0.1658548266,
0.2547629178,
0.1404825002,
0.1163142025,
-0.1070871055,
-0.0591943078,
-0.0427078046,
0.0485871918,
0.3832090497,
-0.262886107,
-0.2734735608,
-0.1513476819,
-0.0940893814,
-0.2443833053,
-0.0047429027,
-0.4492410123,
-0.2510792613,
0.0672512352,
0.5958281159,
-0.3425454795,
-0.1368211061,
-0.0067863301,
0.110407643,
-0.3247511089,
-0.1207775548,
-0.0612855069,
0.0893331543,
-0.3224771917,
0.0090525886,
0.0288017243,
-0.0605014041,
0.1205050945,
0.0186337065,
0.0029251343,
0.2122986764,
0.2857385576,
0.5010877252,
0.0051695169,
0.1010546908,
0.1019243598,
0.1425134093,
0.0653046295,
-0.2637545764,
0.2954244614,
-0.1171860322,
-0.4510860443,
0.1569933146,
-0.1934812814,
0.4109796286,
0.2477845103,
0.1050265729,
0.2390011698,
0.3234278858,
-0.0419201069,
-0.5307345986,
0.2066846341,
-0.1548742205,
0.1049120352,
-0.5274235606,
-0.9195458889,
0.6403462291,
-0.0359966867,
-0.2454497069,
0.1327770054,
0.2789332271,
-0.395260334,
0.9277619123,
0.2805679142,
1.1838775873,
-0.1109057218,
0.1133577302,
-0.2915831208,
-0.2011345774,
0.6841207743,
-0.2174704671,
-0.098172009,
-0.3596976697,
-0.1068284437,
-0.1066987664,
-0.0206151791,
0.1701850146,
0.4003400803,
-0.2707737386,
0.0070977253,
0.0679797828,
0.2797982991,
0.0900010243,
0.696133554,
-0.1064020693,
-0.5078459382,
-0.1485536695,
0.1092171147,
-0.2880717218,
-0.0006131501,
-0.1443094611,
-0.2325150818,
-0.2226058245,
-0.0717894658,
-0.3035660982,
0.1049664393,
-0.2098395079,
0.1903996468,
-0.0677831769,
0.0253503229,
0.4092524946,
-0.075643152,
0.20828408,
0.3011298478,
-0.3239887655,
0.1833636314,
-0.2004254013,
0.1588975489,
0.124203071,
-0.0974761695,
0.3460092843,
0.1220506802,
-0.3134865761,
0.3545213938,
0.2316940874,
0.0650303215,
-0.5912468433,
-0.0323429815,
0.2109404951,
-0.1195841581,
-0.2272165716,
-0.1336147189,
-0.1775827706,
0.0088970298,
0.1382501721,
0.2032518536,
-0.2360197604,
0.1328653991,
0.2284074575,
-0.0286661386,
-0.0831756741,
-0.0430632718,
0.0103242202,
-0.1383846551,
0.2229238898,
0.0731719062,
-0.0880992934,
-0.2573054433,
0.1589407921,
0.2945398092,
-0.5770972967,
-0.3447635174,
0.20882231,
-0.329033643,
-0.163915813,
-0.2163969427,
0.1821505874,
-0.0085370364,
-0.0631076396,
-0.2203497738,
-0.3973638415,
0.2896132767,
0.139259547,
0.240306735,
0.0678501204,
-0.3488306999,
-0.2570100427,
0.248011142,
-0.3264060616,
-0.3125220239,
0.0208860021,
0.2037795335,
0.1241405308,
0.0463335216,
0.0368686728,
-0.2900847197,
0.0525610261,
-0.0961515307,
0.0332684815,
-0.2268169671,
-0.4099678695,
0.1431797445,
0.1258357912,
0.0287392177,
-0.1444208622,
-0.0890865847,
0.1120793149,
-0.3430498242,
0.0900221542,
-0.0147030698,
0.1279264838,
0.4478999078,
0.1400704682,
0.0852238685,
-0.2326353788,
0.255123198,
0.0884525999,
0.2350687981,
0.3074108362,
0.213178888,
-0.0286646131,
-0.0068742577,
-0.0918989852,
0.2367048264,
0.3232363164,
0.2591976225,
0.019937152,
0.0331576057,
0.3183540702,
0.3111642897,
-0.0162220392,
0.1008429602,
0.0148458937,
-0.0186627358,
0.1883948892,
0.2323777825,
-0.2617146373,
0.0040877853,
-0.0288035814,
-0.1045659482,
0.1420138031,
0.4495282471,
-0.0260926746,
0.435901165,
0.0027752363,
-0.0543319955,
0.5126652122,
0.0542791188,
0.2052692026,
0.3901945055,
0.0100831566,
0.121239759,
0.2000375986,
0.1871793121,
0.2621741891,
0.2354496121,
-0.1585981846,
0.5301883817,
0.0568320341,
0.1388510168,
0.271740675,
0.108563751,
-0.0960553437,
-0.1925895065,
0.0369625017,
0.4369645417,
0.1960624903,
-0.0556248426,
0.0479138121,
0.0679950267,
-0.2876182199,
-0.1570555419,
0.0580419786,
-0.2667612731,
0.0368296951,
-0.0722603202,
-0.0605614707,
-0.1712154001,
0.0636689588,
-0.364452213,
0.0271639656,
0.1770180017,
-0.0277990866,
0.0680295825,
0.0085925329,
0.2444882691,
0.1561803669,
-0.2653383315,
-0.1434295475,
0.0931200534,
-0.06880638,
-0.2415265441,
0.1719185263,
0.0235703886,
0.1138700321,
-0.131937921,
0.3289742768,
-0.1361105293,
-0.100030072,
-0.1604032964,
0.1897662282,
0.1998184472,
0.0366170108,
0.0214317422,
0.1722930074,
-0.1096117571,
-0.3068856597,
0.1988538802,
0.0478213541,
-0.039237339,
0.6089423299,
0.195597887,
-0.1415048838,
-0.1341376156,
0.1517566144,
-0.5333813429,
0.2032198012,
0.5581696033,
0.165026769,
0.0316836573,
-0.0624931678,
0.0436933637,
-0.0113293817,
0.3779028952,
0.1115214527,
0.2741173804,
-0.3451052606,
0.3276252151,
-0.410155803,
-0.1148514077,
0.1545855999,
0.1877102107,
0.0373595245,
-0.0740534961,
0.3624299765,
0.1715917736,
-0.2454891056,
0.1477737427,
-0.0864701495,
0.126827538,
-0.2789255083,
-0.235233888,
-0.17527242,
0.2359232455,
0.0659241751,
-0.1839324832,
-0.0510216765,
0.1628498435,
-0.0599642321,
-0.6815495491,
-0.1216641963,
0.2556999028,
-0.0708702058,
0.3999888599,
-0.0054889428,
0.3638623655,
-0.0179952029,
0.0898324996,
-0.1918761432,
-0.1961183846,
-0.0333203338,
0.4306811988,
0.1151779443,
0.1724220067,
-0.0141095072,
-0.1996964961,
-0.2273338586,
-0.3305165172,
-0.2913438082,
-0.369266212,
-0.4320269525,
-0.050330244,
-0.1914568394,
0.0151616912,
-0.1938504577,
0.1640467197,
0.0646579862,
0.0513591319,
0.073924996,
0.0380444117,
0.3093400598,
-0.3006002903,
-0.3384079039,
-0.0731963813,
0.0880760923,
-0.3810871542,
0.1482791752,
-0.6339803934,
0.1331761032,
0.3060173988,
-0.1305230856,
-0.0326127373,
0.2848795354,
0.4409701228,
0.1968100965,
-0.306433022,
0.2921519279,
-0.0798793584,
0.0057388744,
-0.2772656381,
-0.1848959476
] |
https://github.com/huggingface/datasets/issues/2347 | Add an API to access the language and pretty name of a dataset | What dataset_info method are you talking about @julien-c ? In `huggingface_hub` I can only see `model_info`. | It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts. | 16 | Add an API to access the language and pretty name of a dataset
It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts.
What dataset_info method are you talking about @julien-c ? In `huggingface_hub` I can only see `model_info`. | [
-0.2759426832,
-0.1491748691,
-0.0873623937,
0.4150778353,
0.34213835,
0.118972078,
0.3897389174,
0.3709772229,
-0.0223612078,
0.3746368289,
0.0779035091,
0.5090551376,
-0.0601513535,
0.3841818571,
0.3461504281,
-0.2023470253,
-0.1172479391,
0.0129679786,
-0.0803342462,
-0.1211483479,
-0.196213752,
0.0521038249,
0.1108371541,
0.1241699979,
-0.2669220269,
0.0454564653,
-0.054000441,
-0.1388418823,
-0.0790889934,
-0.3375248015,
0.0865439624,
0.2850351036,
0.2838592827,
0.0294624958,
-0.0001076397,
-0.0245081056,
0.4776879847,
-0.1515954584,
-0.3618724942,
-0.2217720151,
-0.3296574354,
-0.173314482,
0.2418282628,
-0.4034036696,
-0.1884512156,
-0.2138312161,
0.2244215161,
-0.1580803692,
0.3432011604,
0.0513029583,
0.2172972411,
0.3994911611,
-0.1026756614,
-0.1373631358,
0.0476137325,
0.6418024898,
-0.2143193185,
-0.0689422265,
0.2645702958,
0.1362211704,
-0.1340623945,
0.4863949716,
0.2200392783,
-0.1540043056,
0.050141748,
0.1936685592,
0.0280212536,
-0.1995520443,
0.1938814521,
0.2981423438,
0.525098145,
-0.28988868,
-0.4724096656,
-0.3455621898,
-0.0765760913,
0.0059019504,
-0.0632784814,
0.1038327813,
-0.0781572834,
0.3310471177,
-0.0015482465,
-0.1827414185,
-0.369879961,
-0.0884884968,
0.3872871101,
0.6222916842,
-0.0667795017,
0.2156384587,
-0.1351894289,
-0.0614890046,
0.282525599,
-0.1690821201,
-0.1277249753,
0.2868188918,
-0.0393230766,
-0.3108914495,
0.2393342704,
0.119290337,
0.0675931349,
0.1376779675,
0.1428590566,
0.3573160172,
-0.1809934378,
0.0888538584,
0.1385019422,
-0.0307540987,
0.3093574345,
0.2264122963,
0.2360426337,
-0.0215281639,
0.3387373984,
-0.2190622687,
-0.3292753994,
0.4511210322,
0.0249062572,
0.2304006964,
0.1044781581,
-0.0164833199,
0.1443422288,
-0.0354276821,
0.2760776877,
-0.2522012889,
0.1782285124,
0.2969039381,
-0.0513973236,
0.3812256753,
-0.1183514744,
-0.1153667122,
0.0954158008,
-0.3546552956,
-0.1189889237,
-0.0383491144,
-0.1936369836,
0.2752453387,
0.0766616017,
0.3325629234,
0.1666309834,
-0.1525790095,
0.0196105503,
0.2120028138,
0.3784129918,
0.0297197513,
0.1751951426,
0.0140855163,
-0.1419989467,
0.147435382,
0.0596461669,
-0.0874046534,
-0.4299758673,
-0.0136392349,
-0.3822398484,
-0.3169520795,
-0.2568475604,
0.1982746422,
-0.0872389376,
0.0501367301,
-0.3038825095,
0.6148661375,
-0.0784493461,
-0.1066773459,
0.1258226633,
0.11141406,
-0.1736578345,
-0.0588232093,
-0.0618401393,
0.4257544875,
-0.2679543495,
-0.3829315007,
-0.0307527222,
-0.3184655905,
-0.047787156,
-0.1005382836,
-0.5002000332,
0.21817711,
-0.0935140401,
0.0518310182,
0.497179687,
-0.3273156881,
-0.0425871909,
0.1693953127,
-0.0166762322,
-0.0804446116,
0.2692884207,
0.1571595073,
0.0533843786,
0.0325233489,
-0.0044335001,
0.272538662,
-0.1532929689,
0.0294047575,
0.0630580112,
-0.5404415131,
0.05461118,
0.3931620717,
0.0242334194,
0.0829237103,
0.1160225496,
0.2529340088,
0.4412280321,
-0.1962566227,
0.0433008857,
0.0485788472,
0.2425803244,
-0.1425724477,
0.1200498864,
-0.2552193105,
-0.5282458067,
0.1342333853,
-0.2967628539,
0.3904132545,
-0.2090805024,
-0.3232310414,
0.1848081052,
0.1415602565,
-0.1126803309,
0.0030876901,
0.1554496735,
0.0829652399,
-0.0735127404,
-0.2124794871,
-0.2460972965,
0.1851909906,
-0.0752021819,
-0.0761940703,
-0.6570017934,
-0.10365998,
0.0326337591,
0.0452940278,
-0.2922041714,
-0.006101036,
-0.050363116,
-0.2164348662,
-0.12347278,
0.0844234303,
0.2959617078,
0.123316519,
0.0977291167,
0.5998769999,
0.2218782306,
-0.1326134801,
-0.0450717621,
0.0476415865,
0.2004658282,
0.0296689793,
-0.3212014139,
0.4076060057,
0.0848570764,
0.1917536408,
0.1073312089,
-0.0558089353,
0.3379789889,
0.2143082768,
-0.2994887233,
-0.3178259134,
-0.0228858218,
0.2004349232,
0.2086058706,
-0.0387230553,
-0.0429478772,
0.1227268279,
0.6142539978,
-0.0771297738,
-0.0394023769,
0.1776138097,
0.0620754771,
-0.058025226,
0.2085752934,
0.1728254408,
0.2795034945,
0.2470294684,
-0.2898239195,
0.017585095,
0.2250062525,
-0.0426241308,
0.2176297754,
0.2541158795,
0.1007628217,
-0.297541827,
-0.0693696439,
0.0942357406,
-0.0805075765,
-0.5052797198,
0.1470462382,
0.1081084237,
-0.1146176755,
0.2134942114,
0.00482067,
-0.1865447611,
-0.2260831445,
-0.2593697608,
-0.2423834354,
-0.2321570367,
0.06392546,
-0.3443923593,
-0.2731079161,
0.1675045192,
-0.1685520858,
0.4209562838,
-0.1939251274,
-0.0794453472,
-0.3274481297,
-0.4993184805,
-0.1878134459,
0.0564040989,
0.1114860103,
-0.0859059095,
0.4333533049,
-0.1752042919,
0.2551007271,
0.0451661386,
-0.4706529379,
0.3559004664,
-0.033787556,
0.1094469801,
0.215941444,
0.1232698411,
0.3101499081,
-0.0756683797,
0.1584523767,
-0.2096819878,
0.1183525845,
-0.0982744396,
-0.0985590965,
-0.2147691846,
-0.1783457994,
-0.2231878638,
-0.3574553728,
-0.3391285539,
0.1538424343,
-0.1468396634,
0.2661873996,
0.3840100467,
-0.1879552901,
0.3901929557,
-0.1318162382,
0.006987819,
-0.1764029562,
-0.2814936638,
0.0871335045,
-0.2605360448,
-0.2236506343,
-0.2518215179,
-0.2001709044,
0.3316063583,
-0.1917029023,
-0.0048789387,
-0.1415724903,
-0.3200158477,
0.0396234468,
0.0485229641,
0.1005734727,
0.5203319788,
0.1714389175,
-0.0038114411,
0.0036428154,
-0.3489682674,
0.1289698929,
0.1856226772,
0.0381869562,
-0.0448596217,
0.1224044338,
-0.2703685164,
0.3509936631,
-0.1466288865,
-0.1390264779,
0.2506446838,
-0.0224202182,
0.1232721657,
-0.0202531125,
-0.1759901196,
-0.1975339055,
-0.0261258483,
-0.1281019449,
0.2923990488,
-0.0998624489,
-0.2114879042,
-0.2865623534,
-0.1411034912,
-0.1324397326,
-0.2634535134,
0.4139842391,
-0.1196354032,
0.0964193717,
0.1225677356,
0.1635968387,
-0.3575397432,
0.0989446267,
0.0790401027,
0.0718185306,
0.0586116016,
-0.1438411474,
-0.4632588923,
-0.2092456669,
-0.0405967198,
0.3120366633,
0.0798461139,
0.098973684,
-0.2552245259,
-0.1933972836,
-0.0437652655,
0.0099867536,
0.3893164694,
-0.2974931896,
-0.4550481737,
-0.1842499524,
-0.2364062667,
-0.3232533038,
0.0257843975,
-0.4025106728,
-0.2186631113,
-0.0348205157,
0.6307071447,
-0.3656852245,
-0.3308065534,
0.0633180588,
0.0039727921,
-0.3565925956,
-0.1163437217,
-0.1900062114,
0.0624510236,
-0.3366024196,
-0.0849278346,
0.0200804695,
-0.0210249797,
0.1621303707,
0.0979930758,
0.1038380787,
0.1954332739,
0.1701416671,
0.5530712605,
-0.0327248909,
0.0767158419,
0.0087064793,
0.2072024792,
0.1496102214,
-0.1514509916,
0.3655209839,
-0.1082002521,
-0.3777084947,
0.2084165961,
-0.0988678858,
0.4041393697,
0.3018055856,
0.121410735,
0.30605793,
0.3197748959,
0.0132705746,
-0.5712267756,
0.2327617705,
0.0038013263,
0.0152421789,
-0.5912834406,
-0.7295432091,
0.6037896872,
-0.180696696,
-0.166204676,
0.2758643925,
0.444175452,
-0.3743601441,
0.8279211521,
0.2387398481,
1.1571500301,
0.0049297516,
0.1082107127,
-0.2190337777,
-0.1763717532,
0.6383495331,
-0.1340515763,
-0.0354389697,
-0.3163112998,
-0.1272503883,
-0.1556322873,
0.0454395451,
0.2552592158,
0.2740702033,
-0.2787871659,
0.0618555322,
0.1432450563,
0.2030653656,
-0.0726200044,
0.5821606517,
-0.2201787084,
-0.5713000298,
-0.2741290927,
0.1341062188,
-0.2298971713,
0.1336823851,
-0.1209981516,
-0.3156326413,
-0.0603216551,
-0.2010239363,
-0.364135921,
0.0349948443,
-0.1870695055,
0.0755528137,
0.0728016421,
0.1158521324,
0.3465058804,
-0.0590805672,
0.1576420516,
0.2652767301,
-0.4127753079,
0.2081745714,
-0.3386720419,
0.1951900125,
-0.0009971998,
-0.1399053782,
0.3260089159,
0.0263083354,
-0.4010034502,
0.2274023443,
0.1553503573,
0.0811639652,
-0.4271914363,
-0.0589179471,
0.1183515564,
-0.1351007223,
-0.190910235,
-0.1581842899,
-0.2536537051,
-0.1162064523,
0.1612605751,
0.0736363158,
-0.2075065523,
0.0647430122,
0.2558288574,
-0.0246777833,
-0.1540743411,
-0.0130585767,
-0.1613878459,
-0.1768432409,
0.1780763119,
0.0551513471,
-0.0571138859,
-0.2974295318,
0.103377372,
0.5576293468,
-0.6720746756,
-0.2136092782,
0.1543544829,
-0.3262690306,
-0.1795614511,
-0.0015344728,
0.1489673406,
-0.0895678326,
-0.0993055478,
-0.1393266767,
-0.5680274367,
0.2761215568,
0.0222769212,
0.3341535926,
0.0225741211,
-0.2911902368,
-0.1335540861,
0.3174355924,
-0.36668697,
-0.3855102956,
-0.0382179432,
0.1187954992,
0.2027068436,
0.0907616243,
0.2256062925,
-0.1537210643,
0.0361882113,
0.0366792232,
-0.061862655,
-0.1893773973,
-0.4390672743,
0.1291116029,
0.0757047012,
0.1053546965,
-0.1097315326,
-0.0448512994,
0.0111412341,
-0.3443036973,
0.2489368618,
0.0468479097,
0.1269065887,
0.5435544848,
0.2113693058,
0.0683461875,
-0.2815259695,
0.1473040879,
0.1519030631,
0.3099834323,
0.2464328557,
0.0900698379,
-0.2311072797,
-0.0207083412,
-0.0119200787,
0.3951293826,
0.4228619039,
0.1954632998,
-0.0516202934,
0.1905958652,
0.2433230728,
0.1549431682,
0.1229508668,
-0.0251103379,
0.0028265687,
0.0069450415,
0.2330277264,
0.2194880694,
-0.1700417101,
0.0364909843,
-0.032467138,
-0.1786348224,
0.1470064521,
0.4730041325,
0.0629316717,
0.4394764602,
0.1933119893,
-0.0391317941,
0.3884004951,
-0.0180237442,
0.1633434743,
0.4092828631,
-0.0543865114,
0.2335223556,
0.4315813184,
0.1384377778,
0.2905994356,
0.3131821454,
-0.1412361562,
0.5300729871,
0.0180791542,
0.1420875192,
0.3447796106,
-0.0635809153,
-0.0474327914,
-0.2558318079,
0.0265274979,
0.4020938277,
0.1237142384,
0.0359306745,
0.0616868995,
0.0532746091,
-0.3657340407,
-0.0872217864,
-0.1554146558,
-0.2191475332,
0.0888077691,
-0.022028083,
-0.0962609872,
-0.1248002797,
0.1701054871,
-0.0733879581,
0.047295846,
0.066097334,
0.0869520828,
0.1095824167,
-0.061501734,
0.3258790076,
0.1874179244,
-0.2220152467,
-0.0190382134,
0.1866028458,
-0.2159178257,
-0.1455267519,
0.2004790008,
0.0651552528,
0.0697601289,
0.0586061105,
0.3083478212,
-0.0643000603,
-0.0909109563,
-0.1469630003,
0.26063627,
0.1961842328,
0.1402206123,
0.0009802713,
0.1745382547,
-0.1317767054,
-0.2461847514,
0.0526572168,
0.105031617,
-0.051928129,
0.5253124833,
0.1650741398,
-0.2007722259,
-0.2089076191,
0.1433088332,
-0.4348696768,
0.1977425218,
0.4484321475,
0.0286456812,
0.0409163125,
-0.1360028237,
0.0782455653,
-0.0245528966,
0.6048403978,
0.133300662,
0.0883970857,
-0.2785167396,
0.1097174063,
-0.3128062785,
-0.0625599101,
0.17690593,
0.1858274937,
0.1176984757,
-0.1474124193,
0.3364089727,
0.0009133149,
-0.1275831014,
-0.025955962,
-0.0427299403,
0.0922178105,
-0.2509529889,
-0.1546510458,
-0.2082228512,
0.0799682364,
0.0380615629,
-0.1675680578,
0.0793033838,
0.2785613835,
-0.0724619254,
-0.6869021654,
0.0119714011,
0.1952443421,
-0.0633658096,
0.2783082724,
0.1250912547,
0.4131274819,
-0.2456312627,
0.1188135371,
-0.251000464,
-0.1941518486,
-0.030201776,
0.2311799079,
0.1099971533,
0.0896772072,
0.0272127949,
-0.3131050169,
-0.4556754827,
-0.1158590093,
-0.1330260187,
-0.1714406312,
-0.3130781949,
0.0191308819,
-0.2408622056,
-0.1093681157,
0.0500593595,
0.1687130481,
0.161169976,
-0.1018983647,
0.0430992581,
0.0226524547,
0.3717008829,
-0.1529972851,
-0.4717787206,
0.0047612814,
0.0835174024,
-0.4209594727,
0.026865378,
-0.7214283347,
0.1415534317,
0.1885474026,
-0.1172913164,
-0.1767593026,
0.424462527,
0.3451029062,
0.1086067259,
-0.263703078,
0.4320711493,
0.114865005,
-0.0227838084,
-0.2236899585,
-0.1537887454
] |
https://github.com/huggingface/datasets/issues/2345 | [Question] How to move and reuse preprocessed dataset? | <s>Hi :) Can you share with us the code you used ?</s>
EDIT: from https://github.com/huggingface/transformers/issues/11665#issuecomment-838348291 I understand you're using the run_clm.py script. Can you share your logs ?
| Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this? | 28 | [Question] How to move and reuse preprocessed dataset?
Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this?
<s>Hi :) Can you share with us the code you used ?</s>
EDIT: from https://github.com/huggingface/transformers/issues/11665#issuecomment-838348291 I understand you're using the run_clm.py script. Can you share your logs ?
| [
-0.1601244658,
-0.326133579,
0.0653829128,
0.3396511972,
0.286459893,
0.1715733111,
0.1354573667,
0.1812241077,
-0.0809118152,
-0.1558371335,
-0.1377900839,
0.039877139,
-0.1689591855,
0.0587201193,
0.2985677421,
-0.2673768997,
0.155224815,
0.0188225321,
-0.3201617599,
0.0475620814,
-0.0599808097,
0.0041697696,
-0.0590552203,
-0.2007914484,
-0.4416157901,
-0.0313770175,
-0.2480148971,
0.1666656733,
0.1828493029,
-0.1862577051,
0.2532929778,
0.2420495749,
0.3576467633,
0.6828823686,
-0.0001243633,
0.1335572004,
-0.2728152275,
-0.2317270786,
-0.2766864598,
0.0331291147,
0.3927205205,
-0.1214861795,
-0.135030672,
-0.1829704642,
-0.4399236739,
-0.313642472,
-0.1345022023,
-0.4278992116,
0.7499093413,
0.1695950627,
0.0427682176,
-0.2132156789,
-0.2778232396,
0.0085034678,
0.0278573092,
0.0635983571,
-0.014204056,
0.1301350892,
0.2992687523,
0.056122493,
0.2704517245,
0.0200519711,
-0.1339309216,
0.1400893778,
0.1526925117,
-0.2002476454,
-0.2576467991,
-0.0023743715,
0.2037415504,
-0.0177667458,
0.3946383893,
-0.5167761445,
-0.0736816451,
-0.3228445649,
0.0029746466,
-0.5202156305,
-0.2885062099,
0.1219023243,
0.0930978134,
0.4745030403,
-0.4211559296,
-0.4792868197,
-0.1270094216,
-0.4231947362,
0.2090490609,
0.1758556962,
-0.0334333964,
0.2210970521,
-0.0002787526,
0.3428713977,
0.2461338043,
0.0327332206,
-0.2068687081,
0.2302810699,
-0.0386437997,
0.041680716,
-0.1857779026,
0.1895506978,
-0.0354909785,
0.3463315368,
-0.0219857804,
-0.2044128627,
0.3041285574,
-0.2163733393,
-0.0310897045,
0.3699340224,
-0.2382047623,
0.3691020012,
0.0616071224,
-0.2548556924,
-0.3396957219,
-0.2820077538,
-0.3452653289,
-0.0796070993,
0.3917409778,
0.3445878923,
0.1377708912,
-0.1579304338,
0.0967466161,
0.0325184725,
0.0305025112,
-0.3261357248,
-0.1352858692,
0.1969964355,
0.0150934858,
0.12617293,
0.293851316,
0.082636103,
-0.1128121316,
-0.3416503072,
-0.1811543703,
0.145542115,
-0.3331010342,
0.348199755,
0.028701311,
-0.0148704015,
0.2117707282,
0.0153674223,
0.1050676554,
-0.1169732958,
0.4738582671,
-0.0793645158,
0.1513178498,
0.2509044409,
-0.1366549581,
0.2494836748,
0.2912721038,
0.346193254,
-0.2379506081,
0.5287487507,
-0.2154995054,
-0.3498137295,
0.4890763164,
-0.0687369406,
0.0280097313,
0.1787003279,
-0.2850992084,
0.0660906807,
0.4531787336,
0.0426069386,
-0.0363986008,
-0.2588699162,
-0.1559436321,
-0.2766832113,
0.2264142483,
0.1548081338,
-0.3293085098,
-0.1583407074,
0.3445461988,
0.228521347,
0.3519315124,
0.3867344558,
-0.2995575666,
0.4961068332,
-0.2172497064,
-0.3410746455,
0.4171504378,
-0.3627424538,
-0.0831839591,
0.0610205829,
-0.0586273633,
0.0295940079,
0.0395396687,
0.0728783384,
-0.1641702801,
-0.3265633583,
-0.391664356,
0.5252674818,
0.0657278821,
0.0954928547,
-0.3008168638,
-0.2864236832,
0.2404653728,
-0.1850555539,
0.0782071277,
0.1647514403,
-0.135128051,
0.0696573257,
0.2654246688,
-0.1466564536,
0.1503963917,
0.2112935781,
0.1797008365,
0.1057514772,
-0.0425685942,
0.02289664,
-0.4002119601,
0.1264650971,
-0.2417496294,
-0.2840821743,
0.3042553663,
-0.163541019,
-0.2996503413,
-0.1877945513,
-0.2450936437,
-0.2375672013,
-0.0899937972,
0.1676107794,
0.4852061272,
-0.2807750106,
-0.2159509063,
0.4022930861,
-0.0248983894,
0.0942258909,
-0.0614657439,
0.2730466127,
-0.0532381758,
-0.149919644,
-0.1567531228,
-0.1414905339,
0.373939693,
-0.3398054242,
-0.105707109,
0.3445956707,
0.0315978341,
0.1384757012,
0.0972631946,
0.3569541574,
-0.0082066618,
-0.2292221338,
0.27191028,
-0.0102203665,
-0.0274843294,
-0.0911906511,
-0.3177952468,
0.3725720644,
0.0262955669,
0.1716698855,
0.0985738114,
-0.2230464816,
-0.1204785854,
-0.2000549734,
0.1363729835,
0.2361080647,
0.008320014,
0.1606229991,
0.3446005881,
0.206346035,
-0.0403266884,
0.240344286,
0.3612610102,
0.0553271845,
-0.0649842173,
-0.150796622,
-0.228865087,
-0.3063419163,
0.0669334158,
0.0615005121,
0.0432640873,
0.0668411776,
0.2860630453,
0.2623816431,
0.0553234704,
-0.0461748056,
0.07678774,
-0.2649207115,
0.4027984142,
0.0500799455,
0.019139519,
0.0634207577,
0.2220072597,
0.4308409095,
0.2273505628,
0.4133348465,
-0.1975354999,
0.2897774279,
-0.2299526632,
0.1958617717,
-0.1645826399,
0.1251367778,
0.0235756263,
0.1068695933,
-0.2166397125,
0.3630878627,
0.351200819,
0.0673118979,
-0.0015809258,
0.0693940595,
-0.0673959181,
-0.2549566031,
-0.0874468088,
-0.2556748092,
-0.0744590536,
-0.086139828,
0.2902084291,
-0.1208376884,
0.2638794184,
0.1115591228,
-0.0741840228,
-0.283079803,
0.2449821532,
0.2341543883,
0.0082210014,
0.1375829875,
-0.1480496079,
0.3238553703,
0.140775919,
0.2528505921,
-0.0139527591,
-0.1429396421,
-0.0660811886,
-0.1644587219,
-0.1860048324,
0.1651820391,
-0.0793918893,
-0.2665190101,
-0.1722406447,
-0.0440107174,
0.1693968177,
0.1464497,
0.0157913752,
-0.0370966084,
0.0460882373,
-0.228190437,
0.3308413923,
0.199773252,
-0.1972012222,
-0.7081503272,
0.1870310009,
-0.0855589658,
-0.1360954195,
0.0187751148,
0.1196088493,
0.2030192167,
0.2234840989,
-0.3637008071,
-0.1337096095,
-0.1479482055,
0.0738006607,
-0.0395294502,
0.2716372013,
0.4804905355,
0.0577305295,
0.0834794044,
0.021952277,
-0.0803536326,
0.3806949258,
0.1315559447,
0.1364147961,
0.1978851706,
0.2309721112,
0.1304402053,
0.8657287359,
0.1493237913,
-0.0853930637,
0.1692262739,
0.0596272685,
0.211221844,
-0.3018944561,
-0.0521550551,
0.0147801898,
0.0333521627,
-0.349948734,
0.1703593284,
0.0205535162,
-0.1342287064,
-0.1104605123,
0.0983521938,
-0.0135280099,
-0.2050617337,
0.174050644,
0.0571839325,
0.4164004028,
0.1700700074,
-0.0592019521,
-0.2642397583,
-0.0906217918,
0.0867495239,
-0.1253441572,
0.5051721931,
0.3344733119,
-0.4985049069,
-0.059376929,
-0.4051257372,
0.2841691077,
-0.1172836795,
0.0056694048,
0.0332441181,
-0.105806157,
0.2011014968,
-0.2289657891,
0.2696994841,
-0.1669820547,
0.0831259862,
0.3571746051,
-0.1333175302,
-0.0036285045,
-0.1654504091,
0.0012459095,
0.2042502761,
0.2525527775,
-0.0918647423,
-0.2378340364,
-0.3394631743,
0.0686187297,
0.2582440674,
-0.5208461881,
0.0637169853,
-0.2125195116,
-0.4796687067,
-0.3496027589,
0.130287528,
0.3499252796,
0.0401250608,
-0.1907972097,
0.3724318147,
-0.1583039612,
0.0489159562,
0.3282654285,
-0.083472155,
0.3856499195,
0.1348901093,
0.1237286627,
0.1112383679,
0.1829809994,
0.0165110268,
0.291461587,
-0.2944530547,
0.3888115585,
-0.1182243824,
0.0383462347,
0.3628846407,
0.2960477471,
-0.084883064,
0.1007579789,
-0.196342811,
0.1107584909,
-0.5120968223,
0.0160589721,
0.0757872388,
-0.0612055734,
-0.5460216403,
-0.7416170239,
0.002743155,
0.3119482994,
-0.1413750201,
0.3256016374,
-0.1791389734,
-0.3482349813,
0.1249273345,
0.133727774,
1.2701584101,
-0.3682627678,
0.3932270706,
0.0407308452,
-0.0616525449,
0.2148337811,
-0.3995700181,
-0.0484811813,
-0.3540830016,
-0.1910410821,
0.0414213985,
-0.1402022541,
0.2701316178,
0.1966875345,
-0.1686209291,
0.4666833878,
-0.387773782,
-0.1828292459,
-0.0821988508,
0.2741081715,
0.3067519069,
0.0062171519,
0.2844864726,
0.0441114195,
-0.2560626566,
0.0312992632,
-0.1887557805,
0.17665115,
0.14921242,
0.1573363692,
-0.3251629174,
-0.0547247119,
-0.5776565075,
0.1004327387,
-0.3510808647,
-0.4542568028,
0.0257120542,
0.0467072576,
0.6525632143,
0.0427266173,
-0.0445944853,
0.2635795176,
-0.2201931179,
0.0209861081,
-0.2038312107,
0.1770689785,
0.3226629198,
0.0799310282,
-0.1761855185,
0.232417345,
-0.0096872961,
-0.3173390031,
-0.1525357962,
-0.4009661078,
0.2816937268,
-0.2887679636,
-0.2285510004,
0.5524755716,
-0.0141876079,
-0.178688705,
0.0377792194,
0.3203524351,
-0.313981384,
0.3353334963,
-0.2060258836,
-0.2728104293,
-0.0520526581,
0.1235838234,
0.3762609065,
-0.3565504551,
0.4092617035,
0.2852985561,
-0.0503522605,
-0.0718016326,
-0.0397052094,
0.1862612367,
-0.4198504388,
0.2662210464,
0.0312097203,
0.0564381033,
0.001747111,
0.0117729474,
-0.0020350909,
0.097258307,
-0.1192918494,
0.1641536057,
-0.4360485971,
-0.1915823072,
0.2404494733,
0.4087904692,
0.2104061842,
0.0536773801,
-0.0588934906,
0.3609115779,
-0.205777362,
0.1455695629,
0.0549991094,
0.1449221224,
0.2417038381,
-0.2105195671,
-0.0113021936,
-0.16702196,
-0.0560570993,
-0.0815703049,
-0.0990908742,
-0.1287228167,
-0.3700264096,
0.2282633781,
-0.0982034504,
-0.0623372123,
-0.0429419689,
-0.5152862668,
0.0373098813,
-0.3559049964,
0.1376359761,
0.2939298749,
0.1237008199,
0.1071035266,
0.3744121492,
-0.3064485192,
-0.1304827482,
-0.0919971317,
0.110668011,
-0.1535521001,
0.1488147676,
0.1349714845,
0.1269025654,
-0.11728701,
-0.2406551838,
-0.0245025363,
0.5484567881,
0.1106053218,
0.2084983885,
-0.1628064364,
-0.0436512381,
-0.1176136732,
0.1929165572,
0.0388988741,
-0.1015442014,
0.2350193262,
0.3835324347,
-0.0437625684,
-0.3034849763,
0.2242761105,
0.28383708,
-0.15231511,
-0.1874621212,
0.4942166507,
0.3747981787,
0.4605589509,
-0.1184172556,
0.026678171,
0.555283308,
-0.2129226625,
0.0199745558,
0.0100019071,
0.2258823812,
0.018315237,
0.3231094182,
0.3641287684,
0.0960741788,
-0.0058239019,
-0.0262360107,
0.2425691038,
0.2165643573,
-0.0261684619,
-0.165641129,
-0.398555994,
-0.107430324,
0.1001920626,
0.0502806045,
0.244231835,
-0.261863023,
0.2348318398,
0.2859805226,
-0.5793047547,
0.0439931713,
0.6533368826,
-0.0878019333,
-0.2688230574,
-0.1439164877,
-0.0232384112,
-0.1741878539,
0.1452493072,
-0.0670853853,
-0.264521569,
0.144134596,
0.0096610319,
0.1244769394,
-0.0039139991,
0.1286536455,
0.063897416,
0.0735818967,
0.0244559124,
0.3757626116,
0.1357918382,
-0.1839974225,
-0.0558848865,
0.0121551314,
0.1858715117,
-0.0888786912,
-0.220085904,
0.3250597417,
0.0565814041,
0.1778752208,
-0.1081057489,
0.0461843684,
-0.2707106769,
-0.0779384971,
-0.150216639,
-0.0563368239,
0.005087676,
-0.0975058377,
-0.2703382075,
-0.0184381381,
-0.0828583762,
0.5797554851,
0.2944805026,
-0.3680408597,
-0.0814159364,
0.3954350948,
-0.3513242304,
0.1719428599,
0.7235903144,
-0.0404164903,
0.1165966317,
-0.108116582,
-0.000235566,
0.3333338201,
0.2498607188,
0.2139373869,
0.0659507215,
-0.2839464545,
-0.2710180581,
-0.5490262508,
-0.0766463876,
-0.1191194355,
0.1520469934,
-0.0725881085,
0.0408804044,
0.2885587513,
-0.1487167776,
0.2767311335,
-0.0182297509,
0.2915889919,
0.1825945526,
-0.2095012069,
-0.1971719265,
-0.1070294157,
0.4269376993,
0.0258570518,
-0.2944354117,
-0.0081184274,
0.493232131,
-0.1112405658,
-0.3396420777,
0.0601268485,
0.0122496486,
0.1071746945,
0.2979591489,
-0.0336132571,
0.0103998054,
0.1751953214,
0.0991640463,
-0.106395103,
0.1840144694,
-0.0318378396,
-0.2652283013,
-0.259670347,
0.1223706827,
-0.6407399774,
-0.3083278835,
-0.4538686574,
-0.3385768831,
0.1436997503,
-0.0420786627,
-0.4410835803,
-0.2471866906,
-0.2558819354,
0.3739536703,
0.3258477449,
0.3989016116,
-0.1653429717,
0.0093379132,
-0.5237102509,
0.1157123446,
0.7863520384,
-0.0277512744,
-0.4555929899,
0.0094988104,
0.0352792256,
0.0927550495,
0.0146475676,
-0.2981967926,
0.1291434467,
0.2376128584,
-0.0424106792,
-0.2237713635,
0.4407901168,
-0.3215927482,
0.0996611714,
0.0451738015,
0.3537798524,
0.0059906938,
-0.240187943,
-0.4362025261,
-0.066488564
] |
https://github.com/huggingface/datasets/issues/2345 | [Question] How to move and reuse preprocessed dataset? | Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same | Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this? | 33 | [Question] How to move and reuse preprocessed dataset?
Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this?
Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same | [
-0.2378593534,
-0.1530077606,
0.0416560732,
0.3084846735,
0.1833168715,
0.2134884894,
-0.0576085076,
0.2500772178,
-0.1095816568,
-0.2252921611,
-0.0464637913,
0.1580040753,
-0.1260225922,
-0.0357171781,
0.2702541649,
-0.1903043389,
0.1926394999,
-0.0515301898,
-0.2087466568,
-0.0057140207,
-0.0511985719,
-0.0350204781,
-0.0222175047,
-0.2187880129,
-0.3487525582,
-0.1432225257,
-0.2869338393,
0.1577492803,
0.1409124434,
-0.2185285836,
0.1496662199,
0.1988650411,
0.3916557729,
0.565004766,
-0.0001259738,
0.0803210959,
-0.260528177,
-0.1995309591,
-0.2637192011,
0.0004297662,
0.4051916003,
-0.1469470114,
-0.1489047557,
-0.1150194034,
-0.4202833176,
-0.3849591613,
-0.1287568361,
-0.5107620955,
0.587305367,
0.202484563,
0.0258474201,
-0.4192652702,
-0.3031591773,
-0.0005871921,
0.0771555081,
-0.1091330275,
0.0281406213,
0.1772209108,
0.2982752621,
0.0634793416,
0.2317209244,
-0.0059603862,
-0.1695148051,
0.2283947319,
0.0896406174,
-0.2463834882,
-0.2650191784,
0.0103243953,
0.2133295834,
-0.0782112703,
0.37871629,
-0.5245108008,
-0.0408920944,
-0.30216223,
0.0440789126,
-0.629689455,
-0.2901812792,
0.1405388564,
0.089873679,
0.3329516947,
-0.3665987253,
-0.5225881338,
-0.0271649174,
-0.3522253335,
0.2370804697,
0.1714151055,
-0.0160610992,
0.204697758,
0.0173270069,
0.3591577709,
0.3000127673,
0.0683677271,
-0.2626771033,
0.1761902124,
0.0096516469,
0.1386130154,
-0.1080908179,
0.3031719327,
-0.057535205,
0.3915197849,
0.0235157479,
-0.2391522974,
0.3578470647,
-0.199224174,
-0.0719347149,
0.257684201,
-0.1683460921,
0.276653558,
0.0102211684,
-0.3261595666,
-0.425462395,
-0.3058952987,
-0.3417909741,
-0.1531974673,
0.3950909972,
0.3623048663,
0.0495438501,
-0.1994162649,
0.077915743,
0.126131475,
-0.0675558299,
-0.3604215086,
-0.1975090504,
0.1143202037,
-0.0364066586,
0.0673461556,
0.2185412347,
0.1009308845,
-0.1091735214,
-0.4340988994,
-0.176293537,
0.1403092742,
-0.3342287242,
0.4014986753,
0.0100635728,
-0.1399190873,
0.3073941469,
0.1028967574,
0.0452375971,
-0.1445739269,
0.4853774607,
-0.145434171,
0.2267770767,
0.1687610298,
-0.0933347046,
0.1907975078,
0.3086644411,
0.4347535372,
-0.2161507905,
0.5089267492,
-0.2469211072,
-0.307838589,
0.5280902386,
-0.0791083276,
0.0558473207,
0.1770821363,
-0.1443104148,
0.1037440076,
0.4253026545,
0.0528269298,
-0.0352413505,
-0.2709802687,
-0.1938501298,
-0.2852815092,
0.2383835465,
0.0972619578,
-0.3305193484,
-0.0629702806,
0.3851659298,
0.3416414857,
0.3617278636,
0.2083149552,
-0.2422455549,
0.4805541635,
-0.2082834095,
-0.3495692611,
0.4447631836,
-0.2732564509,
-0.0126193976,
0.0592033677,
0.00023088,
-0.0096722785,
0.0283689313,
0.0542139076,
-0.1592286378,
-0.2620944381,
-0.3656530678,
0.4215673506,
0.0069272947,
0.0015507605,
-0.3235528469,
-0.1850041449,
0.2035008818,
-0.2905148268,
0.0656405836,
0.1388632059,
-0.0344850197,
-0.0301913638,
0.2049694359,
-0.081988588,
0.0843488127,
0.1955624372,
0.1572900265,
0.1549064815,
-0.100821048,
0.0708130002,
-0.2396003902,
0.0875392407,
-0.161367625,
-0.3961811662,
0.4401758611,
-0.097719565,
-0.2322434932,
-0.2417339534,
-0.1962096691,
-0.1900140345,
-0.0740763247,
0.2564919889,
0.4803422987,
-0.2477553636,
-0.1338170618,
0.4130368829,
-0.112954542,
0.0086514764,
0.0035674709,
0.161740005,
-0.0026036622,
-0.1892519295,
-0.0539037175,
-0.1240687221,
0.4159469903,
-0.2461105734,
-0.0509940498,
0.3192645907,
0.094989866,
0.0605702363,
0.0752691105,
0.2710303962,
-0.1237048209,
-0.1199661121,
0.3089157641,
-0.1230343953,
-0.0858800486,
-0.1337085366,
-0.2027672678,
0.3510611653,
0.1217102334,
0.1586761326,
0.1118558645,
-0.2967467606,
-0.1390333772,
-0.1228905842,
0.2126416564,
0.2222049385,
0.0891195983,
0.1400204897,
0.3727268577,
0.1329211891,
-0.1442529112,
0.3077132404,
0.2793329358,
0.1369311661,
-0.064407073,
-0.1629677415,
-0.178131938,
-0.3420422077,
0.1087358668,
0.01690544,
0.0321844183,
0.0411659442,
0.3943569362,
0.300391376,
-0.009594053,
-0.0722705945,
0.0120825078,
-0.3623246253,
0.4106182158,
0.066966109,
-0.0287398137,
0.0599020682,
0.2683697641,
0.4951939285,
0.278816402,
0.452101022,
-0.1961213797,
0.2168154418,
-0.3017244041,
0.1297436953,
-0.1224794015,
0.1606669873,
0.0639334321,
0.0758642554,
-0.2171613425,
0.3982009292,
0.3844769299,
0.0536037982,
-0.1365613043,
0.076228559,
-0.1481234878,
-0.2067567259,
0.0052703978,
-0.3171880543,
-0.1434647143,
-0.0825676918,
0.2953960896,
-0.1293855458,
0.3584152758,
0.0957578123,
-0.0763692409,
-0.2998498082,
0.3141586483,
0.1587601751,
0.0824842378,
0.1322541684,
-0.1929987371,
0.2659244537,
0.1027569175,
0.2607209086,
-0.0364820398,
-0.1100330576,
-0.0644036382,
-0.1994872838,
-0.2438250631,
0.1560234725,
-0.0177233964,
-0.2850748003,
-0.0929069221,
0.0174157862,
0.0426191725,
0.2385849804,
0.0228474047,
-0.1819272041,
0.0555909723,
-0.261844188,
0.3049827814,
0.2563686073,
-0.2394011319,
-0.7709587812,
0.1479660124,
-0.1281966269,
-0.0332673006,
0.0822986364,
0.1963884085,
0.2900822163,
0.2994523644,
-0.4189984798,
-0.1111752018,
-0.0321101695,
0.1402684003,
-0.0752460361,
0.2125626057,
0.3601724803,
0.049724292,
0.0564321429,
0.0076198885,
-0.088558577,
0.3789902329,
0.06662862,
0.1641144454,
0.2058384717,
0.3059244454,
0.1700585783,
0.7813287973,
0.2020618469,
-0.1195319295,
0.2247863561,
0.0702478737,
0.2524738014,
-0.3247464895,
0.0542768054,
0.1614909321,
0.0351385027,
-0.3057979643,
0.0849256292,
-0.0191718712,
-0.1112905517,
-0.1250434965,
0.1055365279,
-0.0307056345,
-0.1223668307,
0.1600786895,
-0.136875093,
0.4417610765,
0.1152695194,
-0.0597145893,
-0.3022225201,
-0.1132885665,
0.0453085043,
-0.2138599604,
0.5286316872,
0.4135553241,
-0.4654915929,
-0.0517198369,
-0.380364567,
0.3111928701,
-0.1160936803,
0.0681873634,
0.0343906842,
-0.1186771318,
0.1350321323,
-0.2068350464,
0.0961492211,
-0.2219338566,
0.0872860178,
0.3639415801,
-0.0061689089,
0.100408189,
-0.24596861,
0.0381250158,
0.330768764,
0.2019875795,
-0.1875593215,
-0.1658794433,
-0.3008568287,
0.0466717444,
0.2752129436,
-0.4799241722,
0.1115135178,
-0.2050669491,
-0.4821566343,
-0.2187341005,
0.2105712146,
0.256754458,
0.0695933029,
-0.1735834479,
0.3810070753,
-0.1715444028,
0.0167105477,
0.3543284833,
-0.0866813883,
0.3993425965,
0.1708689332,
0.1461695284,
0.0603263006,
0.2983468473,
0.1328889132,
0.2768139839,
-0.4191564322,
0.4938594401,
-0.1247184426,
0.0020687575,
0.3709499538,
0.1941193044,
-0.1325173378,
0.1068119556,
-0.3122165203,
0.0476855598,
-0.4304374754,
0.0203568675,
0.0458393618,
-0.1062613204,
-0.512814939,
-0.8027752638,
-0.0159527566,
0.3981410265,
-0.1304417849,
0.4157748222,
-0.3875639737,
-0.2967142761,
-0.0329836421,
0.2522016466,
1.1055432558,
-0.2789762914,
0.3033004701,
-0.0125614963,
-0.1085078791,
0.1800970435,
-0.3406000137,
-0.037591666,
-0.2607921362,
-0.156932041,
0.0234981515,
-0.1165354028,
0.2680092752,
0.2212569416,
-0.0987247005,
0.4781959653,
-0.3981008232,
-0.2551434636,
-0.0945029333,
0.2080540806,
0.2884461284,
0.169454664,
0.4030931592,
0.0486780778,
-0.2707051635,
-0.0789209679,
-0.1453619748,
0.2496762127,
0.1875510365,
0.2118336409,
-0.32580176,
-0.097060442,
-0.6363196969,
-0.0228214096,
-0.4688447416,
-0.569570899,
-0.0640963316,
0.0269999262,
0.6920269728,
-0.0783740506,
0.0521788001,
0.1922743767,
-0.105418846,
-0.0001251066,
-0.1312662363,
0.1047301665,
0.3144973516,
0.0321059413,
-0.0976962075,
0.2907633483,
0.0027101766,
-0.3139580488,
-0.237831071,
-0.3568240702,
0.2640900314,
-0.2140869796,
-0.2281086743,
0.5874048471,
0.0975056961,
-0.1491778344,
0.0260645486,
0.2976788878,
-0.2388396561,
0.358234942,
-0.3314956725,
-0.2371264696,
-0.0552788191,
0.0935940072,
0.3266552687,
-0.3253432512,
0.3527351022,
0.2297744304,
-0.0681249723,
-0.0492398031,
-0.0766162127,
0.1966193467,
-0.1945143491,
0.2431262583,
0.0282317642,
0.1477131099,
0.0749345198,
-0.1244103685,
-0.0203038026,
0.166244328,
-0.0029202292,
0.1760596782,
-0.2919256985,
-0.2285665274,
0.2335791886,
0.3254612386,
0.1455579251,
0.0357899219,
-0.0362040959,
0.3847227395,
-0.164330259,
0.1703975499,
0.1472100616,
0.1958285719,
0.0967098325,
-0.0278396588,
-0.1505878121,
-0.0795145109,
-0.061350178,
-0.0719886422,
-0.0424629748,
-0.101755023,
-0.3052812517,
0.2270799726,
-0.1314202398,
0.0105123436,
0.0254080035,
-0.5276870131,
0.0600917377,
-0.2723105252,
0.0410039537,
0.2522371411,
0.07614474,
0.1077259555,
0.3695375919,
-0.2398175001,
-0.0173991267,
-0.112897642,
0.0950240493,
-0.0766151026,
0.1053005978,
0.2043008804,
0.2123815864,
-0.1024309099,
-0.1405518055,
-0.0946181044,
0.3850335181,
0.0994776115,
0.0607649907,
-0.1666937917,
-0.0035705159,
-0.0791084692,
0.1511007845,
0.1283087134,
-0.0213952083,
0.1841115057,
0.4707876146,
-0.0509522483,
-0.3081830144,
0.1896886826,
0.2716933191,
-0.11237894,
-0.1997253746,
0.4546200037,
0.3958204091,
0.3837066293,
-0.1981135309,
-0.0502292551,
0.4299528301,
-0.2597358525,
0.0139864739,
0.0014533766,
0.3135937452,
0.0052337577,
0.2828736007,
0.3944245577,
-0.0108019067,
-0.0037896633,
-0.0097480724,
0.3508372307,
0.3881845176,
-0.0930478126,
-0.210465923,
-0.4430543184,
-0.0984280854,
0.1430864334,
0.1050586477,
0.2753298879,
-0.3274119794,
0.2162555307,
0.3400506675,
-0.6805122495,
0.1070687771,
0.5620387793,
-0.1046513617,
-0.2644446492,
-0.308359772,
-0.0716605261,
-0.1136859208,
0.2115546465,
-0.0649630427,
-0.2648224235,
0.0952798277,
0.0017641908,
0.0734731406,
-0.0537664071,
0.0690994263,
-0.0216050129,
0.0395682082,
0.068489857,
0.4542488754,
0.0731868297,
-0.2653937936,
0.0276849121,
-0.0323736705,
0.1969398409,
-0.0131794875,
-0.1961668134,
0.2902059555,
0.1038331389,
0.1731047183,
-0.1679555774,
0.0450803228,
-0.2011703998,
-0.1919144839,
-0.1337240338,
-0.0789507255,
0.0649272874,
0.0693722963,
-0.274579525,
-0.0363626517,
-0.0463297404,
0.4864159524,
0.3417537212,
-0.3559115231,
-0.0175145306,
0.418900311,
-0.2805470526,
0.1513670385,
0.7690734863,
-0.0326194577,
0.0457840115,
-0.1132404357,
-0.0052769701,
0.2971599102,
0.2374254465,
0.1925992966,
0.0036203905,
-0.264018178,
-0.3714713454,
-0.4844544232,
-0.0427693427,
-0.2741442621,
0.1524680853,
-0.1331401765,
0.0744177625,
0.2540325522,
-0.1676159203,
0.2727187574,
0.0335942544,
0.2813004851,
0.2858588398,
-0.2592864633,
-0.2775994837,
-0.137399748,
0.4601694047,
0.0557294004,
-0.1455207616,
-0.0602985658,
0.3954572976,
-0.1013860479,
-0.3069756627,
-0.0261682663,
0.0952986479,
0.2149173319,
0.351346463,
-0.0576543137,
-0.0238309707,
0.145511359,
0.1376879364,
-0.1406624317,
0.259516865,
-0.0416242033,
-0.1788038909,
-0.2974762321,
-0.0157371648,
-0.6356414557,
-0.2866191864,
-0.4114285111,
-0.2497587353,
0.1543264538,
0.0200933069,
-0.2996423244,
-0.2943603396,
-0.1123156697,
0.3462572992,
0.3360646367,
0.4151576459,
-0.194768697,
0.063669771,
-0.5413560271,
0.1431350857,
0.6640557051,
-0.0283075795,
-0.3156379461,
-0.066904746,
0.0613716803,
0.1123829111,
0.0819525644,
-0.2363601327,
0.1080253944,
0.2914656699,
-0.0750484616,
-0.1893651336,
0.4150599837,
-0.3093852103,
0.1259085238,
0.0467565767,
0.278073132,
0.0212979633,
-0.2434839904,
-0.4002309442,
-0.0611642003
] |
https://github.com/huggingface/datasets/issues/2345 | [Question] How to move and reuse preprocessed dataset? | > Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same
I only changed the `preprocessing_num_workers` maybe it is the problem~ I will try again~ | Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this? | 48 | [Question] How to move and reuse preprocessed dataset?
Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this?
> Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same
I only changed the `preprocessing_num_workers` maybe it is the problem~ I will try again~ | [
-0.2302791923,
-0.1823707819,
0.0412170999,
0.3404656649,
0.198071003,
0.2086262852,
-0.0375071615,
0.2514613271,
-0.103703633,
-0.2087677568,
-0.0314360633,
0.1630257368,
-0.1305733025,
-0.044030685,
0.2582703829,
-0.1911839098,
0.1755549014,
-0.0452621803,
-0.1915272325,
-0.016570054,
-0.0535583273,
-0.0251102615,
-0.0321363173,
-0.2102222145,
-0.3548283577,
-0.121745728,
-0.2918240726,
0.1653583646,
0.1479511559,
-0.204628855,
0.1572978646,
0.178793475,
0.4092199206,
0.593210876,
-0.0001262194,
0.0605907738,
-0.2513767779,
-0.1923408657,
-0.2729693055,
-0.0186122749,
0.3915594518,
-0.1380920559,
-0.1416185498,
-0.1292647719,
-0.416854918,
-0.354006052,
-0.1318834573,
-0.5027415156,
0.6082751155,
0.2023900896,
0.0339937508,
-0.418307066,
-0.3058913052,
-0.0001168445,
0.0776555166,
-0.1023502201,
0.0107620675,
0.199507013,
0.3009849191,
0.0655804202,
0.2533351779,
-0.0054525714,
-0.1913249493,
0.2161299735,
0.07716766,
-0.2489580661,
-0.2419677377,
-0.0063001057,
0.2172269523,
-0.0644972622,
0.3854008913,
-0.4955870807,
-0.021414021,
-0.2836804986,
0.0525716431,
-0.6237028241,
-0.2847480476,
0.1535848975,
0.074278757,
0.3391979039,
-0.3694740236,
-0.5197531581,
-0.0286423359,
-0.343575716,
0.2452747226,
0.152732715,
-0.0363955982,
0.2196631879,
-0.0064447797,
0.3711722195,
0.3126406074,
0.0675285161,
-0.2623579502,
0.1733515412,
-0.0181059055,
0.1303382367,
-0.1184554696,
0.3414283693,
-0.059679158,
0.3688023388,
0.0189886484,
-0.2177859396,
0.3481890857,
-0.1931369156,
-0.0610703044,
0.2535793185,
-0.1575443149,
0.2674421966,
0.0153017472,
-0.3059374094,
-0.4410014749,
-0.3064709902,
-0.3355245888,
-0.1766227782,
0.4219073057,
0.3731339276,
0.0536552258,
-0.2267653793,
0.065122433,
0.1151022986,
-0.0963111296,
-0.3628315628,
-0.1881164163,
0.1191907302,
-0.0267973728,
0.0619938858,
0.2298411131,
0.11359559,
-0.1300107837,
-0.4259302318,
-0.178464368,
0.1209818721,
-0.3620636165,
0.4047139287,
0.0170490593,
-0.147371769,
0.2812186778,
0.1347010434,
0.0576781556,
-0.1578563899,
0.4618588388,
-0.1600632221,
0.2225686163,
0.1569198966,
-0.0888808519,
0.2168246061,
0.3071730435,
0.4267370403,
-0.2022320777,
0.5157365799,
-0.2954549789,
-0.2999770641,
0.5050635934,
-0.0835790038,
0.0763939768,
0.2000036389,
-0.1415998638,
0.0793813169,
0.4280876517,
0.0587630272,
-0.0315422602,
-0.2942143977,
-0.1964376718,
-0.2926185131,
0.2295435518,
0.0953656957,
-0.3276758194,
-0.0593124218,
0.3742061257,
0.3352858722,
0.3759860694,
0.2220865488,
-0.2464760542,
0.4664200246,
-0.2396626174,
-0.3466242254,
0.4473834336,
-0.2679066062,
-0.0157276355,
0.0745582506,
-0.0023965791,
-0.004546423,
0.0178570822,
0.0399055332,
-0.1705620885,
-0.2612146437,
-0.3734621108,
0.4028817117,
0.0182684846,
-0.0181437582,
-0.3461929858,
-0.1834280938,
0.2144179791,
-0.2815658152,
0.0642997399,
0.1546643972,
-0.0236601271,
-0.0397349484,
0.213856563,
-0.070634298,
0.081287846,
0.2107388675,
0.1581492871,
0.1610247791,
-0.0866355076,
0.0636223778,
-0.2418338358,
0.0950837433,
-0.185850054,
-0.3736920357,
0.4266284704,
-0.0792860165,
-0.2309807837,
-0.2579778433,
-0.2068707943,
-0.1903484017,
-0.0772555172,
0.2529402971,
0.448964566,
-0.2513562739,
-0.103516981,
0.4261999726,
-0.1011627689,
-0.0061493921,
0.0129419463,
0.1810734421,
-0.019684229,
-0.1941665858,
-0.0644104183,
-0.1135628596,
0.4528128505,
-0.250413388,
-0.0720245093,
0.3093143404,
0.0809949264,
0.0377835259,
0.0612079017,
0.2628931701,
-0.1248699874,
-0.1418718696,
0.2970557511,
-0.1096226424,
-0.0812778398,
-0.1403724402,
-0.1864900291,
0.3085306585,
0.1251228899,
0.1671191305,
0.093922779,
-0.2757715881,
-0.1386350095,
-0.1613754183,
0.2355558872,
0.2098313421,
0.0903165638,
0.1427326798,
0.3833734691,
0.1253004968,
-0.1511941999,
0.3049735725,
0.2918560505,
0.1568562388,
-0.0659996942,
-0.1570336074,
-0.181795001,
-0.3211259842,
0.0839106664,
0.0257225968,
0.0624963604,
0.0498831309,
0.3670089841,
0.2906752825,
0.0059053698,
-0.0849631354,
0.0275959391,
-0.3611500561,
0.4245193005,
0.0833941251,
-0.0329409242,
0.0688959062,
0.2673463821,
0.4997732937,
0.2703295648,
0.4532827735,
-0.2201969922,
0.2037450075,
-0.3384390473,
0.1429189295,
-0.1421454251,
0.1770965457,
0.0565394573,
0.0676852167,
-0.2187447846,
0.3874481916,
0.3927200437,
0.0559776723,
-0.1153540462,
0.0760849714,
-0.1575403363,
-0.182538271,
-0.0212742612,
-0.3034436107,
-0.1745169163,
-0.0893429741,
0.3128997684,
-0.1144716963,
0.3428851068,
0.0956345275,
-0.0854871124,
-0.3158889711,
0.308527112,
0.148235321,
0.0799032003,
0.1736139059,
-0.1999173909,
0.2825096846,
0.0987994745,
0.2641471624,
-0.0171635393,
-0.1196133271,
-0.0731900483,
-0.1901328266,
-0.2272615284,
0.1431858689,
-0.0228700563,
-0.2841077745,
-0.1119889393,
0.0000450572,
0.0224694647,
0.2144096941,
0.0258827955,
-0.1833225191,
0.0513682738,
-0.2649682462,
0.2935569584,
0.2573854327,
-0.2578558922,
-0.7665916085,
0.1563870311,
-0.1181641743,
-0.0654660165,
0.0767868012,
0.2234165221,
0.2946224213,
0.2762688398,
-0.4194142818,
-0.0827115849,
-0.0344305076,
0.1499554515,
-0.0958807841,
0.2032487392,
0.3651021719,
0.0533623025,
0.0602737255,
-0.0092963735,
-0.1047997996,
0.3742394745,
0.0774437785,
0.2063615471,
0.2159636021,
0.2940151989,
0.1451084018,
0.7868183851,
0.1951518208,
-0.1160393134,
0.2585867941,
0.0802676007,
0.2512436509,
-0.3090756238,
-0.0128969559,
0.171986267,
0.0376316234,
-0.3038148284,
0.0874178931,
-0.0287988707,
-0.1278554201,
-0.1306038797,
0.0801126361,
-0.0449876599,
-0.1303283125,
0.1563013196,
-0.127085045,
0.4329030514,
0.1149053499,
-0.0622673631,
-0.2800683379,
-0.1100105941,
0.052033633,
-0.1749273241,
0.5241791606,
0.4021216929,
-0.4852682054,
-0.0636069328,
-0.3512473404,
0.3219733238,
-0.1157843173,
0.1028266773,
0.0073918402,
-0.0797648057,
0.1573291868,
-0.182096228,
0.1464358568,
-0.2514877915,
0.0811825916,
0.3863939941,
-0.0053778309,
0.0993620157,
-0.2538024485,
0.0534657948,
0.3308385015,
0.2037236094,
-0.1813193411,
-0.1752057821,
-0.3217462897,
0.0434071831,
0.2783793211,
-0.4798924327,
0.0575094223,
-0.2167824209,
-0.4627765119,
-0.2149276584,
0.1868019849,
0.2578515708,
0.0962299705,
-0.1862249672,
0.3677945137,
-0.1546341181,
0.0286893062,
0.3485646844,
-0.1175283492,
0.4073965847,
0.1658471376,
0.1470040828,
0.0444777273,
0.3160404861,
0.1348308027,
0.2624266148,
-0.4285262525,
0.4940428138,
-0.1070594043,
-0.001958289,
0.3777114451,
0.1969232261,
-0.1340244263,
0.1191705614,
-0.3015603125,
0.0703528225,
-0.4203509986,
-0.0222125296,
0.0624337457,
-0.0916470587,
-0.512393415,
-0.7761762738,
-0.0144440504,
0.3869952857,
-0.1343576163,
0.4250027537,
-0.4090652764,
-0.3004301488,
-0.0322500952,
0.2574755251,
1.1520466805,
-0.2499403208,
0.2839638293,
-0.0163692571,
-0.1121746898,
0.1752405465,
-0.3207362294,
-0.0508780591,
-0.2835555375,
-0.1752742231,
0.0249645673,
-0.1339091361,
0.2799000442,
0.2194501758,
-0.1174449325,
0.4820218086,
-0.4274497926,
-0.2495137453,
-0.0907147229,
0.2142422199,
0.2973355651,
0.1724822074,
0.4000268579,
0.0470796525,
-0.2730310857,
-0.055563014,
-0.1458102167,
0.2094358206,
0.1826085299,
0.2097633928,
-0.3370374441,
-0.0902162641,
-0.6582043171,
-0.026400324,
-0.4553878307,
-0.5626407862,
-0.0016356325,
0.0187768079,
0.6962357759,
-0.0597637855,
0.0341450907,
0.1885803789,
-0.1038895845,
0.0123056509,
-0.1183058992,
0.1131059229,
0.3138388991,
0.0337913409,
-0.1306757927,
0.275154382,
0.0025534164,
-0.3120919466,
-0.2595793903,
-0.3384280205,
0.2628731728,
-0.2288309783,
-0.2692017257,
0.5659241676,
0.104412213,
-0.1746213585,
0.031633202,
0.2832492292,
-0.2325008661,
0.3902263045,
-0.3128137589,
-0.2564023137,
-0.0495732613,
0.1170375645,
0.3268790245,
-0.323846072,
0.3862734437,
0.2198894769,
-0.0780946389,
-0.056283582,
-0.0784550756,
0.1917872876,
-0.2133917212,
0.2346996367,
0.0292927083,
0.1681255251,
0.0750392228,
-0.144207105,
-0.0251837969,
0.1845808178,
-0.0068635847,
0.1483925283,
-0.2823742032,
-0.2391584814,
0.21266298,
0.3108685315,
0.138966471,
0.0435546003,
-0.0113827027,
0.3774792552,
-0.1695412695,
0.1738157421,
0.1361580491,
0.1900034398,
0.1055748016,
-0.0430115387,
-0.1715746224,
-0.0924956948,
-0.0621796548,
-0.0726881251,
-0.038643077,
-0.1044059768,
-0.3125812709,
0.2272194624,
-0.1248396784,
0.0186505821,
0.0106052672,
-0.5460445285,
0.0660821572,
-0.2595503032,
0.0099602956,
0.2569546402,
0.07860367,
0.1129871234,
0.3769869804,
-0.2383506596,
-0.0419710018,
-0.083981581,
0.0883617476,
-0.0725460127,
0.1149327829,
0.1768428981,
0.2323455065,
-0.0996140018,
-0.1672751904,
-0.1229510531,
0.3646802008,
0.1154703125,
0.0624611489,
-0.1464223564,
0.0197388101,
-0.0620910116,
0.1360792965,
0.1175237298,
-0.0306681804,
0.1765670925,
0.4856727123,
-0.0533960611,
-0.30264166,
0.2002395689,
0.291036725,
-0.0990789309,
-0.2204584032,
0.4553168118,
0.3883112073,
0.362102598,
-0.1899762899,
-0.0446701944,
0.4329744875,
-0.2688752115,
0.0050528822,
0.0129925804,
0.3136690855,
0.0137782749,
0.2958070338,
0.3763057292,
-0.0367892049,
-0.0068094414,
-0.0109446719,
0.3377031684,
0.3985644877,
-0.0833690539,
-0.1828799248,
-0.4347555041,
-0.1114667803,
0.1532506794,
0.0929496065,
0.2628057897,
-0.3464435041,
0.2301795036,
0.3239696026,
-0.6916009188,
0.1316186935,
0.5701608658,
-0.1210772693,
-0.2360223532,
-0.3140922487,
-0.058408726,
-0.1190508604,
0.1784202754,
-0.0688441992,
-0.2500266433,
0.1047567278,
0.0315688178,
0.0387098715,
-0.0470060483,
0.0387097523,
0.0005982654,
0.0377260596,
0.0561171398,
0.43862167,
0.0568426661,
-0.2471427917,
0.015762303,
-0.0118668135,
0.1960346699,
0.0346039943,
-0.1817618906,
0.2370755374,
0.1254268438,
0.1816647947,
-0.1549649835,
0.0577237606,
-0.1978990585,
-0.1778494865,
-0.1292393357,
-0.0755384937,
0.0559551045,
0.0750966817,
-0.2512833178,
0.0002851573,
-0.0540962256,
0.4733882844,
0.342115432,
-0.3579434454,
-0.0299591944,
0.4078530371,
-0.2729261518,
0.179283008,
0.7854656577,
-0.0429314971,
0.0463994406,
-0.1331850439,
-0.0052663488,
0.2972896099,
0.252879262,
0.2097208053,
-0.0023795739,
-0.292339921,
-0.3610754609,
-0.5111783743,
-0.0479322299,
-0.2610588074,
0.1552473158,
-0.1150247231,
0.058611244,
0.2591908872,
-0.1830441803,
0.3036308885,
0.0425808392,
0.3051353693,
0.2993861139,
-0.2836436927,
-0.2719523013,
-0.1196968555,
0.459798038,
0.0529472679,
-0.1639261395,
-0.0264039915,
0.4131961763,
-0.1012800783,
-0.3161119819,
-0.0223769005,
0.0793437213,
0.2279129028,
0.3597213924,
-0.0542271733,
-0.0208114572,
0.1456579715,
0.1436703503,
-0.1295809448,
0.2380605489,
-0.0272847172,
-0.159193635,
-0.2762358785,
-0.0207708478,
-0.6245561838,
-0.2775928378,
-0.4387019277,
-0.2465454638,
0.1248995811,
0.0334269777,
-0.3082308471,
-0.3033778667,
-0.093398653,
0.3552972078,
0.3341150284,
0.4178349972,
-0.1940505207,
0.0660082549,
-0.5593665838,
0.1297998875,
0.6791751981,
-0.0191564579,
-0.3333541453,
-0.0575462244,
0.0880826786,
0.0938503221,
0.0655804724,
-0.2357252836,
0.0716257095,
0.3024851084,
-0.0642759651,
-0.1596285403,
0.4308491051,
-0.3177462518,
0.1543850899,
0.0659364164,
0.2563073039,
0.0453032628,
-0.2220460773,
-0.3671286106,
-0.0503214486
] |
https://github.com/huggingface/datasets/issues/2344 | Is there a way to join multiple datasets in one? | Hi ! We don't have `join`/`merge` on a certain column as in pandas.
Maybe you can just use the [concatenate_datasets](https://huggingface.co/docs/datasets/package_reference/main_classes.html?highlight=concatenate#datasets.concatenate_datasets) function.
| **Is your feature request related to a problem? Please describe.**
I need to join 2 datasets, one that is in the hub and another I've created from my files. Is there an easy way to join these 2?
**Describe the solution you'd like**
Id like to join them with a merge or join method, just like pandas dataframes.
**Additional context**
If you want to extend an existing dataset with more data, for example for training a language model, you need that functionality. I've not found it in the documentation. | 21 | Is there a way to join multiple datasets in one?
**Is your feature request related to a problem? Please describe.**
I need to join 2 datasets, one that is in the hub and another I've created from my files. Is there an easy way to join these 2?
**Describe the solution you'd like**
Id like to join them with a merge or join method, just like pandas dataframes.
**Additional context**
If you want to extend an existing dataset with more data, for example for training a language model, you need that functionality. I've not found it in the documentation.
Hi ! We don't have `join`/`merge` on a certain column as in pandas.
Maybe you can just use the [concatenate_datasets](https://huggingface.co/docs/datasets/package_reference/main_classes.html?highlight=concatenate#datasets.concatenate_datasets) function.
| [
-0.4773366153,
-0.6935089827,
-0.0979439393,
0.179587394,
0.1399443597,
0.3247910142,
-0.2019500881,
0.0913564041,
0.0232806709,
0.0314715132,
-0.5830706954,
-0.0147506073,
0.2058378011,
0.4802642167,
0.0973033533,
-0.3352278173,
0.2061463147,
0.0533262491,
-0.0682544932,
0.1907303929,
-0.0057577328,
0.1205630824,
-0.1383992881,
-0.0527565852,
-0.4373384416,
0.1436787695,
-0.5212432146,
-0.143689841,
-0.2237619609,
0.1499154866,
0.3690563142,
0.3095445633,
0.1582989395,
0.4412490427,
-0.0001130937,
-0.2398641407,
0.083130829,
0.091894269,
-0.1158549488,
-0.2447852939,
-0.2960631847,
-0.2401034832,
0.1332095861,
0.1241768226,
-0.0557517372,
-0.0315554962,
0.0795207694,
0.0654476061,
0.0969697535,
-0.1098945886,
0.1444481015,
0.0797104239,
0.2500294447,
-0.1734853834,
-0.1637145579,
0.5111460686,
0.0108184442,
0.1524351835,
0.4946921468,
-0.0485217907,
0.6609486938,
-0.0064983126,
0.0665583685,
-0.0683703348,
0.2285610288,
0.1007752419,
-0.0508412346,
-0.4745708704,
-0.3607732058,
0.3082881272,
0.5458722115,
-0.1255920678,
-0.4932384193,
-0.236819759,
0.2477698922,
0.0213852078,
-0.191336289,
0.3288097978,
0.2086048871,
0.024096733,
-0.206436336,
-0.3917134702,
0.0532744937,
0.1583521664,
-0.069735609,
0.1957956403,
-0.0513205044,
0.0908242613,
0.0695553422,
-0.2681916058,
0.035207428,
-0.166083023,
-0.151661545,
0.1595114619,
-0.6084674597,
-0.3992604613,
-0.226090923,
0.3628483415,
0.4802443981,
0.2024167627,
-0.1985310912,
0.0058768927,
-0.4315235019,
0.2300774604,
0.282500416,
-0.2399665564,
0.0240395162,
-0.2077753693,
0.3054994643,
-0.1043953001,
-0.1197049767,
-0.0667928606,
0.1038360819,
-0.108126305,
-0.456207633,
-0.2621082366,
0.1290219575,
-0.024584271,
0.0039543477,
-0.3191899657,
0.1243016794,
-0.0709658265,
-0.0413119495,
0.0606067441,
-0.1655997485,
0.1167972088,
-0.1396437138,
0.2302724123,
-0.1907326579,
-0.2304218858,
-0.0756719783,
0.1119524539,
0.0165520944,
0.2893986702,
-0.171261996,
-0.4942786098,
-0.2040006667,
0.4133866131,
0.4074555039,
0.0469178669,
-0.083937794,
-0.2842965424,
-0.1569361389,
0.0950029418,
0.2700362504,
-0.0443909355,
0.0842056349,
0.0237633884,
-0.1463835537,
-0.1203251183,
-0.4403829575,
-0.28853634,
-0.4382293522,
0.0907671452,
0.0465172119,
-0.0341361314,
-0.4737565815,
0.4752354324,
-0.2497935593,
-0.0918001682,
-0.0570737198,
0.192323342,
-0.1775272638,
-0.1139970943,
0.1159603745,
0.0173622631,
-0.0776889697,
-0.1454380006,
0.1351721287,
-0.0703126714,
-0.3292371035,
0.1861365587,
-0.2384001762,
0.155007571,
-0.1052752808,
0.0049517723,
0.3695622087,
-0.4302900732,
-0.0287411623,
0.0589245632,
0.1559227109,
-0.1439159811,
-0.0754961446,
0.2700878382,
0.0438546315,
0.1177538112,
0.1722823977,
0.4885494113,
-0.1066979691,
-0.1704283208,
0.1633427292,
-0.2834756374,
0.2085458636,
0.0972486585,
-0.0313834772,
-0.214817062,
0.0863158256,
-0.1664014459,
0.2248514593,
-0.0607077293,
0.0528884307,
0.2243684232,
0.0630209073,
0.2102551162,
-0.0084780362,
-0.4905326664,
-0.4413351119,
-0.0259326566,
0.2855249941,
0.084995389,
0.2845337093,
-0.2495344877,
0.1780859232,
-0.279340148,
-0.0916926339,
-0.0079677925,
0.0058753178,
-0.0218320396,
0.1856885701,
-0.2826341987,
-0.5492197275,
0.6859903336,
0.1156110242,
0.0149122933,
-0.5255337358,
0.7264193296,
0.0302155036,
0.0821206868,
0.0499671586,
0.2766753733,
0.0578535832,
-0.0626275465,
0.2358026803,
0.1307608634,
-0.365868181,
0.20620206,
0.4405404329,
0.1315917522,
0.3730511963,
-0.2377300709,
-0.2601432204,
-0.3811033666,
0.0679413155,
-0.1956440061,
-0.360507071,
0.2850865126,
-0.0207605809,
0.3033421934,
0.0646378025,
0.0476945005,
0.0972117931,
-0.0369287543,
-0.1704226136,
0.0372313783,
-0.0251715127,
-0.0196589362,
-0.0002522227,
0.1699332744,
-0.3979133666,
0.0302124675,
0.1181696504,
-0.0063368706,
-0.016138887,
-0.0998308584,
-0.2815754414,
0.0955164731,
-0.0223457124,
0.0471735373,
0.4209528863,
0.210775435,
-0.1005111113,
0.0912072361,
-0.0222609211,
0.0151993819,
0.0410537198,
0.197777316,
-0.0018747139,
0.1576872766,
0.2379133105,
0.0629281029,
-0.0465945005,
-0.0710174739,
0.259067893,
-0.027197836,
-0.1693974733,
-0.2094571441,
-0.1284322292,
-0.3241543472,
-0.0318351425,
-0.3003276885,
-0.4572021365,
-0.2940025628,
-0.1320736706,
0.1283115894,
0.1783221662,
-0.0108233867,
0.1779538244,
0.5747694969,
-0.2819279134,
0.2220960408,
-0.1566817909,
0.285407424,
0.2318289876,
0.1372012794,
0.1110635698,
0.1105614677,
0.3009607196,
-0.0158739593,
0.1589302868,
-0.4940423071,
-0.1534124017,
0.0295912512,
-0.2387661785,
0.2145951241,
0.0540907122,
0.2275936753,
-0.042771358,
-0.3297331035,
0.3056988716,
0.1753017604,
-0.1237512231,
-0.1903064996,
0.0014498822,
0.1199493855,
-0.0652681664,
0.0478746556,
-0.3397681713,
-0.2575619221,
0.1969041675,
-0.1347545385,
0.0366296396,
-0.2529940903,
-0.106491141,
0.0301939454,
-0.334185034,
-0.0353312604,
-0.0460879318,
-0.4317247868,
0.2534381747,
-0.220506534,
-0.1305096596,
0.1344530135,
0.0573153198,
0.0983773023,
-0.3787459433,
-0.047837723,
-0.3517189622,
-0.2464514971,
0.0267127398,
0.0777886659,
0.3056212068,
0.0439630486,
-0.0687063336,
0.0510461405,
0.0427712239,
-0.1938401908,
-0.1941999644,
0.4216267169,
0.2125368565,
-0.122090131,
0.2178714722,
-0.205695197,
0.1473841518,
0.6442353129,
0.2356087416,
-0.0413693562,
0.0447314307,
0.1844359189,
-0.1091811284,
-0.4813731313,
-0.0742045939,
-0.1004671678,
0.4089362621,
0.1773378402,
0.3692167997,
0.4297556877,
-0.388572216,
-0.1469445676,
0.04801872,
-0.0226585846,
-0.1660973132,
-0.1242578849,
0.0802994817,
-0.2828665078,
-0.6389856339,
-0.0855933279,
-0.0426256694,
-0.1398239136,
0.4228807688,
0.0830711499,
-0.0825105533,
-0.3596102595,
-0.1980523169,
-0.2996661067,
0.2538964748,
0.2277431786,
-0.1285480708,
0.0373050272,
0.3393590152,
-0.0337130167,
0.1487989426,
0.5826123953,
-0.172608614,
-0.6704803705,
0.0616282858,
-0.171113655,
-0.2093909532,
-0.0673204362,
0.1376403272,
0.1414294839,
-0.0379882902,
0.60654217,
-0.1926565021,
-0.204523623,
0.4182097912,
0.2603176534,
-0.1448494047,
-0.1371810734,
-0.0255755652,
-0.0489084162,
-0.3120490611,
-0.2289442122,
0.0596595816,
0.2473796457,
0.0612990819,
-0.1433027685,
-0.0324927457,
-0.1259244531,
0.4951269627,
-0.233151719,
0.0611145422,
0.3976522684,
0.111856319,
0.2188941985,
0.0608471707,
-0.0251240321,
0.5964624882,
-0.0073032943,
-0.5920336843,
-0.0474394821,
0.0537922047,
0.8099611402,
-0.0254013073,
0.1866256595,
0.6380625367,
-0.2588061988,
0.1242186204,
-0.2145997584,
0.0865782201,
0.2060459703,
0.2696508169,
-0.7012069821,
-0.2455542386,
0.5334432125,
0.1279522479,
0.0721254349,
0.2506325841,
0.3512209952,
-0.0461605266,
-0.1374612898,
-0.0891834721,
0.979234159,
-0.0136227608,
0.0646687523,
-0.0848006532,
-0.0947198123,
0.6272908449,
-0.1484615356,
0.0552020371,
0.0178427156,
-0.2724734247,
-0.1328742504,
-0.0650324523,
0.1201244518,
-0.112024188,
-0.1766738594,
0.1030925959,
-0.0423504636,
0.3266202509,
-0.0839351714,
0.2598122954,
0.055508323,
-0.1796267927,
-0.3709908128,
0.0588785447,
-0.0756689534,
-0.126366958,
-0.0926465541,
-0.0362319276,
0.1469322294,
0.1938905567,
-0.2606264949,
-0.3029320538,
0.328119576,
0.1651671082,
0.1333440542,
-0.1908023804,
0.2359550595,
0.338678062,
0.3834399283,
0.0156566836,
-0.2581954896,
0.0790787265,
-0.402169615,
-0.0843715072,
-0.379715234,
-0.2739934623,
0.1269816756,
0.044006709,
-0.2601501048,
0.3154332042,
0.3332211673,
-0.3063253462,
-0.3582175076,
0.302926898,
-0.1516797394,
-0.2119672447,
-0.2580424845,
0.3263220787,
0.3057924807,
-0.1407382041,
0.0533414893,
0.2744378746,
-0.2274748683,
0.1149599254,
0.0177615378,
-0.0982250571,
-0.0811068714,
0.2735077441,
0.1508397162,
-0.2412650585,
0.1571580917,
0.2811256349,
0.0254042037,
0.0433970429,
0.1141718999,
0.4336087704,
-0.1087924987,
0.0388733968,
-0.096518904,
0.3796590567,
0.0731244981,
0.1997228414,
0.1604217738,
-0.0799413845,
-0.0885857791,
-0.2232181728,
-0.1712342203,
0.3421498537,
-0.0258374028,
0.2213169634,
0.0329445526,
0.1406087428,
0.1405460387,
0.5654828548,
-0.2208261192,
0.0864150971,
-0.1965103298,
0.021731751,
0.1606551707,
0.1150953546,
-0.2585487664,
-0.0973557159,
-0.0471021421,
-0.0568883494,
0.1047080979,
-0.1868647486,
0.0041205515,
0.1633818448,
0.2580337226,
-0.0123334434,
-0.0900282264,
-0.0745775178,
0.034558069,
-0.1989393979,
0.1217489094,
-0.0164493807,
0.0835835785,
-0.1978710145,
0.3910061717,
-0.3001544774,
-0.2309037447,
0.1493079215,
0.3866786659,
0.1070404425,
0.0033811869,
-0.0618902408,
-0.1058143452,
-0.0933876038,
-0.0233909506,
0.1882751733,
0.3616147637,
-0.1570623517,
0.00989151,
0.1190664396,
-0.0215583239,
0.0221303813,
0.4316727221,
-0.080311425,
-0.0918822214,
0.6225709915,
0.0249002166,
0.0419761874,
-0.1596771032,
-0.2127714306,
0.2212354988,
0.1080698296,
-0.0306181349,
0.0542712808,
0.0924875885,
0.2969582975,
-0.1719507575,
-0.0238204207,
0.1018383428,
-0.0110289901,
0.2880904377,
0.3324663937,
0.2076008916,
-0.126905188,
0.4156460464,
0.2111040056,
0.0739037916,
0.160997346,
-0.2167823613,
0.0563258119,
0.0735729113,
-0.0141429575,
0.7791045904,
-0.0039283801,
0.1016912013,
-0.1748672873,
0.0833349377,
-0.4081778228,
-0.0040059933,
0.245089367,
-0.2864972949,
-0.3804768026,
-0.0974847451,
0.5531997681,
0.0412748307,
-0.1027698368,
0.3428958654,
-0.1211676896,
0.1395776719,
0.123370938,
0.1222983971,
-0.4584869146,
0.2442852408,
-0.0641890317,
0.2247374654,
0.0617754236,
0.3395595253,
0.6070731282,
0.2601696551,
-0.0309476126,
-0.1975218654,
0.2071586698,
0.0227770731,
-0.1020894945,
0.5970641375,
0.262504071,
0.0122278798,
0.0513059981,
0.3758942187,
-0.0599455945,
0.058875218,
0.2854727507,
-0.0849192142,
-0.0516266264,
-0.3078392446,
0.2585433125,
0.1601929814,
0.0167520847,
-0.0571402423,
-0.4110808074,
0.1542838216,
-0.8882023692,
0.2430036813,
-0.2121292949,
-0.1556625366,
-0.0812818632,
0.1495216191,
-0.214265123,
-0.1669244915,
0.51078403,
-0.3032635748,
-0.1526388824,
-0.0496549718,
0.0925270244,
0.1310432702,
0.3922297657,
0.4841099083,
0.3431786597,
-0.1779952943,
-0.3353410661,
-0.2935388982,
-0.2749539018,
0.1368604749,
0.1734770685,
-0.1628403366,
0.0611600839,
-0.0481857657,
0.0391290635,
0.1245374829,
-0.167033717,
0.1734160036,
0.0174608529,
-0.2168404609,
-0.1275697649,
0.0965036899,
-0.0845417753,
-0.0809868425,
0.2468578219,
0.4023829401,
0.064621523,
-0.1149129719,
-0.0456652306,
0.2484323382,
0.249033764,
-0.334033668,
-0.0683511049,
0.1755553186,
0.4713200629,
-0.0781217813,
0.2838206291,
-0.0082994299,
-0.3150532544,
-0.0818118602,
0.1970589161,
-0.2204044461,
0.1018049046,
-0.3778834343,
-0.0571264289,
0.1697275639,
-0.1676937789,
-0.0246203076,
0.1312611252,
-0.2086880803,
-0.1202334166,
-0.1719344258,
-0.1216090396,
0.2517893612,
0.3607234359,
-0.0874531195,
-0.0675930604,
0.1652058512,
-0.1206567362,
0.0616158247,
0.0914516896,
-0.3086520135,
-0.3141693771,
-0.0062718028,
0.2522935271,
0.1439668536,
-0.5772438049,
-0.3370818794,
0.2370830476,
0.0840221643,
-0.0770446956,
0.598744452,
0.2726122737,
-0.0307161137,
-0.2170370519,
0.0288375374,
0.1116119102,
0.0265543144,
-0.0034457331,
-0.1477664262
] |
https://github.com/huggingface/datasets/issues/2337 | NonMatchingChecksumError for web_of_science dataset | I've raised a PR for this. Should work with `dataset = load_dataset("web_of_science", "WOS11967", ignore_verifications=True)`once it gets merged into the main branch. Thanks for reporting this! | NonMatchingChecksumError when trying to download the web_of_science dataset.
>NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://data.mendeley.com/datasets/9rw3vkcfy4/6/files/c9ea673d-5542-44c0-ab7b-f1311f7d61df/WebOfScience.zip?dl=1']
Setting `ignore_verfications=True` results in OSError.
>OSError: Cannot find data file.
Original error:
[Errno 20] Not a directory: '/root/.cache/huggingface/datasets/downloads/37ab2c42f50d553c1d0ea432baca3e9e11fedea4aeec63a81e6b7e25dd10d4e7/WOS5736/X.txt'
```python
dataset = load_dataset('web_of_science', 'WOS5736')
```
There are 3 data instances and they all don't work. 'WOS5736', 'WOS11967', 'WOS46985'
datasets 1.6.2
python 3.7.10
Ubuntu 18.04.5 LTS | 25 | NonMatchingChecksumError for web_of_science dataset
NonMatchingChecksumError when trying to download the web_of_science dataset.
>NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://data.mendeley.com/datasets/9rw3vkcfy4/6/files/c9ea673d-5542-44c0-ab7b-f1311f7d61df/WebOfScience.zip?dl=1']
Setting `ignore_verfications=True` results in OSError.
>OSError: Cannot find data file.
Original error:
[Errno 20] Not a directory: '/root/.cache/huggingface/datasets/downloads/37ab2c42f50d553c1d0ea432baca3e9e11fedea4aeec63a81e6b7e25dd10d4e7/WOS5736/X.txt'
```python
dataset = load_dataset('web_of_science', 'WOS5736')
```
There are 3 data instances and they all don't work. 'WOS5736', 'WOS11967', 'WOS46985'
datasets 1.6.2
python 3.7.10
Ubuntu 18.04.5 LTS
I've raised a PR for this. Should work with `dataset = load_dataset("web_of_science", "WOS11967", ignore_verifications=True)`once it gets merged into the main branch. Thanks for reporting this! | [
-0.0851586312,
-0.0791751593,
-0.0687736571,
0.2122484297,
0.1446296424,
0.1670501083,
-0.0674465969,
0.356159687,
0.335711211,
0.1703766286,
-0.1841287464,
-0.0882943049,
0.032024473,
-0.0491008647,
-0.1792023033,
0.3910675943,
0.1115435809,
0.0704057142,
0.1489616632,
-0.0231388882,
-0.1831050217,
0.3623238504,
-0.0717554763,
-0.1976108998,
-0.1742102653,
0.2103100419,
0.0770302117,
0.2272592336,
-0.1206634566,
-0.2419530004,
0.5031517744,
0.1476858556,
0.2182934433,
0.5435404181,
-0.0001259768,
0.1516778618,
0.2565950751,
-0.0343082696,
-0.2887715995,
-0.2909290791,
-0.2795559764,
-0.4759111106,
-0.0587866753,
0.0108696306,
0.1746037751,
0.1657094508,
0.0882875994,
-0.1844344586,
0.043126408,
0.3276795745,
0.091503188,
0.5787201524,
0.255636543,
0.095488295,
0.2089753151,
0.1225740984,
-0.0354043506,
0.3028367758,
0.3427021205,
0.2210127711,
0.1164624766,
0.0607227571,
-0.2214394361,
0.3517249525,
0.1020269692,
-0.0368373692,
0.1735682338,
-0.5107839704,
0.2583925426,
0.567805469,
0.4979862571,
-0.0043833195,
-0.4195267856,
-0.1657645255,
-0.3733311594,
0.0157458168,
0.3665995002,
0.2591349185,
-0.3134579062,
0.0133685423,
-0.3301945031,
0.0845314339,
-0.077210933,
0.3896191418,
0.0180247612,
0.2835506201,
-0.0295882598,
-0.0571471974,
0.1161494553,
-0.1018675491,
0.5316738486,
-0.4382451773,
0.2005493939,
0.1441613138,
-0.4212916493,
-0.1766135693,
-0.1564656496,
0.5054702163,
0.3802495897,
0.097342059,
0.1199492365,
0.1752368361,
-0.3893420696,
0.1672762483,
0.0753298327,
0.1147172898,
-0.0474486202,
0.01353285,
0.3122353852,
0.2439684272,
0.0297435764,
0.1369536966,
0.157755509,
-0.3242734075,
0.3243066967,
-0.2313974351,
0.3200096488,
-0.4231875241,
-0.3306279778,
0.0906518772,
-0.3126273751,
-0.0955943689,
0.1481836736,
0.3303675056,
-0.127849564,
0.4152519703,
0.0071044196,
0.1833059043,
-0.0802408904,
-0.1089757681,
-0.2528928518,
-0.0673443154,
0.0680783987,
0.2231646776,
0.3387224674,
-0.0464912988,
0.5633101463,
0.0471911728,
0.2553279698,
-0.0242108572,
0.0645127892,
0.11922656,
-0.0653304756,
0.5076721311,
0.0377698839,
0.1763927341,
0.1925570518,
-0.0206296016,
-0.1292277873,
0.1545491964,
-0.2998302281,
-0.346696198,
-0.0361656286,
0.0729086772,
-0.5573633313,
-0.2970696986,
0.0667592809,
-0.3345192075,
0.1852490902,
-0.3027691841,
-0.0240199883,
-0.1686642468,
-0.0076709641,
-0.1457057893,
0.0374204405,
0.2380309701,
-0.1447969824,
-0.0407202952,
-0.0382018983,
-0.0833039954,
0.2342761755,
0.1772888452,
-0.0524788126,
-0.0786319301,
-0.4035303891,
-0.0802104473,
0.272495389,
-0.1574372202,
-0.6148740649,
0.0999206528,
0.1808788478,
0.2084606886,
0.2243497223,
0.1730827391,
-0.3209435046,
-0.0814133063,
-0.1034109145,
-0.1201058626,
-0.01561388,
0.0100256521,
-0.311190784,
-0.1605879962,
0.1613958031,
0.1905450225,
0.1421375275,
0.0388946012,
0.0776121393,
-0.2916904688,
0.4403513074,
-0.2310882211,
-0.010211207,
0.1556781679,
0.2587718368,
0.2319764048,
0.0506164283,
-0.181634739,
-0.5557799339,
0.323189199,
-0.1368000656,
-0.0096904663,
-0.0300933141,
-0.0773775876,
-0.1430769563,
-0.2569599152,
-0.284599781,
-0.2503166795,
-0.0902677253,
0.2949234247,
0.4509866834,
-0.0489332527,
-0.157519117,
0.0379105844,
-0.141936779,
0.1865466684,
-0.3568160236,
0.3374642134,
-0.0452543981,
0.0145253055,
-0.027278617,
0.0376796536,
0.1270902008,
-0.0440380573,
-0.1227159202,
0.4065564573,
0.0182056278,
-0.0507409349,
0.1054890603,
0.4436123371,
0.1350437254,
-0.1297820657,
-0.0214369949,
0.3785459697,
0.0495000109,
0.0335718878,
-0.2013787478,
0.2474857569,
-0.1390585154,
0.354416728,
0.0880439132,
0.2606644034,
0.2448539436,
-0.1513049006,
-0.1840903759,
-0.0671158731,
0.4213162363,
-0.3561787307,
0.0980975851,
-0.0824201182,
-0.1569026262,
0.031667687,
0.0791501626,
-0.2353096306,
0.0087871766,
0.2170221508,
0.0629356652,
-0.088316381,
-0.0595989078,
0.5852565169,
0.5754345655,
0.1997917593,
0.1184806377,
0.080727905,
-0.0301162861,
-0.1202847734,
0.1156511158,
0.225846529,
0.0875290409,
0.3959545791,
0.056620311,
-0.040673364,
-0.4490392804,
-0.2895913124,
-0.0693227574,
0.2049110681,
-0.4617799819,
-0.0714845061,
-0.2673535347,
-0.0268003903,
-0.4079288244,
-0.1423024535,
-0.6074795723,
-0.5206981301,
0.000513366,
0.3735797703,
-0.0295472872,
0.3360085189,
-0.4761886299,
-0.030932853,
-0.1708242297,
-0.0682738945,
-0.1113139242,
0.2401209027,
-0.0735440031,
-0.1028329208,
0.456233263,
-0.0082456544,
0.283113569,
-0.3246206641,
-0.0525075532,
-0.7112342119,
-0.3908775151,
0.0480474122,
0.0272902716,
-0.0165776741,
0.3302425444,
0.2918687165,
0.0696735233,
-0.2094525099,
0.238878563,
-0.3470225632,
-0.2758168578,
0.1425109208,
-0.0270263981,
-0.0324200504,
0.1690683663,
-0.1787809879,
-0.2738601863,
-0.3106219769,
-0.1619170755,
0.0988683328,
0.1175977886,
0.3009372056,
-0.0066986759,
0.0593079813,
0.0564732812,
0.2426356971,
-0.3133750558,
-0.8532570601,
0.4654780328,
0.0037946955,
-0.1866527498,
0.209053874,
-0.0538754463,
0.2935712636,
0.2297286242,
-0.4464185834,
-0.3201850951,
-0.3100646734,
-0.1366552413,
0.2622307241,
0.1717275977,
0.4347870946,
-0.1502236426,
-0.0250733923,
-0.086737819,
-0.1759124249,
0.0649078861,
-0.130604133,
0.6317170858,
-0.0790115371,
0.057721477,
0.045454815,
0.7125911713,
0.3863265216,
0.0674954206,
0.3042785227,
0.2701838911,
0.3162381351,
0.0691311881,
-0.2132714987,
-0.2078005672,
-0.1137947068,
-0.0180372372,
0.2296579927,
0.0889314711,
0.0873779282,
-0.1719105691,
-0.0079713855,
-0.3711531758,
-0.1685083061,
-0.1288422793,
-0.0851930305,
0.2630027235,
0.1696461588,
-0.0437428541,
-0.1384740472,
-0.2854965329,
0.0224270448,
0.3893087208,
-0.0161674116,
0.0505799539,
-0.408865273,
0.1129738241,
-0.2739289999,
0.4751007259,
-0.0372602381,
0.3057077527,
0.0980382338,
-0.1773194671,
0.0461826511,
-0.0003061641,
0.6603271961,
-0.3992725313,
0.2456144094,
-0.2270679921,
-0.0527213812,
-0.2520555854,
-0.2740662694,
0.0396929719,
0.1629039794,
0.3987034559,
0.3397417665,
-0.2540696263,
-0.0806219354,
0.2021559626,
0.0874186084,
-0.0450019762,
-0.4370991886,
-0.2332208753,
-0.2644632459,
-0.3989755213,
-0.2029907405,
0.0157415364,
0.1682744771,
-0.0189366341,
-0.0000238484,
-0.003543891,
-0.0968362987,
0.436072439,
-0.1660072207,
0.1386371106,
0.1040056348,
0.1729807407,
0.2166644335,
0.1723201424,
0.4092181623,
0.7318955064,
-0.2874979377,
-0.6002775431,
-0.0113573903,
-0.052717723,
0.0597872436,
0.3057090938,
0.0964489207,
-0.3372848928,
0.5632471442,
0.1988710016,
0.0585836545,
-0.0768781975,
0.0675515756,
0.0707511455,
-0.2937158644,
-0.2277708352,
0.2731252015,
0.342997849,
0.0426031537,
0.1635284573,
0.1138820872,
-0.0248722136,
0.1626585722,
0.1482758075,
1.0862959623,
0.0878437981,
0.1860836297,
-0.0522380136,
-0.110411346,
0.2627028227,
-0.1908112466,
0.1054061875,
-0.3536964953,
-0.3044610023,
-0.2195749283,
-0.2797240317,
0.1659427583,
0.1664835513,
-0.1162376031,
0.548887372,
0.1168223396,
0.2160011977,
0.2047859132,
0.1635704488,
-0.5091706514,
-0.0332466736,
-0.0590832829,
0.0884190127,
-0.0928000212,
0.5007268786,
-0.0778228715,
-0.1452213526,
-0.2754148841,
-0.1927776784,
-0.2730582058,
0.1595442295,
-0.1317402869,
0.240199998,
0.3220723569,
-0.2370833009,
-0.1130282432,
0.4886992276,
0.3835793138,
-0.1671028584,
-0.3553117216,
0.1355217695,
0.2764641643,
-0.1244991198,
-0.0171228573,
-0.3096618652,
0.227771014,
-0.0881357118,
-0.1494826376,
-0.0479170755,
-0.0436857082,
-0.5708997846,
-0.002088557,
-0.2316404879,
-0.1237520427,
-0.4168466628,
-0.1262591183,
-0.1965940744,
0.0217025727,
-0.2703317404,
0.0317285098,
0.3245992661,
-0.3015616238,
0.100506112,
0.0034999854,
-0.238878727,
-0.2121372074,
0.4402428269,
-0.0634015948,
-0.0947239846,
0.3009133935,
0.1090555638,
-0.1930948049,
-0.031158587,
0.0378627144,
-0.1890496761,
-0.3966255188,
0.1735887975,
-0.092901431,
0.0876042321,
-0.07115639,
0.2744776011,
0.237047568,
0.2580663562,
-0.0138267679,
-0.6462166905,
-0.1248564422,
-0.0952458382,
0.061284896,
0.5304855704,
-0.4701804817,
-0.0797345266,
0.0009784671,
-0.2288041115,
-0.1774573773,
0.1099168956,
-0.2394398153,
-0.2627350986,
-0.1782149971,
0.0223823078,
0.1300974786,
-0.1634643078,
-0.054802075,
0.001850195,
-0.2210849226,
-0.0403415039,
-0.0434735119,
0.2257995456,
0.2479028553,
-0.121025838,
0.31992203,
0.0110335508,
-0.0919964239,
-0.0054700603,
-0.09532471,
0.3137370348,
0.0040576905,
-0.0022815487,
0.1096822396,
-0.0783089474,
-0.104523629,
-0.0253283605,
-0.2069262713,
0.1630874425,
0.1618342698,
0.1151998863,
-0.0566391237,
-0.0262812655,
0.1852612495,
0.1343865544,
-0.0019727668,
-0.191734314,
0.2688359618,
-0.3860967755,
-0.2062050402,
0.5657045245,
0.4447371662,
0.4240089953,
-0.3189673424,
0.3215562999,
0.1060510799,
0.1201566309,
-0.2795182467,
-0.1221105158,
0.4327146113,
0.0603623651,
-0.0285354685,
0.2022351325,
0.0442615189,
-0.3004893064,
0.492203325,
0.2466418147,
0.2334190905,
-0.3281928599,
0.3674354851,
0.4295714498,
-0.1627133638,
0.1419421583,
0.2974649668,
-0.0661257058,
0.0168981366,
-0.0369442739,
-0.0829526037,
0.243385613,
-0.4784407616,
0.1266917437,
-0.0710526034,
-0.4233194292,
0.1946550608,
0.0133204274,
-0.00277587,
-0.0304527469,
0.069921568,
0.3076066971,
-0.263022691,
0.1127675027,
-0.5174112916,
0.038168665,
-0.0358419828,
0.0914099291,
0.0797533542,
-0.3225441873,
0.0346795991,
0.1557121873,
0.0230991971,
-0.2504741251,
-0.0276709422,
-0.0621576458,
-0.3479331434,
-0.479183197,
-0.0341070294,
0.0095145889,
-0.0214608684,
-0.076224722,
0.0561429039,
0.2304470837,
-0.3766311705,
0.0780488178,
0.4358032942,
0.6305701137,
0.2479384094,
-0.0078430539,
0.0214255769,
-0.2103943974,
-0.0309744943,
-0.0472827964,
0.3579614758,
0.0084609333,
-0.0292123295,
0.4339889288,
0.0156590771,
-0.0915906131,
0.0162392724,
-0.314888984,
0.037281014,
-0.2002290189,
0.5952573419,
-0.0213361233,
0.196333617,
-0.0331077576,
0.0542359017,
-0.3736696839,
-0.3054955304,
-0.0647713393,
0.0438079424,
0.1210548878,
-0.0202756226,
0.0060150349,
-0.195438385,
0.2912975252,
0.498313278,
0.0990591869,
-0.3213224411,
-0.094110325,
-0.8508207798,
0.1570826024,
-0.137627393,
0.121719569,
0.0024775404,
0.1414252967,
-0.020225497,
0.1938098371,
0.4343989491,
0.0081655402,
-0.1585171223,
0.0657150224,
0.0636701211,
-0.1766452789,
-0.0116655668,
-0.0228346437,
0.1525712162,
-0.2536918223,
0.1695953012,
0.0036755863,
-0.041564852,
0.0542047173,
0.1688703746,
-0.078541562,
-0.1620917916,
0.1832971275,
0.1747033149,
0.5801797509,
0.0081681823,
-0.1735316813,
-0.1242441013,
-0.0630718619,
-0.3637912571,
0.3822869062,
-0.0729063675,
0.3957035244,
-0.3346648514,
-0.2453685552,
-0.3081841767,
0.1894773692,
0.1044968367,
-0.1284386516,
-0.0745330974,
0.1596526057,
-0.2124976516,
0.2788161933,
0.3082184196,
-0.0399154946,
-0.1191357598,
0.2621367872,
-0.2827535868,
-0.2975855768,
0.6069642901,
0.0373154059,
0.0027408511,
-0.298125416,
0.1216120943,
-0.1206108332,
-0.0510753728,
-0.5369359851,
0.0036440371,
0.3522105515,
0.0643136129,
-0.3270994723,
0.1326461583,
-0.1859234869,
-0.0038303016,
0.0317365825,
0.4268351495,
0.2133133113,
-0.3390221894,
0.1384731084,
-0.130461216
] |
https://github.com/huggingface/datasets/issues/2330 | Allow passing `desc` to `tqdm` in `Dataset.map()` | I think the user could pass the `desc` parameter to `map` so that it can be displayed in the tqdm progress bar, as suggested by @cccntu.
When there's no multiprocessing, the `desc` of the progress bar could be the `desc` passed by the user.
In multiprocessing, we were already using a `desc` equal to `"#" + str(rank)`.
We can change it to be `(desc or "") + "#" + str(rank)` instead.
In the end, since both `desc` and `rank` could be None, we can have:
```python
pbar_desc = (desc or "") + "#" + str(rank) if rank is not None else desc
```
Finally let's remember that if we add `desc` as a new parameter to `map`, we should add it to the `ignore_kwargs` list of the `@fingerprint_transform` decorator of `Dataset._map_single` since we don't want this parameter to affect the fingerprint of the resulting dataset. | It's normal to have many `map()` calls, and some of them can take a few minutes,
it would be nice to have a description on the progress bar.
Alternative solution:
Print the description before/after the `map()` call. | 145 | Allow passing `desc` to `tqdm` in `Dataset.map()`
It's normal to have many `map()` calls, and some of them can take a few minutes,
it would be nice to have a description on the progress bar.
Alternative solution:
Print the description before/after the `map()` call.
I think the user could pass the `desc` parameter to `map` so that it can be displayed in the tqdm progress bar, as suggested by @cccntu.
When there's no multiprocessing, the `desc` of the progress bar could be the `desc` passed by the user.
In multiprocessing, we were already using a `desc` equal to `"#" + str(rank)`.
We can change it to be `(desc or "") + "#" + str(rank)` instead.
In the end, since both `desc` and `rank` could be None, we can have:
```python
pbar_desc = (desc or "") + "#" + str(rank) if rank is not None else desc
```
Finally let's remember that if we add `desc` as a new parameter to `map`, we should add it to the `ignore_kwargs` list of the `@fingerprint_transform` decorator of `Dataset._map_single` since we don't want this parameter to affect the fingerprint of the resulting dataset. | [
-0.3543033898,
0.0359196924,
-0.0605330952,
-0.1690315008,
0.3744508326,
-0.1667571962,
0.2543699741,
0.2177438587,
-0.3104321063,
0.4162535965,
0.2674727738,
0.6729351282,
-0.0182512179,
0.0839985982,
-0.1400042027,
0.0010157244,
-0.2245402187,
0.2880353034,
-0.1542478055,
0.1733601987,
-0.3427264392,
-0.0123511683,
-0.1521171927,
0.3334888518,
-0.1336867809,
-0.2490087599,
0.0189017616,
0.0414582081,
-0.006093902,
-0.6088417172,
-0.2313153446,
0.4572477937,
-0.1192469746,
0.2423422486,
-0.0001132663,
0.0449173264,
0.3025875092,
-0.0090297814,
0.0343070813,
-0.0876954049,
-0.2307193875,
-0.2086027414,
0.2054496258,
-0.5455303788,
0.0810967907,
0.0083243111,
0.0779938996,
-0.2727374434,
0.2467462271,
-0.2837896943,
0.2267532498,
0.3224819303,
-0.4963640571,
-0.173030749,
0.0051275338,
-0.1487742811,
-0.2355038077,
-0.0538835935,
0.4061658382,
-0.0787885189,
-0.3605761528,
0.5466028452,
0.0331227891,
0.1048732027,
0.0424412601,
0.0684081838,
0.941639781,
-0.3111875057,
0.2162597179,
0.5596238971,
-0.0025460229,
-0.4033756852,
-0.2936964929,
-0.1252213418,
0.1010689959,
-0.236467883,
-0.1962262541,
-0.1318236589,
-0.4667767584,
0.0572203286,
-0.6661193967,
0.2062963992,
0.0636747926,
-0.1756593138,
-0.1616927981,
0.1324809641,
0.1472688168,
0.1753536016,
0.0484486856,
-0.0012472137,
-0.041245997,
0.0121267624,
0.1333082169,
0.0419919901,
-0.2462377101,
-0.2159461677,
0.2609502077,
-0.1506166756,
0.028571004,
0.0838271603,
-0.1659713835,
0.2715794742,
-0.1430588961,
0.2127112895,
0.1533041596,
-0.0197042152,
0.284050405,
-0.0085476572,
0.0391802154,
-0.3217781186,
-0.1140474901,
0.0631576777,
0.3379703164,
-0.2410392016,
0.5201616883,
0.4561314881,
-0.0073196404,
0.057964582,
-0.0625931695,
0.1070721895,
0.2622314394,
0.1972303689,
-0.0501640625,
0.571362555,
0.275598377,
0.2373303026,
0.0270603672,
-0.1368017644,
0.0655467361,
-0.1194639504,
-0.1515820324,
-0.2082108259,
-0.3167414963,
0.121271126,
-0.3725422919,
0.2893475592,
0.0622706451,
-0.0132816965,
0.3908940554,
0.0847772732,
-0.0046323636,
-0.143890515,
0.3979232311,
0.3534494638,
-0.0868193731,
0.1720016897,
0.1429448426,
-0.0032618181,
-0.2947626412,
0.4820661843,
0.0177822486,
-0.0298865642,
-0.0325821862,
0.1280913204,
0.0457732528,
0.2533396184,
-0.1417145133,
0.1408378929,
0.0359459743,
0.0297057182,
0.2586109042,
-0.1777572483,
-0.4316973984,
-0.3306633532,
0.0106277848,
0.1676991135,
-0.1842902899,
-0.2401033491,
-0.1703084707,
-0.0373631679,
0.3053802252,
-0.0256108772,
-0.2176833153,
0.322409898,
-0.0214514211,
0.3570394218,
0.669424355,
-0.249420628,
-0.1231465489,
0.4696352482,
-0.3237857223,
-0.1044309661,
0.111603573,
0.0702890679,
0.3541652858,
0.0041366965,
-0.0440218896,
-0.0903696865,
-0.1212184653,
0.3055947125,
-0.0965267643,
-0.1311975867,
0.225217998,
0.0808433518,
0.1800922602,
0.0432256535,
-0.100347586,
-0.3944578469,
0.4690575898,
-0.0687006786,
0.1408861578,
0.1058789119,
0.0364591032,
-0.2742232978,
-0.2740654945,
-0.1592956781,
-0.1313501447,
0.3375792801,
-0.1488394439,
0.0257429667,
-0.2376045138,
-0.3887973726,
-0.1905229092,
0.2381242514,
-0.0400185175,
0.0005909784,
0.1616580784,
-0.1433951557,
-0.224755317,
-0.1466294974,
-0.0102205994,
-0.1418240815,
-0.0116475392,
-0.1284279227,
0.2948252857,
0.0363098979,
0.1882727295,
-0.1888585985,
-0.0742229447,
0.0935000107,
0.1896001846,
0.0957732871,
-0.155518204,
0.4198978245,
0.0185339581,
0.1653476954,
0.0407472923,
0.1263269186,
-0.0886519626,
-0.1433203667,
-0.0579833016,
0.1885074377,
-0.0610124804,
-0.0629315376,
0.0237909984,
0.5794562101,
0.0664438829,
0.398349762,
-0.0122991232,
0.1748764962,
0.1880549639,
-0.1832467318,
-0.0905973241,
-0.1429745257,
-0.0115728984,
0.4477985501,
0.3834444284,
-0.167335704,
-0.2730866671,
0.3041703999,
0.5254000425,
0.1387405396,
-0.0068685082,
-0.0814465284,
-0.179904148,
0.2821106613,
0.1481166333,
0.0180240422,
0.1794285178,
0.3364723921,
0.101720348,
0.105635576,
-0.1593880355,
-0.0237743463,
0.0749183148,
0.0301054101,
-0.0055216905,
0.016417129,
-0.0589954853,
-0.14414002,
-0.0818930045,
-0.2558989525,
0.0643958598,
0.0688648373,
-0.2571947575,
-0.0724464729,
-0.0504351258,
-0.0811873823,
0.0147792278,
-0.1926978081,
-0.0432975516,
-0.4102101922,
0.1613358259,
0.0397836529,
-0.2512672246,
0.4082574844,
-0.059076447,
-0.2016568482,
0.1945893764,
-0.0901444852,
-0.088603206,
-0.3783824444,
0.1800912917,
0.0163422041,
0.1017845571,
0.0101122307,
0.3469288945,
0.0168993007,
0.1499072611,
-0.2127228975,
0.0196148567,
0.0517326295,
-0.147674039,
-0.0338903703,
0.072047092,
0.2288358212,
-0.2756088674,
0.152930811,
0.2452516109,
-0.2540293932,
-0.1178651378,
0.0562491901,
0.1432033777,
-0.0320927016,
-0.2721738517,
0.1490701139,
-0.1415089518,
-0.3524089158,
0.0791587681,
-0.3988301158,
0.3791467547,
-0.00645498,
-0.1370362937,
0.0351490788,
0.0223248992,
-0.2152632475,
-0.0719895884,
-0.4446077347,
0.0634603649,
-0.1008325666,
-0.0732200965,
-0.0186566208,
0.0207430553,
0.11502368,
0.0150279505,
-0.1133949831,
-0.5253041387,
-0.1396808177,
0.4327146113,
-0.2014658004,
-0.1334906071,
0.5469974875,
0.1849723309,
-0.2685739994,
-0.0150797861,
-0.2984208763,
0.0338329785,
0.1508782804,
0.0023236871,
-0.2157333344,
0.1579726189,
-0.0173316263,
0.7264469266,
0.2910223007,
-0.1267201453,
-0.1147839278,
-0.1962475628,
0.1106472984,
0.1317902505,
-0.029017508,
-0.4755142033,
-0.0374589637,
-0.0940503031,
0.1027610302,
-0.2709336281,
-0.0640767887,
0.2485487759,
0.4160201848,
-0.4120845199,
-0.3575225472,
0.1175738648,
-0.3366908431,
0.2249912918,
-0.3050573766,
0.2969433963,
-0.1149432212,
0.1209468767,
0.0121090263,
0.2440430075,
0.1088888496,
-0.2996540666,
0.0664760247,
0.0148184067,
-0.375364691,
0.2600141466,
0.1935791224,
-0.0139996624,
-0.1285848469,
-0.0522100255,
0.2372804433,
0.0844522715,
0.309147805,
-0.5974332094,
0.1905171722,
0.409160912,
-0.2903329134,
-0.2686608136,
0.0744363368,
-0.0934718028,
0.2835868597,
0.1928519905,
0.2323406786,
-0.2917527556,
-0.0816627964,
-0.2049189061,
-0.2462277263,
-0.3318459988,
-0.2268573046,
-0.2825607657,
-0.0673753247,
-0.1056788936,
0.328941524,
0.1057234854,
-0.093139112,
-0.1121617332,
-0.1835065335,
0.0850802809,
-0.1289614737,
0.0089082103,
0.4399091899,
0.2581616938,
0.0957550108,
0.0231384318,
0.0018136447,
0.0294713434,
-0.2969561219,
0.2772449851,
-0.0737151578,
-0.0548087209,
0.1160175279,
-0.1062049121,
0.3790585697,
0.4680801928,
0.0209909119,
0.4216800332,
-0.0877089873,
0.3533375263,
-0.2584066987,
0.2560259104,
0.0746824071,
-0.201285854,
-0.1703722924,
-0.1626463234,
0.3817448318,
-0.0297061559,
-0.2717418969,
0.1986740828,
-0.2033969313,
-0.1684939116,
0.0089623565,
0.2284092456,
1.0989412069,
-0.6049192548,
-0.0631913766,
-0.3199730814,
-0.1295967251,
-0.1932376325,
0.1619348377,
-0.1454752088,
-0.3798644543,
-0.0958776996,
-0.0446432866,
-0.1203747094,
0.1903116554,
0.222849384,
-0.4763141572,
0.0453108922,
0.0826772898,
-0.0158166513,
-0.053796839,
0.0857194886,
0.2267689109,
-0.5300146937,
-0.2672765553,
0.0878039598,
-0.003131598,
-0.4076290429,
-0.1108335629,
-0.1381043792,
0.1012070701,
0.0013533186,
-0.2048484534,
-0.141563952,
-0.5126553178,
-0.0310579333,
0.0223967452,
-0.2806532383,
-0.0010205801,
-0.0021850369,
0.0012861254,
0.1348080337,
-0.0737180188,
0.2051579654,
0.0328306295,
0.4995695353,
-0.0395824313,
-0.0346122757,
0.3274905086,
0.0430506729,
-0.1543292105,
0.4600404799,
-0.0885949358,
-0.3783002794,
-0.0880597383,
0.1505746543,
0.0895119682,
0.1045468897,
0.4316310287,
0.0705664828,
0.1072729602,
-0.1773659587,
0.10752552,
0.3297341466,
-0.301353544,
0.4664866328,
0.1509512365,
-0.3971975446,
0.1685273051,
0.0400902666,
0.0715515763,
0.3789876103,
0.2130925506,
-0.3200154603,
-0.1801005751,
-0.3070733547,
0.0981553197,
-0.0051280949,
-0.0047619645,
0.2817223072,
0.0922124162,
0.1112031564,
0.082429938,
0.382914722,
-0.1607061923,
0.1288012564,
-0.4710478485,
-0.0861844346,
-0.399266243,
-0.0023445103,
-0.2232075036,
0.2558082938,
-0.1603620797,
0.700314045,
0.0832813382,
0.2738611996,
-0.3663798571,
-0.2554731667,
-0.4581247866,
0.39759323,
0.1494738758,
0.1711195707,
0.0417525396,
-0.0895037651,
0.0275861248,
0.3001736999,
-0.5012282133,
-0.2796922028,
-0.1467784345,
0.1485367864,
0.0718939155,
0.321184963,
0.0104423203,
0.1530552357,
0.1007178575,
-0.1485732198,
0.2995365858,
0.1371568888,
-0.1262770146,
0.2434359491,
0.1613570005,
0.2583533525,
-0.1614621133,
-0.065864712,
0.0488376468,
0.344845295,
-0.1857879907,
0.0928953066,
-0.0177287981,
0.0814497992,
0.4266802669,
0.0163477883,
0.2751740813,
0.0750821456,
0.0246076845,
0.2015178055,
0.1230055839,
-0.0335367694,
0.231336385,
-0.0955635458,
-0.2803135216,
-0.224970907,
0.2154681385,
0.2163048834,
-0.1700076014,
0.1758913249,
0.1357093304,
-0.1021309569,
0.3564726412,
0.3878492117,
0.0229429323,
0.2096784562,
0.2662773728,
-0.0907110944,
-0.1220260113,
-0.400773406,
-0.0565475486,
0.2515040338,
0.1686190367,
0.2333993167,
0.5188536048,
0.266946137,
0.0628484562,
0.3121745288,
0.0969327688,
0.7731792331,
0.0355856717,
-0.2280779779,
-0.1063071787,
0.0778792426,
0.1772417128,
0.0026592303,
-0.0090829311,
0.2526453435,
0.1282435656,
0.1609680057,
-0.2493723035,
-0.1211345568,
-0.1930092275,
0.1743640304,
-0.1143897548,
-0.2444413453,
0.2082294524,
0.0702759475,
-0.1169952005,
-0.1188067496,
0.1732617617,
0.0206393395,
0.7649597526,
-0.0720500574,
0.3239462972,
-0.0148435179,
-0.439347893,
-0.05214376,
0.2582207024,
-0.4002415538,
-0.1658608615,
-0.149653703,
0.2773952484,
0.2187277675,
0.352668494,
0.1083387136,
0.1462213695,
-0.3900359869,
-0.0591476485,
-0.0979828089,
0.123399511,
-0.0057191513,
-0.1346588433,
-0.0186479799,
-0.0586039126,
0.3146676421,
0.1123371124,
-0.1652233899,
0.0274717659,
0.143528074,
0.3673885465,
-0.0919071659,
0.4869938195,
0.1941066831,
-0.1355680078,
0.0483949259,
-0.033384297,
-0.2675362229,
-0.1428978592,
0.3206527829,
-0.4000180364,
0.0588197783,
-0.2263055295,
0.1019983068,
0.0596872531,
0.3621262908,
0.1174304485,
0.0723796785,
-0.4723438919,
-0.2349482775,
-0.655236125,
0.0114013571,
-0.0769949779,
-0.2930525541,
0.1641542763,
0.2058353871,
0.0051477505,
0.3640120625,
0.4453576803,
-0.2434600294,
-0.1943774074,
0.2442203611,
-0.3748537004,
0.0006775739,
0.0834984556,
-0.2616187632,
0.1132395864,
-0.2640105784,
0.0854106843,
0.2979795933,
0.1450811177,
0.0914869905,
-0.0240643136,
0.1953964382,
0.3445813358,
0.456800133,
-0.1306685209,
0.3079547882,
-0.1257482469,
0.252936542,
0.3577654064,
0.0457692258,
-0.0750845373,
0.0522868559,
0.1410206109,
0.3408602774,
0.0279192813,
-0.0452305302,
-0.1750470251,
-0.1457654685,
0.0575880036,
-0.1890041232,
-0.1555409878,
0.0548096225,
-0.0198324602,
0.1372144371,
-0.396238625,
0.0775619745,
0.2672229111,
0.4194969535,
-0.1872835159,
-0.6303864717,
0.2855832577,
-0.2099764049,
-0.6549613476,
0.0069322735,
0.2808080912,
-0.5046139359,
0.1485663354,
-0.7743094563,
-0.0654680431,
0.146304965,
0.1020641699,
-0.1546312869,
0.1827258915,
-0.5004362464,
-0.0918131545,
-0.1753417253,
0.1103485897,
-0.0111003676,
0.0091224071,
-0.3428884149,
-0.3361290097
] |
https://github.com/huggingface/datasets/issues/2327 | A syntax error in example | cc @beurkinger but I think this has been fixed internally and will soon be updated right ? | ![image](https://user-images.githubusercontent.com/6883957/117315905-b47a5c00-aeba-11eb-91eb-b2a4a0212a56.png)
Sorry to report with an image, I can't find the template source code of this snippet. | 17 | A syntax error in example
![image](https://user-images.githubusercontent.com/6883957/117315905-b47a5c00-aeba-11eb-91eb-b2a4a0212a56.png)
Sorry to report with an image, I can't find the template source code of this snippet.
cc @beurkinger but I think this has been fixed internally and will soon be updated right ? | [
0.0715635717,
-0.4951070547,
-0.1797280759,
-0.1540905684,
0.0774733424,
-0.2150442153,
0.1975010335,
0.2825199366,
-0.3641222715,
0.1687916964,
0.2558272183,
0.3997047842,
0.0529386811,
0.0039085615,
0.0124355946,
-0.1999748051,
0.0728852749,
0.2567011416,
0.0948016867,
0.0897849128,
-0.1415306032,
0.4616271853,
-0.2060654759,
0.1898975819,
-0.1933684945,
-0.037965551,
0.0317139961,
0.3373529315,
-0.2273014337,
-0.0470030867,
0.0010912854,
0.0641778484,
-0.1115032881,
0.0319320895,
-0.0000933617,
0.057327114,
0.4510403275,
-0.0477178134,
-0.0617728159,
-0.0962016061,
-0.3083208203,
0.1501755565,
-0.0974036679,
-0.2114108801,
-0.2634438872,
-0.0932574198,
0.1575714052,
0.2251989692,
0.6356445551,
0.1518200487,
0.4007506073,
-0.0871497616,
0.0372065455,
-0.2963176668,
0.1952325404,
0.1279036254,
-0.0493087508,
-0.003221177,
0.396677494,
-0.0520778075,
0.3011012375,
0.7066950798,
0.1491570622,
-0.0617366023,
0.1567131579,
-0.0642569587,
0.0901058018,
-0.1462880969,
0.110648185,
0.2388546169,
0.1958264112,
-0.0041710511,
-0.0273604728,
0.1946365833,
-0.2383274883,
0.0582040772,
0.1045201272,
0.1131513342,
-0.0325614028,
0.162871331,
-0.1777626276,
-0.3388651907,
-0.4302211702,
0.076321505,
0.1298823059,
0.123882696,
-0.2709282637,
-0.084822841,
-0.075040333,
-0.0733412653,
0.069080092,
-0.0947975442,
-0.175566256,
0.0328064151,
0.389811635,
0.0336385705,
0.2636394203,
-0.1664776355,
0.0907297879,
0.209367767,
0.3645393252,
0.1617858857,
0.0445679575,
0.4841557145,
-0.059863098,
-0.2177202702,
0.1092419401,
0.0952871814,
0.2170198411,
0.2489142716,
0.1988036782,
-0.1722975224,
-0.2023474574,
-0.4475754201,
-0.1721683741,
-0.0195732284,
0.1949790567,
0.0756073296,
-0.0213519707,
-0.1340054125,
0.0416854322,
0.0311295148,
-0.052157972,
0.2935717404,
0.2862025499,
-0.2618908584,
0.222936973,
-0.0731546581,
-0.0839981064,
-0.2374916673,
-0.3668648303,
0.4344540536,
-0.3073208332,
-0.3818000555,
-0.2056152225,
-0.0999424234,
0.1797950417,
0.0794075355,
0.3844332397,
-0.1954481751,
0.2693595588,
0.1235045493,
0.1823216975,
0.0405628793,
-0.061338678,
-0.0378032178,
0.187440604,
-0.1407770365,
0.0633983761,
0.2403681725,
-0.3574040234,
0.0198714957,
-0.350165993,
0.3257005215,
0.0071028448,
0.0871217474,
-0.001599566,
0.1873693615,
0.2495844215,
-0.0174722783,
0.0723603591,
-0.0797397271,
0.0049852543,
-0.1812770963,
0.031353388,
0.1445377618,
-0.1001029164,
-0.0282109026,
0.0006581304,
-0.1491845548,
0.1289748847,
0.1001667529,
-0.0855375826,
0.2190527022,
-0.3449907303,
0.3650204539,
0.1883976609,
-0.2218052745,
0.2569124699,
0.3305477202,
-0.0898409635,
-0.1762399226,
-0.138530165,
-0.1838119924,
-0.0027717929,
-0.0424131788,
-0.0761340857,
0.2300000936,
0.0800397322,
0.179326579,
-0.2126227468,
0.0947307795,
-0.1867512167,
-0.0717879981,
-0.0061205588,
-0.0782552138,
0.1166820601,
0.3036961854,
0.1652328372,
-0.3182798922,
-0.0693619698,
0.1438330561,
0.4180039465,
-0.167189315,
0.0100695463,
0.0409813523,
0.1267258823,
-0.1673320979,
-0.23092255,
0.0167773459,
-0.0212330483,
0.146343112,
-0.2395847738,
-0.0800208822,
-0.1342270821,
-0.311991632,
0.4072882533,
0.0106116766,
-0.0169110093,
-0.1834713668,
0.02159019,
0.0133521929,
-0.204918474,
-0.0322176814,
0.0253995713,
0.0493333787,
-0.3071588278,
-0.0733256936,
0.0361092612,
-0.2548870146,
0.0245672707,
-0.1094737276,
-0.1592315137,
0.4442051053,
0.1413283795,
0.0414529927,
-0.0152206151,
0.0102454955,
-0.0901466534,
-0.5474358797,
-0.0892877057,
0.1133849025,
0.0638948157,
-0.0388868488,
-0.2313877791,
0.179283917,
0.137007013,
-0.0850085989,
0.1044772267,
0.0620643273,
0.0435258411,
0.0470073298,
-0.0810096115,
-0.1532191187,
-0.0685969442,
0.1944920868,
-0.0653940812,
-0.3109585643,
-0.3392187059,
-0.0884439498,
0.2035231143,
0.0368336104,
0.2094865143,
0.0864071399,
0.1118897349,
-0.0480871871,
0.1330352873,
-0.192891255,
0.009098269,
0.1427801996,
-0.0994562879,
-0.0307846796,
0.0792721212,
-0.3007697761,
0.3233333528,
0.1179040074,
0.1392184943,
-0.0968128964,
0.0771728083,
-0.182692036,
-0.2567154467,
-0.1586352736,
-0.118012324,
-0.0927414075,
-0.170384258,
0.209769398,
-0.1907850355,
-0.2285812348,
0.0054409592,
0.1215942651,
-0.004310871,
-0.2447492331,
0.3674564362,
-0.0179618616,
-0.1747186035,
0.2753225267,
0.1864563227,
0.1215701997,
0.0565675832,
0.237920925,
-0.2804913521,
0.0258786082,
-0.1376214474,
0.3204862475,
0.0677374229,
-0.2399544865,
0.1588525921,
-0.178507939,
0.2150991559,
-0.1911413819,
-0.6027470231,
0.2668874562,
0.0793694407,
0.1450598538,
0.3221102357,
0.232511282,
-0.0992601886,
0.1294579655,
0.3499360383,
-0.0739871785,
-0.2206541002,
0.0096326871,
0.032423038,
-0.0643796027,
-0.4315520525,
0.2253301591,
0.1619851589,
-0.2519225776,
-0.1134442985,
0.2032534033,
0.2085521072,
0.4996030629,
0.5264033079,
0.1237836406,
-0.1164513677,
0.0399326086,
0.0033893425,
-0.3151536584,
0.1725255698,
-0.3455629945,
-0.2890866101,
-0.1712594777,
0.0984721109,
0.1768658161,
-0.1460027695,
0.0523328967,
-0.3894008696,
0.0924830586,
-0.0556530841,
-0.0745257363,
-0.0114937276,
-0.0547325946,
-0.0129132532,
-0.4187717736,
-0.5239933133,
0.1694460958,
0.1538662016,
-0.378980279,
0.1989573538,
0.0611084104,
-0.0875572562,
0.2441907227,
0.4768975079,
0.0424323939,
-0.0711890236,
0.279088676,
0.0041553099,
0.3523956835,
-0.023396451,
0.1190907657,
0.206628561,
0.3636346459,
-0.0182831138,
0.1448670179,
-0.0236818884,
-0.0788126439,
-0.0408138186,
-0.0138907619,
-0.1867890209,
0.0739573464,
-0.0070715994,
0.326353699,
0.0798629224,
0.095648475,
0.0213640109,
0.1200431436,
0.2129472643,
0.1882090718,
0.3878150582,
0.2118500173,
-0.0233112089,
-0.0469508134,
-0.1843386292,
0.0923286751,
0.1610890925,
0.1099521145,
-0.1553367078,
-0.1177561954,
-0.2147239149,
0.0611133128,
-0.3169386983,
0.4080031514,
-0.27922225,
-0.1637156308,
0.1321356297,
-0.0995101482,
0.0626946911,
-0.0583756603,
-0.2980418503,
0.3989474177,
0.1735862195,
0.0962033942,
-0.1565979719,
-0.063265875,
0.0652254224,
-0.537446022,
-0.1647797525,
0.0501793399,
-0.0044469875,
-0.2646269202,
-0.3756532073,
-0.2079762816,
0.2388739288,
-0.0106989732,
0.2318129689,
-0.161408186,
0.0356579386,
-0.0671871975,
-0.1758163422,
0.2079932094,
0.1705130041,
-0.2478563637,
-0.2505510449,
-0.1706192046,
-0.0673831478,
0.1498775482,
-0.042433355,
-0.0337126888,
0.0404797941,
0.0624478124,
-0.0881768391,
0.133631289,
0.1885136366,
-0.3140096664,
-0.2016717196,
-0.044311244,
0.1782082319,
0.16437985,
0.0213039313,
0.1333989799,
0.1246833056,
0.0323377289,
-0.2460217923,
0.2191870213,
0.094593063,
0.0395982638,
0.2605479658,
-0.0328814276,
-0.2100170255,
-0.0165725555,
0.2635546327,
0.8582572937,
0.2074985802,
0.0427848287,
0.2182799578,
-0.208802551,
0.1898966581,
-0.0901073292,
-0.0922127888,
-0.3557021916,
-0.0908881724,
0.069755055,
-0.1454475373,
0.1278451085,
0.1065114737,
-0.0965303704,
-0.1428255141,
-0.2703928649,
0.1838329583,
0.0104391398,
-0.0242331419,
0.152951926,
0.0700930133,
0.0235539954,
0.3410840034,
0.0684473813,
0.0254688356,
-0.2867957652,
-0.3670867682,
-0.1807395369,
-0.398881495,
-0.2417757958,
0.3232110739,
-0.1162726507,
0.1979613751,
0.3024291396,
-0.16817002,
0.0923654586,
-0.1475241333,
0.0238217041,
0.050320521,
-0.2876914144,
0.3686482608,
0.2929598093,
-0.1519887149,
-0.3081812561,
0.3480051458,
0.2104073912,
-0.3964599371,
0.1499016136,
0.1032109186,
0.0711077452,
0.0543969013,
-0.3257028162,
-0.087975435,
-0.0482918955,
0.0465835743,
-0.2456076294,
-0.0358541422,
-0.2566568851,
-0.31480515,
0.3563576937,
0.1371209025,
-0.1007084325,
-0.1744981557,
0.313700676,
0.0182478279,
0.1877688915,
-0.0360826477,
-0.0464047827,
-0.0668419972,
0.1393824816,
0.2138676196,
-0.258638382,
-0.3567463458,
-0.0580910295,
-0.1454876214,
-0.368062526,
0.3555620611,
-0.1243837103,
-0.1583321095,
-0.1762832999,
0.3298706412,
0.0042307079,
0.1877346933,
0.0301688667,
-0.0621548034,
0.0345118493,
-0.0330365598,
-0.5213059187,
0.2617718875,
-0.1892851442,
0.1511417925,
0.3945092857,
-0.0811311156,
-0.5572288632,
0.0285612755,
-0.0901460797,
-0.0746214017,
0.0081120972,
0.0527406223,
0.0504556634,
0.0249889567,
0.2616669834,
0.3452381194,
-0.2784822881,
-0.4186273813,
-0.1332174093,
0.0851490647,
0.0555994175,
-0.1165198609,
0.3011631072,
0.3788212836,
-0.2120733112,
0.0549802259,
-0.0322546437,
-0.2884771228,
0.0911688507,
0.1308810264,
0.0294639077,
-0.1145009324,
0.3699086308,
-0.2453591079,
0.2558154166,
0.3970488906,
-0.1166399792,
-0.0859458968,
-0.0131876506,
-0.3108521104,
0.2506211102,
0.169859603,
0.1149438024,
0.2961706221,
0.0401937738,
-0.1445768625,
0.1179862842,
-0.2378510535,
0.1796549559,
-0.0705137253,
-0.4775744975,
0.0499942154,
-0.1605377942,
0.373444587,
-0.2396961451,
0.0875539258,
0.0259528048,
0.0550788715,
0.0277313851,
0.1427137852,
-0.1049510241,
0.0520016663,
-0.0014734467,
0.1725532562,
0.0775347352,
-0.2466000915,
-0.0430271141,
0.1976915747,
-0.2594718039,
0.1988372803,
0.0102923708,
0.1281146407,
0.1632476151,
0.3542841673,
-0.0841072202,
0.0624634847,
0.1840751022,
0.0511633344,
0.3145600557,
-0.0667689666,
-0.0732246339,
0.1928113103,
0.4372864366,
0.3121576011,
0.0745017976,
0.0863802508,
0.4601461589,
0.1916146427,
0.0246330202,
0.3168785274,
0.0409521274,
-0.150285691,
-0.3962422311,
-0.05349629,
-0.3450788558,
-0.2443111539,
0.0385399871,
0.0660980716,
0.2023184001,
-0.0611169301,
0.0533979498,
-0.0326910019,
-0.0049799667,
-0.0337294824,
0.0840257034,
-0.3494592905,
0.2607452273,
0.119083561,
-0.0260091741,
0.1218364462,
0.2161661088,
0.5713268518,
0.2512054145,
0.1727866232,
-0.2073771656,
-0.164416045,
-0.1553098112,
0.1315273494,
0.0071027959,
0.0951863453,
-0.0903443843,
0.2418674082,
0.3023293316,
-0.3576980829,
0.2153082937,
0.1849851161,
-0.0085017849,
0.0095107034,
-0.0305108279,
-0.1985210478,
-0.0481642969,
-0.3636628091,
0.0193188693,
-0.4257337451,
-0.1030887067,
0.0975457802,
0.1103423461,
-0.0550465547,
0.0044381428,
0.1791220307,
0.1831069738,
0.3706063628,
0.0624005124,
0.1879456192,
-0.0618248731,
-0.373886168,
-0.1120655015,
0.2231787592,
-0.2363317013,
-0.1832205206,
0.0711994842,
0.2132914662,
0.0434759557,
-0.010412463,
0.3475266993,
0.2639902532,
-0.035210263,
0.2855531573,
-0.2770668268,
0.126566872,
0.1273533106,
-0.176458016,
0.2080286294,
-0.125267297,
0.0252976082,
-0.0786889642,
0.3584911823,
-0.1522977352,
-0.1829761118,
-0.1008875743,
-0.0752157569,
0.2810136676,
0.0117125595,
-0.209033519,
-0.309966296,
-0.2741809487,
0.1419515461,
-0.1518731117,
-0.2074364424,
0.4317163825,
0.181779623,
0.1159687936,
0.0878034681,
-0.3782548606,
-0.2854495943,
0.026446972,
-0.1224925444,
-0.2001468688,
-0.2672690749,
0.1795644015,
-0.1553335339,
0.0333183073,
-0.166778326,
-0.0431230031,
-0.1626895666,
-0.2106925845,
-0.4100951254,
-0.6633719206,
0.5129125714,
-0.3869134188,
-0.3491479456,
0.1915045381,
0.0613827184,
-0.0574716069,
-0.113666065,
-0.2272026539,
0.1705518514,
0.1955659539,
0.0586179309,
-0.1175839007,
0.115811795,
0.1681632698,
0.0610025153,
-0.0177459214,
0.08515995,
0.276968658,
-0.1020572409,
-0.1372489929,
-0.3400894701
] |
https://github.com/huggingface/datasets/issues/2323 | load_dataset("timit_asr") gives back duplicates of just one sample text | Thanks @ekeleshian for having reported.
I am closing this issue once that you updated `datasets`. Feel free to reopen it if the problem persists. | ## Describe the bug
When you look up on key ["train"] and then ['text'], you get back a list with just one sentence duplicated 4620 times. Namely, the sentence "Would such an act of refusal be useful?". Similarly when you look up ['test'] and then ['text'], the list is one sentence repeated "The bungalow was pleasantly situated near the shore." 1680 times.
I tried to work around the issue by downgrading to datasets version 1.3.0, inspired by [this post](https://www.gitmemory.com/issue/huggingface/datasets/2052/798904836) and removing the entire huggingface directory from ~/.cache, but I still get the same issue.
## Steps to reproduce the bug
```python
from datasets import load_dataset
timit = load_dataset("timit_asr")
print(timit['train']['text'])
print(timit['test']['text'])
```
## Expected Result
Rows of diverse text, like how it is shown in the [wav2vec2.0 tutorial](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_tuning_Wav2Vec2_for_English_ASR.ipynb)
<img width="485" alt="Screen Shot 2021-05-05 at 9 09 57 AM" src="https://user-images.githubusercontent.com/33647474/117146094-d9b77f00-ad81-11eb-8306-f281850c127a.png">
## Actual results
Rows of repeated text.
<img width="319" alt="Screen Shot 2021-05-05 at 9 11 53 AM" src="https://user-images.githubusercontent.com/33647474/117146231-f8b61100-ad81-11eb-834a-fc10410b0c9c.png">
## Versions
- Datasets: 1.3.0
- Python: 3.9.1
- Platform: macOS-11.2.1-x86_64-i386-64bit}
| 24 | load_dataset("timit_asr") gives back duplicates of just one sample text
## Describe the bug
When you look up on key ["train"] and then ['text'], you get back a list with just one sentence duplicated 4620 times. Namely, the sentence "Would such an act of refusal be useful?". Similarly when you look up ['test'] and then ['text'], the list is one sentence repeated "The bungalow was pleasantly situated near the shore." 1680 times.
I tried to work around the issue by downgrading to datasets version 1.3.0, inspired by [this post](https://www.gitmemory.com/issue/huggingface/datasets/2052/798904836) and removing the entire huggingface directory from ~/.cache, but I still get the same issue.
## Steps to reproduce the bug
```python
from datasets import load_dataset
timit = load_dataset("timit_asr")
print(timit['train']['text'])
print(timit['test']['text'])
```
## Expected Result
Rows of diverse text, like how it is shown in the [wav2vec2.0 tutorial](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_tuning_Wav2Vec2_for_English_ASR.ipynb)
<img width="485" alt="Screen Shot 2021-05-05 at 9 09 57 AM" src="https://user-images.githubusercontent.com/33647474/117146094-d9b77f00-ad81-11eb-8306-f281850c127a.png">
## Actual results
Rows of repeated text.
<img width="319" alt="Screen Shot 2021-05-05 at 9 11 53 AM" src="https://user-images.githubusercontent.com/33647474/117146231-f8b61100-ad81-11eb-834a-fc10410b0c9c.png">
## Versions
- Datasets: 1.3.0
- Python: 3.9.1
- Platform: macOS-11.2.1-x86_64-i386-64bit}
Thanks @ekeleshian for having reported.
I am closing this issue once that you updated `datasets`. Feel free to reopen it if the problem persists. | [
0.2821879983,
-0.4890302122,
0.0636293143,
0.3835483789,
0.155076921,
0.0093224104,
0.2025513202,
0.1971772313,
-0.1960432082,
0.0225639325,
-0.0537860133,
0.2588160634,
-0.06076096,
-0.0019164644,
0.1897579581,
0.0341103002,
0.1301133335,
-0.0039514499,
-0.0855849013,
-0.2164428085,
-0.034972012,
0.501829505,
-0.1255065948,
0.0396249518,
-0.3864375949,
0.0896656886,
-0.225618124,
0.0954399556,
0.0274891425,
-0.43888098,
0.2015984207,
0.2562796175,
0.0076609515,
0.1743333489,
-0.0001294062,
-0.1238208935,
0.1033359468,
0.1966974586,
-0.2948194444,
-0.3376135826,
0.0371453874,
-0.0082020694,
0.4765503407,
0.0588159971,
-0.1446310729,
-0.1229953542,
0.046137318,
-0.0911030993,
0.5953748226,
0.053085722,
0.0554758199,
-0.0213037468,
-0.273177743,
-0.1502213627,
0.3001241088,
0.1408752948,
0.0361843817,
0.0638974756,
0.2574383914,
0.0740014315,
0.0937065706,
0.4073670805,
-0.2614639699,
0.0803650767,
0.0201923642,
0.2505536973,
-0.3521605432,
-0.2842360735,
0.1567362249,
0.3818915784,
0.4144081473,
-0.1949870735,
-0.2438048273,
-0.5332147479,
0.1619431823,
0.0539520085,
0.1597354561,
-0.0827359408,
-0.2399925143,
0.1323283017,
-0.2721695602,
-0.0274026766,
-0.0044496567,
0.0038487357,
0.1031656936,
-0.284270674,
-0.1285128742,
0.1618483067,
0.3656544387,
-0.0383116677,
-0.075381346,
-0.0201198924,
-0.041332081,
0.1814561188,
-0.4986145198,
0.0300713275,
0.0270303898,
-0.0612336248,
0.2511674464,
0.0161169749,
0.4327555299,
-0.0579362549,
-0.130184263,
-0.0773008019,
0.4126272202,
0.3775302768,
0.0727247298,
-0.0954679027,
0.0092433598,
-0.1186076403,
-0.20985201,
0.0403313339,
-0.0111006927,
0.1610852778,
0.0967434272,
-0.2585274875,
0.3425216675,
-0.3690463006,
-0.4510849416,
0.0706900135,
-0.5093213916,
-0.1209714934,
-0.1602244526,
0.0935089588,
0.1373852491,
0.3814001977,
0.186717853,
0.1462111324,
-0.1727950871,
-0.2743342817,
-0.134309411,
-0.1454473585,
-0.0307366513,
0.1082836241,
0.1738090068,
-0.5300571918,
0.2907097638,
0.3179666996,
0.3418072164,
-0.4182768166,
-0.1233286336,
-0.0930302367,
-0.1239286959,
0.0292862989,
-0.0926787779,
0.4591899216,
0.0831209943,
-0.0351973884,
0.011206029,
-0.0125037581,
-0.2134314626,
-0.1196761727,
0.2937435806,
-0.0058473516,
-0.2225894928,
-0.050811369,
0.0654355064,
0.3292103708,
0.0748782605,
0.1093472019,
-0.1791653335,
-0.0059523294,
-0.4267409146,
-0.1410838813,
0.0414112583,
0.3480869532,
-0.2709085047,
-0.090894796,
0.2106882483,
0.2735227048,
-0.0548247769,
0.5467897058,
-0.0427983999,
0.427621156,
-0.2642587125,
0.0796883851,
0.0182302482,
-0.4098274112,
-0.2936975062,
0.2606928945,
-0.1333964914,
0.3572216928,
0.2087150663,
0.1109745055,
0.2958291769,
0.1419263333,
0.1747302711,
0.0112376064,
0.3328602612,
-0.1269821525,
-0.2913202643,
-0.2165752649,
0.0697632283,
0.0462374911,
-0.3213198781,
0.2135716677,
0.0712144449,
0.0611042492,
0.4559498727,
0.0401255488,
-0.027841052,
0.0761944726,
0.1083892137,
0.0714353248,
0.3267048597,
-0.0576602407,
-0.2763385475,
0.06276232,
0.1535567343,
0.0899407789,
0.1892703921,
-0.0697184131,
-0.2410974801,
-0.0870904326,
-0.364434123,
-0.1309636682,
-0.0653522387,
0.3186421394,
0.0336823314,
0.0968320221,
-0.070033133,
0.4874729812,
-0.139786616,
0.086806275,
-0.3534026146,
0.0399515405,
0.1423213631,
0.0782769322,
0.2095779926,
0.3197642863,
0.2262899578,
0.1240754053,
0.0834155977,
0.2634822726,
0.0297400691,
0.1141458526,
-0.1574546993,
-0.2126146257,
0.1984331906,
-0.2226002961,
-0.0833782256,
0.1785471588,
0.2592632771,
-0.1271861345,
-0.2556273341,
0.1953918934,
0.1241353899,
0.2335561663,
-0.0585897937,
0.0215330441,
0.0859504864,
-0.0684443489,
-0.1082617491,
-0.2807022929,
0.5420556068,
-0.1498946249,
0.2180124074,
0.1538834721,
-0.312582314,
0.2360619456,
0.2239009291,
-0.0717563629,
-0.0559587926,
0.3721967041,
-0.1574178636,
-0.0650917888,
-0.1354454756,
0.0964776799,
0.3051019609,
0.1097939089,
0.0447406881,
0.0272255652,
-0.1308659017,
0.0455971323,
0.245535627,
-0.0921412259,
-0.0883158743,
0.3082366288,
0.3380035758,
-0.0945694,
-0.5984463692,
0.1292410046,
-0.0442170314,
0.2760112882,
-0.3640031219,
0.0128944246,
-0.3676788211,
0.038561549,
-0.3294142187,
-0.0264904201,
-0.200512439,
-0.1136626825,
0.1886166334,
0.3473803997,
0.2270386964,
0.0175408572,
0.2276712805,
0.3561973572,
-0.0489332452,
0.2410361767,
-0.08919736,
0.1284424663,
-0.345517993,
-0.0424880534,
-0.0230717361,
0.037392661,
0.2573553026,
-0.1349247694,
-0.3074092567,
-0.400292784,
-0.2227883041,
0.2531310916,
-0.2650930583,
0.410592705,
0.3220896125,
-0.0436665863,
-0.4077952802,
-0.2074151635,
0.0193406716,
-0.0297956057,
-0.4018991888,
0.2117159069,
-0.0361040495,
0.0585929491,
-0.0396239758,
-0.5401882529,
0.05361766,
0.0501104072,
0.5322160721,
0.0152632417,
0.0834391266,
0.2894311845,
0.0147457011,
0.0821890458,
-0.1889851689,
0.1407682598,
-0.5706542134,
-0.2644886672,
0.1145200059,
0.1552300453,
-0.2780033052,
-0.239774406,
0.0120846806,
-0.0123426067,
-0.1511865109,
-0.5954259634,
-0.2620061338,
-0.1077623367,
0.0324840918,
-0.1540210396,
0.3147450984,
0.2269967049,
0.1243946776,
0.020305194,
-0.2161236703,
0.0191075616,
0.5199981332,
0.1948654205,
0.11954391,
0.1072268859,
0.117914103,
-0.02235757,
0.3257387578,
0.8683476448,
0.1731054783,
0.2302146107,
-0.172684595,
0.1653016657,
-0.2504991293,
-0.3475958407,
-0.2155774683,
-0.2688344121,
0.0127171706,
0.4312971234,
0.1373864859,
0.1408711076,
-0.164645195,
0.1525143385,
-0.186992228,
-0.205577895,
-0.1615319401,
-0.1367042959,
0.1135768294,
0.1412167549,
-0.0289980825,
0.2722266614,
-0.2952245474,
-0.1493306607,
-0.0974011719,
0.1342123598,
-0.1416783333,
-0.3199520111,
-0.0744407624,
-0.6836328506,
0.0644326955,
0.2459245026,
0.2961191535,
-0.0062790052,
-0.0122517282,
0.4832977057,
0.2160003334,
1.0575668812,
-0.0956712961,
0.0187032111,
-0.2254543751,
-0.0384579115,
-0.2621952295,
0.0948657244,
-0.2956037521,
-0.1604373753,
-0.0091196643,
0.150004074,
-0.1343820095,
0.0799590349,
0.0538674816,
0.4325526953,
-0.285333693,
-0.1934049278,
-0.3532070518,
-0.2623339891,
-0.3100247681,
-0.0245486647,
-0.0181676503,
0.1022893935,
-0.238850385,
-0.0308572501,
0.0258366372,
-0.1209613681,
0.4737132788,
0.1313101351,
0.6074250937,
-0.0171293151,
0.4328969717,
0.5953526497,
-0.1411607563,
-0.3634351194,
0.8624761701,
-0.1211221069,
-0.2612602711,
-0.1437159032,
-0.3327287138,
0.2774759233,
0.6624307036,
-0.2186657041,
0.3310765922,
-0.1123999804,
-0.0247947704,
-0.2145534307,
-0.1021723673,
0.3796007037,
0.2069095671,
0.0043721693,
-0.3903518617,
0.3599167764,
-0.0825875476,
-0.2580901384,
0.1440048963,
0.0782554969,
-0.2731482983,
0.3259179294,
-0.206681326,
1.1999925375,
-0.1144601628,
0.4627690017,
0.0744249597,
0.1892923862,
0.4935740829,
0.0038520959,
-0.0439088903,
-0.3514220417,
-0.0762088373,
-0.0938367099,
0.0494184941,
-0.1900261045,
0.0923128426,
-0.3971047997,
0.292714864,
0.3565188944,
0.1551826894,
0.088017866,
0.0852863789,
-0.0418358147,
-0.0442517772,
-0.1079174429,
-0.1045988649,
-0.0658707991,
0.1889070123,
0.2575896084,
0.1798466593,
0.2313101888,
-0.5975797176,
-0.4764405489,
0.007284598,
-0.3215948045,
-0.0100114429,
0.1055299491,
-0.3966957033,
0.0478973836,
0.396427393,
0.1667462885,
0.1279728711,
-0.123854585,
-0.1648804396,
0.2242879868,
0.4286781549,
-0.1358835399,
-0.2301556319,
-0.0153527856,
0.0764357448,
-0.4419249296,
-0.0202908702,
0.260707885,
-0.0377196223,
-0.25432688,
0.1783219874,
-0.2497576624,
-0.359618336,
0.0049398751,
0.2692560852,
0.1709794998,
-0.3426193893,
-0.031065885,
0.1471384913,
-0.310215503,
0.0882946402,
0.0200823862,
-0.3249723315,
0.0588381924,
0.7058207989,
0.374114871,
-0.1189960614,
0.5002726316,
0.2675576806,
0.0116621982,
-0.0957495943,
0.2260365188,
-0.0397438742,
-0.4815369844,
0.2151361704,
-0.0029088357,
0.091794394,
-0.2900524139,
0.4267717302,
-0.0217258744,
0.1830295026,
-0.1333243698,
-0.2961259782,
-0.0423950627,
0.2187687755,
0.1394968182,
0.1619934738,
-0.1724784523,
-0.1619065553,
0.0097094504,
0.110966906,
-0.163784802,
0.1157053784,
0.0443555154,
0.1690419316,
0.051750876,
-0.0303462408,
0.2929795682,
0.0675778911,
0.0711345598,
0.2659066319,
0.0648533776,
-0.0932779461,
-0.2981213927,
0.2246005535,
-0.0966290534,
0.1079114899,
-0.0679996014,
-0.007508561,
0.2013833374,
-0.1998025775,
0.2344640195,
0.3591982722,
0.1373312175,
0.1290595233,
-0.1139094159,
-0.1763344705,
0.1196943969,
-0.0580040328,
-0.3185039759,
-0.0318248607,
0.3222024143,
-0.000190508,
0.0447844118,
-0.0174141526,
0.1147965044,
0.1557324082,
0.147576645,
-0.1878323853,
-0.2165785581,
-0.1440661997,
-0.1786866933,
0.0539103225,
0.3492901325,
0.3345218003,
-0.3116487265,
-0.1201457232,
0.0710490644,
0.0249940138,
-0.3629959226,
-0.3286016583,
-0.0276242681,
-0.067470476,
-0.1107201204,
0.4090245068,
0.1963603944,
-0.3866884112,
0.2300875336,
-0.1666326821,
0.2678836882,
-0.2556225061,
0.1114899516,
0.4208317399,
0.1170661151,
-0.2309043705,
-0.0539009236,
-0.1027715877,
-0.0972769409,
0.5784751773,
-0.3655501604,
0.0661404058,
-0.4556353092,
0.327943027,
0.2335662693,
-0.1663714647,
0.3428981602,
0.2844086885,
-0.3349221051,
0.2329865992,
0.015256728,
0.581543982,
-0.0264841486,
-0.063835144,
-0.2792889774,
0.1324144453,
-0.166241318,
-0.3447315693,
-0.0006580345,
-0.3484950662,
-0.331107825,
0.2563077211,
-0.0774772912,
-0.2266085893,
0.5246613622,
0.1639320403,
-0.0409045294,
-0.7086566687,
-0.3736548722,
-0.0045373365,
0.2766521871,
-0.2027625442,
0.4182368815,
0.3229883611,
0.0039529111,
0.3944135308,
0.4252387285,
0.3170160949,
0.0883707404,
-0.0516742654,
0.3155108094,
-0.4504494071,
-0.005970927,
0.0368651599,
0.3054409921,
-0.124253206,
-0.1066464782,
0.0966201052,
-0.1028173044,
0.0515902042,
0.0424059853,
0.206260711,
0.0443426035,
-0.5337699056,
0.2679805756,
-0.1764917374,
0.1740654111,
-0.0651562363,
0.1449664384,
-0.5101770759,
0.2612889409,
0.392044276,
0.0583924651,
0.0105525991,
-0.0828597099,
0.0329215787,
-0.138363421,
0.2497991771,
0.2675230801,
0.1021080017,
-0.2600736916,
-0.1450134665,
-0.5910227895,
0.0332324728,
-0.1908808649,
-0.0054459409,
0.1442642361,
-0.0413943231,
-0.035870865,
0.2769309282,
-0.0004989388,
0.0354807749,
-0.412913233,
0.2628389597,
-0.2723471522,
-0.2296372503,
0.2392847687,
0.2164620012,
-0.1023937166,
-0.1503430158,
0.1333627999,
-0.097597219,
-0.1930181235,
-0.0528885052,
0.1203178465,
-0.2028675973,
-0.0992028564,
-0.0252358206,
0.2476500869,
0.240509063,
0.0045694658,
-0.1746526361,
-0.1247415468,
-0.258749038,
-0.3179558814,
0.3191438019,
0.2317636609,
0.3002185225,
-0.1924442202,
-0.2965007722,
0.0314553976,
0.1041971073,
0.2828021348,
0.0189739577,
-0.4451438487,
0.1156832874,
-0.0879512206,
0.3841790855,
-0.1302320957,
0.4656864107,
-0.0369803794,
0.1830607802,
-0.1826773137,
-0.5681954622,
0.4401472211,
-0.6994360685,
-0.1401676983,
-0.0263721496,
0.3481686413,
0.0437881984,
-0.2374207526,
-0.903819859,
-0.1497897804,
0.3655126393,
0.0880111977,
-0.1035749763,
0.3861140013,
-0.0456481017,
-0.0585039854,
-0.1488341242,
0.3935343027,
0.4965206981,
-0.1668691635,
0.3587187231,
-0.5926188231
] |
https://github.com/huggingface/datasets/issues/2322 | Calls to map are not cached. | I tried upgrading to `datasets==1.6.2` and downgrading to `1.6.0`. Both versions produce the same output.
Downgrading to `1.5.0` works and produces the following output for me:
```bash
Downloading: 9.20kB [00:00, 3.94MB/s]
Downloading: 5.99kB [00:00, 3.29MB/s]
No config specified, defaulting to: sst/default
Downloading and preparing dataset sst/default (download: 6.83 MiB, generated: 3.73 MiB, post-processed: Unknown size, total: 10.56 MiB) to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b...
Dataset sst downloaded and prepared to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b. Subsequent calls will reuse this data.
executed [0, 1]
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 94.83ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 92.75ba/s]
executed [0, 1]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#0: 100%|██████████| 1/1 [00:00<00:00, 118.81ba/s]
#1: 100%|██████████| 1/1 [00:00<00:00, 123.06ba/s]
executed [0, 1]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 119.42ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 123.33ba/s]
##############################
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-6079777aa097c8f8.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-2dc05c46f68eda6e.arrow
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-1ca347e7430b98f1.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-c0f1a73ce3ba40cd.arrow
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-832a1407bf1ac5b7.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-036316a259b773c4.arrow
- Datasets: 1.5.0
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
``` | ## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
| 387 | Calls to map are not cached.
## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
I tried upgrading to `datasets==1.6.2` and downgrading to `1.6.0`. Both versions produce the same output.
Downgrading to `1.5.0` works and produces the following output for me:
```bash
Downloading: 9.20kB [00:00, 3.94MB/s]
Downloading: 5.99kB [00:00, 3.29MB/s]
No config specified, defaulting to: sst/default
Downloading and preparing dataset sst/default (download: 6.83 MiB, generated: 3.73 MiB, post-processed: Unknown size, total: 10.56 MiB) to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b...
Dataset sst downloaded and prepared to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b. Subsequent calls will reuse this data.
executed [0, 1]
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 94.83ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 92.75ba/s]
executed [0, 1]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#0: 100%|██████████| 1/1 [00:00<00:00, 118.81ba/s]
#1: 100%|██████████| 1/1 [00:00<00:00, 123.06ba/s]
executed [0, 1]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 119.42ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 123.33ba/s]
##############################
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-6079777aa097c8f8.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-2dc05c46f68eda6e.arrow
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-1ca347e7430b98f1.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-c0f1a73ce3ba40cd.arrow
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-832a1407bf1ac5b7.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-036316a259b773c4.arrow
- Datasets: 1.5.0
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
``` | [
-0.1652985811,
-0.3959718943,
-0.0088476408,
0.1456609815,
0.2062432468,
-0.1019177735,
0.300268203,
0.1251289845,
0.3953082561,
0.0206205156,
-0.0369779579,
0.2428550422,
0.1699712873,
-0.2849352956,
0.188086763,
0.2596048415,
0.2713772058,
-0.0385336578,
-0.2219657153,
-0.1745343506,
-0.1918821931,
0.1723638475,
-0.3064853549,
-0.2573415935,
-0.2379023135,
0.1117418632,
-0.2603808641,
-0.1230314821,
0.4237757027,
-0.3212156296,
0.3784760237,
-0.0580660664,
0.0148670431,
0.6959591508,
-0.0001131878,
-0.1605280191,
0.1358755082,
-0.1383192837,
-0.0015482461,
0.2133312225,
-0.3389547467,
-0.310015589,
-0.0045192568,
-0.2349565178,
-0.330738008,
0.0151234539,
-0.0239327457,
-0.8197698593,
0.3728451133,
0.254106313,
0.29510656,
0.1726136059,
-0.0190225951,
0.0742856562,
0.0866032913,
-0.083791092,
-0.2725947201,
-0.0186919924,
0.2995275855,
-0.1974390745,
-0.0282072928,
0.3594812155,
-0.1319522262,
0.0735726207,
0.3317605853,
0.3265018463,
0.2180389911,
-0.118591629,
0.2567962408,
-0.225838989,
0.3444480598,
-0.2505608201,
-0.3402970135,
-0.2521974444,
-0.4512900114,
-0.0935977474,
0.2305347025,
-0.1816349775,
-0.0175115168,
0.0523242541,
-0.3951410949,
0.1461098343,
0.2768734992,
0.0239339545,
0.0391480215,
0.2585591674,
-0.0857635811,
0.1061439142,
0.0440756157,
-0.1575075686,
0.018533038,
-0.2476875037,
-0.0233252645,
0.3876005113,
-0.4578024745,
0.1309818476,
0.4648626149,
0.1431977302,
-0.1110443324,
-0.0129450476,
0.1193560287,
-0.0060808216,
0.1863620877,
0.0010306179,
0.0615783371,
0.4890258014,
-0.0103559969,
0.3551561534,
-0.0375437662,
-0.0719550699,
-0.3230220973,
-0.1323277652,
0.2659286857,
-0.1008694097,
0.5175332427,
0.1616135091,
0.200592041,
-0.1302776933,
0.1896832734,
-0.0005332733,
-0.1633594483,
-0.174870953,
0.1617181152,
0.3469945192,
0.086999625,
-0.0365330018,
-0.0770053491,
-0.1087395251,
-0.2207538784,
-0.0763377845,
-0.3961369693,
-0.243857339,
-0.307054013,
0.1495586038,
0.1974380165,
-0.0326647721,
0.1355966777,
0.0273352489,
-0.1005733609,
-0.3355160952,
0.0546232164,
-0.1876348108,
0.6559559107,
0.1588800848,
-0.2145820707,
0.2533616722,
0.3517918885,
0.1798379272,
-0.3027567565,
0.2813000977,
-0.4556754827,
-0.0874435157,
0.4142127633,
0.1292609721,
-0.0999098271,
-0.0748004764,
-0.1504980326,
0.1253664345,
0.7231863141,
-0.1573021412,
0.2668025792,
-0.2129022479,
-0.482109189,
-0.3187292814,
0.349481225,
0.4953727126,
-0.1281025559,
-0.1405407637,
0.1062853336,
0.3853786588,
0.3683372736,
0.2536807954,
-0.239435479,
0.111223802,
-0.2686234117,
0.1886624396,
0.2342702299,
-0.3849433064,
-0.6794062853,
-0.0250380728,
-0.0827808157,
0.1595272422,
0.0307167936,
-0.0343512557,
0.3004792631,
-0.1870462149,
0.1719586551,
-0.0572243705,
-0.0018517898,
0.3272252977,
-0.3206146657,
-0.1073742136,
0.092747584,
-0.1154710352,
-0.0071229604,
0.1117236838,
-0.0307567976,
-0.1718791872,
0.0220949594,
-0.0848009363,
0.0942299217,
0.2804445326,
0.1836044341,
0.074345544,
0.144878611,
0.0220391136,
-0.3660168648,
0.3349871635,
0.0531434901,
-0.3603880107,
0.0600704663,
-0.1577845514,
0.0208378062,
0.0101068113,
-0.0955997854,
-0.3363131583,
0.104188621,
0.3796645999,
0.4487679303,
-0.0369238108,
-0.0252824575,
0.1748473346,
0.4177247286,
-0.1355365813,
-0.1835996211,
-0.0341756754,
-0.0137684373,
-0.3760498166,
-0.2427928597,
0.0894413069,
0.2749848366,
-0.0927510932,
-0.2492631227,
0.2887128294,
0.0752178431,
0.2719337642,
-0.230387494,
0.0465383083,
-0.1450291425,
0.0545007624,
0.1124544963,
0.286950022,
0.0986519977,
-0.1674384475,
-0.0972825661,
0.1450362504,
0.1808004826,
0.2196064889,
-0.1466811895,
-0.2114745229,
-0.0159518253,
-0.0938480645,
0.0052857776,
-0.1132848188,
0.1361346692,
-0.3531875908,
0.2921642065,
0.1115515754,
0.0568292849,
0.5075977445,
0.6477869153,
0.2599563897,
0.0253587514,
-0.1637761742,
-0.1948090941,
-0.1878933161,
0.2220142931,
0.068164967,
0.3480644524,
0.152301982,
0.2674677074,
-0.1897208542,
0.1817849874,
-0.1461721808,
0.1767242849,
-0.0601245128,
-0.2066124231,
-0.078241162,
0.4010895193,
-0.085679397,
-0.1126347929,
0.2867836952,
0.0554504469,
0.0140277622,
-0.2849522531,
0.2493801564,
-0.2281689644,
-0.0199216101,
-0.0153337028,
-0.0118858134,
0.0360352769,
-0.2648230195,
-0.1972461492,
0.2164188176,
0.1073124707,
0.279612273,
-0.2293338627,
0.0865708515,
0.1439066827,
-0.3094995916,
-0.2070797384,
-0.1622288972,
-0.2965812087,
-0.0212497152,
-0.0704682171,
-0.4137973785,
0.3088330626,
-0.1025655493,
-0.0244362783,
-0.1753555685,
-0.0770958364,
-0.1091740504,
-0.0907447785,
-0.1531939059,
-0.1948920786,
-0.0244989339,
-0.3243736625,
0.1080338582,
0.4173311293,
-0.4949834943,
-0.107648477,
-0.0787564144,
0.1874900758,
-0.0431401171,
-0.2904830575,
-0.0876898095,
-0.0140734734,
-0.1836277395,
0.1808853447,
-0.0643401816,
0.0390369073,
0.1268296987,
-0.0566197224,
0.0236131065,
-0.1371996254,
-0.1245087162,
-0.5041561127,
-0.2903997004,
0.3763310313,
-0.0780996084,
-0.2742151618,
0.059222959,
0.1451712698,
0.0341393426,
0.1656789482,
-0.5678585768,
-0.1953781545,
-0.2156901956,
0.3442632854,
0.033339873,
0.180753842,
0.5501801372,
-0.0730525479,
-0.0768214688,
-0.2849735022,
-0.3120512068,
0.0548583716,
0.1322663873,
0.2266617268,
0.1739227474,
0.3240975738,
0.0204181224,
0.7732431293,
0.3936823905,
-0.085674189,
0.2908101976,
0.0597864874,
0.1808596551,
-0.3642300069,
-0.3403164148,
0.0350096039,
-0.1827742904,
-0.128504321,
0.2705570161,
0.3032855093,
-0.0222309045,
-0.1094396338,
0.2212006748,
-0.1986010969,
-0.3431125283,
-0.0303971246,
-0.2429029793,
0.2905064523,
0.1185869426,
0.2951219082,
-0.5850368142,
-0.2202436477,
-0.0060849069,
-0.2478070855,
0.4443365037,
0.0158358663,
-0.2791821361,
0.0755804852,
-0.6623136401,
0.2993408144,
0.0712708309,
0.1914257258,
-0.2336750627,
-0.1159098074,
0.0714241192,
-0.0268774889,
0.6149195433,
-0.0980298892,
0.215280816,
0.2069244385,
-0.0718017593,
-0.2621383667,
-0.1335535049,
0.1261742264,
0.4026215076,
0.2812722921,
0.2727686465,
-0.0917573646,
-0.0591253042,
-0.1914011538,
-0.0008057857,
0.0033788222,
-0.1724703014,
-0.1790287495,
-0.0084476881,
0.0257135686,
-0.022418933,
0.1463285536,
-0.1725967824,
-0.0203400087,
-0.0126258256,
0.0603808016,
-0.0783065781,
-0.108448945,
-0.0458773114,
0.542843163,
0.1747182161,
0.2683490813,
0.3154829144,
-0.039076712,
0.0233072918,
0.5417565107,
-0.2427833825,
-0.2225135863,
0.1127763167,
-0.0276026502,
-0.0853290111,
0.215156883,
-0.2347984016,
-0.0417109393,
0.1057306156,
0.0352252722,
-0.3095476031,
-0.2857126892,
0.1860626787,
0.3117538691,
-0.0406352654,
-0.4116737545,
0.302397728,
0.2473785877,
-0.1356349885,
0.2800070941,
-0.2344652563,
-0.3694334328,
0.1577771306,
-0.1495594382,
0.6636373401,
-0.0786998048,
0.1571421027,
-0.0520509109,
0.1835275143,
0.194664225,
0.1474545896,
0.2649953663,
-0.1044729054,
0.0119886091,
0.054190252,
-0.2487533242,
-0.1591396481,
0.0749852583,
-0.3146074712,
0.2809507847,
-0.1236772165,
0.5698902011,
-0.0066639064,
-0.4552019835,
0.290089488,
-0.2605769932,
-0.1575251967,
0.2971997559,
0.0973430946,
0.3726033866,
0.0273765419,
0.1337129921,
-0.3140105903,
-0.1954759806,
-0.0545736142,
0.0366234072,
-0.3555862606,
0.1764087677,
0.0829665437,
-0.143330887,
-0.2857703865,
0.317255199,
0.2478206009,
-0.1296859235,
-0.2597379088,
-0.0524205975,
0.3185187876,
0.4231221974,
-0.0771501288,
-0.2048160732,
0.0923811495,
0.1307822317,
-0.0734860748,
0.0694010407,
-0.0797297582,
-0.4370841086,
-0.2913405597,
0.3078610599,
0.0208339859,
-0.2143394351,
-0.0240413137,
0.0380598828,
0.1404801905,
-0.0343716331,
0.1763845682,
0.0926659331,
0.0463771671,
0.3522180021,
-0.3066444993,
-0.0329214409,
0.0963014066,
0.6910689473,
0.1768391728,
-0.1092542335,
0.3844688237,
0.0621928908,
-0.2908227146,
-0.1518292874,
-0.168227613,
-0.237453267,
-0.2049522251,
0.1135924906,
-0.3047882617,
0.0570381731,
0.129543215,
0.0878920555,
-0.0071593421,
0.0445575304,
-0.0939456746,
-0.1312910765,
-0.3829701841,
-0.1060886756,
0.0017552897,
0.0525344536,
0.1982151419,
-0.050252948,
-0.0928942636,
0.1762563437,
-0.3340483904,
0.0618871637,
0.0773277134,
0.157449469,
0.1283507943,
-0.1339038461,
0.2853278816,
-0.1930518001,
0.0594117045,
0.0728169605,
-0.4139122069,
-0.2782282829,
0.1670400053,
0.0941637084,
0.032999225,
-0.1214172915,
-0.2470844835,
-0.2226423174,
0.0129629662,
-0.5172250867,
0.0562338978,
0.3003097475,
-0.1033163294,
-0.0619975142,
0.1269363165,
0.0589885004,
0.309879005,
0.1901085377,
-0.117551446,
-0.0086970981,
-0.2208376378,
0.2573597133,
0.0479167812,
0.1370417029,
-0.0562722161,
0.0399614722,
0.1067030653,
0.1473335922,
0.3538512886,
-0.3495474756,
-0.0959055126,
0.1794881821,
0.1977200061,
-0.0654620528,
-0.1790164262,
-0.0933834538,
-0.104869768,
0.1833397895,
-0.0919106156,
-0.1030883193,
0.5036973357,
0.3170228004,
0.1233304366,
0.1406893879,
0.1180771813,
-0.2553684711,
0.1805232614,
0.2257970124,
0.5175110698,
-0.2156962156,
0.2968264818,
0.0140350554,
0.0883397684,
0.2030393183,
0.3545149863,
0.1806841046,
-0.0887579098,
0.305305928,
0.138816312,
0.2244513333,
0.2918460071,
0.0828304589,
-0.229790926,
-0.3308692276,
0.0828508213,
0.0315339342,
-0.2458782196,
0.3778290749,
-0.1030260548,
0.1648580581,
-0.2387320697,
-0.2116421759,
-0.2096368521,
0.1876000762,
-0.3254328072,
-0.1851068437,
0.2513276041,
0.0140236849,
0.2821990252,
-0.0885625035,
0.0273095798,
0.1022791937,
0.4871227145,
-0.0871346742,
0.1598788351,
-0.0388509408,
-0.4198500216,
-0.059173651,
0.5264778733,
-0.2331321836,
0.3561902642,
-0.1694326103,
-0.0523770489,
-0.1272805929,
0.2946248353,
0.3648687899,
0.2336493731,
-0.0502333716,
0.2412075251,
0.187932238,
-0.0643315911,
-0.2987422049,
0.4023102224,
-0.1540632546,
-0.4223704636,
0.1338625699,
0.1175442263,
-0.104582049,
0.2091161013,
-0.0698803514,
0.3018085063,
-0.1135064363,
0.1194502711,
-0.3948715925,
-0.1819139421,
0.0504537076,
0.085681349,
-0.0915615335,
-0.0797384381,
0.2938599885,
-0.1051160023,
0.2879909575,
-0.1760941744,
0.1067947745,
-0.1220279038,
0.2977885902,
0.1854483187,
0.0438229889,
-0.1389903426,
-0.0323160067,
-0.3474258482,
0.161976099,
-0.3173360527,
0.1556629539,
-0.2174624652,
0.1678790152,
-0.1132479608,
-0.002430761,
0.2810384929,
-0.4437095821,
0.1354281455,
0.2527985275,
-0.2207791358,
-0.230024904,
-0.2162611037,
0.0634273887,
0.2270527929,
-0.4350834787,
0.3417460322,
-0.2804059088,
0.1463567168,
-0.1610892862,
0.0493281446,
0.0592852049,
0.2093147784,
0.4556952417,
0.3434939086,
0.1172763556,
0.2226644456,
0.0480289608,
-0.301628679,
-0.1258734465,
0.042610839,
0.0033725286,
-0.188661471,
0.1646269262,
-0.5020896792,
-0.3603518605,
-0.2256873101,
0.011632584,
0.2128080875,
-0.1014987752,
0.07022807,
-0.1475330889,
-0.1326117814,
-0.1100244001,
0.0685977638,
0.2812514901,
-0.2610150576,
0.3380210698,
-0.2217292041,
-0.2134328187,
0.448846668,
-0.4780474305,
-0.3460968435,
-0.186857298,
0.3811695874,
-0.1383680552,
-0.1656837463,
-0.3600320518,
-0.0466111489,
0.3932839036,
0.0571715795,
-0.197720319,
0.2492491752,
-0.2645008564,
0.2071589231,
-0.0334161259,
0.2238561809,
0.0952141508,
0.098048538,
0.2155417651,
-0.1745537966
] |
https://github.com/huggingface/datasets/issues/2322 | Calls to map are not cached. | Hi,
set `keep_in_memory` to False when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them):
https://github.com/huggingface/datasets/blob/241a0b4a3a868778ee91e767ad406f9da7610df2/src/datasets/arrow_dataset.py#L1718
@albertvillanova It seems like this behavior was overlooked in #2182.
| ## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
| 46 | Calls to map are not cached.
## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
Hi,
set `keep_in_memory` to False when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them):
https://github.com/huggingface/datasets/blob/241a0b4a3a868778ee91e767ad406f9da7610df2/src/datasets/arrow_dataset.py#L1718
@albertvillanova It seems like this behavior was overlooked in #2182.
| [
-0.1652985811,
-0.3959718943,
-0.0088476408,
0.1456609815,
0.2062432468,
-0.1019177735,
0.300268203,
0.1251289845,
0.3953082561,
0.0206205156,
-0.0369779579,
0.2428550422,
0.1699712873,
-0.2849352956,
0.188086763,
0.2596048415,
0.2713772058,
-0.0385336578,
-0.2219657153,
-0.1745343506,
-0.1918821931,
0.1723638475,
-0.3064853549,
-0.2573415935,
-0.2379023135,
0.1117418632,
-0.2603808641,
-0.1230314821,
0.4237757027,
-0.3212156296,
0.3784760237,
-0.0580660664,
0.0148670431,
0.6959591508,
-0.0001131878,
-0.1605280191,
0.1358755082,
-0.1383192837,
-0.0015482461,
0.2133312225,
-0.3389547467,
-0.310015589,
-0.0045192568,
-0.2349565178,
-0.330738008,
0.0151234539,
-0.0239327457,
-0.8197698593,
0.3728451133,
0.254106313,
0.29510656,
0.1726136059,
-0.0190225951,
0.0742856562,
0.0866032913,
-0.083791092,
-0.2725947201,
-0.0186919924,
0.2995275855,
-0.1974390745,
-0.0282072928,
0.3594812155,
-0.1319522262,
0.0735726207,
0.3317605853,
0.3265018463,
0.2180389911,
-0.118591629,
0.2567962408,
-0.225838989,
0.3444480598,
-0.2505608201,
-0.3402970135,
-0.2521974444,
-0.4512900114,
-0.0935977474,
0.2305347025,
-0.1816349775,
-0.0175115168,
0.0523242541,
-0.3951410949,
0.1461098343,
0.2768734992,
0.0239339545,
0.0391480215,
0.2585591674,
-0.0857635811,
0.1061439142,
0.0440756157,
-0.1575075686,
0.018533038,
-0.2476875037,
-0.0233252645,
0.3876005113,
-0.4578024745,
0.1309818476,
0.4648626149,
0.1431977302,
-0.1110443324,
-0.0129450476,
0.1193560287,
-0.0060808216,
0.1863620877,
0.0010306179,
0.0615783371,
0.4890258014,
-0.0103559969,
0.3551561534,
-0.0375437662,
-0.0719550699,
-0.3230220973,
-0.1323277652,
0.2659286857,
-0.1008694097,
0.5175332427,
0.1616135091,
0.200592041,
-0.1302776933,
0.1896832734,
-0.0005332733,
-0.1633594483,
-0.174870953,
0.1617181152,
0.3469945192,
0.086999625,
-0.0365330018,
-0.0770053491,
-0.1087395251,
-0.2207538784,
-0.0763377845,
-0.3961369693,
-0.243857339,
-0.307054013,
0.1495586038,
0.1974380165,
-0.0326647721,
0.1355966777,
0.0273352489,
-0.1005733609,
-0.3355160952,
0.0546232164,
-0.1876348108,
0.6559559107,
0.1588800848,
-0.2145820707,
0.2533616722,
0.3517918885,
0.1798379272,
-0.3027567565,
0.2813000977,
-0.4556754827,
-0.0874435157,
0.4142127633,
0.1292609721,
-0.0999098271,
-0.0748004764,
-0.1504980326,
0.1253664345,
0.7231863141,
-0.1573021412,
0.2668025792,
-0.2129022479,
-0.482109189,
-0.3187292814,
0.349481225,
0.4953727126,
-0.1281025559,
-0.1405407637,
0.1062853336,
0.3853786588,
0.3683372736,
0.2536807954,
-0.239435479,
0.111223802,
-0.2686234117,
0.1886624396,
0.2342702299,
-0.3849433064,
-0.6794062853,
-0.0250380728,
-0.0827808157,
0.1595272422,
0.0307167936,
-0.0343512557,
0.3004792631,
-0.1870462149,
0.1719586551,
-0.0572243705,
-0.0018517898,
0.3272252977,
-0.3206146657,
-0.1073742136,
0.092747584,
-0.1154710352,
-0.0071229604,
0.1117236838,
-0.0307567976,
-0.1718791872,
0.0220949594,
-0.0848009363,
0.0942299217,
0.2804445326,
0.1836044341,
0.074345544,
0.144878611,
0.0220391136,
-0.3660168648,
0.3349871635,
0.0531434901,
-0.3603880107,
0.0600704663,
-0.1577845514,
0.0208378062,
0.0101068113,
-0.0955997854,
-0.3363131583,
0.104188621,
0.3796645999,
0.4487679303,
-0.0369238108,
-0.0252824575,
0.1748473346,
0.4177247286,
-0.1355365813,
-0.1835996211,
-0.0341756754,
-0.0137684373,
-0.3760498166,
-0.2427928597,
0.0894413069,
0.2749848366,
-0.0927510932,
-0.2492631227,
0.2887128294,
0.0752178431,
0.2719337642,
-0.230387494,
0.0465383083,
-0.1450291425,
0.0545007624,
0.1124544963,
0.286950022,
0.0986519977,
-0.1674384475,
-0.0972825661,
0.1450362504,
0.1808004826,
0.2196064889,
-0.1466811895,
-0.2114745229,
-0.0159518253,
-0.0938480645,
0.0052857776,
-0.1132848188,
0.1361346692,
-0.3531875908,
0.2921642065,
0.1115515754,
0.0568292849,
0.5075977445,
0.6477869153,
0.2599563897,
0.0253587514,
-0.1637761742,
-0.1948090941,
-0.1878933161,
0.2220142931,
0.068164967,
0.3480644524,
0.152301982,
0.2674677074,
-0.1897208542,
0.1817849874,
-0.1461721808,
0.1767242849,
-0.0601245128,
-0.2066124231,
-0.078241162,
0.4010895193,
-0.085679397,
-0.1126347929,
0.2867836952,
0.0554504469,
0.0140277622,
-0.2849522531,
0.2493801564,
-0.2281689644,
-0.0199216101,
-0.0153337028,
-0.0118858134,
0.0360352769,
-0.2648230195,
-0.1972461492,
0.2164188176,
0.1073124707,
0.279612273,
-0.2293338627,
0.0865708515,
0.1439066827,
-0.3094995916,
-0.2070797384,
-0.1622288972,
-0.2965812087,
-0.0212497152,
-0.0704682171,
-0.4137973785,
0.3088330626,
-0.1025655493,
-0.0244362783,
-0.1753555685,
-0.0770958364,
-0.1091740504,
-0.0907447785,
-0.1531939059,
-0.1948920786,
-0.0244989339,
-0.3243736625,
0.1080338582,
0.4173311293,
-0.4949834943,
-0.107648477,
-0.0787564144,
0.1874900758,
-0.0431401171,
-0.2904830575,
-0.0876898095,
-0.0140734734,
-0.1836277395,
0.1808853447,
-0.0643401816,
0.0390369073,
0.1268296987,
-0.0566197224,
0.0236131065,
-0.1371996254,
-0.1245087162,
-0.5041561127,
-0.2903997004,
0.3763310313,
-0.0780996084,
-0.2742151618,
0.059222959,
0.1451712698,
0.0341393426,
0.1656789482,
-0.5678585768,
-0.1953781545,
-0.2156901956,
0.3442632854,
0.033339873,
0.180753842,
0.5501801372,
-0.0730525479,
-0.0768214688,
-0.2849735022,
-0.3120512068,
0.0548583716,
0.1322663873,
0.2266617268,
0.1739227474,
0.3240975738,
0.0204181224,
0.7732431293,
0.3936823905,
-0.085674189,
0.2908101976,
0.0597864874,
0.1808596551,
-0.3642300069,
-0.3403164148,
0.0350096039,
-0.1827742904,
-0.128504321,
0.2705570161,
0.3032855093,
-0.0222309045,
-0.1094396338,
0.2212006748,
-0.1986010969,
-0.3431125283,
-0.0303971246,
-0.2429029793,
0.2905064523,
0.1185869426,
0.2951219082,
-0.5850368142,
-0.2202436477,
-0.0060849069,
-0.2478070855,
0.4443365037,
0.0158358663,
-0.2791821361,
0.0755804852,
-0.6623136401,
0.2993408144,
0.0712708309,
0.1914257258,
-0.2336750627,
-0.1159098074,
0.0714241192,
-0.0268774889,
0.6149195433,
-0.0980298892,
0.215280816,
0.2069244385,
-0.0718017593,
-0.2621383667,
-0.1335535049,
0.1261742264,
0.4026215076,
0.2812722921,
0.2727686465,
-0.0917573646,
-0.0591253042,
-0.1914011538,
-0.0008057857,
0.0033788222,
-0.1724703014,
-0.1790287495,
-0.0084476881,
0.0257135686,
-0.022418933,
0.1463285536,
-0.1725967824,
-0.0203400087,
-0.0126258256,
0.0603808016,
-0.0783065781,
-0.108448945,
-0.0458773114,
0.542843163,
0.1747182161,
0.2683490813,
0.3154829144,
-0.039076712,
0.0233072918,
0.5417565107,
-0.2427833825,
-0.2225135863,
0.1127763167,
-0.0276026502,
-0.0853290111,
0.215156883,
-0.2347984016,
-0.0417109393,
0.1057306156,
0.0352252722,
-0.3095476031,
-0.2857126892,
0.1860626787,
0.3117538691,
-0.0406352654,
-0.4116737545,
0.302397728,
0.2473785877,
-0.1356349885,
0.2800070941,
-0.2344652563,
-0.3694334328,
0.1577771306,
-0.1495594382,
0.6636373401,
-0.0786998048,
0.1571421027,
-0.0520509109,
0.1835275143,
0.194664225,
0.1474545896,
0.2649953663,
-0.1044729054,
0.0119886091,
0.054190252,
-0.2487533242,
-0.1591396481,
0.0749852583,
-0.3146074712,
0.2809507847,
-0.1236772165,
0.5698902011,
-0.0066639064,
-0.4552019835,
0.290089488,
-0.2605769932,
-0.1575251967,
0.2971997559,
0.0973430946,
0.3726033866,
0.0273765419,
0.1337129921,
-0.3140105903,
-0.1954759806,
-0.0545736142,
0.0366234072,
-0.3555862606,
0.1764087677,
0.0829665437,
-0.143330887,
-0.2857703865,
0.317255199,
0.2478206009,
-0.1296859235,
-0.2597379088,
-0.0524205975,
0.3185187876,
0.4231221974,
-0.0771501288,
-0.2048160732,
0.0923811495,
0.1307822317,
-0.0734860748,
0.0694010407,
-0.0797297582,
-0.4370841086,
-0.2913405597,
0.3078610599,
0.0208339859,
-0.2143394351,
-0.0240413137,
0.0380598828,
0.1404801905,
-0.0343716331,
0.1763845682,
0.0926659331,
0.0463771671,
0.3522180021,
-0.3066444993,
-0.0329214409,
0.0963014066,
0.6910689473,
0.1768391728,
-0.1092542335,
0.3844688237,
0.0621928908,
-0.2908227146,
-0.1518292874,
-0.168227613,
-0.237453267,
-0.2049522251,
0.1135924906,
-0.3047882617,
0.0570381731,
0.129543215,
0.0878920555,
-0.0071593421,
0.0445575304,
-0.0939456746,
-0.1312910765,
-0.3829701841,
-0.1060886756,
0.0017552897,
0.0525344536,
0.1982151419,
-0.050252948,
-0.0928942636,
0.1762563437,
-0.3340483904,
0.0618871637,
0.0773277134,
0.157449469,
0.1283507943,
-0.1339038461,
0.2853278816,
-0.1930518001,
0.0594117045,
0.0728169605,
-0.4139122069,
-0.2782282829,
0.1670400053,
0.0941637084,
0.032999225,
-0.1214172915,
-0.2470844835,
-0.2226423174,
0.0129629662,
-0.5172250867,
0.0562338978,
0.3003097475,
-0.1033163294,
-0.0619975142,
0.1269363165,
0.0589885004,
0.309879005,
0.1901085377,
-0.117551446,
-0.0086970981,
-0.2208376378,
0.2573597133,
0.0479167812,
0.1370417029,
-0.0562722161,
0.0399614722,
0.1067030653,
0.1473335922,
0.3538512886,
-0.3495474756,
-0.0959055126,
0.1794881821,
0.1977200061,
-0.0654620528,
-0.1790164262,
-0.0933834538,
-0.104869768,
0.1833397895,
-0.0919106156,
-0.1030883193,
0.5036973357,
0.3170228004,
0.1233304366,
0.1406893879,
0.1180771813,
-0.2553684711,
0.1805232614,
0.2257970124,
0.5175110698,
-0.2156962156,
0.2968264818,
0.0140350554,
0.0883397684,
0.2030393183,
0.3545149863,
0.1806841046,
-0.0887579098,
0.305305928,
0.138816312,
0.2244513333,
0.2918460071,
0.0828304589,
-0.229790926,
-0.3308692276,
0.0828508213,
0.0315339342,
-0.2458782196,
0.3778290749,
-0.1030260548,
0.1648580581,
-0.2387320697,
-0.2116421759,
-0.2096368521,
0.1876000762,
-0.3254328072,
-0.1851068437,
0.2513276041,
0.0140236849,
0.2821990252,
-0.0885625035,
0.0273095798,
0.1022791937,
0.4871227145,
-0.0871346742,
0.1598788351,
-0.0388509408,
-0.4198500216,
-0.059173651,
0.5264778733,
-0.2331321836,
0.3561902642,
-0.1694326103,
-0.0523770489,
-0.1272805929,
0.2946248353,
0.3648687899,
0.2336493731,
-0.0502333716,
0.2412075251,
0.187932238,
-0.0643315911,
-0.2987422049,
0.4023102224,
-0.1540632546,
-0.4223704636,
0.1338625699,
0.1175442263,
-0.104582049,
0.2091161013,
-0.0698803514,
0.3018085063,
-0.1135064363,
0.1194502711,
-0.3948715925,
-0.1819139421,
0.0504537076,
0.085681349,
-0.0915615335,
-0.0797384381,
0.2938599885,
-0.1051160023,
0.2879909575,
-0.1760941744,
0.1067947745,
-0.1220279038,
0.2977885902,
0.1854483187,
0.0438229889,
-0.1389903426,
-0.0323160067,
-0.3474258482,
0.161976099,
-0.3173360527,
0.1556629539,
-0.2174624652,
0.1678790152,
-0.1132479608,
-0.002430761,
0.2810384929,
-0.4437095821,
0.1354281455,
0.2527985275,
-0.2207791358,
-0.230024904,
-0.2162611037,
0.0634273887,
0.2270527929,
-0.4350834787,
0.3417460322,
-0.2804059088,
0.1463567168,
-0.1610892862,
0.0493281446,
0.0592852049,
0.2093147784,
0.4556952417,
0.3434939086,
0.1172763556,
0.2226644456,
0.0480289608,
-0.301628679,
-0.1258734465,
0.042610839,
0.0033725286,
-0.188661471,
0.1646269262,
-0.5020896792,
-0.3603518605,
-0.2256873101,
0.011632584,
0.2128080875,
-0.1014987752,
0.07022807,
-0.1475330889,
-0.1326117814,
-0.1100244001,
0.0685977638,
0.2812514901,
-0.2610150576,
0.3380210698,
-0.2217292041,
-0.2134328187,
0.448846668,
-0.4780474305,
-0.3460968435,
-0.186857298,
0.3811695874,
-0.1383680552,
-0.1656837463,
-0.3600320518,
-0.0466111489,
0.3932839036,
0.0571715795,
-0.197720319,
0.2492491752,
-0.2645008564,
0.2071589231,
-0.0334161259,
0.2238561809,
0.0952141508,
0.098048538,
0.2155417651,
-0.1745537966
] |
https://github.com/huggingface/datasets/issues/2322 | Calls to map are not cached. | Hi @villmow, thanks for reporting.
As @mariosasko has pointed out, we did not consider this case when introducing the feature of automatic in-memory for small datasets. This needs to be fixed. | ## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
| 31 | Calls to map are not cached.
## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
Hi @villmow, thanks for reporting.
As @mariosasko has pointed out, we did not consider this case when introducing the feature of automatic in-memory for small datasets. This needs to be fixed. | [
-0.1652985811,
-0.3959718943,
-0.0088476408,
0.1456609815,
0.2062432468,
-0.1019177735,
0.300268203,
0.1251289845,
0.3953082561,
0.0206205156,
-0.0369779579,
0.2428550422,
0.1699712873,
-0.2849352956,
0.188086763,
0.2596048415,
0.2713772058,
-0.0385336578,
-0.2219657153,
-0.1745343506,
-0.1918821931,
0.1723638475,
-0.3064853549,
-0.2573415935,
-0.2379023135,
0.1117418632,
-0.2603808641,
-0.1230314821,
0.4237757027,
-0.3212156296,
0.3784760237,
-0.0580660664,
0.0148670431,
0.6959591508,
-0.0001131878,
-0.1605280191,
0.1358755082,
-0.1383192837,
-0.0015482461,
0.2133312225,
-0.3389547467,
-0.310015589,
-0.0045192568,
-0.2349565178,
-0.330738008,
0.0151234539,
-0.0239327457,
-0.8197698593,
0.3728451133,
0.254106313,
0.29510656,
0.1726136059,
-0.0190225951,
0.0742856562,
0.0866032913,
-0.083791092,
-0.2725947201,
-0.0186919924,
0.2995275855,
-0.1974390745,
-0.0282072928,
0.3594812155,
-0.1319522262,
0.0735726207,
0.3317605853,
0.3265018463,
0.2180389911,
-0.118591629,
0.2567962408,
-0.225838989,
0.3444480598,
-0.2505608201,
-0.3402970135,
-0.2521974444,
-0.4512900114,
-0.0935977474,
0.2305347025,
-0.1816349775,
-0.0175115168,
0.0523242541,
-0.3951410949,
0.1461098343,
0.2768734992,
0.0239339545,
0.0391480215,
0.2585591674,
-0.0857635811,
0.1061439142,
0.0440756157,
-0.1575075686,
0.018533038,
-0.2476875037,
-0.0233252645,
0.3876005113,
-0.4578024745,
0.1309818476,
0.4648626149,
0.1431977302,
-0.1110443324,
-0.0129450476,
0.1193560287,
-0.0060808216,
0.1863620877,
0.0010306179,
0.0615783371,
0.4890258014,
-0.0103559969,
0.3551561534,
-0.0375437662,
-0.0719550699,
-0.3230220973,
-0.1323277652,
0.2659286857,
-0.1008694097,
0.5175332427,
0.1616135091,
0.200592041,
-0.1302776933,
0.1896832734,
-0.0005332733,
-0.1633594483,
-0.174870953,
0.1617181152,
0.3469945192,
0.086999625,
-0.0365330018,
-0.0770053491,
-0.1087395251,
-0.2207538784,
-0.0763377845,
-0.3961369693,
-0.243857339,
-0.307054013,
0.1495586038,
0.1974380165,
-0.0326647721,
0.1355966777,
0.0273352489,
-0.1005733609,
-0.3355160952,
0.0546232164,
-0.1876348108,
0.6559559107,
0.1588800848,
-0.2145820707,
0.2533616722,
0.3517918885,
0.1798379272,
-0.3027567565,
0.2813000977,
-0.4556754827,
-0.0874435157,
0.4142127633,
0.1292609721,
-0.0999098271,
-0.0748004764,
-0.1504980326,
0.1253664345,
0.7231863141,
-0.1573021412,
0.2668025792,
-0.2129022479,
-0.482109189,
-0.3187292814,
0.349481225,
0.4953727126,
-0.1281025559,
-0.1405407637,
0.1062853336,
0.3853786588,
0.3683372736,
0.2536807954,
-0.239435479,
0.111223802,
-0.2686234117,
0.1886624396,
0.2342702299,
-0.3849433064,
-0.6794062853,
-0.0250380728,
-0.0827808157,
0.1595272422,
0.0307167936,
-0.0343512557,
0.3004792631,
-0.1870462149,
0.1719586551,
-0.0572243705,
-0.0018517898,
0.3272252977,
-0.3206146657,
-0.1073742136,
0.092747584,
-0.1154710352,
-0.0071229604,
0.1117236838,
-0.0307567976,
-0.1718791872,
0.0220949594,
-0.0848009363,
0.0942299217,
0.2804445326,
0.1836044341,
0.074345544,
0.144878611,
0.0220391136,
-0.3660168648,
0.3349871635,
0.0531434901,
-0.3603880107,
0.0600704663,
-0.1577845514,
0.0208378062,
0.0101068113,
-0.0955997854,
-0.3363131583,
0.104188621,
0.3796645999,
0.4487679303,
-0.0369238108,
-0.0252824575,
0.1748473346,
0.4177247286,
-0.1355365813,
-0.1835996211,
-0.0341756754,
-0.0137684373,
-0.3760498166,
-0.2427928597,
0.0894413069,
0.2749848366,
-0.0927510932,
-0.2492631227,
0.2887128294,
0.0752178431,
0.2719337642,
-0.230387494,
0.0465383083,
-0.1450291425,
0.0545007624,
0.1124544963,
0.286950022,
0.0986519977,
-0.1674384475,
-0.0972825661,
0.1450362504,
0.1808004826,
0.2196064889,
-0.1466811895,
-0.2114745229,
-0.0159518253,
-0.0938480645,
0.0052857776,
-0.1132848188,
0.1361346692,
-0.3531875908,
0.2921642065,
0.1115515754,
0.0568292849,
0.5075977445,
0.6477869153,
0.2599563897,
0.0253587514,
-0.1637761742,
-0.1948090941,
-0.1878933161,
0.2220142931,
0.068164967,
0.3480644524,
0.152301982,
0.2674677074,
-0.1897208542,
0.1817849874,
-0.1461721808,
0.1767242849,
-0.0601245128,
-0.2066124231,
-0.078241162,
0.4010895193,
-0.085679397,
-0.1126347929,
0.2867836952,
0.0554504469,
0.0140277622,
-0.2849522531,
0.2493801564,
-0.2281689644,
-0.0199216101,
-0.0153337028,
-0.0118858134,
0.0360352769,
-0.2648230195,
-0.1972461492,
0.2164188176,
0.1073124707,
0.279612273,
-0.2293338627,
0.0865708515,
0.1439066827,
-0.3094995916,
-0.2070797384,
-0.1622288972,
-0.2965812087,
-0.0212497152,
-0.0704682171,
-0.4137973785,
0.3088330626,
-0.1025655493,
-0.0244362783,
-0.1753555685,
-0.0770958364,
-0.1091740504,
-0.0907447785,
-0.1531939059,
-0.1948920786,
-0.0244989339,
-0.3243736625,
0.1080338582,
0.4173311293,
-0.4949834943,
-0.107648477,
-0.0787564144,
0.1874900758,
-0.0431401171,
-0.2904830575,
-0.0876898095,
-0.0140734734,
-0.1836277395,
0.1808853447,
-0.0643401816,
0.0390369073,
0.1268296987,
-0.0566197224,
0.0236131065,
-0.1371996254,
-0.1245087162,
-0.5041561127,
-0.2903997004,
0.3763310313,
-0.0780996084,
-0.2742151618,
0.059222959,
0.1451712698,
0.0341393426,
0.1656789482,
-0.5678585768,
-0.1953781545,
-0.2156901956,
0.3442632854,
0.033339873,
0.180753842,
0.5501801372,
-0.0730525479,
-0.0768214688,
-0.2849735022,
-0.3120512068,
0.0548583716,
0.1322663873,
0.2266617268,
0.1739227474,
0.3240975738,
0.0204181224,
0.7732431293,
0.3936823905,
-0.085674189,
0.2908101976,
0.0597864874,
0.1808596551,
-0.3642300069,
-0.3403164148,
0.0350096039,
-0.1827742904,
-0.128504321,
0.2705570161,
0.3032855093,
-0.0222309045,
-0.1094396338,
0.2212006748,
-0.1986010969,
-0.3431125283,
-0.0303971246,
-0.2429029793,
0.2905064523,
0.1185869426,
0.2951219082,
-0.5850368142,
-0.2202436477,
-0.0060849069,
-0.2478070855,
0.4443365037,
0.0158358663,
-0.2791821361,
0.0755804852,
-0.6623136401,
0.2993408144,
0.0712708309,
0.1914257258,
-0.2336750627,
-0.1159098074,
0.0714241192,
-0.0268774889,
0.6149195433,
-0.0980298892,
0.215280816,
0.2069244385,
-0.0718017593,
-0.2621383667,
-0.1335535049,
0.1261742264,
0.4026215076,
0.2812722921,
0.2727686465,
-0.0917573646,
-0.0591253042,
-0.1914011538,
-0.0008057857,
0.0033788222,
-0.1724703014,
-0.1790287495,
-0.0084476881,
0.0257135686,
-0.022418933,
0.1463285536,
-0.1725967824,
-0.0203400087,
-0.0126258256,
0.0603808016,
-0.0783065781,
-0.108448945,
-0.0458773114,
0.542843163,
0.1747182161,
0.2683490813,
0.3154829144,
-0.039076712,
0.0233072918,
0.5417565107,
-0.2427833825,
-0.2225135863,
0.1127763167,
-0.0276026502,
-0.0853290111,
0.215156883,
-0.2347984016,
-0.0417109393,
0.1057306156,
0.0352252722,
-0.3095476031,
-0.2857126892,
0.1860626787,
0.3117538691,
-0.0406352654,
-0.4116737545,
0.302397728,
0.2473785877,
-0.1356349885,
0.2800070941,
-0.2344652563,
-0.3694334328,
0.1577771306,
-0.1495594382,
0.6636373401,
-0.0786998048,
0.1571421027,
-0.0520509109,
0.1835275143,
0.194664225,
0.1474545896,
0.2649953663,
-0.1044729054,
0.0119886091,
0.054190252,
-0.2487533242,
-0.1591396481,
0.0749852583,
-0.3146074712,
0.2809507847,
-0.1236772165,
0.5698902011,
-0.0066639064,
-0.4552019835,
0.290089488,
-0.2605769932,
-0.1575251967,
0.2971997559,
0.0973430946,
0.3726033866,
0.0273765419,
0.1337129921,
-0.3140105903,
-0.1954759806,
-0.0545736142,
0.0366234072,
-0.3555862606,
0.1764087677,
0.0829665437,
-0.143330887,
-0.2857703865,
0.317255199,
0.2478206009,
-0.1296859235,
-0.2597379088,
-0.0524205975,
0.3185187876,
0.4231221974,
-0.0771501288,
-0.2048160732,
0.0923811495,
0.1307822317,
-0.0734860748,
0.0694010407,
-0.0797297582,
-0.4370841086,
-0.2913405597,
0.3078610599,
0.0208339859,
-0.2143394351,
-0.0240413137,
0.0380598828,
0.1404801905,
-0.0343716331,
0.1763845682,
0.0926659331,
0.0463771671,
0.3522180021,
-0.3066444993,
-0.0329214409,
0.0963014066,
0.6910689473,
0.1768391728,
-0.1092542335,
0.3844688237,
0.0621928908,
-0.2908227146,
-0.1518292874,
-0.168227613,
-0.237453267,
-0.2049522251,
0.1135924906,
-0.3047882617,
0.0570381731,
0.129543215,
0.0878920555,
-0.0071593421,
0.0445575304,
-0.0939456746,
-0.1312910765,
-0.3829701841,
-0.1060886756,
0.0017552897,
0.0525344536,
0.1982151419,
-0.050252948,
-0.0928942636,
0.1762563437,
-0.3340483904,
0.0618871637,
0.0773277134,
0.157449469,
0.1283507943,
-0.1339038461,
0.2853278816,
-0.1930518001,
0.0594117045,
0.0728169605,
-0.4139122069,
-0.2782282829,
0.1670400053,
0.0941637084,
0.032999225,
-0.1214172915,
-0.2470844835,
-0.2226423174,
0.0129629662,
-0.5172250867,
0.0562338978,
0.3003097475,
-0.1033163294,
-0.0619975142,
0.1269363165,
0.0589885004,
0.309879005,
0.1901085377,
-0.117551446,
-0.0086970981,
-0.2208376378,
0.2573597133,
0.0479167812,
0.1370417029,
-0.0562722161,
0.0399614722,
0.1067030653,
0.1473335922,
0.3538512886,
-0.3495474756,
-0.0959055126,
0.1794881821,
0.1977200061,
-0.0654620528,
-0.1790164262,
-0.0933834538,
-0.104869768,
0.1833397895,
-0.0919106156,
-0.1030883193,
0.5036973357,
0.3170228004,
0.1233304366,
0.1406893879,
0.1180771813,
-0.2553684711,
0.1805232614,
0.2257970124,
0.5175110698,
-0.2156962156,
0.2968264818,
0.0140350554,
0.0883397684,
0.2030393183,
0.3545149863,
0.1806841046,
-0.0887579098,
0.305305928,
0.138816312,
0.2244513333,
0.2918460071,
0.0828304589,
-0.229790926,
-0.3308692276,
0.0828508213,
0.0315339342,
-0.2458782196,
0.3778290749,
-0.1030260548,
0.1648580581,
-0.2387320697,
-0.2116421759,
-0.2096368521,
0.1876000762,
-0.3254328072,
-0.1851068437,
0.2513276041,
0.0140236849,
0.2821990252,
-0.0885625035,
0.0273095798,
0.1022791937,
0.4871227145,
-0.0871346742,
0.1598788351,
-0.0388509408,
-0.4198500216,
-0.059173651,
0.5264778733,
-0.2331321836,
0.3561902642,
-0.1694326103,
-0.0523770489,
-0.1272805929,
0.2946248353,
0.3648687899,
0.2336493731,
-0.0502333716,
0.2412075251,
0.187932238,
-0.0643315911,
-0.2987422049,
0.4023102224,
-0.1540632546,
-0.4223704636,
0.1338625699,
0.1175442263,
-0.104582049,
0.2091161013,
-0.0698803514,
0.3018085063,
-0.1135064363,
0.1194502711,
-0.3948715925,
-0.1819139421,
0.0504537076,
0.085681349,
-0.0915615335,
-0.0797384381,
0.2938599885,
-0.1051160023,
0.2879909575,
-0.1760941744,
0.1067947745,
-0.1220279038,
0.2977885902,
0.1854483187,
0.0438229889,
-0.1389903426,
-0.0323160067,
-0.3474258482,
0.161976099,
-0.3173360527,
0.1556629539,
-0.2174624652,
0.1678790152,
-0.1132479608,
-0.002430761,
0.2810384929,
-0.4437095821,
0.1354281455,
0.2527985275,
-0.2207791358,
-0.230024904,
-0.2162611037,
0.0634273887,
0.2270527929,
-0.4350834787,
0.3417460322,
-0.2804059088,
0.1463567168,
-0.1610892862,
0.0493281446,
0.0592852049,
0.2093147784,
0.4556952417,
0.3434939086,
0.1172763556,
0.2226644456,
0.0480289608,
-0.301628679,
-0.1258734465,
0.042610839,
0.0033725286,
-0.188661471,
0.1646269262,
-0.5020896792,
-0.3603518605,
-0.2256873101,
0.011632584,
0.2128080875,
-0.1014987752,
0.07022807,
-0.1475330889,
-0.1326117814,
-0.1100244001,
0.0685977638,
0.2812514901,
-0.2610150576,
0.3380210698,
-0.2217292041,
-0.2134328187,
0.448846668,
-0.4780474305,
-0.3460968435,
-0.186857298,
0.3811695874,
-0.1383680552,
-0.1656837463,
-0.3600320518,
-0.0466111489,
0.3932839036,
0.0571715795,
-0.197720319,
0.2492491752,
-0.2645008564,
0.2071589231,
-0.0334161259,
0.2238561809,
0.0952141508,
0.098048538,
0.2155417651,
-0.1745537966
] |
https://github.com/huggingface/datasets/issues/2322 | Calls to map are not cached. | Hi ! Currently a dataset that is in memory doesn't know doesn't know in which directory it has to read/write cache files.
On the other hand, a dataset that loaded from the disk (via memory mapping) uses the directory from which the dataset is located to read/write cache files.
Because of that, currently in-memory datasets simply don't use caching.
Maybe a Dataset object could have a `cache_dir` that is set to the directory where the arrow files are created during `load_dataset` ? | ## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
| 82 | Calls to map are not cached.
## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
Hi ! Currently a dataset that is in memory doesn't know doesn't know in which directory it has to read/write cache files.
On the other hand, a dataset that loaded from the disk (via memory mapping) uses the directory from which the dataset is located to read/write cache files.
Because of that, currently in-memory datasets simply don't use caching.
Maybe a Dataset object could have a `cache_dir` that is set to the directory where the arrow files are created during `load_dataset` ? | [
-0.1652985811,
-0.3959718943,
-0.0088476408,
0.1456609815,
0.2062432468,
-0.1019177735,
0.300268203,
0.1251289845,
0.3953082561,
0.0206205156,
-0.0369779579,
0.2428550422,
0.1699712873,
-0.2849352956,
0.188086763,
0.2596048415,
0.2713772058,
-0.0385336578,
-0.2219657153,
-0.1745343506,
-0.1918821931,
0.1723638475,
-0.3064853549,
-0.2573415935,
-0.2379023135,
0.1117418632,
-0.2603808641,
-0.1230314821,
0.4237757027,
-0.3212156296,
0.3784760237,
-0.0580660664,
0.0148670431,
0.6959591508,
-0.0001131878,
-0.1605280191,
0.1358755082,
-0.1383192837,
-0.0015482461,
0.2133312225,
-0.3389547467,
-0.310015589,
-0.0045192568,
-0.2349565178,
-0.330738008,
0.0151234539,
-0.0239327457,
-0.8197698593,
0.3728451133,
0.254106313,
0.29510656,
0.1726136059,
-0.0190225951,
0.0742856562,
0.0866032913,
-0.083791092,
-0.2725947201,
-0.0186919924,
0.2995275855,
-0.1974390745,
-0.0282072928,
0.3594812155,
-0.1319522262,
0.0735726207,
0.3317605853,
0.3265018463,
0.2180389911,
-0.118591629,
0.2567962408,
-0.225838989,
0.3444480598,
-0.2505608201,
-0.3402970135,
-0.2521974444,
-0.4512900114,
-0.0935977474,
0.2305347025,
-0.1816349775,
-0.0175115168,
0.0523242541,
-0.3951410949,
0.1461098343,
0.2768734992,
0.0239339545,
0.0391480215,
0.2585591674,
-0.0857635811,
0.1061439142,
0.0440756157,
-0.1575075686,
0.018533038,
-0.2476875037,
-0.0233252645,
0.3876005113,
-0.4578024745,
0.1309818476,
0.4648626149,
0.1431977302,
-0.1110443324,
-0.0129450476,
0.1193560287,
-0.0060808216,
0.1863620877,
0.0010306179,
0.0615783371,
0.4890258014,
-0.0103559969,
0.3551561534,
-0.0375437662,
-0.0719550699,
-0.3230220973,
-0.1323277652,
0.2659286857,
-0.1008694097,
0.5175332427,
0.1616135091,
0.200592041,
-0.1302776933,
0.1896832734,
-0.0005332733,
-0.1633594483,
-0.174870953,
0.1617181152,
0.3469945192,
0.086999625,
-0.0365330018,
-0.0770053491,
-0.1087395251,
-0.2207538784,
-0.0763377845,
-0.3961369693,
-0.243857339,
-0.307054013,
0.1495586038,
0.1974380165,
-0.0326647721,
0.1355966777,
0.0273352489,
-0.1005733609,
-0.3355160952,
0.0546232164,
-0.1876348108,
0.6559559107,
0.1588800848,
-0.2145820707,
0.2533616722,
0.3517918885,
0.1798379272,
-0.3027567565,
0.2813000977,
-0.4556754827,
-0.0874435157,
0.4142127633,
0.1292609721,
-0.0999098271,
-0.0748004764,
-0.1504980326,
0.1253664345,
0.7231863141,
-0.1573021412,
0.2668025792,
-0.2129022479,
-0.482109189,
-0.3187292814,
0.349481225,
0.4953727126,
-0.1281025559,
-0.1405407637,
0.1062853336,
0.3853786588,
0.3683372736,
0.2536807954,
-0.239435479,
0.111223802,
-0.2686234117,
0.1886624396,
0.2342702299,
-0.3849433064,
-0.6794062853,
-0.0250380728,
-0.0827808157,
0.1595272422,
0.0307167936,
-0.0343512557,
0.3004792631,
-0.1870462149,
0.1719586551,
-0.0572243705,
-0.0018517898,
0.3272252977,
-0.3206146657,
-0.1073742136,
0.092747584,
-0.1154710352,
-0.0071229604,
0.1117236838,
-0.0307567976,
-0.1718791872,
0.0220949594,
-0.0848009363,
0.0942299217,
0.2804445326,
0.1836044341,
0.074345544,
0.144878611,
0.0220391136,
-0.3660168648,
0.3349871635,
0.0531434901,
-0.3603880107,
0.0600704663,
-0.1577845514,
0.0208378062,
0.0101068113,
-0.0955997854,
-0.3363131583,
0.104188621,
0.3796645999,
0.4487679303,
-0.0369238108,
-0.0252824575,
0.1748473346,
0.4177247286,
-0.1355365813,
-0.1835996211,
-0.0341756754,
-0.0137684373,
-0.3760498166,
-0.2427928597,
0.0894413069,
0.2749848366,
-0.0927510932,
-0.2492631227,
0.2887128294,
0.0752178431,
0.2719337642,
-0.230387494,
0.0465383083,
-0.1450291425,
0.0545007624,
0.1124544963,
0.286950022,
0.0986519977,
-0.1674384475,
-0.0972825661,
0.1450362504,
0.1808004826,
0.2196064889,
-0.1466811895,
-0.2114745229,
-0.0159518253,
-0.0938480645,
0.0052857776,
-0.1132848188,
0.1361346692,
-0.3531875908,
0.2921642065,
0.1115515754,
0.0568292849,
0.5075977445,
0.6477869153,
0.2599563897,
0.0253587514,
-0.1637761742,
-0.1948090941,
-0.1878933161,
0.2220142931,
0.068164967,
0.3480644524,
0.152301982,
0.2674677074,
-0.1897208542,
0.1817849874,
-0.1461721808,
0.1767242849,
-0.0601245128,
-0.2066124231,
-0.078241162,
0.4010895193,
-0.085679397,
-0.1126347929,
0.2867836952,
0.0554504469,
0.0140277622,
-0.2849522531,
0.2493801564,
-0.2281689644,
-0.0199216101,
-0.0153337028,
-0.0118858134,
0.0360352769,
-0.2648230195,
-0.1972461492,
0.2164188176,
0.1073124707,
0.279612273,
-0.2293338627,
0.0865708515,
0.1439066827,
-0.3094995916,
-0.2070797384,
-0.1622288972,
-0.2965812087,
-0.0212497152,
-0.0704682171,
-0.4137973785,
0.3088330626,
-0.1025655493,
-0.0244362783,
-0.1753555685,
-0.0770958364,
-0.1091740504,
-0.0907447785,
-0.1531939059,
-0.1948920786,
-0.0244989339,
-0.3243736625,
0.1080338582,
0.4173311293,
-0.4949834943,
-0.107648477,
-0.0787564144,
0.1874900758,
-0.0431401171,
-0.2904830575,
-0.0876898095,
-0.0140734734,
-0.1836277395,
0.1808853447,
-0.0643401816,
0.0390369073,
0.1268296987,
-0.0566197224,
0.0236131065,
-0.1371996254,
-0.1245087162,
-0.5041561127,
-0.2903997004,
0.3763310313,
-0.0780996084,
-0.2742151618,
0.059222959,
0.1451712698,
0.0341393426,
0.1656789482,
-0.5678585768,
-0.1953781545,
-0.2156901956,
0.3442632854,
0.033339873,
0.180753842,
0.5501801372,
-0.0730525479,
-0.0768214688,
-0.2849735022,
-0.3120512068,
0.0548583716,
0.1322663873,
0.2266617268,
0.1739227474,
0.3240975738,
0.0204181224,
0.7732431293,
0.3936823905,
-0.085674189,
0.2908101976,
0.0597864874,
0.1808596551,
-0.3642300069,
-0.3403164148,
0.0350096039,
-0.1827742904,
-0.128504321,
0.2705570161,
0.3032855093,
-0.0222309045,
-0.1094396338,
0.2212006748,
-0.1986010969,
-0.3431125283,
-0.0303971246,
-0.2429029793,
0.2905064523,
0.1185869426,
0.2951219082,
-0.5850368142,
-0.2202436477,
-0.0060849069,
-0.2478070855,
0.4443365037,
0.0158358663,
-0.2791821361,
0.0755804852,
-0.6623136401,
0.2993408144,
0.0712708309,
0.1914257258,
-0.2336750627,
-0.1159098074,
0.0714241192,
-0.0268774889,
0.6149195433,
-0.0980298892,
0.215280816,
0.2069244385,
-0.0718017593,
-0.2621383667,
-0.1335535049,
0.1261742264,
0.4026215076,
0.2812722921,
0.2727686465,
-0.0917573646,
-0.0591253042,
-0.1914011538,
-0.0008057857,
0.0033788222,
-0.1724703014,
-0.1790287495,
-0.0084476881,
0.0257135686,
-0.022418933,
0.1463285536,
-0.1725967824,
-0.0203400087,
-0.0126258256,
0.0603808016,
-0.0783065781,
-0.108448945,
-0.0458773114,
0.542843163,
0.1747182161,
0.2683490813,
0.3154829144,
-0.039076712,
0.0233072918,
0.5417565107,
-0.2427833825,
-0.2225135863,
0.1127763167,
-0.0276026502,
-0.0853290111,
0.215156883,
-0.2347984016,
-0.0417109393,
0.1057306156,
0.0352252722,
-0.3095476031,
-0.2857126892,
0.1860626787,
0.3117538691,
-0.0406352654,
-0.4116737545,
0.302397728,
0.2473785877,
-0.1356349885,
0.2800070941,
-0.2344652563,
-0.3694334328,
0.1577771306,
-0.1495594382,
0.6636373401,
-0.0786998048,
0.1571421027,
-0.0520509109,
0.1835275143,
0.194664225,
0.1474545896,
0.2649953663,
-0.1044729054,
0.0119886091,
0.054190252,
-0.2487533242,
-0.1591396481,
0.0749852583,
-0.3146074712,
0.2809507847,
-0.1236772165,
0.5698902011,
-0.0066639064,
-0.4552019835,
0.290089488,
-0.2605769932,
-0.1575251967,
0.2971997559,
0.0973430946,
0.3726033866,
0.0273765419,
0.1337129921,
-0.3140105903,
-0.1954759806,
-0.0545736142,
0.0366234072,
-0.3555862606,
0.1764087677,
0.0829665437,
-0.143330887,
-0.2857703865,
0.317255199,
0.2478206009,
-0.1296859235,
-0.2597379088,
-0.0524205975,
0.3185187876,
0.4231221974,
-0.0771501288,
-0.2048160732,
0.0923811495,
0.1307822317,
-0.0734860748,
0.0694010407,
-0.0797297582,
-0.4370841086,
-0.2913405597,
0.3078610599,
0.0208339859,
-0.2143394351,
-0.0240413137,
0.0380598828,
0.1404801905,
-0.0343716331,
0.1763845682,
0.0926659331,
0.0463771671,
0.3522180021,
-0.3066444993,
-0.0329214409,
0.0963014066,
0.6910689473,
0.1768391728,
-0.1092542335,
0.3844688237,
0.0621928908,
-0.2908227146,
-0.1518292874,
-0.168227613,
-0.237453267,
-0.2049522251,
0.1135924906,
-0.3047882617,
0.0570381731,
0.129543215,
0.0878920555,
-0.0071593421,
0.0445575304,
-0.0939456746,
-0.1312910765,
-0.3829701841,
-0.1060886756,
0.0017552897,
0.0525344536,
0.1982151419,
-0.050252948,
-0.0928942636,
0.1762563437,
-0.3340483904,
0.0618871637,
0.0773277134,
0.157449469,
0.1283507943,
-0.1339038461,
0.2853278816,
-0.1930518001,
0.0594117045,
0.0728169605,
-0.4139122069,
-0.2782282829,
0.1670400053,
0.0941637084,
0.032999225,
-0.1214172915,
-0.2470844835,
-0.2226423174,
0.0129629662,
-0.5172250867,
0.0562338978,
0.3003097475,
-0.1033163294,
-0.0619975142,
0.1269363165,
0.0589885004,
0.309879005,
0.1901085377,
-0.117551446,
-0.0086970981,
-0.2208376378,
0.2573597133,
0.0479167812,
0.1370417029,
-0.0562722161,
0.0399614722,
0.1067030653,
0.1473335922,
0.3538512886,
-0.3495474756,
-0.0959055126,
0.1794881821,
0.1977200061,
-0.0654620528,
-0.1790164262,
-0.0933834538,
-0.104869768,
0.1833397895,
-0.0919106156,
-0.1030883193,
0.5036973357,
0.3170228004,
0.1233304366,
0.1406893879,
0.1180771813,
-0.2553684711,
0.1805232614,
0.2257970124,
0.5175110698,
-0.2156962156,
0.2968264818,
0.0140350554,
0.0883397684,
0.2030393183,
0.3545149863,
0.1806841046,
-0.0887579098,
0.305305928,
0.138816312,
0.2244513333,
0.2918460071,
0.0828304589,
-0.229790926,
-0.3308692276,
0.0828508213,
0.0315339342,
-0.2458782196,
0.3778290749,
-0.1030260548,
0.1648580581,
-0.2387320697,
-0.2116421759,
-0.2096368521,
0.1876000762,
-0.3254328072,
-0.1851068437,
0.2513276041,
0.0140236849,
0.2821990252,
-0.0885625035,
0.0273095798,
0.1022791937,
0.4871227145,
-0.0871346742,
0.1598788351,
-0.0388509408,
-0.4198500216,
-0.059173651,
0.5264778733,
-0.2331321836,
0.3561902642,
-0.1694326103,
-0.0523770489,
-0.1272805929,
0.2946248353,
0.3648687899,
0.2336493731,
-0.0502333716,
0.2412075251,
0.187932238,
-0.0643315911,
-0.2987422049,
0.4023102224,
-0.1540632546,
-0.4223704636,
0.1338625699,
0.1175442263,
-0.104582049,
0.2091161013,
-0.0698803514,
0.3018085063,
-0.1135064363,
0.1194502711,
-0.3948715925,
-0.1819139421,
0.0504537076,
0.085681349,
-0.0915615335,
-0.0797384381,
0.2938599885,
-0.1051160023,
0.2879909575,
-0.1760941744,
0.1067947745,
-0.1220279038,
0.2977885902,
0.1854483187,
0.0438229889,
-0.1389903426,
-0.0323160067,
-0.3474258482,
0.161976099,
-0.3173360527,
0.1556629539,
-0.2174624652,
0.1678790152,
-0.1132479608,
-0.002430761,
0.2810384929,
-0.4437095821,
0.1354281455,
0.2527985275,
-0.2207791358,
-0.230024904,
-0.2162611037,
0.0634273887,
0.2270527929,
-0.4350834787,
0.3417460322,
-0.2804059088,
0.1463567168,
-0.1610892862,
0.0493281446,
0.0592852049,
0.2093147784,
0.4556952417,
0.3434939086,
0.1172763556,
0.2226644456,
0.0480289608,
-0.301628679,
-0.1258734465,
0.042610839,
0.0033725286,
-0.188661471,
0.1646269262,
-0.5020896792,
-0.3603518605,
-0.2256873101,
0.011632584,
0.2128080875,
-0.1014987752,
0.07022807,
-0.1475330889,
-0.1326117814,
-0.1100244001,
0.0685977638,
0.2812514901,
-0.2610150576,
0.3380210698,
-0.2217292041,
-0.2134328187,
0.448846668,
-0.4780474305,
-0.3460968435,
-0.186857298,
0.3811695874,
-0.1383680552,
-0.1656837463,
-0.3600320518,
-0.0466111489,
0.3932839036,
0.0571715795,
-0.197720319,
0.2492491752,
-0.2645008564,
0.2071589231,
-0.0334161259,
0.2238561809,
0.0952141508,
0.098048538,
0.2155417651,
-0.1745537966
] |
https://github.com/huggingface/datasets/issues/2319 | UnicodeDecodeError for OSCAR (Afrikaans) | Thanks for reporting, @sgraaf.
I am going to have a look at it.
I guess the expected codec is "UTF-8". Normally, when no explicitly codec is passed, Python uses one which is platform-dependent. For Linux machines, the default codec is `utf_8`, which is OK. However for Windows machine, the default codec is `cp1252`, which causes the problem. | ## Describe the bug
When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
```
## Expected results
Anything but an error, really.
## Actual results
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
Downloading: 14.7kB [00:00, 4.91MB/s]
Downloading: 3.07MB [00:00, 32.6MB/s]
Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464...
Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 81.0/81.0 [00:00<00:00, 40.5kB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 66.0M/66.0M [00:18<00:00, 3.50MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare
self._download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split
for key, record in utils.tqdm(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__
for obj in iterable:
File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples
for line in f:
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined>
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
- Datasets: 1.6.2
- Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
- Platform: Windows-10-10.0.19041-SP0 | 57 | UnicodeDecodeError for OSCAR (Afrikaans)
## Describe the bug
When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
```
## Expected results
Anything but an error, really.
## Actual results
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
Downloading: 14.7kB [00:00, 4.91MB/s]
Downloading: 3.07MB [00:00, 32.6MB/s]
Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464...
Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 81.0/81.0 [00:00<00:00, 40.5kB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 66.0M/66.0M [00:18<00:00, 3.50MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare
self._download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split
for key, record in utils.tqdm(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__
for obj in iterable:
File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples
for line in f:
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined>
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
- Datasets: 1.6.2
- Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
- Platform: Windows-10-10.0.19041-SP0
Thanks for reporting, @sgraaf.
I am going to have a look at it.
I guess the expected codec is "UTF-8". Normally, when no explicitly codec is passed, Python uses one which is platform-dependent. For Linux machines, the default codec is `utf_8`, which is OK. However for Windows machine, the default codec is `cp1252`, which causes the problem. | [
-0.0694421232,
-0.0689754039,
-0.0686591119,
0.5462195277,
0.4998695552,
0.0235808808,
0.1604427248,
0.1600640714,
-0.2532078028,
0.2616167367,
0.1081411839,
0.074565649,
-0.1329876184,
-0.1621267796,
0.0694556236,
-0.2411272228,
0.0238732491,
-0.0095883496,
0.1490587145,
-0.1138728261,
-0.3042189479,
0.3047542274,
-0.1467041522,
0.1465252638,
-0.3382016122,
0.1170733124,
0.0047267051,
0.2575016618,
-0.1414588243,
-0.3523656726,
0.128092438,
0.0163176041,
0.1069401577,
0.2742299736,
-0.0001185049,
-0.0547293089,
0.4611512125,
-0.131525442,
-0.3736710548,
0.0470524989,
-0.2316294461,
0.1640682071,
-0.1074654758,
-0.0671967641,
0.1775652617,
-0.2891407311,
-0.0651189983,
-0.5603588223,
0.0184156504,
0.3229224384,
0.1736242771,
0.1185972542,
0.1850378513,
0.0575318933,
-0.185992986,
-0.1070657447,
-0.0142298173,
0.0994631276,
0.2410668582,
0.1616298109,
-0.0901439041,
0.1463268399,
0.115042232,
0.0891947821,
0.1299642473,
0.0778745413,
-0.1804776341,
-0.2484131008,
0.3013782799,
0.1579846591,
0.3460532427,
-0.4334867597,
-0.3860436678,
-0.3108896911,
0.1961862445,
-0.5193542838,
0.540989995,
-0.0237484463,
-0.115902856,
0.2356259525,
-0.0887802914,
0.0784846023,
-0.1790721864,
0.2531144917,
-0.2060514688,
0.0477678888,
-0.2439981699,
-0.0066761663,
-0.1567633152,
-0.1092079282,
0.0756574348,
-0.3706617951,
-0.0559560023,
0.3437899947,
-0.1797937602,
0.1441421956,
-0.064124085,
0.1609286964,
0.2896221578,
0.2038010657,
0.1995993257,
-0.005847896,
-0.3779214919,
-0.0436834209,
0.1444817036,
0.3555552959,
-0.0572911277,
-0.0332700983,
0.2502481341,
0.3896284103,
0.0751843154,
-0.0033731398,
-0.1319146603,
-0.2046164423,
0.2316854745,
0.0210271459,
0.5934265256,
-0.206574589,
-0.2736486793,
0.2963076532,
-0.1085710153,
-0.133384794,
-0.1332823038,
0.1001211852,
-0.1807521135,
0.2083038688,
-0.1411851197,
0.2635082304,
-0.0920617506,
-0.3318834305,
-0.1641349792,
-0.2244987786,
-0.0947454572,
0.1042882726,
0.0092694331,
0.0026700317,
0.1869611591,
0.0432530232,
0.3022837341,
-0.0885122195,
-0.0725463703,
-0.1705316752,
-0.0138037205,
0.0101129804,
0.0544216409,
0.2440929711,
0.0441391096,
-0.4594569802,
0.0363980271,
0.0950224921,
-0.0368123017,
-0.2857240736,
-0.190805912,
0.148738876,
-0.1962006539,
-0.0518818535,
-0.2405540943,
0.2764448225,
0.1800577939,
0.0541133247,
0.2551352382,
-0.0168270785,
-0.0834420919,
-0.139044404,
0.2472233325,
0.5666912198,
-0.3448717296,
-0.048791945,
-0.1240100637,
-0.2066464871,
0.3429838717,
0.2263724655,
0.0529709868,
-0.0220641959,
-0.3649464548,
0.1118096113,
0.1237513274,
-0.2463660836,
-0.5438916087,
0.185088709,
-0.068407245,
0.5069646239,
0.181736514,
-0.1587031186,
0.2452928722,
-0.0106924884,
0.2900947332,
0.4672311544,
-0.250634551,
-0.0112695312,
-0.2532828748,
-0.2451155037,
0.0314222984,
0.2176153511,
0.089072451,
0.0002357101,
0.1373466402,
0.2070337385,
0.3857545257,
-0.1042288691,
0.1944545507,
0.1247577146,
0.0118007045,
0.3576554954,
0.0679640844,
-0.2294075042,
-0.2820860744,
0.2640694678,
-0.0024922362,
0.1133578792,
-0.500890851,
-0.1440784782,
-0.3841669261,
-0.1332485676,
-0.4603829086,
-0.4079798758,
0.0958774239,
0.2784144878,
0.1699377745,
0.5170193911,
-0.3551603258,
0.5020516515,
-0.0425739214,
-0.0007123954,
-0.5245201588,
0.2013830394,
0.1213724837,
-0.2475565672,
-0.1367648244,
0.2605237365,
-0.0419436879,
-0.0601240247,
-0.3732907176,
0.4005672634,
-0.0718282461,
0.2017920315,
0.029643124,
-0.0306067821,
0.3568611741,
-0.2730567157,
-0.0263983328,
0.2786277831,
0.2903377414,
-0.0451176986,
0.1648096591,
0.2245017886,
0.0779715553,
0.14245978,
0.0697215945,
-0.0256780535,
0.289108783,
0.191586569,
-0.0097915148,
-0.216820851,
0.2216826826,
-0.2710435092,
0.503097415,
0.0332432091,
-0.2335602492,
-0.0266738329,
0.6612032056,
-0.1373114735,
0.1267953664,
0.2621350288,
-0.1895716339,
0.1265208274,
-0.1143815741,
0.1996651739,
0.383133471,
-0.0028646903,
-0.0537524968,
0.1542639881,
0.2330897748,
-0.1416676641,
0.1646425426,
-0.0629853159,
0.272262007,
0.1404124796,
-0.1023302749,
0.0954844654,
-0.4391808212,
-0.2598067522,
-0.1511851996,
0.2690091729,
-0.3030653298,
0.0640031472,
-0.3796643615,
-0.0206941068,
-0.1904436946,
0.0154795963,
-0.3886273205,
-0.181905061,
-0.1342797577,
-0.0216700472,
0.0310602412,
0.1142269894,
-0.3544103801,
-0.0076767439,
0.0488111228,
-0.1199693233,
-0.2093362659,
-0.1015668511,
-0.3103096783,
0.0438975506,
0.323102653,
-0.0926565751,
0.2462626398,
-0.276535809,
-0.0418533944,
-0.1076044291,
-0.221381247,
0.0839275569,
-0.0488723889,
0.042071417,
0.0048810295,
-0.1037535295,
-0.1238442212,
-0.2191206515,
0.2420269549,
-0.0446106046,
-0.2791253328,
-0.0322684832,
0.2220712602,
0.0287389606,
0.0866417512,
-0.1361363828,
-0.2833299637,
-0.2109609097,
0.1948477775,
-0.0700787976,
0.006547112,
-0.0041648052,
-0.1305136085,
0.2061852515,
0.0590831041,
0.0376082808,
-0.3174692988,
-0.1577808857,
0.4085608423,
-0.3109960258,
-0.3512379527,
-0.135536775,
-0.0830547363,
-0.018494321,
-0.0540399328,
-0.2928427458,
-0.0980518982,
-0.5101270676,
0.0637506843,
-0.1237604022,
-0.0457394607,
0.119070746,
-0.1575071067,
0.0576681346,
-0.1093937904,
-0.1019481644,
-0.099364087,
-0.2305912524,
0.2241041511,
0.0622039661,
0.4960559309,
0.0121933781,
0.2126584649,
0.3057529926,
0.212321654,
0.5260175467,
-0.0799328685,
0.184986189,
-0.1288062185,
-0.1884319931,
0.2252403349,
-0.0842237175,
0.0127584999,
0.2701327503,
0.0234232694,
0.0515854172,
0.0052421861,
-0.049202159,
-0.4067462683,
-0.2655232251,
0.0225823224,
-0.2999834418,
-0.0312157869,
0.0302823577,
-0.0431816503,
-0.0429149829,
-0.0048569017,
0.0555356964,
0.227553919,
0.1170389876,
0.0395336971,
-0.0138054751,
0.4634627998,
-0.4846144021,
0.1904788613,
0.2164637148,
0.3688201308,
-0.186462447,
0.1061567888,
0.1600916684,
-0.0152380932,
0.5245287418,
-0.2009746879,
0.0450646766,
-0.0242351759,
0.0215707906,
-0.1524719596,
0.0056640208,
-0.1911640912,
0.0840866938,
0.075102739,
-0.0573343076,
-0.3224103451,
0.129959628,
0.2902527452,
0.1279774904,
-0.246636644,
-0.0584840886,
-0.2767926455,
-0.6488553286,
-0.4599294662,
0.0440939218,
0.1775837094,
0.64395082,
0.038022846,
0.0368811823,
-0.3710875511,
-0.1193649098,
0.2180927545,
0.2218857557,
0.2045164853,
0.0522636846,
0.1377337724,
-0.0309111662,
-0.1569292545,
0.1311827749,
0.7023575902,
0.156599313,
-0.8256708384,
0.012018525,
-0.3925681412,
0.2404543012,
0.3038632572,
-0.336086005,
-0.0839433521,
-0.0898068175,
0.045434244,
-0.2287013233,
-0.047865767,
0.3065970242,
0.1627947688,
-0.3890810013,
-0.3552235067,
0.3005340993,
0.1599295884,
0.1147745177,
0.3221258521,
0.6737329364,
-0.3928649127,
0.3598771095,
-0.1468217969,
0.8503288031,
-0.0660849437,
0.0833553374,
0.2286053449,
-0.1141337156,
0.131980896,
0.0775089338,
-0.033969637,
-0.2698892355,
-0.5620769262,
-0.057210058,
0.0915213525,
0.3920045495,
0.1631711572,
0.0972269252,
0.2071472853,
0.0075963708,
-0.0747897103,
0.2738657594,
-0.0034668627,
-0.6421947479,
-0.2249639928,
-0.7355559468,
0.0970179662,
-0.0224778596,
0.3151268065,
-0.0714314729,
-0.1402933747,
-0.1581400186,
-0.3351468742,
-0.385602504,
-0.0154364472,
-0.3776576519,
-0.0970995724,
-0.1545855254,
-0.1117135212,
0.1473343223,
0.4229136407,
0.6014972329,
-0.0652301013,
0.0985841975,
0.1983695626,
0.0026573385,
0.0442008115,
0.0897214934,
-0.0528164953,
0.2270964831,
-0.1585267782,
-0.2550143898,
0.1195953637,
0.1011184603,
-0.1982215047,
0.0600000247,
-0.0094471173,
-0.0429221056,
0.0028321645,
-0.2840371728,
-0.3613981009,
0.0897815377,
-0.1192418709,
0.0948573053,
0.1246795282,
-0.1993407905,
-0.0894752294,
-0.0859324634,
-0.2890740633,
-0.1181160361,
0.3048833609,
-0.0217163563,
-0.2639845312,
0.5028188825,
0.1184296459,
-0.0716891512,
0.0056204796,
0.1334237009,
0.3831129968,
-0.7260904312,
0.1097738519,
-0.1273097545,
0.1592682898,
-0.4053402543,
-0.0723259822,
0.159567073,
-0.0180262737,
0.0894447714,
-0.4488123059,
-0.4160527289,
0.0744155943,
0.2130596787,
0.1293920577,
0.0954490378,
-0.1923475266,
-0.025034273,
-0.1422930509,
-0.2089498043,
0.1566261202,
-0.0382908955,
-0.0264958981,
0.1362149119,
0.0213508792,
0.3478313684,
-0.0249609556,
0.124081783,
0.3377992213,
0.1442820579,
-0.154753074,
-0.2414447963,
0.1742483824,
0.003625286,
-0.2690987885,
0.1239998862,
0.0635253266,
0.0573855042,
-0.2646687925,
0.3544515371,
0.2616268694,
0.0747516304,
0.0032802925,
0.427287817,
0.2713809013,
-0.203610912,
0.1037187874,
-0.0977844,
0.652608037,
0.1991454065,
0.1095701233,
0.0275048222,
0.0897116736,
0.1037357077,
-0.1280576289,
-0.1535150707,
0.2041808963,
0.4038522243,
-0.4951634407,
0.124404937,
0.1553732902,
0.1547781974,
0.3628261983,
-0.3015828133,
-0.1846853942,
0.0290586613,
0.111422196,
-0.1472482681,
-0.0250145625,
0.1978157908,
-0.0506467223,
-0.137355119,
0.3244963884,
0.0133939609,
0.0463707484,
-0.2731552124,
0.0127837798,
0.1547780037,
0.1434922665,
0.1568887085,
0.5182113051,
0.000366496,
0.1642683893,
-0.0344313122,
-0.0143855158,
0.0959053189,
0.6655553579,
-0.4488254189,
0.3969165683,
-0.3500703275,
0.1745539606,
0.0767899901,
-0.4070474207,
0.0888987407,
0.1055198684,
-0.1830556095,
0.3550575972,
0.3304262459,
-0.0402161293,
0.0390587226,
-0.0241652615,
-0.1799832135,
-0.0039237123,
0.0731735304,
-0.0629030094,
0.242187053,
-0.0489678383,
-0.4993311763,
0.0469326451,
-0.2214452624,
-0.0606461577,
0.1470320523,
0.1422173977,
-0.2054491341,
-0.45921731,
-0.0614413507,
0.0940991193,
0.3104106784,
-0.1470004916,
0.2697253525,
0.559776485,
-0.0509304553,
0.0835070461,
0.3272658587,
0.3617141843,
0.3501303792,
-0.0930438638,
0.2183522433,
-0.1705191582,
0.0922725126,
-0.041104015,
0.3157975674,
0.0335395411,
0.2923209965,
0.1796875745,
0.1172870547,
-0.0610100031,
-0.1139324754,
0.1808078587,
0.0667185187,
-0.1626318097,
0.559011817,
-0.2413321733,
0.3378426731,
-0.4312129021,
0.1158483252,
-0.4262698591,
0.0569705702,
0.106283173,
0.0436159223,
0.1522225291,
-0.1087152585,
0.0243046191,
0.0584187359,
0.3454765975,
0.4733147621,
-0.0609362349,
-0.0635546446,
-0.228071034,
-0.8209510446,
0.2867547572,
0.0702622905,
-0.0507211015,
0.0075876629,
0.0676314756,
-0.1575789452,
0.2200597972,
0.1838782281,
0.3849217594,
0.0557090007,
0.4215775132,
-0.2175573409,
-0.3669781983,
-0.0342483595,
0.0892867595,
-0.1560128778,
-0.2319588661,
0.1906742752,
-0.1902056634,
0.0089191496,
-0.1362988949,
0.0176734105,
-0.3930065334,
-0.3073526323,
0.2711993456,
0.4918368161,
0.3157916367,
-0.2006272376,
-0.1065061167,
-0.3567891419,
0.0511440076,
-0.0569166541,
0.7189385891,
0.0713302642,
0.3113724291,
-0.0486295894,
-0.3071855605,
-0.3909930885,
0.6503097415,
0.0137485899,
0.0019374819,
-0.3354509473,
0.20867908,
0.0069668144,
0.1607424915,
0.1457736939,
0.2864105701,
-0.1862344891,
0.345535785,
-0.0165788811,
-0.5363337398,
0.4404789805,
-0.3810061216,
-0.2944442928,
0.0402830951,
0.1934371442,
0.3828413486,
-0.3138972223,
-0.5248438716,
0.3539699018,
0.2991938889,
-0.1255300939,
-0.1020758823,
0.1371119171,
-0.0490202121,
0.0338297263,
-0.1445921808,
0.3745249212,
-0.0207861383,
-0.0856956914,
0.5031968355,
-0.3108052611
] |
https://github.com/huggingface/datasets/issues/2319 | UnicodeDecodeError for OSCAR (Afrikaans) | @sgraaf, I have just merged the fix in the master branch.
You can either:
- install `datasets` from source code
- wait until we make the next release of `datasets`
- set the `utf-8` codec as your default instead of `cp1252`. This can be done by activating the Python [UTF-8 mode](https://www.python.org/dev/peps/pep-0540) either by passing the command-line option `-X utf8` or by setting the environment variable `PYTHONUTF8=1`. | ## Describe the bug
When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
```
## Expected results
Anything but an error, really.
## Actual results
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
Downloading: 14.7kB [00:00, 4.91MB/s]
Downloading: 3.07MB [00:00, 32.6MB/s]
Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464...
Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 81.0/81.0 [00:00<00:00, 40.5kB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 66.0M/66.0M [00:18<00:00, 3.50MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare
self._download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split
for key, record in utils.tqdm(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__
for obj in iterable:
File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples
for line in f:
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined>
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
- Datasets: 1.6.2
- Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
- Platform: Windows-10-10.0.19041-SP0 | 66 | UnicodeDecodeError for OSCAR (Afrikaans)
## Describe the bug
When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
```
## Expected results
Anything but an error, really.
## Actual results
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
Downloading: 14.7kB [00:00, 4.91MB/s]
Downloading: 3.07MB [00:00, 32.6MB/s]
Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464...
Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 81.0/81.0 [00:00<00:00, 40.5kB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 66.0M/66.0M [00:18<00:00, 3.50MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare
self._download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split
for key, record in utils.tqdm(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__
for obj in iterable:
File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples
for line in f:
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined>
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
- Datasets: 1.6.2
- Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
- Platform: Windows-10-10.0.19041-SP0
@sgraaf, I have just merged the fix in the master branch.
You can either:
- install `datasets` from source code
- wait until we make the next release of `datasets`
- set the `utf-8` codec as your default instead of `cp1252`. This can be done by activating the Python [UTF-8 mode](https://www.python.org/dev/peps/pep-0540) either by passing the command-line option `-X utf8` or by setting the environment variable `PYTHONUTF8=1`. | [
-0.0694421232,
-0.0689754039,
-0.0686591119,
0.5462195277,
0.4998695552,
0.0235808808,
0.1604427248,
0.1600640714,
-0.2532078028,
0.2616167367,
0.1081411839,
0.074565649,
-0.1329876184,
-0.1621267796,
0.0694556236,
-0.2411272228,
0.0238732491,
-0.0095883496,
0.1490587145,
-0.1138728261,
-0.3042189479,
0.3047542274,
-0.1467041522,
0.1465252638,
-0.3382016122,
0.1170733124,
0.0047267051,
0.2575016618,
-0.1414588243,
-0.3523656726,
0.128092438,
0.0163176041,
0.1069401577,
0.2742299736,
-0.0001185049,
-0.0547293089,
0.4611512125,
-0.131525442,
-0.3736710548,
0.0470524989,
-0.2316294461,
0.1640682071,
-0.1074654758,
-0.0671967641,
0.1775652617,
-0.2891407311,
-0.0651189983,
-0.5603588223,
0.0184156504,
0.3229224384,
0.1736242771,
0.1185972542,
0.1850378513,
0.0575318933,
-0.185992986,
-0.1070657447,
-0.0142298173,
0.0994631276,
0.2410668582,
0.1616298109,
-0.0901439041,
0.1463268399,
0.115042232,
0.0891947821,
0.1299642473,
0.0778745413,
-0.1804776341,
-0.2484131008,
0.3013782799,
0.1579846591,
0.3460532427,
-0.4334867597,
-0.3860436678,
-0.3108896911,
0.1961862445,
-0.5193542838,
0.540989995,
-0.0237484463,
-0.115902856,
0.2356259525,
-0.0887802914,
0.0784846023,
-0.1790721864,
0.2531144917,
-0.2060514688,
0.0477678888,
-0.2439981699,
-0.0066761663,
-0.1567633152,
-0.1092079282,
0.0756574348,
-0.3706617951,
-0.0559560023,
0.3437899947,
-0.1797937602,
0.1441421956,
-0.064124085,
0.1609286964,
0.2896221578,
0.2038010657,
0.1995993257,
-0.005847896,
-0.3779214919,
-0.0436834209,
0.1444817036,
0.3555552959,
-0.0572911277,
-0.0332700983,
0.2502481341,
0.3896284103,
0.0751843154,
-0.0033731398,
-0.1319146603,
-0.2046164423,
0.2316854745,
0.0210271459,
0.5934265256,
-0.206574589,
-0.2736486793,
0.2963076532,
-0.1085710153,
-0.133384794,
-0.1332823038,
0.1001211852,
-0.1807521135,
0.2083038688,
-0.1411851197,
0.2635082304,
-0.0920617506,
-0.3318834305,
-0.1641349792,
-0.2244987786,
-0.0947454572,
0.1042882726,
0.0092694331,
0.0026700317,
0.1869611591,
0.0432530232,
0.3022837341,
-0.0885122195,
-0.0725463703,
-0.1705316752,
-0.0138037205,
0.0101129804,
0.0544216409,
0.2440929711,
0.0441391096,
-0.4594569802,
0.0363980271,
0.0950224921,
-0.0368123017,
-0.2857240736,
-0.190805912,
0.148738876,
-0.1962006539,
-0.0518818535,
-0.2405540943,
0.2764448225,
0.1800577939,
0.0541133247,
0.2551352382,
-0.0168270785,
-0.0834420919,
-0.139044404,
0.2472233325,
0.5666912198,
-0.3448717296,
-0.048791945,
-0.1240100637,
-0.2066464871,
0.3429838717,
0.2263724655,
0.0529709868,
-0.0220641959,
-0.3649464548,
0.1118096113,
0.1237513274,
-0.2463660836,
-0.5438916087,
0.185088709,
-0.068407245,
0.5069646239,
0.181736514,
-0.1587031186,
0.2452928722,
-0.0106924884,
0.2900947332,
0.4672311544,
-0.250634551,
-0.0112695312,
-0.2532828748,
-0.2451155037,
0.0314222984,
0.2176153511,
0.089072451,
0.0002357101,
0.1373466402,
0.2070337385,
0.3857545257,
-0.1042288691,
0.1944545507,
0.1247577146,
0.0118007045,
0.3576554954,
0.0679640844,
-0.2294075042,
-0.2820860744,
0.2640694678,
-0.0024922362,
0.1133578792,
-0.500890851,
-0.1440784782,
-0.3841669261,
-0.1332485676,
-0.4603829086,
-0.4079798758,
0.0958774239,
0.2784144878,
0.1699377745,
0.5170193911,
-0.3551603258,
0.5020516515,
-0.0425739214,
-0.0007123954,
-0.5245201588,
0.2013830394,
0.1213724837,
-0.2475565672,
-0.1367648244,
0.2605237365,
-0.0419436879,
-0.0601240247,
-0.3732907176,
0.4005672634,
-0.0718282461,
0.2017920315,
0.029643124,
-0.0306067821,
0.3568611741,
-0.2730567157,
-0.0263983328,
0.2786277831,
0.2903377414,
-0.0451176986,
0.1648096591,
0.2245017886,
0.0779715553,
0.14245978,
0.0697215945,
-0.0256780535,
0.289108783,
0.191586569,
-0.0097915148,
-0.216820851,
0.2216826826,
-0.2710435092,
0.503097415,
0.0332432091,
-0.2335602492,
-0.0266738329,
0.6612032056,
-0.1373114735,
0.1267953664,
0.2621350288,
-0.1895716339,
0.1265208274,
-0.1143815741,
0.1996651739,
0.383133471,
-0.0028646903,
-0.0537524968,
0.1542639881,
0.2330897748,
-0.1416676641,
0.1646425426,
-0.0629853159,
0.272262007,
0.1404124796,
-0.1023302749,
0.0954844654,
-0.4391808212,
-0.2598067522,
-0.1511851996,
0.2690091729,
-0.3030653298,
0.0640031472,
-0.3796643615,
-0.0206941068,
-0.1904436946,
0.0154795963,
-0.3886273205,
-0.181905061,
-0.1342797577,
-0.0216700472,
0.0310602412,
0.1142269894,
-0.3544103801,
-0.0076767439,
0.0488111228,
-0.1199693233,
-0.2093362659,
-0.1015668511,
-0.3103096783,
0.0438975506,
0.323102653,
-0.0926565751,
0.2462626398,
-0.276535809,
-0.0418533944,
-0.1076044291,
-0.221381247,
0.0839275569,
-0.0488723889,
0.042071417,
0.0048810295,
-0.1037535295,
-0.1238442212,
-0.2191206515,
0.2420269549,
-0.0446106046,
-0.2791253328,
-0.0322684832,
0.2220712602,
0.0287389606,
0.0866417512,
-0.1361363828,
-0.2833299637,
-0.2109609097,
0.1948477775,
-0.0700787976,
0.006547112,
-0.0041648052,
-0.1305136085,
0.2061852515,
0.0590831041,
0.0376082808,
-0.3174692988,
-0.1577808857,
0.4085608423,
-0.3109960258,
-0.3512379527,
-0.135536775,
-0.0830547363,
-0.018494321,
-0.0540399328,
-0.2928427458,
-0.0980518982,
-0.5101270676,
0.0637506843,
-0.1237604022,
-0.0457394607,
0.119070746,
-0.1575071067,
0.0576681346,
-0.1093937904,
-0.1019481644,
-0.099364087,
-0.2305912524,
0.2241041511,
0.0622039661,
0.4960559309,
0.0121933781,
0.2126584649,
0.3057529926,
0.212321654,
0.5260175467,
-0.0799328685,
0.184986189,
-0.1288062185,
-0.1884319931,
0.2252403349,
-0.0842237175,
0.0127584999,
0.2701327503,
0.0234232694,
0.0515854172,
0.0052421861,
-0.049202159,
-0.4067462683,
-0.2655232251,
0.0225823224,
-0.2999834418,
-0.0312157869,
0.0302823577,
-0.0431816503,
-0.0429149829,
-0.0048569017,
0.0555356964,
0.227553919,
0.1170389876,
0.0395336971,
-0.0138054751,
0.4634627998,
-0.4846144021,
0.1904788613,
0.2164637148,
0.3688201308,
-0.186462447,
0.1061567888,
0.1600916684,
-0.0152380932,
0.5245287418,
-0.2009746879,
0.0450646766,
-0.0242351759,
0.0215707906,
-0.1524719596,
0.0056640208,
-0.1911640912,
0.0840866938,
0.075102739,
-0.0573343076,
-0.3224103451,
0.129959628,
0.2902527452,
0.1279774904,
-0.246636644,
-0.0584840886,
-0.2767926455,
-0.6488553286,
-0.4599294662,
0.0440939218,
0.1775837094,
0.64395082,
0.038022846,
0.0368811823,
-0.3710875511,
-0.1193649098,
0.2180927545,
0.2218857557,
0.2045164853,
0.0522636846,
0.1377337724,
-0.0309111662,
-0.1569292545,
0.1311827749,
0.7023575902,
0.156599313,
-0.8256708384,
0.012018525,
-0.3925681412,
0.2404543012,
0.3038632572,
-0.336086005,
-0.0839433521,
-0.0898068175,
0.045434244,
-0.2287013233,
-0.047865767,
0.3065970242,
0.1627947688,
-0.3890810013,
-0.3552235067,
0.3005340993,
0.1599295884,
0.1147745177,
0.3221258521,
0.6737329364,
-0.3928649127,
0.3598771095,
-0.1468217969,
0.8503288031,
-0.0660849437,
0.0833553374,
0.2286053449,
-0.1141337156,
0.131980896,
0.0775089338,
-0.033969637,
-0.2698892355,
-0.5620769262,
-0.057210058,
0.0915213525,
0.3920045495,
0.1631711572,
0.0972269252,
0.2071472853,
0.0075963708,
-0.0747897103,
0.2738657594,
-0.0034668627,
-0.6421947479,
-0.2249639928,
-0.7355559468,
0.0970179662,
-0.0224778596,
0.3151268065,
-0.0714314729,
-0.1402933747,
-0.1581400186,
-0.3351468742,
-0.385602504,
-0.0154364472,
-0.3776576519,
-0.0970995724,
-0.1545855254,
-0.1117135212,
0.1473343223,
0.4229136407,
0.6014972329,
-0.0652301013,
0.0985841975,
0.1983695626,
0.0026573385,
0.0442008115,
0.0897214934,
-0.0528164953,
0.2270964831,
-0.1585267782,
-0.2550143898,
0.1195953637,
0.1011184603,
-0.1982215047,
0.0600000247,
-0.0094471173,
-0.0429221056,
0.0028321645,
-0.2840371728,
-0.3613981009,
0.0897815377,
-0.1192418709,
0.0948573053,
0.1246795282,
-0.1993407905,
-0.0894752294,
-0.0859324634,
-0.2890740633,
-0.1181160361,
0.3048833609,
-0.0217163563,
-0.2639845312,
0.5028188825,
0.1184296459,
-0.0716891512,
0.0056204796,
0.1334237009,
0.3831129968,
-0.7260904312,
0.1097738519,
-0.1273097545,
0.1592682898,
-0.4053402543,
-0.0723259822,
0.159567073,
-0.0180262737,
0.0894447714,
-0.4488123059,
-0.4160527289,
0.0744155943,
0.2130596787,
0.1293920577,
0.0954490378,
-0.1923475266,
-0.025034273,
-0.1422930509,
-0.2089498043,
0.1566261202,
-0.0382908955,
-0.0264958981,
0.1362149119,
0.0213508792,
0.3478313684,
-0.0249609556,
0.124081783,
0.3377992213,
0.1442820579,
-0.154753074,
-0.2414447963,
0.1742483824,
0.003625286,
-0.2690987885,
0.1239998862,
0.0635253266,
0.0573855042,
-0.2646687925,
0.3544515371,
0.2616268694,
0.0747516304,
0.0032802925,
0.427287817,
0.2713809013,
-0.203610912,
0.1037187874,
-0.0977844,
0.652608037,
0.1991454065,
0.1095701233,
0.0275048222,
0.0897116736,
0.1037357077,
-0.1280576289,
-0.1535150707,
0.2041808963,
0.4038522243,
-0.4951634407,
0.124404937,
0.1553732902,
0.1547781974,
0.3628261983,
-0.3015828133,
-0.1846853942,
0.0290586613,
0.111422196,
-0.1472482681,
-0.0250145625,
0.1978157908,
-0.0506467223,
-0.137355119,
0.3244963884,
0.0133939609,
0.0463707484,
-0.2731552124,
0.0127837798,
0.1547780037,
0.1434922665,
0.1568887085,
0.5182113051,
0.000366496,
0.1642683893,
-0.0344313122,
-0.0143855158,
0.0959053189,
0.6655553579,
-0.4488254189,
0.3969165683,
-0.3500703275,
0.1745539606,
0.0767899901,
-0.4070474207,
0.0888987407,
0.1055198684,
-0.1830556095,
0.3550575972,
0.3304262459,
-0.0402161293,
0.0390587226,
-0.0241652615,
-0.1799832135,
-0.0039237123,
0.0731735304,
-0.0629030094,
0.242187053,
-0.0489678383,
-0.4993311763,
0.0469326451,
-0.2214452624,
-0.0606461577,
0.1470320523,
0.1422173977,
-0.2054491341,
-0.45921731,
-0.0614413507,
0.0940991193,
0.3104106784,
-0.1470004916,
0.2697253525,
0.559776485,
-0.0509304553,
0.0835070461,
0.3272658587,
0.3617141843,
0.3501303792,
-0.0930438638,
0.2183522433,
-0.1705191582,
0.0922725126,
-0.041104015,
0.3157975674,
0.0335395411,
0.2923209965,
0.1796875745,
0.1172870547,
-0.0610100031,
-0.1139324754,
0.1808078587,
0.0667185187,
-0.1626318097,
0.559011817,
-0.2413321733,
0.3378426731,
-0.4312129021,
0.1158483252,
-0.4262698591,
0.0569705702,
0.106283173,
0.0436159223,
0.1522225291,
-0.1087152585,
0.0243046191,
0.0584187359,
0.3454765975,
0.4733147621,
-0.0609362349,
-0.0635546446,
-0.228071034,
-0.8209510446,
0.2867547572,
0.0702622905,
-0.0507211015,
0.0075876629,
0.0676314756,
-0.1575789452,
0.2200597972,
0.1838782281,
0.3849217594,
0.0557090007,
0.4215775132,
-0.2175573409,
-0.3669781983,
-0.0342483595,
0.0892867595,
-0.1560128778,
-0.2319588661,
0.1906742752,
-0.1902056634,
0.0089191496,
-0.1362988949,
0.0176734105,
-0.3930065334,
-0.3073526323,
0.2711993456,
0.4918368161,
0.3157916367,
-0.2006272376,
-0.1065061167,
-0.3567891419,
0.0511440076,
-0.0569166541,
0.7189385891,
0.0713302642,
0.3113724291,
-0.0486295894,
-0.3071855605,
-0.3909930885,
0.6503097415,
0.0137485899,
0.0019374819,
-0.3354509473,
0.20867908,
0.0069668144,
0.1607424915,
0.1457736939,
0.2864105701,
-0.1862344891,
0.345535785,
-0.0165788811,
-0.5363337398,
0.4404789805,
-0.3810061216,
-0.2944442928,
0.0402830951,
0.1934371442,
0.3828413486,
-0.3138972223,
-0.5248438716,
0.3539699018,
0.2991938889,
-0.1255300939,
-0.1020758823,
0.1371119171,
-0.0490202121,
0.0338297263,
-0.1445921808,
0.3745249212,
-0.0207861383,
-0.0856956914,
0.5031968355,
-0.3108052611
] |
https://github.com/huggingface/datasets/issues/2318 | [api request] API to obtain "dataset_module" dynamic path? | Hi @richardliaw,
First, thanks for the compliments.
In relation with your request, currently, the dynamic modules path is obtained this way:
```python
from datasets.load import init_dynamic_modules, MODULE_NAME_FOR_DYNAMIC_MODULES
dynamic_modules_path = init_dynamic_modules(MODULE_NAME_FOR_DYNAMIC_MODULES)
```
Let me know if it is OK for you this way.
I could set `MODULE_NAME_FOR_DYNAMIC_MODULES` as default value, so that you could instead obtain the path with:
```
dynamic_modules_path = datasets.load.init_dynamic_modules()
``` | **Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
This is an awesome library.
It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import.
I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
`datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case.
By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently):
https://github.com/huggingface/blog/issues/106
https://github.com/huggingface/transformers/issues/11565
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
| 63 | [api request] API to obtain "dataset_module" dynamic path?
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
This is an awesome library.
It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import.
I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
`datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case.
By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently):
https://github.com/huggingface/blog/issues/106
https://github.com/huggingface/transformers/issues/11565
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
Hi @richardliaw,
First, thanks for the compliments.
In relation with your request, currently, the dynamic modules path is obtained this way:
```python
from datasets.load import init_dynamic_modules, MODULE_NAME_FOR_DYNAMIC_MODULES
dynamic_modules_path = init_dynamic_modules(MODULE_NAME_FOR_DYNAMIC_MODULES)
```
Let me know if it is OK for you this way.
I could set `MODULE_NAME_FOR_DYNAMIC_MODULES` as default value, so that you could instead obtain the path with:
```
dynamic_modules_path = datasets.load.init_dynamic_modules()
``` | [
-0.1038031429,
-0.2795982659,
-0.1310286522,
0.0527427234,
0.3254469037,
-0.2634875178,
-0.0613951944,
0.1563363969,
-0.2127551734,
0.3393892348,
-0.0749454126,
0.7778300643,
-0.4725227654,
0.3166540861,
0.2836634815,
-0.4223525226,
-0.1075098291,
0.0503051355,
-0.2626202703,
0.0036109788,
-0.1428720057,
0.2316275239,
-0.0847827047,
0.2267729342,
0.0757526904,
-0.2109442949,
-0.0228328519,
0.0175174568,
-0.13803792,
-0.3746133447,
0.2695265412,
0.1497002393,
0.2535260618,
0.2199822515,
-0.0001094077,
0.0686420724,
0.0977334306,
-0.062191695,
-0.3850555718,
-0.5734552741,
0.1486316621,
-0.1373896748,
0.1928837597,
-0.2899369299,
-0.0638164729,
-0.2744382024,
-0.0536290407,
-0.7661021948,
0.2912877202,
0.0633065403,
0.2035725862,
0.3836927712,
-0.2115833014,
0.0141163021,
0.0111684902,
0.2845669687,
-0.1351315379,
-0.1789134741,
0.1712045223,
0.1474252939,
-0.0069579259,
0.271831274,
-0.083659485,
0.1184937954,
0.5701005459,
0.0921338797,
-0.4181140661,
-0.0629473701,
0.1164076775,
0.3929318488,
0.4341736436,
-0.4605734646,
-0.3385896087,
-0.3974281251,
-0.2387157381,
-0.1298529953,
0.1684208959,
0.154124245,
-0.2948129773,
0.1381618977,
0.0280635729,
-0.1709857285,
-0.2388431728,
-0.0365589634,
0.1353721917,
0.0721853748,
0.0338097215,
0.0492583886,
0.2138145864,
-0.2562360466,
0.2530489862,
0.0001353788,
0.1630685925,
0.3501802981,
-0.1332852095,
0.0437955335,
0.2593631744,
0.008187131,
0.0949193165,
0.1528408527,
0.0803343132,
0.0710573867,
-0.1307507604,
-0.0033430292,
0.1743543893,
-0.0688318387,
0.1667060852,
0.2662460804,
0.0422716625,
0.2100567073,
0.094390519,
-0.013965955,
-0.0658001006,
0.1337999105,
-0.0473945178,
-0.0295376461,
0.0953879803,
0.1512425989,
-0.1286314279,
-0.2675001025,
-0.3199116886,
-0.2002335638,
0.3884598315,
0.5135529637,
-0.0828723833,
0.086312212,
0.2151857316,
-0.2800036967,
0.1129067168,
0.0486184657,
-0.1234718934,
0.1900314242,
-0.1880220622,
0.1826995164,
0.1336835325,
-0.1558955312,
0.3612343371,
-0.2448183149,
0.2501979768,
-0.0375418961,
0.1097566262,
0.2115217894,
0.2910250723,
0.0866851658,
-0.0058064018,
-0.0145472148,
-0.2215721607,
0.1193017662,
-0.4832940102,
0.0427651331,
-0.2613914013,
-0.4978815317,
0.0284057427,
0.1506858021,
-0.1773407459,
-0.1017164513,
-0.2653222084,
0.1563616991,
-0.352812022,
0.0960060284,
-0.0530510098,
0.0474219806,
-0.2700791359,
-0.1650849432,
0.2739585936,
0.349960357,
-0.0629198924,
-0.2511386573,
0.0323059335,
0.0200774428,
-0.17057015,
-0.0503631756,
-0.4809821844,
0.2172010839,
-0.1995638907,
0.1118905768,
0.4243353307,
-0.3662734628,
0.1924601495,
-0.0459740683,
-0.0592180528,
-0.2813164592,
0.0999207422,
-0.0642259642,
0.0895034522,
0.0366245918,
0.1906102151,
0.4679451287,
0.2107551843,
-0.0519935079,
0.0623167269,
-0.4383767843,
-0.1321051866,
0.0569137745,
0.0535729937,
-0.0980876535,
0.042050533,
-0.0495756231,
0.500516057,
-0.0934974402,
-0.0479237698,
0.2800540328,
0.2826189399,
0.2624942958,
0.2190205604,
-0.465849787,
-0.1698426753,
0.2003216296,
-0.1806830317,
0.0048468569,
-0.2005129606,
-0.1883306503,
0.0107187247,
0.2374990135,
0.0430152677,
0.2332791239,
0.1127445251,
-0.0729940608,
-0.0062706177,
-0.0852661133,
-0.4607100487,
0.0859270319,
-0.2912902236,
0.1009319425,
-0.2687895894,
0.2666111887,
0.1665556431,
0.0113882916,
-0.0941925868,
0.3063884974,
0.0804972127,
-0.1595148146,
0.066316478,
0.185328275,
0.1383259892,
0.1945547909,
-0.0541788004,
0.4117592275,
0.1305963397,
-0.0497928746,
0.1247767732,
-0.1700548381,
0.0635827482,
0.3343411088,
0.2617125809,
0.4313470721,
-0.3116959333,
0.3364182413,
0.2746247351,
0.18481417,
0.2339008749,
-0.0022996948,
-0.309055686,
-0.0668610036,
0.1055624634,
0.1788022965,
0.0232150462,
-0.2177971005,
-0.2678334713,
0.1311534047,
0.2675947845,
0.0370153226,
-0.0143409707,
-0.0825005844,
-0.122253105,
0.0992905274,
0.143124193,
0.4640807509,
0.2016623467,
0.3723675013,
-0.0311848354,
0.1035141274,
-0.1654465795,
0.0827460736,
0.5085879564,
0.5266928673,
0.0420887619,
-0.3552269638,
-0.0315019116,
0.076544717,
-0.1907279044,
-0.364616394,
-0.1555596888,
-0.0587806925,
-0.3679341376,
0.2199699879,
-0.4546754062,
-0.0473186113,
-0.6218672395,
-0.5643892884,
0.017871609,
0.1321030855,
-0.0603952371,
-0.3999854326,
-0.1962896734,
0.1978437603,
0.0772585198,
0.2225198001,
-0.2102825493,
-0.558354497,
-0.0730557367,
-0.1039896458,
-0.1112964153,
-0.0039004048,
0.1009964943,
0.1162628978,
0.458959192,
-0.0660963953,
0.1545369327,
-0.2830373943,
-0.2296130061,
0.420738101,
0.0460111015,
0.0739227161,
0.3897779286,
0.0098354667,
0.2122609913,
-0.1580737382,
0.0767082199,
-0.0547339581,
-0.1132118031,
-0.3992925286,
0.0876094848,
0.0643573552,
-0.0876137614,
-0.3364674151,
-0.2850174606,
-0.240459621,
0.131691128,
0.0220054109,
0.3412693739,
0.3866494596,
0.0774681643,
0.1976980418,
-0.397213459,
0.3130905926,
-0.0743632466,
-0.0252560563,
0.1658191681,
-0.0637144819,
-0.24791798,
0.1867426783,
-0.1397674233,
0.3825793862,
0.2226332873,
-0.1746671796,
-0.5577776432,
0.0760997236,
0.378372848,
-0.115717575,
0.157143265,
0.4352732003,
0.3465405107,
-0.0645106286,
-0.0938568711,
-0.6340901852,
0.3788374364,
-0.0431328006,
0.1673587114,
0.251047492,
0.3467084169,
0.17774418,
0.7528583407,
-0.1817518324,
-0.4236459434,
0.0311468299,
-0.1504568309,
0.1973707527,
0.286896348,
-0.2159772813,
-0.3330319822,
-0.2381712198,
-0.083450824,
0.0249342024,
0.1799412668,
-0.0035558257,
-0.2561035752,
-0.0242584832,
-0.0254069306,
-0.2009700835,
-0.0610163398,
0.1494753212,
0.4692338705,
0.2079647034,
0.2638306618,
-0.4698410928,
0.0571562424,
0.2276513726,
0.1129221991,
0.0671467409,
0.0289809313,
-0.0694197044,
-0.0837765783,
-0.0307623763,
0.21286048,
0.2331226319,
0.0638220087,
0.0785245895,
-0.0474785045,
0.3579792082,
0.0862001404,
0.3167369664,
0.425216794,
-0.1599023044,
-0.1514635384,
-0.2411319464,
-0.0701694787,
0.0445041098,
-0.0267583337,
0.0390935168,
0.1133592352,
0.3360707164,
-0.2208690792,
-0.4445346594,
0.083248131,
0.1801421344,
-0.1273141503,
0.0432912856,
-0.1254708618,
-0.6150271297,
-0.1043440178,
-0.1816942096,
0.1410345584,
0.2752097845,
0.369734019,
-0.1323629022,
0.0107321041,
-0.1800207049,
0.1455291212,
-0.0918155536,
0.4292841256,
0.0462660193,
0.2616250813,
0.3307574093,
0.4209098816,
-0.2178491503,
0.2163701355,
-0.354798615,
-0.0497570559,
-0.1411772668,
0.2359576523,
0.0529505573,
0.4503339231,
-0.0923175141,
0.5791481733,
0.3868656754,
-0.0814832076,
-0.3159942031,
0.0603876486,
0.1594023854,
-0.0859969407,
0.117136389,
-0.8254061937,
0.77359128,
-0.0561267473,
-0.2654656768,
0.4140824974,
0.3090522885,
-0.4338613749,
0.0631650612,
0.5055971146,
0.8474008441,
0.0751850381,
-0.0753182024,
0.4453958571,
-0.4670104682,
0.2378029972,
0.2643934786,
0.1760014296,
-0.2317068726,
0.260717541,
-0.1877785623,
-0.1911850572,
0.0461389013,
-0.234116599,
0.2179816067,
0.1462668478,
0.4515357614,
0.1433022171,
0.1041423678,
0.2537241578,
-0.0849176645,
-0.3625347614,
-0.450655669,
0.0646407902,
-0.1980615109,
0.0823965445,
0.0796021298,
-0.3622606695,
0.1989403516,
-0.2618862689,
-0.0911207348,
-0.3854851723,
-0.61595577,
0.308927238,
0.4366488457,
-0.2593920231,
0.2312401682,
0.0309974644,
-0.0144270137,
0.0217798185,
-0.3404828906,
0.3322180808,
-0.1413487792,
-0.260507673,
-0.1024760008,
0.0596324839,
0.2745764554,
-0.0274847411,
-0.0314291082,
0.0980975628,
-0.1036352068,
-0.162820816,
-0.1983736157,
0.235234499,
0.4340154529,
0.0471854024,
0.2335908562,
0.2397925258,
0.4019860625,
0.0107305562,
0.1145024076,
0.1893707365,
-0.1899371743,
0.2291092128,
0.2565892935,
0.0498801619,
-0.0817738846,
0.325864315,
-0.0360978656,
-0.3304718733,
0.4503823221,
0.0344173163,
-0.1876458824,
-0.073385641,
0.0844618529,
-0.1419012249,
-0.3722991943,
0.1286988854,
0.1330620348,
0.0027372809,
0.0227730535,
0.2405533642,
0.1204589084,
-0.2028245777,
-0.4959561229,
0.0500295348,
-0.0993116871,
0.2616819739,
-0.487293601,
0.1782850325,
0.046683915,
0.1094489172,
-0.1473509073,
-0.2423119843,
-0.3322330415,
0.1697494686,
0.0756279975,
-0.2347112894,
-0.0099392068,
-0.0483514853,
0.1035883352,
0.0196101535,
0.0206690039,
-0.1674185693,
-0.3417090178,
-0.1054177806,
-0.2636520863,
0.1290740222,
-0.2934762537,
0.2898747325,
-0.2584206164,
-0.4429606497,
-0.3115536869,
-0.0917406678,
-0.1657721102,
0.2544406354,
0.0165202972,
-0.290993154,
-0.1005766392,
-0.1820680946,
-0.1897601187,
0.1860293001,
0.0641117543,
0.1085284501,
0.3473661244,
0.3174050748,
-0.1919297576,
-0.1394945979,
0.0671386644,
0.2283727378,
0.0205006041,
-0.2499940097,
0.2506267726,
-0.0182589572,
-0.2987316549,
0.1155870408,
0.2533139884,
0.0698423162,
-0.186219573,
0.0248391423,
0.3518085778,
0.1476496011,
-0.2163860202,
-0.1372430176,
-0.1596528143,
0.0277288761,
0.1589305252,
0.4751010239,
0.3294624984,
0.0446884222,
0.2192897946,
0.1590889245,
0.4575741887,
-0.0840181783,
-0.0202970374,
0.2867110968,
0.1116617844,
0.0987733305,
0.321660161,
0.4595405757,
0.4684458971,
0.3703983426,
-0.4155921042,
0.6599219441,
0.0969220027,
-0.1093712747,
0.002111831,
-0.2432088107,
0.098954089,
-0.0209327694,
0.1255946755,
-0.0371266045,
-0.1475567073,
0.6019271016,
-0.3544939458,
0.167101711,
-0.2633249164,
0.1947572231,
0.0336235724,
-0.1714271009,
-0.0108013088,
-0.2624393404,
-0.3131429851,
-0.1437803805,
0.3506454527,
-0.2271127254,
0.0382730253,
-0.2672572732,
0.1363357902,
-0.0091723427,
-0.2429692298,
0.2316109538,
0.0077915965,
-0.2223392576,
-0.0314067341,
0.0286649261,
-0.1828944683,
0.0107149994,
-0.0349057801,
0.0410913043,
0.1311830729,
-0.1510450542,
-0.070830442,
0.0141316131,
0.0545672998,
0.0197320748,
-0.0278934557,
-0.1538020372,
0.3528766036,
0.3085983098,
0.0975340679,
-0.1188480332,
-0.0774691999,
0.0332266688,
0.3475905359,
-0.3083324134,
0.6529902816,
0.0617268793,
0.1379267722,
-0.1629933417,
0.0113348225,
-0.3320842683,
0.0655082464,
0.241477564,
-0.1651802808,
-0.096070461,
0.0734678134,
0.0696212053,
-0.017302407,
0.2345876843,
0.13162826,
0.2944737077,
0.0163609162,
-0.0926445499,
-0.4293481708,
-0.2535049915,
0.2615558207,
-0.1690462381,
0.1274644434,
0.0533077978,
0.2237372547,
0.0018431324,
0.1508226842,
-0.2255040705,
0.1424330175,
-0.015666144,
-0.2573007047,
-0.1917875111,
0.0597269125,
0.0831738189,
0.0479984917,
-0.0525406674,
-0.2635934949,
-0.2478507757,
-0.0997065455,
-0.3285040557,
0.1265522242,
0.1037201881,
-0.3290539384,
0.2502280176,
-0.142730251,
-0.0076585435,
0.0810542852,
0.1488345265,
-0.2445702255,
-0.0470977314,
0.0523999147,
-0.298712492,
0.1247969493,
0.163040489,
-0.1211846322,
-0.2223834842,
-0.4487820864,
0.0580842309,
0.2074415833,
0.0270476416,
-0.1167501658,
0.1439335495,
-0.4063351452,
0.0288873911,
0.1521339118,
0.1841322184,
0.0181778278,
0.1298267245,
-0.2700928748,
-0.2129981369,
0.7706228495,
-0.6101859212,
-0.1864350289,
-0.0291619059,
0.3387092054,
0.1310015172,
-0.0895151943,
-0.6234186888,
-0.0783440545,
0.2426124662,
-0.1379646361,
0.0024244662,
0.1277173311,
-0.1117192432,
0.1759684682,
-0.08842545,
-0.2251722217,
0.0719397515,
-0.074723348,
-0.1060912907,
-0.1518385261
] |
https://github.com/huggingface/datasets/issues/2318 | [api request] API to obtain "dataset_module" dynamic path? | Hi @richardliaw, the feature is on the master branch and will be included in the next release in a couple of weeks. | **Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
This is an awesome library.
It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import.
I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
`datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case.
By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently):
https://github.com/huggingface/blog/issues/106
https://github.com/huggingface/transformers/issues/11565
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
| 22 | [api request] API to obtain "dataset_module" dynamic path?
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
This is an awesome library.
It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import.
I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
`datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case.
By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently):
https://github.com/huggingface/blog/issues/106
https://github.com/huggingface/transformers/issues/11565
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
Hi @richardliaw, the feature is on the master branch and will be included in the next release in a couple of weeks. | [
-0.127039969,
-0.2253050208,
-0.1368042678,
0.1205857098,
0.2940101326,
-0.3005486727,
-0.0833771154,
0.1747500002,
-0.2136731446,
0.3675939441,
-0.0689019337,
0.7768820524,
-0.4621844292,
0.3776901066,
0.2999123037,
-0.4458759129,
-0.0975355133,
0.0067401747,
-0.3226865232,
0.0176408049,
-0.1013595313,
0.2357003391,
-0.0494803563,
0.2150379419,
-0.0331281684,
-0.227106303,
-0.0215990171,
-0.0324077792,
-0.2154183537,
-0.3063219488,
0.2938253582,
0.0977496579,
0.2419460863,
0.2549488544,
-0.0001097169,
0.0399274267,
0.0869920626,
-0.0253265835,
-0.3892132044,
-0.5852143764,
0.0869912505,
-0.0527438894,
0.2232042402,
-0.2114181817,
-0.0571549758,
-0.228636384,
-0.0388012081,
-0.7245182991,
0.3127937317,
0.0970968902,
0.1863785535,
0.3525508046,
-0.2461273819,
-0.0608689114,
0.0263192803,
0.3660177886,
-0.1790619493,
-0.2231058627,
0.2439689189,
0.1758068502,
-0.0902159289,
0.2793929577,
-0.0147101022,
0.0854094028,
0.575478673,
0.0873528421,
-0.5218419433,
-0.0078822002,
0.139822647,
0.4570408762,
0.4978519678,
-0.454865396,
-0.312494874,
-0.3435848057,
-0.2102578878,
-0.0611947998,
0.2432986349,
0.1618668735,
-0.3192090988,
0.1748106033,
0.0064419066,
-0.2058245093,
-0.296787262,
-0.0477679856,
0.1724844277,
0.0452363677,
0.0128457053,
0.0101399887,
0.2376514822,
-0.233512193,
0.2568749487,
-0.00877201,
0.1329410523,
0.3248985708,
-0.1687447727,
-0.0509650521,
0.2447003722,
0.0347741358,
0.122637473,
0.1836775541,
0.1095808372,
0.1045256928,
-0.2002751082,
0.0051322198,
0.2168013453,
-0.0542634688,
0.1683605015,
0.1642330289,
0.0437152199,
0.1569668949,
0.0752830207,
0.003623462,
-0.0262984224,
0.2485636026,
-0.1683987826,
-0.0684604868,
-0.0536361486,
0.0930320174,
-0.0980264246,
-0.2727897465,
-0.2284814864,
-0.2464374602,
0.4020056427,
0.518979013,
-0.0103531526,
0.0032723118,
0.1346751451,
-0.3061784506,
0.1540815234,
0.0342514701,
-0.1328786761,
0.1700688154,
-0.1964594424,
0.2172747254,
0.1251199841,
-0.1617825329,
0.3757392764,
-0.2147462219,
0.2080121934,
-0.014688327,
0.1403801888,
0.2258153111,
0.3021261692,
0.0561961979,
0.0005968533,
-0.0795302689,
-0.196061492,
0.1319361329,
-0.4790399075,
0.0572811477,
-0.2756035924,
-0.5086493492,
-0.0531342663,
0.1233094558,
-0.1517892182,
-0.1602444053,
-0.2275241017,
0.2502957582,
-0.4091587663,
0.0668222979,
-0.0462650694,
0.1205807626,
-0.2515666187,
-0.1417646408,
0.1624893546,
0.3191628456,
-0.0573723614,
-0.2667973638,
0.0106134424,
0.0205451511,
-0.2142791748,
0.0149705736,
-0.4976261854,
0.1595588773,
-0.2514202595,
0.2069935501,
0.4655231237,
-0.3496896625,
0.1979121417,
-0.0496316701,
-0.1205595136,
-0.3511762917,
0.142315641,
-0.0178618226,
0.0505461022,
0.0221118517,
0.1919240803,
0.4152482152,
0.183377102,
-0.0652411729,
0.1088488996,
-0.504827559,
-0.1916041523,
0.0347428285,
-0.0281983539,
-0.111048691,
0.1313600093,
-0.074834466,
0.4719242454,
-0.1286291927,
-0.0647889823,
0.2573928833,
0.2756946385,
0.2501275837,
0.1638351381,
-0.5089276433,
-0.1832372248,
0.134511441,
-0.2234826386,
0.0207617134,
-0.1253190339,
-0.2170521915,
0.0546782054,
0.2268897891,
0.1063442677,
0.2143797427,
0.0887199491,
-0.0532279983,
-0.0198468175,
-0.0994885415,
-0.5061226487,
-0.0065900953,
-0.3069562912,
0.1298154593,
-0.2599501312,
0.263589561,
0.1946104914,
0.0440869294,
-0.0445733629,
0.2768558562,
0.0326317362,
-0.1502077878,
0.0656057671,
0.1314017028,
0.1356821656,
0.1755420566,
0.0802519768,
0.4977858365,
0.1447061002,
-0.0500527658,
0.168935746,
-0.2226334959,
0.0165572204,
0.298940748,
0.1698879153,
0.3969590068,
-0.2993734777,
0.3082689643,
0.274392575,
0.1710945219,
0.2389400154,
0.0241719689,
-0.2681675255,
-0.0689971894,
0.1494843066,
0.146972388,
0.0204165727,
-0.1865818202,
-0.2366633713,
0.1510696262,
0.3428982794,
0.0796979964,
0.0229510795,
-0.0155316908,
-0.150682047,
0.0635259822,
0.1780982167,
0.4427554905,
0.2015547752,
0.384031266,
-0.034234982,
0.0657879636,
-0.14357467,
0.0426155962,
0.4801453948,
0.4844024777,
0.0477026626,
-0.3410339355,
-0.0674035773,
0.066958949,
-0.3018417656,
-0.3176436126,
-0.1428513229,
-0.0518544652,
-0.2832365036,
0.1495361924,
-0.4663022161,
-0.0819150135,
-0.657181263,
-0.4793886542,
-0.009638953,
0.1438780427,
-0.0076336418,
-0.4043319225,
-0.2307161391,
0.1738909781,
0.0714421943,
0.3288937211,
-0.2518240213,
-0.5264749527,
-0.1142661199,
-0.0889326856,
-0.1420900822,
0.0081492094,
0.1766563356,
0.1147660539,
0.4805982411,
0.0131507609,
0.2469647825,
-0.361704886,
-0.3256876767,
0.4542027116,
0.0781987011,
0.0940469652,
0.3639711738,
-0.0134567656,
0.1510279775,
-0.1486556083,
0.0746757612,
-0.0454936847,
-0.1230117604,
-0.4061352015,
0.1090996191,
0.0852030814,
-0.057917349,
-0.3914550245,
-0.2709728479,
-0.2069479525,
0.1916269064,
-0.0289173033,
0.3386311531,
0.3339795172,
0.0931619257,
0.2643853426,
-0.4949844182,
0.2537980378,
-0.1022891402,
-0.0478171781,
0.1019315124,
-0.0608181506,
-0.2543380857,
0.1836874336,
-0.1126871035,
0.3660379052,
0.174180612,
-0.2480427325,
-0.53723979,
0.0946133733,
0.4121118784,
-0.0586608574,
0.1167088449,
0.491866678,
0.3178732395,
-0.0698464438,
-0.074487038,
-0.6162248254,
0.3979555368,
-0.0852421075,
0.2072375715,
0.223378852,
0.3112290502,
0.1901506484,
0.7600679994,
-0.1596224457,
-0.4256860614,
0.0601218864,
-0.1740733683,
0.2207667381,
0.2339054197,
-0.2157910615,
-0.2629828453,
-0.2709939182,
-0.0954692662,
0.0814521685,
0.2104848623,
0.0039518625,
-0.2497094125,
-0.0238258578,
0.0264837816,
-0.1686853468,
-0.0031426081,
0.1982590407,
0.402505964,
0.2280313224,
0.2561767399,
-0.4469820261,
0.0559054539,
0.2370325774,
0.1111935079,
0.1208501831,
0.0199224222,
-0.1564545631,
-0.1482173651,
-0.0050319731,
0.2213247418,
0.2344179749,
0.0478564613,
-0.0084202718,
-0.0040331371,
0.3566389382,
0.1168896481,
0.3550272882,
0.3904075623,
-0.2318370491,
-0.2277100533,
-0.2749608755,
-0.0112794228,
0.129137367,
-0.0172639508,
0.0635051578,
0.0876657069,
0.4194373786,
-0.1899556518,
-0.4452039301,
0.1105926931,
0.0996981338,
-0.0870779231,
0.0365876369,
-0.0436145216,
-0.5624926686,
-0.0576421022,
-0.1527360529,
0.1215314493,
0.2176290601,
0.3544305563,
-0.1924736798,
0.0319263674,
-0.1500059664,
0.105028443,
-0.1843227148,
0.40258044,
0.0508521199,
0.2276389003,
0.3149356842,
0.4919924438,
-0.1902744323,
0.1715235114,
-0.3597538769,
0.0065761874,
-0.0965788811,
0.2052886635,
0.1015693098,
0.4806382358,
-0.0325955637,
0.5874006152,
0.4865576923,
-0.0947549716,
-0.2769836485,
0.0323534869,
0.1581469625,
-0.0775584951,
0.1104384437,
-0.7509756684,
0.8524295688,
-0.0180821307,
-0.2312948555,
0.4544399381,
0.2854153812,
-0.3982000053,
0.0301440991,
0.5078801513,
0.8721262217,
0.1242513061,
-0.0376911797,
0.4104700983,
-0.4999959171,
0.3050887883,
0.1763007194,
0.1813926548,
-0.252594322,
0.2059393674,
-0.2253313214,
-0.2310684174,
0.0554066226,
-0.2109215558,
0.2230186909,
0.0626590773,
0.4559386969,
0.296880722,
0.1157771721,
0.2567672729,
-0.1493418217,
-0.3624577522,
-0.4080196321,
0.0696041808,
-0.1638593227,
0.0116396882,
0.0695645437,
-0.4029487967,
0.1844186783,
-0.2217806727,
-0.1294149011,
-0.4136714935,
-0.6379287243,
0.2743672729,
0.4318448901,
-0.2715862095,
0.2260096222,
0.0433892235,
-0.0286397412,
0.0123943146,
-0.3978767395,
0.3720239103,
-0.2066401243,
-0.2087383717,
-0.0821841285,
0.0223548673,
0.3002607524,
-0.078779988,
-0.0408403836,
0.0990629941,
-0.1257716566,
-0.241229251,
-0.2255233228,
0.2224192321,
0.3901083171,
0.0331855975,
0.2292698622,
0.2431900352,
0.369035542,
-0.0099198362,
0.102027148,
0.191451937,
-0.1580658555,
0.2423636317,
0.3357068002,
0.072722353,
-0.1312859356,
0.3530756831,
-0.0332527496,
-0.3652001619,
0.403472662,
0.0571375415,
-0.1780077517,
-0.1003580987,
0.0797295421,
-0.0782629624,
-0.3799107373,
0.1269380897,
0.0823453441,
-0.095190987,
0.0366906524,
0.2173465043,
0.1455173194,
-0.1780808568,
-0.5291551948,
0.044687029,
-0.1042073071,
0.2746505439,
-0.5229538083,
0.2043562531,
0.0394084789,
0.0369304903,
-0.1375303566,
-0.1906042248,
-0.321754545,
0.1310564876,
0.1074657664,
-0.231484279,
0.0065802713,
0.014916948,
0.1272592694,
0.0509819612,
-0.020002665,
-0.079056561,
-0.3563222289,
-0.0998894647,
-0.2363279909,
0.1352293938,
-0.270596087,
0.3342073858,
-0.2743696272,
-0.392601043,
-0.3475574255,
-0.080092445,
-0.192757681,
0.1803083718,
0.0111981416,
-0.3118945956,
-0.1191645637,
-0.2543961704,
-0.1364376545,
0.2073964328,
0.1417257637,
0.1169022918,
0.3541045487,
0.2619064152,
-0.2186807245,
-0.1539200693,
0.106528081,
0.2579852045,
0.0185768884,
-0.2296196818,
0.2262380868,
-0.018071441,
-0.3451120257,
0.1336898357,
0.2566277385,
0.0240583438,
-0.1453650743,
0.0515605137,
0.395296663,
0.1313834488,
-0.17985259,
-0.1597664505,
-0.1133292019,
0.0490255021,
0.1101579368,
0.4035381377,
0.3108299673,
0.0815984681,
0.265083611,
0.1428496391,
0.4174601734,
-0.0878799334,
0.032531064,
0.2982436717,
0.0801319554,
0.0813429281,
0.3302181661,
0.4191919565,
0.4734618366,
0.4140081108,
-0.415504992,
0.687677145,
0.083293654,
-0.1216451302,
0.0012817249,
-0.2178994715,
0.0898940787,
0.0082715703,
0.1344251633,
-0.0401978344,
-0.1357735395,
0.6071434021,
-0.3177060187,
0.1087906808,
-0.3577255011,
0.2070798725,
-0.0203851983,
-0.1085223109,
-0.0752280653,
-0.3105895519,
-0.2112381011,
-0.0754498169,
0.3396892846,
-0.1315982044,
0.0607939512,
-0.2724493146,
0.137793377,
-0.0065007466,
-0.19320786,
0.2700699866,
-0.0457600206,
-0.1384177804,
0.0202918258,
0.0021978156,
-0.1543734819,
0.0738035664,
-0.0091059823,
-0.0112821059,
0.1025682539,
-0.0627627,
-0.082838513,
-0.0517353304,
0.0369272828,
0.0181662962,
0.0122514647,
-0.1111307815,
0.2796797752,
0.3424681127,
0.0743123516,
-0.0894782022,
-0.0241071321,
-0.0020484163,
0.3875118196,
-0.3623111248,
0.5390934944,
0.0565109998,
0.0931210071,
-0.1340158731,
-0.0465817824,
-0.2787456512,
0.0764467046,
0.2130422741,
-0.2068957835,
-0.1263849288,
0.0543923713,
0.0693987831,
-0.0372722708,
0.3193172216,
0.1211504042,
0.2074970454,
0.029743176,
-0.1358014345,
-0.4270624816,
-0.2781207263,
0.3304319084,
-0.1402630955,
0.0962634534,
-0.0102871554,
0.2111392766,
0.0173727721,
0.1982534677,
-0.2382511795,
0.2866846621,
-0.014027481,
-0.3081609309,
-0.1660574079,
0.0965939388,
0.0895441398,
0.0552214719,
-0.0357670859,
-0.220484063,
-0.1086995974,
-0.1243984327,
-0.3356561661,
0.1046067923,
0.0272724591,
-0.3417004347,
0.3023061156,
-0.0926135853,
-0.0048267324,
0.0784269646,
0.2078556865,
-0.2367387265,
-0.0439939685,
0.0392095037,
-0.3017889857,
0.124068439,
0.1988803595,
-0.1457273066,
-0.2062166631,
-0.4280423224,
0.0671988875,
0.1955479085,
0.0422180779,
-0.1168777719,
0.1359471083,
-0.4302161634,
-0.0137938419,
0.2242738008,
0.1927511543,
0.068733573,
0.1144160926,
-0.2228598148,
-0.1458037198,
0.7569944859,
-0.6280466318,
-0.1650453806,
-0.0156987254,
0.2915218174,
0.1642670184,
-0.1685463339,
-0.6236016154,
-0.1161718071,
0.1995684057,
-0.107071124,
0.0781650096,
0.1628121734,
-0.1534250081,
0.1962372065,
-0.0869595185,
-0.1758800298,
0.1021916121,
-0.103890717,
-0.0632886663,
-0.1314676106
] |
https://github.com/huggingface/datasets/issues/2308 | Add COCO evaluation metrics | Hi @NielsRogge,
I'd like to contribute these metrics to datasets. Let's start with `CocoEvaluator` first? Currently how are are you sending the ground truths and predictions in coco_evaluator?
| I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively).
Running these in a notebook gives you nice summaries like this:
![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png)
It would be great if we could import these metrics from the Datasets library, something like this:
```
import datasets
metric = datasets.load_metric('coco')
for model_input, gold_references in evaluation_dataset:
model_predictions = model(model_inputs)
metric.add_batch(predictions=model_predictions, references=gold_references)
final_score = metric.compute()
```
I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier.
However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
| 28 | Add COCO evaluation metrics
I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively).
Running these in a notebook gives you nice summaries like this:
![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png)
It would be great if we could import these metrics from the Datasets library, something like this:
```
import datasets
metric = datasets.load_metric('coco')
for model_input, gold_references in evaluation_dataset:
model_predictions = model(model_inputs)
metric.add_batch(predictions=model_predictions, references=gold_references)
final_score = metric.compute()
```
I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier.
However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
Hi @NielsRogge,
I'd like to contribute these metrics to datasets. Let's start with `CocoEvaluator` first? Currently how are are you sending the ground truths and predictions in coco_evaluator?
| [
-0.309964776,
-0.2109861821,
-0.0590806678,
0.0364998505,
0.1357953995,
-0.128011927,
0.0327848941,
-0.1446953267,
-0.2019299418,
0.1269809604,
-0.682729125,
0.123969458,
-0.1395808607,
0.1238020509,
-0.2454463989,
-0.0975499526,
-0.004918267,
-0.0187487733,
-0.2175132483,
0.1276487857,
0.063715674,
0.1212181374,
0.2470148504,
0.1320974827,
-0.2228357792,
-0.1528723091,
-0.2780014873,
-0.3175077736,
-0.1612353027,
-0.3200708926,
0.3088330626,
0.45872733,
0.2178370357,
0.382897228,
-0.0001260293,
0.1676148027,
0.0120115653,
0.0352619365,
-0.0486765765,
-0.0712401718,
0.0626681149,
-0.3141658604,
0.2967295647,
-0.1566160619,
0.2011529654,
-0.0271208547,
-0.1151304469,
0.0279612485,
0.396006763,
0.0947099552,
0.0307991747,
0.1865345687,
-0.012999434,
-0.0139083387,
-0.3567222357,
0.3218268156,
-0.3141762912,
0.3093025088,
0.0804276317,
-0.1705964059,
-0.1404986233,
0.1835095584,
0.3468075097,
-0.102747649,
0.5674600601,
0.0961444229,
0.4028461277,
-0.3214428723,
-0.4800128043,
0.1687448472,
0.1818925291,
-0.2496028692,
-0.5749028921,
-0.356510371,
-0.1467402279,
-0.3485467434,
-0.4368963242,
-0.0716116056,
-0.108431831,
0.2087447196,
-0.3374733627,
-0.0290726442,
-0.2903193235,
-0.0355792567,
-0.0136552304,
0.3278526664,
0.1791388988,
-0.1927567273,
0.3886847496,
-0.0898672938,
0.3580980003,
-0.2984928489,
0.1656741947,
0.058015313,
-0.2435355335,
-0.2330769449,
0.2841909528,
0.1397181302,
-0.0865409598,
0.0263524745,
0.2919554412,
0.0951311812,
-0.2298983186,
0.1196047664,
0.1383742988,
0.5930799842,
0.0786545128,
0.6068125367,
0.1705242246,
0.3567250073,
0.0604415834,
0.0098071834,
0.2361741364,
0.1867910326,
0.0879573822,
0.1499001682,
-0.1823438555,
-0.2842318416,
-0.1777069122,
0.1698993146,
0.0837592259,
-0.0746154338,
0.2970549762,
0.4641896486,
-0.1873853058,
0.4703546166,
-0.0868341997,
-0.0211212691,
0.0057173045,
0.0514905341,
-0.0179805309,
0.3525492251,
-0.276494503,
0.0843371674,
0.1849099994,
0.1202507392,
-0.0409352146,
-0.5112408996,
0.7779880166,
-0.3419730663,
-0.1739483178,
-0.3053330481,
0.3040140271,
0.2109250724,
-0.070605576,
-0.2278835773,
0.0287680235,
-0.2351468354,
-0.2879241109,
-0.2090798914,
-0.0509462096,
-0.2891755104,
0.141069591,
0.0335555226,
-0.5960392952,
0.1051090583,
-0.2373934984,
0.5540140867,
-0.3729888499,
0.1248558611,
-0.0895775631,
-0.2057230622,
-0.1545008719,
-0.0026388869,
0.2828232646,
0.2545710802,
-0.1710276455,
-0.2035299242,
-0.0960078016,
-0.2274879813,
-0.1596029401,
0.2408808023,
-0.0294253044,
0.2013360709,
0.1114365458,
0.0861903355,
0.1921634972,
-0.7362811565,
-0.1907059997,
0.039125517,
0.2540969551,
0.2841353416,
-0.0689087585,
0.31820032,
0.1190396175,
-0.1914614439,
-0.1278437376,
0.4185301363,
-0.0923450887,
-0.2677815259,
-0.1036558002,
0.0313860998,
0.1740297377,
0.1357136667,
0.4682198465,
-0.1663039029,
0.1012139544,
0.0368285775,
-0.207832247,
-0.317837745,
-0.2059401721,
-0.0450444818,
0.327496171,
-0.0367590562,
0.0985478759,
-0.2202028036,
-0.5051130056,
0.1482055336,
-0.1031735614,
0.1890637726,
0.1133555621,
-0.3304755092,
-0.0975145176,
0.4347307384,
-0.0014060243,
-0.1480621696,
0.0224587899,
-0.1518130749,
0.2043612897,
-0.0263484009,
-0.1034106985,
0.1999192685,
0.0833177194,
0.2868765891,
0.4424616694,
0.3334581256,
-0.0577460639,
0.1427788734,
0.1259189695,
0.4548035562,
-0.0623297729,
-0.0239388589,
0.0574870035,
0.3577262759,
-0.0979780778,
0.2656300962,
0.2493121475,
0.5448930264,
0.1440553069,
-0.3306064606,
0.1368445307,
-0.0180836376,
0.0213610772,
-0.0567231402,
-0.0132995313,
0.7422035336,
0.0734466612,
0.4684187472,
0.1045975015,
-0.1195818484,
0.0420060493,
0.0761805475,
-0.2893476188,
-0.3267186582,
0.1725263149,
-0.2551748753,
0.1510014683,
-0.118014358,
-0.0232433863,
-0.0939324945,
-0.15334782,
-0.136505574,
0.1462496072,
0.2674664557,
0.0887184367,
-0.092034936,
-0.0518967248,
-0.2346296757,
0.2595599294,
0.0696016029,
0.0040453724,
0.2768523395,
-0.1759036332,
0.2066099942,
0.1795293391,
0.4463200569,
-0.1659675539,
0.2943894267,
0.2906155884,
-0.0403935611,
-0.2838437557,
-0.4341478348,
-0.3130204082,
-0.0064294501,
-0.1635506302,
0.3149729967,
0.1163866073,
-0.342517674,
0.1712340117,
-0.4348503649,
-0.2230146527,
-0.5114437938,
0.1025416031,
0.0085558677,
0.0840881616,
0.0869053677,
0.0160097852,
0.5051115155,
-0.2759877443,
0.1010563821,
-0.0918441787,
-0.3128787279,
0.1251656115,
-0.022744257,
0.2510177195,
-0.0505835451,
0.2167743891,
0.0635038093,
0.3050380349,
0.0786861852,
-0.5782642961,
0.1619756222,
0.0128236357,
0.1595939845,
-0.009425451,
-0.5442689657,
0.1438508332,
-0.3647789955,
0.138471961,
-0.1547429562,
-0.0682386532,
-0.0656607375,
-0.1959403008,
-0.1478055716,
-0.1425561011,
0.0340811387,
-0.4164377749,
-0.1596179456,
0.3661913574,
0.1965495199,
-0.0222530644,
0.1161043644,
0.0819729269,
-0.0072671575,
0.0154814413,
-0.1338331699,
0.0023300042,
0.0536473319,
0.3982646167,
-0.1423729062,
-0.0200678837,
-0.2428565025,
-0.4220931232,
-0.0924974903,
-0.2059854418,
-0.3302644193,
-0.718927443,
-0.123774834,
0.1407005787,
0.0311925747,
-0.0348916203,
0.0768195689,
-0.2370525301,
0.1992861181,
-0.061339315,
-0.4014445245,
0.0908245519,
-0.0623567738,
-0.0839917883,
-0.4966914952,
0.4393980503,
0.2411258668,
0.3800707757,
-0.0167775992,
-0.3829095066,
0.0695053414,
0.0900350735,
0.359677285,
0.0528986976,
-0.1561409086,
0.1884683371,
-0.1911199093,
-0.2710876763,
0.2511746585,
0.0950740278,
-0.1881807446,
-0.3442679048,
0.0452675,
-0.3981232941,
-0.2436232418,
-0.001546628,
0.2201655954,
0.099408254,
0.0086951898,
-0.016608296,
-0.5513287187,
-0.0858261809,
0.3991060555,
0.2545214593,
0.0767551661,
-0.0948705375,
-0.2385225296,
-0.1900908947,
-0.4015959799,
0.3356553018,
0.1114156172,
0.0072914138,
0.1262076795,
-0.0031768046,
0.0109877642,
-0.1006436944,
0.153073892,
-0.0662385002,
-0.0091541233,
0.0727171451,
-0.5084450245,
-0.0441977456,
-0.2963526547,
-0.2866691947,
-0.0147866737,
0.2140392363,
0.5403144956,
-0.3491868377,
0.1352048665,
0.2148564011,
0.0536217354,
-0.2273654938,
-0.0271939561,
-0.1333908886,
0.1154650822,
0.0138830999,
-0.0546655841,
0.1017283276,
0.165782392,
0.0941172168,
0.1694842726,
0.0033786504,
-0.0355755687,
0.5560323,
0.5890777707,
-0.0228787623,
0.0049233311,
0.0503085442,
-0.0736029074,
-0.4726642668,
0.2202361375,
0.2540066242,
-0.0232184175,
-0.8468317389,
-0.081795834,
0.1925511211,
0.3330131471,
-0.0464383997,
0.0763193667,
-0.2225622684,
-0.2167147547,
0.2232943177,
-0.3131757081,
0.529540658,
0.0977690518,
0.2532325089,
-0.201868698,
0.0246958528,
0.3580564857,
0.2071654499,
-0.1761368513,
0.0569434166,
0.0899651647,
-0.1538890004,
0.3100938797,
0.4626709819,
0.7989938855,
-0.124221839,
-0.1367191672,
-0.0001973623,
-0.143289119,
0.2762162387,
-0.4615858793,
-0.0108005749,
-0.1875379533,
-0.2533774674,
-0.0440357141,
-0.1522350013,
0.0488851033,
-0.1845829338,
-0.0008905458,
0.1672568321,
0.2464726269,
0.1864145249,
0.1270347685,
0.1973676383,
0.0732196569,
-0.3102347255,
0.029228719,
0.0533293411,
-0.2029116601,
0.181648612,
-0.1132241488,
0.015574039,
-0.313431561,
0.1782193482,
-0.2240444422,
-0.0474435613,
-0.0893829688,
0.2175899148,
0.1645729393,
-0.1493412107,
0.0840914398,
0.3634404242,
0.4752680063,
-0.1508081108,
0.0376061238,
0.0593171567,
-0.3069787025,
0.1144078895,
0.055364985,
-0.2306262553,
0.2586888075,
-0.0737387761,
0.3419592083,
0.1915058047,
0.4165434837,
-0.2845356166,
0.1757491529,
-0.1674329042,
0.1769135445,
-0.0472232029,
0.3336515427,
0.1380684674,
-0.1131136343,
-0.0418057367,
-0.0265044421,
0.1103857905,
-0.2165945023,
0.3255284131,
-0.043448478,
-0.2242950648,
0.0244907141,
0.087303035,
-0.0658695847,
-0.1756334454,
-0.038428776,
-0.1486485749,
-0.2053458393,
-0.0101761324,
-0.219836697,
-0.1991189122,
-0.2939016819,
0.3008574247,
-0.2469028533,
-0.4895504415,
-0.2054046839,
0.3679878116,
0.4144977033,
0.2888381481,
-0.2223986983,
-0.3008727729,
-0.3259771168,
0.2588815093,
-0.2112446576,
0.1525607854,
-0.2292187363,
0.6077914238,
-0.1435198188,
0.2965233922,
-0.1856720001,
-0.2812436521,
-0.2371110469,
-0.058816582,
-0.4407038689,
-0.3586859405,
-0.0555452295,
-0.0189077277,
-0.1065516993,
0.2003397942,
-0.228650704,
-0.0167120397,
-0.2466874272,
0.1922569424,
0.0466637127,
0.4406830966,
-0.1525683403,
0.3062050939,
0.0616211668,
-0.380271256,
0.0805013776,
0.1096493751,
-0.067982778,
0.2895843089,
0.2054457963,
0.1984713227,
0.0933204591,
-0.0518017337,
0.3235306144,
0.3530480862,
0.4071326554,
0.3210068345,
-0.3119120598,
-0.0700860322,
0.1335509568,
0.2069118023,
0.1380880922,
-0.110532403,
0.4389408827,
0.2935256362,
-0.0526561625,
0.1060620919,
0.3521793783,
0.168509528,
0.0960483029,
0.1776006967,
-0.1643947065,
0.047221899,
-0.068686299,
-0.0459913164,
0.2625201643,
-0.1437595636,
0.2043302655,
0.4219452739,
0.3200177252,
0.2620480061,
0.1631946266,
0.0780931413,
0.2289648652,
0.5206675529,
0.2069575489,
-0.0092781046,
-0.0111817159,
0.1314431727,
0.4788705111,
-0.2426757365,
0.4709958434,
-0.060769245,
-0.2056523412,
0.1885227412,
-0.4297232628,
0.2462846637,
0.3417512178,
0.0191679858,
-0.1782656461,
-0.2274446487,
0.3287644982,
0.3067308962,
-0.0350279212,
-0.091473043,
-0.0242023524,
-0.1226978078,
-0.3589450419,
0.2241211683,
0.1636247188,
-0.1052353606,
-0.1486035436,
-0.0799848214,
-0.1974096745,
0.091148451,
0.0383686274,
-0.4937093854,
-0.1336368173,
0.0289222915,
0.0179260578,
0.33636114,
-0.1937909573,
0.3053176701,
0.7155002952,
-0.1400989741,
-0.1130747944,
0.4139333963,
0.0292664357,
-0.1019615382,
0.3565454185,
0.2964405715,
-0.1349703372,
-0.4047288299,
0.2447700799,
-0.013826442,
0.0196941961,
0.0065774871,
0.1163655221,
0.0413885824,
0.2430707067,
0.2479828894,
0.029896237,
-0.1251018494,
0.0728876367,
-0.3502912521,
0.3562813103,
-0.4247969687,
0.1356856376,
0.3046933115,
0.0273335129,
-0.0798523128,
0.0281218961,
-0.0415628031,
-0.4593971968,
0.0430441462,
-0.3000649512,
-0.1201364696,
-0.0400579534,
-0.0092175631,
-0.1653909236,
0.268122226,
0.317399472,
0.2378945053,
-0.3654518127,
-0.164919287,
-0.4199309647,
0.0316961184,
0.1823452264,
-0.3640836179,
-0.0365196876,
0.2397163361,
-0.0328221433,
0.5731804967,
-0.0296353884,
0.3089935482,
0.1334938854,
0.0964872241,
-0.4332206845,
0.1920150965,
-0.4717687964,
-0.0964953452,
0.133438468,
0.055418551,
-0.2559976876,
0.0372667238,
-0.114423506,
0.1294707954,
-0.1716091782,
-0.0826002285,
0.5387238264,
0.3669651747,
0.1494875699,
0.411578238,
0.139359042,
0.1398127377,
0.0944691598,
-0.2344838381,
0.1178083271,
0.0759973675,
-0.1502671838,
0.3561974764,
-0.217971921,
0.0830596015,
-0.0056157894,
0.2488786876,
0.4969793558,
-0.5032250881,
-0.0846449286,
-0.0199217517,
-0.2355303168,
0.0805798918,
0.1499196887,
0.5444471836,
0.1967548132,
0.2469242066,
0.1093312949,
-0.3478525281,
0.4284907877,
-0.2423881739,
0.0558311418,
-0.2117152065,
0.0536826178,
0.3772604465,
-0.0949611366,
-0.590313375,
-0.1176029593,
0.1731559187,
-0.1132121757,
-0.1280551106,
0.2338013649,
-0.1917489767,
0.0629496798,
-0.1018352583,
0.1246751845,
-0.0451469906,
0.0526670814,
-0.1917764097,
-0.2176476121
] |
https://github.com/huggingface/datasets/issues/2308 | Add COCO evaluation metrics | Great!
Here's a notebook that illustrates how I'm using `CocoEvaluator`: https://drive.google.com/file/d/1VV92IlaUiuPOORXULIuAdtNbBWCTCnaj/view?usp=sharing
The evaluation is near the end of the notebook.
| I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively).
Running these in a notebook gives you nice summaries like this:
![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png)
It would be great if we could import these metrics from the Datasets library, something like this:
```
import datasets
metric = datasets.load_metric('coco')
for model_input, gold_references in evaluation_dataset:
model_predictions = model(model_inputs)
metric.add_batch(predictions=model_predictions, references=gold_references)
final_score = metric.compute()
```
I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier.
However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
| 20 | Add COCO evaluation metrics
I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively).
Running these in a notebook gives you nice summaries like this:
![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png)
It would be great if we could import these metrics from the Datasets library, something like this:
```
import datasets
metric = datasets.load_metric('coco')
for model_input, gold_references in evaluation_dataset:
model_predictions = model(model_inputs)
metric.add_batch(predictions=model_predictions, references=gold_references)
final_score = metric.compute()
```
I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier.
However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
Great!
Here's a notebook that illustrates how I'm using `CocoEvaluator`: https://drive.google.com/file/d/1VV92IlaUiuPOORXULIuAdtNbBWCTCnaj/view?usp=sharing
The evaluation is near the end of the notebook.
| [
-0.2997464538,
-0.217308417,
-0.0662909895,
0.020168744,
0.1273828,
-0.1438954771,
0.0299046244,
-0.1443724185,
-0.2041878402,
0.1345137656,
-0.6726329327,
0.1221150458,
-0.1353888959,
0.1291401982,
-0.2434386462,
-0.086376369,
-0.0150744235,
-0.0097321682,
-0.2172837108,
0.1266033053,
0.0592164546,
0.1436479539,
0.2437025905,
0.1383197904,
-0.24078843,
-0.1455113888,
-0.2821145058,
-0.3128212392,
-0.1522010118,
-0.3235957921,
0.2970018685,
0.4498108625,
0.1952888668,
0.3987875879,
-0.000123575,
0.1599731147,
0.017170459,
0.0391537435,
-0.0614749119,
-0.0754961669,
0.077249378,
-0.3173386157,
0.2860776484,
-0.1607623547,
0.1821162403,
-0.0290839802,
-0.1013194099,
0.0469152965,
0.40564394,
0.1000316739,
0.0505138487,
0.1995004267,
0.0012991967,
-0.0145344613,
-0.3424557149,
0.3313702941,
-0.3202504814,
0.2981690764,
0.0834721401,
-0.1853358299,
-0.1613384187,
0.1992027313,
0.351300329,
-0.0931319967,
0.5686441064,
0.0972016975,
0.3958120942,
-0.336283356,
-0.4863194525,
0.1939114481,
0.168825075,
-0.2461126745,
-0.5697388649,
-0.3576301336,
-0.1659264266,
-0.3212457299,
-0.4314122796,
-0.0633494258,
-0.1420810521,
0.2109693438,
-0.3318123519,
-0.0063184267,
-0.2902601361,
-0.0367845148,
-0.0175289791,
0.3369064629,
0.1609746367,
-0.2007410824,
0.3905268908,
-0.0829601288,
0.3388564885,
-0.2830790281,
0.1836013347,
0.0522670373,
-0.2357368022,
-0.2395911068,
0.2833958566,
0.1345155686,
-0.0850758702,
0.0227250978,
0.299672246,
0.1121047959,
-0.2344083488,
0.126832366,
0.134512037,
0.576677084,
0.060616944,
0.5718220472,
0.1867628396,
0.3516945839,
0.0615282096,
0.006039355,
0.2447050363,
0.1921393722,
0.0925658643,
0.1304135621,
-0.1720281839,
-0.2655120194,
-0.1750138402,
0.1668259054,
0.0971483886,
-0.0691359118,
0.2887948453,
0.4693869948,
-0.1852556318,
0.4720816612,
-0.0911776721,
-0.050461553,
0.0083444268,
0.0523506701,
-0.0340196826,
0.328081429,
-0.2931900024,
0.0744852126,
0.180704087,
0.1405318975,
-0.0318058506,
-0.5192120671,
0.7788999081,
-0.3136879206,
-0.1726382673,
-0.2899073958,
0.3224671781,
0.2182409316,
-0.0977123976,
-0.2309618294,
0.0274782311,
-0.2426819056,
-0.2836830914,
-0.2099502981,
-0.0465671979,
-0.2794578373,
0.1206553876,
0.0554584228,
-0.593269527,
0.1008232459,
-0.220206216,
0.572905302,
-0.3765846491,
0.1203670502,
-0.0749172866,
-0.1959533393,
-0.1592184156,
-0.0124031501,
0.2833308578,
0.2463439107,
-0.1743957698,
-0.2132162005,
-0.093642965,
-0.2362222224,
-0.1588313729,
0.2393621951,
-0.0196400452,
0.1804810613,
0.1095644832,
0.0924025923,
0.1852484643,
-0.7222117186,
-0.2145634592,
0.0489069149,
0.2471458018,
0.2894208729,
-0.0734357312,
0.3351033628,
0.1267102957,
-0.1893469095,
-0.1360853761,
0.4152055383,
-0.0811436251,
-0.2573268116,
-0.1198693067,
0.0354176387,
0.1681858003,
0.1451543123,
0.4331031442,
-0.1665910929,
0.1054948196,
0.0371049121,
-0.1960601956,
-0.3203045726,
-0.2076269686,
-0.0496512577,
0.3412626982,
-0.0403322019,
0.1081839502,
-0.2308377326,
-0.5144693851,
0.1474981904,
-0.1135458872,
0.2028594613,
0.1224527135,
-0.3373812437,
-0.0957701728,
0.4329607785,
-0.0011988787,
-0.1656337529,
0.0466329642,
-0.1520052999,
0.213648662,
-0.0242750067,
-0.1066237316,
0.201683715,
0.0871167183,
0.2898571491,
0.4406022429,
0.3309727907,
-0.0673663914,
0.1346362233,
0.1199565679,
0.4655915797,
-0.0769187883,
-0.0163239092,
0.0534668863,
0.3662232757,
-0.0929572061,
0.2508169711,
0.2465989143,
0.5548980832,
0.1488538384,
-0.321600318,
0.1336141825,
-0.0017462733,
0.0225112457,
-0.047405269,
-0.0396967568,
0.7304100394,
0.0812966749,
0.4636431634,
0.1052093655,
-0.1008717865,
0.0464760214,
0.0716416985,
-0.3060568273,
-0.3219824731,
0.1666341871,
-0.2491999418,
0.1512070596,
-0.0932584554,
-0.0341611505,
-0.0734888092,
-0.1332813799,
-0.1414820701,
0.1587102264,
0.2704225481,
0.0616407469,
-0.1080176979,
-0.0460406914,
-0.2232918739,
0.247175023,
0.0910437033,
-0.0043952009,
0.2587949038,
-0.1916440278,
0.1918937564,
0.1756490171,
0.4494327605,
-0.1697314382,
0.2736301124,
0.2883635163,
-0.0343804918,
-0.2886707783,
-0.4417699575,
-0.3288543224,
-0.0141829103,
-0.1479978114,
0.3167218268,
0.1225952581,
-0.3476931155,
0.1796489358,
-0.4364887774,
-0.2220804095,
-0.5205183625,
0.115200825,
0.0132631985,
0.0673814863,
0.0899346247,
0.0288929101,
0.528670609,
-0.2699847519,
0.1107040942,
-0.112296626,
-0.3123544157,
0.0993662477,
0.0015263642,
0.248155877,
-0.0478705093,
0.2108083665,
0.0645552725,
0.3195942044,
0.0707351863,
-0.5984120965,
0.1639058441,
0.0002430494,
0.1689489037,
-0.0078938492,
-0.5436899066,
0.1415248513,
-0.3592239022,
0.1330173612,
-0.180943951,
-0.0755390227,
-0.0621165559,
-0.1881650984,
-0.1498837173,
-0.1533190459,
0.0218637772,
-0.4075070322,
-0.1856071353,
0.3884068131,
0.2024871409,
-0.0216109361,
0.1255502403,
0.0721980855,
0.0083559491,
0.0168716926,
-0.1339850575,
-0.0112586394,
0.0598986857,
0.3984029591,
-0.150469929,
-0.0178763829,
-0.2467010766,
-0.4240750968,
-0.0942102373,
-0.2257973552,
-0.3218147755,
-0.7311674356,
-0.1432561874,
0.1486821771,
0.0386188738,
-0.0254497491,
0.0705621019,
-0.2284885198,
0.1728914827,
-0.0559928417,
-0.3789958954,
0.0764609352,
-0.0758436844,
-0.0935095847,
-0.4966572225,
0.4219001532,
0.2515822947,
0.3898653686,
-0.0341858566,
-0.3920492232,
0.0780422315,
0.0776524395,
0.3641148806,
0.0493737869,
-0.1420730203,
0.1943819076,
-0.1970598102,
-0.2544769049,
0.2512596548,
0.0943185911,
-0.2052673697,
-0.3252043128,
0.0372600928,
-0.3865353465,
-0.2463574708,
0.0048640897,
0.2265777588,
0.0744294524,
0.0035518985,
-0.016766306,
-0.5261822343,
-0.0947541147,
0.4008870423,
0.2383140475,
0.0825294033,
-0.0988605618,
-0.240468353,
-0.1687588543,
-0.4156930149,
0.3411151767,
0.093251273,
-0.0129258456,
0.1346777827,
-0.0368649997,
-0.0030847299,
-0.0987496302,
0.1665320247,
-0.0610171556,
-0.0342471227,
0.0618023165,
-0.514924407,
-0.0635031685,
-0.2830657959,
-0.2945511639,
-0.0157701671,
0.2116011232,
0.5451018214,
-0.3397907317,
0.1259391606,
0.23730582,
0.0394676961,
-0.2218977958,
-0.0148765529,
-0.1446873993,
0.1181573719,
-0.0024678744,
-0.0502192825,
0.0985895246,
0.143421948,
0.0863525867,
0.1571966559,
0.0158533547,
-0.0381099097,
0.5339031816,
0.6092333794,
-0.0233164933,
0.0006790119,
0.0391846783,
-0.0617796406,
-0.4591567516,
0.19902578,
0.2507912815,
-0.0377939083,
-0.8460476995,
-0.0552422926,
0.2072767466,
0.3129008412,
-0.0364867635,
0.09032695,
-0.2212749422,
-0.1981060654,
0.2404571921,
-0.3323579133,
0.5323823094,
0.0944025442,
0.2426686138,
-0.1755243838,
0.0201537516,
0.3630641997,
0.1934932172,
-0.1754035652,
0.0536111929,
0.0945935994,
-0.1403985322,
0.3290589154,
0.4565216303,
0.8081376553,
-0.1172456145,
-0.1190668792,
-0.0040758764,
-0.1455139071,
0.2800196707,
-0.4670470655,
-0.0107089272,
-0.1926068664,
-0.2586921453,
-0.0441653915,
-0.1439217031,
0.0402361564,
-0.1787968874,
-0.0212658849,
0.1624365896,
0.2555799484,
0.2075013667,
0.133851707,
0.2047466338,
0.064284116,
-0.3234066069,
0.0317040905,
0.0718119517,
-0.1916457564,
0.1762239039,
-0.1123825461,
0.0228485838,
-0.312587142,
0.1763162017,
-0.2226731777,
-0.046461381,
-0.0862540007,
0.2179840207,
0.1812764704,
-0.1283548176,
0.0708482265,
0.3582498133,
0.469196707,
-0.1416618824,
0.0318299048,
0.0683150291,
-0.2951419353,
0.1271835864,
0.0667113885,
-0.2434662133,
0.2872309387,
-0.0701185167,
0.32331568,
0.2023534328,
0.4158207178,
-0.2841747403,
0.1560438126,
-0.1622921973,
0.1703688949,
-0.0544659793,
0.3462359011,
0.1270442754,
-0.1362369359,
-0.0584033914,
-0.0049250587,
0.103816621,
-0.2249019891,
0.3124012649,
-0.0346103497,
-0.2160986215,
0.0163748767,
0.0837357864,
-0.0703184158,
-0.163897872,
-0.0417793989,
-0.1517427862,
-0.1967331469,
-0.030450251,
-0.2186262161,
-0.1701901704,
-0.2886286676,
0.3089747429,
-0.2554731071,
-0.5010093451,
-0.1971584707,
0.3870409429,
0.4179736078,
0.2863822281,
-0.2421090007,
-0.2874954045,
-0.3281961977,
0.276274085,
-0.2103977501,
0.1733356267,
-0.2154819965,
0.5901417732,
-0.1272020042,
0.2967889011,
-0.2152384222,
-0.2923661172,
-0.251100421,
-0.0724316612,
-0.4433407485,
-0.3681931794,
-0.0440998338,
-0.0271087214,
-0.0854168907,
0.2223086208,
-0.2309471369,
-0.0428763703,
-0.2431991845,
0.1782478392,
0.0314597599,
0.4418119788,
-0.1587163359,
0.3344667852,
0.0551942959,
-0.3866643012,
0.0841012225,
0.1035960615,
-0.0637553409,
0.283554554,
0.1996851414,
0.184012413,
0.1139560416,
-0.0553018562,
0.3162204623,
0.3359113932,
0.4048946202,
0.3138517737,
-0.3291018009,
-0.074805446,
0.14863199,
0.2220024019,
0.140470773,
-0.1018309742,
0.4360087514,
0.2986540794,
-0.0777131692,
0.0970306173,
0.3574434221,
0.1552153528,
0.104959473,
0.161559239,
-0.1594379842,
0.0691542253,
-0.0715449154,
-0.0564129464,
0.2643128633,
-0.1573738903,
0.2371169925,
0.419949919,
0.3266837597,
0.2741062343,
0.1674642414,
0.0666888282,
0.2360162437,
0.5075056553,
0.199895665,
-0.0234122425,
-0.0090772845,
0.1328239292,
0.4826536477,
-0.2623153925,
0.4836316109,
-0.0574854612,
-0.1937597543,
0.204304561,
-0.4279996157,
0.2465711981,
0.3559619486,
0.0289881844,
-0.1492527425,
-0.2426819056,
0.3121586442,
0.3237940967,
-0.0378411561,
-0.1072399244,
-0.0338821039,
-0.1182374358,
-0.3678840697,
0.2005828321,
0.159731701,
-0.1120310128,
-0.1446388811,
-0.0882379562,
-0.1976038814,
0.0771284029,
0.0307873301,
-0.4916612208,
-0.1184270158,
0.0130346911,
0.0191566292,
0.3470639884,
-0.1806196868,
0.2940875888,
0.7280279398,
-0.1368325949,
-0.1232585311,
0.4176485837,
0.0290645398,
-0.1232909858,
0.3599894643,
0.302930057,
-0.1313478649,
-0.4097951055,
0.2434921712,
-0.0126561001,
0.0090096761,
-0.0021370845,
0.1232980788,
0.0344432369,
0.2410011292,
0.2508686483,
0.0535558611,
-0.1434518844,
0.0682981163,
-0.3407966495,
0.3618963361,
-0.4263162911,
0.1210771576,
0.3008065522,
0.0308795981,
-0.0831631273,
0.0318333171,
-0.0587635338,
-0.4580427408,
0.0310648736,
-0.304872632,
-0.1086243019,
-0.0532158315,
0.0076267621,
-0.1413907856,
0.2851796746,
0.3214082718,
0.2369330972,
-0.3483338654,
-0.1536584795,
-0.419457227,
0.0428628214,
0.1830455512,
-0.3505307138,
-0.0381961092,
0.2528027892,
-0.031982515,
0.5803542733,
-0.028360961,
0.3007447422,
0.1152476519,
0.0816764757,
-0.4270042181,
0.1995347291,
-0.4688554108,
-0.1081947759,
0.1317011565,
0.0474091284,
-0.2442970276,
0.0516677946,
-0.0914225802,
0.1239640787,
-0.1751903445,
-0.0596672744,
0.5259098411,
0.359939903,
0.1547087282,
0.3691024482,
0.1324086487,
0.1214032248,
0.0797878355,
-0.2308139503,
0.1155478582,
0.0566170886,
-0.1507094651,
0.3563112617,
-0.1916333884,
0.0539532639,
-0.014848249,
0.2521481812,
0.5013906956,
-0.4979828894,
-0.0838883445,
-0.0298996288,
-0.2199157178,
0.0648839548,
0.1440889537,
0.5455386043,
0.1903112531,
0.2297284156,
0.1160855815,
-0.359054774,
0.411983937,
-0.2448017746,
0.0657234937,
-0.2228418142,
0.0472104736,
0.3749009371,
-0.0942503586,
-0.5748446584,
-0.1309123784,
0.1755874008,
-0.1069523096,
-0.1329508573,
0.2344392985,
-0.1882475317,
0.0649432763,
-0.1123961806,
0.1239949167,
-0.0450831018,
0.052713912,
-0.1798618585,
-0.2336570919
] |
https://github.com/huggingface/datasets/issues/2308 | Add COCO evaluation metrics | I went through the code you've [mentioned](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py) and I think there are 2 options on how we can go ahead:
1) Implement how DETR people have done this (they're relying very heavily on the official implementation and they're focussing on torch dataset here. I feel ours should be something generic instead of pytorch specific.
2) Do this [implementation](https://github.com/cocodataset/cocoapi/blob/ed842bffd41f6ff38707c4f0968d2cfd91088688/PythonAPI/pycocoEvalDemo.ipynb) where user can convert its output and ground truth annotation to pre-defined format and then feed it into our function to calculate metrics (looks very similar to you wanted above)
In my opinion, 2nd option looks very clean but I'm still figuring out how's it transforming the box co-ordinates of `coco_gt` which you've passed to `CocoEvaluator` (ground truth for evaluation). Since your model output was already converted to COCO api, I faced little problems there. | I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively).
Running these in a notebook gives you nice summaries like this:
![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png)
It would be great if we could import these metrics from the Datasets library, something like this:
```
import datasets
metric = datasets.load_metric('coco')
for model_input, gold_references in evaluation_dataset:
model_predictions = model(model_inputs)
metric.add_batch(predictions=model_predictions, references=gold_references)
final_score = metric.compute()
```
I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier.
However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
| 133 | Add COCO evaluation metrics
I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively).
Running these in a notebook gives you nice summaries like this:
![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png)
It would be great if we could import these metrics from the Datasets library, something like this:
```
import datasets
metric = datasets.load_metric('coco')
for model_input, gold_references in evaluation_dataset:
model_predictions = model(model_inputs)
metric.add_batch(predictions=model_predictions, references=gold_references)
final_score = metric.compute()
```
I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier.
However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
I went through the code you've [mentioned](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py) and I think there are 2 options on how we can go ahead:
1) Implement how DETR people have done this (they're relying very heavily on the official implementation and they're focussing on torch dataset here. I feel ours should be something generic instead of pytorch specific.
2) Do this [implementation](https://github.com/cocodataset/cocoapi/blob/ed842bffd41f6ff38707c4f0968d2cfd91088688/PythonAPI/pycocoEvalDemo.ipynb) where user can convert its output and ground truth annotation to pre-defined format and then feed it into our function to calculate metrics (looks very similar to you wanted above)
In my opinion, 2nd option looks very clean but I'm still figuring out how's it transforming the box co-ordinates of `coco_gt` which you've passed to `CocoEvaluator` (ground truth for evaluation). Since your model output was already converted to COCO api, I faced little problems there. | [
-0.2762453556,
-0.2085914016,
-0.0654033571,
0.0466304719,
0.1744097322,
-0.1518914253,
0.0246489551,
-0.1304700524,
-0.1931970417,
0.1273567677,
-0.6784847379,
0.1213096976,
-0.1210909337,
0.11382626,
-0.2690064609,
-0.095024012,
-0.0252746753,
-0.0111771049,
-0.2147165835,
0.1027094126,
0.048520837,
0.1782632768,
0.2275514305,
0.1101236269,
-0.2545384467,
-0.1438167095,
-0.2657632828,
-0.2837207913,
-0.1923245341,
-0.316390723,
0.3075263798,
0.4554099441,
0.2024870068,
0.4298277497,
-0.0001223113,
0.1656177938,
0.0208987314,
0.0250817798,
-0.0517432652,
-0.09651272,
0.0708124116,
-0.3158515096,
0.2736360133,
-0.1634328812,
0.1322087646,
-0.0302356258,
-0.1248589605,
0.0449076183,
0.4284770191,
0.1474264711,
0.0711562857,
0.1883556992,
0.0393484794,
-0.0047207857,
-0.3366114497,
0.3078396618,
-0.3132877648,
0.3043534458,
0.0596669354,
-0.1810681671,
-0.157253027,
0.2237781137,
0.3409008682,
-0.0695616379,
0.5765433908,
0.1170462817,
0.3985584378,
-0.3481793702,
-0.4635712802,
0.1570443213,
0.1507802308,
-0.2379887104,
-0.547499299,
-0.3472574949,
-0.1965021491,
-0.3565268517,
-0.3971279263,
-0.0950897709,
-0.1564538032,
0.1816257089,
-0.3316310048,
0.012177268,
-0.3044275343,
-0.0409064926,
0.0005170795,
0.3494042456,
0.148782745,
-0.187319681,
0.4057869911,
-0.0739514232,
0.319596827,
-0.2628582418,
0.2078424096,
0.037884973,
-0.2627311051,
-0.2232254297,
0.2751402259,
0.1383701563,
-0.0727140233,
0.0197973978,
0.2770000994,
0.116249159,
-0.2116613239,
0.1162538603,
0.1057366207,
0.6059843302,
0.0628726035,
0.5722205043,
0.1813307852,
0.3665733933,
0.0421058051,
-0.0075583188,
0.2369522154,
0.1503080279,
0.1127960831,
0.1642225981,
-0.1079886779,
-0.2825086415,
-0.172729969,
0.189331755,
0.1075057611,
-0.0790876895,
0.3042197824,
0.4782566428,
-0.1811586022,
0.4461402893,
-0.0655576438,
-0.0462579019,
-0.018244775,
0.0664229691,
-0.057493791,
0.3409992456,
-0.3272207975,
0.0691409782,
0.1938773841,
0.1533526033,
-0.031331297,
-0.4772883356,
0.7550004721,
-0.3323634267,
-0.1679587662,
-0.3021881878,
0.3394154906,
0.199641332,
-0.0972609669,
-0.1912214011,
0.0545455664,
-0.2480315566,
-0.2544413805,
-0.2019887567,
-0.0508468226,
-0.2689053118,
0.1182740405,
0.0738486573,
-0.5843091607,
0.1008129269,
-0.2262388766,
0.5677809119,
-0.3436728716,
0.1229911149,
-0.0597313084,
-0.2086483985,
-0.1660012007,
-0.0124743003,
0.3085110188,
0.2649511993,
-0.1796626002,
-0.1830180734,
-0.0809676349,
-0.2382341921,
-0.1266950667,
0.2226280272,
-0.0105150854,
0.200614363,
0.0851476938,
0.1084155291,
0.1714398712,
-0.7114334702,
-0.2342544049,
0.0404346883,
0.2236279249,
0.2831637561,
-0.0782679319,
0.3078074455,
0.1145275608,
-0.1691479832,
-0.1307488233,
0.4090504348,
-0.074068509,
-0.2533507049,
-0.1601089686,
0.0621853583,
0.1803663969,
0.1431155056,
0.4445331991,
-0.1584170759,
0.0657705888,
0.0254787561,
-0.1756355464,
-0.3219895661,
-0.1698578,
-0.0325582586,
0.3594148159,
-0.0234321058,
0.1073379591,
-0.2093328983,
-0.522454679,
0.1674000621,
-0.1160114557,
0.2480331808,
0.0971880108,
-0.3190677762,
-0.1431767941,
0.412353009,
-0.0491631441,
-0.1736115217,
0.0698186755,
-0.1345933825,
0.2121603191,
-0.0539134629,
-0.0922605991,
0.2222618163,
0.0908732414,
0.2821024954,
0.4027759135,
0.3636612892,
-0.1111014187,
0.1292607635,
0.1170272529,
0.4381555915,
0.0024808466,
-0.0212981328,
0.0223126207,
0.3827008903,
-0.0947419554,
0.2323689312,
0.237907216,
0.4944933057,
0.1189070866,
-0.3212481141,
0.1284972578,
0.0009625015,
0.0421740748,
-0.0464829914,
-0.0077402373,
0.7312797904,
0.0620469414,
0.4585793316,
0.0933520496,
-0.102249153,
0.0576271974,
0.0553310998,
-0.2785553336,
-0.3295013905,
0.1663161069,
-0.2630714178,
0.1256220192,
-0.1224565655,
-0.0244948789,
-0.0519083031,
-0.1257101297,
-0.1292591691,
0.13464652,
0.2817373872,
0.085971117,
-0.0932167694,
-0.0398115329,
-0.2153110653,
0.2656777501,
0.0848730803,
-0.0105627589,
0.285454005,
-0.1838686019,
0.185394749,
0.1745003313,
0.4714131951,
-0.1456243247,
0.2780248225,
0.2813166082,
-0.023759855,
-0.3009243906,
-0.4294914007,
-0.2931695879,
0.0122507913,
-0.1763388366,
0.3256576955,
0.1141820624,
-0.3490327895,
0.156796813,
-0.4588404596,
-0.2433834523,
-0.5207467079,
0.1033494473,
0.0190506354,
0.0706164688,
0.1276275963,
0.0369860418,
0.5012658238,
-0.2499661744,
0.0926331952,
-0.1203437373,
-0.2922963202,
0.0737061352,
0.0129701002,
0.2553324103,
-0.0234924741,
0.2086294293,
0.0735824481,
0.323607564,
0.0638396367,
-0.5853334665,
0.1565502435,
-0.0495687909,
0.1875978112,
-0.0077078314,
-0.5228642225,
0.1215294898,
-0.3543279171,
0.1721246243,
-0.2101463675,
-0.0749879181,
-0.0530058816,
-0.1912763864,
-0.1462314576,
-0.1577599645,
0.0053718793,
-0.4186986387,
-0.1929977089,
0.3601034582,
0.2147983909,
-0.0213450342,
0.1497692019,
0.0865374282,
0.0260949377,
0.055064626,
-0.1355028301,
-0.0529953837,
0.0406927615,
0.4118338227,
-0.1769708097,
-0.0537598543,
-0.2154045254,
-0.4016533196,
-0.0702751875,
-0.2474473715,
-0.320371002,
-0.7439365983,
-0.1434045136,
0.1265178174,
0.0183426272,
-0.0163933057,
0.0766176134,
-0.2344220132,
0.1522070915,
-0.0657698512,
-0.4089477956,
0.1194922477,
-0.0777282342,
-0.0890454426,
-0.5065966249,
0.4495179057,
0.2294936925,
0.3933580816,
0.0016586016,
-0.3807326555,
0.1166254133,
0.0910185426,
0.3588935435,
0.035747163,
-0.1737154573,
0.215574801,
-0.1794086844,
-0.2432074845,
0.247909531,
0.093400389,
-0.1802214533,
-0.3338060081,
0.030221913,
-0.3992539048,
-0.2653984427,
0.0268930905,
0.2293671221,
0.0543949567,
0.00349871,
-0.0015962968,
-0.5473838449,
-0.0930739418,
0.3901611269,
0.2279331535,
0.0608798265,
-0.0934581608,
-0.2330212593,
-0.1388531178,
-0.4689038396,
0.3694586158,
0.0699460357,
-0.0054087704,
0.1233941764,
-0.0228700079,
0.0018486878,
-0.1014418378,
0.2154687643,
-0.0550023429,
-0.0120997168,
0.0832604468,
-0.4966386855,
-0.0782086179,
-0.2871451378,
-0.2765396833,
-0.0057884376,
0.2186923772,
0.5335066319,
-0.35276559,
0.1291580647,
0.2480498105,
0.0165715739,
-0.2094552964,
-0.0192454848,
-0.1649112105,
0.0822107941,
-0.0150649399,
-0.0420380645,
0.1270931214,
0.1649764329,
0.0591280051,
0.1609513164,
0.0661305115,
-0.0418821536,
0.5437107682,
0.5955362916,
0.0093812896,
0.0182911661,
0.0254678577,
-0.032028608,
-0.4661467969,
0.2059056461,
0.2957648337,
-0.0609996207,
-0.8166983724,
-0.0561887659,
0.1940586269,
0.29348737,
-0.0195896477,
0.0721370354,
-0.242194891,
-0.1871282309,
0.2542261481,
-0.3209153712,
0.5390092731,
0.0880365148,
0.2292514443,
-0.1826339662,
0.0141427275,
0.3457553685,
0.1641495526,
-0.1617697775,
0.0721412897,
0.1148475111,
-0.1693143547,
0.3399416208,
0.4461798668,
0.8220880032,
-0.1126109213,
-0.1548722386,
0.0120480657,
-0.1374430656,
0.2894866168,
-0.4529245198,
-0.0084893117,
-0.1882471889,
-0.2486753166,
-0.0401295088,
-0.140699625,
0.0263492726,
-0.194178462,
-0.0595136136,
0.1681929678,
0.2482343614,
0.1855233908,
0.1249210611,
0.2243403345,
0.0713230819,
-0.331335187,
0.0026445424,
0.0945769101,
-0.2098751217,
0.2094293535,
-0.1125852838,
-0.0088997986,
-0.3395114243,
0.1401898563,
-0.204075098,
-0.0296323858,
-0.1202021539,
0.2145763785,
0.1627177745,
-0.1346900612,
0.0599308014,
0.3501695991,
0.4952368438,
-0.161883384,
0.0012826493,
0.0753727704,
-0.2775746584,
0.1320808083,
0.0656208917,
-0.2626318038,
0.2951788306,
-0.0912604257,
0.3007410169,
0.1701382697,
0.4086492062,
-0.3036220372,
0.1506335735,
-0.1786527485,
0.1701084822,
-0.0626603216,
0.328861475,
0.1114545614,
-0.1378708333,
-0.0825313106,
0.0148897143,
0.102623634,
-0.2490639538,
0.3069477081,
-0.0335752107,
-0.2077290714,
0.0239765681,
0.0965177938,
-0.0818432495,
-0.1717666388,
-0.0118895881,
-0.1071852371,
-0.1967215389,
-0.0395886116,
-0.2562930286,
-0.1372625977,
-0.3169879019,
0.3116514981,
-0.2514774501,
-0.4688403904,
-0.1731033027,
0.4210796356,
0.3939844668,
0.3023223579,
-0.1934247762,
-0.3022733033,
-0.3581430316,
0.2372600287,
-0.2229090035,
0.1673686951,
-0.2183483839,
0.6170167923,
-0.0994328856,
0.316510886,
-0.2374033332,
-0.277823329,
-0.2744910121,
-0.0647455975,
-0.4368360639,
-0.3990375102,
-0.0308971759,
-0.0188982338,
-0.0737772062,
0.2288740873,
-0.2616608739,
-0.0601003431,
-0.2391663045,
0.1694383025,
0.0471808314,
0.4099209607,
-0.1718663424,
0.3195157945,
0.0353313573,
-0.3725657165,
0.0807258934,
0.1193137392,
-0.0700906441,
0.2858248055,
0.2136675268,
0.1655386388,
0.1410425901,
-0.1001107544,
0.3156051338,
0.3201061785,
0.424901247,
0.2872233689,
-0.3312376738,
-0.0810122788,
0.1463564634,
0.2061987519,
0.1439626068,
-0.0891080871,
0.4217726588,
0.2530753911,
-0.1003188789,
0.1175419688,
0.3994006813,
0.1551515609,
0.0832901224,
0.1619012207,
-0.1746639013,
0.0905902311,
-0.0762656704,
-0.0285781175,
0.2756685913,
-0.1571264118,
0.2356152683,
0.4269885123,
0.3106449246,
0.2569351196,
0.1443135291,
0.1029462963,
0.2596437335,
0.4861935973,
0.2106776536,
-0.0611569397,
-0.0575119145,
0.131554395,
0.5030165315,
-0.266990602,
0.4692578614,
-0.0276611988,
-0.1999396533,
0.2299839109,
-0.4348886311,
0.2262982279,
0.3229152858,
-0.0056212447,
-0.1496711969,
-0.2351868302,
0.2930434048,
0.3130589426,
-0.0489827394,
-0.0969540477,
-0.0488329455,
-0.1319034845,
-0.3544018567,
0.2144259065,
0.1370990425,
-0.1006887257,
-0.1435349584,
-0.0954161808,
-0.2012468278,
0.0558298044,
0.0500991531,
-0.479758352,
-0.1086418405,
0.0039202971,
-0.0289104562,
0.3397589028,
-0.2136211395,
0.279941231,
0.7104997039,
-0.1439491063,
-0.0775689557,
0.4368619025,
0.0029714657,
-0.1155459508,
0.3416867256,
0.3122870624,
-0.0868649557,
-0.4118299186,
0.2339443266,
0.0113723297,
-0.0028077518,
0.0047153905,
0.1632648259,
0.0655135512,
0.2462728024,
0.2556034625,
0.0660330877,
-0.1703209877,
0.0462553874,
-0.3037083447,
0.3906085491,
-0.4059383273,
0.124399513,
0.2919088602,
0.0214644261,
-0.1243565902,
0.0087585868,
-0.1108525395,
-0.4503016472,
0.0219857171,
-0.2958692908,
-0.0949492753,
-0.092280671,
0.014553667,
-0.1507118642,
0.2853780091,
0.2920781374,
0.2323165089,
-0.4331851602,
-0.1606403887,
-0.438968569,
0.0494960845,
0.1921200156,
-0.3307119012,
-0.0261437837,
0.2662698925,
-0.0240796302,
0.5436843038,
-0.016394183,
0.2819666862,
0.1184484437,
0.0744230002,
-0.4420086443,
0.2170404047,
-0.4874474704,
-0.1042252705,
0.1522232294,
0.0420712121,
-0.2175889462,
0.0488942415,
-0.0720036477,
0.1187457964,
-0.1851812005,
-0.0586597696,
0.5239104033,
0.3720212281,
0.1598094404,
0.3868484795,
0.1139066219,
0.1370785683,
0.0372332633,
-0.216370225,
0.0815647691,
0.0474480093,
-0.1319822818,
0.4094474614,
-0.1868487149,
0.047527764,
-0.0603239313,
0.2450968027,
0.484495163,
-0.497251749,
-0.079004772,
0.0072274823,
-0.2121627331,
0.0728153437,
0.1377254277,
0.5201486349,
0.1925056875,
0.2557733953,
0.0572958365,
-0.3900308013,
0.4627177119,
-0.2369892299,
0.0301207099,
-0.2028694898,
0.0776492283,
0.377949357,
-0.1164873317,
-0.6244452596,
-0.095342882,
0.1603278667,
-0.0876284242,
-0.1636814028,
0.2436117828,
-0.1967924833,
0.0784679204,
-0.1009131894,
0.1286028326,
-0.0290014856,
0.0615762509,
-0.1632718742,
-0.2158157527
] |
https://github.com/huggingface/datasets/issues/2308 | Add COCO evaluation metrics | Ok, thanks for the update.
Indeed, the metrics API of Datasets is framework agnostic, so we can't rely on a PyTorch-only implementation.
[This file](https://github.com/cocodataset/cocoapi/blob/ed842bffd41f6ff38707c4f0968d2cfd91088688/PythonAPI/pycocotools/cocoeval.py) is probably want we need to implement.
| I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively).
Running these in a notebook gives you nice summaries like this:
![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png)
It would be great if we could import these metrics from the Datasets library, something like this:
```
import datasets
metric = datasets.load_metric('coco')
for model_input, gold_references in evaluation_dataset:
model_predictions = model(model_inputs)
metric.add_batch(predictions=model_predictions, references=gold_references)
final_score = metric.compute()
```
I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier.
However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
| 31 | Add COCO evaluation metrics
I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively).
Running these in a notebook gives you nice summaries like this:
![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png)
It would be great if we could import these metrics from the Datasets library, something like this:
```
import datasets
metric = datasets.load_metric('coco')
for model_input, gold_references in evaluation_dataset:
model_predictions = model(model_inputs)
metric.add_batch(predictions=model_predictions, references=gold_references)
final_score = metric.compute()
```
I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier.
However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
Ok, thanks for the update.
Indeed, the metrics API of Datasets is framework agnostic, so we can't rely on a PyTorch-only implementation.
[This file](https://github.com/cocodataset/cocoapi/blob/ed842bffd41f6ff38707c4f0968d2cfd91088688/PythonAPI/pycocotools/cocoeval.py) is probably want we need to implement.
| [
-0.2992970049,
-0.2228717506,
-0.0646217316,
0.0151258446,
0.1335905045,
-0.1412789524,
0.0264431983,
-0.1363360733,
-0.1954928935,
0.1230500937,
-0.680290401,
0.1259328127,
-0.1547849774,
0.1198724136,
-0.2277212143,
-0.0956799686,
-0.0067188358,
-0.025702687,
-0.2065681964,
0.130860433,
0.0450625084,
0.1559382826,
0.2409401983,
0.1375783384,
-0.2349681705,
-0.1268835813,
-0.2791189551,
-0.3148987591,
-0.1528187245,
-0.3324479461,
0.3127663136,
0.4507702589,
0.2063035071,
0.3868994415,
-0.0001238944,
0.1604951024,
0.0293455422,
0.0402953587,
-0.0567351095,
-0.0817934126,
0.0817746967,
-0.3192559183,
0.2854299545,
-0.1532307565,
0.1690669358,
-0.0341490246,
-0.1189531311,
0.0350224674,
0.4042480886,
0.1106407344,
0.0524125807,
0.1972405165,
0.0121196611,
-0.0126453144,
-0.331186682,
0.3505340815,
-0.3129050732,
0.3000719249,
0.0955419317,
-0.1801472604,
-0.1500790268,
0.1911477894,
0.3429261446,
-0.0921716988,
0.5646218061,
0.0947340205,
0.3990190923,
-0.3180498183,
-0.4919624925,
0.1922197491,
0.1793983728,
-0.250813812,
-0.5659951568,
-0.3535730243,
-0.160623759,
-0.340716809,
-0.4232777357,
-0.0717137605,
-0.1374008805,
0.2017317712,
-0.3214551806,
-0.021631768,
-0.292925328,
-0.0346347168,
-0.0127412118,
0.3427123427,
0.1697211266,
-0.2110772282,
0.3974739909,
-0.082120508,
0.3321635425,
-0.2659059763,
0.1673607975,
0.0565473661,
-0.2368429005,
-0.246235922,
0.2739785314,
0.1305556297,
-0.0841675624,
0.0217713416,
0.2886646092,
0.1091309488,
-0.2407827079,
0.1194922552,
0.125457719,
0.583635509,
0.0670509487,
0.5859929919,
0.1789161265,
0.3602633476,
0.0608826578,
-0.0031639526,
0.254797101,
0.1796336621,
0.0882038921,
0.1490270644,
-0.1660266966,
-0.2710516751,
-0.1633445919,
0.1672861278,
0.1109900177,
-0.0777893066,
0.2944926023,
0.4754860401,
-0.1721897423,
0.4703605473,
-0.0810872987,
-0.0446163006,
0.0116866119,
0.0380170569,
-0.0310278311,
0.3311305642,
-0.2840283513,
0.0755268484,
0.1878758818,
0.1341213882,
-0.0454442203,
-0.5317233205,
0.7972852588,
-0.3050081134,
-0.1892513633,
-0.2818907499,
0.3368847966,
0.2114262581,
-0.1106370464,
-0.2374488264,
0.0274330433,
-0.2493317574,
-0.2812484205,
-0.1984666139,
-0.0533042885,
-0.2920434177,
0.1029673219,
0.0514633358,
-0.5960324407,
0.106989406,
-0.2322064787,
0.5729321241,
-0.3790605962,
0.1045931503,
-0.0657642931,
-0.209356457,
-0.1626278162,
-0.0070874919,
0.2824582458,
0.2480085045,
-0.1690672189,
-0.2179759294,
-0.1003719941,
-0.2434242368,
-0.1601537913,
0.2256183624,
-0.0253731403,
0.1645831764,
0.1001147777,
0.0776349232,
0.1797301173,
-0.7268229127,
-0.2085726261,
0.0272012372,
0.2609670162,
0.2839909792,
-0.0744254738,
0.3155294359,
0.1378126144,
-0.1766493469,
-0.1323248446,
0.4194302857,
-0.0769567117,
-0.2528688312,
-0.1330253482,
0.0419680662,
0.1788369566,
0.1517904848,
0.44206056,
-0.1673375517,
0.1027848497,
0.0223794188,
-0.1959412843,
-0.3134688437,
-0.1980535388,
-0.056764815,
0.3496710658,
-0.0370447487,
0.1241205484,
-0.2290179729,
-0.5125857592,
0.1457274258,
-0.1106106788,
0.2121103853,
0.1256609559,
-0.3315792382,
-0.0971532017,
0.4307195842,
0.0061919275,
-0.1665686667,
0.0415847301,
-0.1597298086,
0.2058889121,
-0.0072755958,
-0.1105472296,
0.2088843733,
0.097146824,
0.2919770181,
0.4504460692,
0.3401707113,
-0.0702543557,
0.1461792588,
0.1189456359,
0.4619001448,
-0.0725692138,
-0.0189569816,
0.0365774371,
0.3616077006,
-0.0942516327,
0.2670552731,
0.2508041561,
0.5370209813,
0.157800138,
-0.3334541023,
0.1407443285,
-0.0011266174,
0.0168407522,
-0.0349565186,
-0.0293972585,
0.7423943877,
0.0886613429,
0.4548161328,
0.0976241902,
-0.1052290574,
0.0497463308,
0.0706722587,
-0.298207134,
-0.3200120926,
0.1700926721,
-0.2512496114,
0.1522044092,
-0.1100990772,
-0.0280579682,
-0.0896347314,
-0.1401913464,
-0.1429971904,
0.151887089,
0.2873947322,
0.0649262816,
-0.1160389259,
-0.0440655686,
-0.2168455869,
0.2574724555,
0.0891264603,
-0.0151798325,
0.2699399889,
-0.1740834564,
0.1887930334,
0.1882829517,
0.4376368821,
-0.1654494256,
0.2808379829,
0.2957637012,
-0.0424118638,
-0.2989653349,
-0.4278819561,
-0.3164432645,
-0.0064288741,
-0.1498692483,
0.3005524874,
0.1229156181,
-0.3501479328,
0.1867871135,
-0.4390276074,
-0.2368397862,
-0.5237363577,
0.1158804521,
0.0094081555,
0.0711855367,
0.1030557081,
0.0307728853,
0.5409750938,
-0.2853991985,
0.0967014357,
-0.134050101,
-0.3083229661,
0.0993753597,
0.0013544646,
0.2395742089,
-0.0604022406,
0.2097823471,
0.081299603,
0.3348237574,
0.0728453249,
-0.5948604941,
0.1543284506,
0.0096932063,
0.1603825688,
-0.0054534315,
-0.5465569496,
0.1438092142,
-0.3508621454,
0.1390535831,
-0.2130071819,
-0.0825377554,
-0.0648087636,
-0.1963883042,
-0.1453530937,
-0.1572337747,
0.0272408836,
-0.4223481119,
-0.1761987358,
0.384280622,
0.2135612965,
-0.0255784374,
0.1250267625,
0.0594720505,
-0.002008674,
0.0204945952,
-0.1462382376,
-0.0204307511,
0.0450166613,
0.400334537,
-0.1566702127,
-0.0140682058,
-0.247952342,
-0.4340077639,
-0.1029935107,
-0.2318255454,
-0.3111586273,
-0.7258257866,
-0.1302177608,
0.1542341411,
0.0390792415,
-0.0355029181,
0.0733732656,
-0.2161289006,
0.1724021435,
-0.0547055714,
-0.3833324015,
0.0750108585,
-0.0586796589,
-0.0996432379,
-0.4895225465,
0.4194801748,
0.2412154078,
0.3879184723,
-0.036415264,
-0.389667511,
0.0873218998,
0.0769903436,
0.3686598837,
0.0446512178,
-0.1522578001,
0.1994311512,
-0.1945102811,
-0.2475321442,
0.2475539148,
0.0997978896,
-0.198965773,
-0.3358207345,
0.0328708291,
-0.3914499283,
-0.2428810596,
0.0035527886,
0.2393059731,
0.0837494805,
0.0150696477,
-0.0241548698,
-0.5422310233,
-0.1110887825,
0.4076263309,
0.2536964417,
0.0903866291,
-0.1011146381,
-0.2331893593,
-0.176485002,
-0.4281742573,
0.3581776917,
0.097349003,
-0.0104472954,
0.1392203867,
-0.0305082574,
-0.0058139693,
-0.0933933407,
0.173821032,
-0.0761902109,
-0.046623297,
0.0657275245,
-0.5003893971,
-0.0531974398,
-0.2916437984,
-0.2771715522,
-0.0271764379,
0.1963844746,
0.5380578041,
-0.324532479,
0.1257041544,
0.2381217629,
0.0402101986,
-0.2187519372,
-0.0233527254,
-0.1505872756,
0.1194389164,
-0.0051201195,
-0.0420500152,
0.0908681229,
0.1580136716,
0.0723909512,
0.1715501696,
0.0252889022,
-0.0449915119,
0.5337710381,
0.5966699123,
-0.0149758672,
0.0093427813,
0.0359755419,
-0.0603422001,
-0.4722695351,
0.1994302124,
0.2425860614,
-0.045634117,
-0.8425169587,
-0.080787912,
0.1971937716,
0.3074397147,
-0.0292129274,
0.0756808966,
-0.2079824358,
-0.209239766,
0.2380543947,
-0.3294456601,
0.5146923661,
0.0873056352,
0.2418272346,
-0.1696210653,
0.0292584598,
0.3550981879,
0.1916737109,
-0.1663479805,
0.0585923046,
0.0968185216,
-0.1540478468,
0.3305728436,
0.4545245469,
0.818172574,
-0.1192754507,
-0.1273748875,
-0.0061082514,
-0.1531972289,
0.2818472385,
-0.4569686949,
-0.0054494259,
-0.1914541423,
-0.2565262318,
-0.0477844663,
-0.1412291974,
0.0512919463,
-0.1973417103,
-0.0164964516,
0.1554919481,
0.2559522688,
0.2121573538,
0.1271376312,
0.2162206918,
0.0843381658,
-0.3273904622,
0.0339086801,
0.0684918016,
-0.2080328912,
0.1866786331,
-0.1093771085,
0.0122278687,
-0.3065898716,
0.1729825437,
-0.2339271605,
-0.0496130809,
-0.0788517743,
0.2229246795,
0.1845922023,
-0.1346131861,
0.0835816637,
0.3559840322,
0.4857670069,
-0.1557327956,
0.0248112865,
0.0844808146,
-0.2943353355,
0.1334504187,
0.0661284104,
-0.2414876968,
0.2837931812,
-0.0743489638,
0.3252246976,
0.192077443,
0.4238166213,
-0.2977110445,
0.1496538371,
-0.1671897173,
0.1661154777,
-0.0519200824,
0.3414983451,
0.1268107742,
-0.1287819296,
-0.0565657131,
-0.0042446745,
0.1037536934,
-0.2216026485,
0.3126447499,
-0.0375186726,
-0.2261631936,
0.0197010692,
0.0981373861,
-0.0708273947,
-0.1594260633,
-0.0357658602,
-0.1458826512,
-0.2006531507,
-0.0224687755,
-0.2284067124,
-0.1720068902,
-0.3008995652,
0.3120033145,
-0.2381603569,
-0.4723119438,
-0.206920296,
0.3734064102,
0.4046839774,
0.2938786447,
-0.2193952501,
-0.2839438617,
-0.3402782977,
0.2772217989,
-0.2316176593,
0.1614444554,
-0.2128950208,
0.6064301133,
-0.1181393266,
0.2897872925,
-0.2132999748,
-0.2823092937,
-0.2256619632,
-0.0892312154,
-0.4386070073,
-0.3682976365,
-0.0456230231,
-0.0401677154,
-0.0864480138,
0.2165943235,
-0.2286456078,
-0.040544793,
-0.242680341,
0.1813552827,
0.037074592,
0.443595022,
-0.1740811467,
0.3260141611,
0.0507137738,
-0.3729522824,
0.0612893403,
0.0980285928,
-0.0713129565,
0.3006068766,
0.2101422995,
0.1781326085,
0.1156240553,
-0.0499997661,
0.322771281,
0.3425935209,
0.4007495046,
0.3192234635,
-0.3186661601,
-0.0631362498,
0.1415851414,
0.2257973254,
0.137998879,
-0.0919601545,
0.4440922737,
0.298714757,
-0.0951708555,
0.0900458917,
0.3543195426,
0.1519919783,
0.0992798656,
0.1784837693,
-0.1570457667,
0.0648357347,
-0.0882317796,
-0.0521353707,
0.2720231414,
-0.1416468918,
0.2238746434,
0.4102813601,
0.3358772695,
0.2722453773,
0.1774861217,
0.0816789865,
0.2443526983,
0.4868414402,
0.2100977153,
-0.0321221203,
0.0031968281,
0.1310183406,
0.4857234955,
-0.2656272948,
0.4763302803,
-0.0616062395,
-0.1995054185,
0.207107991,
-0.4220937788,
0.2439745665,
0.3563008308,
0.0155827468,
-0.145927459,
-0.2326169163,
0.3047080338,
0.3196400404,
-0.025658235,
-0.0917967483,
-0.030518312,
-0.1278381944,
-0.3761761785,
0.2058968544,
0.1671889871,
-0.1115559638,
-0.1389715374,
-0.0944053307,
-0.2057560831,
0.0793883055,
0.035280142,
-0.4773696065,
-0.1281569153,
0.0162588004,
0.0206924155,
0.3455474675,
-0.1932214946,
0.2982700169,
0.717853725,
-0.1315583736,
-0.1319903284,
0.426073432,
0.0161096696,
-0.1136235893,
0.3595229387,
0.3010452092,
-0.1424921155,
-0.412366122,
0.2452273369,
-0.0206108186,
0.0123120127,
0.0134778172,
0.1357756704,
0.0556338318,
0.2323545218,
0.241400063,
0.0532791913,
-0.1330931038,
0.0651905313,
-0.3356486857,
0.3633425236,
-0.4270903766,
0.134556815,
0.3058609366,
0.0306399427,
-0.100779362,
0.023844976,
-0.0561515465,
-0.4548442662,
0.0233866498,
-0.2907952964,
-0.1105626002,
-0.0574183725,
0.0041974727,
-0.1385184377,
0.2731828988,
0.3027712703,
0.2290837914,
-0.3531988561,
-0.1669386625,
-0.4210652411,
0.0429385491,
0.2039075941,
-0.3283083439,
-0.0392367132,
0.2470378727,
-0.0261072591,
0.5584408641,
-0.0272401497,
0.2986466885,
0.1250825822,
0.079605855,
-0.4260626137,
0.2039915621,
-0.4621123374,
-0.1067148894,
0.1302574426,
0.061768394,
-0.2476507425,
0.0420595072,
-0.0984422639,
0.1118498519,
-0.173892796,
-0.0613050461,
0.5322956443,
0.3644722998,
0.1501181126,
0.3697046638,
0.1324489713,
0.1355473846,
0.0834814608,
-0.2399793714,
0.1174199581,
0.0658705011,
-0.1526994109,
0.356263876,
-0.1907481253,
0.0470766723,
-0.0287961308,
0.2519637644,
0.4928357005,
-0.4842084944,
-0.1030693948,
-0.0302184541,
-0.223747313,
0.0572254807,
0.1399781108,
0.5265302062,
0.1946201473,
0.2372905314,
0.1010438353,
-0.3527946472,
0.4254371822,
-0.2472468615,
0.0713142753,
-0.237630561,
0.0519838184,
0.3838029206,
-0.0993833914,
-0.5770965219,
-0.1266643554,
0.1802993715,
-0.0949136615,
-0.126865074,
0.2416343689,
-0.1855225116,
0.0856403485,
-0.1126957685,
0.1083846837,
-0.0420999229,
0.0535945594,
-0.1877755672,
-0.2174892575
] |
https://github.com/huggingface/datasets/issues/2301 | Unable to setup dev env on Windows | Hi @gchhablani,
There are some 3rd-party dependencies that require to build code in C. In this case, it is the library `python-Levenshtein`.
On Windows, in order to be able to build C code, you need to install at least `Microsoft C++ Build Tools` version 14. You can find more info here: https://visualstudio.microsoft.com/visual-cpp-build-tools/ | Hi
I tried installing the `".[dev]"` version on Windows 10 after cloning.
Here is the error I'm facing:
```bat
(env) C:\testing\datasets>pip install -e ".[dev]"
Obtaining file:///C:/testing/datasets
Requirement already satisfied: numpy>=1.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.5)
Collecting pyarrow>=0.17.1
Using cached pyarrow-4.0.0-cp37-cp37m-win_amd64.whl (13.3 MB)
Requirement already satisfied: dill in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.3.1.1)
Collecting pandas
Using cached pandas-1.2.4-cp37-cp37m-win_amd64.whl (9.1 MB)
Requirement already satisfied: requests>=2.19.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.25.1)
Requirement already satisfied: tqdm<4.50.0,>=4.27 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.49.0)
Requirement already satisfied: xxhash in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.0.2)
Collecting multiprocess
Using cached multiprocess-0.70.11.1-py37-none-any.whl (108 kB)
Requirement already satisfied: fsspec in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2021.4.0)
Collecting huggingface_hub<0.1.0
Using cached huggingface_hub-0.0.8-py3-none-any.whl (34 kB)
Requirement already satisfied: importlib_metadata in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.0.1)
Requirement already satisfied: absl-py in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.12.0)
Requirement already satisfied: pytest in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (6.2.3)
Collecting pytest-xdist
Using cached pytest_xdist-2.2.1-py3-none-any.whl (37 kB)
Collecting apache-beam>=2.24.0
Using cached apache_beam-2.29.0-cp37-cp37m-win_amd64.whl (3.7 MB)
Collecting elasticsearch
Using cached elasticsearch-7.12.1-py2.py3-none-any.whl (339 kB)
Requirement already satisfied: boto3==1.16.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.16.43)
Requirement already satisfied: botocore==1.19.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.43)
Collecting moto[s3]==1.3.16
Using cached moto-1.3.16-py2.py3-none-any.whl (879 kB)
Collecting rarfile>=4.0
Using cached rarfile-4.0-py3-none-any.whl (28 kB)
Collecting tensorflow>=2.3
Using cached tensorflow-2.4.1-cp37-cp37m-win_amd64.whl (370.7 MB)
Requirement already satisfied: torch in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.8.1)
Requirement already satisfied: transformers in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.5.1)
Collecting bs4
Using cached bs4-0.0.1-py3-none-any.whl
Collecting conllu
Using cached conllu-4.4-py2.py3-none-any.whl (15 kB)
Collecting langdetect
Using cached langdetect-1.0.8-py3-none-any.whl
Collecting lxml
Using cached lxml-4.6.3-cp37-cp37m-win_amd64.whl (3.5 MB)
Collecting mwparserfromhell
Using cached mwparserfromhell-0.6-cp37-cp37m-win_amd64.whl (101 kB)
Collecting nltk
Using cached nltk-3.6.2-py3-none-any.whl (1.5 MB)
Collecting openpyxl
Using cached openpyxl-3.0.7-py2.py3-none-any.whl (243 kB)
Collecting py7zr
Using cached py7zr-0.15.2-py3-none-any.whl (66 kB)
Collecting tldextract
Using cached tldextract-3.1.0-py2.py3-none-any.whl (87 kB)
Collecting zstandard
Using cached zstandard-0.15.2-cp37-cp37m-win_amd64.whl (582 kB)
Collecting bert_score>=0.3.6
Using cached bert_score-0.3.9-py3-none-any.whl (59 kB)
Collecting rouge_score
Using cached rouge_score-0.0.4-py2.py3-none-any.whl (22 kB)
Collecting sacrebleu
Using cached sacrebleu-1.5.1-py3-none-any.whl (54 kB)
Requirement already satisfied: scipy in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3)
Collecting seqeval
Using cached seqeval-1.2.2-py3-none-any.whl
Collecting sklearn
Using cached sklearn-0.0-py2.py3-none-any.whl
Collecting jiwer
Using cached jiwer-2.2.0-py3-none-any.whl (13 kB)
Requirement already satisfied: toml>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.10.2)
Requirement already satisfied: requests_file>=1.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.5.1)
Requirement already satisfied: texttable>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3)
Requirement already satisfied: s3fs>=0.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.4.2)
Requirement already satisfied: Werkzeug>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.0.1)
Collecting black
Using cached black-21.4b2-py3-none-any.whl (130 kB)
Collecting isort
Using cached isort-5.8.0-py3-none-any.whl (103 kB)
Collecting flake8==3.7.9
Using cached flake8-3.7.9-py2.py3-none-any.whl (69 kB)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.10.0)
Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.3.7)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (1.26.4)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (2.8.1)
Collecting entrypoints<0.4.0,>=0.3.0
Using cached entrypoints-0.3-py2.py3-none-any.whl (11 kB)
Collecting pyflakes<2.2.0,>=2.1.0
Using cached pyflakes-2.1.1-py2.py3-none-any.whl (59 kB)
Collecting pycodestyle<2.6.0,>=2.5.0
Using cached pycodestyle-2.5.0-py2.py3-none-any.whl (51 kB)
Collecting mccabe<0.7.0,>=0.6.0
Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Requirement already satisfied: jsondiff>=1.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.3.0)
Requirement already satisfied: pytz in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2021.1)
Requirement already satisfied: mock in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.0.3)
Requirement already satisfied: MarkupSafe<2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.1.1)
Requirement already satisfied: python-jose[cryptography]<4.0.0,>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0)
Requirement already satisfied: aws-xray-sdk!=0.96,>=0.93 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.8.0)
Requirement already satisfied: cryptography>=2.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.7)
Requirement already satisfied: more-itertools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (8.7.0)
Requirement already satisfied: PyYAML>=5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.4.1)
Requirement already satisfied: boto>=2.36.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.49.0)
Requirement already satisfied: idna<3,>=2.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.10)
Requirement already satisfied: sshpubkeys>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.3.1)
Requirement already satisfied: responses>=0.9.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.13.3)
Requirement already satisfied: xmltodict in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.12.0)
Requirement already satisfied: setuptools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (52.0.0.post20210125)
Requirement already satisfied: Jinja2>=2.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.11.3)
Requirement already satisfied: zipp in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.1)
Requirement already satisfied: six>1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.15.0)
Requirement already satisfied: ecdsa<0.15 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.14.1)
Requirement already satisfied: docker>=2.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.0.0)
Requirement already satisfied: cfn-lint>=0.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.49.0)
Requirement already satisfied: grpcio<2,>=1.29.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (1.32.0)
Collecting hdfs<3.0.0,>=2.1.0
Using cached hdfs-2.6.0-py3-none-any.whl (33 kB)
Collecting pyarrow>=0.17.1
Using cached pyarrow-3.0.0-cp37-cp37m-win_amd64.whl (12.6 MB)
Collecting fastavro<2,>=0.21.4
Using cached fastavro-1.4.0-cp37-cp37m-win_amd64.whl (394 kB)
Requirement already satisfied: httplib2<0.18.0,>=0.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.17.4)
Collecting pymongo<4.0.0,>=3.8.0
Using cached pymongo-3.11.3-cp37-cp37m-win_amd64.whl (382 kB)
Collecting crcmod<2.0,>=1.7
Using cached crcmod-1.7-py3-none-any.whl
Collecting avro-python3!=1.9.2,<1.10.0,>=1.8.1
Using cached avro_python3-1.9.2.1-py3-none-any.whl
Requirement already satisfied: typing-extensions<3.8.0,>=3.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.7.4.3)
Requirement already satisfied: future<1.0.0,>=0.18.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.18.2)
Collecting oauth2client<5,>=2.0.1
Using cached oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
Collecting pydot<2,>=1.2.0
Using cached pydot-1.4.2-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: protobuf<4,>=3.12.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.15.8)
Requirement already satisfied: wrapt in c:\programdata\anaconda3\envs\env\lib\site-packages (from aws-xray-sdk!=0.96,>=0.93->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.12.1)
Collecting matplotlib
Using cached matplotlib-3.4.1-cp37-cp37m-win_amd64.whl (7.1 MB)
Requirement already satisfied: junit-xml~=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.9)
Requirement already satisfied: jsonpatch in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.32)
Requirement already satisfied: jsonschema~=3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0)
Requirement already satisfied: networkx~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.5.1)
Requirement already satisfied: aws-sam-translator>=1.35.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.35.0)
Requirement already satisfied: cffi>=1.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.14.5)
Requirement already satisfied: pycparser in c:\programdata\anaconda3\envs\env\lib\site-packages (from cffi>=1.12->cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.20)
Requirement already satisfied: pywin32==227 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (227)
Requirement already satisfied: websocket-client>=0.32.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.58.0)
Requirement already satisfied: docopt in c:\programdata\anaconda3\envs\env\lib\site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.6.2)
Requirement already satisfied: filelock in c:\programdata\anaconda3\envs\env\lib\site-packages (from huggingface_hub<0.1.0->datasets==1.5.0.dev0) (3.0.12)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.17.3)
Requirement already satisfied: attrs>=17.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (20.3.0)
Requirement already satisfied: decorator<5,>=4.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from networkx~=2.4->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.4.2)
Requirement already satisfied: rsa>=3.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (4.7.2)
Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.2.8)
Requirement already satisfied: pyasn1>=0.1.7 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.4.8)
Requirement already satisfied: pyparsing>=2.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pydot<2,>=1.2.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (2.4.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (2020.12.5)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (4.0.0)
Collecting keras-preprocessing~=1.1.2
Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Requirement already satisfied: termcolor~=1.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (1.1.0)
Requirement already satisfied: tensorboard~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.5.0)
Requirement already satisfied: wheel~=0.35 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (0.36.2)
Collecting opt-einsum~=3.3.0
Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting gast==0.3.3
Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Collecting google-pasta~=0.2
Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Requirement already satisfied: tensorflow-estimator<2.5.0,>=2.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.4.0)
Collecting astunparse~=1.6.3
Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting flatbuffers~=1.12.0
Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting h5py~=2.10.0
Using cached h5py-2.10.0-cp37-cp37m-win_amd64.whl (2.5 MB)
Requirement already satisfied: markdown>=2.6.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.3.4)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.8.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.4.4)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.6.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.30.0)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (4.2.2)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.3.0)
Requirement already satisfied: oauthlib>=3.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.1.0)
Requirement already satisfied: regex!=2019.12.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (2021.4.4)
Requirement already satisfied: tokenizers<0.11,>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.10.2)
Requirement already satisfied: sacremoses in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.0.45)
Requirement already satisfied: packaging in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (20.9)
Collecting pathspec<1,>=0.8.1
Using cached pathspec-0.8.1-py2.py3-none-any.whl (28 kB)
Requirement already satisfied: click>=7.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (7.1.2)
Collecting appdirs
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting mypy-extensions>=0.4.3
Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Requirement already satisfied: typed-ast>=1.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (1.4.3)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
Requirement already satisfied: soupsieve>1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from beautifulsoup4->bs4->datasets==1.5.0.dev0) (2.2.1)
Collecting python-Levenshtein
Using cached python-Levenshtein-0.12.2.tar.gz (50 kB)
Requirement already satisfied: jsonpointer>=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonpatch->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.1)
Requirement already satisfied: pillow>=6.2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (8.2.0)
Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (1.3.1)
Collecting multiprocess
Using cached multiprocess-0.70.11-py3-none-any.whl (98 kB)
Using cached multiprocess-0.70.10.zip (2.4 MB)
Using cached multiprocess-0.70.9-py3-none-any.whl
Requirement already satisfied: joblib in c:\programdata\anaconda3\envs\env\lib\site-packages (from nltk->datasets==1.5.0.dev0) (1.0.1)
Collecting et-xmlfile
Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Requirement already satisfied: pyzstd<0.15.0,>=0.14.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from py7zr->datasets==1.5.0.dev0) (0.14.4)
Collecting pyppmd<0.13.0,>=0.12.1
Using cached pyppmd-0.12.1-cp37-cp37m-win_amd64.whl (32 kB)
Collecting pycryptodome>=3.6.6
Using cached pycryptodome-3.10.1-cp35-abi3-win_amd64.whl (1.6 MB)
Collecting bcj-cffi<0.6.0,>=0.5.1
Using cached bcj_cffi-0.5.1-cp37-cp37m-win_amd64.whl (21 kB)
Collecting multivolumefile<0.3.0,>=0.2.0
Using cached multivolumefile-0.2.3-py3-none-any.whl (17 kB)
Requirement already satisfied: iniconfig in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.1.1)
Requirement already satisfied: py>=1.8.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.10.0)
Requirement already satisfied: pluggy<1.0.0a1,>=0.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.13.1)
Requirement already satisfied: atomicwrites>=1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.4.0)
Requirement already satisfied: colorama in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.4.4)
Collecting pytest-forked
Using cached pytest_forked-1.3.0-py2.py3-none-any.whl (4.7 kB)
Collecting execnet>=1.1
Using cached execnet-1.8.0-py2.py3-none-any.whl (39 kB)
Requirement already satisfied: apipkg>=1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from execnet>=1.1->pytest-xdist->datasets==1.5.0.dev0) (1.5)
Collecting portalocker==2.0.0
Using cached portalocker-2.0.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: scikit-learn>=0.21.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from seqeval->datasets==1.5.0.dev0) (0.24.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from scikit-learn>=0.21.3->seqeval->datasets==1.5.0.dev0) (2.1.0)
Building wheels for collected packages: python-Levenshtein
Building wheel for python-Levenshtein (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\VKC~1\AppData\Local\Temp\pip-wheel-8jh7fm18'
cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\
Complete output (27 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-INFO
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for python-Levenshtein
Running setup.py clean for python-Levenshtein
Failed to build python-Levenshtein
Installing collected packages: python-Levenshtein, pytest-forked, pyppmd, pymongo, pyflakes, pydot, pycryptodome, pycodestyle, pyarrow, portalocker, pathspec, pandas, opt-einsum, oauth2client, nltk, mypy-extensions, multivolumefile, multiprocess, moto, mccabe, matplotlib, keras-preprocessing, huggingface-hub, hdfs, h5py, google-pasta, gast, flatbuffers, fastavro, execnet, et-xmlfile, entrypoints, crcmod, beautifulsoup4, bcj-cffi, avro-python3, astunparse, appdirs, zstandard, tldextract, tensorflow, sklearn, seqeval, sacrebleu, rouge-score, rarfile, pytest-xdist, py7zr, openpyxl, mwparserfromhell, lxml, langdetect, jiwer, isort, flake8, elasticsearch, datasets, conllu, bs4, black, bert-score, apache-beam
Running setup.py install for python-Levenshtein ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein'
cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\
Complete output (27 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-INFO
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein' Check the logs for full command output.
```
Here are conda and python versions:
```bat
(env) C:\testing\datasets>conda --version
conda 4.9.2
(env) C:\testing\datasets>python --version
Python 3.7.10
```
Please help me out. Thanks. | 52 | Unable to setup dev env on Windows
Hi
I tried installing the `".[dev]"` version on Windows 10 after cloning.
Here is the error I'm facing:
```bat
(env) C:\testing\datasets>pip install -e ".[dev]"
Obtaining file:///C:/testing/datasets
Requirement already satisfied: numpy>=1.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.5)
Collecting pyarrow>=0.17.1
Using cached pyarrow-4.0.0-cp37-cp37m-win_amd64.whl (13.3 MB)
Requirement already satisfied: dill in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.3.1.1)
Collecting pandas
Using cached pandas-1.2.4-cp37-cp37m-win_amd64.whl (9.1 MB)
Requirement already satisfied: requests>=2.19.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.25.1)
Requirement already satisfied: tqdm<4.50.0,>=4.27 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.49.0)
Requirement already satisfied: xxhash in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.0.2)
Collecting multiprocess
Using cached multiprocess-0.70.11.1-py37-none-any.whl (108 kB)
Requirement already satisfied: fsspec in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2021.4.0)
Collecting huggingface_hub<0.1.0
Using cached huggingface_hub-0.0.8-py3-none-any.whl (34 kB)
Requirement already satisfied: importlib_metadata in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.0.1)
Requirement already satisfied: absl-py in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.12.0)
Requirement already satisfied: pytest in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (6.2.3)
Collecting pytest-xdist
Using cached pytest_xdist-2.2.1-py3-none-any.whl (37 kB)
Collecting apache-beam>=2.24.0
Using cached apache_beam-2.29.0-cp37-cp37m-win_amd64.whl (3.7 MB)
Collecting elasticsearch
Using cached elasticsearch-7.12.1-py2.py3-none-any.whl (339 kB)
Requirement already satisfied: boto3==1.16.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.16.43)
Requirement already satisfied: botocore==1.19.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.43)
Collecting moto[s3]==1.3.16
Using cached moto-1.3.16-py2.py3-none-any.whl (879 kB)
Collecting rarfile>=4.0
Using cached rarfile-4.0-py3-none-any.whl (28 kB)
Collecting tensorflow>=2.3
Using cached tensorflow-2.4.1-cp37-cp37m-win_amd64.whl (370.7 MB)
Requirement already satisfied: torch in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.8.1)
Requirement already satisfied: transformers in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.5.1)
Collecting bs4
Using cached bs4-0.0.1-py3-none-any.whl
Collecting conllu
Using cached conllu-4.4-py2.py3-none-any.whl (15 kB)
Collecting langdetect
Using cached langdetect-1.0.8-py3-none-any.whl
Collecting lxml
Using cached lxml-4.6.3-cp37-cp37m-win_amd64.whl (3.5 MB)
Collecting mwparserfromhell
Using cached mwparserfromhell-0.6-cp37-cp37m-win_amd64.whl (101 kB)
Collecting nltk
Using cached nltk-3.6.2-py3-none-any.whl (1.5 MB)
Collecting openpyxl
Using cached openpyxl-3.0.7-py2.py3-none-any.whl (243 kB)
Collecting py7zr
Using cached py7zr-0.15.2-py3-none-any.whl (66 kB)
Collecting tldextract
Using cached tldextract-3.1.0-py2.py3-none-any.whl (87 kB)
Collecting zstandard
Using cached zstandard-0.15.2-cp37-cp37m-win_amd64.whl (582 kB)
Collecting bert_score>=0.3.6
Using cached bert_score-0.3.9-py3-none-any.whl (59 kB)
Collecting rouge_score
Using cached rouge_score-0.0.4-py2.py3-none-any.whl (22 kB)
Collecting sacrebleu
Using cached sacrebleu-1.5.1-py3-none-any.whl (54 kB)
Requirement already satisfied: scipy in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3)
Collecting seqeval
Using cached seqeval-1.2.2-py3-none-any.whl
Collecting sklearn
Using cached sklearn-0.0-py2.py3-none-any.whl
Collecting jiwer
Using cached jiwer-2.2.0-py3-none-any.whl (13 kB)
Requirement already satisfied: toml>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.10.2)
Requirement already satisfied: requests_file>=1.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.5.1)
Requirement already satisfied: texttable>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3)
Requirement already satisfied: s3fs>=0.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.4.2)
Requirement already satisfied: Werkzeug>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.0.1)
Collecting black
Using cached black-21.4b2-py3-none-any.whl (130 kB)
Collecting isort
Using cached isort-5.8.0-py3-none-any.whl (103 kB)
Collecting flake8==3.7.9
Using cached flake8-3.7.9-py2.py3-none-any.whl (69 kB)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.10.0)
Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.3.7)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (1.26.4)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (2.8.1)
Collecting entrypoints<0.4.0,>=0.3.0
Using cached entrypoints-0.3-py2.py3-none-any.whl (11 kB)
Collecting pyflakes<2.2.0,>=2.1.0
Using cached pyflakes-2.1.1-py2.py3-none-any.whl (59 kB)
Collecting pycodestyle<2.6.0,>=2.5.0
Using cached pycodestyle-2.5.0-py2.py3-none-any.whl (51 kB)
Collecting mccabe<0.7.0,>=0.6.0
Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Requirement already satisfied: jsondiff>=1.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.3.0)
Requirement already satisfied: pytz in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2021.1)
Requirement already satisfied: mock in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.0.3)
Requirement already satisfied: MarkupSafe<2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.1.1)
Requirement already satisfied: python-jose[cryptography]<4.0.0,>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0)
Requirement already satisfied: aws-xray-sdk!=0.96,>=0.93 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.8.0)
Requirement already satisfied: cryptography>=2.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.7)
Requirement already satisfied: more-itertools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (8.7.0)
Requirement already satisfied: PyYAML>=5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.4.1)
Requirement already satisfied: boto>=2.36.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.49.0)
Requirement already satisfied: idna<3,>=2.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.10)
Requirement already satisfied: sshpubkeys>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.3.1)
Requirement already satisfied: responses>=0.9.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.13.3)
Requirement already satisfied: xmltodict in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.12.0)
Requirement already satisfied: setuptools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (52.0.0.post20210125)
Requirement already satisfied: Jinja2>=2.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.11.3)
Requirement already satisfied: zipp in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.1)
Requirement already satisfied: six>1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.15.0)
Requirement already satisfied: ecdsa<0.15 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.14.1)
Requirement already satisfied: docker>=2.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.0.0)
Requirement already satisfied: cfn-lint>=0.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.49.0)
Requirement already satisfied: grpcio<2,>=1.29.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (1.32.0)
Collecting hdfs<3.0.0,>=2.1.0
Using cached hdfs-2.6.0-py3-none-any.whl (33 kB)
Collecting pyarrow>=0.17.1
Using cached pyarrow-3.0.0-cp37-cp37m-win_amd64.whl (12.6 MB)
Collecting fastavro<2,>=0.21.4
Using cached fastavro-1.4.0-cp37-cp37m-win_amd64.whl (394 kB)
Requirement already satisfied: httplib2<0.18.0,>=0.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.17.4)
Collecting pymongo<4.0.0,>=3.8.0
Using cached pymongo-3.11.3-cp37-cp37m-win_amd64.whl (382 kB)
Collecting crcmod<2.0,>=1.7
Using cached crcmod-1.7-py3-none-any.whl
Collecting avro-python3!=1.9.2,<1.10.0,>=1.8.1
Using cached avro_python3-1.9.2.1-py3-none-any.whl
Requirement already satisfied: typing-extensions<3.8.0,>=3.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.7.4.3)
Requirement already satisfied: future<1.0.0,>=0.18.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.18.2)
Collecting oauth2client<5,>=2.0.1
Using cached oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
Collecting pydot<2,>=1.2.0
Using cached pydot-1.4.2-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: protobuf<4,>=3.12.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.15.8)
Requirement already satisfied: wrapt in c:\programdata\anaconda3\envs\env\lib\site-packages (from aws-xray-sdk!=0.96,>=0.93->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.12.1)
Collecting matplotlib
Using cached matplotlib-3.4.1-cp37-cp37m-win_amd64.whl (7.1 MB)
Requirement already satisfied: junit-xml~=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.9)
Requirement already satisfied: jsonpatch in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.32)
Requirement already satisfied: jsonschema~=3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0)
Requirement already satisfied: networkx~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.5.1)
Requirement already satisfied: aws-sam-translator>=1.35.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.35.0)
Requirement already satisfied: cffi>=1.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.14.5)
Requirement already satisfied: pycparser in c:\programdata\anaconda3\envs\env\lib\site-packages (from cffi>=1.12->cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.20)
Requirement already satisfied: pywin32==227 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (227)
Requirement already satisfied: websocket-client>=0.32.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.58.0)
Requirement already satisfied: docopt in c:\programdata\anaconda3\envs\env\lib\site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.6.2)
Requirement already satisfied: filelock in c:\programdata\anaconda3\envs\env\lib\site-packages (from huggingface_hub<0.1.0->datasets==1.5.0.dev0) (3.0.12)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.17.3)
Requirement already satisfied: attrs>=17.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (20.3.0)
Requirement already satisfied: decorator<5,>=4.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from networkx~=2.4->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.4.2)
Requirement already satisfied: rsa>=3.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (4.7.2)
Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.2.8)
Requirement already satisfied: pyasn1>=0.1.7 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.4.8)
Requirement already satisfied: pyparsing>=2.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pydot<2,>=1.2.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (2.4.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (2020.12.5)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (4.0.0)
Collecting keras-preprocessing~=1.1.2
Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Requirement already satisfied: termcolor~=1.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (1.1.0)
Requirement already satisfied: tensorboard~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.5.0)
Requirement already satisfied: wheel~=0.35 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (0.36.2)
Collecting opt-einsum~=3.3.0
Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting gast==0.3.3
Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Collecting google-pasta~=0.2
Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Requirement already satisfied: tensorflow-estimator<2.5.0,>=2.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.4.0)
Collecting astunparse~=1.6.3
Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting flatbuffers~=1.12.0
Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting h5py~=2.10.0
Using cached h5py-2.10.0-cp37-cp37m-win_amd64.whl (2.5 MB)
Requirement already satisfied: markdown>=2.6.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.3.4)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.8.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.4.4)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.6.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.30.0)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (4.2.2)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.3.0)
Requirement already satisfied: oauthlib>=3.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.1.0)
Requirement already satisfied: regex!=2019.12.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (2021.4.4)
Requirement already satisfied: tokenizers<0.11,>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.10.2)
Requirement already satisfied: sacremoses in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.0.45)
Requirement already satisfied: packaging in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (20.9)
Collecting pathspec<1,>=0.8.1
Using cached pathspec-0.8.1-py2.py3-none-any.whl (28 kB)
Requirement already satisfied: click>=7.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (7.1.2)
Collecting appdirs
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting mypy-extensions>=0.4.3
Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Requirement already satisfied: typed-ast>=1.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (1.4.3)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
Requirement already satisfied: soupsieve>1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from beautifulsoup4->bs4->datasets==1.5.0.dev0) (2.2.1)
Collecting python-Levenshtein
Using cached python-Levenshtein-0.12.2.tar.gz (50 kB)
Requirement already satisfied: jsonpointer>=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonpatch->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.1)
Requirement already satisfied: pillow>=6.2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (8.2.0)
Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (1.3.1)
Collecting multiprocess
Using cached multiprocess-0.70.11-py3-none-any.whl (98 kB)
Using cached multiprocess-0.70.10.zip (2.4 MB)
Using cached multiprocess-0.70.9-py3-none-any.whl
Requirement already satisfied: joblib in c:\programdata\anaconda3\envs\env\lib\site-packages (from nltk->datasets==1.5.0.dev0) (1.0.1)
Collecting et-xmlfile
Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Requirement already satisfied: pyzstd<0.15.0,>=0.14.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from py7zr->datasets==1.5.0.dev0) (0.14.4)
Collecting pyppmd<0.13.0,>=0.12.1
Using cached pyppmd-0.12.1-cp37-cp37m-win_amd64.whl (32 kB)
Collecting pycryptodome>=3.6.6
Using cached pycryptodome-3.10.1-cp35-abi3-win_amd64.whl (1.6 MB)
Collecting bcj-cffi<0.6.0,>=0.5.1
Using cached bcj_cffi-0.5.1-cp37-cp37m-win_amd64.whl (21 kB)
Collecting multivolumefile<0.3.0,>=0.2.0
Using cached multivolumefile-0.2.3-py3-none-any.whl (17 kB)
Requirement already satisfied: iniconfig in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.1.1)
Requirement already satisfied: py>=1.8.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.10.0)
Requirement already satisfied: pluggy<1.0.0a1,>=0.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.13.1)
Requirement already satisfied: atomicwrites>=1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.4.0)
Requirement already satisfied: colorama in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.4.4)
Collecting pytest-forked
Using cached pytest_forked-1.3.0-py2.py3-none-any.whl (4.7 kB)
Collecting execnet>=1.1
Using cached execnet-1.8.0-py2.py3-none-any.whl (39 kB)
Requirement already satisfied: apipkg>=1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from execnet>=1.1->pytest-xdist->datasets==1.5.0.dev0) (1.5)
Collecting portalocker==2.0.0
Using cached portalocker-2.0.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: scikit-learn>=0.21.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from seqeval->datasets==1.5.0.dev0) (0.24.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from scikit-learn>=0.21.3->seqeval->datasets==1.5.0.dev0) (2.1.0)
Building wheels for collected packages: python-Levenshtein
Building wheel for python-Levenshtein (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\VKC~1\AppData\Local\Temp\pip-wheel-8jh7fm18'
cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\
Complete output (27 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-INFO
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for python-Levenshtein
Running setup.py clean for python-Levenshtein
Failed to build python-Levenshtein
Installing collected packages: python-Levenshtein, pytest-forked, pyppmd, pymongo, pyflakes, pydot, pycryptodome, pycodestyle, pyarrow, portalocker, pathspec, pandas, opt-einsum, oauth2client, nltk, mypy-extensions, multivolumefile, multiprocess, moto, mccabe, matplotlib, keras-preprocessing, huggingface-hub, hdfs, h5py, google-pasta, gast, flatbuffers, fastavro, execnet, et-xmlfile, entrypoints, crcmod, beautifulsoup4, bcj-cffi, avro-python3, astunparse, appdirs, zstandard, tldextract, tensorflow, sklearn, seqeval, sacrebleu, rouge-score, rarfile, pytest-xdist, py7zr, openpyxl, mwparserfromhell, lxml, langdetect, jiwer, isort, flake8, elasticsearch, datasets, conllu, bs4, black, bert-score, apache-beam
Running setup.py install for python-Levenshtein ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein'
cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\
Complete output (27 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-INFO
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein' Check the logs for full command output.
```
Here are conda and python versions:
```bat
(env) C:\testing\datasets>conda --version
conda 4.9.2
(env) C:\testing\datasets>python --version
Python 3.7.10
```
Please help me out. Thanks.
Hi @gchhablani,
There are some 3rd-party dependencies that require to build code in C. In this case, it is the library `python-Levenshtein`.
On Windows, in order to be able to build C code, you need to install at least `Microsoft C++ Build Tools` version 14. You can find more info here: https://visualstudio.microsoft.com/visual-cpp-build-tools/ | [
-0.4121342003,
-0.0855781734,
-0.0977277234,
-0.1387810409,
0.3114473522,
0.0683752969,
0.3448514938,
0.0465875827,
-0.1001304463,
0.1562346071,
0.0433797985,
0.2424266189,
0.1581841856,
0.2162972838,
0.0545784608,
0.0232142229,
0.1360676885,
0.43907547,
-0.2185963988,
0.0374389701,
-0.0659957305,
-0.0208859928,
-0.1535533071,
-0.04361137,
0.3134843707,
-0.0264740065,
-0.2292297632,
0.1753229946,
-0.3534286618,
-0.3225589693,
0.4030123353,
-0.1064586043,
0.4329041839,
0.1327629238,
-0.0001171767,
0.201609835,
0.3223025501,
-0.1553240865,
-0.0909360424,
0.0166197121,
-0.0741045624,
-0.4187880754,
-0.0570752472,
-0.1152199432,
0.0013724027,
-0.3153114319,
0.1467732042,
-0.3042210042,
0.0935275853,
0.1765606701,
0.1489830315,
0.0158208273,
0.3976293504,
-0.0599443577,
-0.0897257999,
0.2228937149,
-0.104783915,
0.222446993,
0.3808672726,
-0.076793015,
0.262326479,
-0.0150635727,
0.2122559994,
0.0888137966,
0.1605116725,
0.0911397114,
0.8259809613,
-0.3334534466,
-0.0124987112,
-0.0583253652,
0.4455648959,
-0.1256537437,
-0.2552552819,
0.2472819984,
0.1414014101,
-0.3256049454,
0.261488229,
0.3790608048,
-0.3644766212,
0.0435969681,
-0.3627213836,
-0.2574137151,
-0.4395215213,
0.0149608385,
0.1180064604,
0.0826291814,
0.1625452638,
0.1449575424,
-0.0660312101,
0.081497699,
0.433249712,
0.0780941993,
-0.1706450433,
0.01941403,
-0.1333715767,
-0.1515954286,
-0.2876422703,
0.3090681136,
-0.0119876759,
0.0120720137,
-0.3012444675,
-0.2072134763,
0.2847517431,
0.0740564689,
-0.0211099088,
0.3143175542,
0.0671258569,
-0.0794964731,
0.1001376584,
-0.1034923196,
0.4024322927,
0.0954256654,
-0.2204104215,
-0.4841091931,
-0.1915216595,
0.5020332932,
0.0810901076,
-0.1381355971,
-0.2252846509,
-0.0552830324,
-0.278065145,
0.1433480978,
0.22622706,
0.2479150742,
-0.0905874744,
-0.0975939184,
0.0245642122,
0.2494823784,
-0.205381602,
0.1113190651,
0.1260858923,
0.1531593204,
-0.4578860998,
-0.3628820181,
0.2566353977,
-0.2950874567,
0.3838173747,
0.273247987,
-0.0795327574,
0.2728427052,
-0.0912640169,
0.1905030757,
0.1253394783,
0.2146690786,
0.1924124956,
0.186855495,
-0.001793518,
-0.2911954522,
-0.0418694988,
0.2853321731,
0.0168279111,
-0.2246381342,
-0.3471562564,
0.1082542241,
-0.1117700785,
0.0175555497,
0.0353534669,
-0.06905967,
0.0887758806,
0.1203758344,
-0.052640453,
-0.1925054491,
0.0195801053,
-0.1289805621,
0.3793911934,
0.0687450916,
-0.4063454568,
0.2841973603,
0.0773416236,
-0.1427743137,
0.1688279808,
0.0324343443,
-0.0016664289,
0.1482704729,
-0.2415355146,
-0.2094380409,
-0.1005015075,
-0.4556683004,
-0.1719737202,
0.3552169204,
-0.0029000337,
-0.4598072469,
0.2365486175,
-0.1201218739,
0.0676398948,
-0.1652121395,
-0.0883099884,
0.2276966125,
-0.035136316,
-0.214529857,
-0.168868795,
-0.2638673782,
0.1783892065,
-0.0220466536,
-0.0101095643,
-0.2324422002,
-0.0198162645,
-0.1845358908,
-0.0388983265,
-0.1567319632,
0.2039207965,
0.3812172413,
0.5579844713,
-0.0816561431,
-0.0684600472,
0.0482344441,
-0.1448990554,
0.1590221077,
-0.4344111681,
0.1075438857,
-0.0217333101,
0.1493282318,
-0.0466755405,
0.0853103772,
-0.4496679902,
-0.3711808324,
0.1167883798,
0.0079460442,
0.3306220174,
-0.0743471831,
0.1798879504,
0.0693050921,
0.0324370675,
0.1059977338,
-0.1664111167,
0.1343198866,
-0.745934546,
-0.0168208797,
-0.1043570712,
0.1043143794,
0.0355914533,
-0.0769523755,
0.0382833034,
0.1590628326,
-0.1584958285,
-0.3072971404,
-0.0413641073,
-0.3169020712,
0.2125231922,
-0.5566608906,
0.2742672265,
0.1649558395,
0.0273891352,
0.1721839309,
-0.0810751021,
-0.1246722639,
-0.2803694606,
-0.0341618434,
-0.0767953098,
0.2971681356,
0.3042372167,
0.0494523868,
0.0207222831,
-0.1933781058,
0.4338949323,
0.57590276,
0.0313211568,
-0.3306668401,
0.2104429156,
0.0414406396,
-0.1986911148,
-0.0196559764,
-0.1421070397,
-0.0658595562,
-0.0807880014,
0.034791369,
0.1587104052,
-0.0406576432,
0.5600027442,
0.1366594583,
-0.0128204357,
0.223614946,
-0.2414536029,
-0.0290231109,
0.4613447785,
-0.0718434751,
-0.0432940014,
0.1160502508,
-0.3231310248,
-0.1007456332,
-0.0150389299,
-0.2076588571,
0.436006844,
0.3666131198,
-0.414540261,
-0.0872978121,
-0.425106883,
0.0179414917,
-0.3845636547,
-0.5058636665,
-0.1485283077,
0.07296893,
0.2087070197,
-0.1159326807,
0.2937574983,
0.3787653148,
0.1709455401,
-0.1817636937,
-0.0483663231,
-0.0111405635,
-0.0018851332,
-0.0123815071,
-0.2988423705,
0.073453404,
0.3527613282,
0.1322948039,
0.4342381954,
0.0266307238,
0.0442592017,
-0.174736619,
-0.3875648677,
-0.0144542176,
-0.1596357375,
0.7915340662,
0.1893676519,
0.1281996071,
-0.0219016094,
-0.2373071164,
0.2668536901,
0.046285551,
-0.2804475427,
0.0047873249,
-0.2273964435,
-0.4810547829,
-0.1802191883,
-0.3516545296,
-0.1246600896,
-0.0893753767,
-0.1071808264,
-0.1341090798,
-0.0714600235,
0.4129341245,
-0.0137821957,
-0.0348016731,
0.247074917,
-0.0075237486,
-0.0635410696,
0.111187458,
0.2345681041,
-0.4932154119,
-0.4311945438,
0.232413739,
0.0099822385,
0.1128877997,
0.1875329465,
-0.2512130439,
-0.1148041785,
-0.1031350717,
0.008419917,
-0.0645649135,
0.2379443049,
0.4715804756,
0.2665563226,
0.0352038853,
-0.0425960049,
-0.2322523147,
0.1093987748,
-0.0791743845,
0.4247241318,
0.2350771725,
0.577147305,
0.0135585964,
0.4463894665,
0.7228885889,
0.091410473,
0.2535393834,
-0.0413703732,
0.3796831071,
0.0905266032,
-0.3451047838,
0.2690577805,
0.0630212203,
-0.0072043287,
0.1809090376,
-0.0321067683,
-0.1778545976,
-0.2200648934,
0.0465762354,
-0.0596496724,
0.029870946,
-0.1174277142,
-0.3436401486,
0.3009178638,
-0.2163114548,
0.1664455533,
0.1327336133,
-0.0476563908,
0.0549119227,
0.462567836,
-0.2057617307,
0.2380176634,
-0.4431186616,
-0.5577785373,
-0.3410710096,
0.2160666883,
-0.0173756629,
0.6229289174,
-0.2246489525,
0.4463387728,
0.1381701827,
-0.2857892811,
0.4693849385,
-0.474642396,
0.052485615,
-0.0733333975,
0.0820762068,
-0.3210382164,
-0.2203686237,
0.0427086167,
0.1718379855,
-0.0350634865,
-0.1515043974,
-0.1922939122,
0.2373287529,
0.2754105926,
0.0534360483,
-0.1614239961,
-0.0936392695,
-0.2664474249,
-0.4962081611,
-0.0505330153,
-0.0729669705,
0.0656279624,
0.0504234508,
0.2158269584,
0.2125392258,
-0.0627411827,
0.0499402098,
0.1299735308,
-0.0029516348,
0.0127463033,
-0.0393294543,
0.277926147,
-0.0897326171,
0.2420693487,
0.0891639516,
0.2664801478,
-0.214750424,
-0.18881616,
-0.0411367565,
-0.1824872643,
0.4089697599,
0.0675261691,
-0.1009932309,
-0.3996092677,
-0.0261757541,
-0.1057993695,
-0.2291748673,
-0.1686865687,
0.2476263046,
0.0220553167,
-0.3125371635,
-0.1065755561,
0.0946873501,
-0.0872682482,
0.1268504411,
0.3581095934,
0.2488822788,
-0.2112710923,
-0.0633667931,
0.3672280312,
0.6484231949,
0.0318693072,
-0.1837053448,
0.0639480725,
-0.5025160313,
0.1271098554,
0.0638687536,
0.1315514892,
-0.1698898077,
-0.1872190833,
0.0249396544,
-0.1965132654,
0.3248554766,
0.0538664758,
-0.4849866629,
0.1431675255,
0.4321354926,
0.1235223562,
0.1298969686,
0.1036316827,
0.0593837164,
-0.1762976199,
0.1346550882,
0.1409142762,
0.0725383162,
0.152426973,
-0.1616718471,
0.0688694194,
-0.1432239115,
-0.2424302399,
-0.6267002225,
0.1124728844,
-0.2296545804,
0.2772509754,
-0.201339215,
-0.6081687808,
0.4104796052,
0.3885931373,
0.5692141056,
0.2539716065,
-0.2626108825,
0.0875654742,
-0.0031407406,
-0.3031444252,
0.1424963027,
-0.0968287736,
0.0821557939,
-0.2844583094,
-0.3339812756,
-0.1550787836,
-0.0683826581,
0.043343123,
-0.3456450701,
-0.0371469371,
-0.1009886712,
0.0593317263,
0.2151549459,
-0.1247694865,
0.2778620422,
0.0004333054,
0.0718654841,
-0.0310865883,
-0.0376363061,
0.3993117511,
-0.2985117435,
-0.1572422385,
-0.0628592223,
0.0892675817,
-0.1416339427,
-0.0978495926,
0.3126450479,
0.0009065993,
-0.1707309186,
-0.1474592835,
0.0576618686,
-0.2658413351,
-0.2694556117,
-0.4231140316,
0.1549920291,
0.0106097041,
0.137302056,
-0.1414524913,
0.1642698497,
-0.2475139946,
-0.0291164834,
-0.3162648976,
-0.1858842075,
-0.09115614,
-0.2300190628,
0.2858869731,
0.1424528211,
0.2312101126,
0.25922966,
-0.0326084197,
-0.2188582271,
0.0014804264,
0.2834208906,
0.1979219317,
-0.0843518376,
-0.3264653981,
-0.0342851691,
-0.0405880287,
0.0829680264,
-0.2389817089,
-0.1508959383,
-0.120162189,
0.1044124588,
0.1108315811,
0.0316661485,
-0.215853259,
0.1758565605,
-0.3454002738,
-0.3830913901,
0.038858179,
-0.0019294966,
0.1529798806,
-0.1848097891,
0.3930835128,
0.0458365455,
-0.0579171441,
-0.266142875,
0.0873573124,
-0.2104157954,
0.5279397964,
0.0870260224,
0.242591098,
0.0917047113,
-0.0350839682,
-0.6708033085,
0.210380882,
0.0831122622,
0.0742152333,
-0.03490768,
-0.1580379307,
0.1837058216,
-0.2213373482,
0.2976180911,
0.3265205324,
-0.0052292813,
0.188048318,
0.5457714796,
0.1286130995,
-0.2370144427,
0.1696368903,
0.1250644773,
-0.0786487684,
-0.111088112,
0.1126400456,
0.2368841022,
-0.2054820508,
0.3799752593,
-0.0941827521,
0.4906443059,
-0.2079766691,
0.0040079495,
0.5395568013,
0.0277874172,
0.0393730588,
-0.0421882421,
0.0318806842,
0.1792411357,
0.5831440687,
0.0031547002,
0.0298064873,
0.1406379491,
0.3013632894,
-0.1679569036,
-0.0243420321,
-0.180692181,
-0.2011104971,
0.2749940157,
0.0183631182,
0.2508784235,
0.6245894432,
-0.409029156,
-0.0618055724,
-0.5428096056,
0.205214709,
-0.2572386563,
-0.0793285146,
-0.2710340619,
0.2098783404,
0.0581041276,
0.0631145388,
0.1123115197,
-0.1852891743,
0.0515826307,
0.2637985647,
-0.4474706948,
-0.2216474712,
0.3423318863,
0.3455911279,
-0.1874862462,
0.0017539237,
0.287109375,
0.2440223843,
-0.1056917235,
-0.0194138642,
0.4746490121,
0.6444393396,
0.4055099487,
-0.3922823071,
-0.0329239629,
0.063644588,
0.036632482,
-0.1734559089,
0.2106985301,
0.0308564603,
0.1918324828,
0.1406432688,
0.0972324461,
0.0374464616,
-0.0763898268,
0.2183973342,
-0.1176239625,
0.2614665031,
0.0845799595,
0.126347214,
0.1881269813,
0.1792559177,
-0.083674185,
-0.3425420225,
-0.0696675479,
0.1219685152,
-0.0048621236,
-0.1159549132,
-0.1105761975,
0.0403340571,
-0.2090080529,
0.3243710399,
0.2986624837,
0.032984864,
-0.3327322602,
-0.1645352095,
-0.3989801705,
-0.1721306145,
-0.093405731,
-0.3542163968,
-0.0387814082,
-0.1040404588,
0.0048024729,
0.0792966411,
0.0293138996,
0.0266955625,
0.1461550444,
0.6865949035,
-0.2840732634,
0.0265496466,
0.3582298756,
0.1359500587,
0.0420464203,
-0.3306715488,
0.0253972821,
0.3507260978,
-0.0839067325,
-0.1968301088,
0.2640075982,
0.1867130697,
-0.1484750062,
0.3411535025,
0.2205909938,
0.7242159843,
0.1210334897,
-0.0829701275,
-0.3107076287,
0.0463102646,
-0.1874599308,
0.3284567893,
0.4097312093,
-0.2244555205,
-0.3802425861,
-0.4079793394,
-0.1977363676,
0.1020833179,
0.0908950642,
0.4288519025,
-0.3884782195,
0.3272829354,
-0.0742275715,
0.1896982491,
0.1040758789,
0.026520852,
-0.0568278357,
0.2692761421,
-0.4651797712,
-0.2999320626,
0.0334035344,
-0.0166977588,
-0.027150346,
-0.0090616662,
-0.0695156679,
-0.3448980451,
0.3211409152,
-0.3420502245,
0.0472643524,
0.2058961689,
0.0268768761,
-0.3330900371,
0.2316467166,
0.174876079,
-0.1278862059,
-0.0696924776,
0.4330184162,
-0.1066294611,
-0.1177690104,
-0.014901584,
-0.1021668017
] |
https://github.com/huggingface/datasets/issues/2300 | Add VoxPopuli | I'm happy to take this on:) One question: The original unlabelled data is stored unsegmented (see e.g. https://github.com/facebookresearch/voxpopuli/blob/main/voxpopuli/get_unlabelled_data.py#L30), but segmenting the audio in the dataset would require a dependency on something like soundfile or torchaudio. An alternative could be to provide the segments start and end times as a Sequence and then it's up to the user to perform the segmentation on-the-fly if they wish? | ## Adding a Dataset
- **Name:** Voxpopuli
- **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings
- **Paper:** https://arxiv.org/abs/2101.00390
- **Data:** https://github.com/facebookresearch/voxpopuli
- **Motivation:** biggest unlabeled speech dataset
**Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 65 | Add VoxPopuli
## Adding a Dataset
- **Name:** Voxpopuli
- **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings
- **Paper:** https://arxiv.org/abs/2101.00390
- **Data:** https://github.com/facebookresearch/voxpopuli
- **Motivation:** biggest unlabeled speech dataset
**Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
I'm happy to take this on:) One question: The original unlabelled data is stored unsegmented (see e.g. https://github.com/facebookresearch/voxpopuli/blob/main/voxpopuli/get_unlabelled_data.py#L30), but segmenting the audio in the dataset would require a dependency on something like soundfile or torchaudio. An alternative could be to provide the segments start and end times as a Sequence and then it's up to the user to perform the segmentation on-the-fly if they wish? | [
-0.2925266922,
0.2328723967,
-0.0486934707,
-0.0753520727,
-0.1558789164,
-0.1852182299,
0.3809294999,
0.2100731432,
-0.0260843709,
0.2548183203,
-0.2955556214,
0.0939443707,
-0.51401335,
0.2282820791,
-0.0125597799,
-0.3366333246,
0.0352493264,
0.1592860818,
0.1379972845,
-0.1640634686,
-0.16928868,
-0.1792167425,
-0.3667648733,
-0.3199284673,
-0.2815555334,
-0.0437958986,
-0.171410203,
-0.200276345,
-0.2472259104,
-0.4485914111,
-0.2518495321,
0.0144173447,
0.2051719874,
0.7153627276,
-0.0001053368,
-0.241597116,
-0.0325991362,
-0.2413592488,
-0.118530713,
0.1629434079,
-0.149393484,
-0.0004099848,
-0.5305424333,
-0.1669961363,
-0.2364863455,
-0.1963238716,
-0.0257732812,
-0.3211329877,
0.2954050601,
0.1716526896,
0.2048165947,
-0.2917948961,
-0.0625556335,
-0.0694862306,
0.23044388,
0.0651996434,
-0.0031292171,
-0.0924547389,
0.0819320157,
0.1289021969,
0.0632566884,
0.4567219019,
0.048035495,
-0.2020330429,
0.1953829974,
-0.2308381796,
-0.3671850264,
-0.4931637347,
-0.1287542582,
0.5815051794,
0.6085773706,
-0.2704018056,
-0.3155981302,
-0.1887136102,
0.0172959846,
-0.3431018591,
-0.3455102742,
0.3020209372,
-0.148122564,
0.1379405111,
-0.0139237149,
-0.3403759897,
-0.139806062,
0.0945605412,
0.0610956773,
0.3523589373,
0.0075403987,
-0.0270668641,
-0.0055155139,
-0.2872103751,
-0.4808886349,
0.0372111797,
0.2388415933,
0.4193493724,
-0.095571436,
-0.325035423,
-0.105861105,
-0.1411992759,
0.1988049001,
0.0749900043,
-0.042845197,
0.0520785712,
0.1216937676,
-0.0533865988,
0.2828868032,
0.0018170993,
-0.0796327144,
0.0618963949,
0.1066371575,
-0.3097327054,
0.0792739168,
0.077979058,
-0.2079361081,
0.0881981626,
-0.2041266561,
0.0717201531,
-0.0003145682,
-0.022275757,
-0.0367465913,
0.030469019,
-0.3467599154,
-0.0008888005,
-0.023071032,
0.0554766953,
-0.2168717682,
-0.0929948315,
-0.1684411317,
0.2591879368,
-0.0406802632,
-0.0559701994,
0.0351966769,
0.1009162068,
-0.1506541967,
0.2815230191,
0.2222901583,
-0.0228011161,
-0.0549540333,
0.134734571,
0.2096424401,
0.0041600498,
-0.1650162339,
-0.0868010744,
0.2816717625,
-0.1880036741,
-0.0206577759,
0.0136982892,
-0.4079440832,
0.2230236828,
-0.2369123399,
-0.0792808607,
0.2260551751,
-0.2475364804,
-0.3368155062,
0.2681538761,
-0.2152197212,
0.0765839145,
0.3830367923,
0.4839090109,
0.0821426138,
-0.4656516612,
0.1455119401,
0.1029922888,
-0.0668400973,
-0.0582666844,
0.2434944361,
0.1746969819,
-0.413683176,
-0.1219651997,
0.1921569258,
0.1991187483,
0.0906345844,
0.2032757849,
-0.0010412509,
0.1211844012,
0.0335893482,
0.3394367695,
-0.0144694522,
-0.2765726745,
-0.2051726282,
-0.0039929999,
-0.0700615793,
0.0412308872,
0.030718118,
0.1075345948,
0.7296265364,
-0.2890874743,
0.2939641476,
0.355606854,
-0.0669099838,
-0.0297855027,
-0.1350754499,
-0.3457035124,
0.1745292544,
0.2376142144,
-0.0093145259,
-0.0910744295,
-0.2259640247,
0.4240359366,
0.2799818516,
-0.1462574899,
0.2492961437,
0.0866703093,
0.4744333625,
0.0259645749,
0.0415911302,
-0.5515682101,
-0.0342334844,
-0.0477553904,
-0.0555823036,
0.3149368763,
0.0476554595,
-0.4406017065,
-0.0364438407,
-0.3342243731,
0.022334205,
-0.0017873909,
0.1680094451,
0.0543685518,
0.1334088743,
0.044933103,
-0.5313400626,
-0.3334075809,
0.3088920414,
-0.0396383107,
-0.0941549614,
0.0056671631,
0.0476127453,
-0.0103823608,
0.1713316143,
0.4110595882,
0.2039599419,
-0.1203438416,
0.3768959641,
0.301194936,
0.0983219966,
-0.0104775624,
-0.325163126,
0.1853754967,
0.2171083689,
-0.3233447671,
0.1568768322,
0.3292602301,
0.109073393,
-0.2232831568,
-0.0851833671,
0.2577807605,
0.4536963403,
0.19151631,
0.0335363895,
-0.1753675789,
-0.1085517034,
-0.065478541,
-0.2391392291,
-0.1759951115,
-0.0669457391,
0.0106974058,
0.1357724071,
0.1745662689,
-0.3150487542,
0.1541746855,
0.4628356397,
-0.2876066267,
0.1285879612,
-0.0026041549,
-0.3632548451,
-0.2040610313,
-0.0164079256,
-0.4502242506,
0.0546337664,
0.2087282687,
0.2128757834,
0.0812147409,
0.3439451754,
-0.0911908224,
0.0179574285,
0.1442551762,
-0.0896609128,
0.3438567221,
-0.0715650544,
0.0123669691,
-0.0352522656,
-0.3124834299,
-0.0005499785,
-0.0457018726,
0.0406433344,
-0.195315972,
0.0758680925,
-0.2181117833,
0.0700934157,
-0.6984206438,
-0.1143318117,
0.1414814889,
0.3873270452,
-0.1372508258,
-0.1164514348,
0.3872789145,
-0.0124244932,
0.6995112896,
-0.0220749956,
-0.1269965768,
0.0451535247,
-0.0926734284,
0.1592124254,
0.1802598387,
-0.0271615386,
0.2576533854,
-0.0187915172,
0.1747027934,
0.0832938179,
0.2450940609,
-0.0755415559,
0.2807094455,
-0.0216199812,
0.1031169668,
0.0060363119,
-0.034200646,
0.2087465078,
-0.3511863351,
-0.1773941964,
-0.0107188532,
0.06130822,
-0.1447471231,
-0.2861630619,
0.2674385607,
-0.0853764713,
-0.2339543551,
-0.6628136635,
-0.4774100184,
0.3154148161,
0.343695879,
0.1062132567,
0.0269194152,
-0.1817503572,
0.0004487415,
-0.0913957953,
0.1175125539,
-0.1941931397,
-0.0850747675,
0.3067542911,
-0.3033916354,
-0.1011049971,
-0.2366935015,
-0.1138285398,
0.0029074776,
0.0257745367,
-0.067282252,
0.3524059653,
0.0338189863,
-0.012495704,
-0.0293373168,
-0.1199404076,
0.1766285747,
-0.0328029431,
-0.0975782275,
-0.0202308111,
0.1687164605,
-0.1106214374,
0.1685243696,
0.0209704917,
-0.0062209982,
-0.1654155999,
0.159213841,
0.9956920147,
0.484034121,
0.0175145995,
-0.0846364945,
-0.0097524496,
0.0726344958,
-0.1796184778,
-0.0587082021,
0.5532768965,
-0.0530377999,
-0.139340952,
0.3943897486,
0.0936162993,
-0.3328875601,
-0.04020302,
0.1430503875,
-0.1820315123,
-0.2135004401,
0.1223311201,
0.0459817126,
0.1855964214,
-0.0658071637,
0.116755411,
-0.2406722307,
-0.0907290876,
0.0895981193,
-0.0965595543,
0.2592722476,
0.0846502706,
-0.3579291105,
0.0299743135,
-0.4366190434,
-0.0892413557,
0.1967767924,
-0.0965186059,
-0.0927777961,
-0.3198330402,
-0.1560834497,
0.1696868539,
-0.1161273271,
-0.0806686878,
-0.0641261712,
0.2182721645,
0.6738341451,
0.0340831801,
0.4116015732,
-0.182739839,
-0.0359321348,
0.4898310602,
0.241996929,
-0.3840938807,
0.21024023,
0.2967366278,
0.501862824,
0.024196472,
-0.0471394323,
0.033208169,
0.0032868644,
-0.129233107,
0.2143201828,
0.2693785727,
0.2161967009,
0.1171034649,
0.0696157292,
0.1879120916,
0.1066986695,
0.2010374218,
0.0410473756,
0.1091637909,
-0.0508441366,
0.1418717057,
0.1368929595,
-0.350453645,
0.4271064103,
0.3146426678,
0.1403207481,
-0.0551564954,
0.1650426835,
-0.0094347801,
0.2653468549,
0.2739954889,
0.2458314747,
0.171257332,
-0.0407833531,
0.3296458721,
-0.3226227164,
-0.0500219576,
0.0061403029,
-0.0895619914,
-0.7040660381,
-0.4799272418,
0.2087133527,
0.0070538237,
-0.178689912,
0.1951505244,
0.0504536033,
-0.1807203889,
0.6409842968,
-0.1242552102,
1.1574862003,
0.4827518165,
0.159149006,
0.1125212386,
0.2006058097,
0.2373841107,
-0.3035924137,
0.0677875727,
-0.0783930346,
0.1987782866,
-0.0498537607,
0.0647742525,
-0.1585077792,
0.0622848421,
-0.4324499071,
-0.1228509769,
-0.0842516199,
0.0584112331,
-0.0590638109,
0.317029655,
-0.0231892169,
-0.4224410653,
-0.0628533587,
0.2179554403,
0.0070259105,
0.1343668848,
0.0345464908,
-0.1556109488,
0.2441346645,
0.0544788167,
-0.3005510569,
0.0694260895,
-0.1215175688,
-0.266951263,
-0.2369613796,
-0.1326864809,
0.0626226366,
0.194798544,
0.0110711223,
0.2505170405,
-0.0093566459,
0.1420045346,
0.2104908824,
0.0371185131,
0.2002179474,
-0.0400161371,
0.3876714408,
-0.1026767865,
-0.2133578062,
0.2087536007,
0.0845869705,
-0.2225949615,
-0.2089503556,
-0.1261921674,
0.2238057703,
-0.2065972239,
0.1338749826,
0.2441681027,
0.0451117232,
-0.1616761982,
0.1447421163,
0.0308182742,
-0.3660281003,
0.237879619,
-0.1021041498,
-0.0897376835,
-0.2988923788,
0.2991770208,
0.1991947293,
-0.0660862103,
0.2654156983,
0.1631921977,
-0.2442839891,
-0.3363745511,
0.3560642004,
0.0272334144,
-0.2357186377,
-0.0897473097,
0.0112667084,
0.0744601488,
0.05846617,
0.319685638,
0.1003472283,
-0.1523531675,
-0.2279848605,
-0.1858519316,
-0.4159486294,
0.1065223515,
0.1921975166,
0.1433027536,
0.010450718,
0.0516235456,
-0.1151611358,
0.0882367194,
-0.4500927925,
0.038535472,
-0.1323824674,
0.1920956373,
-0.1528327763,
-0.3040903807,
-0.0052291462,
-0.0048890812,
0.1730176657,
0.2098676115,
-0.1454311907,
-0.2495696992,
-0.3390630782,
0.1457418352,
0.2924628258,
-0.1402597725,
-0.1638766676,
0.0836844519,
-0.241848588,
-0.1068436578,
0.3897122443,
0.3422494829,
0.0888576657,
-0.2039664835,
-0.0724266097,
-0.0383631065,
-0.0480956919,
0.0086666774,
0.2314360887,
0.1936447769,
0.2700586319,
0.279268384,
-0.1034338772,
-0.119839184,
0.1107207239,
0.4209377766,
0.4609632194,
0.0164929796,
0.2232058644,
-0.2835409343,
0.3192583621,
0.1052824929,
0.4450281262,
0.2600056827,
-0.2056762427,
-0.0049462598,
0.3935939372,
0.3718563616,
-0.1773594916,
0.0193234552,
0.0810717344,
-0.2412969023,
0.3103741109,
0.2030958533,
0.1488632709,
0.1200707629,
0.0676811039,
-0.024229452,
0.0328606963,
-0.0844698325,
0.2874402404,
0.3628750443,
-0.1632514,
-0.0739805475,
0.1752863973,
0.3543741703,
0.3791212142,
0.5762958527,
-0.1655835509,
0.4650758505,
0.3072718084,
-0.3316732049,
0.2191115916,
-0.1568672657,
-0.1609805077,
0.2824745476,
0.0721071735,
0.3706009686,
-0.0795153081,
0.3249425888,
-0.6310241818,
-0.3518258333,
0.0803155825,
0.1161887422,
0.1487324685,
-0.1080910787,
-0.2929433584,
-0.0418263562,
-0.0189676881,
-0.1837137192,
0.0820152909,
-0.1899731904,
-0.1283592284,
-0.0696762502,
0.0318357758,
-0.0394863747,
-0.3224298656,
-0.1900803894,
0.4205609262,
-0.2098812908,
0.034390524,
-0.075398311,
0.0150796399,
0.1595045924,
0.245243147,
0.1217796206,
-0.0540570281,
-0.4147154391,
0.2664084435,
-0.2052637041,
-0.0796636641,
0.0155253252,
0.1405997723,
0.2044269741,
0.2787298262,
0.3516686261,
0.1802437156,
-0.2170605361,
0.0712031871,
0.1786267161,
0.0285100415,
-0.1079895347,
0.0210356228,
-0.191267401,
-0.087853156,
-0.2785836458,
-0.2812317014,
-0.3557813764,
-0.1439834833,
0.1353619844,
-0.1966174245,
0.1673759073,
-0.0332599282,
0.1274764985,
-0.1395258456,
0.0831315741,
0.1159178317,
0.0855442956,
0.0874627009,
-0.0615022592,
-0.2160032839,
-0.008867776,
-0.155831933,
-0.0121778874,
-0.2357166857,
0.1340301484,
0.2658377886,
0.3944407105,
-0.3273130357,
0.1216309071,
-0.4167952836,
0.2804062366,
-0.3058731854,
0.4049426019,
-0.3673976362,
0.502487123,
0.0545744598,
-0.3051641881,
-0.0807010382,
0.0088900495,
0.1484775096,
0.0989567861,
-0.2811568677,
-0.0034877274,
-0.3702619672,
0.4069083929,
-0.2077631801,
0.2602317929,
-0.2546188533,
-0.1644987017,
-0.0612239614,
0.1538011879,
-0.1738910079,
-0.1906509995,
0.1229965389,
0.4134191275,
-0.1350333393,
0.2048761249,
-0.0354044922,
0.1267118454,
-0.0008090585,
0.0561116152,
-0.1075564027,
0.1782755256,
-0.1608631313,
0.2360179424,
0.1800749153,
0.1975187212,
-0.2519268095,
0.0901320726,
-0.1539796591,
-0.2482719719,
0.5132053494,
-0.2454800159,
-0.3263623714,
-0.2705000639,
0.2024952471,
0.311545372,
0.0868825912,
-0.5332134962,
0.1467756629,
0.2074880004,
-0.0956714824,
-0.031199621,
-0.0753795654,
-0.3398633003,
-0.3039982319,
-0.2820353508,
0.2117497027,
0.0541308895,
-0.1605184525,
-0.0391396843,
-0.2843502164
] |
https://github.com/huggingface/datasets/issues/2300 | Add VoxPopuli | Hey @jfainberg,
This sounds great! I think adding a dependency would not be a big problem, however automatically segmenting the data probably means that it would take a very long time to do:
```python
dataset = load_dataset("voxpopuli", "french")
```
=> so as a start I think your option 2 is the way to go! | ## Adding a Dataset
- **Name:** Voxpopuli
- **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings
- **Paper:** https://arxiv.org/abs/2101.00390
- **Data:** https://github.com/facebookresearch/voxpopuli
- **Motivation:** biggest unlabeled speech dataset
**Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 54 | Add VoxPopuli
## Adding a Dataset
- **Name:** Voxpopuli
- **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings
- **Paper:** https://arxiv.org/abs/2101.00390
- **Data:** https://github.com/facebookresearch/voxpopuli
- **Motivation:** biggest unlabeled speech dataset
**Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Hey @jfainberg,
This sounds great! I think adding a dependency would not be a big problem, however automatically segmenting the data probably means that it would take a very long time to do:
```python
dataset = load_dataset("voxpopuli", "french")
```
=> so as a start I think your option 2 is the way to go! | [
-0.3622049093,
0.206050843,
-0.0382299051,
0.0014165512,
-0.121406801,
-0.1296065599,
0.285892576,
0.348855257,
0.1810038835,
0.2673178911,
-0.1220444217,
0.1734329909,
-0.5791188478,
0.2486566752,
0.1030064523,
-0.1610256284,
0.1628734469,
0.2866097987,
0.0956862718,
-0.1880005747,
-0.1290651709,
-0.0335455202,
-0.2270614803,
-0.2975462675,
-0.3531153202,
0.0726718456,
-0.182473287,
-0.2084127218,
-0.1638895422,
-0.2925846577,
-0.2777968943,
0.0334550291,
0.2236546129,
0.5653851628,
-0.0001063294,
-0.1449197084,
-0.0884731412,
-0.3044511676,
0.0654772669,
-0.0746491104,
-0.0837000832,
-0.1278289258,
-0.4064908028,
-0.0930255428,
-0.2304197103,
-0.1425433308,
-0.0099482024,
-0.2797587514,
0.2190806866,
0.2948249578,
0.2410484552,
-0.015466745,
-0.055715654,
-0.1818625182,
0.1919792444,
0.0053660031,
-0.0167084578,
-0.1235178486,
0.0366832055,
0.0193056334,
0.0953450501,
0.5634723902,
-0.0203445964,
-0.2623253167,
-0.0066590682,
-0.0895408764,
-0.1298711151,
-0.4109850228,
-0.0241051652,
0.4772328436,
0.4497813582,
-0.2047095746,
-0.218018949,
-0.1389559805,
0.0822958574,
-0.2967886925,
-0.172608003,
0.2062317133,
-0.0013447013,
0.1559955478,
0.1247613803,
-0.3047012389,
-0.0445501246,
0.2275999188,
-0.0649355128,
0.4114826918,
-0.0107397167,
-0.1321664155,
0.0144945942,
-0.2984530926,
-0.3767269552,
0.2829954624,
0.2045621127,
0.2323184609,
-0.1000512615,
-0.3026240468,
0.1004272848,
-0.0496398695,
0.184778899,
-0.0104827564,
-0.1364689469,
0.1110458225,
0.097645767,
0.0904046297,
0.2405510694,
-0.065114744,
-0.0079652146,
-0.103288807,
0.1962270588,
-0.2124024481,
-0.1570112556,
0.1893922985,
-0.2619788647,
0.1155811623,
-0.0177205391,
0.0266589634,
0.0966512486,
-0.1736463308,
0.0171098057,
0.2102119029,
-0.1320613474,
0.0434755497,
-0.0822212845,
0.3474677205,
-0.1171207204,
0.2644558847,
-0.059400443,
0.3889175057,
-0.1311836988,
-0.2085466534,
-0.0338919498,
0.1506565511,
-0.0409684666,
0.2504804432,
0.182081297,
0.1834035367,
0.0814338103,
0.0801912472,
0.4036087692,
0.046203237,
0.0749736503,
-0.0386661962,
0.1496945769,
-0.2442623377,
0.0992062241,
-0.0477510244,
-0.0776872188,
-0.0466320254,
-0.2552616596,
-0.0784299746,
0.2434821725,
-0.2535856366,
-0.2981432974,
0.2990469038,
-0.113111034,
-0.1176317781,
0.210585013,
0.659245491,
-0.0265017524,
-0.3424618542,
-0.0631874278,
0.0526255742,
-0.1718243212,
-0.0150964223,
0.1499962509,
0.2983688414,
-0.3179383278,
-0.198402226,
0.0946157649,
0.2202680856,
0.0514325649,
0.293613404,
-0.0016876885,
0.0959737077,
-0.0085591851,
0.2231385708,
0.0867229998,
-0.3522508144,
-0.3762063384,
0.0857582912,
-0.0944090709,
0.0374452174,
0.1689454615,
0.2056658119,
0.5524088144,
-0.2033004165,
0.3426636755,
0.4188264012,
-0.0198922697,
-0.0120019633,
-0.093754068,
-0.3128601909,
0.2254297733,
0.3783738017,
0.0043753684,
0.0188303925,
-0.2665969133,
0.3279888034,
0.367064327,
-0.2761886418,
0.1107818112,
0.1414889842,
0.4262056053,
0.0683253556,
-0.0993256941,
-0.454014957,
-0.0165982451,
-0.0257256851,
-0.0956506208,
0.3194209635,
-0.0702557787,
-0.5392351151,
0.0250339434,
-0.3108380735,
0.004870906,
0.0713818818,
0.2480750084,
0.1039573774,
0.1168510765,
0.0260643046,
-0.4303716719,
-0.031660568,
0.156053856,
-0.1150332913,
-0.1255701482,
0.1169830561,
-0.0194778237,
-0.1644624174,
0.2081955671,
0.2909441292,
0.0755516738,
0.0528745949,
0.2668858469,
0.0709271058,
0.1357493848,
-0.1132399738,
-0.0462314636,
0.0530096553,
-0.0085947774,
-0.384639293,
0.06348712,
0.3921803534,
-0.0621207803,
-0.0536217391,
0.089517355,
0.2135983258,
0.4971489608,
0.0607670359,
-0.0248057172,
-0.0618538707,
0.0949491709,
-0.0250035729,
-0.1085491851,
-0.2827540636,
0.1236064062,
0.1179460585,
0.1139038429,
0.143970713,
-0.4335422516,
0.0984677225,
0.4523304105,
-0.1298229396,
0.3852922618,
0.0481186956,
-0.3084797859,
-0.0194217525,
-0.0551846661,
-0.3254058957,
0.1220445111,
0.3093283176,
0.0621401854,
-0.0152720716,
0.2443619519,
-0.0327319577,
0.0469605327,
0.0170568228,
-0.1983917803,
0.209942773,
0.0601659045,
-0.1522661597,
-0.2575826645,
-0.3199753761,
-0.0662789345,
-0.0185559373,
0.0975537077,
-0.2175049484,
0.011730372,
-0.0706102923,
0.0489454381,
-0.3854291737,
-0.1949515641,
0.1977465451,
0.3800063133,
-0.0833936185,
-0.1135619804,
0.2648080885,
-0.051908318,
0.4458291233,
-0.0833613202,
-0.3190987408,
0.16898112,
-0.1556270719,
0.0674686879,
0.1898883581,
0.0032772294,
0.2206192613,
0.0939170867,
-0.0385638624,
0.0312704183,
0.1009204239,
-0.1914324462,
0.1785157472,
-0.1373093128,
0.0531250089,
0.0208641812,
0.0789519772,
0.0419875719,
-0.2782665789,
-0.0537758432,
-0.1046975628,
0.1359056681,
-0.008570917,
-0.2253914773,
0.1661048234,
0.0294248797,
-0.3284981251,
-0.7819317579,
-0.5647489429,
0.2430547923,
0.3136267066,
0.102492094,
-0.068399176,
-0.1409724057,
-0.0563665479,
-0.1719584912,
0.2470579892,
-0.2032077312,
0.0324629135,
0.4612771273,
-0.2707383037,
-0.1865025014,
-0.2920599878,
-0.2375633121,
0.0957440585,
-0.1553491801,
-0.2603884637,
0.2003103197,
-0.1632537842,
0.0965487957,
-0.0052641719,
-0.0262270086,
0.3263148665,
0.1320694089,
-0.1316966414,
-0.0994008258,
0.1153097451,
-0.0704141334,
0.1390608102,
-0.0816311911,
0.0134753175,
-0.1746073216,
0.0314376466,
0.6643481255,
0.3344543874,
0.0125744082,
0.1750958562,
-0.0013844548,
0.1119309366,
-0.1227555498,
-0.1437573433,
0.1638985276,
-0.0561095625,
-0.1187383011,
0.5490956903,
0.0184466373,
-0.4654212296,
-0.1587921232,
0.1038696617,
-0.2134498954,
-0.2118079215,
0.2113969624,
0.0388386697,
0.1743004471,
-0.1160272658,
-0.0555654764,
-0.2088221759,
-0.0120235486,
0.1845558137,
-0.0107938508,
0.1448999047,
-0.117981106,
-0.2399494946,
0.0103752511,
-0.4669722021,
0.1290616691,
0.0955214277,
-0.134515062,
-0.1190468594,
-0.2967168093,
-0.2244533896,
0.0841992274,
-0.0949917361,
-0.2629107237,
-0.1887694448,
0.1808094233,
0.3611075282,
-0.1731305569,
0.4213999808,
-0.3377196193,
-0.1228827685,
0.3760776818,
0.2507032156,
-0.4433843195,
0.335108608,
0.1823344529,
0.5083809495,
0.0011387283,
-0.0721246079,
-0.218214348,
0.0266424641,
-0.2039166838,
0.4047905505,
0.179847911,
0.0870760009,
0.2208209634,
0.0615780167,
0.0703690648,
0.1028541923,
0.3789213896,
0.0770467669,
0.2333379835,
0.0289203767,
0.1345979273,
0.1121223122,
-0.1881215721,
-0.0295365173,
0.4321108758,
0.0630020648,
-0.2604456842,
0.0249347407,
0.0034135827,
0.3576076031,
0.31810835,
0.2150359303,
0.4056581259,
0.0334020332,
0.1880114824,
-0.206632033,
0.0695326701,
0.2023233026,
-0.1256693602,
-0.451611042,
-0.5478141904,
0.1800531149,
0.1455731839,
-0.1372804493,
0.0861363709,
0.0228812583,
-0.1187796965,
0.6165670753,
-0.3423859477,
1.1753388643,
0.3344913125,
0.2076603472,
0.0480142757,
0.1837859899,
0.3083375692,
-0.3009544909,
0.0103776157,
0.0684075505,
-0.0885394141,
-0.0191610996,
0.0707409307,
-0.1447670609,
0.1776675731,
-0.7377358675,
0.0661362633,
-0.1844970435,
-0.021143226,
-0.1358197331,
0.2500276864,
-0.1251883358,
-0.5233942866,
-0.4447706044,
0.2471957058,
-0.0130945537,
0.1376271397,
-0.0007743828,
-0.0571647324,
0.0897974968,
-0.0959881246,
-0.2057290524,
0.0694096684,
-0.1310455352,
-0.1545066386,
-0.3360476494,
-0.0461532399,
0.0329300985,
0.2875269055,
0.1190965548,
0.478684783,
-0.1238556877,
0.0854962319,
0.3140233755,
0.1191114187,
0.1748799235,
-0.0558028668,
0.2491298914,
-0.0389487222,
-0.3561419845,
0.2521935999,
0.1491468549,
-0.2774614692,
-0.2780531347,
-0.1171087474,
0.180635035,
-0.0457687825,
-0.0004739282,
0.307536453,
0.003131914,
-0.2630974948,
0.2051135302,
0.0770249367,
-0.4349075556,
0.0878977776,
0.0002252803,
-0.0886178687,
-0.1464881152,
0.2452911586,
0.3076665998,
-0.0739834532,
0.1029379517,
0.3325701952,
-0.1294413358,
-0.3821824193,
0.1188277677,
0.0627315938,
-0.2772651315,
-0.1331378073,
0.0890585706,
-0.1484773755,
-0.1134966016,
0.2436075062,
0.1177871004,
-0.2202750742,
-0.1120533571,
0.0209179707,
-0.6115115285,
0.2955404818,
0.3633838892,
0.1040997356,
0.2315912992,
-0.1309385747,
-0.2784083784,
0.1934369802,
-0.464286983,
-0.0632444471,
-0.0965127051,
0.160890609,
0.0074288989,
-0.2459554374,
0.115876317,
-0.0405657142,
0.2241310477,
0.1675933748,
-0.0176862124,
-0.325505197,
-0.222410202,
0.0868889689,
0.2366504073,
0.1457110643,
-0.0152936755,
0.0368034877,
-0.1100721657,
-0.1060401425,
0.4459156096,
0.2392482013,
0.0525278673,
-0.0880477428,
-0.1513983905,
-0.2160504013,
-0.1253121644,
-0.0663156286,
0.1494652927,
0.1749303937,
0.2304736525,
0.0673186183,
0.0116898846,
-0.1654164642,
0.0794725865,
0.3628192544,
0.3833222091,
0.1561153382,
0.0436234288,
-0.2703098953,
0.2227498442,
0.168822214,
0.4512785375,
0.1104407609,
-0.1209569424,
0.0941594094,
0.4990378916,
0.4179680645,
-0.4108496904,
-0.0577695109,
0.2328458726,
-0.3552446365,
0.383977443,
0.3740127385,
0.095296286,
0.1067199707,
0.0465503745,
0.0371722355,
-0.1151016802,
-0.0377179161,
0.257150054,
0.1460974067,
0.1024780795,
-0.0748101994,
-0.0013251278,
0.3439778686,
0.3266227245,
0.530084312,
-0.2825894654,
0.3886512816,
0.0956530198,
-0.2597622275,
0.2736118138,
0.0642056987,
0.1377784163,
0.2306453586,
0.1587525159,
0.2691070437,
-0.0515617989,
0.4701896608,
-0.532155633,
-0.283986032,
-0.0702507049,
0.0982949585,
0.0657478049,
-0.1043236554,
-0.0354628451,
0.0261130985,
-0.2292878181,
-0.1708307117,
0.2301444262,
-0.1359267235,
-0.2682330906,
0.2988190949,
0.1705303788,
-0.2401818037,
-0.1490208805,
-0.1470340639,
0.3594738245,
-0.2478773892,
0.167184338,
-0.1194425076,
0.052809611,
0.2467087656,
0.2892062664,
0.1465044767,
-0.0964317322,
-0.3751778901,
0.3298677206,
-0.2860943377,
-0.0447453596,
-0.1460155398,
0.0783333331,
0.15085572,
0.422198087,
0.2761326432,
0.208601743,
-0.30798769,
-0.1333694607,
0.1586045027,
0.0423179567,
-0.1505164504,
0.0643149093,
-0.1524145305,
0.0442225635,
-0.4095978737,
-0.2510290444,
-0.699745059,
-0.1190193519,
0.1614100933,
-0.0524837524,
0.0719128698,
-0.0839184746,
0.1417285353,
-0.0368318707,
-0.0125220055,
0.0663312897,
0.264934212,
-0.0075703035,
-0.081125319,
-0.3581412435,
0.2474453896,
-0.2162038982,
-0.0841440707,
-0.2664987445,
0.0812275037,
0.3445627093,
0.4079993963,
-0.2888801396,
0.0208227113,
-0.3841981292,
0.1748023778,
-0.2963864207,
0.2929532528,
-0.2503389418,
0.4722785056,
0.148089692,
-0.3501276672,
-0.331079483,
0.0409936048,
0.1730994731,
0.0031629764,
-0.4065483809,
-0.0937647969,
-0.3867298365,
0.4055826962,
-0.1437371522,
0.5092087388,
-0.302028805,
-0.2368841171,
0.0330280475,
-0.0799098536,
-0.2482530326,
-0.1539030969,
0.0322416387,
0.4596190453,
-0.1901185662,
0.2216010839,
-0.0705073699,
0.1909003407,
0.0626068562,
-0.0679495111,
-0.153671965,
0.2455642968,
-0.0057616332,
0.1625897586,
-0.0941636041,
0.253311187,
-0.2927540839,
0.1010811552,
-0.126283288,
-0.2569383085,
0.3687209189,
-0.3402696252,
-0.2988109589,
-0.2196718603,
0.3579610288,
0.1641684175,
0.0845542997,
-0.2945985794,
0.183428213,
0.0427229106,
0.1098535955,
-0.0096264202,
0.070670329,
-0.1355884671,
-0.2739540935,
-0.2798532844,
0.1673710346,
0.0584492944,
-0.0878950655,
-0.1146520376,
-0.3189825118
] |
https://github.com/huggingface/datasets/issues/2294 | Slow #0 when using map to tokenize. | Hi ! Have you tried other values for `preprocessing_num_workers` ? Is it always process 0 that is slower ?
There are no difference between process 0 and the others except that it processes the first shard of the dataset. | Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others.
It looks like this:
![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png)
It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
| 39 | Slow #0 when using map to tokenize.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others.
It looks like this:
![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png)
It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
Hi ! Have you tried other values for `preprocessing_num_workers` ? Is it always process 0 that is slower ?
There are no difference between process 0 and the others except that it processes the first shard of the dataset. | [
-0.4360867441,
-0.3340416849,
-0.0331812017,
-0.0555870757,
0.0697018057,
-0.194478631,
0.3812373281,
0.2073156983,
-0.2748003006,
0.0517778769,
0.315757215,
0.3878785372,
-0.2385891527,
-0.0081706708,
-0.2220513821,
0.1165851876,
0.1717215329,
0.1350862235,
0.369813174,
-0.1361590624,
-0.2459042221,
-0.0289520994,
-0.4537950456,
0.1861462444,
-0.5515931249,
-0.0939204767,
0.0168481823,
0.0239231288,
-0.1578883082,
-0.3320665658,
-0.2777600586,
0.0381637402,
0.000433024,
0.3452005684,
-0.0001291091,
-0.2028737366,
0.3343116939,
0.3039597273,
0.0683978125,
-0.0113468105,
0.1007513851,
-0.4201105833,
-0.0934072733,
-0.0518575534,
0.0113792634,
0.0090432614,
0.2106572539,
-0.0802214667,
0.1935953051,
0.0336159803,
0.0578774586,
0.335519582,
-0.411883384,
0.3002010882,
-0.0285429638,
0.1999465227,
-0.0942218602,
-0.0267872661,
0.1064963117,
-0.1693147421,
0.1627759039,
0.128841877,
-0.2492694408,
-0.0105365459,
0.2192678154,
0.1379474103,
0.5077481866,
-0.4718610942,
0.3414837122,
0.2420952171,
-0.1116658822,
0.1792001128,
-0.3060407639,
-0.306430459,
0.0190433338,
-0.4115247726,
-0.0026199245,
0.0045569516,
0.0472664237,
-0.0208515245,
-0.4781553149,
0.173886016,
0.1423053592,
0.0237273369,
-0.2842416465,
0.6366428733,
0.0835531801,
0.1209813207,
0.1686225832,
-0.1988868862,
-0.2149643451,
-0.254427433,
0.1541729718,
0.5229038,
-0.1893167943,
-0.1005735844,
-0.1133744419,
-0.0243341736,
-0.2357411832,
-0.3004842401,
-0.3913842142,
0.38717857,
0.0365638174,
0.1213993281,
0.0062340428,
-0.0791988969,
0.0439270101,
0.2379094809,
0.2816816866,
-0.4815146029,
-0.245326221,
0.0616535656,
-0.2930656672,
-0.1480613202,
-0.0174207706,
0.1158763394,
-0.2160463631,
-0.0180586874,
-0.0678551272,
0.0642535761,
-0.39716506,
0.03209031,
0.331068635,
0.1310614645,
-0.0551009364,
0.534424901,
-0.3535133004,
-0.0543106534,
-0.5124527812,
0.0594565906,
-0.0384579264,
-0.187885046,
-0.2003134787,
0.1468877643,
-0.0343805999,
0.1941283196,
0.131245479,
0.0913658664,
0.1758318692,
0.07644137,
0.553352654,
-0.2733447552,
0.2202513814,
0.2896812558,
-0.2941051424,
0.4735396802,
-0.0568000078,
0.2583466172,
-0.2132854611,
0.4684458077,
-0.513766706,
-0.4455690384,
0.1040067002,
-0.0502087362,
-0.0349191539,
0.2365923375,
-0.2229652852,
0.3019236624,
0.3209949434,
-0.006540407,
-0.1902332455,
-0.258133918,
-0.5693917274,
-0.0931627825,
0.2414498627,
0.2863372266,
-0.1284322888,
0.0288032461,
0.12923491,
0.2965081632,
0.7083094716,
0.3495640159,
-0.1610262543,
0.1975354552,
-0.1121663079,
0.5817083716,
-0.0573083796,
-0.0024949284,
-0.1221965924,
0.3314132094,
-0.3430329859,
-0.1398529261,
-0.0191543102,
0.0702571794,
0.2119108886,
-0.1398645937,
0.2076437771,
0.0084965676,
-0.0263473075,
0.3012178838,
-0.4460813403,
0.0836738572,
0.2569980621,
-0.0578044467,
-0.1963774264,
-0.1404871047,
-0.3174523711,
0.0300511848,
0.0254322514,
-0.0975900516,
0.1209554076,
0.0960759073,
0.1515372694,
-0.1494008899,
0.0074112308,
0.0793570355,
0.0448698029,
0.1637539566,
-0.177720353,
0.0571314506,
0.0228356626,
-0.0804904401,
0.1946885139,
-0.0073325252,
-0.0777314603,
0.0006751344,
-0.1042292714,
-0.1330377162,
-0.1713920087,
-0.0241134409,
-0.0527576916,
0.0256196242,
0.0285963938,
-0.0098102596,
0.1717210561,
-0.1269736439,
0.085613288,
-0.1991586238,
-0.3183267415,
0.1766966283,
0.2936828136,
-0.1260847598,
0.0239192322,
0.3493390977,
0.339011848,
0.0682439357,
-0.0969686955,
0.2577643991,
0.3222964108,
0.22592251,
0.2996603549,
-0.2068663538,
-0.0924338251,
-0.2335603237,
0.2150352597,
0.8690193295,
0.3758694828,
0.2990353405,
-0.0244135559,
-0.2960144281,
-0.0128678875,
0.2824966908,
-0.0023050825,
-0.0397012457,
0.236777395,
0.3676813245,
0.3466968834,
0.2306513935,
-0.0149931768,
0.1968117952,
0.136352554,
-0.2129917294,
-0.1881495714,
0.0376623161,
-0.0343601033,
-0.1988100111,
0.1022652611,
-0.5859150887,
0.2442333847,
-0.0352273956,
0.1711591929,
-0.006375256,
-0.1822370589,
-0.0630132481,
0.1467840672,
0.1539621651,
0.0412813909,
-0.0272231381,
0.1279743165,
0.0700945854,
-0.0916839242,
-0.1123032793,
0.2207985967,
0.5185968876,
-0.224220112,
0.1264092624,
-0.1815512627,
0.3484583497,
-0.0092579508,
-0.1181667373,
-0.1135651693,
-0.2855654657,
-0.023304604,
0.0805968791,
0.1668616831,
0.1096137613,
-0.0144179035,
-0.073301211,
-0.1003980413,
0.2277220786,
-0.0665105879,
-0.0254168753,
-0.2751341462,
-0.1501683742,
0.3499272168,
0.0754396841,
0.0420035459,
-0.0100303851,
-0.3488821089,
0.0729175583,
-0.5219572186,
-0.0330346562,
0.0633740872,
-0.0331864096,
0.0179081932,
0.0217055753,
-0.524893105,
0.1516857594,
0.1539479345,
-0.1330842078,
-0.294436276,
-0.011409983,
-0.2839923799,
-0.2393364906,
-0.0805288255,
0.1574741751,
-0.0880603492,
0.3033661246,
0.1242295951,
-0.143249616,
0.199502036,
-0.1756274849,
-0.1001196876,
0.154343307,
-0.0461926647,
-0.390545845,
-0.0550689809,
-0.2851267457,
0.3271589279,
-0.1026911736,
0.0898140669,
0.0317496434,
-0.0419970602,
-0.087276943,
0.1167668402,
0.0802403614,
0.0108844256,
-0.0897263885,
0.0274960492,
-0.0580019131,
-0.0622241274,
0.3971164823,
0.1535114497,
0.0334779806,
0.1151596606,
-0.3876466453,
-0.1599523276,
0.0064626033,
-0.0498175286,
0.0998836756,
0.3346402049,
0.0874354318,
0.9783518314,
0.1062370837,
-0.2804870605,
-0.1336960047,
-0.1836685389,
-0.2738052607,
0.0565306246,
0.0110869734,
0.2926233709,
0.3481587768,
-0.1060488746,
0.3516158164,
0.036032021,
-0.4280942678,
0.1520732343,
0.0106273619,
-0.2330412418,
-0.1345242858,
0.1594467759,
-0.2357105464,
0.2996188998,
-0.0050079338,
0.2305287123,
-0.4275161624,
-0.3596065938,
-0.1457599252,
0.0265663993,
0.0506896488,
-0.3376367688,
-0.6599954367,
-0.124107942,
-0.8557748199,
0.3928838968,
0.0668696016,
0.4000651836,
0.3554162085,
-0.0419254042,
0.2548028231,
-0.1705654263,
0.9261287451,
-0.3752490878,
-0.047990486,
0.0609389506,
-0.362216711,
-0.1824947596,
-0.2055874914,
-0.0673930496,
0.5040714145,
0.4771127999,
0.6695144773,
-0.0840028152,
-0.3767011166,
0.0516610518,
-0.1607220471,
0.1572796106,
-0.1000595614,
-0.3202100396,
0.0091816913,
0.178049922,
0.3636066914,
-0.1326898932,
0.1217946559,
-0.115752615,
-0.1865265667,
-0.0926808789,
-0.0315531902,
0.3476767242,
0.0403210595,
0.1968771517,
0.2026276588,
0.2127319127,
0.3579658568,
0.2923238277,
0.3474160731,
-0.3887324929,
-0.0742838457,
0.0921956301,
0.174923256,
-0.1078391671,
0.4646157324,
0.5473308563,
0.1076297313,
0.1817891449,
0.096607469,
0.3447217047,
-0.1060336828,
0.2503794432,
0.5614131093,
0.2437330484,
-0.5444433689,
-0.2288585752,
0.0744212046,
0.5478261709,
-0.0730599836,
-0.0137787126,
-0.466711551,
-0.0549076572,
0.1154406965,
0.3533847928,
1.1370749474,
-0.4572673142,
0.2235989124,
-0.3345710635,
0.1865455657,
0.139155969,
-0.3053278625,
0.1694037616,
-0.3431825638,
0.1261919737,
-0.0519644246,
-0.0698038489,
0.2564781308,
0.4701359272,
0.148955524,
0.1898184866,
-0.0283735506,
0.2957146168,
-0.170544073,
0.0933230445,
0.5417782068,
-0.3341778517,
0.1757436842,
-0.0575114936,
0.2041956335,
0.0147022009,
-0.0116623882,
0.0275174901,
-0.0299490113,
-0.1083597988,
-0.1351930201,
-0.3347501457,
-0.2640465498,
-0.1044403687,
0.2398072332,
-0.0443114936,
-0.028110113,
0.0686316714,
0.2051472068,
0.2910552621,
-0.0669768453,
0.0809767693,
0.0974568352,
0.1381751746,
0.1266132742,
-0.3745386899,
-0.1369052827,
-0.0491356999,
0.0354474559,
-0.1650296003,
-0.1853073686,
0.0037484008,
-0.256100595,
0.0792188346,
0.6586585641,
0.3335110247,
-0.109746784,
0.1790457219,
-0.1239251718,
-0.1210857332,
-0.0148875723,
-0.0461562946,
-0.1962199062,
0.4305229485,
-0.1915860027,
-0.4917843044,
-0.0159022603,
0.4187040627,
0.1013253182,
-0.1454496235,
0.552044034,
-0.2703859508,
-0.2152643353,
-0.0652342886,
0.4115816951,
0.1103634387,
0.1579066813,
0.0483675897,
0.3706423044,
-0.0252782181,
0.3468016684,
-0.0522842668,
-0.2708885074,
0.0632007271,
-0.1935212612,
-0.1205904782,
-0.3543400168,
-0.3424690366,
-0.187629506,
-0.093329303,
0.010733149,
0.220331043,
-0.2272358984,
-0.1343101859,
-0.1209256798,
0.0782521293,
-0.0859044641,
0.2770216465,
-0.2059435099,
-0.0328885317,
-0.0524544753,
-0.0511377566,
0.0184967648,
0.2247285396,
-0.2035123259,
-0.079392761,
-0.0961867645,
0.2424827963,
0.0696056038,
-0.4496529102,
0.32521227,
0.1513259411,
-0.3381514251,
-0.2613517046,
-0.141179651,
0.2994889319,
-0.0444701351,
-0.122988984,
0.4639209509,
0.1736135334,
-0.1211527213,
0.1722892225,
-0.0991256908,
0.1508992463,
-0.0524268262,
0.3517229259,
0.3136866689,
-0.0889296755,
0.2567595243,
-0.0925766155,
0.1440130025,
0.1110243723,
0.0540261976,
-0.0857151002,
0.0341703668,
0.1923606098,
-0.0414828695,
0.1802284718,
0.0338951759,
-0.3946098685,
0.6167109013,
0.0001257132,
0.013185217,
-0.1981577724,
0.3172849119,
0.0790931508,
-0.0049076807,
0.1999772936,
0.303766489,
0.3584085405,
-0.2044158727,
0.0103773754,
-0.1436358392,
-0.2623722255,
0.0120435702,
0.1228776351,
0.1161632165,
0.1627409905,
0.4875868261,
0.0196336508,
-0.0676994473,
0.4756557941,
0.3589250445,
0.5300145745,
0.3057101667,
0.4101434946,
-0.4583235085,
-0.3641141355,
-0.2764773071,
0.6516803503,
0.0236856323,
0.2694934607,
-0.0620530769,
0.2542200387,
-0.122963123,
-0.4720276296,
0.115805842,
0.3828215003,
-0.3418945968,
-0.5146677494,
-0.2581235766,
-0.0828670934,
-0.0889223218,
0.1356114745,
-0.270657897,
0.1188923046,
0.3547159135,
0.0894193426,
0.0913789645,
0.0061075939,
-0.1751969457,
-0.1463087797,
0.3146529496,
-0.029330004,
0.1819392741,
-0.6590738893,
0.1216756776,
0.1522235274,
-0.0928071663,
0.3953402936,
0.6274185777,
-0.4116169512,
-0.0309419427,
0.0173123069,
0.073946692,
0.1964253187,
0.2626114488,
0.0273688175,
-0.1165737584,
-0.0630782247,
-0.2329761833,
-0.1438363791,
-0.3250847459,
0.0415996574,
0.0322759338,
0.1660141498,
0.2918979228,
-0.0513228923,
-0.2218306065,
-0.0675225407,
0.2138189822,
-0.1194085777,
0.006276899,
0.1002985165,
-0.1701911539,
0.1046152562,
0.1089518741,
-0.0085930666,
-0.2315934747,
0.4062276781,
0.2074523866,
-0.0814042687,
-0.4438838065,
-0.1291893274,
-0.4720832407,
0.1414041519,
-0.3913083673,
0.1325626969,
-0.1618444771,
0.0186499916,
-0.0297398064,
-0.0175827611,
0.1155494526,
-0.0919882134,
-0.0879415497,
0.2840395272,
-0.2083988488,
0.4887948334,
-0.3455665112,
-0.2010161132,
-0.0177065283,
-0.3488200903,
0.4559250474,
-0.0328088179,
-0.1777758598,
-0.0711353645,
0.1870519221,
-0.170326516,
0.3382768929,
0.315683037,
0.1269316524,
0.2096212059,
0.0929425582,
0.134277299,
0.0061377101,
0.3694490492,
-0.2378084809,
0.2162375897,
-0.0895204172,
-0.0584537052,
-0.0820980445,
0.0643764511,
-0.0697734281,
-0.0684572011,
0.1957746446,
-0.0802552179,
-0.1768534929,
0.2231899351,
0.0027977328,
0.0258171614,
-0.1533596367,
0.1623666584,
0.2284024954,
-0.0751337335,
-0.314527303,
0.1471105218,
0.2970346808,
-0.5313221812,
-0.1263432503,
-0.7054092884,
0.0914076418,
0.0993224978,
0.1780922413,
-0.1492675841,
-0.247409597,
0.4167236984,
-0.184520334,
-0.3637081087,
0.2536585629,
-0.0623039789,
-0.2088900954,
-0.3710051477,
0.0534605905,
-0.1362582296,
-0.0812286437,
0.0470621735,
-0.0913569406
] |
https://github.com/huggingface/datasets/issues/2294 | Slow #0 when using map to tokenize. | Hi, I have found the reason of it. Before using the map function to tokenize the data, I concatenate the wikipedia and bookcorpus first, like this:
```if args.dataset_name1 is not None:
dataset1 = load_dataset(args.dataset_name1, args.dataset_config_name1, split="train")
dataset1 = dataset1.remove_columns('title')
if args.dataset_name2 is not None:
dataset2 = load_dataset(args.dataset_name2, args.dataset_config_name2,split="train")
assert dataset1.features.type == dataset2.features.type, str(dataset1.features.type)+';'+str(dataset2.features.type)
datasets12 = concatenate_datasets([dataset1, dataset2], split='train')
```
When I just use one datasets, e.g. wikipedia, the problem seems no longer exist:
![image](https://user-images.githubusercontent.com/31714566/116967059-13d24380-ace4-11eb-8d14-b7b9c9a275cc.png)
Bookcorpus has more row numbers than Wikipedia, however, it takes much more time to process each batch of wiki than that of bookcorpus. When we first concatenate two datasets and then use _map_ to process the concatenated datasets, e.g. `num_proc=5`, process 0 has to process all of the wikipedia data, causing the problem that #0 takes a longer time to finish the job.
The problem is caused by the different characteristic of different datasets. One solution might be using _map_ first to process two datasets seperately, then concatenate the tokenized and processed datasets before input to the `Dataloader`.
| Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others.
It looks like this:
![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png)
It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
| 172 | Slow #0 when using map to tokenize.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others.
It looks like this:
![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png)
It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
Hi, I have found the reason of it. Before using the map function to tokenize the data, I concatenate the wikipedia and bookcorpus first, like this:
```if args.dataset_name1 is not None:
dataset1 = load_dataset(args.dataset_name1, args.dataset_config_name1, split="train")
dataset1 = dataset1.remove_columns('title')
if args.dataset_name2 is not None:
dataset2 = load_dataset(args.dataset_name2, args.dataset_config_name2,split="train")
assert dataset1.features.type == dataset2.features.type, str(dataset1.features.type)+';'+str(dataset2.features.type)
datasets12 = concatenate_datasets([dataset1, dataset2], split='train')
```
When I just use one datasets, e.g. wikipedia, the problem seems no longer exist:
![image](https://user-images.githubusercontent.com/31714566/116967059-13d24380-ace4-11eb-8d14-b7b9c9a275cc.png)
Bookcorpus has more row numbers than Wikipedia, however, it takes much more time to process each batch of wiki than that of bookcorpus. When we first concatenate two datasets and then use _map_ to process the concatenated datasets, e.g. `num_proc=5`, process 0 has to process all of the wikipedia data, causing the problem that #0 takes a longer time to finish the job.
The problem is caused by the different characteristic of different datasets. One solution might be using _map_ first to process two datasets seperately, then concatenate the tokenized and processed datasets before input to the `Dataloader`.
| [
-0.4216777682,
-0.2463770658,
-0.0001557823,
0.0670947582,
0.0309752263,
-0.208566159,
0.4310255945,
0.2237498164,
-0.2545166612,
0.0450730659,
0.233474046,
0.3255723417,
-0.1414713711,
0.0176059473,
-0.2975895703,
0.0944022089,
0.1700221151,
0.1978503168,
0.3180064559,
-0.10692247,
-0.1142959595,
-0.0325476415,
-0.5134148598,
0.0937798321,
-0.516996026,
-0.094234392,
-0.0523556396,
-0.0085095549,
-0.0878391936,
-0.3727580011,
-0.1796104759,
0.0533388965,
0.0209060535,
0.3229076862,
-0.0001312324,
-0.2167611122,
0.321980983,
0.2510375381,
-0.0777233243,
0.0198330395,
0.031811744,
-0.3308931589,
-0.0778877661,
-0.1234238446,
0.0175316185,
0.0237418134,
0.0749674588,
-0.2054029405,
0.0913551226,
0.0141810216,
0.0364925899,
0.3499346077,
-0.3504897952,
0.2594860196,
-0.07479994,
0.2026160508,
-0.062625356,
-0.0495990328,
0.1012016907,
-0.1707476228,
0.1734017283,
0.2813490033,
-0.2406677902,
-0.0495629534,
0.1356945634,
0.1603334695,
0.4377089441,
-0.4210776389,
0.3177548945,
0.2465800345,
-0.0422626473,
0.097833924,
-0.3110388219,
-0.2917483747,
0.0804975927,
-0.2755731344,
-0.0260989405,
0.0504077859,
0.0243025161,
-0.0064566429,
-0.4279642701,
0.1010868922,
0.1111117676,
0.1455284804,
-0.2755874395,
0.5521757007,
0.1067675799,
0.2040683478,
0.1689035743,
-0.2546337247,
-0.3334894478,
-0.4314101934,
0.1836213768,
0.4776843488,
-0.2874283791,
-0.1189520508,
-0.1553751528,
-0.2407780439,
-0.1358045489,
-0.3256501853,
-0.4295949936,
0.3585688174,
0.0314978771,
0.0367216617,
0.113929145,
0.0111998087,
0.1415975541,
0.3352191746,
0.2813809812,
-0.3873304725,
-0.2329003066,
0.0947898924,
-0.3194718361,
0.0019110487,
-0.1017475352,
0.057348948,
-0.1384477913,
-0.0624519549,
-0.0863145739,
0.0299603362,
-0.4705277681,
0.0324193239,
0.3583805263,
0.1112599,
-0.0891091153,
0.5567101836,
-0.356469959,
-0.0558775924,
-0.4742581248,
0.1034272984,
-0.010232945,
-0.169337377,
-0.2180453539,
0.1857893169,
0.0246350151,
0.0998851806,
0.0603742488,
0.1137021258,
0.1227450743,
0.0288296081,
0.5027250648,
-0.3931923509,
0.2299547195,
0.2137601972,
-0.2416318059,
0.5415734053,
-0.0803953484,
0.0517806038,
-0.265426755,
0.4353518486,
-0.5407431722,
-0.4055197537,
-0.0378010646,
-0.0362008587,
-0.021370668,
0.2882744074,
-0.2898300886,
0.3646248579,
0.356054008,
-0.05927426,
-0.2194039822,
-0.1098218337,
-0.4298149645,
-0.0662314072,
0.1920268536,
0.3820967376,
-0.0858679786,
-0.0251056869,
0.2118616104,
0.3647101223,
0.7044423223,
0.4722284377,
-0.2808416486,
0.1810288876,
-0.1422217935,
0.6345632076,
0.1009043604,
-0.2661670744,
-0.1717856973,
0.4077455401,
-0.31842345,
-0.0377777554,
0.0876830816,
0.0555646159,
0.1874466538,
-0.1130769551,
0.2441987842,
0.1069107503,
0.0766587108,
0.353772223,
-0.4231739342,
0.0233157873,
0.3323550224,
-0.0467137471,
-0.2578984201,
-0.1601981521,
-0.2706969082,
0.0933794081,
0.0737234354,
-0.1934673339,
0.1603427529,
0.2436689287,
0.1488004774,
-0.1971045434,
0.0145642348,
0.1307735145,
-0.1473886669,
0.1625460088,
-0.0961495861,
0.1292531788,
-0.0469143726,
-0.2002080083,
0.1997580379,
-0.1230454892,
-0.1088269055,
-0.0366093405,
-0.1214843914,
-0.1047693342,
-0.1175522208,
0.0085351802,
0.0045817923,
0.0854115263,
0.0250086151,
-0.0044682035,
0.0385737494,
-0.0387144499,
0.1060212702,
-0.0975365192,
-0.2942664027,
0.2391217798,
0.2922899127,
-0.1670205295,
0.0466096401,
0.3752068281,
0.2724764645,
0.0439518467,
-0.0118866432,
0.1884016544,
0.3430139422,
0.1958227456,
0.2216542363,
-0.1940376014,
0.0055271694,
-0.2589850724,
0.0628025085,
0.8033880591,
0.4351349771,
0.3787605464,
0.0590229407,
-0.3100728691,
0.0016222743,
0.1633838713,
-0.087376602,
-0.1206292883,
0.1915399581,
0.3726437688,
0.3853440285,
0.3481544852,
-0.0425091013,
0.2032211274,
0.2762521505,
-0.1238580346,
-0.1909555644,
0.0339910015,
-0.1010520309,
-0.2211482823,
0.190542534,
-0.5782693624,
0.3371144831,
0.0041400194,
0.1818532944,
-0.0196052697,
-0.1397616118,
-0.0293810088,
0.2084519118,
0.1059033573,
-0.017411055,
-0.0055940892,
0.2592743039,
0.0706539527,
-0.085601896,
-0.2151544988,
0.272020787,
0.4728946388,
-0.1735388041,
0.1442515254,
-0.1528486758,
0.2518604994,
-0.0047395118,
-0.2206526101,
-0.0835443586,
-0.2356707901,
-0.0855707675,
0.1491013467,
0.1920591295,
0.1763483882,
0.0780317411,
-0.0344593935,
-0.0481046289,
0.0793812126,
-0.0425901003,
-0.0353817157,
-0.2902145982,
-0.1774062365,
0.3210524321,
0.0619787425,
0.0119388076,
0.039646931,
-0.3111137748,
-0.0545602404,
-0.5426449776,
-0.0045083081,
0.0185827371,
-0.1482397318,
-0.0001311782,
-0.0861121565,
-0.5322769284,
0.0132136345,
0.1309881508,
0.1258894801,
-0.3133979738,
0.1124277487,
-0.253844142,
-0.3051471114,
-0.1234662533,
0.1048953682,
-0.0565839596,
0.2436976135,
0.1446892768,
-0.1881216019,
0.1945780218,
-0.0590647049,
-0.0902347192,
0.1419095993,
-0.0224594194,
-0.3483139575,
-0.0931340382,
-0.2128521502,
0.2848573327,
-0.0747310519,
0.0934047475,
-0.0979234353,
-0.0383976661,
-0.0665076822,
0.2167905122,
-0.0050204648,
-0.0108642373,
-0.1919536293,
0.1102563068,
-0.1700983793,
-0.0288521741,
0.3901928365,
0.2208698243,
0.0089333188,
0.1864259541,
-0.2493094504,
-0.1036613584,
-0.0369431861,
-0.045133099,
0.0267366972,
0.206838727,
0.1386745423,
0.8986780047,
0.2649660408,
-0.3478025794,
-0.1407361776,
-0.1692235172,
-0.1681494117,
0.0339972489,
-0.0702736601,
0.1933213621,
0.2878661156,
0.0653435662,
0.333776176,
0.0477306657,
-0.4255110919,
0.0757416934,
0.0679424629,
-0.2009895295,
-0.1883061826,
0.1098383293,
-0.3344596326,
0.350389421,
0.036955066,
0.1809235066,
-0.3938424885,
-0.3281776011,
-0.1703465134,
-0.0127213933,
-0.0705465674,
-0.4317489564,
-0.741148591,
-0.1603214145,
-0.8604409099,
0.3774622381,
0.1138945147,
0.4273203313,
0.4424973428,
-0.0496725813,
0.2007026374,
-0.1443955898,
0.9118050933,
-0.2354823649,
-0.1320428103,
0.0651302487,
-0.2948302031,
-0.2825038135,
-0.1848842055,
-0.1350062191,
0.5606459379,
0.4132287502,
0.8910479546,
-0.2881855369,
-0.3910264671,
0.0918287784,
-0.054233633,
0.2368578911,
-0.0117616216,
-0.2989799976,
0.0217598639,
0.0537792072,
0.3063642383,
-0.1271666884,
0.2147834748,
-0.1256709695,
-0.2243691385,
-0.104586795,
-0.0579675026,
0.3222068548,
0.0160490945,
0.25762707,
0.2704821527,
0.257338047,
0.2526000142,
0.2224617898,
0.4124115109,
-0.327465266,
-0.0457700677,
-0.0760484859,
0.0832428187,
-0.0973728299,
0.4350224733,
0.5226222873,
0.0872127861,
0.273335427,
0.0553377904,
0.4113699794,
-0.0891619027,
0.3040416837,
0.5810800791,
0.2233852297,
-0.6745132208,
-0.1365584284,
0.0548129827,
0.4843255281,
-0.1171836704,
0.1027108803,
-0.4373590648,
-0.1425435096,
0.054165408,
0.0916483477,
1.1344277859,
-0.391264677,
0.2987225056,
-0.3353005648,
0.2050503492,
0.2643358111,
-0.2932562828,
0.14595972,
-0.2696009278,
0.0886800438,
-0.0223328248,
-0.071943894,
0.2274925262,
0.4449830055,
-0.016143214,
0.2005718201,
-0.0961372927,
0.3847246766,
-0.1948964298,
0.2793482542,
0.5195394754,
-0.3606711626,
0.0977192149,
-0.0962957144,
0.1068649366,
-0.0045545613,
0.0402073339,
0.0704547614,
-0.1235216036,
-0.2152332515,
-0.1378233284,
-0.2195768654,
-0.2363103032,
0.1335582137,
0.1438665986,
-0.0820708871,
-0.0600900874,
0.1567388624,
0.1476809382,
0.3711026013,
-0.0738878176,
0.0373583175,
0.0624028295,
0.1400871575,
0.1169228181,
-0.4759302437,
-0.1420601755,
0.0165999923,
0.0216807835,
-0.0511344485,
-0.2104130685,
0.0044904482,
-0.259506315,
0.1267158389,
0.6846944094,
0.2058445066,
-0.0773865059,
0.2871790826,
-0.1554271877,
-0.1291233152,
-0.0603239387,
-0.0261627287,
-0.1896751523,
0.4373884201,
-0.0392105877,
-0.5450552106,
-0.0115868524,
0.5462257266,
0.1766417772,
-0.1305158436,
0.5346004963,
-0.3273347616,
-0.2365206033,
-0.0676725805,
0.3629674017,
0.0064804391,
0.0368446447,
0.0092676552,
0.3748609126,
-0.001021541,
0.3156610429,
0.057990171,
-0.3333628476,
0.115141198,
-0.1335591525,
-0.13690193,
-0.2969363928,
-0.2305310369,
-0.1561617404,
-0.0337160006,
0.0789395645,
0.2386432588,
-0.3597068191,
-0.1117155701,
-0.1031239927,
0.1722775698,
-0.1716840416,
0.347407788,
-0.1470316052,
-0.0098968605,
-0.03673058,
-0.071078904,
0.0576293394,
0.1206151769,
-0.0915221572,
-0.0774667263,
-0.1411893368,
0.2497136444,
0.0052956161,
-0.3966466784,
0.2849987447,
0.0630086809,
-0.3061586618,
-0.3085699081,
-0.0362928435,
0.3132320642,
-0.0114057073,
-0.1323159039,
0.3741417527,
0.1712275594,
-0.1985109001,
0.2360489219,
-0.1497826874,
0.0487585925,
-0.0171281062,
0.3821558654,
0.2901317179,
-0.0776534155,
0.123423323,
-0.0667805299,
0.2899850011,
0.1601425409,
-0.0129376119,
-0.0384360738,
-0.0291013792,
0.1701571047,
-0.03866129,
0.2133074105,
0.0034067472,
-0.4337036014,
0.5494696498,
-0.0024501591,
-0.0012663124,
-0.2942689955,
0.2426230162,
-0.0435251743,
0.0206859615,
0.1721122116,
0.2906181812,
0.3161356449,
-0.1133483723,
-0.0637255907,
-0.0128460517,
-0.0209685378,
0.0833919123,
0.1557511091,
0.1571675688,
0.0776260719,
0.3752676547,
0.0021044158,
-0.0302342698,
0.3816514909,
0.2634068429,
0.529810369,
0.4195979834,
0.4187683463,
-0.4285307229,
-0.2606981993,
-0.1719608307,
0.5843434334,
-0.0457377844,
0.1622939557,
-0.101473704,
0.2947355509,
-0.1984379441,
-0.4319773316,
0.183829844,
0.381729573,
-0.2996100783,
-0.4777974188,
-0.1748474389,
-0.0874689817,
-0.0691169947,
0.0974079221,
-0.2252936363,
0.1270916015,
0.3971893489,
0.105320178,
0.095469214,
-0.1167218536,
-0.0512645058,
-0.0514086746,
0.356826067,
-0.0892326757,
0.2188120186,
-0.5762061477,
0.1682054847,
0.0820517689,
0.0075192833,
0.4137625098,
0.6114663482,
-0.3368605077,
-0.0594513826,
0.0809930041,
0.0561212301,
0.2254049778,
0.2264371067,
0.1319908947,
-0.30402565,
-0.0107805124,
-0.2309983373,
-0.1472589225,
-0.3216592073,
0.0735696778,
-0.118131429,
-0.0113395872,
0.1541370451,
-0.0963386148,
-0.276273489,
-0.0361946933,
0.1771429777,
-0.1627214849,
-0.0665553883,
0.2220115215,
-0.2043378502,
0.0730706751,
0.0440650731,
-0.0161616951,
-0.2055454552,
0.436307013,
0.1931471825,
0.0088004377,
-0.5149211884,
-0.2020199001,
-0.4283939004,
0.1290433407,
-0.3554840982,
0.121177204,
-0.2088880241,
0.1035788655,
-0.0451579764,
0.0453557894,
0.0580846183,
-0.0680926293,
-0.1239584982,
0.2289161533,
-0.3094981015,
0.5009474754,
-0.2956533134,
-0.2376542836,
-0.0127015235,
-0.4991871417,
0.4623535573,
0.0846223682,
-0.1847005934,
-0.0811255053,
0.1874536425,
-0.0802221969,
0.2932309508,
0.3498600125,
0.1159156933,
0.3047507703,
0.0878457427,
0.0769956633,
0.0760033056,
0.3194646537,
-0.1371797025,
0.2736651301,
-0.0183786079,
-0.089286074,
-0.1453269273,
0.0888003483,
0.0161176678,
0.0099068144,
0.2922944129,
-0.090524517,
-0.1410578489,
0.2335032225,
-0.0231720489,
0.0249355379,
-0.1679148674,
0.233376652,
0.2141356319,
-0.045736488,
-0.2683861852,
0.0445175655,
0.3343245089,
-0.41979146,
-0.1526002288,
-0.6207871437,
0.1547615528,
0.1683094651,
0.1688881665,
-0.1889676452,
-0.2531670332,
0.5244734287,
-0.1408540159,
-0.4507498741,
0.2982175648,
-0.08102642,
-0.2373619527,
-0.3806574047,
0.0726999715,
-0.1702400595,
-0.1334683001,
0.0099520683,
-0.1878966987
] |
https://github.com/huggingface/datasets/issues/2294 | Slow #0 when using map to tokenize. | That makes sense ! You can indeed use `map` on both datasets separately and then concatenate.
Another option is to concatenate, then shuffle, and then `map`. | Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others.
It looks like this:
![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png)
It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
| 26 | Slow #0 when using map to tokenize.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others.
It looks like this:
![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png)
It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
That makes sense ! You can indeed use `map` on both datasets separately and then concatenate.
Another option is to concatenate, then shuffle, and then `map`. | [
-0.4388077259,
-0.2752539814,
-0.0035829507,
-0.0195051711,
0.0376553573,
-0.1688465476,
0.3846201301,
0.2470968217,
-0.2695714831,
0.0726474002,
0.1870825589,
0.3446467221,
-0.1986023337,
0.0340103582,
-0.3061352372,
0.0878570378,
0.1165523082,
0.1894625872,
0.2597584128,
-0.0976631045,
-0.1504403949,
-0.0872970447,
-0.441611439,
0.0910411254,
-0.4734843671,
-0.0844970867,
-0.0814723,
0.0456183031,
-0.1439363956,
-0.2998283505,
-0.2264629304,
0.1087268814,
-0.0366151519,
0.338624984,
-0.0001279823,
-0.2329736352,
0.2126872391,
0.2498805672,
0.045799192,
-0.068935141,
0.0412352793,
-0.3254994452,
-0.1309286505,
-0.018702548,
-0.0309802238,
-0.0179257542,
0.1673600376,
-0.1152555048,
0.1905251741,
-0.0400749519,
0.0446928181,
0.3407950401,
-0.3702796698,
0.2314546257,
-0.059144374,
0.1832052767,
-0.0711282566,
-0.0657922626,
0.1532550603,
-0.2268453985,
0.1455454826,
0.190676719,
-0.2239545882,
-0.039358221,
0.1851699501,
0.1328698546,
0.4181731641,
-0.4273697734,
0.28140378,
0.2699200809,
-0.1735961735,
0.1514288485,
-0.3362787366,
-0.3355287313,
0.0419163965,
-0.3565229177,
-0.0188184809,
-0.0346329287,
0.0667285994,
-0.0074807052,
-0.5250090361,
0.1170425043,
0.1661504805,
0.0660812557,
-0.3220512867,
0.6341161728,
0.1833463311,
0.1864080429,
0.1982424557,
-0.2674390376,
-0.3257969022,
-0.3126782179,
0.1464712769,
0.4830002487,
-0.2674060166,
-0.1194257662,
-0.0261690449,
-0.2011552006,
-0.19951801,
-0.3869157434,
-0.4060813487,
0.3477787673,
0.0074184686,
0.0792026892,
0.1178824008,
0.006118109,
0.0867659077,
0.3740830421,
0.2561856806,
-0.4760049582,
-0.249601692,
0.1057586819,
-0.3221828341,
-0.0576487817,
-0.1828141361,
0.0616206005,
-0.2615198493,
-0.0441682078,
-0.1043369919,
-0.0334299654,
-0.4193738997,
0.0477112532,
0.3961853385,
0.0800355375,
0.0011543551,
0.5042102933,
-0.3501887321,
0.0108960541,
-0.4182543159,
0.1281471997,
-0.0084883291,
-0.1850926727,
-0.2621054053,
0.1198892668,
-0.049098108,
0.2026845366,
0.0051388605,
0.1334312856,
0.1958024502,
0.2225048393,
0.4963683188,
-0.2874111533,
0.2397120297,
0.2287210077,
-0.1848642677,
0.484634012,
-0.0675850436,
0.1625757962,
-0.231788829,
0.4496636987,
-0.4836655557,
-0.3581536412,
0.0886898264,
-0.0503153019,
-0.0290915575,
0.2750353217,
-0.2045660317,
0.4464253783,
0.3693266511,
-0.0993711352,
-0.2557812333,
-0.1525741965,
-0.5478855968,
-0.0989278853,
0.2410936207,
0.252189219,
-0.1584029645,
-0.011020625,
0.1865359247,
0.3694745004,
0.6669707894,
0.5067360997,
-0.2878707647,
0.1310136318,
-0.1607695669,
0.6380212903,
0.0407218486,
-0.1091932952,
-0.1088483781,
0.3064480722,
-0.4410436451,
-0.0714501739,
0.0128971711,
-0.0292175803,
0.1942566037,
-0.1717972606,
0.379499197,
0.0860750601,
-0.1242234707,
0.2882741094,
-0.420545727,
0.0442050733,
0.3506422341,
-0.0837410316,
-0.2194924057,
-0.1622109115,
-0.251668632,
-0.026685385,
0.0405645706,
-0.1992127001,
0.1669295579,
0.0959288552,
0.1650445163,
-0.1816594452,
-0.0439746901,
0.1550924778,
-0.0143426992,
0.1894250959,
-0.1078042015,
0.1165864766,
-0.0158082098,
-0.1188949123,
0.2822365761,
-0.1358157098,
-0.0231439862,
0.0286240447,
-0.1187129691,
-0.1488010883,
-0.1367198527,
-0.034471605,
-0.0475834347,
0.0045011444,
0.0934304595,
-0.0588060431,
0.1493181735,
-0.0622192994,
0.1166624203,
-0.163758114,
-0.2954396307,
0.2489108443,
0.2838459909,
-0.1420403421,
0.1078457832,
0.3962524235,
0.202459529,
0.0529390723,
-0.0186134912,
0.1946261823,
0.3567744792,
0.2995521128,
0.2858374417,
-0.3156942427,
-0.0897184536,
-0.2797775567,
0.1507814825,
0.8951522708,
0.3780690134,
0.3151247501,
0.0568150282,
-0.2766117454,
-0.0043334248,
0.2213650048,
-0.0341793597,
-0.0283555575,
0.2033927292,
0.3341964781,
0.305133462,
0.2553846836,
-0.0430153646,
0.2804566622,
0.2164854705,
-0.0998882428,
-0.1958737522,
0.000924072,
-0.0914536566,
-0.155607298,
0.1186440513,
-0.4987290502,
0.3116354346,
0.0389193743,
0.249767974,
0.0012793717,
-0.1723956615,
-0.013726972,
0.1406292319,
0.126209259,
-0.0237508882,
-0.034801472,
0.2234739363,
0.0336095653,
-0.0484148115,
-0.1124186665,
0.3035727441,
0.4295852184,
-0.2028123587,
0.0842254087,
-0.1635442972,
0.2961603999,
-0.0375077166,
-0.2037375122,
-0.0970497802,
-0.2546182275,
0.0398238078,
0.1681344062,
0.0835210085,
0.1886325479,
0.0789039955,
-0.1020121202,
-0.1018424034,
0.1730251163,
0.0364547819,
-0.0307043213,
-0.2684115469,
-0.1226453856,
0.3741770387,
0.0297649503,
0.0512432419,
0.0608651675,
-0.3349953294,
0.0814583004,
-0.5531007648,
-0.0262765661,
-0.0215873364,
-0.1566879451,
0.0560896918,
-0.082902506,
-0.6097154021,
0.0379513241,
0.1915592253,
0.0100365272,
-0.3099001646,
0.0293187238,
-0.2165518552,
-0.3161249757,
-0.1767939627,
0.1241433769,
-0.0743778646,
0.2454776168,
0.1708731502,
-0.2345411032,
0.2101938128,
-0.1212063208,
-0.0949991867,
0.1285719275,
-0.1188468859,
-0.4825816751,
-0.0787340254,
-0.2240341008,
0.345492512,
-0.0826596022,
0.08134,
-0.006723009,
-0.052493751,
-0.1030181572,
0.2512447834,
0.1546486914,
0.0125443228,
-0.0915630087,
0.0958879888,
-0.0917695388,
0.0141655998,
0.4137444198,
0.1844602376,
0.0286020488,
0.1182154641,
-0.3019365072,
-0.0392445251,
0.039516516,
0.0175780356,
0.0223321598,
0.2818386257,
0.1994909495,
0.9364292622,
0.1769333482,
-0.2471616417,
-0.1466753036,
-0.1311273724,
-0.1864520609,
0.0355856568,
-0.0280281417,
0.2754464149,
0.331962198,
-0.0654487908,
0.305554986,
0.0692318305,
-0.4447918236,
0.0683290437,
0.0655264482,
-0.1484710723,
-0.1748001575,
0.197606951,
-0.2921212912,
0.222203657,
0.0639033169,
0.2113483846,
-0.4197669029,
-0.2751149535,
-0.1789603233,
-0.0849714428,
-0.0347941108,
-0.3862005174,
-0.7608807683,
-0.1851508766,
-0.8920638561,
0.4031720161,
0.1285987049,
0.405697763,
0.4040027857,
-0.1473230273,
0.1809919477,
-0.1462072134,
0.9515534639,
-0.3148620725,
-0.1018193066,
0.0942880362,
-0.2907168865,
-0.2164984792,
-0.1962088048,
-0.0544164404,
0.4924846888,
0.4774308801,
0.773325026,
-0.1962790638,
-0.3250951469,
0.009371954,
-0.1400548518,
0.2199727148,
-0.0067693754,
-0.2870982885,
0.0898111314,
0.1091542467,
0.2544770539,
-0.0445638672,
0.1162584648,
-0.1389715075,
-0.1802914441,
-0.0156379398,
-0.037898168,
0.3263303936,
0.0452068299,
0.2420583218,
0.2547128201,
0.2709081471,
0.4144829214,
0.2233685553,
0.382578969,
-0.3118925691,
-0.0680493861,
0.0341820903,
0.1353443563,
-0.0929419771,
0.4539328218,
0.5498082042,
0.1277033091,
0.1894684732,
0.0446933508,
0.3629504442,
-0.0970466435,
0.2474796176,
0.530297935,
0.222989589,
-0.6152865291,
-0.1870727539,
-0.0418680608,
0.5004031062,
-0.0977362692,
0.1358559728,
-0.4847732484,
-0.1182466596,
0.0849323049,
0.077348344,
1.033454895,
-0.5148510337,
0.2964818776,
-0.3219101727,
0.1757462174,
0.2100132853,
-0.2687894404,
0.1971258074,
-0.24293001,
0.0711005926,
-0.0187861491,
-0.0614189096,
0.256729275,
0.4876917601,
0.0485896803,
0.1938778758,
-0.0276018847,
0.3981178999,
-0.2274303436,
0.0628070906,
0.545024395,
-0.3392468095,
0.07791318,
-0.0579875037,
0.224511385,
-0.064387396,
0.0137376143,
0.0008114883,
-0.1434347332,
-0.1669962108,
-0.1103081405,
-0.2305850685,
-0.2144283354,
0.0163938235,
0.1533912718,
0.0040016887,
-0.0636675507,
0.0405461788,
0.1298913062,
0.2966967821,
-0.0708943754,
0.082768783,
0.1352579296,
0.1543612033,
0.1289827973,
-0.4702277482,
-0.1566708237,
0.046762336,
0.0551216081,
-0.1249578223,
-0.1654785722,
-0.0354790837,
-0.3376194835,
0.117102176,
0.6711373329,
0.283816874,
-0.0546955541,
0.3056976199,
-0.0777952,
-0.1577309519,
-0.0371344835,
-0.0486759022,
-0.1908679903,
0.4021508396,
-0.2150212377,
-0.4364955425,
0.0072041689,
0.5445733666,
0.1661616266,
-0.1699451655,
0.4865758419,
-0.2501216531,
-0.1797344089,
-0.03195085,
0.3752326369,
0.1716776043,
0.1371526718,
0.0203049295,
0.3294658959,
-0.0705557987,
0.3392578661,
0.0268396605,
-0.2536615431,
0.0797122493,
-0.1415091604,
-0.1076893806,
-0.3482830524,
-0.2523836792,
-0.1526266485,
-0.0975809172,
0.0162706897,
0.2962123454,
-0.2722659707,
-0.0762868077,
-0.1294941753,
0.0739235505,
-0.0707215592,
0.3378513455,
-0.1955770105,
-0.0156829115,
-0.015311691,
-0.1194771528,
0.0632919297,
0.1958329678,
-0.1811696738,
-0.0880895182,
-0.0486483611,
0.2328053266,
0.094249934,
-0.4132826924,
0.3264921308,
0.0742446259,
-0.3295325935,
-0.2957628667,
-0.0713587701,
0.3769733906,
-0.0888149515,
-0.2104257196,
0.4065174162,
0.1312716752,
-0.0231064521,
0.1755513102,
-0.134491384,
0.0307519529,
-0.0640717968,
0.3533709943,
0.2714120448,
-0.0806884915,
0.2277090549,
-0.1471527517,
0.2102839202,
0.1438201517,
-0.0448984988,
-0.0448770523,
-0.0620039627,
0.1628132761,
0.085989587,
0.2296498418,
0.0315995403,
-0.3968466222,
0.6052676439,
0.0025993385,
-0.0253976993,
-0.2075588405,
0.3047803342,
0.1090016663,
0.044123847,
0.1556784958,
0.2953761816,
0.2974738777,
-0.2237292379,
-0.0349691659,
-0.123625949,
-0.1364786923,
0.0851324573,
0.2014514357,
0.0931704938,
0.0903858691,
0.3620444536,
-0.0252308473,
-0.0473217405,
0.4222055078,
0.2469168007,
0.5134437084,
0.3462409973,
0.3657305837,
-0.3900961578,
-0.3400642276,
-0.2001995742,
0.6330747008,
0.0776192024,
0.2425192297,
-0.019352654,
0.2777516246,
-0.1924544871,
-0.4998670518,
0.1787227988,
0.4119103849,
-0.3552471101,
-0.4772710204,
-0.1415460408,
-0.1361976266,
-0.0916012302,
0.1225049123,
-0.2288357466,
0.1500302255,
0.4793524444,
0.033187639,
0.1832872182,
-0.0671394169,
-0.1805018336,
-0.1006515324,
0.3039551973,
-0.0721866116,
0.1637684703,
-0.5421497226,
0.082306467,
0.2256790549,
-0.0529551283,
0.3514054418,
0.6039908528,
-0.3567199111,
0.0075334352,
0.0174764805,
0.0715857521,
0.1786415428,
0.2215698212,
0.0940291137,
-0.280637145,
-0.0183810331,
-0.2068705559,
-0.1642172486,
-0.2842899561,
0.0092654675,
0.0029796977,
0.1242682263,
0.1480991542,
-0.0966766775,
-0.2055518925,
-0.0035362747,
0.1343882978,
-0.1567647755,
-0.0454962142,
0.0952080488,
-0.2115176022,
0.089537248,
0.0734496862,
-0.0024370763,
-0.1321170926,
0.349837929,
0.2209886461,
-0.1230859384,
-0.4596062005,
-0.1800463647,
-0.5000241995,
0.1425480247,
-0.4191339314,
0.1426107138,
-0.2712028325,
0.1326363981,
0.0477002785,
0.0183827225,
0.1398371756,
-0.0291794073,
-0.0783360675,
0.2604597211,
-0.281376034,
0.5002377033,
-0.285315752,
-0.2422320247,
-0.0138354106,
-0.4122862816,
0.470612824,
0.063102439,
-0.159439519,
-0.0784425288,
0.2328395694,
-0.1661156416,
0.2907161415,
0.2665553987,
0.1540991664,
0.307461381,
0.0896098316,
0.1229650974,
0.0203499291,
0.336258471,
-0.2440010905,
0.2080632597,
-0.0524312668,
-0.0398028828,
-0.2057076544,
0.0260172505,
-0.0121334633,
-0.1082285717,
0.2541701198,
-0.0816438198,
-0.2034934014,
0.2863993347,
0.0140948184,
0.0633782521,
-0.2183951885,
0.2291815579,
0.2644095123,
-0.0783023387,
-0.2523021996,
0.1403752863,
0.3205937743,
-0.5568314791,
-0.2029642761,
-0.6513805985,
0.0344413072,
0.1288055182,
0.1286982894,
-0.2269719094,
-0.2931537628,
0.3912014961,
-0.1233496591,
-0.3294095695,
0.2369916141,
-0.1250511855,
-0.2932346165,
-0.3721489012,
0.0813704208,
-0.1436475664,
-0.1949798763,
0.059672609,
-0.1216475964
] |
https://github.com/huggingface/datasets/issues/2288 | Load_dataset for local CSV files | Hi,
this is not a standard CSV file (requires additional preprocessing) so I wouldn't label this as s bug. You could parse the examples with the regex module or the string API to extract the data, but the following approach is probably the easiest (once you load the data):
```python
import ast
# load the dataset and copy the features
def process(ex):
return {"tokens": ast.literal_eval(ex["tokens"]), "labels": ast.literal_eval(ex["labels"])}
dataset = dataset.map(process, features=new_features)
```
| The method load_dataset fails to correctly load a dataset from csv.
Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings.
row example:
```tokens | labels
['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ]
```
The method, loads each list as a string: (i.g "['I' , 'am', 'John']").
To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type
```
new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None))
new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags)))
dataset = dataset.cast(new_features)
```
but I got the following error
```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
```
Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well.
How can this be solved ? | 72 | Load_dataset for local CSV files
The method load_dataset fails to correctly load a dataset from csv.
Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings.
row example:
```tokens | labels
['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ]
```
The method, loads each list as a string: (i.g "['I' , 'am', 'John']").
To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type
```
new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None))
new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags)))
dataset = dataset.cast(new_features)
```
but I got the following error
```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
```
Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well.
How can this be solved ?
Hi,
this is not a standard CSV file (requires additional preprocessing) so I wouldn't label this as s bug. You could parse the examples with the regex module or the string API to extract the data, but the following approach is probably the easiest (once you load the data):
```python
import ast
# load the dataset and copy the features
def process(ex):
return {"tokens": ast.literal_eval(ex["tokens"]), "labels": ast.literal_eval(ex["labels"])}
dataset = dataset.map(process, features=new_features)
```
| [
-0.1104321033,
-0.0460994393,
0.0017929586,
0.0747478604,
0.4480467439,
0.0627774,
0.455213517,
0.21968247,
0.2994900048,
-0.1329666227,
0.2060757577,
0.4624340534,
-0.0728464946,
0.0797174126,
-0.0546836816,
-0.2258628756,
0.1463977695,
0.1216583997,
-0.0681669116,
-0.0514058135,
-0.2214132249,
0.1172492579,
-0.2457355112,
0.062645331,
0.1473492086,
0.0675000325,
0.044480592,
0.1194716096,
0.1582893282,
-0.4119059145,
0.1597042382,
-0.1485557705,
0.3543725014,
0.2177934647,
-0.0001225974,
-0.030873131,
0.2000942081,
-0.0455260687,
-0.1343297809,
-0.4299837649,
-0.3686627746,
-0.4428127706,
0.6035308838,
-0.2337204665,
0.0679721683,
0.0058750734,
-0.1318272501,
-0.4414081872,
0.3704529405,
0.491743803,
0.1028464884,
0.2604967356,
-0.2128969133,
0.0683708042,
0.2531422973,
0.1729601771,
-0.2683463693,
0.0115080317,
0.2413829267,
0.2831140757,
0.0202590451,
-0.2514044046,
-0.3278877139,
-0.1090305001,
0.4502302408,
0.1004334763,
-0.172893092,
-0.2152025402,
-0.0185688175,
0.0967392847,
0.6940965056,
-0.0439017937,
-0.3437823355,
-0.1345559955,
0.1029635742,
-0.3265565336,
0.0719096735,
0.0394789577,
-0.0936726779,
0.2009943724,
-0.2288365811,
0.0179857165,
-0.0210508686,
0.2387347817,
0.0580499396,
-0.0684755817,
-0.183066994,
0.2108051032,
-0.047941789,
-0.2082451135,
0.1586770266,
-0.2253188938,
0.1418033093,
0.3070480525,
-0.4954458773,
0.1484600902,
0.1250780076,
-0.1021136492,
-0.0821916312,
0.2027685791,
0.314424336,
0.1013438776,
-0.0861856788,
0.2051599473,
0.2729561925,
0.2770816386,
0.2978345156,
0.0810165033,
-0.0635053292,
-0.0946139097,
-0.1663814187,
0.0363044366,
-0.3185819685,
-0.19234851,
0.3789396882,
0.1587803513,
0.13753815,
-0.3657593727,
-0.362698853,
0.235165298,
-0.2413617522,
-0.0889681727,
0.0760768279,
0.283634156,
-0.1297875792,
0.4884744287,
0.1027977988,
0.3484075963,
0.1101016253,
-0.1406172663,
-0.1618347764,
-0.1079709008,
-0.08911217,
-0.0602724701,
0.0965370536,
-0.363142699,
0.1043662205,
-0.0351546034,
0.0497357622,
-0.1586532295,
-0.2356229722,
-0.0306247603,
0.003865588,
0.2680172026,
0.0140140196,
0.0956333131,
0.3562785983,
-0.0459538996,
-0.2184278518,
0.3119083047,
-0.46207726,
-0.2153680027,
0.0045836624,
-0.0065714289,
-0.2278193831,
-0.0331733488,
-0.431763202,
0.0690495074,
0.1968417168,
0.154049024,
-0.1759970337,
-0.4027113616,
-0.2068365663,
-0.4180801511,
0.1779427826,
0.3996337056,
-0.516390264,
0.0751357749,
0.0115570556,
0.0245532691,
0.1286626756,
0.465002954,
-0.1831560582,
0.2963227332,
-0.1501671523,
0.3829426765,
0.504729569,
0.0998841599,
-0.0535181537,
0.5566627979,
0.0630637109,
0.0640882701,
0.1053317711,
-0.0127034178,
0.3253757358,
-0.1700781882,
0.0269853901,
0.448328644,
-0.1635105163,
-0.0150685068,
-0.1051959246,
-0.1559159011,
0.2475552261,
0.1033510715,
-0.1184362173,
0.3426095843,
0.1636872441,
-0.0604913682,
0.041921556,
-0.3142812848,
0.154203549,
0.2057690173,
-0.0115862722,
0.1584034115,
-0.0495416038,
-0.0531674922,
-0.6366580725,
-0.0379676707,
0.2213626355,
-0.1010946706,
-0.3996531069,
-0.0541028716,
-0.3353927433,
0.2223336697,
-0.087902151,
0.5470007658,
-0.100809142,
0.13921161,
-0.0799392611,
0.0280990172,
-0.09978576,
0.0700339377,
-0.2976455092,
0.0392474309,
-0.2093294412,
0.0670429021,
0.2348164767,
-0.1278737932,
-0.0986960158,
0.0919288024,
0.3017795682,
-0.0927232057,
-0.2805357575,
0.3237707913,
0.0724094361,
-0.1806603521,
-0.4057727456,
0.0707099512,
0.1225663796,
-0.4118908644,
-0.096049577,
0.367508173,
0.298291564,
-0.1217671856,
-0.1948540062,
0.5355855227,
-0.1639034748,
0.3591681719,
-0.1003534868,
0.0166159589,
0.4018521309,
0.0990030766,
-0.2214929163,
-0.0735372901,
0.118748337,
0.1199107915,
0.2753317952,
0.083298862,
-0.4843611419,
-0.1074103862,
0.2010633349,
-0.139702335,
0.1424911022,
0.3510164917,
-0.0368601158,
0.1023043543,
0.0236880388,
-0.2591195107,
0.3383776248,
-0.035522148,
-0.0439351834,
-0.0970787778,
-0.0985543802,
-0.0578274578,
0.1779475957,
-0.03336142,
0.114009276,
0.2376086712,
0.0508308969,
-0.0402042903,
-0.206646502,
-0.1779197901,
0.1371903419,
0.1496102959,
-0.6657980084,
0.1570386142,
-0.4116669297,
0.2593960762,
-0.2830722332,
-0.085263595,
0.1355612278,
-0.1846073419,
-0.2917083204,
0.2667336464,
-0.164135322,
0.126174435,
-0.5663658381,
-0.0178410374,
0.2130135745,
-0.6803796887,
0.1811014861,
0.0629809797,
-0.178278923,
-0.0764446333,
0.3991119564,
0.2297201604,
0.0199136101,
-0.0418581739,
0.0285447165,
-0.1528598219,
-0.187620312,
0.1119918749,
-0.1340637654,
0.1883443743,
0.103466548,
0.0608446077,
-0.2700411975,
-0.5033233166,
0.2780170143,
-0.1225628927,
-0.1226958036,
0.4148797989,
-0.0341416895,
-0.3602369726,
-0.2041588873,
-0.4714083672,
-0.1735007316,
-0.3078493178,
0.1805060655,
0.1036358848,
-0.017893631,
0.0935267434,
0.2594176531,
0.0780491829,
0.2604346275,
0.0436242595,
-0.0324876644,
0.0536321141,
0.5690494776,
-0.1156724989,
-0.4092381299,
0.0243679807,
-0.2021603137,
-0.1955375522,
0.371409744,
-0.1427942514,
0.1118421629,
-0.0826792344,
0.2352446169,
0.0215759818,
-0.0280709248,
0.3271404803,
-0.0308698863,
0.0953569561,
-0.1797701865,
-0.2646719813,
0.165397495,
0.2676552832,
0.0848533735,
0.5000000596,
0.6963593364,
-0.2381378859,
0.4044566751,
-0.0274049044,
-0.1215994805,
0.4540217221,
-0.17484124,
0.0772478655,
-0.1671364307,
-0.2304944545,
-0.2067227364,
-0.2361326814,
-0.3253377676,
0.3207270205,
-0.100292474,
-0.3117117882,
-0.1034622416,
0.3674574494,
-0.312669307,
-0.2034709007,
0.3986496031,
-0.2290896475,
0.3204395473,
-0.0259239916,
0.1603929996,
-0.0733191967,
-0.1492640972,
-0.005499498,
0.1686308831,
0.1123345941,
-0.1163133159,
-0.457154721,
-0.0342426375,
-0.3056702912,
0.1775715053,
0.331233561,
0.5592122674,
-0.0358421803,
-0.1711426079,
0.1063518301,
0.1083457693,
0.3901166618,
-0.2086945325,
-0.001161979,
0.2523573637,
0.0397784412,
-0.0906487703,
0.0091871852,
-0.1796158105,
-0.0382775366,
-0.0817604885,
0.1339759827,
-0.2366572469,
-0.1357566565,
-0.1948539168,
0.3967038691,
-0.2197414935,
-0.0785210729,
-0.130049333,
-0.3525591195,
-0.2233394831,
-0.0077140653,
0.2062226534,
0.414873004,
-0.0111161433,
0.1392096132,
-0.4173450172,
-0.0830803737,
0.3357973397,
0.0164368358,
0.3778500259,
0.0730973557,
0.2380175143,
-0.2853320837,
0.0951165631,
-0.0547424555,
0.700842917,
0.0187543184,
-0.805583477,
0.1155388206,
-0.2347241491,
0.610119462,
0.1196995229,
-0.3118108213,
0.0897004977,
0.0616621003,
-0.0284207277,
0.023918448,
0.0324666351,
0.1782877743,
-0.1129926518,
-0.0735789388,
-0.5334358215,
0.2675795257,
-0.017927574,
-0.0700028092,
-0.1552606076,
-0.0905959681,
-0.343986094,
0.5822553635,
0.1116435975,
0.8149846196,
-0.1586088985,
0.0223726239,
0.1512669772,
0.1094428375,
0.3992290497,
0.4279825389,
-0.0887041092,
-0.372104764,
-0.1322127879,
-0.1304241866,
-0.0532290265,
0.2831765711,
0.307397455,
-0.1827314347,
0.3941600919,
-0.2625229061,
0.4788022637,
0.1579055488,
0.0136172529,
0.3976053298,
-0.5610571504,
-0.4361241162,
0.0566091612,
-0.0795366764,
-0.0500404388,
0.1793604493,
-0.1025281399,
-0.0147748627,
-0.0690697506,
-0.1671577692,
0.2023212314,
-0.0245174598,
0.0333178341,
0.022551503,
-0.3911600709,
0.3321498334,
0.3873808086,
0.2140109837,
-0.1236119047,
0.0530749783,
-0.1053179279,
0.0653140619,
0.1610912383,
-0.109420903,
-0.1727660447,
0.323371619,
0.2814848423,
0.0633919388,
0.1883974075,
-0.1877055466,
-0.4563295841,
0.2772745788,
0.0200755075,
0.2457720488,
-0.6801097393,
-0.6067522168,
-0.1620603204,
0.1821791977,
-0.0854544938,
-0.0015259744,
0.0692154169,
-0.013624981,
0.1043779626,
0.0404802375,
-0.1276174188,
0.0908663198,
0.1430969238,
0.0589275546,
-0.1127817407,
0.4481782913,
0.3223390877,
-0.0844488069,
-0.0717108622,
0.1627794057,
0.2564383745,
-0.5918010473,
0.05480754,
-0.1395561695,
-0.1452334672,
0.0483497307,
0.6411308646,
0.0509414412,
0.1388817877,
-0.0750024021,
-0.4760088623,
-0.3894129694,
0.1771918684,
0.197563976,
0.0376205258,
-0.053181123,
-0.0236831903,
-0.1459553838,
-0.2336324453,
-0.1492192,
-0.211229533,
-0.0947555229,
0.1627300531,
0.0821605325,
0.2315101326,
0.1650511622,
0.0571823679,
0.0496042371,
0.0728445128,
0.0216937382,
-0.1048055068,
-0.0801290423,
0.24563241,
0.1700916737,
-0.0133298896,
-0.240971759,
-0.2888042331,
-0.1671979725,
-0.3431460559,
-0.1311098635,
0.1529919654,
-0.117706731,
0.0611687489,
0.1232546717,
0.1416048408,
-0.2951573133,
0.2083010375,
-0.220798254,
0.3090306818,
-0.0685164705,
0.2035960257,
0.0723571628,
0.0867719576,
-0.169490397,
0.1411750019,
0.2775629759,
0.0172086563,
0.2658578455,
-0.3038056493,
0.1008636951,
0.1427965015,
0.2968775034,
0.4185532033,
-0.0852781311,
0.0391541459,
0.3072121739,
0.0333189443,
-0.1571902484,
-0.1819151789,
0.1860195696,
-0.0447642505,
-0.0816644058,
0.3542859852,
0.1773703247,
-0.1022182554,
0.1233807206,
-0.0286828037,
0.5112875104,
-0.1949407607,
-0.0704222694,
0.6916536689,
0.2913289964,
0.161191687,
0.1603684276,
-0.0132483318,
0.1994768083,
0.3682754934,
-0.125343591,
-0.0963835418,
0.2946383655,
0.4194566607,
0.0165846609,
-0.4054481089,
0.2480336428,
0.2353260219,
-0.0219287239,
0.2139555365,
0.1303154379,
0.2696866393,
-0.1014123261,
-0.2234063745,
-0.1427470893,
0.3004918993,
-0.1382133365,
-0.3201159835,
-0.3272538185,
-0.1077626944,
-0.2257194668,
-0.0402905904,
-0.1128792688,
-0.1230404899,
0.3907458186,
0.1284092367,
0.2790485322,
-0.3674771488,
-0.3075930178,
0.054378394,
0.0201761872,
-0.2398434877,
0.3100337982,
-0.1282325089,
0.0060277968,
0.3204964697,
-0.0867380574,
0.3156218827,
0.5036239028,
0.0794752687,
-0.0671959594,
-0.0450188667,
-0.1410574019,
-0.0617943108,
0.2614477277,
-0.18359828,
0.3418868184,
0.2386572808,
0.0206037406,
-0.0517917722,
0.4905464351,
-0.1872000396,
0.0214822646,
-0.1375134289,
0.3965118229,
0.2406617552,
-0.1396110058,
-0.0916912556,
-0.1429030299,
-0.0435065366,
-0.0867457911,
0.4419137836,
0.0340840109,
0.2552064061,
0.221196577,
0.0060107103,
-0.0808288902,
0.1633161753,
0.2484546006,
0.1098903269,
-0.2191246897,
0.1393922269,
-0.746755302,
0.0526857488,
0.1535260677,
-0.2677980065,
0.447887063,
0.2577358186,
0.2434032708,
0.2736603916,
-0.4172682762,
-0.1067544222,
0.1898748726,
0.286447227,
0.0744639784,
-0.2029292285,
0.179115802,
0.2065351605,
-0.2200174481,
-0.5413213372,
0.0190439727,
-0.1167134494,
-0.0261459071,
-0.1522410214,
-0.252854377,
-0.0122336531,
-0.0994630158,
0.2671572566,
-0.0228851344,
0.5270898938,
-0.0979364961,
0.0292957183,
-0.0202064756,
-0.3900428712,
-0.2294013947,
0.4323119521,
-0.2207964808,
0.4948234856,
-0.2900181413,
0.4376682937,
-0.2634707391,
-0.0292543899,
0.1528317779,
-0.1753898859,
-0.4586537182,
0.4043571353,
-0.5012463927,
0.1835055351,
0.0770833492,
0.1095326468,
0.0006308138,
0.2872672379,
0.0253671501,
-0.3708915412,
0.3762870431,
-0.5570363998,
-0.3053694069,
-0.0174348243,
-0.0726697445,
0.0540478863,
-0.0671414807,
-0.4190600216,
-0.1293236017,
0.2275843769,
-0.1773214191,
-0.266245693,
0.0923745185,
-0.066555053,
0.0066875587,
-0.2397062182,
0.2292441875,
0.1236815602,
-0.1978787035,
-0.1641546935,
-0.4658322334
] |
https://github.com/huggingface/datasets/issues/2288 | Load_dataset for local CSV files | Hi,
Thanks for the reply.
I have already used ```ast.literal_eval``` to evaluate the string into list, but I was getting another error:
```
ArrowInvalid: Could not convert X with type str: tried to convert to int
```
Why this happens ? Should labels be mapped to their ids and use int instead of str ? | The method load_dataset fails to correctly load a dataset from csv.
Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings.
row example:
```tokens | labels
['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ]
```
The method, loads each list as a string: (i.g "['I' , 'am', 'John']").
To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type
```
new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None))
new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags)))
dataset = dataset.cast(new_features)
```
but I got the following error
```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
```
Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well.
How can this be solved ? | 55 | Load_dataset for local CSV files
The method load_dataset fails to correctly load a dataset from csv.
Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings.
row example:
```tokens | labels
['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ]
```
The method, loads each list as a string: (i.g "['I' , 'am', 'John']").
To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type
```
new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None))
new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags)))
dataset = dataset.cast(new_features)
```
but I got the following error
```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
```
Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well.
How can this be solved ?
Hi,
Thanks for the reply.
I have already used ```ast.literal_eval``` to evaluate the string into list, but I was getting another error:
```
ArrowInvalid: Could not convert X with type str: tried to convert to int
```
Why this happens ? Should labels be mapped to their ids and use int instead of str ? | [
-0.1745121032,
-0.1091789901,
-0.0231067296,
0.0980234742,
0.4885459542,
0.0214577187,
0.4982628822,
0.2223206609,
0.3661426008,
-0.0579063818,
0.0228599496,
0.5268844366,
-0.0411036983,
0.1786160022,
-0.0871041268,
-0.1635923833,
0.150417909,
0.1215565056,
-0.0954685137,
-0.0548119135,
-0.2822066247,
0.1153571308,
-0.2327806056,
0.1028903127,
0.0758107454,
-0.0212441608,
0.1522943974,
0.0589684471,
0.1551150382,
-0.469017446,
0.0427118465,
-0.1593901664,
0.4239129722,
0.1603815705,
-0.0001222864,
-0.0723951906,
0.2014046609,
-0.0017852908,
-0.1700442582,
-0.2721408308,
-0.3334535062,
-0.3312610984,
0.5561586022,
-0.2470589131,
0.1309711933,
-0.0750064775,
-0.0999572501,
-0.4044758677,
0.200977996,
0.4960657656,
0.1088149175,
0.1556665152,
-0.0642046928,
0.0743323341,
0.3011791706,
0.1582487673,
-0.245344609,
0.0072981124,
0.2836195827,
0.4058944285,
-0.0172995143,
-0.158352077,
-0.2349090576,
-0.1760402769,
0.5206283927,
0.0213500746,
-0.1103870422,
-0.2337290049,
-0.0291653015,
-0.0270526651,
0.82423985,
-0.0337935053,
-0.3313738406,
0.0284713525,
0.0084751323,
-0.4012274742,
-0.0091966763,
-0.0444252938,
-0.0706204325,
0.1964200586,
-0.2307464331,
-0.0202313252,
-0.1065665707,
0.2094974369,
0.1264785081,
0.0024120843,
-0.1604216695,
0.2525994182,
-0.0231933128,
-0.3424346745,
0.1272234023,
-0.1139905155,
0.0617733411,
0.200187549,
-0.5123820901,
0.0699715614,
-0.0475860722,
-0.0426839627,
-0.0511403754,
0.1655862331,
0.2130737603,
0.1673611104,
-0.0533783287,
0.1695119143,
0.2711190879,
0.4393446147,
0.3845515847,
0.1459638923,
-0.0772825852,
-0.2162696123,
-0.1859956682,
0.0367970355,
-0.3532291651,
-0.1677089781,
0.4503813982,
0.1206073985,
0.045395039,
-0.4721843004,
-0.3626650572,
0.1549423039,
-0.226535961,
-0.0372202434,
0.1171708629,
0.3768066168,
-0.1251844615,
0.5413234234,
0.1200023815,
0.2771107554,
0.1804115176,
-0.1838898063,
-0.107172966,
-0.0954611152,
-0.1457130164,
-0.0957703888,
0.0384714194,
-0.3362180293,
0.1143925115,
-0.0716411546,
0.0394221433,
-0.1666862071,
-0.2015028,
-0.1003284007,
0.1008360684,
0.2000790685,
-0.0727959424,
0.1101015806,
0.2909411788,
-0.054102581,
-0.1701564193,
0.3316213191,
-0.5061309934,
-0.2791667283,
-0.0096541345,
0.0039624814,
-0.0279718097,
-0.0403444245,
-0.3437795639,
0.1190861836,
0.1428310275,
0.0864049867,
-0.2007546127,
-0.4404554367,
-0.1076720431,
-0.3787828684,
0.0964559987,
0.2499115169,
-0.5306059718,
0.1216107756,
0.0757078454,
0.0141588999,
0.2510149777,
0.5593866706,
-0.1469876766,
0.25116238,
-0.1406390667,
0.3639692366,
0.5061858296,
-0.0752422065,
-0.0687339976,
0.5408248901,
0.1516239494,
-0.151190266,
0.0947823524,
0.1008553505,
0.3450998962,
-0.1787749678,
0.0259270966,
0.32364586,
-0.109979108,
-0.0535837635,
-0.23698695,
-0.0890313387,
0.2300911248,
0.1359633207,
-0.1365003437,
0.3274652064,
0.1866752356,
0.0384794921,
-0.0829609707,
-0.3018825352,
0.1766663641,
0.1386437565,
-0.1012362391,
0.1233699694,
-0.0199299641,
0.0147775067,
-0.6875215769,
-0.137183398,
0.1024213508,
-0.0769347325,
-0.2303438783,
-0.0767375156,
-0.3774006069,
0.2323752195,
-0.0619987659,
0.5937692523,
-0.1051986143,
0.1890153289,
-0.0905117989,
-0.0568342507,
-0.1481353045,
-0.0236121081,
-0.3030287325,
0.0087987352,
-0.1092746928,
-0.1342167556,
0.1625543535,
-0.1477349401,
-0.135344997,
0.0716532469,
0.3193821609,
-0.058782056,
-0.3308489919,
0.3488803506,
0.0969925895,
-0.2780361176,
-0.3008567989,
0.1070828289,
0.0893100649,
-0.5350095034,
-0.0993568599,
0.2644625008,
0.3447466195,
-0.1565268934,
-0.153091222,
0.4296925962,
-0.242047295,
0.4259823859,
-0.1141402721,
-0.0087802978,
0.3594489992,
0.1318300515,
-0.202818349,
-0.0955799669,
0.0416047648,
0.0982767418,
0.3094271719,
0.1073539034,
-0.5325562358,
-0.0246953182,
0.2461334616,
-0.1355324984,
0.1485407501,
0.3439358473,
0.0264562368,
0.0583643652,
0.1440450996,
-0.3772360682,
0.3147377074,
0.016854519,
0.0069151563,
-0.1343993545,
-0.1218230203,
-0.0391922034,
0.2447085828,
-0.0561148413,
0.0706912205,
0.2142899185,
0.0330249034,
-0.1653952748,
-0.1804199219,
-0.2334324718,
0.0790091306,
0.1729780734,
-0.6239629984,
0.0942308158,
-0.329673171,
0.1743194312,
-0.2370875478,
-0.2676619291,
0.1135047153,
-0.2016697228,
-0.2089028805,
0.2420658767,
-0.1201277375,
0.1385365278,
-0.4033138156,
0.0975713357,
0.1901009232,
-0.523788631,
-0.0100408839,
0.0020123078,
-0.2710903883,
-0.0818772763,
0.3792649209,
0.2798448205,
0.0619554743,
-0.1255288571,
0.1523257345,
-0.1678496003,
-0.2552999556,
0.0680265054,
-0.0739108846,
0.1182405353,
0.0621924289,
0.070852004,
-0.3248398602,
-0.3971912563,
0.2296409458,
-0.1051728204,
-0.1522286981,
0.3554172218,
-0.1044358388,
-0.357352972,
-0.1748084277,
-0.5161354542,
-0.2136059701,
-0.4151929915,
0.1933621466,
0.1393045634,
0.0469275974,
0.0435751528,
0.262316376,
0.123154968,
0.3312579095,
0.1154701635,
-0.0740697533,
0.0053717582,
0.5278596282,
-0.1268103272,
-0.3519243896,
0.0330699794,
-0.1132659316,
-0.0612161346,
0.310937196,
-0.041836977,
0.1912267506,
-0.0278598443,
0.264898628,
-0.0023111796,
0.0812980533,
0.2223413736,
0.0311562717,
0.076190576,
-0.1425579488,
-0.2828026116,
0.3175475001,
0.1232310161,
0.1157065183,
0.5898655653,
0.6031091213,
-0.3257270157,
0.3851870298,
-0.0492636561,
-0.1964692324,
0.4677956104,
-0.1519376338,
0.1013599411,
-0.2319478244,
-0.1796561927,
-0.1222324967,
-0.1774988919,
-0.2684707344,
0.3070852458,
-0.1230673417,
-0.315453589,
-0.1293950081,
0.3553230166,
-0.2967692018,
-0.0969944894,
0.3734416068,
-0.2136843801,
0.2447090894,
-0.1190201789,
0.0842541829,
-0.0764387324,
-0.1087259054,
0.0913236514,
0.1315596253,
0.1068791524,
-0.0873864219,
-0.5244098902,
-0.103889741,
-0.2857050598,
0.2556540966,
0.3292596936,
0.655788064,
-0.1432275176,
-0.1253605634,
0.0668188035,
0.1294064969,
0.3343355954,
-0.2652457356,
-0.0857283548,
0.218383491,
0.0955885649,
0.021263307,
0.091145888,
-0.2352449447,
-0.1220687255,
-0.0932944864,
0.1723747402,
-0.3121434152,
-0.1891806871,
-0.1928466707,
0.3368740976,
-0.175569579,
-0.0354147181,
-0.1357357055,
-0.3079073727,
-0.2543928027,
0.0501426347,
0.2633686662,
0.3873691857,
0.0648978502,
0.0652581975,
-0.4860832989,
-0.0539547578,
0.3168367743,
0.0468862616,
0.3901627958,
0.0490331464,
0.1119224951,
-0.3145260811,
0.1846652031,
0.0357679352,
0.6665096283,
-0.0731325522,
-0.8118276596,
0.1926190555,
-0.2284467816,
0.6646197438,
0.063915126,
-0.2622719407,
0.0321490206,
-0.0808484629,
-0.0392322205,
0.0516318344,
0.1157313064,
0.1197476685,
-0.0257608835,
-0.118915461,
-0.4395479262,
0.2684923112,
-0.0307262056,
-0.050976146,
-0.0223330799,
-0.0436790697,
-0.3465598524,
0.5494554043,
0.2992218137,
0.9601740837,
-0.1665427387,
-0.0754783154,
0.1074844077,
0.0600272715,
0.4184288979,
0.4510518014,
-0.1104427278,
-0.4783464074,
-0.081477195,
-0.0965283141,
-0.1091403365,
0.1392848194,
0.3080069721,
-0.2980457544,
0.4427351058,
-0.1956773549,
0.3273767531,
0.1547433287,
0.1308042854,
0.4216520488,
-0.6057385802,
-0.3888364732,
0.0494438596,
-0.2001888305,
-0.0558022857,
0.122109279,
-0.1107900068,
0.0048691421,
-0.0194989033,
-0.0054046321,
0.1903208792,
0.0289517473,
0.0167377647,
0.0370973274,
-0.2289067209,
0.2931968272,
0.4237113893,
0.3239544034,
-0.1413273513,
0.0419275686,
-0.1754639298,
0.0567618683,
0.2114455402,
-0.1153766736,
-0.1104581505,
0.3753097951,
0.2046165168,
0.1186156496,
0.2687427104,
-0.2008624971,
-0.4143677354,
0.1782288551,
-0.0760684162,
0.3111490905,
-0.7221402526,
-0.4602560401,
-0.1285828799,
0.0333975032,
-0.0694586188,
-0.0068865889,
0.001764818,
0.0250652395,
0.174829185,
0.1566282362,
-0.1613205373,
0.1177104786,
0.0944816545,
0.0566833727,
-0.0683544129,
0.3383949101,
0.2126651108,
-0.1351850778,
-0.086423263,
0.2136966288,
0.2606021762,
-0.6703617573,
0.1074095368,
-0.1867011636,
-0.2304186821,
0.0568598174,
0.6951978803,
0.089361012,
0.236817956,
-0.1200569868,
-0.3224504888,
-0.5295478106,
0.2325190753,
0.0771251619,
0.1245128289,
-0.0255273413,
-0.0955993533,
-0.1672354043,
-0.2512122989,
-0.1790679395,
-0.226036638,
-0.203199923,
0.1978925467,
-0.0268366188,
0.1749272496,
0.0735568702,
0.1984947324,
0.0286732651,
0.122110866,
-0.0104307821,
-0.0668749437,
-0.0072933198,
0.263835609,
0.2219247371,
0.0452936403,
-0.366961658,
-0.2743261456,
-0.1671469957,
-0.3020283282,
-0.1595325619,
0.0931513682,
-0.1908313483,
0.0694068521,
0.1221775115,
0.16188021,
-0.2803741097,
0.2299582511,
-0.0745547563,
0.2896380126,
-0.1253442615,
0.18301633,
0.0148311146,
-0.0342968814,
-0.1972384304,
0.2030230761,
0.4118267894,
-0.0762390941,
0.2323229909,
-0.2946209311,
0.1638776362,
0.1537062079,
0.2169138789,
0.3342393935,
-0.098901704,
-0.0225510616,
0.315577358,
0.029014254,
-0.0749650002,
-0.2232450396,
0.0144933229,
-0.0943717584,
-0.1142103821,
0.4057324231,
0.2134424746,
-0.1341503859,
0.1725120544,
-0.1364740133,
0.4199761748,
-0.2052788138,
-0.2592467964,
0.6168779135,
0.1744424105,
0.1732779741,
0.3604377508,
0.0263559315,
0.17169635,
0.3486082256,
-0.1904982775,
0.0358636305,
0.2933235168,
0.5195005536,
0.0373279527,
-0.23632209,
0.2139701098,
0.3423801959,
0.0165670495,
0.197649464,
0.1567903459,
0.2483704835,
-0.1659099609,
-0.3684504032,
-0.0531706624,
0.268332392,
-0.212314561,
-0.2660959959,
-0.4559816122,
-0.1595575362,
-0.2920829356,
-0.0755721256,
-0.231898427,
-0.0610431693,
0.4262928367,
0.1574838161,
0.3302526474,
-0.3787959814,
-0.4230477214,
0.1484675854,
0.0860214755,
-0.2165573239,
0.4323186576,
-0.1213349402,
0.0173093583,
0.3313528299,
0.011893901,
0.3481970131,
0.5415486097,
0.1784788221,
-0.1693000942,
0.0555143133,
-0.1464319974,
-0.0100354934,
0.2831675708,
-0.1197289675,
0.2042813152,
0.2606140375,
0.0198878665,
-0.0287934653,
0.474440515,
-0.2728382349,
0.0609484501,
0.0328228138,
0.3194431663,
0.2836464047,
-0.2071184814,
-0.1013967842,
-0.1426232159,
-0.1514362395,
-0.0781532452,
0.3565247655,
-0.0592494793,
0.2234139591,
0.1519926786,
0.0196995195,
-0.052868247,
0.2357497662,
0.1952367872,
0.0818013027,
-0.2347945422,
0.0796157494,
-0.6122210026,
0.1297812313,
0.3405699134,
-0.1923160702,
0.4770173132,
0.2007791549,
0.2242657542,
0.3185651302,
-0.3486528993,
-0.1267262548,
0.2773860395,
0.3379605711,
0.0695362166,
-0.0097362418,
0.2614305019,
0.2672412395,
-0.2102858871,
-0.5415984988,
0.0850291476,
-0.074751243,
-0.03805447,
-0.1727860719,
-0.144344151,
-0.0024614243,
-0.0389543921,
0.2549992204,
0.0003756813,
0.5277964473,
-0.0800938234,
0.024771221,
0.1740867049,
-0.4902579784,
-0.1550228894,
0.3757010102,
-0.1601575315,
0.4425734282,
-0.1881638616,
0.527015388,
-0.2822113335,
-0.1201010123,
0.1412356347,
-0.0103473496,
-0.4238343835,
0.3756209314,
-0.5192406178,
0.0653477088,
0.1564181298,
0.1585126072,
0.1654797792,
0.1913679689,
-0.129581213,
-0.3327223957,
0.4483351111,
-0.3660877645,
-0.3723257184,
0.1123899147,
-0.0695720613,
0.1881099343,
-0.1034301892,
-0.5125929117,
-0.1575303376,
0.2134390473,
-0.1684260666,
-0.3530287445,
0.040013615,
-0.1029164642,
0.1037677452,
-0.2346636355,
0.187836498,
0.1710441411,
-0.0456500724,
-0.1793135554,
-0.4535678923
] |
https://github.com/huggingface/datasets/issues/2285 | Help understanding how to build a dataset for language modeling as with the old TextDataset |
I received an answer for this question on the HuggingFace Datasets forum by @lhoestq
Hi !
If you want to tokenize line by line, you can use this:
```
max_seq_length = 512
num_proc = 4
def tokenize_function(examples):
# Remove empty lines
examples["text"] = [line for line in examples["text"] if len(line) > 0 and not line.isspace()]
return tokenizer(
examples["text"],
truncation=True,
max_length=max_seq_length,
)
tokenized_dataset = dataset.map(
tokenize_function,
batched=True,
num_proc=num_proc,
remove_columns=["text"],
)
```
Though the TextDataset was doing a different processing by concatenating all the texts and building blocks of size 512. If you need this behavior, then you must apply an additional map function after the tokenization:
```
# Main data processing function that will concatenate all texts from
# our dataset and generate chunks of max_seq_length.
def group_texts(examples):
# Concatenate all texts.
concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}
total_length = len(concatenated_examples[list(examples.keys())[0]])
# We drop the small remainder, we could add padding if the model supported it instead of this drop,
# you can customize this part to your needs.
total_length = (total_length // max_seq_length) * max_seq_length
# Split by chunks of max_len.
result = {
k: [t[i : i + max_seq_length] for i in range(0, total_length, max_seq_length)]
for k, t in concatenated_examples.items()
}
return result
# Note that with `batched=True`, this map processes 1,000 texts together,
# so group_texts throws away a remainder for each of those groups of 1,000 texts.
# You can adjust that batch_size here but a higher value might be slower to preprocess.
tokenized_dataset = tokenized_dataset.map(
group_texts,
batched=True,
num_proc=num_proc,
)
```
This code comes from the processing of the run_mlm.py example script of transformers
| Hello,
I am trying to load a custom dataset that I will then use for language modeling. The dataset consists of a text file that has a whole document in each line, meaning that each line overpasses the normal 512 tokens limit of most tokenizers.
I would like to understand what is the process to build a text dataset that tokenizes each line, having previously split the documents in the dataset into lines of a "tokenizable" size, as the old TextDataset class would do, where you only had to do the following, and a tokenized dataset without text loss would be available to pass to a DataCollator:
```
model_checkpoint = 'distilbert-base-uncased'
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
from transformers import TextDataset
dataset = TextDataset(
tokenizer=tokenizer,
file_path="path/to/text_file.txt",
block_size=512,
)
```
For now, what I have is the following, which, of course, throws an error because each line is longer than the maximum block size in the tokenizer:
```
import datasets
dataset = datasets.load_dataset('path/to/text_file.txt')
model_checkpoint = 'distilbert-base-uncased'
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
def tokenize_function(examples):
return tokenizer(examples["text"])
tokenized_datasets = dataset.map(tokenize_function, batched=True, num_proc=4, remove_columns=["text"])
tokenized_datasets
```
So what would be the "standard" way of creating a dataset in the way it was done before?
Thank you very much for the help :)) | 270 | Help understanding how to build a dataset for language modeling as with the old TextDataset
Hello,
I am trying to load a custom dataset that I will then use for language modeling. The dataset consists of a text file that has a whole document in each line, meaning that each line overpasses the normal 512 tokens limit of most tokenizers.
I would like to understand what is the process to build a text dataset that tokenizes each line, having previously split the documents in the dataset into lines of a "tokenizable" size, as the old TextDataset class would do, where you only had to do the following, and a tokenized dataset without text loss would be available to pass to a DataCollator:
```
model_checkpoint = 'distilbert-base-uncased'
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
from transformers import TextDataset
dataset = TextDataset(
tokenizer=tokenizer,
file_path="path/to/text_file.txt",
block_size=512,
)
```
For now, what I have is the following, which, of course, throws an error because each line is longer than the maximum block size in the tokenizer:
```
import datasets
dataset = datasets.load_dataset('path/to/text_file.txt')
model_checkpoint = 'distilbert-base-uncased'
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
def tokenize_function(examples):
return tokenizer(examples["text"])
tokenized_datasets = dataset.map(tokenize_function, batched=True, num_proc=4, remove_columns=["text"])
tokenized_datasets
```
So what would be the "standard" way of creating a dataset in the way it was done before?
Thank you very much for the help :))
I received an answer for this question on the HuggingFace Datasets forum by @lhoestq
Hi !
If you want to tokenize line by line, you can use this:
```
max_seq_length = 512
num_proc = 4
def tokenize_function(examples):
# Remove empty lines
examples["text"] = [line for line in examples["text"] if len(line) > 0 and not line.isspace()]
return tokenizer(
examples["text"],
truncation=True,
max_length=max_seq_length,
)
tokenized_dataset = dataset.map(
tokenize_function,
batched=True,
num_proc=num_proc,
remove_columns=["text"],
)
```
Though the TextDataset was doing a different processing by concatenating all the texts and building blocks of size 512. If you need this behavior, then you must apply an additional map function after the tokenization:
```
# Main data processing function that will concatenate all texts from
# our dataset and generate chunks of max_seq_length.
def group_texts(examples):
# Concatenate all texts.
concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}
total_length = len(concatenated_examples[list(examples.keys())[0]])
# We drop the small remainder, we could add padding if the model supported it instead of this drop,
# you can customize this part to your needs.
total_length = (total_length // max_seq_length) * max_seq_length
# Split by chunks of max_len.
result = {
k: [t[i : i + max_seq_length] for i in range(0, total_length, max_seq_length)]
for k, t in concatenated_examples.items()
}
return result
# Note that with `batched=True`, this map processes 1,000 texts together,
# so group_texts throws away a remainder for each of those groups of 1,000 texts.
# You can adjust that batch_size here but a higher value might be slower to preprocess.
tokenized_dataset = tokenized_dataset.map(
group_texts,
batched=True,
num_proc=num_proc,
)
```
This code comes from the processing of the run_mlm.py example script of transformers
| [
-0.2392033041,
-0.0001859662,
0.0175925791,
0.1512311101,
0.1369384974,
-0.1672842056,
0.5160797834,
0.0982798561,
-0.0554775,
-0.1596170366,
0.1894438863,
-0.1941062212,
-0.164652586,
0.1340248287,
0.1435167044,
-0.0841107741,
0.1339856386,
0.0562884845,
0.1950118393,
0.0235834178,
0.0756418705,
0.0561197437,
-0.0015379132,
-0.0821400583,
-0.5577693582,
-0.1091072634,
-0.1831940413,
-0.1227095202,
-0.3284451067,
-0.4212740362,
0.0153291104,
0.3389090598,
0.4065940976,
0.4958458245,
-0.0001238081,
-0.2122488767,
-0.1774329245,
-0.2544005215,
-0.0525413044,
-0.2375398576,
0.374487251,
-0.4061253667,
0.1074687392,
-0.1326393187,
0.0795990303,
-0.2096718252,
-0.0318121351,
-0.231802702,
0.5191583037,
0.4787012041,
0.0087787611,
0.0259200335,
0.074311994,
0.11304681,
-0.3428883553,
0.1746680886,
-0.1214063987,
0.1298532784,
0.3205684721,
-0.0565027259,
-0.040281523,
-0.0930834636,
0.0166851114,
-0.31082201,
0.3316011131,
0.115297161,
-0.141572684,
-0.451603055,
0.0755914822,
0.2538358569,
0.6707497835,
-0.3457721472,
-0.3893291652,
-0.4439042211,
-0.1682326347,
0.0374631695,
-0.0296420977,
0.0730164051,
-0.2541878521,
0.1022671908,
-0.1240607873,
-0.2946547568,
-0.2216566801,
0.0544248931,
-0.3207275271,
0.3257496059,
-0.0336120501,
0.0357048064,
-0.1194256991,
-0.2430415452,
-0.0599062368,
-0.2204923332,
0.2210460007,
0.4883922637,
-0.0837701112,
-0.3066206276,
-0.2297292948,
-0.3395671546,
0.558388412,
0.0868362263,
-0.0990155712,
0.0349289961,
-0.2218427956,
-0.0805967972,
0.0350313336,
0.3476088345,
0.5046221614,
-0.1744385362,
0.0108415913,
-0.1692954451,
-0.143846333,
-0.276290834,
-0.6274007559,
0.1172754392,
-0.0599242598,
-0.0570776537,
0.039243497,
-0.0520312637,
0.2307768911,
-0.0069927005,
-0.2350392938,
-0.0044796956,
0.0452588797,
0.0356491916,
-0.0675017387,
-0.0861181319,
-0.2376569659,
0.421277225,
-0.2759159505,
-0.2418376207,
0.070343174,
-0.1863946468,
-0.1865321696,
0.1939844936,
0.179631263,
0.0179877747,
0.3778651357,
0.1087445468,
-0.1177099198,
-0.2375997603,
0.1789945513,
-0.2524818182,
-0.0524347201,
-0.0748899803,
0.1091082692,
0.2168309838,
0.1097020358,
-0.4177301824,
-0.2348014712,
0.0332000703,
-0.0249295123,
-0.3025587201,
-0.03338404,
0.02849341,
-0.192048192,
-0.1472054869,
-0.240537405,
0.6766546369,
0.4798668325,
0.012645998,
-0.0017274638,
-0.0322492346,
-0.1381383538,
-0.0999685004,
0.2362454534,
0.4747395515,
-0.7666451335,
0.0063369581,
0.002641551,
-0.0365213566,
0.0965148583,
0.3493334949,
-0.1648328751,
0.6068563461,
-0.0613507815,
0.5180053115,
0.3503058553,
0.1305186898,
-0.2049499601,
0.1372378618,
0.0292102899,
0.1867637038,
-0.1073110178,
-0.1562437862,
0.5612368584,
-0.2129072249,
-0.0361985788,
0.118290931,
-0.1476491243,
-0.0669578463,
0.032625474,
0.0857678503,
0.2753349543,
-0.1395992935,
0.0697685704,
-0.0398722775,
-0.0444105268,
0.3139219284,
0.1966238469,
-0.1594018638,
0.2759893835,
0.0362149067,
0.2324160486,
0.407325983,
-0.0153671699,
-0.2693260908,
-0.0759756267,
0.0567636527,
0.2049041241,
0.2655686736,
-0.0570135079,
-0.191629678,
-0.2474740446,
-0.1511306316,
0.0207675453,
-0.1977968514,
-0.0181167591,
0.0179736149,
-0.1353480071,
0.0234731883,
-0.3133318722,
0.1876454204,
-0.2843899131,
0.3427194059,
-0.2325660139,
-0.000595604,
0.2443993092,
-0.1013841406,
-0.1625291556,
0.3830213547,
-0.0273514837,
-0.1313118786,
0.0279480945,
0.2366939187,
0.3679017425,
-0.1408003718,
-0.2275569588,
0.4600907862,
0.3784701228,
0.0309689026,
0.4578376114,
-0.2016495317,
0.0193803143,
-0.1889167875,
0.0346813574,
0.359947294,
0.2090637535,
0.2274588794,
-0.0112378206,
-0.0714984834,
0.3128148317,
0.0040352442,
-0.0427538864,
-0.0139180375,
-0.0154759195,
0.1952089369,
0.3493804932,
0.0107706552,
0.0465699099,
0.3449260592,
0.243210569,
-0.1532548964,
0.1287158579,
0.2910188437,
-0.2863339782,
-0.2052995712,
-0.1908235699,
0.004636345,
0.0556729548,
0.047699254,
0.3897701502,
0.0664353445,
-0.1433894038,
-0.1299938112,
0.2656417191,
0.0605869144,
-0.0630757734,
0.3100696206,
-0.1549256295,
0.1154170111,
-0.2331497222,
-0.4740205109,
-0.1258013844,
0.2036343068,
-0.1853825897,
0.1338461488,
0.0487244874,
-0.0661095455,
-0.3965557516,
-0.1830106676,
-0.3718720675,
0.0566232055,
-0.0349520259,
-0.1158751994,
0.1493791342,
0.0335760601,
0.2499832064,
0.5063264966,
0.0095729455,
0.0583955012,
0.2063230276,
-0.2811831534,
-0.2502627373,
-0.0346413404,
0.0933178738,
0.2416540533,
0.1541723311,
-0.0870471895,
0.0865251943,
-0.0161853414,
-0.5051583648,
0.1515579224,
-0.1692163199,
0.4367187619,
0.0554254502,
0.1744432151,
0.0144784544,
-0.0833801404,
-0.2698354721,
0.0895951688,
-0.2077243626,
-0.2291133255,
-0.1111390069,
-0.0045477576,
0.0718695447,
-0.1308138967,
-0.3728199601,
-0.0504081212,
0.2722548544,
0.1782399416,
0.183510676,
-0.0798518881,
-0.029903749,
0.2354943007,
0.103265591,
0.0373404995,
0.0435231552,
-0.0512596071,
0.2787411213,
-0.2501347363,
-0.2366039157,
-0.0474129692,
-0.126112774,
0.2636549175,
0.1433220059,
-0.2231925726,
0.2140242755,
-0.1526660323,
0.0093199275,
0.0154489884,
-0.0238184966,
0.4051699936,
-0.0522558801,
0.2788364887,
-0.121446535,
0.0180850532,
0.0984244719,
-0.276183486,
0.1969470829,
-0.0060326313,
0.6503128409,
0.0369092003,
0.6386392713,
0.3684068024,
-0.1325149536,
0.0752432197,
-0.0477325507,
0.0422271527,
-0.3112987578,
-0.2277128547,
0.0006069464,
0.0090352697,
-0.0301075391,
0.3956709504,
0.2423079014,
0.1143696383,
0.2021978945,
-0.1181013137,
-0.1394849867,
-0.275711298,
0.2836948633,
-0.4695577621,
0.4671967328,
-0.0721843392,
0.011669633,
-0.3317286372,
-0.1169728041,
-0.222307086,
0.3786242008,
-0.0282128584,
0.0598834604,
-0.5507217646,
0.386811018,
-0.6631575227,
0.02915035,
0.2206851095,
0.3547828794,
0.1103869006,
0.1463713795,
-0.0709166303,
-0.0203722361,
0.402636826,
-0.0227487274,
-0.289422065,
-0.1082241684,
-0.1320894808,
-0.2538169622,
0.2933549285,
-0.0395805612,
0.1975639164,
0.531175375,
0.65871346,
-0.3302848339,
-0.2319726348,
-0.3782878816,
0.5049983263,
-0.1509027481,
-0.0131163122,
0.1996589005,
-0.0180585794,
-0.2463342845,
0.0441163294,
0.1279944479,
0.1873221546,
0.0992730632,
0.0426309034,
-0.1333946884,
-0.2861354649,
0.256357193,
0.0594394207,
0.1277619302,
-0.2765388489,
0.0873954967,
0.2656544447,
-0.1350414902,
-0.049532447,
0.1073106825,
0.1759166718,
-0.4010822773,
-0.0129603716,
-0.1064643785,
0.4982676804,
0.0072947787,
0.11619284,
0.175996989,
-0.07174097,
-0.1283391118,
-0.2516771853,
0.4990404248,
-0.0004322394,
0.1072117016,
-0.4950769246,
-0.5806421041,
0.1287849396,
0.002229051,
-0.0955414474,
0.3580079377,
-0.0112051126,
-0.5861916542,
0.546961844,
0.2339936793,
1.0034723282,
0.0364246219,
0.1965813637,
-0.0692432225,
0.2333041579,
0.3526032865,
-0.5463703275,
-0.225096494,
-0.4049320817,
0.2398342192,
-0.1035825089,
0.0531463251,
0.2031104118,
0.4196674228,
-0.0978063121,
0.0434217043,
0.1982337236,
-0.0273167845,
0.1032380611,
0.4068475962,
-0.3265762329,
-0.2755764127,
0.0517287143,
0.0033749761,
-0.0178099275,
-0.2065853626,
-0.1173749939,
0.1841155738,
0.0330490023,
-0.0679969415,
-0.4975017309,
-0.3805792928,
-0.3608531654,
-0.0133373067,
0.1129646227,
-0.2078264356,
0.4366978407,
0.2826573551,
0.6320573688,
0.3912511766,
-0.225533545,
0.0295785852,
-0.2768982649,
-0.1763712913,
0.049852144,
-0.2072148323,
0.3300941288,
0.0513834246,
-0.1469299346,
-0.3165058494,
0.0341585614,
0.0248636212,
-0.3118891716,
-0.3918744922,
0.2977170944,
-0.5495629907,
0.0693327934,
0.1410162002,
0.1742269397,
-0.1622751951,
-0.0320816226,
0.2196673006,
-0.0508987159,
-0.0259327646,
-0.162074104,
-0.0592635013,
-0.1033973098,
0.0747575015,
-0.0118693868,
-0.2910360992,
0.5136497021,
0.2392341942,
-0.1066968068,
-0.1358097941,
0.3822307289,
0.26907897,
-0.4311944544,
0.0318620466,
-0.2794513106,
-0.1974166334,
0.0385380238,
0.3607566655,
0.2582131922,
-0.1642008871,
-0.0545678437,
-0.499322176,
-0.4086222351,
0.0049348236,
-0.0258855354,
0.276212275,
-0.1327503175,
0.313295275,
-0.138600409,
0.1803969294,
-0.1185474321,
0.2509558201,
0.2383136898,
0.2692069411,
-0.0381939262,
-0.131227985,
-0.1876065433,
0.0220617913,
-0.125645861,
0.3032785356,
-0.1072252467,
-0.0504502356,
-0.481066674,
0.2701503038,
0.2685158551,
-0.3452086747,
0.1435487419,
0.0769627318,
-0.2080496848,
-0.3401213586,
0.1666090041,
0.0652570054,
0.0499010868,
0.1358624548,
0.442914933,
0.3076675832,
-0.3088450134,
-0.1887060702,
0.1123208478,
0.2102126181,
0.4263603389,
0.1400438696,
-0.1221102178,
-0.0386327282,
-0.2016714513,
0.5881648064,
0.5096355081,
-0.0835170075,
0.0431775078,
0.0823900104,
0.1406504214,
0.154251799,
0.1059379652,
0.4155412018,
0.0251162648,
-0.2322398275,
0.6475023031,
0.0915133804,
0.0303589161,
0.106591247,
0.1562035233,
-0.1744714379,
0.0069196885,
0.358222425,
0.0635340065,
0.1894370615,
-0.2472033203,
-0.2593579292,
0.5303359628,
0.0892978087,
0.0578917153,
0.1401210278,
-0.1871412545,
0.0493194908,
0.2193013281,
0.1716694981,
0.325933516,
0.5564159155,
-0.0698603615,
0.3214529753,
0.0531292595,
0.004704156,
0.0471904129,
-0.3095895946,
-0.0800243914,
0.0480234437,
0.1656668037,
-0.1105848327,
-0.1947389543,
0.1978368759,
0.0363033339,
-0.108343266,
0.1280540526,
0.2772510946,
-0.1708550304,
-0.4737077951,
-0.3481687009,
-0.206816569,
0.0164132547,
-0.1115107834,
0.0134599861,
-0.3089473546,
-0.3214221001,
-0.191070646,
0.0930109248,
-0.440212965,
0.22645244,
-0.1502147317,
-0.0590886995,
-0.0950689018,
0.4051768482,
0.0410050899,
0.0708770081,
-0.1157146618,
0.2022530437,
0.1273885369,
0.1905832291,
-0.1700425744,
0.19624798,
-0.4156351984,
0.005244541,
-0.0055855867,
0.3747945726,
-0.0177563969,
0.3423498273,
0.1662878841,
-0.0815360844,
0.0093167806,
-0.0729302466,
0.3396167755,
-0.4478399456,
-0.1336388737,
0.4081301391,
0.1175647974,
-0.0746407211,
-0.0261990428,
0.0599858984,
-0.2737568915,
-0.0408930779,
0.5035936832,
-0.0996120498,
0.1589267701,
-0.1605333239,
-0.0049138763,
-0.0532943569,
0.3754832447,
0.4513395727,
0.2204479724,
-0.1742958277,
-0.2868292332,
-0.4054220021,
-0.0375693962,
0.0112627782,
-0.0795192495,
-0.0870297998,
0.0210074,
0.1426894516,
0.1683028042,
-0.3433712721,
0.3283089697,
-0.2516364157,
-0.0704327002,
-0.0427420512,
-0.0357311405,
-0.0338966213,
0.4775057137,
-0.1342857182,
-0.1031246707,
-0.0185358301,
-0.034754429,
-0.1216443926,
0.0555416159,
-0.0064601507,
0.2513419986,
-0.2258576751,
0.1185981482,
0.2096252888,
0.3537656069,
0.045168031,
0.2406835258,
-0.2795904279,
0.1464358121,
-0.2605934739,
0.3197110891,
0.1615741849,
0.3715634346,
-0.3493004143,
0.0580710769,
-0.0444215648,
0.1008120999,
0.1972949803,
-0.2761368752,
-0.3211237192,
0.1628667265,
-0.2799777389,
-0.2471338212,
0.1270716637,
0.6248332262,
-0.1231768206,
0.360670805,
0.0793343782,
0.0421328098,
0.1611798257,
-0.412286371,
-0.4679849446,
-0.0765422955,
-0.0395692103,
0.6494614482,
-0.2072227746,
-0.6433719993,
-0.0226899628,
0.5512036681,
0.0085755624,
-0.2864914536,
0.2637565434,
0.2395221293,
-0.283223778,
-0.2148467749,
0.5683007836,
-0.1135211065,
-0.034153901,
0.007985347,
-0.3772536814
] |
https://github.com/huggingface/datasets/issues/2279 | Compatibility with Ubuntu 18 and GLIBC 2.27? | From the trace this seems like an error in the tokenizer library instead.
Do you mind opening an issue at https://github.com/huggingface/tokenizers instead? | ## Describe the bug
For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04).
I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC.
## Steps to reproduce the bug
1. clone the transformers repo
2. move to examples/pytorch/language-modeling
3. run example command:
```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm```
## Expected results
As described in the transformers repo.
## Actual results
```Traceback (most recent call last):
File "run_clm.py", line 34, in <module>
from transformers import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__
return super().__getattr__(name)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module>
from . import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module>
from .tokenization_layoutlm import LayoutLMTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module>
from ..bert.tokenization_bert import BertTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module>
from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module>
from .tokenization_utils_base import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module>
from tokenizers import AddedToken
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module>
from .tokenizers import (
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so)
```
## Versions
Paste the output of the following code:
```
- Datasets: 1.6.1
- Python: 3.7.10 (default, Feb 26 2021, 18:47:35)
[GCC 7.3.0]
- Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid
```
| 22 | Compatibility with Ubuntu 18 and GLIBC 2.27?
## Describe the bug
For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04).
I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC.
## Steps to reproduce the bug
1. clone the transformers repo
2. move to examples/pytorch/language-modeling
3. run example command:
```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm```
## Expected results
As described in the transformers repo.
## Actual results
```Traceback (most recent call last):
File "run_clm.py", line 34, in <module>
from transformers import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__
return super().__getattr__(name)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module>
from . import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module>
from .tokenization_layoutlm import LayoutLMTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module>
from ..bert.tokenization_bert import BertTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module>
from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module>
from .tokenization_utils_base import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module>
from tokenizers import AddedToken
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module>
from .tokenizers import (
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so)
```
## Versions
Paste the output of the following code:
```
- Datasets: 1.6.1
- Python: 3.7.10 (default, Feb 26 2021, 18:47:35)
[GCC 7.3.0]
- Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid
```
From the trace this seems like an error in the tokenizer library instead.
Do you mind opening an issue at https://github.com/huggingface/tokenizers instead? | [
-0.1428117901,
-0.1723928303,
0.1075328141,
0.1302348077,
0.059638612,
-0.0772049576,
0.2908616364,
0.2598787248,
0.2259384692,
0.0111388378,
0.1740459353,
0.226789847,
-0.2015923411,
0.0207945332,
0.059122771,
-0.2397232503,
0.4002413452,
0.1342248023,
-0.3602031469,
-0.0450369716,
-0.1554611474,
0.5982707143,
-0.3146862686,
-0.0109577365,
-0.4952145517,
0.0392146446,
-0.0519102849,
0.1466765255,
0.1343915164,
-0.1309378892,
0.4062682688,
-0.1249716654,
-0.0909755155,
0.7543858886,
-0.0001224395,
0.0493884161,
0.2803668082,
-0.0356529318,
-0.3091667891,
-0.3431196809,
0.4603333473,
-0.2034231126,
0.1984528005,
0.0210756734,
-0.1604527533,
-0.031238772,
0.0431690961,
-0.1770754158,
0.3062649965,
0.229272753,
0.1635719836,
0.6086135507,
0.287237972,
-0.2450605482,
0.1327303648,
0.067103982,
-0.3019824326,
0.1775183976,
0.3917795122,
0.0825866684,
0.1014896259,
0.3350146115,
0.1052379236,
-0.2016979903,
0.4753355384,
-0.0923260599,
-0.2559212446,
-0.2584759593,
0.0923652127,
0.1190378517,
0.1131735668,
-0.3634864092,
-0.4058305621,
-0.549849391,
-0.2388641238,
0.2090976685,
0.3674343824,
-0.2292598784,
-0.0580107048,
0.1378619373,
-0.3331095874,
-0.3827239871,
-0.1197225824,
-0.0331870914,
-0.0127180424,
0.8859995604,
-0.0173582695,
0.1676160097,
0.0610815883,
0.0065575512,
0.0001205145,
-0.1602580547,
0.0085462583,
0.1647604257,
-0.1325274259,
-0.088852711,
0.0530815311,
-0.1233678013,
0.0066030347,
-0.1705616862,
-0.263281405,
-0.1685592234,
-0.1061794311,
0.1360404491,
0.0399863087,
0.2783113122,
-0.1579050273,
0.4739064276,
0.2186331451,
0.2473486811,
0.3216753602,
-0.1070388332,
0.1026501954,
-0.2637830377,
-0.1310983598,
0.117757827,
0.2092291415,
-0.2898232639,
-0.0179976039,
-0.0566717498,
-0.0108651435,
0.2226475477,
0.0681747869,
0.1660169363,
-0.0328396857,
0.3804475069,
0.0928117633,
0.2229460478,
-0.1679707766,
0.2382940054,
-0.116478689,
-0.0974211916,
-0.014435851,
-0.0716305375,
0.1691594422,
-0.0391608141,
0.2538377941,
0.2059006989,
0.4203245938,
0.0874160454,
-0.1992442459,
0.0457500257,
0.0518944189,
0.3462994099,
-0.4304387867,
0.3338392675,
0.1684205681,
-0.3088177741,
-0.3119701445,
-0.0098930523,
-0.0638596192,
-0.0914929956,
-0.0469185933,
0.0632658899,
-0.2492464632,
0.0130644292,
0.0124967946,
0.1144580692,
0.1726507097,
-0.4946892262,
0.2769925892,
-0.2337837517,
-0.211973682,
-0.0241522547,
0.1076136529,
0.0356382243,
-0.2591190636,
-0.4424850941,
0.3240972161,
-0.0839909762,
-0.0312672779,
0.2439706773,
-0.1142871901,
-0.3914648294,
-0.1942076981,
-0.0358677469,
-0.2203385234,
-0.1526676565,
-0.5307197571,
0.0207092166,
0.0859974101,
0.239468962,
-0.006725756,
-0.026247032,
0.0615266934,
-0.2693713009,
-0.127581954,
0.3495991528,
0.1197856069,
0.0980078131,
-0.4085881114,
-0.3331646025,
-0.0149046406,
-0.0940915346,
0.1942505836,
-0.1640090346,
-0.1923217177,
0.117479898,
0.4155256152,
-0.2786255777,
-0.0290605593,
0.146476835,
0.5196980238,
0.0005211452,
0.0618167296,
-0.1114574373,
-0.6179240942,
0.4469009936,
-0.287384361,
0.1566896588,
-0.3138538301,
-0.1721371859,
-0.0007827053,
0.1277841032,
0.0836199149,
-0.395760566,
-0.0320511274,
0.0547228716,
0.187106654,
0.0526265651,
-0.1427205205,
0.247756198,
0.0274524931,
0.0078918897,
-0.4396378994,
0.3152776659,
-0.0824750438,
-0.1737361699,
0.1070353463,
0.2113477588,
0.0512977652,
-0.329780817,
-0.1780620366,
0.3240361512,
-0.1270817071,
0.1900219768,
-0.3105564415,
0.0714245513,
0.2983859479,
-0.0419500545,
-0.0758857131,
0.3169095814,
-0.0071654064,
0.0673381165,
0.0863997936,
0.1811780185,
0.0145424055,
0.1595082581,
0.2673689425,
0.0799954012,
0.0134189986,
-0.0280265734,
-0.0551779531,
-0.2057692558,
0.0533034988,
-0.0545431674,
-0.0722139999,
0.1719161719,
-0.1459624022,
-0.0196434874,
0.6664278507,
0.0451898687,
0.0067486987,
0.185914278,
-0.128497839,
-0.1042098477,
0.1641650647,
0.3101858497,
0.2909152508,
0.1102725267,
-0.0396554843,
0.2677048743,
-0.0750833079,
-0.1431828886,
0.2155107111,
0.0968809947,
0.4194386899,
0.0191846825,
0.0385329463,
0.3056658506,
0.0614309944,
-0.0603855327,
-0.2637179792,
0.0914353356,
-0.3121881187,
0.4507686496,
-0.0368032046,
0.0784676895,
-0.1586849242,
-0.1577328146,
-0.7852622867,
-0.1883607805,
0.0067412802,
0.0399593562,
-0.1980151981,
0.3214105964,
-0.0444883741,
0.1915931404,
-0.2949773371,
-0.2638168037,
-0.2137812525,
0.0314922035,
-0.51124084,
-0.0231350772,
0.2785101831,
0.1089704558,
0.0357542373,
-0.0728168637,
-0.1063583121,
0.0394178256,
-0.5937507153,
0.2073416114,
-0.0966716036,
0.3363631368,
0.0931134149,
-0.1605443358,
-0.1574151218,
-0.2098422498,
0.2231024653,
-0.8244651556,
-0.0332418345,
-0.0670604184,
-0.0330606066,
-0.2129864693,
-0.3109067976,
0.0425585397,
-0.193734616,
-0.2245925069,
0.0641580001,
0.0267934725,
0.1504385024,
0.6384630203,
0.0632361397,
0.0668419898,
-0.3688484132,
-0.0192970522,
0.095093891,
0.1094499901,
0.2644441128,
0.023714453,
-0.4643276036,
-0.1210150272,
-0.0489232987,
0.1750034243,
0.141059339,
-0.3063699603,
-0.2472431064,
-0.4217752218,
0.0800870061,
0.1932061464,
-0.0237944089,
0.4895006418,
-0.2125201076,
0.1190255284,
-0.25039047,
-0.1644295007,
0.1279209554,
-0.088008292,
0.1465211213,
0.0695354044,
0.1001239046,
0.1234062016,
0.7045317888,
0.4875887334,
-0.0884715095,
0.1642235518,
0.1532945633,
0.4174873233,
-0.2423343211,
-0.3420734107,
-0.0094390055,
0.0148866279,
-0.1092208698,
0.1582189351,
-0.0186668765,
-0.1451956779,
-0.3119721413,
-0.0997493938,
-0.0315329209,
-0.3864448667,
0.1610624045,
0.3849335015,
0.446964711,
0.1315151751,
0.0702414587,
-0.0262656659,
-0.0061871721,
0.2651171088,
0.2288969606,
0.1005706489,
0.1592471004,
0.0106108785,
0.05637924,
-0.4902708828,
0.1502768397,
0.1207987219,
0.2744882405,
-0.0123042548,
-0.2598347366,
-0.0926972181,
-0.0416161232,
0.3547387719,
0.2080986798,
-0.1358807385,
0.0037822302,
-0.0252402741,
-0.5615038872,
-0.084536463,
-0.1922895312,
0.0295992531,
0.6906400919,
0.7015836835,
-0.2574880719,
-0.223577112,
-0.0012591587,
0.198622182,
-0.0859062374,
-0.124964878,
-0.4714792967,
0.0180771146,
-0.2427763939,
-0.0761246458,
0.2081296146,
0.0937624425,
-0.0123714954,
0.1114061773,
-0.0792528465,
-0.3343799114,
-0.1157328039,
0.238546446,
0.2372387499,
-0.0853750482,
0.1637602299,
0.1426897794,
-0.0472992286,
-0.0937490091,
0.573664844,
0.0868204534,
-0.1973433644,
-0.0140720801,
0.2528956831,
0.3823761642,
0.3725432754,
-0.3145149946,
-0.0523286462,
0.0576481782,
0.1869302243,
0.0717085227,
-0.2260339707,
0.1847771406,
0.1969471425,
-0.3472765684,
-0.2714082301,
0.3154606819,
0.2166332006,
-0.0438230559,
-0.0723232925,
0.3505691588,
-0.209216699,
0.2476397604,
0.0264696088,
0.8544818163,
0.124477528,
0.2327859998,
0.297326386,
-0.0258740541,
0.7188068032,
0.3994668424,
0.1941173226,
-0.4109277129,
-0.3418682814,
-0.0140612079,
-0.0808942914,
0.4022879899,
-0.2950656116,
-0.3223609626,
0.3390086293,
0.2339360416,
0.1027216315,
0.0795767307,
0.0588903539,
-0.1981144696,
-0.1559311599,
-0.291967243,
0.0332191549,
0.0540286116,
0.302270323,
-0.0552456193,
-0.1685113311,
-0.3493582606,
-0.446210444,
-0.2820328176,
0.2805138528,
-0.3277342618,
-0.0141642373,
0.591034472,
-0.2505154014,
0.4873716533,
-0.0331623815,
0.1778804809,
0.2963133156,
-0.2713109255,
0.239602074,
-0.2851701081,
0.0019537895,
0.1223956048,
0.0028119313,
0.3139874637,
-0.1776822507,
-0.1181390956,
-0.242282927,
-0.1403474361,
-0.1115921214,
0.0921528637,
-0.1329474598,
-0.0848162025,
-0.0531582534,
-0.1113057435,
0.0065423036,
0.1808990836,
-0.2863343358,
0.1043158546,
-0.0331023186,
-0.1111450493,
-0.1462765634,
-0.0809004158,
-0.2520554662,
-0.0680326894,
0.1273735911,
-0.1710669249,
0.0880029947,
0.4218147397,
0.4625128508,
-0.1962950677,
0.0047671441,
-0.2927002907,
0.170617193,
-1.0560748577,
0.0434695892,
0.118403554,
-0.0590663701,
-0.2321718633,
0.4432282448,
0.3857444227,
-0.2091695219,
-0.1934965998,
-0.1018267721,
-0.2686404586,
0.002545353,
-0.0818318278,
0.1668408364,
-0.1092049628,
-0.1131568179,
0.0659626648,
0.2004719228,
-0.2183968574,
-0.0878221318,
0.0255135875,
-0.1071736366,
-0.0951178223,
-0.3705212474,
0.2673198879,
-0.2820159793,
-0.029769484,
0.1741184145,
-0.10127718,
-0.0719066337,
-0.2767718136,
0.1109215543,
0.3009900749,
-0.1892263889,
-0.1592651308,
0.0971671641,
-0.0445918106,
-0.2512551546,
0.3204421103,
0.3702948987,
-0.0054154336,
0.1673936397,
0.1635509729,
0.0742888302,
0.005182934,
0.1371880025,
0.0004127188,
0.1637768,
0.2630918324,
0.265512526,
0.0087822322,
0.1276262105,
0.0735778213,
0.2405824363,
-0.0842640921,
0.1357297301,
0.0359871089,
-0.176438272,
0.0797160566,
0.2588964403,
0.3712699711,
0.2570671141,
-0.0932638198,
-0.1037778631,
0.2864121497,
0.094710201,
-0.2520164847,
-0.0810543373,
0.1429413557,
0.2257416844,
0.006207569,
0.2939155102,
0.3655897379,
-0.0921467766,
0.2926076651,
0.2397042215,
0.2022410929,
0.3121075928,
0.4906821549,
0.3819250166,
0.214848578,
0.1730958074,
0.3125346005,
0.0882163122,
0.1764627993,
-0.0680327415,
-0.2254638672,
0.0927052647,
-0.3624401093,
0.061228022,
0.2626801133,
-0.3448004723,
-0.1063369215,
-0.2771708667,
0.159780845,
0.1789625585,
0.0619780645,
0.342313379,
-0.1999439299,
-0.101896435,
-0.2147206366,
0.1653595716,
-0.1557975709,
-0.1243793145,
0.3625320196,
-0.0575805344,
-0.2877354324,
0.0142008448,
-0.1381665319,
-0.1885124147,
0.0023840079,
0.0862936676,
-0.1487509161,
-0.1796546727,
0.0309442077,
0.110782899,
0.2017215788,
0.0674140081,
0.2881187797,
0.226868704,
-0.1005052552,
-0.2474522144,
0.2419553995,
0.4578124583,
-0.0087835668,
0.0842529461,
0.1260657907,
-0.1481120735,
0.1541393697,
0.052155517,
0.3505437374,
-0.0320189036,
0.1383470744,
0.1348990798,
0.0451738201,
-0.0982144699,
-0.0344975218,
-0.3612898886,
0.3455742896,
-0.2912255228,
0.7918100357,
-0.47242558,
-0.0623591803,
-0.1419643164,
0.2556204498,
-0.4287148118,
-0.1302295625,
0.3787558079,
-0.0227483045,
0.1456228644,
-0.2917761803,
0.0362585858,
0.0979720429,
0.3941864371,
0.3059559762,
0.2157989442,
0.0930604711,
-0.0810708553,
-0.4841988385,
0.2380546182,
0.0206126701,
0.3427098095,
0.2149205804,
-0.2224812806,
0.0794468001,
0.0694118887,
0.2120193988,
0.427930057,
-0.2316807657,
-0.2786814868,
-0.1207925379,
0.0128876995,
-0.4145508111,
-0.3672772348,
0.1829687059,
-0.1834723055,
-0.0652336627,
-0.3103604615,
-0.037536338,
-0.2787757218,
0.0337754674,
-0.165154919,
-0.3191037476,
0.2987805903,
0.3485634327,
0.214087829,
-0.0922432989,
-0.3349896371,
-0.2125596553,
-0.0605013669,
-0.1788993925,
0.2837648094,
-0.2700269818,
0.3132868707,
-0.2699930668,
-0.1873684525,
-0.1783804446,
0.0091541912,
0.0317165107,
-0.1672866195,
-0.0790592879,
0.0237619895,
-0.2985110879,
0.0984309241,
0.3186790049,
0.3591606617,
0.0530782603,
-0.0591426678,
-0.3668983281,
-0.2386035025,
0.6176967621,
-0.3460360467,
-0.1892912239,
-0.1798472255,
0.1215004772,
0.1456496716,
-0.4370314181,
-0.6966892481,
-0.0974390209,
0.0974255726,
0.0474987552,
0.0741256848,
0.0590348318,
-0.077841185,
-0.0506132878,
-0.0690909922,
0.6845300198,
0.0159646794,
-0.2760543227,
0.2355747372,
-0.1013069749
] |
https://github.com/huggingface/datasets/issues/2279 | Compatibility with Ubuntu 18 and GLIBC 2.27? | Hi @tginart, thanks for reporting.
I think this issue is already open at `tokenizers` library: https://github.com/huggingface/tokenizers/issues/685 | ## Describe the bug
For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04).
I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC.
## Steps to reproduce the bug
1. clone the transformers repo
2. move to examples/pytorch/language-modeling
3. run example command:
```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm```
## Expected results
As described in the transformers repo.
## Actual results
```Traceback (most recent call last):
File "run_clm.py", line 34, in <module>
from transformers import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__
return super().__getattr__(name)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module>
from . import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module>
from .tokenization_layoutlm import LayoutLMTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module>
from ..bert.tokenization_bert import BertTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module>
from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module>
from .tokenization_utils_base import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module>
from tokenizers import AddedToken
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module>
from .tokenizers import (
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so)
```
## Versions
Paste the output of the following code:
```
- Datasets: 1.6.1
- Python: 3.7.10 (default, Feb 26 2021, 18:47:35)
[GCC 7.3.0]
- Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid
```
| 16 | Compatibility with Ubuntu 18 and GLIBC 2.27?
## Describe the bug
For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04).
I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC.
## Steps to reproduce the bug
1. clone the transformers repo
2. move to examples/pytorch/language-modeling
3. run example command:
```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm```
## Expected results
As described in the transformers repo.
## Actual results
```Traceback (most recent call last):
File "run_clm.py", line 34, in <module>
from transformers import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__
return super().__getattr__(name)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module>
from . import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module>
from .tokenization_layoutlm import LayoutLMTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module>
from ..bert.tokenization_bert import BertTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module>
from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module>
from .tokenization_utils_base import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module>
from tokenizers import AddedToken
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module>
from .tokenizers import (
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so)
```
## Versions
Paste the output of the following code:
```
- Datasets: 1.6.1
- Python: 3.7.10 (default, Feb 26 2021, 18:47:35)
[GCC 7.3.0]
- Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid
```
Hi @tginart, thanks for reporting.
I think this issue is already open at `tokenizers` library: https://github.com/huggingface/tokenizers/issues/685 | [
-0.1428117901,
-0.1723928303,
0.1075328141,
0.1302348077,
0.059638612,
-0.0772049576,
0.2908616364,
0.2598787248,
0.2259384692,
0.0111388378,
0.1740459353,
0.226789847,
-0.2015923411,
0.0207945332,
0.059122771,
-0.2397232503,
0.4002413452,
0.1342248023,
-0.3602031469,
-0.0450369716,
-0.1554611474,
0.5982707143,
-0.3146862686,
-0.0109577365,
-0.4952145517,
0.0392146446,
-0.0519102849,
0.1466765255,
0.1343915164,
-0.1309378892,
0.4062682688,
-0.1249716654,
-0.0909755155,
0.7543858886,
-0.0001224395,
0.0493884161,
0.2803668082,
-0.0356529318,
-0.3091667891,
-0.3431196809,
0.4603333473,
-0.2034231126,
0.1984528005,
0.0210756734,
-0.1604527533,
-0.031238772,
0.0431690961,
-0.1770754158,
0.3062649965,
0.229272753,
0.1635719836,
0.6086135507,
0.287237972,
-0.2450605482,
0.1327303648,
0.067103982,
-0.3019824326,
0.1775183976,
0.3917795122,
0.0825866684,
0.1014896259,
0.3350146115,
0.1052379236,
-0.2016979903,
0.4753355384,
-0.0923260599,
-0.2559212446,
-0.2584759593,
0.0923652127,
0.1190378517,
0.1131735668,
-0.3634864092,
-0.4058305621,
-0.549849391,
-0.2388641238,
0.2090976685,
0.3674343824,
-0.2292598784,
-0.0580107048,
0.1378619373,
-0.3331095874,
-0.3827239871,
-0.1197225824,
-0.0331870914,
-0.0127180424,
0.8859995604,
-0.0173582695,
0.1676160097,
0.0610815883,
0.0065575512,
0.0001205145,
-0.1602580547,
0.0085462583,
0.1647604257,
-0.1325274259,
-0.088852711,
0.0530815311,
-0.1233678013,
0.0066030347,
-0.1705616862,
-0.263281405,
-0.1685592234,
-0.1061794311,
0.1360404491,
0.0399863087,
0.2783113122,
-0.1579050273,
0.4739064276,
0.2186331451,
0.2473486811,
0.3216753602,
-0.1070388332,
0.1026501954,
-0.2637830377,
-0.1310983598,
0.117757827,
0.2092291415,
-0.2898232639,
-0.0179976039,
-0.0566717498,
-0.0108651435,
0.2226475477,
0.0681747869,
0.1660169363,
-0.0328396857,
0.3804475069,
0.0928117633,
0.2229460478,
-0.1679707766,
0.2382940054,
-0.116478689,
-0.0974211916,
-0.014435851,
-0.0716305375,
0.1691594422,
-0.0391608141,
0.2538377941,
0.2059006989,
0.4203245938,
0.0874160454,
-0.1992442459,
0.0457500257,
0.0518944189,
0.3462994099,
-0.4304387867,
0.3338392675,
0.1684205681,
-0.3088177741,
-0.3119701445,
-0.0098930523,
-0.0638596192,
-0.0914929956,
-0.0469185933,
0.0632658899,
-0.2492464632,
0.0130644292,
0.0124967946,
0.1144580692,
0.1726507097,
-0.4946892262,
0.2769925892,
-0.2337837517,
-0.211973682,
-0.0241522547,
0.1076136529,
0.0356382243,
-0.2591190636,
-0.4424850941,
0.3240972161,
-0.0839909762,
-0.0312672779,
0.2439706773,
-0.1142871901,
-0.3914648294,
-0.1942076981,
-0.0358677469,
-0.2203385234,
-0.1526676565,
-0.5307197571,
0.0207092166,
0.0859974101,
0.239468962,
-0.006725756,
-0.026247032,
0.0615266934,
-0.2693713009,
-0.127581954,
0.3495991528,
0.1197856069,
0.0980078131,
-0.4085881114,
-0.3331646025,
-0.0149046406,
-0.0940915346,
0.1942505836,
-0.1640090346,
-0.1923217177,
0.117479898,
0.4155256152,
-0.2786255777,
-0.0290605593,
0.146476835,
0.5196980238,
0.0005211452,
0.0618167296,
-0.1114574373,
-0.6179240942,
0.4469009936,
-0.287384361,
0.1566896588,
-0.3138538301,
-0.1721371859,
-0.0007827053,
0.1277841032,
0.0836199149,
-0.395760566,
-0.0320511274,
0.0547228716,
0.187106654,
0.0526265651,
-0.1427205205,
0.247756198,
0.0274524931,
0.0078918897,
-0.4396378994,
0.3152776659,
-0.0824750438,
-0.1737361699,
0.1070353463,
0.2113477588,
0.0512977652,
-0.329780817,
-0.1780620366,
0.3240361512,
-0.1270817071,
0.1900219768,
-0.3105564415,
0.0714245513,
0.2983859479,
-0.0419500545,
-0.0758857131,
0.3169095814,
-0.0071654064,
0.0673381165,
0.0863997936,
0.1811780185,
0.0145424055,
0.1595082581,
0.2673689425,
0.0799954012,
0.0134189986,
-0.0280265734,
-0.0551779531,
-0.2057692558,
0.0533034988,
-0.0545431674,
-0.0722139999,
0.1719161719,
-0.1459624022,
-0.0196434874,
0.6664278507,
0.0451898687,
0.0067486987,
0.185914278,
-0.128497839,
-0.1042098477,
0.1641650647,
0.3101858497,
0.2909152508,
0.1102725267,
-0.0396554843,
0.2677048743,
-0.0750833079,
-0.1431828886,
0.2155107111,
0.0968809947,
0.4194386899,
0.0191846825,
0.0385329463,
0.3056658506,
0.0614309944,
-0.0603855327,
-0.2637179792,
0.0914353356,
-0.3121881187,
0.4507686496,
-0.0368032046,
0.0784676895,
-0.1586849242,
-0.1577328146,
-0.7852622867,
-0.1883607805,
0.0067412802,
0.0399593562,
-0.1980151981,
0.3214105964,
-0.0444883741,
0.1915931404,
-0.2949773371,
-0.2638168037,
-0.2137812525,
0.0314922035,
-0.51124084,
-0.0231350772,
0.2785101831,
0.1089704558,
0.0357542373,
-0.0728168637,
-0.1063583121,
0.0394178256,
-0.5937507153,
0.2073416114,
-0.0966716036,
0.3363631368,
0.0931134149,
-0.1605443358,
-0.1574151218,
-0.2098422498,
0.2231024653,
-0.8244651556,
-0.0332418345,
-0.0670604184,
-0.0330606066,
-0.2129864693,
-0.3109067976,
0.0425585397,
-0.193734616,
-0.2245925069,
0.0641580001,
0.0267934725,
0.1504385024,
0.6384630203,
0.0632361397,
0.0668419898,
-0.3688484132,
-0.0192970522,
0.095093891,
0.1094499901,
0.2644441128,
0.023714453,
-0.4643276036,
-0.1210150272,
-0.0489232987,
0.1750034243,
0.141059339,
-0.3063699603,
-0.2472431064,
-0.4217752218,
0.0800870061,
0.1932061464,
-0.0237944089,
0.4895006418,
-0.2125201076,
0.1190255284,
-0.25039047,
-0.1644295007,
0.1279209554,
-0.088008292,
0.1465211213,
0.0695354044,
0.1001239046,
0.1234062016,
0.7045317888,
0.4875887334,
-0.0884715095,
0.1642235518,
0.1532945633,
0.4174873233,
-0.2423343211,
-0.3420734107,
-0.0094390055,
0.0148866279,
-0.1092208698,
0.1582189351,
-0.0186668765,
-0.1451956779,
-0.3119721413,
-0.0997493938,
-0.0315329209,
-0.3864448667,
0.1610624045,
0.3849335015,
0.446964711,
0.1315151751,
0.0702414587,
-0.0262656659,
-0.0061871721,
0.2651171088,
0.2288969606,
0.1005706489,
0.1592471004,
0.0106108785,
0.05637924,
-0.4902708828,
0.1502768397,
0.1207987219,
0.2744882405,
-0.0123042548,
-0.2598347366,
-0.0926972181,
-0.0416161232,
0.3547387719,
0.2080986798,
-0.1358807385,
0.0037822302,
-0.0252402741,
-0.5615038872,
-0.084536463,
-0.1922895312,
0.0295992531,
0.6906400919,
0.7015836835,
-0.2574880719,
-0.223577112,
-0.0012591587,
0.198622182,
-0.0859062374,
-0.124964878,
-0.4714792967,
0.0180771146,
-0.2427763939,
-0.0761246458,
0.2081296146,
0.0937624425,
-0.0123714954,
0.1114061773,
-0.0792528465,
-0.3343799114,
-0.1157328039,
0.238546446,
0.2372387499,
-0.0853750482,
0.1637602299,
0.1426897794,
-0.0472992286,
-0.0937490091,
0.573664844,
0.0868204534,
-0.1973433644,
-0.0140720801,
0.2528956831,
0.3823761642,
0.3725432754,
-0.3145149946,
-0.0523286462,
0.0576481782,
0.1869302243,
0.0717085227,
-0.2260339707,
0.1847771406,
0.1969471425,
-0.3472765684,
-0.2714082301,
0.3154606819,
0.2166332006,
-0.0438230559,
-0.0723232925,
0.3505691588,
-0.209216699,
0.2476397604,
0.0264696088,
0.8544818163,
0.124477528,
0.2327859998,
0.297326386,
-0.0258740541,
0.7188068032,
0.3994668424,
0.1941173226,
-0.4109277129,
-0.3418682814,
-0.0140612079,
-0.0808942914,
0.4022879899,
-0.2950656116,
-0.3223609626,
0.3390086293,
0.2339360416,
0.1027216315,
0.0795767307,
0.0588903539,
-0.1981144696,
-0.1559311599,
-0.291967243,
0.0332191549,
0.0540286116,
0.302270323,
-0.0552456193,
-0.1685113311,
-0.3493582606,
-0.446210444,
-0.2820328176,
0.2805138528,
-0.3277342618,
-0.0141642373,
0.591034472,
-0.2505154014,
0.4873716533,
-0.0331623815,
0.1778804809,
0.2963133156,
-0.2713109255,
0.239602074,
-0.2851701081,
0.0019537895,
0.1223956048,
0.0028119313,
0.3139874637,
-0.1776822507,
-0.1181390956,
-0.242282927,
-0.1403474361,
-0.1115921214,
0.0921528637,
-0.1329474598,
-0.0848162025,
-0.0531582534,
-0.1113057435,
0.0065423036,
0.1808990836,
-0.2863343358,
0.1043158546,
-0.0331023186,
-0.1111450493,
-0.1462765634,
-0.0809004158,
-0.2520554662,
-0.0680326894,
0.1273735911,
-0.1710669249,
0.0880029947,
0.4218147397,
0.4625128508,
-0.1962950677,
0.0047671441,
-0.2927002907,
0.170617193,
-1.0560748577,
0.0434695892,
0.118403554,
-0.0590663701,
-0.2321718633,
0.4432282448,
0.3857444227,
-0.2091695219,
-0.1934965998,
-0.1018267721,
-0.2686404586,
0.002545353,
-0.0818318278,
0.1668408364,
-0.1092049628,
-0.1131568179,
0.0659626648,
0.2004719228,
-0.2183968574,
-0.0878221318,
0.0255135875,
-0.1071736366,
-0.0951178223,
-0.3705212474,
0.2673198879,
-0.2820159793,
-0.029769484,
0.1741184145,
-0.10127718,
-0.0719066337,
-0.2767718136,
0.1109215543,
0.3009900749,
-0.1892263889,
-0.1592651308,
0.0971671641,
-0.0445918106,
-0.2512551546,
0.3204421103,
0.3702948987,
-0.0054154336,
0.1673936397,
0.1635509729,
0.0742888302,
0.005182934,
0.1371880025,
0.0004127188,
0.1637768,
0.2630918324,
0.265512526,
0.0087822322,
0.1276262105,
0.0735778213,
0.2405824363,
-0.0842640921,
0.1357297301,
0.0359871089,
-0.176438272,
0.0797160566,
0.2588964403,
0.3712699711,
0.2570671141,
-0.0932638198,
-0.1037778631,
0.2864121497,
0.094710201,
-0.2520164847,
-0.0810543373,
0.1429413557,
0.2257416844,
0.006207569,
0.2939155102,
0.3655897379,
-0.0921467766,
0.2926076651,
0.2397042215,
0.2022410929,
0.3121075928,
0.4906821549,
0.3819250166,
0.214848578,
0.1730958074,
0.3125346005,
0.0882163122,
0.1764627993,
-0.0680327415,
-0.2254638672,
0.0927052647,
-0.3624401093,
0.061228022,
0.2626801133,
-0.3448004723,
-0.1063369215,
-0.2771708667,
0.159780845,
0.1789625585,
0.0619780645,
0.342313379,
-0.1999439299,
-0.101896435,
-0.2147206366,
0.1653595716,
-0.1557975709,
-0.1243793145,
0.3625320196,
-0.0575805344,
-0.2877354324,
0.0142008448,
-0.1381665319,
-0.1885124147,
0.0023840079,
0.0862936676,
-0.1487509161,
-0.1796546727,
0.0309442077,
0.110782899,
0.2017215788,
0.0674140081,
0.2881187797,
0.226868704,
-0.1005052552,
-0.2474522144,
0.2419553995,
0.4578124583,
-0.0087835668,
0.0842529461,
0.1260657907,
-0.1481120735,
0.1541393697,
0.052155517,
0.3505437374,
-0.0320189036,
0.1383470744,
0.1348990798,
0.0451738201,
-0.0982144699,
-0.0344975218,
-0.3612898886,
0.3455742896,
-0.2912255228,
0.7918100357,
-0.47242558,
-0.0623591803,
-0.1419643164,
0.2556204498,
-0.4287148118,
-0.1302295625,
0.3787558079,
-0.0227483045,
0.1456228644,
-0.2917761803,
0.0362585858,
0.0979720429,
0.3941864371,
0.3059559762,
0.2157989442,
0.0930604711,
-0.0810708553,
-0.4841988385,
0.2380546182,
0.0206126701,
0.3427098095,
0.2149205804,
-0.2224812806,
0.0794468001,
0.0694118887,
0.2120193988,
0.427930057,
-0.2316807657,
-0.2786814868,
-0.1207925379,
0.0128876995,
-0.4145508111,
-0.3672772348,
0.1829687059,
-0.1834723055,
-0.0652336627,
-0.3103604615,
-0.037536338,
-0.2787757218,
0.0337754674,
-0.165154919,
-0.3191037476,
0.2987805903,
0.3485634327,
0.214087829,
-0.0922432989,
-0.3349896371,
-0.2125596553,
-0.0605013669,
-0.1788993925,
0.2837648094,
-0.2700269818,
0.3132868707,
-0.2699930668,
-0.1873684525,
-0.1783804446,
0.0091541912,
0.0317165107,
-0.1672866195,
-0.0790592879,
0.0237619895,
-0.2985110879,
0.0984309241,
0.3186790049,
0.3591606617,
0.0530782603,
-0.0591426678,
-0.3668983281,
-0.2386035025,
0.6176967621,
-0.3460360467,
-0.1892912239,
-0.1798472255,
0.1215004772,
0.1456496716,
-0.4370314181,
-0.6966892481,
-0.0974390209,
0.0974255726,
0.0474987552,
0.0741256848,
0.0590348318,
-0.077841185,
-0.0506132878,
-0.0690909922,
0.6845300198,
0.0159646794,
-0.2760543227,
0.2355747372,
-0.1013069749
] |
https://github.com/huggingface/datasets/issues/2278 | Loss result inGptNeoForCasual | Hi ! I think you might have to ask on the `transformers` repo on or the forum at https://discuss.huggingface.co/
Closing since it's not related to this library | Is there any way you give the " loss" and "logits" results in the gpt neo api? | 27 | Loss result inGptNeoForCasual
Is there any way you give the " loss" and "logits" results in the gpt neo api?
Hi ! I think you might have to ask on the `transformers` repo on or the forum at https://discuss.huggingface.co/
Closing since it's not related to this library | [
-0.1725191623,
-0.5047551394,
-0.0494230837,
0.4731767476,
-0.0721401349,
-0.3464439511,
0.0108580738,
0.0527498983,
-0.4997343719,
0.1422907859,
-0.0995593518,
-0.038861081,
0.1009051949,
0.254296571,
0.064613238,
-0.2345311195,
-0.0951779261,
0.2984146476,
-0.1135937497,
-0.2847175896,
0.0467215702,
0.7516422868,
-0.0423597433,
0.4498417079,
-0.1351105273,
0.0491322726,
0.1681939363,
-0.1435233504,
-0.101546593,
-0.1026618034,
0.0283561368,
-0.2763159871,
-0.1589080393,
0.2016083896,
-0.0001213429,
-0.0264124088,
0.2445290983,
-0.0716523901,
-0.1024021655,
0.0959485397,
0.262952745,
0.1162957847,
0.1316121668,
-0.1478679478,
-0.4186840057,
-0.452596724,
-0.1050601229,
-0.3300448358,
0.2786360979,
0.1565030366,
0.0447499566,
0.4286802113,
-0.2391531616,
0.0296923555,
0.1258453727,
0.2987283766,
-0.3401528299,
-0.2796239853,
0.026095096,
-0.3103774786,
0.3510198593,
0.2686967254,
0.3863429725,
-0.3036620319,
0.0181092583,
0.3710390627,
0.1963017583,
0.0109900022,
0.0251032673,
0.2208729833,
0.2916792035,
-0.1006678045,
-0.1725569516,
-0.3272691369,
-0.0763479695,
-0.510853529,
-0.094646737,
0.1157224104,
-0.2886107266,
0.1027032807,
-0.0897853076,
0.1514852643,
-0.3256936967,
-0.140170455,
-0.1286066324,
-0.0098543568,
0.1015222371,
0.0668271333,
0.2126815021,
-0.0489521064,
-0.4141372144,
0.4112632275,
-0.1428753585,
-0.2921431065,
-0.2007186562,
-0.5218158364,
0.4599568844,
0.2730282545,
0.0312607363,
-0.0208963174,
0.1309313625,
-0.2003551722,
-0.217646122,
0.0279038735,
0.1375724971,
-0.0961222798,
0.4073674083,
0.1480395347,
0.1019018441,
-0.0475522652,
0.1873628795,
-0.1528675407,
0.4590640962,
0.376306802,
0.0797446519,
0.1429798901,
0.0296137873,
-0.4953493476,
-0.2803037167,
-0.2522744834,
0.1631972194,
0.1406693757,
-0.1088398993,
-0.1343106925,
-0.0160845928,
0.1368660033,
0.4740402997,
-0.1410942674,
-0.2202256024,
0.1094308197,
-0.0504104346,
0.0339514241,
-0.486887008,
0.1971951723,
0.1035983115,
0.3923438489,
0.0333322994,
-0.3985877335,
-0.228147313,
0.2114371657,
-0.0236336645,
-0.0581279397,
0.4313164353,
0.2363343537,
-0.2228949815,
-0.2575086951,
-0.1625894159,
-0.2158327252,
-0.3757217526,
-0.2422764897,
0.4703902006,
0.1956527531,
-0.1677273661,
0.112274684,
0.0742415711,
-0.1150668561,
0.0617526621,
0.3946144879,
-0.0748205334,
-0.1125266477,
0.2280465961,
-0.0367223881,
-0.3630042672,
-0.1009183526,
0.1474130303,
0.201251477,
-0.0140396599,
-0.5118098855,
0.2428097129,
-0.3641561568,
-0.1003242508,
0.6593738198,
0.0223974977,
-0.0343959294,
-0.157190904,
0.0668360889,
0.1328683645,
-0.1298778206,
-0.1844611317,
-0.4084617198,
-0.1652345806,
-0.1120059639,
0.0725031197,
0.0194830745,
0.0134647666,
-0.1131599694,
0.151707381,
0.2277481705,
-0.1084788814,
-0.0292869788,
-0.1077158228,
-0.1577301621,
0.2575595081,
0.0772765726,
0.0432769991,
-0.0455069505,
-0.0621428043,
-0.0667326301,
0.0941626951,
-0.1415489465,
-0.0810554326,
-0.2618051469,
0.3792399764,
-0.3635049462,
0.202685982,
-0.2679693699,
-0.2763744295,
0.0226154719,
-0.5987131,
0.4693307281,
0.0762626752,
-0.2173784077,
0.1839213222,
-0.0067557469,
0.4335823059,
0.1400047243,
0.1324245781,
0.1296622008,
0.0034156577,
0.2564793825,
-0.012953788,
0.0517179184,
0.0345513783,
-0.0483000427,
-0.3150787652,
0.1414646059,
0.2187712193,
-0.2970021367,
-0.0528164022,
0.0064466223,
0.2238236815,
0.1665392965,
0.0170898419,
-0.0132073611,
-0.3755169511,
0.4678091109,
0.180019632,
0.8736048937,
0.2860044241,
-0.0812122822,
-0.2098025978,
0.3937202096,
-0.1191531047,
-0.1728304029,
-0.1444350928,
0.1783285141,
0.4140583575,
-0.0591888539,
0.2585324943,
-0.0206660796,
-0.196588695,
-0.1870831251,
-0.3010659218,
0.1405651867,
0.1782162189,
-0.3403761089,
-0.0610639416,
-0.1732197255,
-0.4480158985,
-0.0855620429,
0.5458115339,
-0.1134901941,
0.1407280862,
0.167889595,
-0.1634725481,
0.2742596865,
0.1547592729,
-0.1610351205,
0.506657064,
0.0889239982,
0.4276522994,
0.1344050467,
-0.0072402218,
-0.1800988168,
0.2707962394,
0.154086262,
0.0585372262,
0.1390318424,
0.1704633832,
0.0915146843,
-0.2852143347,
0.0512631796,
-0.3843135238,
-0.2931554914,
-0.0383234993,
-0.1311171651,
0.1286748201,
-0.4033595622,
-0.2206863612,
-0.1276966631,
0.1210237443,
-0.0528595112,
0.282781899,
-0.0695348382,
-0.2162185907,
-0.211675927,
0.2628988624,
0.5175611377,
-0.0787362978,
0.5037269592,
-0.4499669969,
-0.0716033727,
-0.2682849169,
0.1174156666,
-0.442011714,
-0.3176287711,
0.3655712008,
-0.2907849848,
-0.0914598256,
-0.0759961903,
-0.1990364045,
0.3708020449,
0.0023096958,
-0.3136315346,
0.1398541331,
0.0063227094,
0.0689289048,
0.0739047825,
0.1504743993,
-0.6341789961,
-0.0714749396,
-0.2168479413,
-0.0190158412,
0.188460812,
-0.4838358462,
-0.0596146621,
-0.3014619648,
-0.2533231974,
0.5574226975,
-0.0429194085,
0.0389954858,
0.8306108117,
-0.5347169042,
0.0162805878,
0.0899464935,
0.270884037,
0.0525013693,
-0.0101967612,
-0.0211198069,
-0.1664483547,
-0.0324043259,
-0.145404622,
0.5164797902,
-0.0634629354,
0.0934329405,
-0.2375238687,
-0.3187125027,
0.0204698928,
-0.0377340093,
-0.1212201342,
0.0364743508,
0.602537334,
0.0533904731,
-0.1724061966,
-0.0387755968,
-0.1411357373,
0.1813832223,
0.1829164475,
0.2384240776,
-0.0252659693,
0.1747953743,
0.1527779698,
0.2597799003,
0.1726742238,
-0.5284256339,
0.0049807392,
0.0444115363,
-0.1989771426,
0.1114133075,
-0.0615119264,
-0.2533992231,
0.0268975273,
-0.0674711689,
0.0926117525,
0.1822877675,
-0.4473481476,
-0.2816172838,
-0.0643137023,
-0.427718401,
-0.2260355353,
-0.2386196107,
0.3652973771,
0.0498349555,
-0.3288974464,
0.0844356045,
0.1946458966,
0.0669981986,
0.5939669609,
0.1519529969,
0.1812234819,
-0.1348910183,
-0.127460286,
-0.0367073752,
-0.4204010963,
0.1611366272,
-0.3509569168,
-0.2312130332,
-0.3339870274,
0.0014867338,
-0.0494284183,
0.1004784927,
0.4226030409,
0.1340406388,
-0.0104380148,
0.0897461623,
-0.355964303,
0.1411965489,
0.0403475165,
-0.2209928632,
-0.1935630441,
0.7315768003,
0.3855090737,
-0.4366107583,
-0.2343103588,
0.3028858602,
-0.1056604981,
-0.0878250077,
0.0988219902,
-0.0412239954,
-0.1869125366,
0.1169938967,
-0.031321723,
0.2398991734,
-0.0064873514,
-0.1730324775,
-0.2637087405,
0.1085905507,
-0.1694783419,
0.0811258033,
0.0226020664,
0.2244395614,
-0.1065651849,
-0.1305896044,
0.1412335187,
0.532935977,
-0.243224293,
0.1484335512,
0.6979493499,
-0.0205309112,
0.0702244267,
0.161084637,
0.0437210351,
0.2752024233,
0.0382403657,
-0.0344757512,
-0.2715016603,
0.3771000504,
-0.0776864737,
0.2162351906,
0.059870556,
-0.0110791018,
-0.1531210393,
0.5143986344,
0.495277077,
0.2290320247,
-0.3437062502,
0.5232909322,
0.2530076504,
-0.5994126201,
-0.042359937,
0.0932852179,
1.2044780254,
0.0724356398,
0.2235270143,
0.0314204842,
-0.353610307,
0.406727761,
0.1242624298,
0.0078920014,
-0.0750906765,
-0.2230888903,
-0.0305301342,
0.0422628447,
0.0691009313,
-0.1389260292,
-0.0713884607,
0.1323726922,
0.4221554697,
-0.0152444914,
0.0837337077,
0.4021404684,
0.3814327121,
-0.2051505148,
-0.0883516967,
-0.0082329875,
-0.0135500273,
0.4488619566,
-0.0580670126,
-0.323690027,
0.0099249827,
0.0581383556,
-0.4257678688,
0.0460800305,
-0.2219453901,
0.1018628031,
0.1866087466,
-0.4215050936,
-0.1442057043,
-0.0665627494,
0.3502729535,
0.1162469983,
-0.2288777828,
0.2055513859,
-0.6553248763,
0.1337073296,
-0.1111474782,
-0.0223606136,
0.3049786091,
-0.13745749,
-0.2320293784,
0.255615294,
0.2460425645,
-0.0239817537,
-0.3673838079,
-0.3370625973,
-0.1786548197,
0.0387843475,
0.2585057914,
0.0523232557,
-0.3759314418,
0.0676308721,
0.0332308449,
0.4689509571,
-0.2207182348,
0.1279877871,
0.0771206841,
-0.1748057306,
-0.1103820354,
0.1873651594,
0.3356002569,
-0.0485889018,
-0.0124247456,
0.1048637182,
0.0102065252,
-0.0349712819,
-0.5182819366,
0.0962406099,
-0.4879135489,
0.0929770693,
0.17315121,
-0.0834303647,
0.0521250255,
0.4990676045,
0.1579139084,
0.3171498775,
-0.2819816768,
-0.0256075021,
-0.2516600788,
0.203174904,
-0.0348431319,
0.5519409776,
0.3784836829,
0.2552002668,
0.2363877743,
-0.0135564869,
-0.2735292614,
-0.22934708,
-0.1390471905,
0.1046972051,
0.3563310206,
-0.1656011343,
-0.104691878,
-0.0334436856,
-0.0603808314,
0.4253439605,
-0.0404494703,
-0.0159087144,
0.1120931059,
0.1498154998,
0.1353459805,
0.0684860945,
-0.1953894049,
-0.015723791,
0.2045605332,
0.0757185966,
0.1717638671,
-0.2325241119,
0.2176927775,
0.574739635,
0.3914259076,
0.245803386,
0.2725380659,
0.1071837917,
0.3449463248,
-0.002991637,
-0.137588352,
0.1985434443,
-0.0066131167,
-0.1798164397,
-0.2169685215,
0.3240686059,
0.0533203371,
-0.0288353451,
0.2950299978,
0.3801259398,
-0.4418635368,
-0.0599838346,
0.0650191605,
-0.4060016572,
0.0577242374,
-0.2160560638,
-0.214387238,
0.0848919004,
-0.0300175007,
-0.0424116962,
0.1603684425,
0.0849681497,
0.1243042648,
0.1374168843,
0.1534514129,
0.0862912387,
0.2262292504,
-0.123044692,
0.2260153592,
-0.0153784491,
0.0753920525,
-0.5670803785,
-0.174017489,
-0.0271149799,
-0.0003515613,
-0.1932014972,
0.2002463043,
-0.1940699518,
0.0959673077,
0.1983016431,
-0.1597929746,
0.0894912183,
-0.1692634523,
0.4100297093,
-0.1874141246,
-0.0285618566,
0.0504291654,
0.4167964756,
0.4355940521,
-0.3474953771,
0.0660829172,
-0.1334551573,
-0.009236739,
0.4053117931,
-0.0700920969,
-0.0862436518,
-0.2403076291,
-0.1606180072,
0.1411545277,
-0.0841542929,
-0.0286078714,
0.093824625,
0.1536002606,
-0.2205559015,
0.1354839653,
0.554767251,
-0.2569062114,
0.4653141499,
0.5305713415,
-0.193166703,
-0.1419740766,
0.4079793692,
0.1885655224,
-0.5202426314,
0.6899907589,
0.0674936324,
-0.1904236525,
-0.2995377779,
0.4237952828,
0.1942039877,
0.0212339219,
0.0459429771,
0.0550731756,
0.0988917723,
-0.0965901762,
0.0894843563,
0.0906344354,
-0.0860466659,
-0.0521743558,
-0.1964581162,
0.1391914785,
-0.7284785509,
0.1248764247,
-0.2312434763,
-0.3695223629,
-0.3456452489,
0.0206567813,
-0.1900032014,
-0.138718769,
-0.0223029442,
0.0365557075,
0.0158293322,
-0.2200502306,
0.0230329633,
-0.0675528198,
0.2398562282,
0.1897875667,
0.4737426937,
-0.0260193143,
-0.3410233855,
0.1662023216,
0.096929431,
0.3595589995,
-0.0218515359,
0.0608390421,
0.0311375111,
0.3090898395,
0.202823624,
0.1055343077,
0.6015226245,
-0.0134013267,
-0.0921448022,
-0.3707891405,
0.3012417853,
-0.1956475526,
-0.1594757885,
0.1906781644,
0.1231776699,
0.1067443714,
-0.1550709605,
0.0696810856,
-0.2585231364,
0.1412057579,
-0.0900473744,
0.5153777599,
0.293341428,
0.28586483,
-0.0991805121,
-0.1435767412,
-0.3841887414,
0.430468142,
-0.0727623329,
-0.1152708605,
-0.1751078665,
-0.0556303822,
0.2661167085,
0.115607284,
-0.0146456743,
-0.0104153771,
0.0005029194,
0.0609776154,
-0.1666046232,
0.1279960573,
-0.0895329863,
-0.0738782957,
-0.4382949471,
0.0800396502,
0.37475124,
-0.0401327051,
-0.124553971,
-0.2125293463,
-0.4079283476,
0.3229067624,
0.052931536,
-0.1005450636,
-0.0648523271,
0.1777109951,
0.0544741079,
0.2989238501,
-0.5815797448,
-0.1861036122,
0.162786305,
-0.128892988,
-0.0801478326,
0.258703202,
0.2808330357,
-0.3622457087,
0.0584179536,
0.2710863054,
0.3739877045,
-0.0881837532,
0.0602198839,
-0.2685891688
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | Therefore, when I try to concatenate larger datasets (5x 35GB data sets) I also get an out of memory error, since over 90GB of swap space was used at the time of the crash:
```
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-6-9766d77530b9> in <module>
20 print(file_name)
21 cv_batch = load_from_disk(file_name)
---> 22 cv_sampled_train = concatenate_datasets([cv_sampled_train, cv_batch])
23
24 print("Saving to disk!")
C:\ProgramData\Anaconda3\lib\site-packages\datasets\arrow_dataset.py in concatenate_datasets(dsets, info, split, axis)
2891
2892 # Concatenate tables
-> 2893 table = concat_tables([dset._data for dset in dsets if len(dset._data) > 0], axis=axis)
2894 table = update_metadata_with_features(table, None)
2895
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in concat_tables(tables, axis)
837 if len(tables) == 1:
838 return tables[0]
--> 839 return ConcatenationTable.from_tables(tables, axis=axis)
840
841
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in from_tables(cls, tables, axis)
697 return result
698
--> 699 blocks = to_blocks(tables[0])
700 for table in tables[1:]:
701 table_blocks = to_blocks(table)
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in to_blocks(table)
669 return [[InMemoryTable(table)]]
670 elif isinstance(table, ConcatenationTable):
--> 671 return copy.deepcopy(table.blocks)
672 else:
673 return [[table]]
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
151 copier = getattr(x, "__deepcopy__", None)
152 if copier is not None:
--> 153 y = copier(memo)
154 else:
155 reductor = dispatch_table.get(cls)
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in __deepcopy__(self, memo)
143 # by adding it to the memo, self.table won't be copied
144 memo[id(self.table)] = self.table
--> 145 return _deepcopy(self, memo)
146
147 def __getstate__(self):
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in _deepcopy(x, memo)
62 memo[id(x)] = result
63 for k, v in x.__dict__.items():
---> 64 setattr(result, k, copy.deepcopy(v, memo))
65 return result
66
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
170 y = x
171 else:
--> 172 y = _reconstruct(x, memo, *rv)
173
174 # If is its own copy, don't memoize.
C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
262 if deep and args:
263 args = (deepcopy(arg, memo) for arg in args)
--> 264 y = func(*args)
265 if deep:
266 memo[id(x)] = y
C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0)
261 deep = memo is not None
262 if deep and args:
--> 263 args = (deepcopy(arg, memo) for arg in args)
264 y = func(*args)
265 if deep:
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
170 y = x
171 else:
--> 172 y = _reconstruct(x, memo, *rv)
173
174 # If is its own copy, don't memoize.
C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
262 if deep and args:
263 args = (deepcopy(arg, memo) for arg in args)
--> 264 y = func(*args)
265 if deep:
266 memo[id(x)] = y
C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0)
261 deep = memo is not None
262 if deep and args:
--> 263 args = (deepcopy(arg, memo) for arg in args)
264 y = func(*args)
265 if deep:
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
159 reductor = getattr(x, "__reduce_ex__", None)
160 if reductor is not None:
--> 161 rv = reductor(4)
162 else:
163 reductor = getattr(x, "__reduce__", None)
C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.__reduce_ex__()
C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.to_pybytes()
MemoryError:
``` | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 1,031 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
Therefore, when I try to concatenate larger datasets (5x 35GB data sets) I also get an out of memory error, since over 90GB of swap space was used at the time of the crash:
```
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-6-9766d77530b9> in <module>
20 print(file_name)
21 cv_batch = load_from_disk(file_name)
---> 22 cv_sampled_train = concatenate_datasets([cv_sampled_train, cv_batch])
23
24 print("Saving to disk!")
C:\ProgramData\Anaconda3\lib\site-packages\datasets\arrow_dataset.py in concatenate_datasets(dsets, info, split, axis)
2891
2892 # Concatenate tables
-> 2893 table = concat_tables([dset._data for dset in dsets if len(dset._data) > 0], axis=axis)
2894 table = update_metadata_with_features(table, None)
2895
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in concat_tables(tables, axis)
837 if len(tables) == 1:
838 return tables[0]
--> 839 return ConcatenationTable.from_tables(tables, axis=axis)
840
841
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in from_tables(cls, tables, axis)
697 return result
698
--> 699 blocks = to_blocks(tables[0])
700 for table in tables[1:]:
701 table_blocks = to_blocks(table)
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in to_blocks(table)
669 return [[InMemoryTable(table)]]
670 elif isinstance(table, ConcatenationTable):
--> 671 return copy.deepcopy(table.blocks)
672 else:
673 return [[table]]
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
151 copier = getattr(x, "__deepcopy__", None)
152 if copier is not None:
--> 153 y = copier(memo)
154 else:
155 reductor = dispatch_table.get(cls)
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in __deepcopy__(self, memo)
143 # by adding it to the memo, self.table won't be copied
144 memo[id(self.table)] = self.table
--> 145 return _deepcopy(self, memo)
146
147 def __getstate__(self):
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in _deepcopy(x, memo)
62 memo[id(x)] = result
63 for k, v in x.__dict__.items():
---> 64 setattr(result, k, copy.deepcopy(v, memo))
65 return result
66
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
170 y = x
171 else:
--> 172 y = _reconstruct(x, memo, *rv)
173
174 # If is its own copy, don't memoize.
C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
262 if deep and args:
263 args = (deepcopy(arg, memo) for arg in args)
--> 264 y = func(*args)
265 if deep:
266 memo[id(x)] = y
C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0)
261 deep = memo is not None
262 if deep and args:
--> 263 args = (deepcopy(arg, memo) for arg in args)
264 y = func(*args)
265 if deep:
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
170 y = x
171 else:
--> 172 y = _reconstruct(x, memo, *rv)
173
174 # If is its own copy, don't memoize.
C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
262 if deep and args:
263 args = (deepcopy(arg, memo) for arg in args)
--> 264 y = func(*args)
265 if deep:
266 memo[id(x)] = y
C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0)
261 deep = memo is not None
262 if deep and args:
--> 263 args = (deepcopy(arg, memo) for arg in args)
264 y = func(*args)
265 if deep:
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
159 reductor = getattr(x, "__reduce_ex__", None)
160 if reductor is not None:
--> 161 rv = reductor(4)
162 else:
163 reductor = getattr(x, "__reduce__", None)
C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.__reduce_ex__()
C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.to_pybytes()
MemoryError:
``` | [
-0.2084972411,
-0.1142904833,
0.0484715514,
0.4346455634,
0.1993300915,
0.1706531197,
-0.1373959482,
0.2591967583,
-0.1694814265,
0.0429845415,
0.0269324817,
0.2109087408,
0.0059093661,
-0.2283866107,
-0.1217164323,
0.1358806491,
0.2059147805,
0.0483618155,
-0.2932785153,
-0.0278222244,
-0.2548551261,
0.2438370883,
-0.3456243873,
-0.3321817517,
-0.3617054522,
0.2684001625,
-0.2888361514,
0.4278262258,
0.0539541952,
0.064548552,
0.3253515363,
-0.0345083475,
0.0323291756,
0.4721652865,
-0.0001129602,
-0.0248593707,
0.1940783858,
-0.1648728698,
-0.3701840937,
0.0790074989,
-0.2577257454,
-0.4280106127,
-0.1000079662,
0.0440543443,
0.4190388322,
0.0337178446,
-0.1139070988,
-0.7214249969,
0.0311018974,
0.1015497819,
0.2013146281,
0.0450460762,
0.3114584088,
-0.1664169133,
-0.0396207795,
0.0367015935,
-0.1191299185,
0.3378039896,
0.1667080224,
-0.2502478361,
0.0814066306,
0.0372246914,
-0.2164464742,
-0.192528531,
0.0617964789,
0.2860529423,
-0.2610837221,
-0.4039141536,
0.0245435648,
0.0290221553,
0.2679310441,
-0.4100948572,
-0.0420929864,
-0.4409762025,
0.0366232768,
-0.1752431244,
0.2727943659,
0.4027751386,
-0.2462697774,
0.2937924564,
-0.0894598067,
0.0641691685,
0.0416415185,
0.0172059201,
-0.2132968754,
0.1253427416,
-0.0891544744,
0.0814757869,
0.41026631,
-0.0002168619,
0.2920988202,
-0.3168372214,
-0.3524678648,
0.0377515219,
-0.5595110655,
-0.0498269126,
0.0755837262,
-0.4589986205,
0.2216621041,
0.1062295064,
0.119940497,
0.0183502696,
0.2121271938,
-0.0187558867,
0.3851087391,
0.2461847216,
-0.0689735562,
0.4001848698,
0.0538025908,
-0.1622481793,
0.3026241064,
0.0824344456,
-0.0298580602,
-0.2151600271,
0.2167402655,
-0.2746638656,
0.2562697828,
-0.0793105811,
-0.4918816984,
0.2032413334,
-0.1662216783,
0.1221666411,
-0.0328877009,
0.1849793792,
0.0313828178,
0.5110003352,
0.1733139157,
0.1208142042,
-0.0608106814,
0.1380167603,
-0.1753144413,
-0.1013807058,
-0.2131146491,
0.301628828,
0.2818208337,
-0.0465136506,
0.030395098,
0.2547301948,
0.1015235335,
-0.2291040272,
0.086158298,
-0.3414562345,
0.0732797161,
0.1529540271,
0.0300751757,
0.3761549592,
0.125554651,
-0.08553233,
-0.0448000468,
0.3257979453,
-0.312535882,
-0.1928356141,
-0.290473938,
0.1899367422,
0.0848515406,
0.1171094924,
-0.227867499,
0.2889301181,
0.3921438754,
0.2276148796,
-0.0246093497,
-0.0160901509,
0.130262658,
-0.342818439,
0.3278463185,
0.4563962221,
-0.1643466502,
0.2442177981,
0.159395203,
0.2009993345,
0.5149564743,
0.3146008551,
-0.0787217468,
0.0898945332,
-0.4410282373,
-0.0834652558,
0.1891033351,
-0.143719539,
-0.2636671662,
0.2389309108,
-0.250733614,
0.3553434312,
-0.077248849,
0.1755166352,
-0.0911853388,
0.154435575,
0.7130596042,
0.4093848467,
0.0317519456,
0.1562933922,
-0.3548541963,
-0.0897672176,
0.1346036941,
-0.0315746218,
-0.0920927301,
0.203722015,
-0.0326737799,
0.1011365652,
0.4664767385,
-0.1077109426,
0.1537832916,
0.4310880303,
0.0536220036,
-0.0714833066,
-0.2064582705,
0.0748019814,
-0.500707984,
0.0443879738,
0.0569926724,
-0.2531938255,
-0.0204964373,
-0.025782764,
-0.0208262559,
-0.0269898009,
0.0041291346,
0.0003337544,
0.050781887,
0.2245368809,
-0.1111166179,
-0.0524473973,
-0.0241556652,
0.8368058205,
-0.1254526824,
0.0507054292,
-0.419449687,
0.17125687,
-0.0288676862,
-0.2300038934,
-0.0660289302,
0.0523215048,
0.1158133671,
0.018808132,
-0.1096440777,
0.5126363635,
-0.1974749118,
-0.0526323356,
-0.2070369422,
-0.2552228868,
0.0165734664,
-0.0363013335,
0.0188742056,
-0.2550827861,
0.0981565937,
-0.1478387862,
-0.0155780716,
0.3320583999,
-0.0144176288,
0.0340214223,
0.0131642092,
-0.0984582826,
-0.0694326684,
-0.199783653,
0.1187123582,
-0.1878783405,
0.1486690789,
0.2488636672,
0.2260709405,
0.2236911654,
-0.4840830564,
-0.0810611174,
0.219400838,
0.0873405859,
0.2150364667,
0.1140583679,
-0.3331510127,
-0.1729366332,
-0.0043806299,
0.1619130373,
0.7703347206,
0.1586798728,
0.2190237045,
0.027602816,
-0.0670483336,
-0.2215754241,
0.2817304432,
-0.0253940262,
0.0702338517,
0.2413838357,
0.2463646978,
-0.004090792,
-0.2063647658,
0.1619837284,
0.1250707209,
0.0066982671,
-0.2925807536,
0.1093800291,
-0.2098113596,
0.0715498999,
-0.3482337594,
-0.3516216278,
-0.0114572877,
-0.4532115161,
-0.3251945972,
0.3953495622,
-0.0905611143,
-0.1436623037,
0.0558754094,
0.2527939975,
-0.0280838814,
0.0283189975,
0.0868097767,
0.2992717922,
-0.3061572015,
0.0406387039,
0.0782496706,
-0.2633132935,
0.0490674041,
0.1617475003,
-0.1413247585,
0.003218458,
-0.0775126293,
-0.0589703657,
-0.0648291558,
0.0027315279,
-0.1926748008,
0.1106752604,
0.0238207523,
-0.3615094721,
0.0093957772,
0.4291678071,
0.0770542473,
0.4083507061,
0.2699894607,
-0.1056148708,
-0.3779593706,
-0.1318798959,
-0.3104643226,
-0.396841675,
0.0882832557,
-0.048518423,
0.0247034505,
0.305152297,
0.1884800494,
-0.0642444342,
0.0278732702,
0.0880293474,
-0.1925893873,
-0.2163113207,
0.4186181426,
-0.0596594028,
-0.2062427998,
-0.1150500849,
0.1457554102,
-0.2462956309,
0.2110211402,
-0.4671842754,
0.119166106,
-0.5144693255,
0.036162369,
-0.2598981857,
0.0987707376,
0.0204597339,
0.0733608603,
-0.075194031,
-0.0873617157,
-0.0732143,
-0.1453312933,
-0.0290522836,
0.3612682521,
-0.2521466911,
-0.0733990222,
0.2915202081,
-0.0696367174,
0.4133874774,
0.0289635509,
0.3018462062,
0.1516515166,
0.5536729097,
-0.2386161685,
-0.4298311174,
-0.1228619218,
-0.1587633491,
-0.0061716945,
-0.1209720671,
-0.0357558616,
-0.1237008572,
-0.1062174365,
0.2274898589,
0.1769466847,
-0.1957772076,
0.2441171557,
-0.2653463185,
-0.0477351658,
-0.0598613806,
0.0071461429,
-0.0704566389,
-0.0330451168,
-0.1874565631,
0.0097142765,
0.0092436066,
-0.1222305372,
-0.2583731115,
0.0481117181,
-0.6078562737,
0.0813033208,
-0.1773094088,
0.5477052331,
0.1794639081,
-0.3359861374,
-0.0903055593,
0.0117468191,
0.712983191,
0.3859625161,
-0.4184194207,
0.213707611,
0.1342885047,
-0.5084599257,
-0.124201268,
-0.1015695781,
0.2427200824,
0.1661407501,
0.2337723076,
-0.1978383213,
0.0345437489,
0.1394106895,
0.3654304147,
-0.1443136632,
-0.0190236624,
-0.2345574051,
-0.2062203139,
-0.1828336865,
-0.2722641528,
0.102590166,
0.3259934783,
-0.202484563,
-0.3330006599,
-0.0266627781,
-0.1827154607,
0.2898463011,
-0.1630955189,
0.4102861583,
-0.0018577086,
0.3690983355,
-0.2302061468,
0.2487225682,
0.3287041783,
0.5444669724,
0.1445556879,
-0.1886041462,
0.2795901,
0.0070747915,
0.3126008213,
0.2015106529,
-0.1283900738,
0.0842768103,
-0.2613304555,
0.1809068173,
-0.5846992731,
0.1711179167,
0.0644453764,
0.0806887746,
-0.6066934466,
-0.1957487166,
0.271117866,
0.1606956571,
-0.0131718274,
0.5433198214,
-0.4463486671,
-0.4786521792,
0.1642614752,
-0.1519680768,
0.8347207308,
0.020710906,
0.2568377256,
0.0044031711,
-0.0597232953,
0.2216633707,
0.0106041525,
0.2319179922,
-0.1823973656,
-0.2544631362,
0.1474298984,
-0.259965539,
0.0836359784,
-0.271831125,
-0.4256107807,
0.1060700864,
-0.3712702096,
-0.0229353309,
-0.2223655879,
0.0113985427,
-0.2986968756,
-0.3575042188,
-0.0757507682,
0.1579179913,
0.2478517443,
-0.0842898563,
0.0014607274,
-0.0135903768,
-0.1467341036,
-0.1307819784,
-0.3107580543,
0.3131838143,
-0.1598429531,
0.4684118927,
-0.2722896636,
-0.1829644889,
-0.1438464969,
0.1320189685,
0.2478926778,
0.3407210112,
0.0169647429,
-0.095603317,
-0.132602632,
0.2782520056,
0.0808184892,
-0.2257163376,
0.0548747666,
0.3345299065,
-0.1280459762,
0.1026321575,
-0.0138708744,
-0.269759655,
-0.2939834297,
0.285615474,
0.019791862,
-0.2719834149,
-0.1172965914,
0.2751827836,
0.210570097,
-0.1763987839,
0.1346272677,
0.221814096,
-0.1078089997,
0.2202522457,
-0.4233257771,
-0.3826937079,
-0.1413325369,
0.332201004,
0.2150717229,
-0.0476864688,
0.2619221807,
0.0064737774,
0.0373307094,
-0.1044235379,
0.2194759101,
0.0214491617,
-0.1695192456,
0.2213660032,
-0.1948365569,
-0.0924791843,
0.0339001268,
0.2063985318,
0.1196031421,
-0.0841680542,
-0.0830368996,
-0.1579919159,
-0.4656389654,
0.0776984841,
0.0747645646,
0.3520533442,
-0.0351996496,
0.0434462838,
-0.1197488829,
0.1185340658,
-0.2961998284,
-0.0317849778,
-0.235613957,
0.1773301214,
-0.1427199244,
0.0333637223,
-0.0078615621,
-0.0961167812,
0.1403389275,
0.2220602483,
0.0875294134,
-0.2014868706,
0.0818393752,
0.0819424763,
0.0577592924,
-0.1826287806,
-0.2424246222,
-0.4744133949,
0.0761530697,
-0.352290839,
0.2711900473,
0.2841578722,
-0.0429665819,
-0.0853776932,
0.0960475504,
0.0166848078,
0.089424476,
0.0766522363,
-0.0908352137,
0.055822093,
-0.0828099176,
0.2883352935,
-0.0166553203,
-0.0094452472,
-0.5261987448,
0.1355680972,
0.0457162112,
0.058082357,
0.0829282925,
-0.2150708586,
-0.2936803102,
-0.0760250762,
0.0833572298,
0.4004902244,
-0.1983562261,
-0.0106343962,
-0.0482330248,
0.1880170107,
0.200294435,
-0.3394596577,
-0.1354780644,
-0.0541339703,
-0.0755010247,
0.1981996298,
0.1597377658,
-0.3077149689,
-0.2801881135,
-0.0657667667,
0.5569905639,
0.2812488079,
0.3075847924,
0.2442361712,
0.2052913159,
0.1028159112,
0.1233467534,
0.0502334125,
0.2296521366,
0.3803375661,
-0.0192460697,
0.2851465046,
0.1478361338,
-0.0647623986,
-0.1967904121,
-0.4574259222,
0.2853145301,
0.4371397197,
-0.2440536916,
0.3275417984,
0.0515152961,
-0.0573757999,
-0.4356239438,
-0.2360717505,
-0.045751337,
0.1197242886,
-0.3212192357,
-0.0957369059,
0.2676941156,
-0.0858537182,
0.0629817918,
0.1351404786,
0.1661012024,
-0.3355977535,
0.4730650187,
0.0138577661,
-0.2500504255,
-0.1553127468,
0.2223836482,
0.5034974217,
0.0119020464,
-0.3562343419,
0.0451844819,
0.1132243723,
-0.0502089448,
-0.0544723496,
0.4576027095,
0.5256032944,
0.5564418435,
0.228673622,
0.2088667452,
0.3797377944,
-0.0563462861,
-0.3019239008,
0.2601626813,
-0.0157607589,
-0.0937589929,
0.0445711575,
0.199458316,
-0.1327548027,
0.0180625506,
0.4137895703,
0.1692033261,
-0.3755021691,
0.0050655156,
-0.0561926216,
-0.2994550169,
0.071939595,
0.1382437199,
-0.2935511768,
0.0199725349,
0.4786639512,
-0.1998846829,
0.1544066221,
0.0871199518,
0.0902589411,
0.3071343601,
0.306568712,
0.2413415611,
-0.0728602186,
-0.3713644445,
-0.3787604868,
-0.2045229971,
0.2920800745,
0.0131600425,
0.2769453228,
-0.0518896319,
0.3205881417,
0.0929843485,
-0.0158901736,
-0.1567934752,
0.2470316291,
-0.1267679483,
0.0205864105,
-0.5303442478,
-0.1706693172,
0.2856864631,
-0.035044875,
-0.0198060647,
-0.4125316441,
0.4139529765,
0.0030130148,
0.088518627,
-0.1432082206,
0.2161064893,
0.171032086,
0.2663678229,
0.430405587,
0.2482923865,
0.1741652489,
-0.1628274173,
-0.3097066879,
-0.2974678576,
-0.3777627051,
0.0783983544,
-0.1954628527,
0.0234465841,
0.0784437731,
-0.3780973852,
0.014894099,
-0.1069143936,
0.0385914817,
0.2003040165,
0.118015714,
-0.122013323,
0.0405566394,
0.0305427425,
0.1406044215,
0.1762432754,
0.3873684108,
-0.0808450133,
0.3279303014,
-0.076998122,
-0.2976797819,
-0.0052271504,
0.0882844478,
-0.2614133358,
-0.200335145,
0.2056047618,
-0.071586445,
0.1235287413,
-0.5712339878,
-0.1176657826,
0.3252484202,
-0.1334317774,
-0.4380508065,
0.4799676836,
-0.1831926852,
-0.0903029591,
-0.0132818343,
0.4617711902,
0.0376565754,
-0.4231994748,
0.3124878109,
-0.1770281047
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | Hi ! this looks like an important issue. Let me try to reproduce this.
Cc @samsontmr this might be related to the memory issue you have in #2134 | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 28 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
Hi ! this looks like an important issue. Let me try to reproduce this.
Cc @samsontmr this might be related to the memory issue you have in #2134 | [
-0.1655791104,
0.0086439569,
0.0250857137,
0.3855162561,
0.2144167423,
0.1329607069,
0.0000971392,
0.2391079068,
-0.2387408912,
0.0435205214,
0.1007451862,
0.1849092394,
0.134906143,
-0.1963894218,
-0.1764697731,
0.2529346347,
0.2075013667,
0.1770740151,
-0.335496366,
-0.052640032,
-0.262876451,
0.2321232259,
-0.304941833,
-0.4224449396,
-0.45802176,
0.2613817751,
-0.356516093,
0.3417985737,
0.0743395165,
-0.0279051904,
0.3124286532,
0.0880530551,
0.0267189853,
0.4711242616,
-0.0001092321,
-0.0790268481,
0.2231826037,
-0.173162505,
-0.3741955161,
-0.0006445922,
-0.2066480219,
-0.4626251459,
0.0248349942,
-0.0448437668,
0.3222417831,
0.0223693848,
-0.1336590201,
-0.5861005187,
0.0342046022,
-0.0428406037,
0.2663332224,
-0.047044538,
0.1371285021,
-0.0761275887,
-0.0676250905,
0.1555086672,
-0.0315026455,
0.1939266026,
0.0748434886,
-0.0581820346,
0.1401507258,
0.1468087584,
-0.2224319875,
-0.0578752421,
0.0761222765,
0.3823085427,
-0.1556167454,
-0.3912759125,
0.100355804,
0.0139222676,
0.3194793761,
-0.3667296171,
-0.1034775451,
-0.3596833348,
0.0806933865,
-0.1792728454,
0.272342205,
0.4094534814,
-0.1917517632,
0.1821500957,
-0.0955393612,
0.0062458436,
-0.0361389443,
-0.0321249366,
-0.1807833612,
0.1143906415,
-0.1381176859,
0.0591760501,
0.2896770835,
0.0071407617,
0.2253641039,
-0.4683858752,
-0.2991127372,
0.1013632938,
-0.4785364866,
-0.0062481365,
-0.0034645332,
-0.3938516974,
0.1206183285,
0.1632405818,
0.0700612366,
0.0221851468,
0.2331523746,
0.0234278832,
0.3330491483,
0.1919008046,
-0.0601133965,
0.3533694744,
0.1468000114,
-0.1694044322,
0.1771906614,
0.0226119291,
-0.1276817024,
-0.2536400557,
0.2378404289,
-0.2868467569,
0.2203755677,
-0.141863212,
-0.4976772368,
0.1240120605,
-0.111091584,
0.0674401149,
-0.022640232,
0.231344074,
-0.0302149355,
0.4687632024,
0.2255093306,
0.2407607138,
-0.0569590218,
0.1936047822,
-0.1889929026,
-0.1315046549,
-0.1324180812,
0.2119250149,
0.2942711115,
-0.2170791179,
-0.0015044499,
0.3486466706,
0.0658852085,
-0.1580256671,
0.0930390209,
-0.3391184807,
0.1912353933,
0.1524959803,
0.1535512805,
0.3738383651,
0.0881200135,
-0.1477625221,
-0.0577588379,
0.4209818542,
-0.210291177,
-0.1051315889,
-0.2599578202,
0.2226827741,
0.0764071047,
0.152542159,
-0.1444144696,
0.2782827914,
0.3907813728,
0.2938725948,
-0.134930402,
0.0010445305,
-0.0442564338,
-0.4204101264,
0.4669270217,
0.4033466578,
-0.1331072152,
0.2231315374,
0.0950647816,
0.2323826104,
0.5047422647,
0.354256928,
-0.0591238476,
0.0130127138,
-0.3014683425,
0.0535794273,
0.1659543216,
-0.1710010767,
-0.1954696178,
0.2662731409,
-0.2416403741,
0.3232173324,
-0.0223681331,
0.1308974028,
-0.0406765752,
0.1153152213,
0.5678357482,
0.4280857146,
0.1203776076,
0.105934687,
-0.3661513925,
-0.124350898,
0.1430986375,
-0.1485829651,
-0.2223395854,
0.2367297411,
-0.0745881796,
-0.1166884378,
0.4902274907,
-0.1383097619,
0.2293733805,
0.3590710759,
0.2224221081,
-0.0895941556,
-0.2062207609,
0.1898646504,
-0.4102156162,
0.0116715832,
0.1662634909,
-0.2398366332,
-0.0783679485,
-0.0948774144,
0.0968283489,
0.0360407569,
-0.0288469847,
-0.0119435992,
0.0789147913,
0.2847228646,
-0.0222634263,
-0.0659038574,
0.0368666723,
0.832049191,
-0.0992907435,
-0.0373101383,
-0.2667584419,
0.1807723343,
-0.003786033,
-0.2975316942,
-0.0234784335,
0.1025627628,
0.2381667942,
0.0583727323,
-0.0710332021,
0.4748396575,
-0.2936935127,
-0.0626464635,
-0.1457631886,
-0.2413439006,
-0.0273025353,
0.0979815349,
0.0734952167,
-0.1472254992,
0.1992409229,
-0.1914403886,
0.0033332633,
0.350795716,
0.100145869,
0.1305985302,
0.0190080144,
-0.1095672771,
0.0522730723,
-0.1929915994,
0.1165609062,
-0.2192909122,
0.1902212203,
0.2370196283,
0.1897493452,
0.2867829204,
-0.4739087522,
0.0853216723,
0.2243829817,
0.0859738514,
0.1345877945,
0.1528250277,
-0.3762894571,
-0.1647812724,
-0.1182955131,
0.2007668316,
0.7927387953,
0.1822929382,
0.1886883825,
-0.0461789817,
-0.0195289683,
-0.2375984043,
0.330181241,
-0.0596762225,
0.0493185632,
0.2444159836,
0.2638573349,
-0.0619980469,
-0.1087929979,
0.2657487988,
0.0917519554,
-0.0722232014,
-0.2444092929,
0.0349162258,
-0.2231036127,
0.13635014,
-0.318053931,
-0.2835677266,
-0.0104358513,
-0.3355412185,
-0.3896484673,
0.4484143257,
-0.0530081987,
-0.1751149595,
0.0252493825,
0.2732763588,
-0.0759384856,
0.0165622085,
-0.0371094346,
0.2551338673,
-0.4038930535,
0.0515387058,
0.063479878,
-0.2436132878,
0.0719501153,
0.12816903,
-0.0348508433,
-0.0180504676,
-0.0568419769,
-0.1370335817,
-0.0814144015,
0.1027671769,
-0.2358751148,
0.1462715566,
0.0238741413,
-0.3808458447,
0.0596422888,
0.3619404733,
0.049281273,
0.3570196629,
0.311745882,
-0.2407875955,
-0.3567047715,
-0.1098104566,
-0.3115665913,
-0.3086030185,
0.0800435096,
0.0158425551,
0.109431535,
0.1882321835,
0.0879659653,
-0.1080851778,
0.1119808704,
0.1333828568,
-0.2219352126,
-0.2804148495,
0.5735881329,
-0.1309705079,
-0.3618884087,
-0.037036173,
0.0512447208,
-0.1881374568,
0.1929486394,
-0.5059256554,
0.1453741193,
-0.4991855919,
0.0533200949,
-0.2712648809,
0.1151778847,
-0.0531393774,
0.1162870452,
-0.1049731895,
-0.1924840063,
-0.1470504701,
0.0249407552,
0.0444607735,
0.2594726086,
-0.2077738792,
-0.1047965512,
0.158751592,
-0.1050417945,
0.5049678683,
-0.0508894548,
0.3199083209,
0.2215720564,
0.4598451555,
-0.2015454471,
-0.4354867637,
-0.199541986,
-0.2189507782,
0.0760167614,
0.0926734731,
0.0842148662,
-0.1030301824,
-0.0882744342,
0.1886629015,
0.1009894758,
-0.259232223,
0.1957739443,
-0.1638155282,
0.0225305967,
-0.0280092582,
-0.0647338703,
-0.1412208527,
-0.0814822316,
-0.2522286773,
0.0069883754,
0.0326024666,
-0.0900955647,
-0.2615722716,
0.0022694117,
-0.6186499,
0.1515332907,
-0.0837036148,
0.4394444823,
0.1057546586,
-0.3408278525,
0.0717104748,
-0.0512029342,
0.7416380644,
0.306371361,
-0.4622935355,
0.2142735273,
0.112851806,
-0.4659021795,
-0.0900794864,
-0.0442952514,
0.1861097217,
0.1753768921,
0.1690664291,
-0.250867486,
-0.0587700866,
0.0620602146,
0.3879023194,
-0.1628972739,
-0.0929846466,
-0.3386982977,
-0.2011761814,
-0.1498249471,
-0.3379560411,
0.0504355356,
0.4113534391,
-0.2342181206,
-0.2840870321,
-0.0269442964,
-0.1616679579,
0.2719669938,
-0.2362780422,
0.5309253931,
0.091756694,
0.4036066532,
-0.0857966915,
0.2549723387,
0.2840246558,
0.5802754164,
0.0843178257,
-0.0551954508,
0.2512031198,
-0.2015672177,
0.3931274414,
0.236178562,
-0.1646123827,
0.2078148425,
-0.312715739,
0.151119709,
-0.636251986,
0.1367298514,
0.1120366901,
0.1204813346,
-0.6141214967,
-0.2566093206,
0.2589707971,
0.0819213614,
-0.0361669399,
0.558214426,
-0.5020989776,
-0.3950894475,
0.0777554587,
-0.1777588874,
0.8481448293,
0.0699068457,
0.2565594912,
0.0027995685,
-0.2009338439,
0.1584957987,
0.1039952859,
0.2797350883,
-0.1751073897,
-0.1814475209,
0.1522355527,
-0.2464660555,
0.0690385699,
-0.122055985,
-0.4632972777,
0.0091000823,
-0.5243907571,
-0.0217026081,
-0.1231714636,
0.1032259166,
-0.212098226,
-0.302865833,
-0.0358663462,
0.2050858438,
0.330833286,
-0.0084450822,
0.0268149618,
-0.017538581,
-0.2335456461,
-0.1823990941,
-0.1997534037,
0.3178453147,
-0.174388051,
0.4426386654,
-0.2106557339,
-0.3191389441,
-0.1032408103,
0.0957934484,
0.3153255284,
0.237796247,
-0.0095438659,
-0.0968256444,
-0.0856421739,
0.3278059065,
0.0898515582,
-0.2695418298,
0.0056700869,
0.2372928411,
-0.1189019457,
-0.0290073305,
-0.0130605977,
-0.195152238,
-0.3066831231,
0.2422955483,
0.0326616317,
-0.3036012948,
-0.0849658921,
0.3106263876,
0.2804532349,
-0.1517196447,
0.1858511567,
0.2436745614,
-0.1264248043,
0.2694487572,
-0.3472905457,
-0.3536490798,
-0.1472582966,
0.3546778262,
0.3105778098,
-0.0207009744,
0.3795064688,
-0.025932163,
-0.0461530052,
-0.1392717361,
0.1437415034,
-0.0492220297,
-0.1437403709,
0.2533924878,
-0.0723611787,
-0.02457642,
-0.0736332163,
0.2642334998,
-0.0107505638,
-0.052237615,
-0.0499434695,
-0.2327729166,
-0.3944985569,
-0.0881244317,
0.022393791,
0.2742873132,
-0.0259232521,
0.0368150584,
-0.0961183608,
0.223686859,
-0.3511758149,
-0.126211375,
-0.1875378788,
0.2015403062,
-0.089266412,
-0.0035378525,
0.1460659653,
0.0338846594,
0.1957266629,
0.1709043086,
0.0599291548,
-0.2495286167,
0.0352629833,
0.0864397138,
-0.0465429388,
-0.2119364142,
-0.203942135,
-0.3957459927,
0.0185143668,
-0.3560478687,
0.2193856239,
0.2203256637,
-0.0527058206,
-0.1323360801,
-0.0683469698,
0.0547505505,
0.0508897156,
0.0306921117,
-0.1557453573,
0.0050946963,
-0.0430693217,
0.1874599457,
-0.0439721905,
-0.0179947596,
-0.4997470677,
0.0306651369,
0.0877424777,
-0.0207827669,
-0.0201891027,
-0.1921585202,
-0.2383554429,
-0.1208875179,
0.131478548,
0.3539880812,
-0.2005265802,
0.0096167177,
-0.0026397794,
0.2471839786,
0.0900183544,
-0.2926793694,
-0.2121763676,
-0.143819347,
-0.1670494974,
0.1733813584,
0.1612119526,
-0.2851786315,
-0.2628611326,
-0.0674716011,
0.514193058,
0.1537667364,
0.2914769948,
0.1864931136,
0.2115906626,
0.1594835222,
0.079972595,
0.1450885683,
0.074769415,
0.2733059824,
-0.0731557459,
0.2683879137,
0.236928463,
-0.1638637483,
-0.1892026961,
-0.453791827,
0.2869059145,
0.4056817293,
-0.1335877031,
0.2038645297,
-0.0452833511,
0.0616546012,
-0.3951908648,
-0.2849049866,
-0.1014392525,
0.1666638106,
-0.3034034073,
-0.1454536021,
0.1830055863,
-0.0824940205,
0.0329312608,
0.1180339679,
0.1921325028,
-0.2573124766,
0.4321692586,
0.1411123276,
-0.1275134534,
-0.2316101044,
0.2931308448,
0.3955430984,
0.0570614822,
-0.3257538974,
0.0650611296,
0.092005372,
0.0739112124,
0.052013617,
0.3636522591,
0.550324142,
0.6578988433,
0.229902938,
0.1052020937,
0.2951344252,
-0.0638790056,
-0.2650010288,
0.2549950778,
-0.061701674,
-0.0989863425,
0.1175218523,
0.2143210322,
-0.1710013002,
0.0013895584,
0.3623442054,
0.1524404138,
-0.3825712204,
0.1151849404,
-0.0261550061,
-0.2708134353,
0.0641741231,
0.0035996516,
-0.2895316184,
-0.053174179,
0.54020679,
-0.2178838998,
0.1411160678,
0.0234850645,
0.1104840711,
0.1662438214,
0.3059569597,
0.0939161703,
-0.0284780972,
-0.40436396,
-0.3820247948,
-0.2501632869,
0.2439368963,
0.0739299059,
0.2556677163,
-0.1245227307,
0.33128497,
-0.0306097083,
-0.097601369,
-0.1264605522,
0.1275254041,
-0.1415267438,
-0.0024953922,
-0.5370713472,
-0.0231016707,
0.2088388354,
0.0114366924,
-0.0010786429,
-0.3491339684,
0.3652960062,
-0.1066994071,
0.1608671248,
-0.1346105039,
0.2273355722,
0.1830498874,
0.3793090582,
0.4042258561,
0.2506741285,
0.243347466,
-0.2374552786,
-0.2472519279,
-0.2280052155,
-0.2799969614,
-0.0099123837,
-0.1266324371,
0.0126282945,
0.0822141841,
-0.3894752562,
0.0802965239,
-0.1074458957,
0.0438102335,
0.1785130203,
0.1614346057,
-0.0175020806,
0.0740023777,
0.0483422503,
0.1693347991,
0.2136318088,
0.2484339029,
-0.060039185,
0.2875373065,
-0.1768735647,
-0.3218999505,
0.1524877548,
0.0063736313,
-0.2955350578,
-0.1489925086,
0.3120767474,
-0.0680461973,
0.1580916792,
-0.6385350227,
-0.1486531645,
0.3362166882,
-0.1242275909,
-0.4552140832,
0.4964091778,
-0.1591984183,
-0.1164708734,
-0.0237515774,
0.3737538755,
0.0552554727,
-0.4150145054,
0.2294658124,
-0.2355408221
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | @lhoestq Just went to open a similar issue.
It seems like deep copying (tested on master) the dataset object writes the table's record batches (`dset._data._batches`) into RAM.
To find the bug, I modified the `_deepcopy` function in `table.py` as follows:
```python
def _deepcopy(x, memo: dict):
"""deepcopy a regular class instance"""
import psutil # pip install this package
import time
cls = x.__class__
result = cls.__new__(cls)
memo[id(x)] = result
for k, v in x.__dict__.items():
print("="* 50)
print("Current memory:", psutil.virtual_memory().percent)
print(f"Saving object {k} with value {v}")
setattr(result, k, copy.deepcopy(v, memo))
time.sleep(5)
print("Memory after copy:", psutil.virtual_memory().percent)
return result
```
Test script:
```python
import copy
from datasets import load_dataset
bk = load_dataset("bookcorpus", split="train")
bk_copy = copy.deepcopy(bk)
``` | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 113 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
@lhoestq Just went to open a similar issue.
It seems like deep copying (tested on master) the dataset object writes the table's record batches (`dset._data._batches`) into RAM.
To find the bug, I modified the `_deepcopy` function in `table.py` as follows:
```python
def _deepcopy(x, memo: dict):
"""deepcopy a regular class instance"""
import psutil # pip install this package
import time
cls = x.__class__
result = cls.__new__(cls)
memo[id(x)] = result
for k, v in x.__dict__.items():
print("="* 50)
print("Current memory:", psutil.virtual_memory().percent)
print(f"Saving object {k} with value {v}")
setattr(result, k, copy.deepcopy(v, memo))
time.sleep(5)
print("Memory after copy:", psutil.virtual_memory().percent)
return result
```
Test script:
```python
import copy
from datasets import load_dataset
bk = load_dataset("bookcorpus", split="train")
bk_copy = copy.deepcopy(bk)
``` | [
-0.1189590171,
0.083305344,
0.1260729134,
0.3719976544,
0.0171170533,
0.1133872122,
-0.113791585,
0.3422017097,
-0.3763221502,
-0.0313395187,
-0.0029889611,
0.2833090425,
0.1032994166,
-0.1568288207,
0.0146104116,
0.4244331717,
0.2601238489,
0.1345783919,
-0.4625254571,
-0.1483725905,
-0.3425717652,
-0.0025912886,
-0.1786783487,
-0.419524312,
-0.4456120133,
0.3286665082,
-0.3202906847,
0.2377287149,
-0.0560324825,
0.1286334693,
0.355545193,
0.18642129,
-0.0315980427,
0.5348340273,
-0.0001191608,
0.0577580594,
0.256449908,
-0.1635587513,
-0.4494658709,
0.1362713873,
-0.3920058608,
-0.3536657989,
0.1314736456,
0.0160406958,
0.4164901078,
0.0663909018,
-0.2298910618,
-0.4634820521,
-0.0232499633,
0.065226391,
0.1593082547,
0.1110112146,
-0.0350349098,
-0.1213510111,
0.0089880582,
0.1179199293,
-0.1411334872,
0.2453015149,
-0.1013238579,
-0.1167632267,
0.0576570928,
0.1684361398,
-0.3590690196,
-0.0874380022,
-0.0095491428,
0.2900184691,
-0.1620875001,
-0.2823726833,
0.2129004151,
0.0464697182,
0.214604333,
-0.4365737736,
-0.0415480286,
-0.4749777019,
-0.0196938924,
-0.3048730791,
0.0995296612,
0.3082132339,
-0.1891000271,
0.1121601537,
-0.1328095943,
0.0581188835,
0.0337474495,
-0.0737376511,
-0.1217984408,
-0.1695669591,
0.0101736495,
0.0271478072,
0.4104743898,
-0.0549753606,
0.4511062205,
-0.3960839808,
-0.2956275642,
0.0855898485,
-0.5441937447,
0.0141932517,
0.1144325584,
-0.2700991929,
0.1956010014,
0.2327722311,
0.2149358541,
0.0469077565,
0.137921989,
-0.0228499621,
0.4365807176,
0.1996461749,
-0.1025639102,
0.5009911656,
0.1304696649,
-0.1632463336,
0.3409540355,
0.1101419851,
-0.1132151559,
-0.0781086087,
0.3009512722,
-0.3656767011,
0.2292411029,
-0.1927223355,
-0.3715546131,
0.1397657543,
0.0065253749,
0.0778659061,
-0.0496673211,
0.3585069776,
0.0671439916,
0.2547056675,
0.1538929194,
0.3614988327,
-0.0698515251,
0.1949404627,
-0.2237623781,
-0.1218688264,
-0.1603536308,
0.2349951863,
0.3661683202,
0.0074926545,
-0.0572897382,
0.3013067245,
0.0723041296,
-0.1387107968,
-0.060999725,
-0.3262604773,
0.3241436183,
0.2703714073,
0.0587165095,
0.2103708982,
0.2266681939,
-0.1304645985,
-0.1423019618,
0.4503263235,
-0.2546399236,
-0.0735560805,
-0.069354929,
0.1033570617,
0.0362259038,
0.0443487428,
-0.4758995771,
0.3106037676,
0.4347767532,
0.2327108234,
0.0285811778,
-0.1107445434,
-0.1464840919,
-0.3564537764,
0.4472280443,
0.4729632437,
-0.054146111,
0.0487054475,
0.0353440195,
0.2649787068,
0.5495263338,
0.3402065635,
0.0434603803,
0.0879207104,
-0.2372002304,
0.0179048106,
0.0983415544,
-0.00050063,
-0.2484384477,
0.1872134507,
-0.2704434991,
0.3351163864,
-0.0241546072,
0.1016251445,
0.1242663413,
0.0973194614,
0.6602460742,
0.2771521509,
0.0627578273,
0.1526489407,
-0.3004393876,
-0.1258175671,
0.0933527052,
0.0086358273,
-0.1207737699,
0.3070912361,
-0.0019087222,
-0.2292074263,
0.386333853,
0.0090981303,
0.1405577958,
0.285595715,
0.1549438089,
-0.0899410769,
-0.1746753007,
0.2379616648,
-0.3544647098,
0.0971630141,
0.1835032552,
-0.0397742726,
-0.1856773943,
-0.1383265257,
0.1348203123,
0.2285039872,
-0.2306199074,
0.0922537744,
0.0155479321,
0.0989256129,
-0.0327141583,
0.1316239983,
0.1348375082,
0.6968742013,
-0.1539064348,
0.0587006174,
-0.46252352,
0.1415292621,
0.1405996233,
-0.2519922554,
-0.0621952303,
0.2103708535,
0.196787715,
0.073298879,
-0.1008109897,
0.4235238433,
-0.3193056583,
-0.1450687498,
-0.2693100274,
0.0403389633,
-0.0298411641,
-0.0516969152,
0.1415468305,
-0.2254730761,
0.2247689068,
-0.1563023031,
-0.0567418933,
0.4507272243,
0.0112396581,
0.1874462962,
-0.0045904694,
-0.1919715703,
0.0793228969,
-0.1642476618,
0.0901824161,
-0.1586998105,
0.1115508005,
0.3809708357,
0.1517383009,
0.3321411312,
-0.329978615,
0.1686086804,
0.1915562451,
-0.0641720369,
0.2080636024,
0.248998642,
-0.3479630649,
-0.2832607329,
-0.1409808844,
0.3459083736,
0.7657052279,
0.0833002776,
0.2235913575,
-0.1126444787,
-0.0013695719,
-0.179559797,
0.3187158108,
-0.0918820724,
0.1735779196,
0.2070206702,
0.2243022919,
-0.1472702175,
-0.2065799981,
0.4320197105,
0.1452323198,
-0.0747567713,
-0.2772232592,
0.0283991061,
-0.3362884521,
0.0518883951,
-0.37330091,
-0.1222403049,
0.0817801878,
-0.3311996162,
-0.2710941434,
0.3929058611,
-0.0935638472,
-0.1096560434,
-0.0498728864,
0.3842967451,
-0.0503481477,
-0.1125859022,
0.0026580743,
0.1787293553,
-0.2788047493,
-0.0525808185,
-0.0056802467,
-0.3215697706,
0.0520071909,
0.2059116811,
-0.1652084887,
0.0415371805,
0.0537944585,
0.02607942,
-0.1959231794,
0.0513001978,
-0.172758311,
0.1507132649,
0.0790430382,
-0.2274552584,
-0.0169859007,
0.372939229,
0.0160091482,
0.5513108969,
0.2199633121,
-0.2465399504,
-0.1986986548,
0.0650126263,
-0.3557267189,
-0.1634889692,
0.2513193786,
-0.1487260908,
0.0252160411,
0.173763141,
0.0827572942,
-0.1229355037,
0.0731973127,
0.1564648747,
-0.1991320252,
-0.1466025263,
0.4220419526,
-0.0023799899,
-0.342471391,
-0.2232851833,
0.08010865,
-0.3310312331,
0.1510903686,
-0.5484548807,
0.2285901457,
-0.5363154411,
0.2024653256,
0.0190960411,
0.0740159377,
0.136085391,
0.1101198196,
-0.0381845236,
-0.1437599957,
-0.272131145,
0.0334947072,
0.0069909291,
0.0654356256,
-0.0745998845,
0.2158825397,
0.2305157334,
0.0186749455,
0.3907528818,
-0.0177378096,
0.3915451169,
0.1259575933,
0.5700922012,
-0.3393678963,
-0.4471696615,
-0.3153422773,
-0.3729498088,
-0.0552659146,
-0.0380565785,
-0.0817660913,
-0.2075939178,
0.0566457361,
0.1470750421,
0.0643213987,
-0.2225521058,
0.1592551768,
-0.2326899916,
-0.1527372897,
0.1568507403,
-0.1012194902,
-0.1353790164,
-0.0830878988,
-0.2535192966,
-0.0893896669,
-0.1491837651,
-0.1135687903,
-0.3458330333,
-0.1257228106,
-0.6547681689,
0.0768065006,
-0.1478189826,
0.604026258,
0.1357031167,
-0.37451756,
0.0399748087,
0.0413492247,
0.8027875423,
0.3686524928,
-0.2305439264,
0.1310170442,
-0.0224331599,
-0.3862511218,
-0.059194576,
0.0813652277,
0.2802150249,
0.1229081526,
0.0950161964,
-0.2442751527,
0.0788232014,
0.2331961393,
0.2669421434,
-0.2513380945,
0.0450552665,
-0.2758742571,
-0.212784633,
0.0257186815,
-0.2337642461,
0.2033437043,
0.2741472125,
-0.3531466424,
-0.2460869998,
-0.0267990716,
-0.2043597251,
0.2672509551,
-0.2123705745,
0.4381569326,
0.1416171193,
0.4936625957,
-0.1587227285,
0.2963473201,
0.3730778098,
0.7436978817,
-0.1091234535,
-0.1179477349,
0.1731950641,
-0.2392698675,
0.3826468289,
0.2412305176,
-0.1666254401,
0.2367009223,
-0.2310509235,
-0.0033405225,
-0.537242949,
-0.0061618583,
-0.0372622795,
0.0735993832,
-0.5417615771,
-0.2735452354,
0.4134731293,
0.1998052299,
0.0134618133,
0.4708476961,
-0.5638409257,
-0.3500663638,
0.1962457895,
-0.3353710771,
0.8098763227,
0.0702947378,
0.2955166101,
-0.0543087572,
-0.0189363193,
-0.0495380275,
0.1149439514,
0.1686780751,
-0.0994603336,
-0.3948726058,
0.2031389177,
-0.2248123437,
-0.1883256733,
-0.2532239258,
-0.2801165581,
0.0907683969,
-0.4150790572,
-0.133360669,
0.0245231912,
-0.1456514448,
0.0061807376,
-0.291202426,
0.0734750926,
0.1313214153,
0.4107920527,
-0.2013477832,
0.1182067022,
0.0275956448,
-0.3105556965,
-0.3001871407,
-0.2445833534,
0.224171862,
-0.2056498677,
0.5132960677,
-0.217520386,
-0.2047212273,
-0.1777375191,
-0.014170317,
0.230237335,
0.1844240427,
0.001467245,
-0.2093810588,
0.2169170529,
0.3816984892,
0.2162960023,
-0.3113329411,
0.0308293812,
0.2869879305,
-0.0235171039,
-0.0897097811,
-0.0129279438,
-0.251547575,
-0.312751621,
0.1624220163,
0.1311500221,
-0.2297176272,
-0.2221889049,
0.2884565294,
0.2736464441,
-0.2233536988,
0.1020717621,
0.1862878799,
-0.1079066172,
0.3019551039,
-0.4452912807,
-0.4008279443,
-0.1504717171,
0.5288501978,
0.4275749624,
0.1370943338,
0.3589575291,
-0.025524525,
-0.0275361221,
-0.0926667377,
0.3038039505,
0.2948080599,
-0.3083604574,
0.3327580392,
-0.2347117662,
-0.0889828429,
-0.1223548576,
0.1906555444,
-0.0902996436,
-0.1498224288,
-0.2004105747,
-0.1588423848,
-0.179237321,
0.0921350867,
0.0629843771,
0.2616426051,
0.0333866253,
0.0792109519,
-0.1321288198,
0.2453097403,
-0.2345609069,
-0.1031525657,
-0.0935178846,
0.194214955,
0.0110164583,
0.1036981717,
0.2282829732,
-0.0901653916,
0.0720119402,
0.2308770269,
0.1835256666,
-0.1775109768,
0.111941956,
0.1160487086,
-0.078404516,
-0.0639151633,
-0.3406570852,
-0.4153371155,
-0.1584492028,
-0.2976613641,
0.2195537835,
0.1389336437,
-0.0571223386,
-0.2025784254,
0.2531114817,
0.0496827886,
0.0989653766,
0.1189783365,
-0.1670355201,
-0.0721579194,
-0.0590217896,
0.1988937706,
-0.1856141388,
-0.0442988425,
-0.4569976628,
0.0580305159,
0.1112941876,
-0.1273508519,
0.0608634725,
-0.2804782689,
-0.3058777153,
-0.1940654069,
0.0891560912,
0.423335284,
-0.1628593951,
-0.1574441195,
-0.045026131,
0.116830498,
0.032736022,
-0.3386599422,
-0.2539919019,
-0.2116802484,
-0.0826831684,
0.3108477592,
0.1218882278,
-0.3003926873,
-0.2763800621,
-0.082250692,
0.5124064684,
0.1108017787,
0.3124136329,
0.1702505052,
0.2720429599,
0.2492617816,
0.0365549028,
0.1158343032,
0.0244236998,
0.210810408,
0.0569149889,
0.3601377606,
0.265935123,
-0.2367969602,
-0.1599995345,
-0.4941538274,
0.3613449931,
0.5100721121,
-0.1413560361,
0.3520649672,
-0.0123264696,
0.072984159,
-0.3567440212,
-0.2225815356,
-0.2216589153,
0.1330319345,
-0.1914547086,
-0.2346654683,
0.2077042162,
-0.129169032,
-0.0449784622,
0.1002361402,
0.0568047501,
-0.2421502769,
0.3202769756,
0.1047632694,
-0.2098566443,
-0.0811469182,
0.130289644,
0.3109110892,
-0.0603779443,
-0.2923102379,
0.0793743208,
-0.0151287867,
-0.0235873777,
0.0448474661,
0.4151214957,
0.4353761375,
0.530636251,
0.2169145942,
0.1128674001,
0.3910495341,
-0.1669704616,
-0.2181598991,
0.2484210432,
-0.1326768547,
-0.2015148997,
0.0555639938,
0.1131806374,
-0.1079041734,
-0.0361439176,
0.4862875044,
0.1950157285,
-0.3314707279,
0.1184651554,
0.0301657151,
-0.2474866956,
0.1125628501,
0.0522435419,
-0.3138694465,
0.0204904675,
0.6549022794,
-0.394171983,
0.0542713553,
0.0577683672,
0.0555416718,
0.1530133784,
0.4801189303,
0.1707011461,
-0.0453488454,
-0.3510208428,
-0.2779954672,
-0.1362154782,
0.1387813538,
-0.024880074,
0.1667619497,
0.0925183743,
0.2837330997,
0.0989437848,
-0.1669983566,
-0.2755039632,
0.0935918912,
-0.2863233387,
0.0450815447,
-0.440754503,
-0.2045118809,
0.1137033701,
0.1588918716,
-0.0348877721,
-0.3842608929,
0.3081073165,
-0.0702197775,
0.0374394171,
-0.0346696489,
0.1880491525,
0.1128131226,
0.4133764803,
0.2729744613,
0.2253100127,
0.1860001236,
-0.1833368242,
-0.186790362,
-0.1063156873,
-0.2303206325,
-0.1898797303,
-0.1697673798,
0.0219484549,
-0.046042826,
-0.2856986821,
0.1003534645,
-0.020345442,
-0.0850031152,
0.2123135328,
0.0074449978,
-0.0953534022,
0.2097870111,
0.0374384187,
0.2626573145,
0.1896252632,
0.1903232485,
-0.0774147287,
0.4393137097,
0.0394965746,
-0.3373167515,
0.1008080617,
-0.0407977477,
-0.1056731865,
-0.1429012567,
0.3319272399,
-0.1910951138,
0.1146392077,
-0.4796128869,
-0.1773149073,
0.2614834309,
-0.128775999,
-0.5020697713,
0.6252390742,
-0.1250655204,
-0.0407960489,
-0.1198752522,
0.490555495,
0.0633974671,
-0.4901545942,
0.2776886523,
-0.3202515841
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | Thanks for the insights @mariosasko ! I'm working on a fix.
Since this is a big issue I'll make a patch release as soon as this is fixed | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 28 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
Thanks for the insights @mariosasko ! I'm working on a fix.
Since this is a big issue I'll make a patch release as soon as this is fixed | [
-0.1398508996,
0.0151146287,
0.0576702692,
0.3696734309,
0.1839566827,
0.1596759856,
-0.0336783044,
0.2669216394,
-0.2130461782,
0.0089293523,
0.0735272765,
0.1821825504,
0.1092259213,
-0.2046646327,
-0.1817609817,
0.3304116428,
0.2417272329,
0.2320262343,
-0.2873945832,
-0.0829889923,
-0.2531094849,
0.2507128119,
-0.3118991852,
-0.3932683468,
-0.4115404785,
0.2931380868,
-0.3173240125,
0.2868468761,
0.0731342435,
0.0163130555,
0.3663007319,
0.0684919953,
-0.0108417757,
0.4899156988,
-0.0001141718,
-0.039947018,
0.2374246418,
-0.1666596681,
-0.371072948,
0.038238775,
-0.2115313411,
-0.4239184558,
0.0949019492,
0.0163906179,
0.3227263391,
0.027634481,
-0.1392491907,
-0.619590044,
-0.0363314562,
-0.0184868164,
0.2055884153,
-0.0736074373,
0.087323837,
-0.0346821062,
-0.1545482427,
0.150118947,
-0.0562112443,
0.2053206861,
0.0462262295,
-0.0868434533,
0.1201178879,
0.1036039889,
-0.2861646712,
-0.0662713349,
0.086972408,
0.3886124194,
-0.1644803733,
-0.4153283238,
0.0623526312,
0.0289842095,
0.2989787459,
-0.3810660243,
-0.0750828162,
-0.4106535017,
0.072307393,
-0.1518741101,
0.2585918009,
0.5170178413,
-0.2185686827,
0.2292112559,
-0.1242386252,
-0.0252382029,
-0.0161853693,
-0.0290715918,
-0.2198182493,
0.1054315493,
-0.1261250228,
0.0533121489,
0.3340788782,
0.0692819357,
0.2617448568,
-0.4625050426,
-0.3334728777,
0.1024647728,
-0.5122952461,
-0.0164023396,
-0.0102712288,
-0.376255542,
0.1318041533,
0.2016305923,
0.087839596,
0.003513844,
0.1841775179,
0.0197745152,
0.3769456744,
0.1765153557,
0.0080638491,
0.3474488258,
0.105243437,
-0.2071619183,
0.2690296471,
0.0588004217,
-0.0470570587,
-0.2088434398,
0.2501570284,
-0.3447650671,
0.1984029263,
-0.1314503402,
-0.4553023577,
0.1100057662,
-0.1005399451,
0.0687939972,
-0.0308027305,
0.249418065,
-0.0282952189,
0.4881112576,
0.1856012046,
0.3167211711,
-0.03453115,
0.1992318332,
-0.1725661606,
-0.1550677568,
-0.095450379,
0.2142080367,
0.3256212175,
-0.2365007102,
-0.0088533256,
0.4181312025,
0.0340126976,
-0.1766607314,
0.0817501843,
-0.3128967583,
0.2096926719,
0.1971651614,
0.1583947986,
0.4220797718,
0.1548348814,
-0.1589886099,
-0.0694986433,
0.4355955422,
-0.287933439,
-0.065849714,
-0.2847757339,
0.1766028106,
0.0320009217,
0.1077617034,
-0.207327053,
0.3298120797,
0.4095008671,
0.2896980643,
-0.0911844,
0.0171632878,
-0.0444946475,
-0.3863946199,
0.474612087,
0.3746913671,
-0.1228756458,
0.1804329306,
0.0796551853,
0.255589515,
0.5120503902,
0.3279235363,
-0.0482976064,
0.0531704724,
-0.3730938435,
0.0125812218,
0.1686255336,
-0.1546409726,
-0.1727765054,
0.3032649457,
-0.2416494936,
0.32877478,
-0.0439335331,
0.1694866568,
-0.0733179897,
0.1647847295,
0.583922863,
0.4656876922,
0.1425247639,
0.1275511086,
-0.2993758321,
-0.1339702904,
0.1769676656,
-0.1294550449,
-0.22511217,
0.3253210485,
-0.0589603111,
-0.1444766819,
0.5275813341,
-0.1006268561,
0.2085410655,
0.3714690506,
0.1504821181,
-0.1359593272,
-0.2112357467,
0.1942197233,
-0.4309013486,
0.0013525882,
0.1675439924,
-0.2653862238,
-0.0621715374,
-0.057874646,
0.1020049453,
0.0258222707,
-0.063624844,
0.0238728058,
0.0121605406,
0.2641775012,
-0.0993796065,
0.0258629993,
-0.0086657237,
0.8541285396,
-0.0331425108,
0.0026921178,
-0.2960159779,
0.1831162721,
0.0733397976,
-0.2640356421,
-0.0746996701,
0.0341199301,
0.1943826824,
0.0817593709,
-0.0983499065,
0.4858406186,
-0.3071311414,
-0.0535058752,
-0.1756160408,
-0.2325035185,
-0.0301671606,
0.0834078267,
0.0084745465,
-0.1559773833,
0.1944574565,
-0.2200029194,
-0.0202956889,
0.3703811169,
0.0729342401,
0.1607591808,
-0.0248843953,
-0.0984202549,
0.055047933,
-0.1947637051,
0.1069360971,
-0.2017445266,
0.1457112283,
0.2696824968,
0.1671741158,
0.3178858161,
-0.4692429304,
0.0399973467,
0.2182406336,
0.0924295634,
0.1402143091,
0.1689798981,
-0.4341331124,
-0.1735431105,
-0.1096329093,
0.1892324835,
0.7930137515,
0.1422208995,
0.2025083452,
-0.0815568119,
0.0044433204,
-0.2626176775,
0.3425414264,
-0.0330345146,
0.0056894287,
0.2706081867,
0.272927314,
-0.1077961549,
-0.1397442073,
0.3924453855,
0.0544331893,
-0.0995830595,
-0.2963498831,
0.1051602811,
-0.2472943664,
0.1749787182,
-0.3388811946,
-0.2995421588,
-0.042970676,
-0.372938782,
-0.3870542645,
0.4966085255,
-0.005071084,
-0.2058931887,
-0.0000233897,
0.3029478788,
-0.08028844,
-0.1078598723,
-0.0437195301,
0.2978873551,
-0.4031482041,
0.0023267257,
0.0329105817,
-0.2414673269,
0.0255988706,
0.1616856456,
-0.0746066049,
0.006247445,
-0.0376015306,
-0.1460682303,
-0.1108777747,
0.119387053,
-0.2633404434,
0.1448411942,
0.0067905402,
-0.3595244288,
0.0139944069,
0.41249457,
0.0607037246,
0.4417827725,
0.3276701868,
-0.2216089964,
-0.3578845263,
-0.0738940984,
-0.2946996689,
-0.267267406,
0.0994078368,
0.0303421207,
0.0763326138,
0.194141686,
0.0754337013,
-0.164186433,
0.079548277,
0.1035593674,
-0.1700497121,
-0.3065526783,
0.5985965133,
-0.0416414514,
-0.3260034025,
-0.0542533398,
0.0742411315,
-0.2196605653,
0.1507496685,
-0.523976326,
0.2077149004,
-0.524337709,
0.0357963592,
-0.2324327081,
0.0915299207,
-0.0867218673,
0.0982721299,
-0.0368087254,
-0.1558755189,
-0.1413528323,
0.0125798136,
0.004449469,
0.2630652785,
-0.1881359518,
-0.1222263947,
0.1747366935,
-0.132096678,
0.5040396452,
-0.0255288295,
0.3300639391,
0.1965636015,
0.520670712,
-0.2252722383,
-0.4929820299,
-0.204338178,
-0.2016646117,
0.1007427499,
0.0577178895,
0.0778432265,
-0.0946502239,
-0.081782788,
0.234490484,
0.0969503075,
-0.2222568393,
0.1670326889,
-0.2054093629,
-0.0506109595,
0.0042489017,
-0.0312077608,
-0.1099207923,
-0.1497732848,
-0.2375926524,
0.019927809,
0.0114061143,
-0.0618962497,
-0.2488290071,
0.0346116126,
-0.5779018402,
0.0993205383,
-0.1357797384,
0.4480731189,
0.1299208552,
-0.3381295502,
0.0687863305,
0.0045525981,
0.7800455689,
0.3826604187,
-0.4314597845,
0.2051053941,
0.1531833559,
-0.4868687093,
-0.1069032401,
0.0146361478,
0.1714553833,
0.1549954861,
0.155925408,
-0.1871200651,
-0.0236668605,
0.01837302,
0.392737478,
-0.210406065,
-0.1052648425,
-0.3675716519,
-0.1692109555,
-0.1150123179,
-0.3382619321,
0.0803163424,
0.3705013394,
-0.2373081446,
-0.3466644287,
-0.0292504206,
-0.1737226695,
0.2647716105,
-0.2550118566,
0.506393373,
0.0859554186,
0.3880678117,
-0.1179889813,
0.2238127887,
0.219709143,
0.5938228369,
0.1231937781,
-0.1026301458,
0.2181451619,
-0.2252628356,
0.3985522687,
0.1742030382,
-0.1846558303,
0.1840727925,
-0.3219738901,
0.0856890529,
-0.6387633085,
0.1511771232,
0.073266983,
0.1199123114,
-0.6324183345,
-0.2313169688,
0.2561938167,
0.1056605503,
-0.0216334499,
0.5527477264,
-0.5034877658,
-0.4059454203,
0.0405905917,
-0.2261582911,
0.8108163476,
0.054083541,
0.2876096666,
-0.0171813089,
-0.1803121716,
0.1524910331,
0.1116672084,
0.2736446261,
-0.2010591626,
-0.2040137351,
0.1287797242,
-0.2660422325,
0.0044189161,
-0.1600618213,
-0.452701062,
0.069142662,
-0.5905041099,
-0.0506211743,
-0.0806237683,
0.0679044425,
-0.1449847966,
-0.306198895,
0.0529613197,
0.1591801047,
0.2841212749,
0.0000367929,
0.0886318162,
-0.0578099862,
-0.2199354917,
-0.21484375,
-0.1946785301,
0.377741456,
-0.1425356269,
0.4557340145,
-0.2058802992,
-0.2754248083,
-0.1219581291,
0.1634797454,
0.3350862265,
0.2765884697,
-0.0273095313,
-0.1375315636,
-0.0673853755,
0.3632541597,
0.130205065,
-0.2657194436,
-0.0197191276,
0.2913515568,
-0.0664219707,
-0.0717535168,
0.0024252189,
-0.2321029156,
-0.2963328362,
0.2948569655,
0.0133136585,
-0.2735064328,
-0.1186899841,
0.3011369109,
0.3806627691,
-0.150824368,
0.1304543316,
0.2537244558,
-0.0948473811,
0.2317898124,
-0.3779785931,
-0.3909695148,
-0.1365137845,
0.3814929724,
0.314407289,
-0.0888851136,
0.3437523544,
-0.0430450179,
-0.0188747477,
-0.1143521443,
0.2174156606,
-0.0165058747,
-0.1529433578,
0.2706181109,
-0.0953311473,
0.0080780089,
-0.0805863589,
0.2164024413,
-0.059956558,
-0.0798116252,
-0.054853674,
-0.198996827,
-0.3820289373,
-0.0718340129,
0.0063271406,
0.228054285,
0.0546975136,
0.0106074894,
-0.0638363287,
0.2170872837,
-0.2776567936,
-0.1158027723,
-0.1540310681,
0.1460759044,
-0.0868836418,
0.0577559955,
0.1480903476,
-0.0008429687,
0.1407098025,
0.1058210358,
0.1066786125,
-0.2063992769,
0.0332688615,
0.114385508,
-0.0116972597,
-0.1314937919,
-0.206829235,
-0.4186024368,
0.0010652812,
-0.3671498001,
0.1847517192,
0.2422653884,
-0.0208056979,
-0.12799263,
-0.0086686248,
0.0280056428,
0.0371196494,
-0.0186054241,
-0.1917666942,
-0.0357007794,
-0.0672506019,
0.1754506081,
-0.0418208092,
0.005907963,
-0.5367487669,
0.0873258114,
0.1139786392,
0.0057070693,
-0.0187885445,
-0.2345143557,
-0.2203792781,
-0.1694925427,
0.1231050268,
0.3735879064,
-0.2358670682,
0.0285468623,
-0.039606344,
0.1834031492,
0.1108333543,
-0.3205861449,
-0.1787666976,
-0.0526631102,
-0.1876272112,
0.184968859,
0.1193197742,
-0.3131455779,
-0.2715875804,
-0.0768370852,
0.5262075663,
0.1202999875,
0.2920235097,
0.2118809074,
0.2025564611,
0.1655830592,
0.0613665916,
0.1247074679,
0.0348170698,
0.3070794344,
-0.053087987,
0.2144798487,
0.2865369618,
-0.2327165008,
-0.235666424,
-0.4283558428,
0.2475954592,
0.4237318635,
-0.155031085,
0.2289582044,
0.0401218832,
0.0791492909,
-0.4021755457,
-0.3282315433,
-0.0945643485,
0.1622190922,
-0.2592236698,
-0.1383005828,
0.2126483321,
-0.0485825986,
0.04846159,
0.0994851366,
0.2145465314,
-0.2807632089,
0.4253140986,
0.1433028579,
-0.1721544862,
-0.2424560189,
0.2480067015,
0.4640233517,
0.0112847267,
-0.3268961906,
0.0366255119,
0.0277844109,
0.0765660852,
0.0569227636,
0.3208045363,
0.4883129299,
0.6327383518,
0.288939923,
0.1040663645,
0.3102712631,
-0.0706407875,
-0.2328086346,
0.2654065192,
-0.1099807918,
-0.0806350186,
0.0893706232,
0.1750107408,
-0.1282296032,
0.0753759146,
0.3534379601,
0.2108040154,
-0.4426004291,
0.1605286896,
-0.0011851223,
-0.2379379719,
0.0257545523,
0.0223687738,
-0.2537686229,
0.0047232891,
0.5532049537,
-0.1821507066,
0.1118660569,
0.0138444584,
0.0740121156,
0.255978018,
0.2634493411,
0.0847182199,
-0.0089978958,
-0.3793722093,
-0.3257671595,
-0.1911377758,
0.2649610937,
0.1162209809,
0.3654852808,
-0.1273176819,
0.2802460194,
0.0141837345,
-0.061911311,
-0.1746496409,
0.1437336951,
-0.1585673988,
-0.039541766,
-0.4842322171,
-0.0827421769,
0.212489292,
0.0345618911,
-0.0472925715,
-0.3593175113,
0.3947599828,
-0.1068711728,
0.1028015241,
-0.0799388885,
0.234165132,
0.1995652616,
0.3372665346,
0.3748333454,
0.2423320115,
0.2296584696,
-0.2148535103,
-0.1963132322,
-0.2213145792,
-0.3038081527,
-0.0730425045,
-0.1656856537,
0.0013529494,
0.0800113901,
-0.4104301035,
0.12257649,
-0.1289905012,
0.011527881,
0.2242870182,
0.162028864,
-0.0820092857,
0.0895313099,
0.0539806783,
0.21178101,
0.1964695901,
0.174843058,
-0.0805258378,
0.3490606844,
-0.1060526147,
-0.313888967,
0.0989740863,
0.0467912443,
-0.2664644122,
-0.1155914888,
0.3089936674,
-0.0543668084,
0.1614173353,
-0.631542325,
-0.1777594388,
0.3585124016,
-0.1232246235,
-0.4799723923,
0.5117149353,
-0.1925513297,
-0.106777817,
-0.0470471345,
0.361828506,
0.1069892794,
-0.4236908555,
0.2816740572,
-0.2509839833
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | Hi @samsontmr @TaskManager91 the fix is on the master branch, feel free to install `datasets` from source and let us know if you still have issues | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 26 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.
![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png)
## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
Hi @samsontmr @TaskManager91 the fix is on the master branch, feel free to install `datasets` from source and let us know if you still have issues | [
-0.1705919653,
0.0092171757,
0.0292839464,
0.3677371442,
0.1755020022,
0.1506509483,
-0.0363331027,
0.2557010055,
-0.2184763104,
0.0205547977,
0.0756373778,
0.2006985843,
0.1137188151,
-0.1913735867,
-0.1878062934,
0.321284771,
0.2241286188,
0.2327462882,
-0.3028806448,
-0.0799711496,
-0.2509784997,
0.2532586157,
-0.3152191639,
-0.4041965008,
-0.3926776648,
0.2633895278,
-0.3242086768,
0.2930183411,
0.0551787131,
0.0143006695,
0.3530984223,
0.0911313668,
-0.0061370167,
0.5166873932,
-0.0001119337,
-0.0348057747,
0.2190030962,
-0.1603055894,
-0.3798380792,
0.0134006795,
-0.2082094252,
-0.4310546517,
0.0528312325,
-0.0045531471,
0.3232039213,
0.0165414978,
-0.1144325137,
-0.622104764,
-0.0218278337,
-0.0040228143,
0.2312553376,
-0.0567464121,
0.110954985,
-0.0584036075,
-0.140624553,
0.1617466807,
-0.0351831503,
0.1927780509,
0.0371737592,
-0.0715287179,
0.1079411581,
0.0792483166,
-0.2629720569,
-0.0831598863,
0.075224191,
0.3842879534,
-0.1346910894,
-0.4134612679,
0.0804953799,
0.0150397848,
0.3004925251,
-0.3991720676,
-0.0938755795,
-0.3797348738,
0.074021548,
-0.143854633,
0.2679318488,
0.4909186363,
-0.2104187906,
0.2195638418,
-0.1331174523,
-0.0365268812,
-0.0239777286,
-0.0288995095,
-0.204329282,
0.0931629613,
-0.1354396641,
0.0305273142,
0.3242895603,
0.0353000388,
0.270270288,
-0.4690800309,
-0.3298482597,
0.1103057712,
-0.5132635236,
-0.0276158378,
-0.0030138204,
-0.3875361085,
0.1243833676,
0.2151880562,
0.087587826,
0.0227858927,
0.1844988465,
0.0349109098,
0.3635180891,
0.18040815,
0.0184643585,
0.3571970463,
0.128489241,
-0.1866256744,
0.2579452991,
0.0578464717,
-0.0656245723,
-0.2233370095,
0.236463055,
-0.3508512676,
0.1808034778,
-0.1380874217,
-0.4598096609,
0.1174358949,
-0.0863997936,
0.0496026278,
-0.0094317999,
0.2542226017,
-0.0292178672,
0.4726692438,
0.1849810481,
0.2863076627,
-0.0344358049,
0.2018057108,
-0.1823037565,
-0.1430384666,
-0.1071338877,
0.2081675977,
0.3183358014,
-0.2373676747,
-0.0012824991,
0.386520952,
0.0339646935,
-0.1422040761,
0.0747800991,
-0.3283980489,
0.1817577481,
0.1874955744,
0.1599018723,
0.3855149448,
0.1233888417,
-0.129931584,
-0.073461093,
0.4197446406,
-0.2636741996,
-0.0535455085,
-0.2766644359,
0.2080066949,
0.0323730335,
0.0900533423,
-0.1872913539,
0.3255513608,
0.3913214207,
0.2665784359,
-0.1022030935,
0.0159125105,
-0.0254235901,
-0.4058589339,
0.4793982208,
0.3491703868,
-0.1226652339,
0.1716085672,
0.0541147292,
0.2214608043,
0.502322793,
0.3170531988,
-0.0411459543,
0.0464437008,
-0.3630587459,
0.0208718907,
0.1720965058,
-0.1713980883,
-0.189229995,
0.2992793322,
-0.2327097356,
0.3057893217,
-0.0190437399,
0.1393659115,
-0.0547651015,
0.167448163,
0.5857993364,
0.455062449,
0.1370741427,
0.1111659408,
-0.313015461,
-0.14392744,
0.1525892615,
-0.1146864146,
-0.2094823122,
0.3083634377,
-0.0232087132,
-0.1329600811,
0.520049274,
-0.1009352729,
0.211539939,
0.3745301664,
0.1742048562,
-0.1261504889,
-0.2095541954,
0.1763240844,
-0.4116718173,
-0.0128655303,
0.1423325092,
-0.2536488175,
-0.0743056685,
-0.0587706789,
0.0862645283,
0.0054154205,
-0.046151489,
0.0131206131,
0.0468457341,
0.2829904258,
-0.0541428998,
0.0100660203,
-0.005147316,
0.8445512652,
-0.0522515923,
-0.0038743834,
-0.2735114694,
0.202454716,
0.0517794155,
-0.2781852484,
-0.0604394749,
0.060166806,
0.1768259108,
0.0623119511,
-0.0969209671,
0.5086949468,
-0.316232115,
-0.0530034751,
-0.1282176077,
-0.238672927,
-0.019794533,
0.0813365355,
0.0303820912,
-0.1581413895,
0.1951511502,
-0.201355651,
-0.048570957,
0.3627674878,
0.063738957,
0.1470879614,
0.0014077807,
-0.1114586517,
0.0617571734,
-0.1842130274,
0.110768795,
-0.1929575205,
0.1656010747,
0.2717434168,
0.1882424951,
0.2941268086,
-0.4811878204,
0.024500655,
0.223347351,
0.0795772299,
0.1472450197,
0.1627761424,
-0.4270971119,
-0.1794689298,
-0.1047097445,
0.1944564432,
0.801423192,
0.1726981103,
0.2021741718,
-0.0856785551,
-0.0116208298,
-0.2446802706,
0.3470247388,
-0.0430201106,
0.015032555,
0.2690575421,
0.2735055387,
-0.10099639,
-0.1482652873,
0.3355562687,
0.074228324,
-0.1128372326,
-0.2773728967,
0.0631777197,
-0.2430236042,
0.160727188,
-0.3150873184,
-0.284452945,
-0.028644193,
-0.3622499108,
-0.3986130059,
0.4999140501,
0.0003713643,
-0.1869663745,
0.0068636434,
0.2999923527,
-0.0691007152,
-0.0762334168,
-0.0526446626,
0.2924110591,
-0.3996619284,
0.0342248417,
0.0327193514,
-0.2350406498,
0.0591153353,
0.1551667005,
-0.0633149445,
-0.0152565688,
-0.039111089,
-0.1443187594,
-0.1046108827,
0.1309558153,
-0.2461872399,
0.1443765759,
0.0002400392,
-0.3521913886,
0.0151465572,
0.3860213757,
0.0331957303,
0.426102221,
0.317625165,
-0.2234505117,
-0.3679217994,
-0.0894453824,
-0.3102515936,
-0.293808639,
0.0898835734,
0.0360094495,
0.0871712342,
0.1884694695,
0.0940235928,
-0.112522006,
0.0752633363,
0.1272690594,
-0.1948866546,
-0.314614296,
0.594406724,
-0.0795406029,
-0.3260221481,
-0.0507531203,
0.0738558769,
-0.2051506937,
0.1580086499,
-0.5181682706,
0.1775107235,
-0.5287159681,
0.055396419,
-0.2294148803,
0.1287553459,
-0.0822001025,
0.1013930887,
-0.073105976,
-0.1697249264,
-0.1496966034,
-0.0004372108,
0.0265975036,
0.2668582499,
-0.1863807291,
-0.1166982949,
0.1746389419,
-0.142204091,
0.5094493628,
-0.0357054472,
0.3200165629,
0.1902730763,
0.5234619379,
-0.1986839175,
-0.4719848037,
-0.1932122558,
-0.2005853653,
0.0893357918,
0.0563365892,
0.0636830851,
-0.0920831487,
-0.0806077197,
0.2244478464,
0.0911798999,
-0.217560634,
0.1473003477,
-0.1959723085,
-0.0329137519,
-0.01922765,
-0.0387288779,
-0.1207239255,
-0.1115189418,
-0.2408661395,
0.023046948,
0.0003597028,
-0.0564636774,
-0.2714480162,
0.0201330967,
-0.5876373649,
0.109475702,
-0.1373865604,
0.4535589218,
0.1090085432,
-0.3208842576,
0.0583269969,
-0.0161344223,
0.7636985183,
0.3329623342,
-0.436306119,
0.2071590275,
0.1552901864,
-0.465837568,
-0.0835808739,
-0.0213172194,
0.1899801195,
0.1312692016,
0.1583264023,
-0.2055954337,
-0.0296572205,
0.0358316898,
0.3744696975,
-0.2042752057,
-0.095585905,
-0.3499989808,
-0.1737558395,
-0.1365811527,
-0.3245689273,
0.0489246994,
0.4076437354,
-0.2329461128,
-0.3107890785,
-0.036818739,
-0.184957087,
0.2744169235,
-0.2308511883,
0.5145857334,
0.0639486238,
0.3858354986,
-0.0978936628,
0.2156769186,
0.2473816723,
0.5988699198,
0.1038332507,
-0.1060994938,
0.2526396811,
-0.2163179219,
0.4124968648,
0.1633564681,
-0.1602386236,
0.1917660981,
-0.3098961115,
0.09778402,
-0.6230971217,
0.164124012,
0.0725560859,
0.1276916862,
-0.6346242428,
-0.2413497269,
0.227197215,
0.1082774922,
-0.0185788125,
0.5124949813,
-0.4901214242,
-0.4179084003,
0.0697134286,
-0.2118568718,
0.8130754232,
0.054728251,
0.2585773766,
-0.029654989,
-0.1845353991,
0.1582951993,
0.0853044093,
0.2678157687,
-0.1852397025,
-0.1961282641,
0.1438763291,
-0.2712045908,
0.0100166481,
-0.1378271133,
-0.4844807088,
0.0686793029,
-0.5488303304,
-0.055148568,
-0.0857352018,
0.0833574384,
-0.152726084,
-0.3045670092,
0.0371955149,
0.1895383596,
0.3127614856,
0.0013447503,
0.0653885677,
-0.0448100641,
-0.2109621018,
-0.1944259256,
-0.1934618503,
0.3593724668,
-0.1455612034,
0.4600490928,
-0.2225938141,
-0.2794795036,
-0.1271814555,
0.1378701776,
0.317121923,
0.2699974477,
-0.023086099,
-0.130508557,
-0.0730517358,
0.3410401642,
0.1088791043,
-0.2430869639,
0.0008911808,
0.2779832184,
-0.0806920752,
-0.0385388844,
-0.0032457635,
-0.2296984345,
-0.2879564762,
0.269028008,
0.010950949,
-0.2714541554,
-0.0941429883,
0.3045256734,
0.345137924,
-0.1455771178,
0.1580163836,
0.2575799525,
-0.0873667374,
0.2418085784,
-0.3634420335,
-0.3893842697,
-0.1616247743,
0.3766774535,
0.2974401712,
-0.0833573267,
0.3261158764,
-0.0495862365,
-0.036519058,
-0.1432905346,
0.1960613281,
-0.0354606435,
-0.1487310231,
0.2714610994,
-0.0911771283,
-0.0164954327,
-0.0638386458,
0.217640847,
-0.0276382156,
-0.0734699145,
-0.0515616126,
-0.220101133,
-0.3964553773,
-0.0557607636,
-0.0022765477,
0.2487776279,
0.0545787886,
0.0049685105,
-0.0857976004,
0.2177583277,
-0.3150093853,
-0.108596243,
-0.1695532948,
0.149317354,
-0.0745879859,
0.0430760011,
0.1462406516,
0.005567743,
0.1722053289,
0.1193138808,
0.1077751741,
-0.2334416956,
0.0453123339,
0.0964169875,
-0.0259039439,
-0.1499041766,
-0.2246697396,
-0.4041143656,
0.0112568717,
-0.3703246713,
0.1964095682,
0.2312370241,
-0.0353975371,
-0.1200983897,
-0.0055267964,
0.0413131602,
0.0197680686,
-0.0121566113,
-0.1634089053,
-0.0472181402,
-0.082891345,
0.19750911,
-0.0617212653,
-0.0061474349,
-0.5149456263,
0.0845452994,
0.1428639293,
-0.0128742773,
0.0052392543,
-0.2167885154,
-0.2100989968,
-0.1587083191,
0.1227070019,
0.3723140955,
-0.217362985,
0.0193793643,
-0.0240692887,
0.2157365829,
0.0988938063,
-0.3250535131,
-0.2007526904,
-0.0765901804,
-0.1589842141,
0.1698937267,
0.1420830935,
-0.2991502583,
-0.2625754774,
-0.0591583662,
0.5463074446,
0.1247394308,
0.2897943556,
0.2192463428,
0.2227226049,
0.1619436592,
0.0821057186,
0.1254657656,
0.0443909802,
0.3199917078,
-0.047439266,
0.2595844865,
0.2789168656,
-0.2171847373,
-0.2115838826,
-0.4280099869,
0.2837205529,
0.4275855422,
-0.1443538517,
0.225315854,
0.0233591776,
0.0850129649,
-0.4194730818,
-0.2932546139,
-0.1019084677,
0.1396277696,
-0.2674475312,
-0.1335682273,
0.1960601509,
-0.0838550329,
0.0306120571,
0.0907148793,
0.2005172223,
-0.2689691782,
0.4259613156,
0.1229150742,
-0.1554664671,
-0.2405549586,
0.2527743876,
0.4658412039,
0.0022956186,
-0.3160016835,
0.0356350243,
0.027169643,
0.072089687,
0.055405423,
0.341198653,
0.4986339808,
0.6147714257,
0.2721054256,
0.1044656932,
0.307415545,
-0.067805551,
-0.2478257865,
0.2650791407,
-0.1127168909,
-0.1081438139,
0.0906783044,
0.2065340877,
-0.1485036016,
0.0566634983,
0.3594042361,
0.1688805073,
-0.4155342877,
0.147421062,
0.0089650983,
-0.252756834,
0.0678588822,
0.0108297588,
-0.243113488,
-0.0130255911,
0.5400261283,
-0.2046991885,
0.1184391901,
0.0085533727,
0.094471164,
0.2409151495,
0.2731510997,
0.1047125906,
-0.0267012157,
-0.3710480332,
-0.3345953226,
-0.205573231,
0.2501991987,
0.138846457,
0.3416659534,
-0.1382290572,
0.2902058363,
0.018928621,
-0.0795915574,
-0.1497368217,
0.1210181713,
-0.1521133482,
-0.0313670598,
-0.4907978773,
-0.0563849621,
0.2144358456,
0.0261179302,
-0.0263205934,
-0.3581999838,
0.3783019781,
-0.1205614209,
0.1346713156,
-0.0968298465,
0.2296246141,
0.2119971812,
0.3251648545,
0.3890556991,
0.2415723354,
0.2294232547,
-0.2480790764,
-0.2008241266,
-0.2242736369,
-0.2944231927,
-0.0670721531,
-0.1548820287,
-0.0179351345,
0.081275329,
-0.4103186727,
0.1024461091,
-0.1002154127,
0.0182397906,
0.2129155099,
0.1546313316,
-0.0696232021,
0.0950294286,
0.0535511859,
0.1901405901,
0.2027448565,
0.19093135,
-0.0671832189,
0.3385688365,
-0.1113279611,
-0.3111752272,
0.0780567899,
0.0500972383,
-0.2669708431,
-0.136052832,
0.2945313752,
-0.0741826519,
0.1726398319,
-0.636254847,
-0.1700380892,
0.3600723743,
-0.1359409988,
-0.4746212065,
0.5072939396,
-0.1810390651,
-0.1051708534,
-0.0325119346,
0.3822624981,
0.0733077452,
-0.4318178594,
0.2638355792,
-0.2444106042
] |
https://github.com/huggingface/datasets/issues/2275 | SNLI dataset has labels of -1 | Hi @puzzler10,
Those examples where `gold_label` field was empty, -1 label was alloted to it. In order to remove it you can filter the samples from train/val/test splits. Here's how you can drop those rows from the dataset:
`dataset = load_dataset("snli")`
`dataset_test_filter = dataset['test'].filter(lambda example: example['label'] != -1)`
I agree it should have been mentioned in the documentation. I'll raise a PR regarding the same. Thanks for pointing out! | There are a number of rows with a label of -1 in the SNLI dataset. The dataset descriptions [here](https://nlp.stanford.edu/projects/snli/) and [here](https://github.com/huggingface/datasets/tree/master/datasets/snli) don't list -1 as a label possibility, and neither does the dataset viewer. As examples, see index 107 or 124 of the test set.
It isn't clear what these labels mean. I found a [line of code](https://github.com/huggingface/datasets/blob/80e59ef178d3bb2090d091bc32315c655eb0633d/datasets/snli/snli.py#L94) that seems to put them in but it seems still unclear why they are there. The current workaround is to just drop the rows from any model being trained.
Perhaps the documentation should be updated. | 69 | SNLI dataset has labels of -1
There are a number of rows with a label of -1 in the SNLI dataset. The dataset descriptions [here](https://nlp.stanford.edu/projects/snli/) and [here](https://github.com/huggingface/datasets/tree/master/datasets/snli) don't list -1 as a label possibility, and neither does the dataset viewer. As examples, see index 107 or 124 of the test set.
It isn't clear what these labels mean. I found a [line of code](https://github.com/huggingface/datasets/blob/80e59ef178d3bb2090d091bc32315c655eb0633d/datasets/snli/snli.py#L94) that seems to put them in but it seems still unclear why they are there. The current workaround is to just drop the rows from any model being trained.
Perhaps the documentation should be updated.
Hi @puzzler10,
Those examples where `gold_label` field was empty, -1 label was alloted to it. In order to remove it you can filter the samples from train/val/test splits. Here's how you can drop those rows from the dataset:
`dataset = load_dataset("snli")`
`dataset_test_filter = dataset['test'].filter(lambda example: example['label'] != -1)`
I agree it should have been mentioned in the documentation. I'll raise a PR regarding the same. Thanks for pointing out! | [
0.2989761531,
-0.3761274517,
-0.032856673,
0.2222824693,
0.0694199651,
0.081588015,
0.3312397599,
0.1691943109,
0.1813281626,
0.2444590926,
-0.3545391262,
0.4890281856,
-0.1160791144,
0.2643212378,
-0.0070859157,
0.1549566984,
0.2352823913,
0.303981334,
0.2841203213,
-0.3298658133,
-0.2717859447,
0.0914113447,
-0.4051926136,
0.2479600012,
-0.3731478751,
0.0205870494,
0.1299514323,
-0.0096965143,
0.0335912034,
-0.5129566789,
0.0948815346,
0.1173789725,
-0.0772678405,
-0.0724162459,
-0.0001088527,
-0.240339607,
0.0697496906,
-0.0470228754,
-0.6223359704,
-0.25298208,
-0.1181872264,
0.207709223,
0.075157091,
0.0172912143,
-0.0961224884,
-0.0527752191,
0.0744382441,
0.1242417991,
-0.080979608,
0.3326572776,
0.179492265,
0.3804583848,
-0.1768750548,
0.070737958,
0.343985647,
-0.1560857594,
0.0178826936,
0.210777089,
-0.0133288093,
0.0425252952,
0.2260411084,
0.5354086757,
-0.0452152863,
0.0348854698,
0.3393324912,
0.0228581559,
-0.0777819231,
-0.4266029596,
0.0421026275,
0.3638971746,
0.0810515508,
-0.2305556536,
-0.3671468198,
-0.2749624848,
0.2244779468,
-0.2685078681,
0.058270473,
0.266851455,
0.0697488561,
0.2614789903,
-0.1460724026,
-0.050952509,
-0.1751928031,
0.0005081859,
-0.1057192609,
0.6413038969,
-0.1593692154,
0.1289836019,
0.5075033307,
0.0728355572,
-0.4432065487,
0.0394590721,
0.1568492055,
0.4317368567,
-0.5694574714,
-0.1717996299,
-0.0282679982,
0.163205862,
0.048188027,
0.2185508311,
0.0437854417,
0.0269281864,
-0.0140582165,
0.2916793525,
-0.0694849268,
0.1436822563,
0.3065778017,
-0.0466933139,
0.2114737779,
0.0162285753,
0.360098362,
0.0481923781,
-0.2132714093,
-0.1394187957,
0.1308577061,
-0.2398143113,
0.1998529732,
-0.2626758814,
-0.647346735,
0.2097320855,
-0.3907646835,
0.1524565518,
0.0866874605,
0.0645214617,
0.2203207314,
-0.0598430187,
-0.0791025534,
0.0456991233,
-0.137814939,
-0.4292083681,
-0.1970971525,
0.09036991,
-0.0988865197,
-0.1167685166,
0.210784331,
-0.3131538033,
0.3315537572,
0.0532461852,
-0.2020502985,
-0.0207847785,
0.1787770689,
0.1645312309,
0.2473970056,
0.577164948,
-0.3488188684,
0.333037734,
0.0659812316,
-0.1964198649,
-0.101756759,
-0.0393128246,
-0.1723005772,
-0.2989446819,
-0.0818258598,
0.1699969769,
-0.1952710748,
-0.1519023031,
-0.0912289917,
0.0878944322,
-0.1778071374,
0.1813961565,
0.2566715479,
-0.2120781988,
-0.0585160106,
-0.0010470697,
0.3605418205,
0.1575622261,
-0.4851129949,
-0.2034797519,
0.1237736791,
-0.4227319956,
-0.0173458979,
0.2736926079,
0.0932892114,
-0.1971941888,
-0.0713966489,
0.2520916164,
0.2139834464,
-0.2968646586,
-0.3827933967,
0.0271745939,
-0.3269346654,
-0.1678777486,
-0.1895412803,
0.3081362844,
-0.1457917988,
0.1059517711,
-0.0698809996,
-0.201935634,
0.0900856033,
-0.2835513055,
-0.5512372851,
-0.2125912756,
0.2463141829,
0.3127195537,
-0.049292367,
0.0508235805,
-0.1639030874,
-0.0070772567,
0.2720738053,
0.0131316017,
0.2313563973,
0.1837441027,
0.4308996201,
0.1810056716,
0.0823248476,
-0.0849986225,
-0.3912086487,
0.2321950495,
0.0310571715,
0.3658102453,
0.1825836897,
-0.2678923309,
-0.241005823,
-0.2028993815,
-0.2412320524,
-0.2026887089,
0.0869418681,
0.0619798116,
0.2216903567,
-0.0590655543,
-0.3432807922,
0.0738291964,
-0.3657285571,
0.2240729034,
-0.4974219799,
-0.1394048184,
0.1059823483,
0.1703778505,
-0.1773590147,
0.2051084191,
0.2067947686,
0.0261945873,
-0.0004641431,
0.3204998374,
-0.1998348236,
-0.2124387026,
0.230879575,
0.4564019442,
0.1108061969,
-0.4229479432,
-0.0603931509,
0.3066330254,
0.0346607491,
0.0723260343,
-0.3624299467,
0.3699860573,
-0.1780643463,
0.1303417087,
-0.1571431458,
0.1258879453,
0.1038831547,
0.0623038709,
-0.3292540908,
-0.2804181874,
-0.1012572274,
-0.3951132298,
0.3665451109,
0.1523701996,
-0.6327456236,
0.1134548932,
0.0347609222,
-0.3291113079,
-0.0887432545,
0.072933577,
-0.2424842417,
-0.1196305901,
0.3244645596,
0.241127491,
0.1161470562,
0.2301639467,
0.1370830983,
0.1427649707,
-0.3513397574,
-0.268656224,
0.0397716798,
0.1523791403,
-0.1068360955,
-0.1208843663,
0.1304070055,
-0.0173293501,
-0.3405171335,
-0.230884999,
-0.0885475725,
0.2723147273,
-0.4020915031,
0.0290395785,
-0.2172334939,
-0.1394993514,
-0.3488054574,
-0.0022712178,
-0.2464653403,
-0.2919359505,
0.3128002882,
0.0047454876,
-0.2030441612,
0.1004573628,
0.0316309035,
0.5093467832,
-0.1519937068,
0.2992748618,
-0.3002234697,
-0.2652911246,
-0.2074289918,
0.0390337631,
-0.2587572336,
0.2907176912,
0.3018001318,
-0.1576563269,
-0.3338997066,
-0.0033462599,
-0.3023771346,
0.0480286665,
-0.1426198334,
0.10029006,
0.1844927967,
0.0393271297,
-0.0511749201,
0.3166734874,
0.0049948157,
-0.2142883688,
-0.1116833836,
-0.0925552547,
-0.0810802206,
0.1272657812,
-0.5270532966,
-0.3587162495,
-0.1944818348,
-0.0670322627,
0.2488205433,
-0.1992381215,
0.0729882419,
0.304656744,
-0.0580610186,
0.3074793518,
-0.1491304189,
0.1342585683,
-0.199203968,
-0.408611536,
0.1899916381,
0.0326561183,
-0.2425484657,
0.1930105239,
0.2684447169,
-0.0160763022,
-0.224411428,
-0.3304808438,
-0.0894587263,
0.1758213788,
0.0823935717,
0.1061901599,
-0.0795196444,
-0.1110925972,
0.0465239659,
0.0067264172,
-0.2253057361,
0.0642921925,
0.3514789939,
-0.425473839,
0.2542329133,
-0.1100140288,
0.1659718454,
0.010235114,
0.26685673,
0.4718402624,
0.0371447429,
-0.144850567,
0.0275475793,
0.1412934959,
-0.048385486,
0.1749215722,
0.1657843441,
0.2737950981,
-0.0954465494,
0.4123095572,
0.0016734995,
0.0519004166,
0.0887967348,
-0.0069069914,
0.0350569598,
-0.1055698916,
-0.1193995476,
-0.0342234485,
-0.0516612828,
-0.0025482555,
-0.0705693588,
-0.0076272781,
-0.0360237695,
-0.1251481622,
0.129968062,
0.0240500551,
0.058096379,
-0.315196842,
0.046581611,
-0.2711878121,
-0.0921698287,
-0.1488167048,
0.2241200358,
0.0887399018,
-0.0866959468,
0.4816255271,
0.2233077586,
0.651552856,
-0.2569715381,
0.170772016,
0.1465683132,
0.323830843,
-0.2031406313,
-0.2338121384,
-0.4656895697,
-0.2860246301,
0.3575040102,
0.3194353878,
-0.1423306167,
-0.5077239871,
0.4295347929,
0.0348511264,
-0.135657236,
0.0319493823,
-0.2754110992,
-0.2216804922,
-0.0745626166,
0.2017955929,
0.0877771527,
0.005555999,
-0.2659325302,
0.147495836,
0.2062803954,
0.1089139283,
0.417121768,
0.3996474743,
0.0480078757,
0.1336191148,
-0.0788362399,
0.4705046415,
0.2033641338,
0.1280691028,
0.5412425995,
-0.0320210606,
-0.4326096177,
0.1952374578,
-0.301749289,
0.4824660122,
0.271944046,
0.1515710056,
0.0913844705,
-0.2434858531,
0.3418337703,
-0.2550146878,
0.0671940371,
0.2685760856,
-0.0562016517,
-0.1702011526,
-0.2825742662,
0.5954549313,
-0.0494571961,
-0.3141207695,
0.024750879,
0.4294596612,
-0.2368098199,
0.2148873508,
0.3691091537,
1.0459474325,
-0.0521242917,
0.0110981939,
0.3327120841,
-0.5709406734,
0.5602003336,
-0.1948111504,
-0.0722165927,
-0.256184876,
0.0398418941,
0.1239632145,
0.2006252408,
-0.1609837562,
0.4800279737,
0.1506718695,
0.1787363142,
-0.2310983837,
0.1835518032,
0.1390640289,
-0.0544176027,
0.2079623491,
-0.0026002661,
-0.2688751817,
0.1545751393,
0.0909160674,
0.1372507066,
-0.1643724889,
0.0725011602,
0.0128596378,
-0.0502960272,
-0.0006514273,
-0.2077046186,
0.2996354699,
-0.016824048,
0.1648654193,
-0.0320594721,
-0.1578760445,
0.3023851216,
0.6914595366,
-0.1512019187,
-0.0364848897,
0.0953301489,
0.016868189,
0.3420288861,
0.0187350102,
0.1816220433,
0.5679466724,
0.0848256648,
-0.3281464875,
-0.0055454085,
0.0921958908,
0.1986771077,
-0.3963280022,
-0.0232436471,
-0.2978693843,
0.1098675355,
0.0510893092,
-0.2207344472,
0.2528724372,
-0.1529621631,
0.1644691974,
0.0812318474,
-0.2304655463,
-0.2184699029,
0.0326978862,
-0.4425132275,
-0.2420795709,
0.2558957338,
-0.1108558252,
0.295488596,
0.1164970323,
-0.204753086,
-0.1425511241,
-0.247147724,
0.0117644975,
0.4294538498,
-0.6151468754,
0.1111141518,
0.2049759179,
-0.1036673561,
0.0305259675,
0.398272723,
0.0723206699,
-0.0505543016,
-0.075185068,
-0.1825868487,
-0.2546254694,
0.0325338542,
-0.0457647815,
0.4078809023,
-0.029997291,
0.2271571159,
-0.1240516827,
-0.1573383808,
-0.35442698,
-0.0750735998,
-0.425121218,
0.2522546053,
0.1342235357,
0.3542678356,
-0.04057182,
-0.0353890099,
0.0837237015,
-0.065583989,
-0.0464522801,
-0.1373878121,
-0.3091200292,
0.1497507691,
0.0685370862,
-0.1972481161,
-0.0483177677,
0.2364222258,
-0.0852423161,
-0.007072235,
0.3630237281,
0.2377917618,
0.3187182844,
0.8635637164,
-0.0884639025,
0.2512857914,
0.0050875079,
-0.1277727485,
0.1021058559,
0.0536882542,
0.1734296232,
-0.0303519666,
-0.1872661114,
-0.0045389147,
-0.1407219768,
0.1538669467,
-0.2063363642,
-0.1397112906,
0.0252370238,
-0.2607498467,
0.284309417,
-0.0573383085,
0.3268591464,
0.1496069282,
-0.1952590495,
-0.2138919383,
0.2366319001,
0.2653482556,
-0.179970786,
0.0295335334,
0.265358597,
0.0234087408,
0.0868368447,
0.1953819543,
0.168320924,
0.0460222773,
0.0783970132,
-0.0725747719,
0.2347391546,
-0.2773815393,
0.1002286747,
0.3798259199,
-0.1474037915,
0.0760474503,
0.4589993656,
-0.1008724198,
0.1375336498,
0.3812129796,
-0.0973139033,
0.6287072301,
-0.2104887068,
0.3015150726,
-0.1653843075,
0.0593550242,
-0.0893737748,
0.2047701478,
-0.3985278904,
0.1160480902,
-0.0631503239,
0.3170562983,
-0.2719576955,
-0.2514202297,
0.1825873405,
0.3171637952,
-0.2034419626,
-0.3677090406,
-0.6252558231,
-0.0939053148,
-0.1328831166,
0.3004606664,
-0.1347047091,
-0.1321980357,
0.2144760936,
-0.0496289097,
-0.1165575609,
-0.3096381128,
-0.3505445421,
0.2089574188,
0.4235255718,
0.0082151387,
-0.0533898361,
0.1345664561,
0.1074736863,
0.2328765094,
-0.0599112064,
0.2295922637,
0.0902943313,
0.3245145082,
-0.0794226527,
-0.1306714714,
-0.1107169911,
-0.1173753217,
0.1408374906,
0.1603414565,
-0.030667834,
0.1941060424,
0.0937064812,
-0.157420814,
0.3419393599,
-0.0722275823,
0.4403964579,
-0.3386831284,
0.1590574384,
-0.1795816571,
-0.2903945744,
-0.2629449368,
-0.1401444376,
-0.0519085377,
0.3314606845,
-0.0606242605,
0.2896048725,
0.1731744856,
-0.1960676312,
0.0994277522,
0.2572847605,
0.3898848891,
0.0960831493,
-0.0798739791,
-0.1623770893,
-0.028262591,
-0.8415148258,
-0.0190443024,
-0.0237927604,
-0.0034849795,
0.2146438062,
0.0383531339,
-0.2455153018,
-0.2468421608,
-0.0246144999,
-0.0062903692,
0.1036542952,
0.0396054499,
-0.0095445747,
0.0344997756,
-0.2680268586,
-0.0806603953,
0.1091818362,
-0.0008419625,
0.0605219267,
-0.1485962868,
-0.0186842382,
-0.096173428,
0.3204782903,
-0.1085053384,
0.1731997728,
0.1230696738,
-0.0154405693,
0.3519542515,
0.2310050577,
-0.0790177062,
-0.3477728367,
0.1440772712,
-0.477694571,
-0.0361928493,
-0.2247152776,
0.3466449976,
0.0888937935,
-0.2870791852,
-0.0480910763,
0.1668857783,
0.077395089,
-0.0106210019,
-0.5227888823,
0.2769579291,
-0.1839485466,
0.1439636946,
0.2457567006,
0.1054012701,
0.1986222267,
-0.1199089065,
-0.3376211524,
-0.296792537,
0.426744163,
-0.3606745899,
-0.0565034151,
0.0524060838,
0.3034642041,
0.4309639335,
-0.3343272209,
-0.9000046253,
-0.0720250979,
0.2416549623,
-0.1272199899,
-0.4244158864,
0.2112103105,
0.2320235521,
0.0909487531,
-0.1002704427,
0.0472114794,
0.3323103487,
0.0538823642,
0.3208735883,
-0.4091674984
] |
https://github.com/huggingface/datasets/issues/2272 | Bug in Dataset.class_encode_column | This has been fixed in this commit: https://github.com/huggingface/datasets/pull/2254/commits/88676c930216cd4cc31741b99827b477d2b46cb6
It was introduced in #2246 : using map with `input_columns` doesn't return the other columns anymore | ## Describe the bug
All the rest of the columns except the one passed to `Dataset.class_encode_column` are discarded.
## Expected results
All the original columns should be kept.
This needs regression tests.
| 24 | Bug in Dataset.class_encode_column
## Describe the bug
All the rest of the columns except the one passed to `Dataset.class_encode_column` are discarded.
## Expected results
All the original columns should be kept.
This needs regression tests.
This has been fixed in this commit: https://github.com/huggingface/datasets/pull/2254/commits/88676c930216cd4cc31741b99827b477d2b46cb6
It was introduced in #2246 : using map with `input_columns` doesn't return the other columns anymore | [
-0.0357848555,
-0.1575218588,
-0.086810872,
0.2376332879,
0.5289871693,
0.1175257117,
0.5686453581,
0.370449245,
0.2597453296,
0.1947686523,
-0.1332873255,
0.5430199504,
0.0994263291,
0.3341945708,
0.0166780986,
-0.1077984795,
0.1042394713,
0.1556780934,
-0.5332589149,
-0.2485718578,
-0.3539147675,
0.1785126925,
-0.1895941347,
0.0363143012,
-0.0856324062,
0.2268484235,
-0.0752513781,
0.0718288198,
-0.1968087405,
0.0467564128,
0.2146318257,
-0.165952161,
-0.1237035319,
0.0771570578,
-0.0000990271,
0.0114662368,
0.0859175622,
-0.0091560585,
-0.1566772163,
0.0474113114,
-0.1982409209,
-0.0677878261,
-0.0882980898,
-0.2672232687,
-0.1891157925,
-0.2229384631,
-0.1765221655,
-0.2252687216,
0.1340980083,
0.0211988725,
0.3522589207,
0.2214997858,
-0.1476596892,
-0.0600136928,
0.2655743957,
0.2174870372,
-0.063218765,
-0.1774148196,
0.0207800549,
-0.0078307716,
-0.0524010845,
0.4466291368,
0.020963911,
-0.1336337775,
-0.0051343883,
0.2034533322,
-0.0406313539,
-0.030332664,
0.3821030259,
0.1162569895,
0.2409493178,
-0.0864885598,
-0.175010711,
-0.2274490595,
0.034863364,
-0.2414518297,
0.1153323278,
-0.093109414,
0.1492735445,
0.1759851128,
-0.3822606802,
-0.0089523941,
-0.097089,
0.1939302236,
-0.2835182548,
0.1710605919,
-0.2821825743,
0.0852565691,
0.0107296724,
0.0057513174,
-0.2462014109,
-0.1706468612,
-0.0102344947,
0.1799634844,
-0.0588389449,
-0.2139725685,
0.0842073485,
0.1627873182,
0.2372649014,
-0.1169939712,
-0.0369560644,
0.2024583071,
-0.0170687512,
0.1216712147,
0.3319072127,
0.1637549847,
0.1191613153,
0.3312910795,
0.2741266787,
0.0048443028,
0.0452919081,
-0.1319954544,
0.3326645195,
0.2048239857,
0.0835307315,
-0.1131554618,
0.0843300968,
-0.2055879533,
-0.1399457753,
0.1899603903,
0.0204545353,
-0.0261587147,
-0.0671981871,
0.3910750151,
0.0939426348,
0.1522227079,
0.0091074361,
0.1897300631,
0.0487882756,
-0.1829744279,
-0.4172065854,
-0.0833830163,
-0.161706984,
-0.1496148109,
0.0571540706,
-0.0215364434,
0.3924635351,
0.2146306485,
-0.1008043215,
-0.0021818599,
-0.1540980041,
-0.0079121478,
0.4681973457,
0.0567120574,
-0.1498759687,
0.2009752989,
0.1821886748,
-0.2645999789,
0.0076707178,
-0.0745367482,
-0.1921507418,
-0.0650474504,
-0.1382557154,
0.3105874062,
0.0283276979,
0.1095167696,
-0.1155268848,
0.2912955284,
0.3388135433,
-0.1750130504,
0.1155869961,
-0.3287631273,
-0.2149405926,
-0.1349685043,
0.1861958951,
0.0695463941,
-0.2191280574,
-0.2320273072,
0.3701493442,
-0.120219864,
0.0886878073,
0.2754110694,
-0.1826442033,
-0.0655732602,
-0.1955094337,
0.2797733843,
0.1806041449,
-0.0834464431,
-0.4100649357,
0.180607751,
0.097192362,
0.0853631869,
-0.1506410241,
-0.0745889172,
0.2699153125,
-0.0252983756,
0.0880026147,
0.108219333,
0.0613477789,
0.1780363917,
-0.1506054699,
-0.0585444048,
0.1019944996,
-0.1354886591,
-0.0785998926,
0.1987274736,
0.1226851717,
-0.1103496403,
0.3551039398,
-0.2854624391,
0.1658903211,
0.2804604471,
0.0421768017,
-0.1347811669,
0.0597589724,
-0.2607403994,
-0.4284385145,
-0.0199492387,
0.204256013,
-0.142326355,
-0.1081604809,
-0.3205407858,
-0.2251670361,
-0.0325765237,
-0.1822500974,
0.0456579402,
0.2556367517,
0.0194956306,
0.0197299719,
0.0542695224,
-0.2197065949,
0.1615280807,
-0.2340632975,
0.058901865,
-0.4512904286,
0.1625321209,
0.0268573593,
0.0533037372,
-0.0592216514,
0.2286076099,
0.1907046139,
-0.1196360886,
0.0058783996,
0.1681662947,
-0.2004976273,
0.1012767702,
-0.2552151382,
0.0251860488,
0.243562758,
0.0634227619,
-0.0079601444,
-0.1525688469,
0.1898520142,
-0.0640748888,
-0.3242455125,
0.3277553916,
0.1052787006,
0.0502939448,
0.0834905952,
-0.035651058,
0.0753536895,
-0.1134135276,
-0.2598538101,
-0.4904221296,
-0.1066017449,
-0.1074670926,
-0.0115831085,
0.0517562367,
-0.3236915171,
0.140230149,
0.9188792109,
-0.062341962,
-0.0147716422,
-0.0939870402,
-0.3445655107,
0.0729152262,
0.1259704083,
0.3295140564,
0.3965093493,
0.2283823937,
0.2659600079,
0.0557787493,
-0.1804531813,
-0.0716969967,
0.2371601462,
0.0097748563,
-0.0305779222,
0.2169625014,
0.2506073415,
-0.0417708531,
-0.5560483932,
0.404853493,
0.090583466,
0.0257222857,
-0.3956531286,
0.0577438772,
-0.5252431631,
-0.0719339028,
0.0748951957,
-0.0868827328,
0.16107741,
-0.4229639769,
0.0589338057,
0.0997524709,
-0.4003639519,
0.1637861133,
-0.0271167643,
-0.0133933462,
0.0148534374,
0.0539086908,
-0.1009223387,
-0.1556566209,
-0.0931529254,
0.1648464501,
-0.0498676933,
-0.1709077358,
0.1399346739,
-0.050037995,
-0.2620825768,
-0.2865417004,
-0.4427244067,
0.2523184717,
-0.304839462,
0.0588298216,
0.107653819,
0.1922371835,
-0.3203524053,
0.0516176894,
0.3080894053,
-0.1982467026,
-0.3238243759,
0.1872301996,
0.180166617,
-0.1789223254,
-0.3981726766,
-0.497164011,
0.1300307512,
-0.1350487769,
0.1815884262,
-0.1555294693,
-0.0630831942,
0.0275857691,
0.0029284852,
0.0385404229,
-0.3008103669,
0.0293904413,
-0.6573467851,
-0.2217814177,
0.3632724583,
-0.2966221273,
-0.5062742233,
-0.1254555136,
0.0979086682,
0.1011654586,
0.0171905179,
-0.3091309369,
-0.3677558899,
-0.083221592,
0.1842754036,
-0.0637967587,
0.2143396586,
0.3514961004,
-0.0061681969,
-0.1157656759,
-0.1629764289,
-0.1138974726,
0.1560920924,
0.2188878953,
0.0149243698,
-0.2122608125,
0.490907073,
0.1053587645,
0.2070962787,
0.2912398577,
0.0119976448,
0.2866947651,
-0.0825412124,
0.536016047,
-0.1932148933,
-0.2198104411,
0.1119848415,
-0.298748672,
0.2717894018,
0.2111549973,
0.0109975031,
-0.1812852174,
0.0832054392,
0.2468914241,
-0.0337270163,
-0.3023666739,
0.0729222,
0.1730726659,
0.0819154084,
0.3885634542,
0.2997321784,
-0.0978400037,
-0.0457864739,
0.1973556429,
-0.2071417719,
0.0532041714,
-0.1990229934,
-0.55464077,
-0.1234232038,
-0.4953660667,
0.2916840613,
0.046814125,
0.0535963699,
-0.0667382255,
-0.3529547155,
0.0443252809,
0.1029574126,
0.4472456276,
-0.2107108682,
-0.1056636646,
-0.009387671,
0.0204987004,
-0.30861938,
-0.0045579053,
-0.2849850655,
0.0043290453,
0.1969815046,
0.5901808739,
-0.3379149437,
-0.1179241389,
0.4202679396,
0.1328514665,
-0.1366239041,
0.0133242197,
-0.1167634726,
-0.2524289489,
-0.1269264817,
-0.0232579727,
0.2281380594,
0.1141955554,
-0.1179246902,
-0.3082922995,
0.0313450359,
-0.2168825865,
0.0741275921,
0.181999892,
0.2910560668,
0.0874122828,
0.1533722728,
0.0328695886,
0.2015521079,
-0.0967385396,
0.4839465618,
-0.1953887641,
-0.1645175666,
0.1696026474,
-0.3728144467,
0.3802329302,
0.3001915216,
-0.0873068646,
0.0630681664,
-0.0684942454,
-0.0157055687,
-0.218679294,
-0.0503549799,
0.471047461,
0.1342892647,
-0.0705213621,
-0.2062289268,
0.2522027791,
-0.1254612356,
-0.1417610645,
0.2963752449,
0.2017963976,
-0.3386614919,
0.2593963742,
0.0027739045,
0.6919939518,
0.0131437071,
0.143987298,
0.135521546,
-0.0851735994,
0.2800985277,
0.005868007,
0.1299840212,
-0.3186069131,
-0.409524411,
0.0413689874,
0.1173002645,
0.259893924,
0.0215867944,
-0.0184925497,
0.1189652383,
0.0529272929,
0.5219534636,
-0.1091253087,
-0.1962878704,
0.0781305656,
-0.2820718288,
-0.2800423205,
0.2990986109,
0.1022767723,
-0.1271911114,
0.1078757718,
0.0645867884,
0.0232881475,
-0.2749245763,
0.0634105876,
0.1309595108,
-0.0393983312,
0.1502909809,
0.2416625768,
-0.3254871964,
-0.0723648295,
0.3597698212,
0.3453974128,
0.1163041294,
0.0017101967,
0.012428361,
0.0512766205,
0.4156192243,
-0.0058010784,
0.1373182386,
0.1973050386,
0.0137810288,
-0.0776173845,
0.1323336512,
0.0666215494,
-0.0871183947,
-0.1424060166,
0.0675828233,
0.0647136346,
-0.543912828,
-0.0392957963,
-0.0201064963,
0.3515426219,
-0.4296717942,
0.2250391692,
0.0568186045,
-0.1846996844,
0.3039201796,
0.3186174929,
-0.2402117401,
-0.1534904093,
0.4318380952,
0.0366683193,
0.1157803088,
0.4951032102,
-0.0813175216,
-0.2604907751,
-0.2637656629,
0.0334140286,
0.3343141973,
-0.2594817877,
-0.0055012349,
-0.1497612149,
-0.0482239872,
-0.0830148458,
0.1514921486,
-0.2278900146,
-0.0814111084,
-0.1304173917,
-0.1993329227,
-0.3260847628,
0.1621862501,
0.139248386,
0.2407765836,
0.1289317906,
-0.0627675056,
-0.2677090168,
0.1025728658,
-0.4605871439,
-0.0582604297,
-0.0802954137,
0.2680491507,
0.3867274225,
0.0230647828,
0.19320485,
-0.2736715972,
0.3206255734,
0.3222123981,
-0.0779008567,
-0.371876657,
-0.2599532604,
0.045859836,
0.1076993868,
0.1018247455,
-0.0309772417,
0.0240450278,
-0.2011662275,
-0.3315498233,
0.3971152902,
0.0532396734,
0.0873996392,
0.3024342954,
-0.0863987207,
0.0604440868,
0.2415836602,
-0.0798691511,
-0.0203664117,
-0.0690583959,
0.0304767936,
-0.0131826093,
-0.0466160402,
0.0655994713,
0.0671438649,
0.0691491738,
0.0119934492,
0.0322478637,
0.5499173403,
-0.301333487,
0.0264210943,
0.2025973499,
0.2565911114,
-0.0716707408,
-0.3626752794,
0.0013687393,
0.1364885569,
0.3815194666,
-0.3571910262,
-0.1150802448,
0.407530576,
0.1416531652,
0.1356966048,
0.1534599811,
0.1509611309,
-0.0615383163,
0.3127653301,
0.0162294563,
0.1870699674,
-0.1838772893,
0.121073775,
0.3842481375,
-0.0590950586,
0.1473534554,
0.3182504177,
0.2877360284,
-0.0495941155,
0.2911368906,
0.0663148239,
-0.0297496989,
-0.1791936457,
0.2915978432,
-0.0968021527,
-0.2994913757,
0.3273139,
0.1368471235,
-0.2408308983,
0.3581096828,
0.1708301157,
0.2096783221,
-0.1921669543,
-0.2833563983,
-0.2604631186,
0.3138658702,
-0.4095667005,
-0.2418337911,
-0.1223419309,
-0.1359011829,
0.0042577516,
0.1382556707,
-0.1698544174,
-0.0716610402,
0.4369073808,
-0.0963118225,
-0.1244531199,
-0.2713048756,
-0.0526377112,
-0.1426901668,
0.2615812421,
0.0010814023,
0.2203296125,
-0.0193683319,
0.0602741838,
0.1005867645,
0.0835647956,
-0.0154712284,
-0.1095957458,
0.2074825764,
0.142990768,
-0.1010164842,
-0.2637553513,
-0.0882176831,
0.3772136569,
0.1925726086,
0.0887079909,
0.2937476933,
0.2467879951,
-0.2389925271,
-0.0411043502,
0.1555910408,
0.4759062231,
-0.242993921,
0.2295662761,
-0.1152865589,
-0.3539078832,
-0.1549539417,
-0.3295598924,
-0.1710231602,
0.0375800841,
0.1887457222,
0.0451498516,
0.3476091325,
-0.1241080314,
0.1588978469,
0.2408938408,
0.1669631153,
0.0467540212,
-0.4708094895,
-0.1284576803,
-0.2433346659,
-0.5270624757,
-0.0078692827,
0.0818514004,
-0.0226911027,
-0.1237666905,
0.1700598896,
0.4372746646,
-0.0557211414,
0.1674907655,
-0.2988939285,
0.0277435146,
-0.0554370247,
-0.138186872,
-0.2429215759,
-0.0012603081,
-0.0526818298,
0.0943693295,
-0.2242775112,
0.180094704,
0.1935570389,
0.1312590837,
-0.1239114627,
0.356521517,
-0.5263639688,
-0.303145349,
0.1618175805,
0.3016985655,
0.0715800002,
-0.2473288178,
-0.0058234259,
-0.0275594294,
-0.1512510031,
-0.0774735659,
0.2821400464,
-0.1465467215,
0.3806610703,
-0.0500937924,
-0.3484110236,
-0.0685105845,
0.1027242094,
0.2090616971,
-0.0204188097,
-0.2849868834,
0.3154357374,
-0.0171894059,
-0.1848484278,
0.0949904695,
0.227932781,
-0.0925655589,
0.0231070798,
0.0586346351,
-0.4211030006,
0.4729936719,
-0.4269505441,
-0.3738432229,
0.070997715,
0.1301803142,
0.1701502204,
-0.2235271931,
-0.6250747442,
-0.0060522584,
0.1710982472,
-0.337954849,
-0.1425620168,
0.3280801475,
-0.1809661984,
0.1133664474,
-0.1432527602,
0.4612305164,
0.243623361,
-0.2658311725,
0.2238109857,
-0.2294273525
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | I'm not able to reproduce this, do you think you can provide a code that creates a DatasetDict that has this issue when saving and reloading ? | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 27 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
I'm not able to reproduce this, do you think you can provide a code that creates a DatasetDict that has this issue when saving and reloading ? | [
-0.1946798712,
0.1140981093,
-0.0127639389,
0.2849428952,
0.0645920932,
-0.0614171587,
0.1323401183,
0.4565899968,
0.442237556,
0.1792287529,
0.2358966023,
0.3808514178,
0.054587096,
-0.05616818,
-0.1504479647,
-0.0622489341,
0.2574025393,
0.136252284,
0.0472621433,
0.1269329637,
-0.1914964318,
0.2465308011,
-0.1496891379,
-0.0032421583,
-0.1896000206,
0.1437866241,
-0.2581940293,
0.2942799926,
-0.3553466201,
-0.6636257172,
0.2940475643,
0.4080143869,
0.3425829411,
0.5095261931,
-0.0001234102,
0.0544173941,
0.2841651738,
-0.2096642256,
-0.4484793842,
-0.4640179574,
-0.1993896812,
0.0136944205,
0.2473115623,
-0.1567813158,
0.174591288,
-0.0732850209,
-0.0321102738,
-0.4220353365,
0.1694841236,
0.3417607844,
0.1407152265,
0.2266558558,
0.2764905095,
-0.2219139189,
-0.2547796667,
0.3302723467,
-0.0204170104,
0.4828839004,
-0.0186927896,
0.0731686205,
0.0414441563,
0.0742254928,
-0.0195429288,
-0.1017796472,
0.0939251706,
-0.0247307979,
0.162042737,
-0.0513425767,
0.2408140153,
0.197995007,
0.6499521136,
-0.2013997138,
-0.534201324,
0.0352449156,
-0.0611303896,
0.1786230356,
0.3324406743,
-0.0698242337,
0.0839633867,
0.3244956434,
-0.0997816473,
-0.3653491139,
-0.2351392806,
-0.1203215122,
0.0710188225,
-0.287763983,
-0.0193997044,
0.1131957099,
-0.0397094972,
0.0214459822,
0.4245888591,
-0.3535502553,
-0.3489907086,
-0.1019977629,
-0.0459271818,
-0.1144010127,
-0.0653346181,
-0.2706742883,
0.1133465171,
-0.0720995665,
0.2517627776,
0.131618768,
-0.0391714089,
0.0602462813,
0.2115241885,
0.2749888003,
0.419895798,
0.2743374705,
0.0357514843,
0.0714353248,
-0.235752672,
0.0838927999,
-0.0404099002,
-0.1516602337,
0.2088323236,
-0.135804221,
0.5703294277,
-0.4004870951,
-0.327416718,
0.2602044344,
-0.2743054032,
-0.1729609519,
-0.1039799303,
0.224031508,
0.0932792798,
0.1972418875,
0.1087380424,
0.3317793012,
0.0468950532,
0.0277813338,
-0.1801335216,
0.0353041962,
0.0400687456,
0.0117863091,
0.0179786552,
-0.0999572352,
0.2674607337,
0.0151782874,
-0.4577177763,
-0.1766548753,
-0.041361697,
-0.0473277904,
0.2514304221,
0.0383212455,
-0.2181575745,
-0.0566826351,
0.2363060415,
0.1263003945,
-0.2239947766,
0.2120422423,
0.0718439743,
-0.1589060724,
-0.1686420292,
0.122803703,
-0.3944000304,
-0.2602536976,
-0.2819336653,
-0.049399931,
-0.0836641267,
-0.292011559,
-0.1123726964,
-0.3287757933,
-0.2373555899,
-0.1225716174,
0.1428988278,
0.4307117462,
-0.5336276293,
0.1942442358,
0.1860764325,
-0.0290213171,
0.0966062844,
-0.0230779666,
0.0003094772,
0.1380226612,
-0.1793206632,
0.1278737187,
0.4110459387,
-0.5454350114,
-0.6159434915,
0.307710737,
-0.0049892385,
0.178205654,
-0.143765524,
-0.0217470154,
0.2127342671,
-0.0530061163,
0.0544379428,
0.058972992,
0.0534363724,
-0.0575244129,
-0.4947074354,
-0.3328706622,
0.1166522875,
-0.0132596549,
-0.0556113198,
0.0919377655,
0.1581819952,
-0.2094931006,
0.4844790101,
-0.0858411267,
-0.181254819,
0.117009148,
0.4515590072,
-0.0738891661,
0.0274726059,
-0.2316354364,
-0.5508968234,
0.4312417209,
0.0377285816,
-0.0222507119,
-0.0489410758,
0.0583774969,
-0.4379800856,
0.120342955,
-0.3182471991,
0.0465112254,
0.0106165716,
0.0783770531,
-0.086695008,
-0.0088238586,
-0.1149403974,
0.1405706555,
-0.1519618928,
0.0698583126,
0.0043585836,
0.336599499,
-0.2037378699,
-0.2205162942,
0.1709298939,
-0.0127888909,
0.2898364067,
-0.2678135633,
-0.3201780319,
0.4959191084,
0.2282749563,
0.0215912238,
-0.070414409,
-0.3370972276,
-0.0950707942,
-0.0260215867,
0.1928252727,
0.4983446002,
0.0574059859,
0.0559965968,
-0.2572027743,
0.313872993,
0.0657231659,
0.0568129458,
0.0700780228,
0.1781900078,
0.2946606874,
-0.0244198665,
-0.0170400627,
-0.3440819085,
0.2174295038,
0.0188178886,
0.0102336649,
0.0753729269,
-0.1335323602,
0.1482352018,
0.2589493394,
0.03663899,
0.1828769743,
0.0873258486,
0.0021231272,
-0.4102319181,
0.0591993183,
0.3296464086,
0.6812978983,
-0.0120211225,
-0.0898987651,
-0.054286655,
-0.0393865965,
0.0392725915,
0.1494915634,
-0.0172952209,
0.2711468935,
0.1783985794,
0.1901721507,
0.0689663589,
-0.2123125792,
-0.1901511103,
-0.0073721735,
0.0510644764,
-0.3820842803,
0.1315277815,
-0.1379305422,
0.5604394078,
-0.204323858,
-0.5258819461,
-0.0548609793,
-0.3896037638,
-0.1108690575,
0.398245275,
-0.1051945686,
0.0420945138,
-0.5863330364,
0.042864535,
-0.0554990843,
-0.3256076574,
-0.111346975,
-0.1961997896,
-0.1263738126,
-0.1553941816,
0.1137431711,
0.1928959787,
0.2179136872,
-0.1094703227,
-0.1682272851,
-0.4347152114,
-0.3339815438,
0.1541958898,
-0.1012641639,
0.0506950803,
0.1850075573,
-0.0659799874,
0.1797928065,
-0.0064854873,
0.0098092705,
-0.1555845588,
-0.3324505985,
0.1918927878,
0.2623600066,
-0.1795148998,
0.0405302197,
-0.4744687974,
-0.3170478642,
-0.3201008439,
0.2410696298,
-0.0716329366,
0.0295917504,
0.0510346889,
0.1749563366,
0.1524556279,
0.0156617388,
0.1022228748,
-0.0204778947,
-0.1949144155,
0.1171748936,
-0.0141774565,
-0.4500835538,
0.1088245362,
0.0357693359,
0.1472650766,
0.2089918554,
-0.2778181732,
-0.1442973167,
0.004704115,
0.4145680368,
-0.0329650082,
-0.2965222895,
0.4994247258,
0.3355879486,
0.0297882371,
-0.1571242958,
-0.0598419234,
0.1395886987,
0.0997575372,
0.2127372175,
-0.3571591079,
0.4544909,
-0.3967373073,
0.2623893917,
-0.0561213158,
-0.1933417618,
0.2192242146,
0.1355141997,
0.3633718491,
-0.4195736647,
-0.2501193881,
-0.01812106,
-0.2273001671,
-0.1420903653,
0.0491865203,
-0.1898751557,
0.3078674972,
-0.0113016721,
-0.2713411748,
-0.1212769002,
-0.3088131249,
-0.0883087218,
-0.6213800311,
0.2525453568,
0.1294980794,
0.2512167692,
-0.1520728767,
0.0570482425,
0.0548919849,
0.1056846231,
0.3619897366,
-0.1298970431,
-0.6689379811,
0.411916554,
-0.2728249133,
0.3531418741,
0.0170026887,
0.6950644255,
0.0251038447,
-0.1877916455,
-0.0740117133,
-0.0956238508,
0.3716633916,
0.1301262677,
0.0777471289,
0.1875229478,
-0.1503265351,
-0.6920769811,
-0.1083946675,
0.0503960289,
0.3830848634,
0.1262310445,
0.3629611135,
-0.0177810229,
-0.1991338581,
0.2198235393,
0.3881292641,
-0.1670642197,
-0.2743763328,
-0.2853178084,
-0.13652426,
-0.1515444368,
-0.2810797095,
-0.041963011,
0.2196072191,
-0.2597108781,
-0.0625312626,
-0.5216526985,
-0.315872997,
0.064146705,
0.1999334395,
0.4470638037,
-0.3979620636,
0.2182788253,
0.2503278553,
0.1697054803,
0.5388916135,
0.4505365193,
-0.0512384288,
-0.4795736969,
-0.0396612473,
-0.1913184375,
0.0461553857,
0.0478833839,
-0.0462604277,
-0.1848696172,
0.0630237982,
-0.2803145647,
-0.30861938,
0.0911357552,
0.0995179191,
0.0440455303,
-0.3165180087,
-0.177135691,
0.5262102485,
-0.097721599,
-0.130151853,
0.4414814413,
0.3330864906,
-0.2364698499,
0.5683749914,
-0.0350576341,
0.6247900724,
0.2005380392,
0.1264471561,
0.2727006078,
-0.5154504776,
0.0626661032,
0.5921404362,
0.0294375382,
-0.5868449807,
-0.1553602219,
0.0331250355,
-0.1253828406,
0.0326823071,
0.0368703566,
-0.3613361716,
0.0716336071,
0.0084463097,
-0.2822271585,
0.1183372959,
0.3593578935,
-0.2079014778,
0.1589397788,
-0.3033197224,
0.0912196711,
0.1137901545,
0.103031002,
-0.0877371132,
-0.0660761669,
-0.1419516206,
-0.3079770207,
-0.1325311363,
0.2350481749,
-0.1199391708,
0.4439125955,
0.2897054553,
-0.449318707,
0.2196411937,
0.2174479812,
0.4070449769,
-0.0582862757,
-0.1289932281,
-0.0443206429,
-0.2538411915,
-0.0569628701,
0.2750827968,
-0.0208603349,
0.2357587963,
0.0243199393,
-0.2413083613,
0.0149238873,
-0.2202430367,
-0.3488710821,
-0.213655293,
-0.0252610818,
0.0917009935,
-0.4033418298,
-0.5704159141,
-0.3656395972,
-0.1338037997,
-0.3513586223,
0.0451620221,
0.1369813681,
0.0903127491,
0.134551242,
-0.0303703006,
-0.372788012,
0.1286839843,
0.4785130024,
-0.1395130306,
-0.2365070581,
0.5704624057,
-0.0664496273,
0.116396755,
-0.2200825214,
0.1668682098,
0.2937473655,
-0.2160446197,
0.4291680753,
-0.2352194637,
-0.1053846702,
-0.0334324948,
0.5656460524,
0.1970899254,
-0.1196104214,
0.0568215773,
-0.295288831,
-0.3237190843,
0.137645483,
-0.0380470976,
0.4634031355,
-0.0172830559,
-0.307499975,
-0.2098487467,
0.1128286645,
-0.2028449327,
0.0374975838,
0.0159998834,
0.0449075662,
0.1605367512,
-0.0462055132,
0.1810540855,
-0.3117863834,
0.0975407809,
-0.1628717184,
0.0355670936,
-0.0206246674,
-0.2262711525,
0.1717493683,
0.14305152,
0.2631169856,
-0.0958965495,
-0.139329195,
0.0043118098,
-0.0736730546,
-0.0378092974,
0.3947651088,
-0.1223444268,
0.2778863311,
0.0895343423,
0.2064660192,
-0.1312057674,
0.2292111665,
0.0644207522,
0.3075908422,
-0.0757780448,
0.2196434289,
-0.0794220939,
-0.0892365426,
-0.2326029688,
0.1826040596,
0.0293286052,
0.0955829844,
0.1823246926,
-0.1802758873,
-0.0411883369,
0.1104305834,
0.2567686141,
0.5237183571,
-0.1497171223,
-0.2371405512,
-0.0213248394,
0.1600281447,
-0.1601504534,
-0.2017438859,
0.3003623188,
-0.0835294053,
-0.1162904948,
-0.0765225291,
-0.205495894,
-0.1942750216,
-0.1985164732,
0.3335353434,
0.5401271582,
-0.0722698495,
0.2756747603,
0.1050365493,
-0.1331187338,
0.169813931,
0.4339621961,
-0.0268716253,
0.2728073001,
0.2969135046,
-0.0106995478,
0.4752704799,
0.108137764,
0.1763005108,
0.1444734186,
0.0295524988,
0.0501387119,
-0.238372907,
0.03397559,
0.0337766744,
0.0379040577,
0.2074879557,
-0.5338288546,
-0.0095715988,
-0.0529128946,
-0.3925667703,
-0.0503621623,
-0.2166735679,
-0.2375060618,
-0.1166065633,
0.191665411,
-0.0871483237,
-0.1870366931,
0.2569026053,
0.1854578406,
0.1341339499,
-0.1262690872,
-0.1991170049,
0.2447043359,
0.1286831796,
-0.1152324826,
-0.2423138916,
0.1165309548,
0.0655256361,
-0.0270041265,
0.284368515,
0.3048304617,
0.5131983757,
0.4630437791,
-0.123553589,
-0.0936734006,
-0.0676188618,
-0.089074485,
0.1606598645,
0.1176436841,
-0.22886917,
0.141987443,
0.3497955203,
0.1042523459,
0.0525658727,
0.3554262221,
0.1828851551,
0.2552398145,
-0.0793650076,
0.817486167,
0.0652649775,
-0.4018479288,
0.1853941679,
0.2061249614,
-0.0562277772,
-0.2423318028,
0.2547927499,
0.2379752398,
0.0354116485,
0.0430994816,
0.0429510958,
-0.0761298165,
0.4061384797,
0.3945249617,
-0.0091296881,
-0.253089875,
0.2011502385,
-0.5567247272,
0.1267212629,
0.115067631,
-0.0242358465,
0.173558712,
0.1886161715,
0.17911762,
-0.0079986239,
0.1234042719,
0.3020168245,
-0.2655388713,
-0.0732756853,
-0.2039490789,
-0.0483579598,
0.1700233519,
-0.0384171866,
-0.0339168012,
-0.4353080988,
0.2317862958,
-0.2152295113,
-0.0408024602,
-0.1203105897,
-0.1444330364,
-0.0316802822,
-0.034360677,
0.4194565117,
0.128673628,
0.4079839587,
0.0496629253,
-0.4076710045,
-0.2884939611,
-0.1973597258,
-0.1579228193,
0.2628086805,
0.094848983,
0.638533771,
-0.0972696245,
0.0452129953,
-0.2792319059,
0.2594893873,
-0.1286928356,
-0.0773257166,
-0.2083821148,
0.1652529985,
0.1398075074,
0.0103356037,
0.2678920031,
0.1165604368,
-0.0676965341,
0.3758806586,
-0.3817227781,
-0.2833259106,
0.4406760633,
0.0210841522,
-0.1905984879,
-0.0162195619,
0.3005400896,
-0.0426340811,
-0.181629017,
-0.7152318954,
0.0028656013,
0.4155094624,
-0.0063178721,
-0.0824659243,
0.1022373289,
0.2898763716,
0.1865236759,
-0.0089992825,
0.5413075686,
-0.0108729852,
0.0113004725,
-0.0968638733,
-0.0729477182
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | Hi, I just ran into a similar error. Here is the minimal code to reproduce:
```python
from datasets import load_dataset, DatasetDict
ds = load_dataset('super_glue', 'multirc')
ds.save_to_disk('tempds')
ds = DatasetDict.load_from_disk('tempds')
```
```bash
Reusing dataset super_glue (/home/idahl/.cache/huggingface/datasets/super_glue/multirc/1.0.2/2fb163bca9085c1deb906aff20f00c242227ff704a4e8c9cfdfe820be3abfc83)
Traceback (most recent call last):
File "/home/idahl/eval-util-expl/multirc/tmp.py", line 7, in <module>
ds = DatasetDict.load_from_disk('tempds')
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/dataset_dict.py", line 710, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 687, in load_from_disk
return Dataset(
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 274, in __init__
raise ValueError(
ValueError: External features info don't match the dataset:
Got
{'answer': Value(dtype='string', id=None), 'idx': {'answer': Value(dtype='int32', id=None), 'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None)}, 'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}
with type
struct<answer: string, idx: struct<answer: int32, paragraph: int32, question: int32>, label: int64, paragraph: string, question: string>
but expected something like
{'answer': Value(dtype='string', id=None), 'idx': {'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None), 'answer': Value(dtype='int32', id=None)}, 'label': Value(dtype='int64', id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}
with type
struct<answer: string, idx: struct<paragraph: int32, question: int32, answer: int32>, label: int64, paragraph: string, question: string>
```
The non-matching part seems to be
`'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None),`
vs
`'label': Value(dtype='int64', id=None),`
And the order in the `<struct...` being different, which might cause the [features.type != inferred_features.type](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_dataset.py#L274) condition to become true and raise this ValueError.
I am using datasets version 1.6.2.
Edit: can confirm, this works without error in version 1.5.0 | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 226 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
Hi, I just ran into a similar error. Here is the minimal code to reproduce:
```python
from datasets import load_dataset, DatasetDict
ds = load_dataset('super_glue', 'multirc')
ds.save_to_disk('tempds')
ds = DatasetDict.load_from_disk('tempds')
```
```bash
Reusing dataset super_glue (/home/idahl/.cache/huggingface/datasets/super_glue/multirc/1.0.2/2fb163bca9085c1deb906aff20f00c242227ff704a4e8c9cfdfe820be3abfc83)
Traceback (most recent call last):
File "/home/idahl/eval-util-expl/multirc/tmp.py", line 7, in <module>
ds = DatasetDict.load_from_disk('tempds')
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/dataset_dict.py", line 710, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 687, in load_from_disk
return Dataset(
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 274, in __init__
raise ValueError(
ValueError: External features info don't match the dataset:
Got
{'answer': Value(dtype='string', id=None), 'idx': {'answer': Value(dtype='int32', id=None), 'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None)}, 'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}
with type
struct<answer: string, idx: struct<answer: int32, paragraph: int32, question: int32>, label: int64, paragraph: string, question: string>
but expected something like
{'answer': Value(dtype='string', id=None), 'idx': {'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None), 'answer': Value(dtype='int32', id=None)}, 'label': Value(dtype='int64', id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}
with type
struct<answer: string, idx: struct<paragraph: int32, question: int32, answer: int32>, label: int64, paragraph: string, question: string>
```
The non-matching part seems to be
`'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None),`
vs
`'label': Value(dtype='int64', id=None),`
And the order in the `<struct...` being different, which might cause the [features.type != inferred_features.type](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_dataset.py#L274) condition to become true and raise this ValueError.
I am using datasets version 1.6.2.
Edit: can confirm, this works without error in version 1.5.0 | [
-0.1946798712,
0.1140981093,
-0.0127639389,
0.2849428952,
0.0645920932,
-0.0614171587,
0.1323401183,
0.4565899968,
0.442237556,
0.1792287529,
0.2358966023,
0.3808514178,
0.054587096,
-0.05616818,
-0.1504479647,
-0.0622489341,
0.2574025393,
0.136252284,
0.0472621433,
0.1269329637,
-0.1914964318,
0.2465308011,
-0.1496891379,
-0.0032421583,
-0.1896000206,
0.1437866241,
-0.2581940293,
0.2942799926,
-0.3553466201,
-0.6636257172,
0.2940475643,
0.4080143869,
0.3425829411,
0.5095261931,
-0.0001234102,
0.0544173941,
0.2841651738,
-0.2096642256,
-0.4484793842,
-0.4640179574,
-0.1993896812,
0.0136944205,
0.2473115623,
-0.1567813158,
0.174591288,
-0.0732850209,
-0.0321102738,
-0.4220353365,
0.1694841236,
0.3417607844,
0.1407152265,
0.2266558558,
0.2764905095,
-0.2219139189,
-0.2547796667,
0.3302723467,
-0.0204170104,
0.4828839004,
-0.0186927896,
0.0731686205,
0.0414441563,
0.0742254928,
-0.0195429288,
-0.1017796472,
0.0939251706,
-0.0247307979,
0.162042737,
-0.0513425767,
0.2408140153,
0.197995007,
0.6499521136,
-0.2013997138,
-0.534201324,
0.0352449156,
-0.0611303896,
0.1786230356,
0.3324406743,
-0.0698242337,
0.0839633867,
0.3244956434,
-0.0997816473,
-0.3653491139,
-0.2351392806,
-0.1203215122,
0.0710188225,
-0.287763983,
-0.0193997044,
0.1131957099,
-0.0397094972,
0.0214459822,
0.4245888591,
-0.3535502553,
-0.3489907086,
-0.1019977629,
-0.0459271818,
-0.1144010127,
-0.0653346181,
-0.2706742883,
0.1133465171,
-0.0720995665,
0.2517627776,
0.131618768,
-0.0391714089,
0.0602462813,
0.2115241885,
0.2749888003,
0.419895798,
0.2743374705,
0.0357514843,
0.0714353248,
-0.235752672,
0.0838927999,
-0.0404099002,
-0.1516602337,
0.2088323236,
-0.135804221,
0.5703294277,
-0.4004870951,
-0.327416718,
0.2602044344,
-0.2743054032,
-0.1729609519,
-0.1039799303,
0.224031508,
0.0932792798,
0.1972418875,
0.1087380424,
0.3317793012,
0.0468950532,
0.0277813338,
-0.1801335216,
0.0353041962,
0.0400687456,
0.0117863091,
0.0179786552,
-0.0999572352,
0.2674607337,
0.0151782874,
-0.4577177763,
-0.1766548753,
-0.041361697,
-0.0473277904,
0.2514304221,
0.0383212455,
-0.2181575745,
-0.0566826351,
0.2363060415,
0.1263003945,
-0.2239947766,
0.2120422423,
0.0718439743,
-0.1589060724,
-0.1686420292,
0.122803703,
-0.3944000304,
-0.2602536976,
-0.2819336653,
-0.049399931,
-0.0836641267,
-0.292011559,
-0.1123726964,
-0.3287757933,
-0.2373555899,
-0.1225716174,
0.1428988278,
0.4307117462,
-0.5336276293,
0.1942442358,
0.1860764325,
-0.0290213171,
0.0966062844,
-0.0230779666,
0.0003094772,
0.1380226612,
-0.1793206632,
0.1278737187,
0.4110459387,
-0.5454350114,
-0.6159434915,
0.307710737,
-0.0049892385,
0.178205654,
-0.143765524,
-0.0217470154,
0.2127342671,
-0.0530061163,
0.0544379428,
0.058972992,
0.0534363724,
-0.0575244129,
-0.4947074354,
-0.3328706622,
0.1166522875,
-0.0132596549,
-0.0556113198,
0.0919377655,
0.1581819952,
-0.2094931006,
0.4844790101,
-0.0858411267,
-0.181254819,
0.117009148,
0.4515590072,
-0.0738891661,
0.0274726059,
-0.2316354364,
-0.5508968234,
0.4312417209,
0.0377285816,
-0.0222507119,
-0.0489410758,
0.0583774969,
-0.4379800856,
0.120342955,
-0.3182471991,
0.0465112254,
0.0106165716,
0.0783770531,
-0.086695008,
-0.0088238586,
-0.1149403974,
0.1405706555,
-0.1519618928,
0.0698583126,
0.0043585836,
0.336599499,
-0.2037378699,
-0.2205162942,
0.1709298939,
-0.0127888909,
0.2898364067,
-0.2678135633,
-0.3201780319,
0.4959191084,
0.2282749563,
0.0215912238,
-0.070414409,
-0.3370972276,
-0.0950707942,
-0.0260215867,
0.1928252727,
0.4983446002,
0.0574059859,
0.0559965968,
-0.2572027743,
0.313872993,
0.0657231659,
0.0568129458,
0.0700780228,
0.1781900078,
0.2946606874,
-0.0244198665,
-0.0170400627,
-0.3440819085,
0.2174295038,
0.0188178886,
0.0102336649,
0.0753729269,
-0.1335323602,
0.1482352018,
0.2589493394,
0.03663899,
0.1828769743,
0.0873258486,
0.0021231272,
-0.4102319181,
0.0591993183,
0.3296464086,
0.6812978983,
-0.0120211225,
-0.0898987651,
-0.054286655,
-0.0393865965,
0.0392725915,
0.1494915634,
-0.0172952209,
0.2711468935,
0.1783985794,
0.1901721507,
0.0689663589,
-0.2123125792,
-0.1901511103,
-0.0073721735,
0.0510644764,
-0.3820842803,
0.1315277815,
-0.1379305422,
0.5604394078,
-0.204323858,
-0.5258819461,
-0.0548609793,
-0.3896037638,
-0.1108690575,
0.398245275,
-0.1051945686,
0.0420945138,
-0.5863330364,
0.042864535,
-0.0554990843,
-0.3256076574,
-0.111346975,
-0.1961997896,
-0.1263738126,
-0.1553941816,
0.1137431711,
0.1928959787,
0.2179136872,
-0.1094703227,
-0.1682272851,
-0.4347152114,
-0.3339815438,
0.1541958898,
-0.1012641639,
0.0506950803,
0.1850075573,
-0.0659799874,
0.1797928065,
-0.0064854873,
0.0098092705,
-0.1555845588,
-0.3324505985,
0.1918927878,
0.2623600066,
-0.1795148998,
0.0405302197,
-0.4744687974,
-0.3170478642,
-0.3201008439,
0.2410696298,
-0.0716329366,
0.0295917504,
0.0510346889,
0.1749563366,
0.1524556279,
0.0156617388,
0.1022228748,
-0.0204778947,
-0.1949144155,
0.1171748936,
-0.0141774565,
-0.4500835538,
0.1088245362,
0.0357693359,
0.1472650766,
0.2089918554,
-0.2778181732,
-0.1442973167,
0.004704115,
0.4145680368,
-0.0329650082,
-0.2965222895,
0.4994247258,
0.3355879486,
0.0297882371,
-0.1571242958,
-0.0598419234,
0.1395886987,
0.0997575372,
0.2127372175,
-0.3571591079,
0.4544909,
-0.3967373073,
0.2623893917,
-0.0561213158,
-0.1933417618,
0.2192242146,
0.1355141997,
0.3633718491,
-0.4195736647,
-0.2501193881,
-0.01812106,
-0.2273001671,
-0.1420903653,
0.0491865203,
-0.1898751557,
0.3078674972,
-0.0113016721,
-0.2713411748,
-0.1212769002,
-0.3088131249,
-0.0883087218,
-0.6213800311,
0.2525453568,
0.1294980794,
0.2512167692,
-0.1520728767,
0.0570482425,
0.0548919849,
0.1056846231,
0.3619897366,
-0.1298970431,
-0.6689379811,
0.411916554,
-0.2728249133,
0.3531418741,
0.0170026887,
0.6950644255,
0.0251038447,
-0.1877916455,
-0.0740117133,
-0.0956238508,
0.3716633916,
0.1301262677,
0.0777471289,
0.1875229478,
-0.1503265351,
-0.6920769811,
-0.1083946675,
0.0503960289,
0.3830848634,
0.1262310445,
0.3629611135,
-0.0177810229,
-0.1991338581,
0.2198235393,
0.3881292641,
-0.1670642197,
-0.2743763328,
-0.2853178084,
-0.13652426,
-0.1515444368,
-0.2810797095,
-0.041963011,
0.2196072191,
-0.2597108781,
-0.0625312626,
-0.5216526985,
-0.315872997,
0.064146705,
0.1999334395,
0.4470638037,
-0.3979620636,
0.2182788253,
0.2503278553,
0.1697054803,
0.5388916135,
0.4505365193,
-0.0512384288,
-0.4795736969,
-0.0396612473,
-0.1913184375,
0.0461553857,
0.0478833839,
-0.0462604277,
-0.1848696172,
0.0630237982,
-0.2803145647,
-0.30861938,
0.0911357552,
0.0995179191,
0.0440455303,
-0.3165180087,
-0.177135691,
0.5262102485,
-0.097721599,
-0.130151853,
0.4414814413,
0.3330864906,
-0.2364698499,
0.5683749914,
-0.0350576341,
0.6247900724,
0.2005380392,
0.1264471561,
0.2727006078,
-0.5154504776,
0.0626661032,
0.5921404362,
0.0294375382,
-0.5868449807,
-0.1553602219,
0.0331250355,
-0.1253828406,
0.0326823071,
0.0368703566,
-0.3613361716,
0.0716336071,
0.0084463097,
-0.2822271585,
0.1183372959,
0.3593578935,
-0.2079014778,
0.1589397788,
-0.3033197224,
0.0912196711,
0.1137901545,
0.103031002,
-0.0877371132,
-0.0660761669,
-0.1419516206,
-0.3079770207,
-0.1325311363,
0.2350481749,
-0.1199391708,
0.4439125955,
0.2897054553,
-0.449318707,
0.2196411937,
0.2174479812,
0.4070449769,
-0.0582862757,
-0.1289932281,
-0.0443206429,
-0.2538411915,
-0.0569628701,
0.2750827968,
-0.0208603349,
0.2357587963,
0.0243199393,
-0.2413083613,
0.0149238873,
-0.2202430367,
-0.3488710821,
-0.213655293,
-0.0252610818,
0.0917009935,
-0.4033418298,
-0.5704159141,
-0.3656395972,
-0.1338037997,
-0.3513586223,
0.0451620221,
0.1369813681,
0.0903127491,
0.134551242,
-0.0303703006,
-0.372788012,
0.1286839843,
0.4785130024,
-0.1395130306,
-0.2365070581,
0.5704624057,
-0.0664496273,
0.116396755,
-0.2200825214,
0.1668682098,
0.2937473655,
-0.2160446197,
0.4291680753,
-0.2352194637,
-0.1053846702,
-0.0334324948,
0.5656460524,
0.1970899254,
-0.1196104214,
0.0568215773,
-0.295288831,
-0.3237190843,
0.137645483,
-0.0380470976,
0.4634031355,
-0.0172830559,
-0.307499975,
-0.2098487467,
0.1128286645,
-0.2028449327,
0.0374975838,
0.0159998834,
0.0449075662,
0.1605367512,
-0.0462055132,
0.1810540855,
-0.3117863834,
0.0975407809,
-0.1628717184,
0.0355670936,
-0.0206246674,
-0.2262711525,
0.1717493683,
0.14305152,
0.2631169856,
-0.0958965495,
-0.139329195,
0.0043118098,
-0.0736730546,
-0.0378092974,
0.3947651088,
-0.1223444268,
0.2778863311,
0.0895343423,
0.2064660192,
-0.1312057674,
0.2292111665,
0.0644207522,
0.3075908422,
-0.0757780448,
0.2196434289,
-0.0794220939,
-0.0892365426,
-0.2326029688,
0.1826040596,
0.0293286052,
0.0955829844,
0.1823246926,
-0.1802758873,
-0.0411883369,
0.1104305834,
0.2567686141,
0.5237183571,
-0.1497171223,
-0.2371405512,
-0.0213248394,
0.1600281447,
-0.1601504534,
-0.2017438859,
0.3003623188,
-0.0835294053,
-0.1162904948,
-0.0765225291,
-0.205495894,
-0.1942750216,
-0.1985164732,
0.3335353434,
0.5401271582,
-0.0722698495,
0.2756747603,
0.1050365493,
-0.1331187338,
0.169813931,
0.4339621961,
-0.0268716253,
0.2728073001,
0.2969135046,
-0.0106995478,
0.4752704799,
0.108137764,
0.1763005108,
0.1444734186,
0.0295524988,
0.0501387119,
-0.238372907,
0.03397559,
0.0337766744,
0.0379040577,
0.2074879557,
-0.5338288546,
-0.0095715988,
-0.0529128946,
-0.3925667703,
-0.0503621623,
-0.2166735679,
-0.2375060618,
-0.1166065633,
0.191665411,
-0.0871483237,
-0.1870366931,
0.2569026053,
0.1854578406,
0.1341339499,
-0.1262690872,
-0.1991170049,
0.2447043359,
0.1286831796,
-0.1152324826,
-0.2423138916,
0.1165309548,
0.0655256361,
-0.0270041265,
0.284368515,
0.3048304617,
0.5131983757,
0.4630437791,
-0.123553589,
-0.0936734006,
-0.0676188618,
-0.089074485,
0.1606598645,
0.1176436841,
-0.22886917,
0.141987443,
0.3497955203,
0.1042523459,
0.0525658727,
0.3554262221,
0.1828851551,
0.2552398145,
-0.0793650076,
0.817486167,
0.0652649775,
-0.4018479288,
0.1853941679,
0.2061249614,
-0.0562277772,
-0.2423318028,
0.2547927499,
0.2379752398,
0.0354116485,
0.0430994816,
0.0429510958,
-0.0761298165,
0.4061384797,
0.3945249617,
-0.0091296881,
-0.253089875,
0.2011502385,
-0.5567247272,
0.1267212629,
0.115067631,
-0.0242358465,
0.173558712,
0.1886161715,
0.17911762,
-0.0079986239,
0.1234042719,
0.3020168245,
-0.2655388713,
-0.0732756853,
-0.2039490789,
-0.0483579598,
0.1700233519,
-0.0384171866,
-0.0339168012,
-0.4353080988,
0.2317862958,
-0.2152295113,
-0.0408024602,
-0.1203105897,
-0.1444330364,
-0.0316802822,
-0.034360677,
0.4194565117,
0.128673628,
0.4079839587,
0.0496629253,
-0.4076710045,
-0.2884939611,
-0.1973597258,
-0.1579228193,
0.2628086805,
0.094848983,
0.638533771,
-0.0972696245,
0.0452129953,
-0.2792319059,
0.2594893873,
-0.1286928356,
-0.0773257166,
-0.2083821148,
0.1652529985,
0.1398075074,
0.0103356037,
0.2678920031,
0.1165604368,
-0.0676965341,
0.3758806586,
-0.3817227781,
-0.2833259106,
0.4406760633,
0.0210841522,
-0.1905984879,
-0.0162195619,
0.3005400896,
-0.0426340811,
-0.181629017,
-0.7152318954,
0.0028656013,
0.4155094624,
-0.0063178721,
-0.0824659243,
0.1022373289,
0.2898763716,
0.1865236759,
-0.0089992825,
0.5413075686,
-0.0108729852,
0.0113004725,
-0.0968638733,
-0.0729477182
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | My current workaround is to remove the idx feature:
```
from datasets import load_dataset, DatasetDict, Value
ds = load_dataset('super_glue', 'multirc')
ds = ds.remove_columns('idx')
ds.save_to_disk('tempds')
ds = DatasetDict.load_from_disk('tempds')
```
works. | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 29 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
My current workaround is to remove the idx feature:
```
from datasets import load_dataset, DatasetDict, Value
ds = load_dataset('super_glue', 'multirc')
ds = ds.remove_columns('idx')
ds.save_to_disk('tempds')
ds = DatasetDict.load_from_disk('tempds')
```
works. | [
-0.1946798712,
0.1140981093,
-0.0127639389,
0.2849428952,
0.0645920932,
-0.0614171587,
0.1323401183,
0.4565899968,
0.442237556,
0.1792287529,
0.2358966023,
0.3808514178,
0.054587096,
-0.05616818,
-0.1504479647,
-0.0622489341,
0.2574025393,
0.136252284,
0.0472621433,
0.1269329637,
-0.1914964318,
0.2465308011,
-0.1496891379,
-0.0032421583,
-0.1896000206,
0.1437866241,
-0.2581940293,
0.2942799926,
-0.3553466201,
-0.6636257172,
0.2940475643,
0.4080143869,
0.3425829411,
0.5095261931,
-0.0001234102,
0.0544173941,
0.2841651738,
-0.2096642256,
-0.4484793842,
-0.4640179574,
-0.1993896812,
0.0136944205,
0.2473115623,
-0.1567813158,
0.174591288,
-0.0732850209,
-0.0321102738,
-0.4220353365,
0.1694841236,
0.3417607844,
0.1407152265,
0.2266558558,
0.2764905095,
-0.2219139189,
-0.2547796667,
0.3302723467,
-0.0204170104,
0.4828839004,
-0.0186927896,
0.0731686205,
0.0414441563,
0.0742254928,
-0.0195429288,
-0.1017796472,
0.0939251706,
-0.0247307979,
0.162042737,
-0.0513425767,
0.2408140153,
0.197995007,
0.6499521136,
-0.2013997138,
-0.534201324,
0.0352449156,
-0.0611303896,
0.1786230356,
0.3324406743,
-0.0698242337,
0.0839633867,
0.3244956434,
-0.0997816473,
-0.3653491139,
-0.2351392806,
-0.1203215122,
0.0710188225,
-0.287763983,
-0.0193997044,
0.1131957099,
-0.0397094972,
0.0214459822,
0.4245888591,
-0.3535502553,
-0.3489907086,
-0.1019977629,
-0.0459271818,
-0.1144010127,
-0.0653346181,
-0.2706742883,
0.1133465171,
-0.0720995665,
0.2517627776,
0.131618768,
-0.0391714089,
0.0602462813,
0.2115241885,
0.2749888003,
0.419895798,
0.2743374705,
0.0357514843,
0.0714353248,
-0.235752672,
0.0838927999,
-0.0404099002,
-0.1516602337,
0.2088323236,
-0.135804221,
0.5703294277,
-0.4004870951,
-0.327416718,
0.2602044344,
-0.2743054032,
-0.1729609519,
-0.1039799303,
0.224031508,
0.0932792798,
0.1972418875,
0.1087380424,
0.3317793012,
0.0468950532,
0.0277813338,
-0.1801335216,
0.0353041962,
0.0400687456,
0.0117863091,
0.0179786552,
-0.0999572352,
0.2674607337,
0.0151782874,
-0.4577177763,
-0.1766548753,
-0.041361697,
-0.0473277904,
0.2514304221,
0.0383212455,
-0.2181575745,
-0.0566826351,
0.2363060415,
0.1263003945,
-0.2239947766,
0.2120422423,
0.0718439743,
-0.1589060724,
-0.1686420292,
0.122803703,
-0.3944000304,
-0.2602536976,
-0.2819336653,
-0.049399931,
-0.0836641267,
-0.292011559,
-0.1123726964,
-0.3287757933,
-0.2373555899,
-0.1225716174,
0.1428988278,
0.4307117462,
-0.5336276293,
0.1942442358,
0.1860764325,
-0.0290213171,
0.0966062844,
-0.0230779666,
0.0003094772,
0.1380226612,
-0.1793206632,
0.1278737187,
0.4110459387,
-0.5454350114,
-0.6159434915,
0.307710737,
-0.0049892385,
0.178205654,
-0.143765524,
-0.0217470154,
0.2127342671,
-0.0530061163,
0.0544379428,
0.058972992,
0.0534363724,
-0.0575244129,
-0.4947074354,
-0.3328706622,
0.1166522875,
-0.0132596549,
-0.0556113198,
0.0919377655,
0.1581819952,
-0.2094931006,
0.4844790101,
-0.0858411267,
-0.181254819,
0.117009148,
0.4515590072,
-0.0738891661,
0.0274726059,
-0.2316354364,
-0.5508968234,
0.4312417209,
0.0377285816,
-0.0222507119,
-0.0489410758,
0.0583774969,
-0.4379800856,
0.120342955,
-0.3182471991,
0.0465112254,
0.0106165716,
0.0783770531,
-0.086695008,
-0.0088238586,
-0.1149403974,
0.1405706555,
-0.1519618928,
0.0698583126,
0.0043585836,
0.336599499,
-0.2037378699,
-0.2205162942,
0.1709298939,
-0.0127888909,
0.2898364067,
-0.2678135633,
-0.3201780319,
0.4959191084,
0.2282749563,
0.0215912238,
-0.070414409,
-0.3370972276,
-0.0950707942,
-0.0260215867,
0.1928252727,
0.4983446002,
0.0574059859,
0.0559965968,
-0.2572027743,
0.313872993,
0.0657231659,
0.0568129458,
0.0700780228,
0.1781900078,
0.2946606874,
-0.0244198665,
-0.0170400627,
-0.3440819085,
0.2174295038,
0.0188178886,
0.0102336649,
0.0753729269,
-0.1335323602,
0.1482352018,
0.2589493394,
0.03663899,
0.1828769743,
0.0873258486,
0.0021231272,
-0.4102319181,
0.0591993183,
0.3296464086,
0.6812978983,
-0.0120211225,
-0.0898987651,
-0.054286655,
-0.0393865965,
0.0392725915,
0.1494915634,
-0.0172952209,
0.2711468935,
0.1783985794,
0.1901721507,
0.0689663589,
-0.2123125792,
-0.1901511103,
-0.0073721735,
0.0510644764,
-0.3820842803,
0.1315277815,
-0.1379305422,
0.5604394078,
-0.204323858,
-0.5258819461,
-0.0548609793,
-0.3896037638,
-0.1108690575,
0.398245275,
-0.1051945686,
0.0420945138,
-0.5863330364,
0.042864535,
-0.0554990843,
-0.3256076574,
-0.111346975,
-0.1961997896,
-0.1263738126,
-0.1553941816,
0.1137431711,
0.1928959787,
0.2179136872,
-0.1094703227,
-0.1682272851,
-0.4347152114,
-0.3339815438,
0.1541958898,
-0.1012641639,
0.0506950803,
0.1850075573,
-0.0659799874,
0.1797928065,
-0.0064854873,
0.0098092705,
-0.1555845588,
-0.3324505985,
0.1918927878,
0.2623600066,
-0.1795148998,
0.0405302197,
-0.4744687974,
-0.3170478642,
-0.3201008439,
0.2410696298,
-0.0716329366,
0.0295917504,
0.0510346889,
0.1749563366,
0.1524556279,
0.0156617388,
0.1022228748,
-0.0204778947,
-0.1949144155,
0.1171748936,
-0.0141774565,
-0.4500835538,
0.1088245362,
0.0357693359,
0.1472650766,
0.2089918554,
-0.2778181732,
-0.1442973167,
0.004704115,
0.4145680368,
-0.0329650082,
-0.2965222895,
0.4994247258,
0.3355879486,
0.0297882371,
-0.1571242958,
-0.0598419234,
0.1395886987,
0.0997575372,
0.2127372175,
-0.3571591079,
0.4544909,
-0.3967373073,
0.2623893917,
-0.0561213158,
-0.1933417618,
0.2192242146,
0.1355141997,
0.3633718491,
-0.4195736647,
-0.2501193881,
-0.01812106,
-0.2273001671,
-0.1420903653,
0.0491865203,
-0.1898751557,
0.3078674972,
-0.0113016721,
-0.2713411748,
-0.1212769002,
-0.3088131249,
-0.0883087218,
-0.6213800311,
0.2525453568,
0.1294980794,
0.2512167692,
-0.1520728767,
0.0570482425,
0.0548919849,
0.1056846231,
0.3619897366,
-0.1298970431,
-0.6689379811,
0.411916554,
-0.2728249133,
0.3531418741,
0.0170026887,
0.6950644255,
0.0251038447,
-0.1877916455,
-0.0740117133,
-0.0956238508,
0.3716633916,
0.1301262677,
0.0777471289,
0.1875229478,
-0.1503265351,
-0.6920769811,
-0.1083946675,
0.0503960289,
0.3830848634,
0.1262310445,
0.3629611135,
-0.0177810229,
-0.1991338581,
0.2198235393,
0.3881292641,
-0.1670642197,
-0.2743763328,
-0.2853178084,
-0.13652426,
-0.1515444368,
-0.2810797095,
-0.041963011,
0.2196072191,
-0.2597108781,
-0.0625312626,
-0.5216526985,
-0.315872997,
0.064146705,
0.1999334395,
0.4470638037,
-0.3979620636,
0.2182788253,
0.2503278553,
0.1697054803,
0.5388916135,
0.4505365193,
-0.0512384288,
-0.4795736969,
-0.0396612473,
-0.1913184375,
0.0461553857,
0.0478833839,
-0.0462604277,
-0.1848696172,
0.0630237982,
-0.2803145647,
-0.30861938,
0.0911357552,
0.0995179191,
0.0440455303,
-0.3165180087,
-0.177135691,
0.5262102485,
-0.097721599,
-0.130151853,
0.4414814413,
0.3330864906,
-0.2364698499,
0.5683749914,
-0.0350576341,
0.6247900724,
0.2005380392,
0.1264471561,
0.2727006078,
-0.5154504776,
0.0626661032,
0.5921404362,
0.0294375382,
-0.5868449807,
-0.1553602219,
0.0331250355,
-0.1253828406,
0.0326823071,
0.0368703566,
-0.3613361716,
0.0716336071,
0.0084463097,
-0.2822271585,
0.1183372959,
0.3593578935,
-0.2079014778,
0.1589397788,
-0.3033197224,
0.0912196711,
0.1137901545,
0.103031002,
-0.0877371132,
-0.0660761669,
-0.1419516206,
-0.3079770207,
-0.1325311363,
0.2350481749,
-0.1199391708,
0.4439125955,
0.2897054553,
-0.449318707,
0.2196411937,
0.2174479812,
0.4070449769,
-0.0582862757,
-0.1289932281,
-0.0443206429,
-0.2538411915,
-0.0569628701,
0.2750827968,
-0.0208603349,
0.2357587963,
0.0243199393,
-0.2413083613,
0.0149238873,
-0.2202430367,
-0.3488710821,
-0.213655293,
-0.0252610818,
0.0917009935,
-0.4033418298,
-0.5704159141,
-0.3656395972,
-0.1338037997,
-0.3513586223,
0.0451620221,
0.1369813681,
0.0903127491,
0.134551242,
-0.0303703006,
-0.372788012,
0.1286839843,
0.4785130024,
-0.1395130306,
-0.2365070581,
0.5704624057,
-0.0664496273,
0.116396755,
-0.2200825214,
0.1668682098,
0.2937473655,
-0.2160446197,
0.4291680753,
-0.2352194637,
-0.1053846702,
-0.0334324948,
0.5656460524,
0.1970899254,
-0.1196104214,
0.0568215773,
-0.295288831,
-0.3237190843,
0.137645483,
-0.0380470976,
0.4634031355,
-0.0172830559,
-0.307499975,
-0.2098487467,
0.1128286645,
-0.2028449327,
0.0374975838,
0.0159998834,
0.0449075662,
0.1605367512,
-0.0462055132,
0.1810540855,
-0.3117863834,
0.0975407809,
-0.1628717184,
0.0355670936,
-0.0206246674,
-0.2262711525,
0.1717493683,
0.14305152,
0.2631169856,
-0.0958965495,
-0.139329195,
0.0043118098,
-0.0736730546,
-0.0378092974,
0.3947651088,
-0.1223444268,
0.2778863311,
0.0895343423,
0.2064660192,
-0.1312057674,
0.2292111665,
0.0644207522,
0.3075908422,
-0.0757780448,
0.2196434289,
-0.0794220939,
-0.0892365426,
-0.2326029688,
0.1826040596,
0.0293286052,
0.0955829844,
0.1823246926,
-0.1802758873,
-0.0411883369,
0.1104305834,
0.2567686141,
0.5237183571,
-0.1497171223,
-0.2371405512,
-0.0213248394,
0.1600281447,
-0.1601504534,
-0.2017438859,
0.3003623188,
-0.0835294053,
-0.1162904948,
-0.0765225291,
-0.205495894,
-0.1942750216,
-0.1985164732,
0.3335353434,
0.5401271582,
-0.0722698495,
0.2756747603,
0.1050365493,
-0.1331187338,
0.169813931,
0.4339621961,
-0.0268716253,
0.2728073001,
0.2969135046,
-0.0106995478,
0.4752704799,
0.108137764,
0.1763005108,
0.1444734186,
0.0295524988,
0.0501387119,
-0.238372907,
0.03397559,
0.0337766744,
0.0379040577,
0.2074879557,
-0.5338288546,
-0.0095715988,
-0.0529128946,
-0.3925667703,
-0.0503621623,
-0.2166735679,
-0.2375060618,
-0.1166065633,
0.191665411,
-0.0871483237,
-0.1870366931,
0.2569026053,
0.1854578406,
0.1341339499,
-0.1262690872,
-0.1991170049,
0.2447043359,
0.1286831796,
-0.1152324826,
-0.2423138916,
0.1165309548,
0.0655256361,
-0.0270041265,
0.284368515,
0.3048304617,
0.5131983757,
0.4630437791,
-0.123553589,
-0.0936734006,
-0.0676188618,
-0.089074485,
0.1606598645,
0.1176436841,
-0.22886917,
0.141987443,
0.3497955203,
0.1042523459,
0.0525658727,
0.3554262221,
0.1828851551,
0.2552398145,
-0.0793650076,
0.817486167,
0.0652649775,
-0.4018479288,
0.1853941679,
0.2061249614,
-0.0562277772,
-0.2423318028,
0.2547927499,
0.2379752398,
0.0354116485,
0.0430994816,
0.0429510958,
-0.0761298165,
0.4061384797,
0.3945249617,
-0.0091296881,
-0.253089875,
0.2011502385,
-0.5567247272,
0.1267212629,
0.115067631,
-0.0242358465,
0.173558712,
0.1886161715,
0.17911762,
-0.0079986239,
0.1234042719,
0.3020168245,
-0.2655388713,
-0.0732756853,
-0.2039490789,
-0.0483579598,
0.1700233519,
-0.0384171866,
-0.0339168012,
-0.4353080988,
0.2317862958,
-0.2152295113,
-0.0408024602,
-0.1203105897,
-0.1444330364,
-0.0316802822,
-0.034360677,
0.4194565117,
0.128673628,
0.4079839587,
0.0496629253,
-0.4076710045,
-0.2884939611,
-0.1973597258,
-0.1579228193,
0.2628086805,
0.094848983,
0.638533771,
-0.0972696245,
0.0452129953,
-0.2792319059,
0.2594893873,
-0.1286928356,
-0.0773257166,
-0.2083821148,
0.1652529985,
0.1398075074,
0.0103356037,
0.2678920031,
0.1165604368,
-0.0676965341,
0.3758806586,
-0.3817227781,
-0.2833259106,
0.4406760633,
0.0210841522,
-0.1905984879,
-0.0162195619,
0.3005400896,
-0.0426340811,
-0.181629017,
-0.7152318954,
0.0028656013,
0.4155094624,
-0.0063178721,
-0.0824659243,
0.1022373289,
0.2898763716,
0.1865236759,
-0.0089992825,
0.5413075686,
-0.0108729852,
0.0113004725,
-0.0968638733,
-0.0729477182
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | It looks like this issue comes from the order of the fields in the 'idx' struct that is different for some reason.
I'm looking into it. Note that as a workaround you can also flatten the nested features with `ds = ds.flatten()` | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 42 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
It looks like this issue comes from the order of the fields in the 'idx' struct that is different for some reason.
I'm looking into it. Note that as a workaround you can also flatten the nested features with `ds = ds.flatten()` | [
-0.1946798712,
0.1140981093,
-0.0127639389,
0.2849428952,
0.0645920932,
-0.0614171587,
0.1323401183,
0.4565899968,
0.442237556,
0.1792287529,
0.2358966023,
0.3808514178,
0.054587096,
-0.05616818,
-0.1504479647,
-0.0622489341,
0.2574025393,
0.136252284,
0.0472621433,
0.1269329637,
-0.1914964318,
0.2465308011,
-0.1496891379,
-0.0032421583,
-0.1896000206,
0.1437866241,
-0.2581940293,
0.2942799926,
-0.3553466201,
-0.6636257172,
0.2940475643,
0.4080143869,
0.3425829411,
0.5095261931,
-0.0001234102,
0.0544173941,
0.2841651738,
-0.2096642256,
-0.4484793842,
-0.4640179574,
-0.1993896812,
0.0136944205,
0.2473115623,
-0.1567813158,
0.174591288,
-0.0732850209,
-0.0321102738,
-0.4220353365,
0.1694841236,
0.3417607844,
0.1407152265,
0.2266558558,
0.2764905095,
-0.2219139189,
-0.2547796667,
0.3302723467,
-0.0204170104,
0.4828839004,
-0.0186927896,
0.0731686205,
0.0414441563,
0.0742254928,
-0.0195429288,
-0.1017796472,
0.0939251706,
-0.0247307979,
0.162042737,
-0.0513425767,
0.2408140153,
0.197995007,
0.6499521136,
-0.2013997138,
-0.534201324,
0.0352449156,
-0.0611303896,
0.1786230356,
0.3324406743,
-0.0698242337,
0.0839633867,
0.3244956434,
-0.0997816473,
-0.3653491139,
-0.2351392806,
-0.1203215122,
0.0710188225,
-0.287763983,
-0.0193997044,
0.1131957099,
-0.0397094972,
0.0214459822,
0.4245888591,
-0.3535502553,
-0.3489907086,
-0.1019977629,
-0.0459271818,
-0.1144010127,
-0.0653346181,
-0.2706742883,
0.1133465171,
-0.0720995665,
0.2517627776,
0.131618768,
-0.0391714089,
0.0602462813,
0.2115241885,
0.2749888003,
0.419895798,
0.2743374705,
0.0357514843,
0.0714353248,
-0.235752672,
0.0838927999,
-0.0404099002,
-0.1516602337,
0.2088323236,
-0.135804221,
0.5703294277,
-0.4004870951,
-0.327416718,
0.2602044344,
-0.2743054032,
-0.1729609519,
-0.1039799303,
0.224031508,
0.0932792798,
0.1972418875,
0.1087380424,
0.3317793012,
0.0468950532,
0.0277813338,
-0.1801335216,
0.0353041962,
0.0400687456,
0.0117863091,
0.0179786552,
-0.0999572352,
0.2674607337,
0.0151782874,
-0.4577177763,
-0.1766548753,
-0.041361697,
-0.0473277904,
0.2514304221,
0.0383212455,
-0.2181575745,
-0.0566826351,
0.2363060415,
0.1263003945,
-0.2239947766,
0.2120422423,
0.0718439743,
-0.1589060724,
-0.1686420292,
0.122803703,
-0.3944000304,
-0.2602536976,
-0.2819336653,
-0.049399931,
-0.0836641267,
-0.292011559,
-0.1123726964,
-0.3287757933,
-0.2373555899,
-0.1225716174,
0.1428988278,
0.4307117462,
-0.5336276293,
0.1942442358,
0.1860764325,
-0.0290213171,
0.0966062844,
-0.0230779666,
0.0003094772,
0.1380226612,
-0.1793206632,
0.1278737187,
0.4110459387,
-0.5454350114,
-0.6159434915,
0.307710737,
-0.0049892385,
0.178205654,
-0.143765524,
-0.0217470154,
0.2127342671,
-0.0530061163,
0.0544379428,
0.058972992,
0.0534363724,
-0.0575244129,
-0.4947074354,
-0.3328706622,
0.1166522875,
-0.0132596549,
-0.0556113198,
0.0919377655,
0.1581819952,
-0.2094931006,
0.4844790101,
-0.0858411267,
-0.181254819,
0.117009148,
0.4515590072,
-0.0738891661,
0.0274726059,
-0.2316354364,
-0.5508968234,
0.4312417209,
0.0377285816,
-0.0222507119,
-0.0489410758,
0.0583774969,
-0.4379800856,
0.120342955,
-0.3182471991,
0.0465112254,
0.0106165716,
0.0783770531,
-0.086695008,
-0.0088238586,
-0.1149403974,
0.1405706555,
-0.1519618928,
0.0698583126,
0.0043585836,
0.336599499,
-0.2037378699,
-0.2205162942,
0.1709298939,
-0.0127888909,
0.2898364067,
-0.2678135633,
-0.3201780319,
0.4959191084,
0.2282749563,
0.0215912238,
-0.070414409,
-0.3370972276,
-0.0950707942,
-0.0260215867,
0.1928252727,
0.4983446002,
0.0574059859,
0.0559965968,
-0.2572027743,
0.313872993,
0.0657231659,
0.0568129458,
0.0700780228,
0.1781900078,
0.2946606874,
-0.0244198665,
-0.0170400627,
-0.3440819085,
0.2174295038,
0.0188178886,
0.0102336649,
0.0753729269,
-0.1335323602,
0.1482352018,
0.2589493394,
0.03663899,
0.1828769743,
0.0873258486,
0.0021231272,
-0.4102319181,
0.0591993183,
0.3296464086,
0.6812978983,
-0.0120211225,
-0.0898987651,
-0.054286655,
-0.0393865965,
0.0392725915,
0.1494915634,
-0.0172952209,
0.2711468935,
0.1783985794,
0.1901721507,
0.0689663589,
-0.2123125792,
-0.1901511103,
-0.0073721735,
0.0510644764,
-0.3820842803,
0.1315277815,
-0.1379305422,
0.5604394078,
-0.204323858,
-0.5258819461,
-0.0548609793,
-0.3896037638,
-0.1108690575,
0.398245275,
-0.1051945686,
0.0420945138,
-0.5863330364,
0.042864535,
-0.0554990843,
-0.3256076574,
-0.111346975,
-0.1961997896,
-0.1263738126,
-0.1553941816,
0.1137431711,
0.1928959787,
0.2179136872,
-0.1094703227,
-0.1682272851,
-0.4347152114,
-0.3339815438,
0.1541958898,
-0.1012641639,
0.0506950803,
0.1850075573,
-0.0659799874,
0.1797928065,
-0.0064854873,
0.0098092705,
-0.1555845588,
-0.3324505985,
0.1918927878,
0.2623600066,
-0.1795148998,
0.0405302197,
-0.4744687974,
-0.3170478642,
-0.3201008439,
0.2410696298,
-0.0716329366,
0.0295917504,
0.0510346889,
0.1749563366,
0.1524556279,
0.0156617388,
0.1022228748,
-0.0204778947,
-0.1949144155,
0.1171748936,
-0.0141774565,
-0.4500835538,
0.1088245362,
0.0357693359,
0.1472650766,
0.2089918554,
-0.2778181732,
-0.1442973167,
0.004704115,
0.4145680368,
-0.0329650082,
-0.2965222895,
0.4994247258,
0.3355879486,
0.0297882371,
-0.1571242958,
-0.0598419234,
0.1395886987,
0.0997575372,
0.2127372175,
-0.3571591079,
0.4544909,
-0.3967373073,
0.2623893917,
-0.0561213158,
-0.1933417618,
0.2192242146,
0.1355141997,
0.3633718491,
-0.4195736647,
-0.2501193881,
-0.01812106,
-0.2273001671,
-0.1420903653,
0.0491865203,
-0.1898751557,
0.3078674972,
-0.0113016721,
-0.2713411748,
-0.1212769002,
-0.3088131249,
-0.0883087218,
-0.6213800311,
0.2525453568,
0.1294980794,
0.2512167692,
-0.1520728767,
0.0570482425,
0.0548919849,
0.1056846231,
0.3619897366,
-0.1298970431,
-0.6689379811,
0.411916554,
-0.2728249133,
0.3531418741,
0.0170026887,
0.6950644255,
0.0251038447,
-0.1877916455,
-0.0740117133,
-0.0956238508,
0.3716633916,
0.1301262677,
0.0777471289,
0.1875229478,
-0.1503265351,
-0.6920769811,
-0.1083946675,
0.0503960289,
0.3830848634,
0.1262310445,
0.3629611135,
-0.0177810229,
-0.1991338581,
0.2198235393,
0.3881292641,
-0.1670642197,
-0.2743763328,
-0.2853178084,
-0.13652426,
-0.1515444368,
-0.2810797095,
-0.041963011,
0.2196072191,
-0.2597108781,
-0.0625312626,
-0.5216526985,
-0.315872997,
0.064146705,
0.1999334395,
0.4470638037,
-0.3979620636,
0.2182788253,
0.2503278553,
0.1697054803,
0.5388916135,
0.4505365193,
-0.0512384288,
-0.4795736969,
-0.0396612473,
-0.1913184375,
0.0461553857,
0.0478833839,
-0.0462604277,
-0.1848696172,
0.0630237982,
-0.2803145647,
-0.30861938,
0.0911357552,
0.0995179191,
0.0440455303,
-0.3165180087,
-0.177135691,
0.5262102485,
-0.097721599,
-0.130151853,
0.4414814413,
0.3330864906,
-0.2364698499,
0.5683749914,
-0.0350576341,
0.6247900724,
0.2005380392,
0.1264471561,
0.2727006078,
-0.5154504776,
0.0626661032,
0.5921404362,
0.0294375382,
-0.5868449807,
-0.1553602219,
0.0331250355,
-0.1253828406,
0.0326823071,
0.0368703566,
-0.3613361716,
0.0716336071,
0.0084463097,
-0.2822271585,
0.1183372959,
0.3593578935,
-0.2079014778,
0.1589397788,
-0.3033197224,
0.0912196711,
0.1137901545,
0.103031002,
-0.0877371132,
-0.0660761669,
-0.1419516206,
-0.3079770207,
-0.1325311363,
0.2350481749,
-0.1199391708,
0.4439125955,
0.2897054553,
-0.449318707,
0.2196411937,
0.2174479812,
0.4070449769,
-0.0582862757,
-0.1289932281,
-0.0443206429,
-0.2538411915,
-0.0569628701,
0.2750827968,
-0.0208603349,
0.2357587963,
0.0243199393,
-0.2413083613,
0.0149238873,
-0.2202430367,
-0.3488710821,
-0.213655293,
-0.0252610818,
0.0917009935,
-0.4033418298,
-0.5704159141,
-0.3656395972,
-0.1338037997,
-0.3513586223,
0.0451620221,
0.1369813681,
0.0903127491,
0.134551242,
-0.0303703006,
-0.372788012,
0.1286839843,
0.4785130024,
-0.1395130306,
-0.2365070581,
0.5704624057,
-0.0664496273,
0.116396755,
-0.2200825214,
0.1668682098,
0.2937473655,
-0.2160446197,
0.4291680753,
-0.2352194637,
-0.1053846702,
-0.0334324948,
0.5656460524,
0.1970899254,
-0.1196104214,
0.0568215773,
-0.295288831,
-0.3237190843,
0.137645483,
-0.0380470976,
0.4634031355,
-0.0172830559,
-0.307499975,
-0.2098487467,
0.1128286645,
-0.2028449327,
0.0374975838,
0.0159998834,
0.0449075662,
0.1605367512,
-0.0462055132,
0.1810540855,
-0.3117863834,
0.0975407809,
-0.1628717184,
0.0355670936,
-0.0206246674,
-0.2262711525,
0.1717493683,
0.14305152,
0.2631169856,
-0.0958965495,
-0.139329195,
0.0043118098,
-0.0736730546,
-0.0378092974,
0.3947651088,
-0.1223444268,
0.2778863311,
0.0895343423,
0.2064660192,
-0.1312057674,
0.2292111665,
0.0644207522,
0.3075908422,
-0.0757780448,
0.2196434289,
-0.0794220939,
-0.0892365426,
-0.2326029688,
0.1826040596,
0.0293286052,
0.0955829844,
0.1823246926,
-0.1802758873,
-0.0411883369,
0.1104305834,
0.2567686141,
0.5237183571,
-0.1497171223,
-0.2371405512,
-0.0213248394,
0.1600281447,
-0.1601504534,
-0.2017438859,
0.3003623188,
-0.0835294053,
-0.1162904948,
-0.0765225291,
-0.205495894,
-0.1942750216,
-0.1985164732,
0.3335353434,
0.5401271582,
-0.0722698495,
0.2756747603,
0.1050365493,
-0.1331187338,
0.169813931,
0.4339621961,
-0.0268716253,
0.2728073001,
0.2969135046,
-0.0106995478,
0.4752704799,
0.108137764,
0.1763005108,
0.1444734186,
0.0295524988,
0.0501387119,
-0.238372907,
0.03397559,
0.0337766744,
0.0379040577,
0.2074879557,
-0.5338288546,
-0.0095715988,
-0.0529128946,
-0.3925667703,
-0.0503621623,
-0.2166735679,
-0.2375060618,
-0.1166065633,
0.191665411,
-0.0871483237,
-0.1870366931,
0.2569026053,
0.1854578406,
0.1341339499,
-0.1262690872,
-0.1991170049,
0.2447043359,
0.1286831796,
-0.1152324826,
-0.2423138916,
0.1165309548,
0.0655256361,
-0.0270041265,
0.284368515,
0.3048304617,
0.5131983757,
0.4630437791,
-0.123553589,
-0.0936734006,
-0.0676188618,
-0.089074485,
0.1606598645,
0.1176436841,
-0.22886917,
0.141987443,
0.3497955203,
0.1042523459,
0.0525658727,
0.3554262221,
0.1828851551,
0.2552398145,
-0.0793650076,
0.817486167,
0.0652649775,
-0.4018479288,
0.1853941679,
0.2061249614,
-0.0562277772,
-0.2423318028,
0.2547927499,
0.2379752398,
0.0354116485,
0.0430994816,
0.0429510958,
-0.0761298165,
0.4061384797,
0.3945249617,
-0.0091296881,
-0.253089875,
0.2011502385,
-0.5567247272,
0.1267212629,
0.115067631,
-0.0242358465,
0.173558712,
0.1886161715,
0.17911762,
-0.0079986239,
0.1234042719,
0.3020168245,
-0.2655388713,
-0.0732756853,
-0.2039490789,
-0.0483579598,
0.1700233519,
-0.0384171866,
-0.0339168012,
-0.4353080988,
0.2317862958,
-0.2152295113,
-0.0408024602,
-0.1203105897,
-0.1444330364,
-0.0316802822,
-0.034360677,
0.4194565117,
0.128673628,
0.4079839587,
0.0496629253,
-0.4076710045,
-0.2884939611,
-0.1973597258,
-0.1579228193,
0.2628086805,
0.094848983,
0.638533771,
-0.0972696245,
0.0452129953,
-0.2792319059,
0.2594893873,
-0.1286928356,
-0.0773257166,
-0.2083821148,
0.1652529985,
0.1398075074,
0.0103356037,
0.2678920031,
0.1165604368,
-0.0676965341,
0.3758806586,
-0.3817227781,
-0.2833259106,
0.4406760633,
0.0210841522,
-0.1905984879,
-0.0162195619,
0.3005400896,
-0.0426340811,
-0.181629017,
-0.7152318954,
0.0028656013,
0.4155094624,
-0.0063178721,
-0.0824659243,
0.1022373289,
0.2898763716,
0.1865236759,
-0.0089992825,
0.5413075686,
-0.0108729852,
0.0113004725,
-0.0968638733,
-0.0729477182
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | I just pushed a fix on `master`. We'll do a new release soon !
Thanks for reporting | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 17 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
I just pushed a fix on `master`. We'll do a new release soon !
Thanks for reporting | [
-0.1946798712,
0.1140981093,
-0.0127639389,
0.2849428952,
0.0645920932,
-0.0614171587,
0.1323401183,
0.4565899968,
0.442237556,
0.1792287529,
0.2358966023,
0.3808514178,
0.054587096,
-0.05616818,
-0.1504479647,
-0.0622489341,
0.2574025393,
0.136252284,
0.0472621433,
0.1269329637,
-0.1914964318,
0.2465308011,
-0.1496891379,
-0.0032421583,
-0.1896000206,
0.1437866241,
-0.2581940293,
0.2942799926,
-0.3553466201,
-0.6636257172,
0.2940475643,
0.4080143869,
0.3425829411,
0.5095261931,
-0.0001234102,
0.0544173941,
0.2841651738,
-0.2096642256,
-0.4484793842,
-0.4640179574,
-0.1993896812,
0.0136944205,
0.2473115623,
-0.1567813158,
0.174591288,
-0.0732850209,
-0.0321102738,
-0.4220353365,
0.1694841236,
0.3417607844,
0.1407152265,
0.2266558558,
0.2764905095,
-0.2219139189,
-0.2547796667,
0.3302723467,
-0.0204170104,
0.4828839004,
-0.0186927896,
0.0731686205,
0.0414441563,
0.0742254928,
-0.0195429288,
-0.1017796472,
0.0939251706,
-0.0247307979,
0.162042737,
-0.0513425767,
0.2408140153,
0.197995007,
0.6499521136,
-0.2013997138,
-0.534201324,
0.0352449156,
-0.0611303896,
0.1786230356,
0.3324406743,
-0.0698242337,
0.0839633867,
0.3244956434,
-0.0997816473,
-0.3653491139,
-0.2351392806,
-0.1203215122,
0.0710188225,
-0.287763983,
-0.0193997044,
0.1131957099,
-0.0397094972,
0.0214459822,
0.4245888591,
-0.3535502553,
-0.3489907086,
-0.1019977629,
-0.0459271818,
-0.1144010127,
-0.0653346181,
-0.2706742883,
0.1133465171,
-0.0720995665,
0.2517627776,
0.131618768,
-0.0391714089,
0.0602462813,
0.2115241885,
0.2749888003,
0.419895798,
0.2743374705,
0.0357514843,
0.0714353248,
-0.235752672,
0.0838927999,
-0.0404099002,
-0.1516602337,
0.2088323236,
-0.135804221,
0.5703294277,
-0.4004870951,
-0.327416718,
0.2602044344,
-0.2743054032,
-0.1729609519,
-0.1039799303,
0.224031508,
0.0932792798,
0.1972418875,
0.1087380424,
0.3317793012,
0.0468950532,
0.0277813338,
-0.1801335216,
0.0353041962,
0.0400687456,
0.0117863091,
0.0179786552,
-0.0999572352,
0.2674607337,
0.0151782874,
-0.4577177763,
-0.1766548753,
-0.041361697,
-0.0473277904,
0.2514304221,
0.0383212455,
-0.2181575745,
-0.0566826351,
0.2363060415,
0.1263003945,
-0.2239947766,
0.2120422423,
0.0718439743,
-0.1589060724,
-0.1686420292,
0.122803703,
-0.3944000304,
-0.2602536976,
-0.2819336653,
-0.049399931,
-0.0836641267,
-0.292011559,
-0.1123726964,
-0.3287757933,
-0.2373555899,
-0.1225716174,
0.1428988278,
0.4307117462,
-0.5336276293,
0.1942442358,
0.1860764325,
-0.0290213171,
0.0966062844,
-0.0230779666,
0.0003094772,
0.1380226612,
-0.1793206632,
0.1278737187,
0.4110459387,
-0.5454350114,
-0.6159434915,
0.307710737,
-0.0049892385,
0.178205654,
-0.143765524,
-0.0217470154,
0.2127342671,
-0.0530061163,
0.0544379428,
0.058972992,
0.0534363724,
-0.0575244129,
-0.4947074354,
-0.3328706622,
0.1166522875,
-0.0132596549,
-0.0556113198,
0.0919377655,
0.1581819952,
-0.2094931006,
0.4844790101,
-0.0858411267,
-0.181254819,
0.117009148,
0.4515590072,
-0.0738891661,
0.0274726059,
-0.2316354364,
-0.5508968234,
0.4312417209,
0.0377285816,
-0.0222507119,
-0.0489410758,
0.0583774969,
-0.4379800856,
0.120342955,
-0.3182471991,
0.0465112254,
0.0106165716,
0.0783770531,
-0.086695008,
-0.0088238586,
-0.1149403974,
0.1405706555,
-0.1519618928,
0.0698583126,
0.0043585836,
0.336599499,
-0.2037378699,
-0.2205162942,
0.1709298939,
-0.0127888909,
0.2898364067,
-0.2678135633,
-0.3201780319,
0.4959191084,
0.2282749563,
0.0215912238,
-0.070414409,
-0.3370972276,
-0.0950707942,
-0.0260215867,
0.1928252727,
0.4983446002,
0.0574059859,
0.0559965968,
-0.2572027743,
0.313872993,
0.0657231659,
0.0568129458,
0.0700780228,
0.1781900078,
0.2946606874,
-0.0244198665,
-0.0170400627,
-0.3440819085,
0.2174295038,
0.0188178886,
0.0102336649,
0.0753729269,
-0.1335323602,
0.1482352018,
0.2589493394,
0.03663899,
0.1828769743,
0.0873258486,
0.0021231272,
-0.4102319181,
0.0591993183,
0.3296464086,
0.6812978983,
-0.0120211225,
-0.0898987651,
-0.054286655,
-0.0393865965,
0.0392725915,
0.1494915634,
-0.0172952209,
0.2711468935,
0.1783985794,
0.1901721507,
0.0689663589,
-0.2123125792,
-0.1901511103,
-0.0073721735,
0.0510644764,
-0.3820842803,
0.1315277815,
-0.1379305422,
0.5604394078,
-0.204323858,
-0.5258819461,
-0.0548609793,
-0.3896037638,
-0.1108690575,
0.398245275,
-0.1051945686,
0.0420945138,
-0.5863330364,
0.042864535,
-0.0554990843,
-0.3256076574,
-0.111346975,
-0.1961997896,
-0.1263738126,
-0.1553941816,
0.1137431711,
0.1928959787,
0.2179136872,
-0.1094703227,
-0.1682272851,
-0.4347152114,
-0.3339815438,
0.1541958898,
-0.1012641639,
0.0506950803,
0.1850075573,
-0.0659799874,
0.1797928065,
-0.0064854873,
0.0098092705,
-0.1555845588,
-0.3324505985,
0.1918927878,
0.2623600066,
-0.1795148998,
0.0405302197,
-0.4744687974,
-0.3170478642,
-0.3201008439,
0.2410696298,
-0.0716329366,
0.0295917504,
0.0510346889,
0.1749563366,
0.1524556279,
0.0156617388,
0.1022228748,
-0.0204778947,
-0.1949144155,
0.1171748936,
-0.0141774565,
-0.4500835538,
0.1088245362,
0.0357693359,
0.1472650766,
0.2089918554,
-0.2778181732,
-0.1442973167,
0.004704115,
0.4145680368,
-0.0329650082,
-0.2965222895,
0.4994247258,
0.3355879486,
0.0297882371,
-0.1571242958,
-0.0598419234,
0.1395886987,
0.0997575372,
0.2127372175,
-0.3571591079,
0.4544909,
-0.3967373073,
0.2623893917,
-0.0561213158,
-0.1933417618,
0.2192242146,
0.1355141997,
0.3633718491,
-0.4195736647,
-0.2501193881,
-0.01812106,
-0.2273001671,
-0.1420903653,
0.0491865203,
-0.1898751557,
0.3078674972,
-0.0113016721,
-0.2713411748,
-0.1212769002,
-0.3088131249,
-0.0883087218,
-0.6213800311,
0.2525453568,
0.1294980794,
0.2512167692,
-0.1520728767,
0.0570482425,
0.0548919849,
0.1056846231,
0.3619897366,
-0.1298970431,
-0.6689379811,
0.411916554,
-0.2728249133,
0.3531418741,
0.0170026887,
0.6950644255,
0.0251038447,
-0.1877916455,
-0.0740117133,
-0.0956238508,
0.3716633916,
0.1301262677,
0.0777471289,
0.1875229478,
-0.1503265351,
-0.6920769811,
-0.1083946675,
0.0503960289,
0.3830848634,
0.1262310445,
0.3629611135,
-0.0177810229,
-0.1991338581,
0.2198235393,
0.3881292641,
-0.1670642197,
-0.2743763328,
-0.2853178084,
-0.13652426,
-0.1515444368,
-0.2810797095,
-0.041963011,
0.2196072191,
-0.2597108781,
-0.0625312626,
-0.5216526985,
-0.315872997,
0.064146705,
0.1999334395,
0.4470638037,
-0.3979620636,
0.2182788253,
0.2503278553,
0.1697054803,
0.5388916135,
0.4505365193,
-0.0512384288,
-0.4795736969,
-0.0396612473,
-0.1913184375,
0.0461553857,
0.0478833839,
-0.0462604277,
-0.1848696172,
0.0630237982,
-0.2803145647,
-0.30861938,
0.0911357552,
0.0995179191,
0.0440455303,
-0.3165180087,
-0.177135691,
0.5262102485,
-0.097721599,
-0.130151853,
0.4414814413,
0.3330864906,
-0.2364698499,
0.5683749914,
-0.0350576341,
0.6247900724,
0.2005380392,
0.1264471561,
0.2727006078,
-0.5154504776,
0.0626661032,
0.5921404362,
0.0294375382,
-0.5868449807,
-0.1553602219,
0.0331250355,
-0.1253828406,
0.0326823071,
0.0368703566,
-0.3613361716,
0.0716336071,
0.0084463097,
-0.2822271585,
0.1183372959,
0.3593578935,
-0.2079014778,
0.1589397788,
-0.3033197224,
0.0912196711,
0.1137901545,
0.103031002,
-0.0877371132,
-0.0660761669,
-0.1419516206,
-0.3079770207,
-0.1325311363,
0.2350481749,
-0.1199391708,
0.4439125955,
0.2897054553,
-0.449318707,
0.2196411937,
0.2174479812,
0.4070449769,
-0.0582862757,
-0.1289932281,
-0.0443206429,
-0.2538411915,
-0.0569628701,
0.2750827968,
-0.0208603349,
0.2357587963,
0.0243199393,
-0.2413083613,
0.0149238873,
-0.2202430367,
-0.3488710821,
-0.213655293,
-0.0252610818,
0.0917009935,
-0.4033418298,
-0.5704159141,
-0.3656395972,
-0.1338037997,
-0.3513586223,
0.0451620221,
0.1369813681,
0.0903127491,
0.134551242,
-0.0303703006,
-0.372788012,
0.1286839843,
0.4785130024,
-0.1395130306,
-0.2365070581,
0.5704624057,
-0.0664496273,
0.116396755,
-0.2200825214,
0.1668682098,
0.2937473655,
-0.2160446197,
0.4291680753,
-0.2352194637,
-0.1053846702,
-0.0334324948,
0.5656460524,
0.1970899254,
-0.1196104214,
0.0568215773,
-0.295288831,
-0.3237190843,
0.137645483,
-0.0380470976,
0.4634031355,
-0.0172830559,
-0.307499975,
-0.2098487467,
0.1128286645,
-0.2028449327,
0.0374975838,
0.0159998834,
0.0449075662,
0.1605367512,
-0.0462055132,
0.1810540855,
-0.3117863834,
0.0975407809,
-0.1628717184,
0.0355670936,
-0.0206246674,
-0.2262711525,
0.1717493683,
0.14305152,
0.2631169856,
-0.0958965495,
-0.139329195,
0.0043118098,
-0.0736730546,
-0.0378092974,
0.3947651088,
-0.1223444268,
0.2778863311,
0.0895343423,
0.2064660192,
-0.1312057674,
0.2292111665,
0.0644207522,
0.3075908422,
-0.0757780448,
0.2196434289,
-0.0794220939,
-0.0892365426,
-0.2326029688,
0.1826040596,
0.0293286052,
0.0955829844,
0.1823246926,
-0.1802758873,
-0.0411883369,
0.1104305834,
0.2567686141,
0.5237183571,
-0.1497171223,
-0.2371405512,
-0.0213248394,
0.1600281447,
-0.1601504534,
-0.2017438859,
0.3003623188,
-0.0835294053,
-0.1162904948,
-0.0765225291,
-0.205495894,
-0.1942750216,
-0.1985164732,
0.3335353434,
0.5401271582,
-0.0722698495,
0.2756747603,
0.1050365493,
-0.1331187338,
0.169813931,
0.4339621961,
-0.0268716253,
0.2728073001,
0.2969135046,
-0.0106995478,
0.4752704799,
0.108137764,
0.1763005108,
0.1444734186,
0.0295524988,
0.0501387119,
-0.238372907,
0.03397559,
0.0337766744,
0.0379040577,
0.2074879557,
-0.5338288546,
-0.0095715988,
-0.0529128946,
-0.3925667703,
-0.0503621623,
-0.2166735679,
-0.2375060618,
-0.1166065633,
0.191665411,
-0.0871483237,
-0.1870366931,
0.2569026053,
0.1854578406,
0.1341339499,
-0.1262690872,
-0.1991170049,
0.2447043359,
0.1286831796,
-0.1152324826,
-0.2423138916,
0.1165309548,
0.0655256361,
-0.0270041265,
0.284368515,
0.3048304617,
0.5131983757,
0.4630437791,
-0.123553589,
-0.0936734006,
-0.0676188618,
-0.089074485,
0.1606598645,
0.1176436841,
-0.22886917,
0.141987443,
0.3497955203,
0.1042523459,
0.0525658727,
0.3554262221,
0.1828851551,
0.2552398145,
-0.0793650076,
0.817486167,
0.0652649775,
-0.4018479288,
0.1853941679,
0.2061249614,
-0.0562277772,
-0.2423318028,
0.2547927499,
0.2379752398,
0.0354116485,
0.0430994816,
0.0429510958,
-0.0761298165,
0.4061384797,
0.3945249617,
-0.0091296881,
-0.253089875,
0.2011502385,
-0.5567247272,
0.1267212629,
0.115067631,
-0.0242358465,
0.173558712,
0.1886161715,
0.17911762,
-0.0079986239,
0.1234042719,
0.3020168245,
-0.2655388713,
-0.0732756853,
-0.2039490789,
-0.0483579598,
0.1700233519,
-0.0384171866,
-0.0339168012,
-0.4353080988,
0.2317862958,
-0.2152295113,
-0.0408024602,
-0.1203105897,
-0.1444330364,
-0.0316802822,
-0.034360677,
0.4194565117,
0.128673628,
0.4079839587,
0.0496629253,
-0.4076710045,
-0.2884939611,
-0.1973597258,
-0.1579228193,
0.2628086805,
0.094848983,
0.638533771,
-0.0972696245,
0.0452129953,
-0.2792319059,
0.2594893873,
-0.1286928356,
-0.0773257166,
-0.2083821148,
0.1652529985,
0.1398075074,
0.0103356037,
0.2678920031,
0.1165604368,
-0.0676965341,
0.3758806586,
-0.3817227781,
-0.2833259106,
0.4406760633,
0.0210841522,
-0.1905984879,
-0.0162195619,
0.3005400896,
-0.0426340811,
-0.181629017,
-0.7152318954,
0.0028656013,
0.4155094624,
-0.0063178721,
-0.0824659243,
0.1022373289,
0.2898763716,
0.1865236759,
-0.0089992825,
0.5413075686,
-0.0108729852,
0.0113004725,
-0.0968638733,
-0.0729477182
] |
https://github.com/huggingface/datasets/issues/2262 | NewsPH NLI dataset script fails to access test data. | Thanks @bhavitvyamalik for the fix !
The fix will be available in the next release.
It's already available on the `master` branch. For now you can either install `datasets` from source or use `script_version="master"` in `load_dataset` to use the fixed version of this dataset. | In Newsph-NLI Dataset (#1192), it fails to access test data.
According to the script below, the download manager will download the train data when trying to download the test data.
https://github.com/huggingface/datasets/blob/2a2dd6316af2cc7fdf24e4779312e8ee0c7ed98b/datasets/newsph_nli/newsph_nli.py#L71
If you download it according to the script above, you can see that train and test receive the same data as shown below.
```python
>>> from datasets import load_dataset
>>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py")
>>> newsph_nli
DatasetDict({
train: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
test: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
validation: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 90000
})
})
>>> newsph_nli["train"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
>>> newsph_nli["test"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
```
In local, I modified the code of the source as below and got the correct result.
```python
71 test_path = os.path.join(download_path, "test.csv")
```
```python
>>> from datasets import load_dataset
>>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py")
>>> newsph_nli
DatasetDict({
train: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
test: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 9000
})
validation: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 90000
})
})
>>> newsph_nli["train"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
>>> newsph_nli["test"][0]
{'hypothesis': '-- JAI (@JaiPaller) September 13, 2019',
'label': 1,
'premise': 'Pinag-iingat ng Konsulado ng Pilipinas sa Dubai ang publiko, partikular ang mga donor, laban sa mga scam na gumagamit ng mga charitable organization.'}
```
I don't have experience with open source pull requests, so I suggest that you reflect them in the source.
Thank you for reading :) | 44 | NewsPH NLI dataset script fails to access test data.
In Newsph-NLI Dataset (#1192), it fails to access test data.
According to the script below, the download manager will download the train data when trying to download the test data.
https://github.com/huggingface/datasets/blob/2a2dd6316af2cc7fdf24e4779312e8ee0c7ed98b/datasets/newsph_nli/newsph_nli.py#L71
If you download it according to the script above, you can see that train and test receive the same data as shown below.
```python
>>> from datasets import load_dataset
>>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py")
>>> newsph_nli
DatasetDict({
train: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
test: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
validation: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 90000
})
})
>>> newsph_nli["train"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
>>> newsph_nli["test"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
```
In local, I modified the code of the source as below and got the correct result.
```python
71 test_path = os.path.join(download_path, "test.csv")
```
```python
>>> from datasets import load_dataset
>>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py")
>>> newsph_nli
DatasetDict({
train: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
test: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 9000
})
validation: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 90000
})
})
>>> newsph_nli["train"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
>>> newsph_nli["test"][0]
{'hypothesis': '-- JAI (@JaiPaller) September 13, 2019',
'label': 1,
'premise': 'Pinag-iingat ng Konsulado ng Pilipinas sa Dubai ang publiko, partikular ang mga donor, laban sa mga scam na gumagamit ng mga charitable organization.'}
```
I don't have experience with open source pull requests, so I suggest that you reflect them in the source.
Thank you for reading :)
Thanks @bhavitvyamalik for the fix !
The fix will be available in the next release.
It's already available on the `master` branch. For now you can either install `datasets` from source or use `script_version="master"` in `load_dataset` to use the fixed version of this dataset. | [
-0.1607161313,
0.2849107087,
-0.1269760132,
0.1755046844,
0.0859021693,
0.0402895324,
0.2562073767,
0.3658848107,
0.041933585,
0.3072819412,
0.0052474048,
0.0433719717,
0.0158908386,
0.21912238,
0.1775155962,
-0.1738475114,
-0.0040244837,
0.0109897936,
-0.1373092532,
0.0521649644,
-0.1775492132,
0.0072261957,
-0.1995905042,
0.1583384275,
-0.0375778712,
0.2100188136,
-0.2031049132,
0.0941608995,
-0.1932430863,
-0.6549804211,
0.3090725541,
0.1273381412,
0.0832722187,
0.2888224423,
-0.0001082165,
0.0894128606,
0.2988509536,
0.0091614826,
-0.3292868137,
-0.3701016903,
-0.3256570101,
-0.4836530685,
0.0113816243,
-0.3868236244,
-0.1000626683,
-0.1852468401,
0.2667524219,
0.109197855,
0.2585924268,
0.6185498238,
0.2178414911,
0.3603419363,
0.0827492848,
-0.0977324918,
0.1449721158,
0.0725210011,
-0.1622267514,
0.1413548589,
-0.0237707086,
-0.144920662,
0.0799245015,
0.1947095841,
0.0518150851,
0.1217469946,
-0.187107265,
0.1651479602,
0.2658441365,
-0.2221498638,
-0.1103747264,
0.2396494895,
0.0484496318,
-0.2494378388,
-0.2226450145,
-0.0337353088,
-0.0844577625,
0.0159998052,
0.1275511682,
0.3240196407,
-0.2225626856,
0.1198314205,
-0.304781884,
-0.0031718367,
-0.3851749003,
0.395362556,
-0.2153155357,
0.2162217945,
0.0354196876,
0.1695628464,
0.1948065609,
-0.1787179112,
-0.1353119761,
-0.1662856787,
-0.1664291769,
0.110491991,
0.0447670445,
-0.035413269,
-0.0712502077,
-0.3175803423,
0.3023942709,
0.1509389579,
0.064139463,
0.0615021437,
-0.009062577,
0.0035717541,
0.1476140171,
-0.1303728372,
0.0290071592,
0.3485049009,
0.3061070442,
0.29779917,
0.0741891116,
-0.0587521531,
0.0372148119,
-0.0911939219,
0.1269006431,
-0.019810956,
0.4139211178,
-0.2075269967,
-0.123758547,
0.2419609278,
-0.0031194841,
-0.1290282607,
-0.0752903596,
0.4222076535,
0.0038069081,
0.0440089665,
0.0618455671,
0.3608464599,
-0.0351581536,
-0.0896931589,
-0.2308820337,
0.1472979784,
-0.3299787641,
0.1613568217,
0.6004886627,
0.0971654132,
0.2637771368,
-0.0439441986,
-0.1959436983,
-0.2917520404,
0.1034091562,
-0.2452872545,
0.5001851916,
0.1316229999,
0.26239416,
0.1821570843,
-0.0875073746,
0.3129859865,
0.0101262117,
0.0853111371,
-0.0186631177,
-0.3564787805,
0.2350667119,
0.2354106456,
-0.2452389747,
-0.0261492394,
0.0424878336,
0.0778636932,
-0.1504395455,
-0.3769741654,
-0.0665063635,
-0.1449885368,
-0.2322543859,
-0.1142747328,
0.3140326738,
0.4287766516,
-0.0391391441,
-0.0388354324,
0.1627985984,
-0.0328582264,
0.1943424642,
0.0196333472,
-0.3911494017,
0.2049047202,
-0.1807558835,
0.0412888825,
0.5587882996,
-0.4500214458,
-0.7249732018,
0.2535999119,
-0.0212616827,
0.053040538,
0.1778287143,
0.0625050515,
-0.086029239,
-0.027893262,
-0.4274310172,
0.3901505768,
0.054687947,
0.2225218415,
0.0165248904,
-0.168270275,
0.3594575226,
0.2673203647,
0.0448144339,
-0.0441084355,
-0.0306842942,
0.4716743529,
0.6009882092,
0.0481059141,
0.009054455,
0.0842781514,
-0.021751212,
-0.1325216591,
-0.0750058889,
-0.0794651881,
-0.0566268526,
0.2953827083,
0.0179414079,
-0.017959049,
-0.147721827,
-0.0005190503,
-0.5050711632,
-0.0385370776,
-0.3645444512,
-0.226628989,
0.2683858871,
0.3846638501,
0.3528347015,
0.3000057042,
-0.0302878749,
0.3504021168,
-0.3305170536,
-0.049624715,
-0.249767527,
0.2820423543,
-0.2013544142,
0.0091114184,
-0.0227290746,
0.1534702033,
0.1481284946,
-0.0519123375,
-0.0547740124,
0.2898338437,
0.1164439321,
0.085434556,
-0.0616064742,
0.0667308643,
0.1511047333,
-0.5583305955,
0.2712525725,
0.3992883861,
0.1664094478,
-0.0469952486,
-0.2413633764,
0.2244087458,
-0.0297885872,
0.1660887599,
0.2944082916,
-0.0828001946,
0.2006496787,
-0.0955019519,
-0.2641210258,
-0.1278714836,
0.0308985524,
-0.0712234229,
-0.0856453329,
-0.0873884857,
-0.0694780052,
-0.0240069069,
0.5533160567,
-0.0228689089,
-0.0859916806,
-0.1422100365,
-0.1544727087,
-0.0401732698,
-0.0457055382,
0.3417985439,
0.3394462764,
-0.0052409391,
0.1332752407,
0.2720528245,
0.0106294369,
-0.2517019808,
0.111766316,
0.1259651929,
0.1259822398,
0.2157383561,
0.0531441458,
0.0178049821,
-0.1025186628,
0.0333008431,
0.3690501451,
0.1830672771,
-0.268863827,
-0.0197617449,
-0.2633469701,
-0.5984286666,
-0.2817604542,
-0.1618250459,
0.0276547745,
-0.4178621471,
-0.0583135523,
0.2076061368,
0.0333638377,
-0.1740945578,
-0.3731128275,
-0.0507753938,
0.0232869759,
-0.1845423877,
-0.0677580908,
-0.1110173911,
-0.2914594412,
0.0881277472,
0.0988046452,
0.2324982136,
0.1851995736,
-0.3372071981,
-0.1936270148,
-0.4294446111,
-0.0837893859,
0.2052212805,
0.0387761034,
0.3248253167,
-0.0089295702,
0.4082075953,
0.1277257204,
0.0729603395,
0.2689101398,
-0.225854516,
-0.2140462548,
0.3920099139,
0.0003066334,
-0.0243677497,
-0.0420404747,
-0.8750807047,
-0.3868276775,
-0.2710676789,
-0.0702918544,
-0.1641080827,
0.1371510625,
0.4277603924,
0.0564923659,
0.1112266332,
-0.0629072189,
0.1891740561,
-0.2624031305,
0.1213419288,
0.1968318522,
-0.4101998806,
-0.6001107097,
-0.0918638334,
0.1056961864,
0.1412738264,
0.0692280754,
-0.4383094013,
-0.0994463861,
-0.2035561353,
0.2111941427,
0.0655181184,
-0.1395415217,
0.0986179933,
-0.187658608,
0.0152321225,
-0.0599373877,
0.0633014739,
0.1874913424,
0.0681977347,
0.2779687941,
0.1245735064,
0.4347034097,
0.1053016484,
0.533926785,
0.2907460928,
-0.0869296417,
0.4084814787,
-0.4260177314,
0.097307995,
0.0522851795,
-0.3037236333,
0.1839882135,
0.0349422209,
0.1958124638,
0.027264243,
-0.2361387461,
-0.0680467784,
-0.2292049825,
0.015842719,
-0.250110358,
-0.2746538222,
0.1084880233,
0.1041519716,
0.2464462817,
0.2721262276,
0.2970673144,
-0.025074821,
-0.2863845825,
-0.0831077099,
0.175379023,
0.0077818404,
0.1302407086,
-0.1485902369,
-0.3568097651,
-0.5432792306,
0.0498159714,
0.1777338237,
0.6533558369,
-0.0952225551,
-0.2328330576,
0.0570933856,
-0.0656632036,
0.2139720321,
-0.2622177303,
0.2860744894,
0.0941679329,
-0.1925501376,
-0.4614230394,
-0.1490027755,
-0.5367028713,
0.2200162262,
0.0458815061,
0.0783031955,
-0.312892884,
-0.0865688026,
0.4102013707,
0.0667632818,
-0.0895866975,
-0.1199112162,
-0.0781769305,
-0.2306933701,
-0.1983645707,
-0.0634453893,
-0.0272966549,
0.1544400901,
-0.4726415873,
0.0435139015,
0.1438606232,
0.1500723511,
0.0452246368,
0.4804130495,
0.1437707096,
0.1152131781,
0.1626637131,
0.1206894293,
0.0033897306,
0.0483855978,
0.4401526153,
0.3329810798,
-0.0884327963,
0.2296985239,
-0.2514722943,
0.2321723849,
0.4090430439,
-0.0843233839,
-0.0802553892,
0.0124579277,
-0.4772043228,
-0.1453660876,
0.1055899709,
0.4880533814,
-0.1975771338,
-0.1639465392,
-0.3932228386,
0.2943482101,
0.1879696399,
-0.0693175271,
-0.1881123483,
-0.3113543391,
-0.0901665241,
0.1993941814,
-0.3372789025,
0.7343432903,
0.2030813992,
0.1060782149,
0.350130707,
0.0492578223,
0.1445159167,
-0.2173542231,
0.1401652992,
-0.2893863022,
-0.1896618158,
0.0507210381,
-0.1337523013,
-0.0575894378,
0.0699675307,
-0.1388361454,
0.1918224841,
0.0765191764,
0.0465894453,
-0.0903613195,
0.4218007624,
-0.1952952892,
0.2279956639,
-0.3704459369,
0.1807517707,
0.0409517847,
0.1949237436,
-0.1249009073,
-0.1258855611,
-0.2114580721,
-0.0805526227,
-0.2322452366,
0.3438408375,
-0.101480782,
-0.0080385823,
-0.1548867375,
-0.071599938,
-0.2092354,
0.3940391839,
0.1898008734,
0.1455553174,
-0.2332071364,
-0.0151823442,
-0.1218621433,
-0.0989135057,
0.1702075452,
0.0720780268,
0.2749035358,
-0.2375001013,
-0.5205233097,
0.2717050612,
0.0122127496,
0.0115171736,
-0.301099807,
-0.0515830331,
0.2221486866,
-0.4237349331,
-0.2757752538,
-0.1270695478,
-0.2994163632,
-0.0844060928,
0.1799010932,
-0.1724432409,
-0.3016175926,
0.0538750775,
0.1061511263,
-0.3442393243,
0.0102176396,
0.2672344446,
-0.0498553067,
0.2570137084,
0.5883647203,
0.1426813304,
0.0978078321,
-0.2515437305,
-0.1344153285,
0.3967266679,
-0.4480821192,
-0.2421752363,
-0.0587320775,
0.2318977565,
0.4225231409,
0.4979726672,
-0.0524653271,
-0.2359656394,
-0.0647885725,
-0.4515602291,
-0.1405133605,
0.0455112867,
0.081304647,
0.2086679637,
0.1423360854,
0.0296598542,
-0.0092558116,
-0.1055458635,
-0.3727011979,
-0.1019631103,
-0.2531989217,
0.1466192752,
-0.0672551319,
0.0076766252,
0.1220957339,
0.0045651756,
0.1222152784,
0.1053172424,
-0.1673086882,
-0.2406250983,
-0.0903888792,
0.1120863482,
0.2074939162,
-0.046348922,
-0.3955718279,
-0.2170503587,
-0.1175273359,
-0.0634540841,
0.1516935378,
-0.1089368612,
0.0791212097,
0.4872288406,
0.1247824728,
0.1911434233,
0.0628993958,
0.1000807434,
-0.2500253618,
0.3012392223,
-0.0008742628,
0.3668178916,
-0.0504580364,
-0.0284644663,
-0.3968818188,
-0.1286951602,
0.3236759901,
0.1369549781,
0.2293802053,
-0.2778626382,
0.1718882471,
-0.2285359502,
0.3552606702,
0.4184897542,
-0.3320916593,
0.0760072917,
0.0304813832,
0.2555725873,
-0.1592842191,
0.0507188998,
0.1791631132,
-0.0031620795,
0.1429830939,
0.2469053566,
0.3377940059,
-0.0695364326,
0.2741982937,
0.0299771857,
0.2737219036,
-0.1217312813,
0.0021441975,
0.3989954889,
-0.124055557,
-0.0454700403,
0.0245484412,
0.018587796,
0.084174864,
0.1809134632,
0.0145674571,
0.6019994617,
0.3479762673,
0.1010266021,
0.1548651904,
-0.0158829726,
-0.1489732862,
0.0707311705,
-0.2232425809,
0.2216873765,
-0.1234164014,
0.3565530479,
-0.1334574372,
0.0958142951,
-0.501427412,
0.1163443029,
-0.006639041,
-0.097270228,
-0.3805087507,
-0.2218048722,
-0.2661810219,
-0.1269681752,
-0.0713464245,
-0.1114909276,
0.3025799096,
0.1585451961,
-0.3330275714,
-0.3868170083,
0.0582637973,
0.1791598201,
0.1049536616,
-0.2697232962,
0.332580328,
-0.0474270843,
-0.0690362602,
0.3110889792,
0.5155496597,
0.3372053206,
0.1309100837,
0.0748459101,
0.0987790823,
0.0350757018,
-0.1985812634,
0.0018599466,
0.4188430011,
0.2598070502,
-0.0176606458,
0.389878273,
0.2189409435,
-0.090614222,
-0.2487784922,
0.230179131,
0.065797694,
-0.2974549234,
0.1374527365,
-0.2030493319,
0.0537779331,
-0.3047029376,
-0.1069196239,
-0.5738534927,
-0.2494072616,
0.2485083193,
0.1277545393,
0.3732638955,
-0.2122018188,
0.1067163795,
-0.0765892044,
0.4998400509,
0.2393323183,
0.2802224159,
-0.2526633143,
-0.2962816954,
-0.6371307373,
0.2800090909,
-0.0336490236,
-0.3757675588,
0.0180938169,
0.096657984,
-0.1841701716,
0.045885507,
0.0162998512,
-0.05027337,
-0.0921424478,
0.4529126287,
-0.4418612719,
-0.3507742584,
-0.0523807481,
0.153708905,
-0.2567066848,
-0.1359139383,
0.1069625095,
-0.1130834222,
0.0478983819,
0.010355195,
-0.2944967747,
0.062065471,
0.4316853285,
0.4063119292,
0.1964341253,
0.6059331894,
-0.2052844763,
-0.0306187142,
-0.4789451957,
-0.0330999531,
-0.0587769337,
0.0631798804,
-0.072844021,
0.1951275766,
0.1172643304,
0.1936028451,
-0.0026944045,
-0.090222165,
-0.0918906406,
-0.4591362178,
-0.0700071082,
-0.1678908616,
-0.1076349467,
0.0234891288,
0.0123999221,
0.1525818557,
-0.0149434572,
0.0027830871,
-0.0432890654,
-0.2013235986,
0.3291141391,
-0.1706299484,
-0.2205205709,
-0.0012829424,
0.0587951876,
-0.4319295883,
0.1373666078,
-0.6566746831,
0.1435063183,
0.134479627,
0.0965304077,
-0.0786262378,
0.1540101171,
-0.0446562394,
0.2452210635,
-0.0960330963,
0.4119138718,
0.0631083623,
-0.2670819461,
-0.0691989958,
0.0340402126
] |
https://github.com/huggingface/datasets/issues/2256 | Running `datase.map` with `num_proc > 1` uses a lot of memory | Thanks for reporting ! We are working on this and we'll do a patch release very soon. | ## Describe the bug
Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False)
def _prepare_sample(batch):
return {"input_ids": list(), "attention_mask": list()}
for split_name, dataset_split in list(dstc8_datset.items()):
print(f"Processing {split_name}")
encoded_dataset_split = dataset_split.map(
function=_prepare_sample,
batched=True,
num_proc=4,
remove_columns=dataset_split.column_names,
batch_size=10,
writer_batch_size=10,
keep_in_memory=False,
)
print(encoded_dataset_split)
path = f"./data/encoded_{split_name}"
encoded_dataset_split.save_to_disk(path)
```
## Expected results
Memory usage should stay within reasonable boundaries.
## Actual results
This is htop-output from running the provided script.
![image](https://user-images.githubusercontent.com/8143425/115954836-66954980-a4f3-11eb-8340-0153bdc3a475.png)
## Versions
```
- Datasets: 1.6.0
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10
```
Running on WSL2
| 17 | Running `datase.map` with `num_proc > 1` uses a lot of memory
## Describe the bug
Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False)
def _prepare_sample(batch):
return {"input_ids": list(), "attention_mask": list()}
for split_name, dataset_split in list(dstc8_datset.items()):
print(f"Processing {split_name}")
encoded_dataset_split = dataset_split.map(
function=_prepare_sample,
batched=True,
num_proc=4,
remove_columns=dataset_split.column_names,
batch_size=10,
writer_batch_size=10,
keep_in_memory=False,
)
print(encoded_dataset_split)
path = f"./data/encoded_{split_name}"
encoded_dataset_split.save_to_disk(path)
```
## Expected results
Memory usage should stay within reasonable boundaries.
## Actual results
This is htop-output from running the provided script.
![image](https://user-images.githubusercontent.com/8143425/115954836-66954980-a4f3-11eb-8340-0153bdc3a475.png)
## Versions
```
- Datasets: 1.6.0
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10
```
Running on WSL2
Thanks for reporting ! We are working on this and we'll do a patch release very soon. | [
-0.0754547492,
-0.3018320799,
-0.0413842462,
0.3514221609,
0.2028201818,
0.0986169651,
0.0996903926,
0.2842757106,
0.2723554373,
0.2235053629,
0.185262233,
0.4316781461,
-0.145794943,
-0.0435095765,
-0.0000908966,
0.1481416076,
0.286978066,
0.0148507114,
0.1028159261,
0.0590187497,
-0.4523687661,
0.0157493949,
-0.3991192281,
-0.2898882926,
-0.1479180008,
0.1475246251,
-0.0865115076,
0.3391436636,
0.2111928016,
-0.5017669201,
0.1326698363,
-0.0852004439,
0.1664270163,
0.2540664673,
-0.0001137038,
-0.1059107333,
0.1337453872,
0.100198485,
-0.1821789443,
0.1486945003,
-0.3123306334,
-0.3803421259,
-0.0605340675,
-0.3717796504,
0.0739794597,
0.1645597816,
-0.0146033717,
-0.6698243618,
0.2182038873,
0.3299289048,
0.1970497221,
-0.1352157593,
-0.1267958879,
0.1426887214,
0.2613807917,
0.2144851387,
-0.0019846454,
-0.2373129278,
0.316467762,
0.1026866734,
0.0636082143,
0.4374418259,
-0.277294457,
-0.0314577781,
-0.0467968732,
0.111446619,
0.3358643651,
-0.2466218323,
0.3791425526,
-0.1982063949,
0.1761232913,
-0.3240184784,
0.1939211488,
-0.1367561221,
-0.2850829959,
-0.4452187717,
0.2263072878,
0.0385255888,
-0.1923345178,
0.131610021,
-0.0203823745,
-0.0772102997,
0.2251268625,
-0.0430461653,
-0.05190254,
0.1416194588,
0.0057183509,
0.1725654602,
0.2679636478,
-0.1135374904,
-0.2476186454,
-0.0225860979,
-0.034672033,
0.1145178676,
-0.3829449415,
-0.1603150219,
0.0903515071,
-0.1762018204,
0.0510159247,
-0.3032522202,
0.1050657034,
0.1592099071,
0.2167824805,
0.1538216919,
0.3814412057,
0.0126949558,
0.0362279043,
0.313406527,
0.2402251959,
-0.1346108019,
0.2550566792,
0.0576502271,
0.171500653,
-0.2757340074,
0.3283060491,
-0.0324560888,
0.2573718727,
-0.1818684191,
-0.2745562494,
0.2707969248,
-0.0707861558,
0.2562501729,
0.0107706087,
0.2392870188,
0.2339677364,
0.4569324553,
-0.1290821135,
-0.1677615792,
-0.2951616049,
-0.1780388057,
-0.16123721,
-0.0624382012,
-0.4973858595,
0.0127897942,
0.2001048028,
-0.015772678,
-0.0672493577,
0.0855233893,
-0.1004476026,
-0.3198692501,
0.0025581575,
-0.1037027612,
0.262462765,
0.254085362,
-0.2491625398,
0.4018824995,
-0.1385015845,
-0.0014935654,
-0.3082484603,
0.4717456996,
-0.3724940121,
-0.2667647302,
-0.1029587612,
0.0955400839,
0.1612251997,
0.2892300487,
-0.2312071919,
0.2438073754,
0.4335412979,
0.035273619,
-0.0686664954,
-0.1108096465,
-0.6351305246,
-0.2619718611,
-0.0059179286,
0.4431109726,
-0.3248882592,
0.2043524534,
0.0911757424,
0.061570663,
0.5199885964,
0.312188983,
0.0134993736,
-0.2704665363,
0.0342346951,
0.1604539305,
0.2634506822,
-0.3385004103,
-0.8233774304,
0.4366506338,
-0.2258638442,
-0.0950902998,
0.1500332803,
0.2552034259,
0.3965849578,
-0.1706775129,
0.0508165918,
0.2231231034,
0.0575616919,
0.6018772721,
-0.4744096696,
-0.2935761809,
0.0439666845,
-0.0241867993,
-0.1145748869,
-0.1487891525,
0.0661746189,
0.1963353008,
0.4563107789,
-0.0463558622,
0.2246578783,
0.1608532965,
-0.1028407216,
-0.0563536659,
0.125466451,
-0.2527486384,
-0.4038695991,
0.1220959872,
0.0962012932,
-0.1537614465,
-0.0750260204,
-0.1954279691,
0.0505762398,
0.0149784107,
0.118967846,
-0.370842576,
0.0518172421,
-0.0682424083,
0.0159423891,
-0.2603599131,
0.0931863859,
0.2902766168,
0.1489877403,
-0.0118339742,
-0.2216132581,
0.0043832026,
-0.0359768793,
-0.1321117133,
-0.189985618,
0.1120570004,
0.1009919569,
0.0459343493,
-0.1223836616,
0.2798474431,
0.2700844407,
-0.09175165,
-0.1688496172,
0.0286817085,
0.3951382339,
-0.2478906661,
0.330187887,
0.150343135,
0.2383359075,
-0.1706947535,
-0.1315208972,
-0.0679999292,
0.1871343106,
0.2635293603,
-0.3016976416,
0.1257995516,
0.2288257629,
0.0110693565,
0.2334266901,
-0.3601565063,
0.0444171019,
0.266649276,
0.0942666456,
0.1847884059,
0.0502931476,
0.2274677008,
0.3800429702,
0.0071580093,
-0.0674417391,
0.2289531231,
-0.4205141962,
-0.2080097049,
0.1267895848,
-0.1767048687,
0.4225720465,
0.1683561206,
0.0327092856,
-0.0163711067,
-0.0035293691,
-0.0506973676,
0.1758864373,
0.0871117413,
-0.0744860992,
-0.3462857902,
0.2362719476,
-0.1357604861,
-0.0663326681,
-0.1010182127,
0.0710001513,
0.3797437251,
-0.3099094629,
0.0203585122,
-0.1911893785,
0.3776615858,
0.0741065368,
0.1036668718,
0.1740547717,
-0.1810129136,
-0.0455527976,
0.0940029025,
0.0109129483,
0.0489135794,
0.0440296009,
0.1330718398,
0.0573310964,
0.0461417921,
-0.161771968,
-0.2432824373,
-0.2543354034,
-0.034964446,
0.2633143663,
0.0199794825,
0.3575662374,
0.0410646051,
-0.1443334967,
-0.0342577882,
-0.1015556231,
-0.0204921123,
0.1299989522,
-0.0371872671,
-0.1992776841,
-0.0763361007,
-0.0712467283,
0.1608316749,
-0.0548368804,
-0.2768736184,
-0.1413896531,
0.3183427751,
0.0626072511,
-0.0981758013,
-0.2886627018,
-0.2188271731,
-0.1263388395,
-0.1334591657,
0.1696949452,
0.125261724,
0.4080447853,
-0.2814242244,
0.297665298,
0.0794598535,
0.1217886433,
-0.014146735,
-0.353633523,
-0.054128129,
0.0513542779,
-0.0443673953,
-0.1495992839,
0.0339322649,
0.1202750728,
-0.1339851469,
0.1744812131,
-0.4615814388,
0.1104639173,
-0.4668393433,
0.1116040424,
0.0113621177,
0.0800104365,
0.5854114294,
0.3444521725,
-0.1051353067,
0.0483482257,
-0.2294129282,
0.0313924514,
-0.0876303092,
0.0033828712,
0.2333285064,
0.4563246667,
0.2585021257,
0.146643281,
0.597166419,
-0.1571903527,
0.0591797158,
0.0931064337,
-0.1019990742,
-0.0068087443,
-0.220756039,
0.1000620276,
-0.1552474946,
-0.1417075545,
0.4348697662,
0.1866172999,
-0.5755251646,
0.0369557776,
0.0787444636,
-0.03395373,
-0.2688443065,
0.3238787949,
-0.2240192145,
0.1153784469,
0.0575220957,
0.0397318527,
-0.4204184115,
-0.4140307903,
-0.1729497612,
-0.2100839019,
-0.1254701465,
-0.2111758441,
-0.2528616786,
-0.0087268427,
-0.9209542871,
0.4346576631,
0.0423067585,
0.2663877904,
0.0291174352,
-0.1270749867,
0.2269103825,
-0.0960791409,
0.5157932639,
-0.0552826896,
0.0635641143,
-0.0331188329,
0.0716399103,
-0.32444188,
0.1178439185,
-0.370285511,
0.2683576643,
0.1121730208,
0.4310154915,
-0.070737876,
-0.2245577574,
0.3284596503,
-0.0398595259,
-0.1784521937,
-0.1064338014,
-0.2224117666,
-0.4364829063,
-0.3006705642,
0.1323171854,
0.1993528157,
-0.029814519,
0.0594163574,
-0.2182413191,
-0.0568515733,
-0.1921623647,
0.3076763451,
-0.0633953884,
0.2152741104,
0.127060622,
0.0936275199,
0.1779283434,
0.1557342559,
0.2029779851,
0.3056215346,
-0.0692680478,
0.0772815198,
0.1778836101,
-0.02012695,
0.2897517085,
0.3837613463,
-0.0966140553,
-0.1651208699,
-0.4494532347,
0.4448657036,
-0.5467807651,
-0.0021803495,
0.3576762974,
0.1874078214,
-0.3642300069,
-0.4681977034,
0.3083804548,
0.4301117361,
-0.2308665067,
0.3238496482,
-0.3715762794,
-0.3439401984,
0.4432553649,
0.2462605089,
1.0496559143,
-0.4170785248,
0.1567762643,
-0.1183273643,
-0.1092584804,
0.2459252924,
-0.2475516647,
0.2015375793,
-0.1053605378,
-0.1511636674,
0.0992519781,
-0.0712986514,
0.2511318624,
0.2892043889,
-0.3414061666,
0.1495854855,
0.0113060093,
0.1863741428,
-0.027916979,
0.0384018607,
0.2189947665,
-0.3954831362,
-0.0976106375,
0.158706978,
0.0917465687,
-0.2410399169,
0.0605532154,
0.1979289651,
0.0437089019,
-0.4062682092,
-0.2723631859,
-0.0460996591,
-0.2185846269,
0.4199741483,
-0.3964389563,
-0.0363084972,
0.113749966,
0.2932002842,
0.016906023,
0.3196720183,
0.0498147234,
-0.2268607318,
0.3166850209,
0.3254147768,
0.2444181144,
-0.0298820827,
0.0344422199,
0.1223583147,
-0.3180613816,
0.1635262817,
0.0399919748,
-0.1702682227,
-0.2749530971,
0.2188423872,
0.1691803634,
-0.0348457545,
0.0755603984,
0.134930104,
-0.2710990012,
-0.208531782,
0.1263070703,
0.0586598404,
-0.1913867146,
0.6787999272,
-0.151229158,
-0.5358076692,
-0.0390402935,
0.4033437669,
0.3998193741,
-0.0419903956,
0.2359113991,
-0.0529588312,
-0.2472293824,
-0.2729047239,
0.0615732074,
-0.1938861907,
-0.2133280337,
0.1621177346,
-0.2020891309,
-0.1738422215,
-0.1614867896,
-0.1788172275,
-0.1046937928,
0.0417479612,
0.0245129094,
-0.1625878811,
-0.5511971116,
-0.084438324,
-0.0048968857,
0.3056387007,
0.0284462515,
0.1492987275,
-0.4053389728,
0.2631621659,
-0.2854908109,
0.1681713015,
0.031188814,
0.2942490876,
0.1396815479,
0.1356909722,
0.0485882573,
-0.1166594699,
0.1171827167,
0.431350708,
-0.094500348,
-0.2407009304,
0.1281097233,
0.1215902418,
-0.2400651425,
-0.4046661854,
-0.0769409314,
-0.1059115157,
-0.1060749069,
-0.3666531444,
0.3326636553,
0.2881286442,
0.0065845042,
0.0331726186,
0.3520738184,
0.0294058267,
0.3683871627,
0.4676433504,
-0.3181141317,
0.4390545487,
-0.1310400218,
0.488928616,
-0.0095691103,
-0.1177621335,
-0.0541600324,
0.1230429485,
0.1878217459,
0.2196973562,
0.0221038945,
-0.2346367836,
-0.0886607468,
0.387162596,
0.0116698071,
0.1940528601,
-0.2117686868,
-0.0995646045,
0.2190718651,
0.1965897828,
-0.0653882623,
-0.1499191523,
0.3283310831,
0.1024896577,
0.05336795,
0.3175069392,
0.155306071,
-0.1566400379,
-0.2167560756,
0.0569214746,
0.1864654422,
-0.2504200041,
0.0444998816,
0.431938827,
0.1219546571,
-0.0511193946,
0.1328743994,
0.0060827718,
0.3391921818,
0.7737323642,
0.0299081914,
0.4731141925,
0.2530521452,
0.3822728693,
-0.2586418092,
-0.2549133003,
0.0199650992,
0.5909481049,
-0.5202934146,
0.3448863328,
0.1492220312,
0.1271323562,
-0.1794492602,
-0.0138027845,
-0.2726604044,
0.2004190683,
-0.2477803677,
-0.340452373,
0.2359278351,
-0.0598830879,
-0.2130354792,
0.1699009687,
-0.1578849554,
-0.1862814724,
0.7662406564,
0.1137117371,
-0.2051294148,
-0.0337388739,
-0.09588819,
0.075760074,
0.2537489235,
-0.4055743515,
0.044793427,
-0.1128053069,
0.1331861764,
-0.0065249051,
-0.0909329504,
0.341679126,
0.427284956,
-0.3083946109,
0.0091654705,
0.0735300556,
-0.0213935114,
-0.2865775526,
0.2351248115,
-0.1621107906,
0.192180559,
-0.0053282795,
0.0277606882,
-0.1431484967,
-0.3150227666,
0.3541504145,
0.2710654736,
0.0317655802,
0.2356157899,
0.0002753802,
-0.2144949436,
0.0864685327,
-0.1226091608,
-0.2344952524,
-0.4195280075,
0.4404408634,
-0.468665272,
0.4340609014,
-0.135906443,
0.0892814174,
-0.024970673,
0.3473843932,
-0.272614181,
-0.3021367192,
-0.3087100983,
-0.1953903288,
-0.2418970764,
0.0147775225,
-0.2225596458,
0.0134644965,
-0.1187453195,
0.2008837312,
-0.2130829096,
0.2623045743,
0.0436944924,
0.0240489691,
0.0742781535,
0.37591061,
-0.2080883235,
0.1624814272,
-0.077840969,
0.0834022239,
0.2171087563,
-0.7093385458,
0.3202185631,
-0.0587179698,
0.0275209136,
-0.4466195703,
0.1894745976,
-0.018540483,
0.2479848117,
0.5835254788,
0.3166788816,
0.1492121518,
-0.0907258838,
-0.2716039419,
-0.243096754,
0.1842843592,
-0.1386268139,
-0.1415861547,
-0.0156175792,
-0.0792652443,
-0.389005959,
-0.0809703395,
-0.064802967,
-0.1123298183,
0.0023696385,
0.0472190566,
-0.3245970309,
-0.0081051653,
0.0594387986,
0.2595488727,
-0.2023595423,
0.2692157924,
0.0353786461,
0.0073944819,
-0.0858304873,
-0.4433559477,
0.2853235006,
-0.1633036435,
-0.3462835252,
-0.1708751023,
0.4053236246,
-0.2097497135,
-0.1706221998,
-0.2371231169,
-0.0235589091,
0.1602025926,
-0.0396214984,
-0.4610653818,
0.2239737958,
-0.1126033589,
-0.2044066787,
-0.0654520839,
0.28561759,
0.0071125962,
0.0262755305,
0.2255578935,
-0.5136159062
] |
https://github.com/huggingface/datasets/issues/2256 | Running `datase.map` with `num_proc > 1` uses a lot of memory | We did a patch release to fix this issue.
It should be fixed in the new version 1.6.1
Thanks again for reporting and for the details :) | ## Describe the bug
Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False)
def _prepare_sample(batch):
return {"input_ids": list(), "attention_mask": list()}
for split_name, dataset_split in list(dstc8_datset.items()):
print(f"Processing {split_name}")
encoded_dataset_split = dataset_split.map(
function=_prepare_sample,
batched=True,
num_proc=4,
remove_columns=dataset_split.column_names,
batch_size=10,
writer_batch_size=10,
keep_in_memory=False,
)
print(encoded_dataset_split)
path = f"./data/encoded_{split_name}"
encoded_dataset_split.save_to_disk(path)
```
## Expected results
Memory usage should stay within reasonable boundaries.
## Actual results
This is htop-output from running the provided script.
![image](https://user-images.githubusercontent.com/8143425/115954836-66954980-a4f3-11eb-8340-0153bdc3a475.png)
## Versions
```
- Datasets: 1.6.0
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10
```
Running on WSL2
| 27 | Running `datase.map` with `num_proc > 1` uses a lot of memory
## Describe the bug
Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False)
def _prepare_sample(batch):
return {"input_ids": list(), "attention_mask": list()}
for split_name, dataset_split in list(dstc8_datset.items()):
print(f"Processing {split_name}")
encoded_dataset_split = dataset_split.map(
function=_prepare_sample,
batched=True,
num_proc=4,
remove_columns=dataset_split.column_names,
batch_size=10,
writer_batch_size=10,
keep_in_memory=False,
)
print(encoded_dataset_split)
path = f"./data/encoded_{split_name}"
encoded_dataset_split.save_to_disk(path)
```
## Expected results
Memory usage should stay within reasonable boundaries.
## Actual results
This is htop-output from running the provided script.
![image](https://user-images.githubusercontent.com/8143425/115954836-66954980-a4f3-11eb-8340-0153bdc3a475.png)
## Versions
```
- Datasets: 1.6.0
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10
```
Running on WSL2
We did a patch release to fix this issue.
It should be fixed in the new version 1.6.1
Thanks again for reporting and for the details :) | [
-0.0729509965,
-0.2929819822,
-0.0424273573,
0.3707071841,
0.2069270909,
0.0879343525,
0.0891322419,
0.2784175575,
0.2625880837,
0.2296096832,
0.1797682643,
0.4309555292,
-0.1489770263,
-0.027789006,
-0.0165793095,
0.1438742429,
0.2830033004,
0.019841861,
0.0992945731,
0.0716444105,
-0.44891119,
0.0283551533,
-0.4113302827,
-0.2822185457,
-0.1598487347,
0.1489115953,
-0.089055106,
0.3382928371,
0.2094047964,
-0.5164695382,
0.1316250563,
-0.0899927467,
0.1736143082,
0.2649435699,
-0.0001142843,
-0.1016197205,
0.1252175272,
0.0971600339,
-0.1957460046,
0.1276342422,
-0.314661175,
-0.3634473085,
-0.0303166062,
-0.3590404689,
0.0726522282,
0.1657173038,
-0.0194392037,
-0.6739727855,
0.2170993835,
0.3392879069,
0.1941733807,
-0.1366490722,
-0.119686693,
0.1301042885,
0.2364716679,
0.2139769047,
0.0010632124,
-0.230827108,
0.3229638338,
0.1149239764,
0.0747515857,
0.4133727849,
-0.2654497027,
-0.0384335145,
-0.0535098799,
0.0997087881,
0.3521296382,
-0.2720298469,
0.3823862374,
-0.1950072944,
0.1814181954,
-0.3327332437,
0.1823685914,
-0.1348747462,
-0.2793180943,
-0.4510786831,
0.2298991382,
0.0367097892,
-0.1882487386,
0.1366427392,
-0.038060274,
-0.0894393846,
0.2267849594,
-0.0533735603,
-0.0368233994,
0.1144271493,
0.0036475817,
0.174072206,
0.2728737891,
-0.111607261,
-0.2295513451,
-0.0282945745,
-0.0394032635,
0.121623978,
-0.3987648487,
-0.157946229,
0.0689609349,
-0.1813661009,
0.0463563763,
-0.3080100119,
0.1184400171,
0.1578157246,
0.2054122537,
0.1522974968,
0.3860758543,
0.0093933083,
0.0597692095,
0.3085869551,
0.2237632126,
-0.1464234442,
0.2582480907,
0.0417787842,
0.1672829092,
-0.2809307873,
0.3191932738,
-0.0285180658,
0.2365670949,
-0.1937867105,
-0.266558677,
0.2586753368,
-0.0610515252,
0.261182785,
0.0222865622,
0.2262550592,
0.244864136,
0.4470611811,
-0.1463555843,
-0.1609273851,
-0.2841985226,
-0.1833254397,
-0.151222378,
-0.0574940741,
-0.5046684146,
0.022480892,
0.2060202956,
-0.028393738,
-0.0664363056,
0.0933882669,
-0.1053043604,
-0.3432499766,
0.0121757621,
-0.1125843152,
0.2572802305,
0.2620685697,
-0.239893645,
0.3993426263,
-0.1505594999,
0.0162434317,
-0.3013105094,
0.4810847342,
-0.370755136,
-0.2709362507,
-0.0990087315,
0.0852083638,
0.157582432,
0.2947648168,
-0.2420875579,
0.2445337176,
0.4286447465,
0.0269885287,
-0.0889528468,
-0.1213417873,
-0.6368368864,
-0.2681863606,
0.0030347505,
0.4324849844,
-0.3264063895,
0.2170575112,
0.0809329674,
0.0344492868,
0.5263159871,
0.3109474778,
0.0118523892,
-0.2675108314,
0.031698931,
0.153300941,
0.2658888698,
-0.3270075023,
-0.8171919584,
0.4371910393,
-0.2157790363,
-0.1095283851,
0.1383833438,
0.2508611381,
0.404689908,
-0.1663725823,
0.034750957,
0.2282751948,
0.0608972162,
0.5903042555,
-0.4691993594,
-0.3038942218,
0.0413283668,
-0.0195749886,
-0.1173688322,
-0.1451270431,
0.0748494193,
0.177863881,
0.4535484314,
-0.0585432053,
0.2303675562,
0.1774593145,
-0.1110149324,
-0.0563488826,
0.1232416108,
-0.2524731457,
-0.4027755857,
0.1339410394,
0.083243601,
-0.1526621878,
-0.0804286152,
-0.17511262,
0.0650854558,
0.0063810018,
0.1269775033,
-0.3695946932,
0.0472448431,
-0.0781130269,
0.0223033242,
-0.2606380582,
0.0992855206,
0.2954144478,
0.1608094126,
-0.002919609,
-0.2119583935,
0.0069002421,
-0.0256234966,
-0.1433459967,
-0.1732811332,
0.1090759411,
0.1120466068,
0.0333947651,
-0.1382001489,
0.2837572694,
0.2842202783,
-0.0985990241,
-0.1563301533,
0.0272802263,
0.4024819136,
-0.2332775891,
0.3270909786,
0.1425992996,
0.2420416027,
-0.17311728,
-0.1279880702,
-0.0569084957,
0.1828201264,
0.2651683986,
-0.2958458364,
0.1233259439,
0.2298760116,
0.0121201584,
0.2454760224,
-0.3611178398,
0.0471437685,
0.287186861,
0.0982581228,
0.1909161657,
0.0465376191,
0.2114551216,
0.3700145781,
0.0057402379,
-0.0826598927,
0.2261687666,
-0.4248208106,
-0.2112515569,
0.1328225881,
-0.1818521917,
0.4213224947,
0.1641581208,
0.0243875142,
-0.0241140835,
0.0120313577,
-0.054513827,
0.1692526937,
0.0867377222,
-0.0513386615,
-0.3676345348,
0.233272329,
-0.140382424,
-0.0653905794,
-0.1040040478,
0.0889219865,
0.3924357295,
-0.2967656851,
0.0110162431,
-0.1935512424,
0.4005856216,
0.0906685591,
0.1055028737,
0.1667191684,
-0.1814551651,
-0.0567369908,
0.0982363597,
0.029401252,
0.0516113602,
0.0656297579,
0.1132945046,
0.055661533,
0.051064007,
-0.1494141519,
-0.2518106997,
-0.2523032427,
-0.0411090143,
0.2673365772,
0.0278151054,
0.3511574268,
0.0504586883,
-0.1552990675,
-0.0317021199,
-0.0926317051,
-0.0218254738,
0.1374756545,
-0.0347244926,
-0.2257714868,
-0.0832703486,
-0.0728774145,
0.1783147305,
-0.070054248,
-0.2762167454,
-0.1268467605,
0.3321936429,
0.0612364598,
-0.1137021407,
-0.2935317457,
-0.2158628106,
-0.1409101039,
-0.1193530187,
0.1708790958,
0.1151363105,
0.4196767211,
-0.2845651507,
0.3068885207,
0.0737346485,
0.114201799,
-0.0205500815,
-0.3569995463,
-0.0585363507,
0.0571643338,
-0.0496480949,
-0.1584663689,
0.0290774722,
0.144958362,
-0.1220379248,
0.1793139428,
-0.4542497694,
0.1180753037,
-0.4690532386,
0.1137287021,
0.0141399959,
0.062865749,
0.584587276,
0.350435406,
-0.0964847505,
0.0529161394,
-0.2306270599,
0.0342688113,
-0.0814836472,
-0.0005932312,
0.2426692545,
0.4532474577,
0.2545183897,
0.1341659427,
0.6049479842,
-0.1597821712,
0.0588249192,
0.0959703252,
-0.103430666,
-0.0146370512,
-0.2227412611,
0.0980296582,
-0.1607871354,
-0.1319245398,
0.4267858267,
0.1794440597,
-0.5726997852,
0.0305254068,
0.0714420229,
-0.030464625,
-0.2655982673,
0.3138509989,
-0.2360403985,
0.1396570206,
0.0529654287,
0.0380791351,
-0.4211666882,
-0.4224821329,
-0.1897611171,
-0.2102624774,
-0.1148619428,
-0.2045514733,
-0.2550399303,
0.0069438536,
-0.9173233509,
0.4260066748,
0.0354426056,
0.287356168,
0.0209312029,
-0.0870490745,
0.2374595404,
-0.0823640153,
0.50416857,
-0.0462324135,
0.0520474799,
-0.0369975753,
0.0529944487,
-0.3321000338,
0.126934886,
-0.3692092299,
0.2951181531,
0.1372306347,
0.4450312257,
-0.0686328933,
-0.2359067947,
0.3105687201,
-0.0280556288,
-0.179898411,
-0.1254398674,
-0.2167562246,
-0.4200912118,
-0.3174932301,
0.1215162352,
0.202513054,
-0.0256990101,
0.0626203045,
-0.2181412876,
-0.052546192,
-0.1870115697,
0.3138548136,
-0.0666479915,
0.2187057137,
0.1215392351,
0.1070262715,
0.1821811199,
0.126831457,
0.2172589153,
0.2916456461,
-0.0685901865,
0.0877601281,
0.1812860817,
-0.0198487286,
0.298655659,
0.3787653446,
-0.0977900177,
-0.1653562337,
-0.4598183334,
0.4437201619,
-0.5339170098,
-0.0056927083,
0.3493114412,
0.189345479,
-0.3774058521,
-0.4680441022,
0.3122807443,
0.4378612041,
-0.2264337242,
0.3244332075,
-0.3689555228,
-0.3400516212,
0.431077987,
0.2459568083,
1.0425152779,
-0.4180926681,
0.1474302411,
-0.1219955385,
-0.1226692647,
0.2334076613,
-0.2235246897,
0.2028812617,
-0.1204932556,
-0.1521509886,
0.0998856872,
-0.0788353086,
0.2469506413,
0.302749902,
-0.3435835838,
0.1628809422,
0.0121385641,
0.1544173807,
-0.0279073119,
0.0670080781,
0.2419488281,
-0.3951828182,
-0.077989012,
0.1558915526,
0.0974495858,
-0.2486917377,
0.069992505,
0.1840824783,
0.048828043,
-0.3842259049,
-0.2763756216,
-0.0557901338,
-0.2391083986,
0.424926579,
-0.3855214119,
-0.0357595384,
0.1384727657,
0.2917606533,
0.0209084786,
0.3187535703,
0.0544691086,
-0.2226585597,
0.3064108193,
0.3159712851,
0.2370694876,
-0.007357622,
0.0240909774,
0.1245164946,
-0.3129645884,
0.1590854079,
0.0319008194,
-0.1547682434,
-0.277349472,
0.2015645951,
0.1497800946,
-0.0377494134,
0.0626071915,
0.1266822517,
-0.2779558599,
-0.2009114623,
0.1245697364,
0.069226712,
-0.1845236272,
0.6873887181,
-0.1515240222,
-0.5412967205,
-0.0418946445,
0.3999687433,
0.3928995728,
-0.0489329472,
0.2371807098,
-0.0453166328,
-0.2420301437,
-0.2633184493,
0.0626355335,
-0.1891957521,
-0.2120861709,
0.1704222113,
-0.1979534179,
-0.1644145399,
-0.14948605,
-0.1847037822,
-0.1102131903,
0.0472382046,
0.0317660272,
-0.162838757,
-0.5576216578,
-0.095942013,
-0.0174774583,
0.3096827865,
0.027861299,
0.1491666734,
-0.3958248496,
0.273878634,
-0.2793937922,
0.1749605387,
0.0430204347,
0.2951633036,
0.1685283482,
0.1238421723,
0.0481736027,
-0.1176062152,
0.1080875248,
0.4275870919,
-0.090268679,
-0.2311122268,
0.1356226951,
0.1214946806,
-0.2221675813,
-0.4117949009,
-0.1003172249,
-0.1102963611,
-0.1172303855,
-0.3700532913,
0.318164289,
0.2941944301,
-0.0046400116,
0.0415020585,
0.3446666598,
0.0228504166,
0.3782467246,
0.4740271866,
-0.3175376058,
0.4398244619,
-0.1240402088,
0.5029129982,
-0.0006961953,
-0.1194650978,
-0.0664821491,
0.1135385185,
0.1893246919,
0.2019133419,
0.0142614422,
-0.2180065662,
-0.0792208165,
0.3881902397,
0.0022820123,
0.1882446408,
-0.2010737062,
-0.1041809916,
0.213489309,
0.1874676496,
-0.053384088,
-0.1512510329,
0.3261018991,
0.1152946874,
0.040134225,
0.3144670427,
0.1612166315,
-0.1535586864,
-0.2242771983,
0.0629227161,
0.1983853877,
-0.2453487515,
0.0340041406,
0.4191626906,
0.1287705749,
-0.0589252934,
0.1465153396,
0.0083792089,
0.3284141719,
0.7951185703,
0.0146452384,
0.4674239159,
0.2519783974,
0.3775934279,
-0.247575596,
-0.2453171313,
-0.003699987,
0.5978002548,
-0.5198109746,
0.3401628435,
0.1375219524,
0.1434895098,
-0.1845972538,
-0.0176329501,
-0.2620611787,
0.2212813795,
-0.2488323003,
-0.3359469473,
0.2347175181,
-0.067970328,
-0.2230429053,
0.1814351082,
-0.1633816212,
-0.1857767701,
0.7715323567,
0.1256975383,
-0.211180374,
-0.0299293734,
-0.1057046652,
0.106780462,
0.2385017425,
-0.4037964642,
0.0527576283,
-0.1270993054,
0.1256875247,
-0.0163102075,
-0.0895856842,
0.3479722738,
0.4311938584,
-0.3091954291,
0.0066908854,
0.0831449851,
-0.0184261706,
-0.2655333579,
0.2327065468,
-0.1633504331,
0.211930573,
-0.013278055,
0.0194175802,
-0.129264757,
-0.3239422143,
0.3484840691,
0.2820706069,
0.0261899251,
0.2455247194,
0.0140510462,
-0.218970269,
0.0910015479,
-0.1264245957,
-0.2209573388,
-0.4252361357,
0.4463092387,
-0.4778807163,
0.429202944,
-0.1338777691,
0.086355634,
-0.029951008,
0.3474971354,
-0.2645899951,
-0.3152249157,
-0.3324306309,
-0.2019027323,
-0.2512765825,
-0.0072480831,
-0.2229036391,
0.0300773736,
-0.1103310958,
0.1783263981,
-0.2234196514,
0.2558411062,
0.0423540957,
0.0398417972,
0.0681415871,
0.3679829836,
-0.2168519944,
0.1783959717,
-0.0945818499,
0.0818414539,
0.2187576741,
-0.692985177,
0.3271978498,
-0.0742616206,
0.0175316017,
-0.4543446898,
0.1899350733,
-0.0266178362,
0.2580187917,
0.5818485022,
0.3229674399,
0.1431877464,
-0.0801821277,
-0.2579418719,
-0.2280542105,
0.1943675578,
-0.1347554177,
-0.1406234056,
-0.0131776268,
-0.0856253877,
-0.3904078603,
-0.0767764822,
-0.0737422481,
-0.1178446561,
-0.0169846304,
0.0490504317,
-0.3196552396,
-0.0116921384,
0.0686318651,
0.2735217214,
-0.1925984472,
0.2733896375,
0.0418227464,
0.0107283378,
-0.0904777199,
-0.427767247,
0.2736371458,
-0.1582600772,
-0.3398908079,
-0.1713926196,
0.3896194398,
-0.1916780174,
-0.1781105846,
-0.2426634729,
-0.0195116196,
0.1601626724,
-0.0438179448,
-0.463844955,
0.2188517451,
-0.1155027822,
-0.1995621026,
-0.0619688109,
0.2797384262,
0.0230919831,
0.0117797395,
0.2181986272,
-0.4928127229
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi ! Sorry to hear that. This may come from another issue then.
First can we check if this latency comes from the dataset itself ?
You can try to load your dataset and benchmark the speed of querying random examples inside it ?
```python
import time
import numpy as np
from datasets import load_from_disk
dataset = load_from_disk(...) # or from load_dataset...
_start = time.time()
n = 100
for i in np.random.default_rng(42).integers(0, len(dataset), size=n):
_ = dataset[i]
print(time.time() - _start)
```
If we see a significant speed difference between your two datasets then it would mean that there's an issue somewhere | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 101 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi ! Sorry to hear that. This may come from another issue then.
First can we check if this latency comes from the dataset itself ?
You can try to load your dataset and benchmark the speed of querying random examples inside it ?
```python
import time
import numpy as np
from datasets import load_from_disk
dataset = load_from_disk(...) # or from load_dataset...
_start = time.time()
n = 100
for i in np.random.default_rng(42).integers(0, len(dataset), size=n):
_ = dataset[i]
print(time.time() - _start)
```
If we see a significant speed difference between your two datasets then it would mean that there's an issue somewhere | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi @lhoestq, here is the result. I additionally measured time to `load_from_disk`:
* 60GB
```
loading took: 22.618776321411133
ramdom indexing 100 times took: 0.10214924812316895
```
* 600GB
```
loading took: 1176.1764674186707
ramdom indexing 100 times took: 2.853600025177002
```
Hmm.. I double checked that it's version 1.6.0. The difference seems quite big, could it be related to the running environment?
| Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 59 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi @lhoestq, here is the result. I additionally measured time to `load_from_disk`:
* 60GB
```
loading took: 22.618776321411133
ramdom indexing 100 times took: 0.10214924812316895
```
* 600GB
```
loading took: 1176.1764674186707
ramdom indexing 100 times took: 2.853600025177002
```
Hmm.. I double checked that it's version 1.6.0. The difference seems quite big, could it be related to the running environment?
| [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | I'm surprised by the speed change. Can you give more details about your dataset ?
The speed depends on the number of batches in the arrow tables and the distribution of the lengths of the batches.
You can access the batches by doing `dataset.data.to_batches()` (use only for debugging) (it doesn't bring data in memory).
Also can you explain what parameters you used if you used `map` calls ?
Also if you have some code that reproduces the issue I'd be happy to investigate it. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 84 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
I'm surprised by the speed change. Can you give more details about your dataset ?
The speed depends on the number of batches in the arrow tables and the distribution of the lengths of the batches.
You can access the batches by doing `dataset.data.to_batches()` (use only for debugging) (it doesn't bring data in memory).
Also can you explain what parameters you used if you used `map` calls ?
Also if you have some code that reproduces the issue I'd be happy to investigate it. | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Also if you could give us more info about your env like your OS, version of pyarrow and if you're using an HDD or a SSD | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 26 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Also if you could give us more info about your env like your OS, version of pyarrow and if you're using an HDD or a SSD | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Here are some details of my 600GB dataset. This is a dataset AFTER the `map` function and once I load this dataset, I do not use `map` anymore in the training. Regarding the distribution of the lengths, it is almost uniform (90% is 512 tokens, and 10% is randomly shorter than that -- typical setting for language modeling).
```
len(batches):
492763
batches[0]:
pyarrow.RecordBatch
attention_mask: list<item: uint8>
child 0, item: uint8
input_ids: list<item: int16>
child 0, item: int16
special_tokens_mask: list<item: uint8>
child 0, item: uint8
token_type_ids: list<item: uint8>
child 0, item: uint8
```
Here the some parameters to `map` function just in case it is relevant:
```
num_proc=1 # as multi processing is slower in my case
load_from_cache_file=False
```
| Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 118 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Here are some details of my 600GB dataset. This is a dataset AFTER the `map` function and once I load this dataset, I do not use `map` anymore in the training. Regarding the distribution of the lengths, it is almost uniform (90% is 512 tokens, and 10% is randomly shorter than that -- typical setting for language modeling).
```
len(batches):
492763
batches[0]:
pyarrow.RecordBatch
attention_mask: list<item: uint8>
child 0, item: uint8
input_ids: list<item: int16>
child 0, item: int16
special_tokens_mask: list<item: uint8>
child 0, item: uint8
token_type_ids: list<item: uint8>
child 0, item: uint8
```
Here the some parameters to `map` function just in case it is relevant:
```
num_proc=1 # as multi processing is slower in my case
load_from_cache_file=False
```
| [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Regarding the environment, I am running the code on a cloud server. Here are some info:
```
Ubuntu 18.04.5 LTS # cat /etc/issue
pyarrow 3.0.0 # pip list | grep pyarrow
```
The data is stored in SSD and it is mounted to the machine via Network File System.
If you could point me to some of the commands to check the details of the environment, I would be happy to provide relevant information @lhoestq ! | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 76 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Regarding the environment, I am running the code on a cloud server. Here are some info:
```
Ubuntu 18.04.5 LTS # cat /etc/issue
pyarrow 3.0.0 # pip list | grep pyarrow
```
The data is stored in SSD and it is mounted to the machine via Network File System.
If you could point me to some of the commands to check the details of the environment, I would be happy to provide relevant information @lhoestq ! | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | I am not sure how I could provide you with the reproducible code, since the problem only arises when the data is big. For the moment, I would share the part that I think is relevant. Feel free to ask me for more info.
```python
class MyModel(pytorch_lightning.LightningModule)
def setup(self, stage):
self.dataset = datasets.load_from_disk(path)
self.dataset.set_format("torch")
def train_dataloader(self):
collate_fn = transformers.DataCollatorForLanguageModeling(
tokenizer=transformers.ElectraTokenizerFast.from_pretrained(tok_path)
)
dataloader = torch.utils.DataLoader(
self.dataset,
batch_size=32,
collate_fn=collate_fn,
num_workers=8,
pin_memory=True,
)
``` | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 71 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
I am not sure how I could provide you with the reproducible code, since the problem only arises when the data is big. For the moment, I would share the part that I think is relevant. Feel free to ask me for more info.
```python
class MyModel(pytorch_lightning.LightningModule)
def setup(self, stage):
self.dataset = datasets.load_from_disk(path)
self.dataset.set_format("torch")
def train_dataloader(self):
collate_fn = transformers.DataCollatorForLanguageModeling(
tokenizer=transformers.ElectraTokenizerFast.from_pretrained(tok_path)
)
dataloader = torch.utils.DataLoader(
self.dataset,
batch_size=32,
collate_fn=collate_fn,
num_workers=8,
pin_memory=True,
)
``` | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi ! Sorry for the delay I haven't had a chance to take a look at this yet. Are you still experiencing this issue ?
I'm asking because the latest patch release 1.6.2 fixed a few memory issues that could have lead to slow downs | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 45 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi ! Sorry for the delay I haven't had a chance to take a look at this yet. Are you still experiencing this issue ?
I'm asking because the latest patch release 1.6.2 fixed a few memory issues that could have lead to slow downs | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi! I just ran the same code with different datasets (one is 60 GB and another 600 GB), and the latter runs much slower. ETA differs by 10x. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 28 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi! I just ran the same code with different datasets (one is 60 GB and another 600 GB), and the latter runs much slower. ETA differs by 10x. | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq and @hwijeen
Despite upgrading to datasets 1.6.2, still experiencing extremely slow (2h00) loading for a 300Gb local dataset shard size 1.1Gb on local HDD (40Mb/s read speed). This corresponds almost exactly to total data divided by reading speed implying that it reads the entire dataset at each load.
Stack details:
=========
> GCC version: Could not collect
> Clang version: Could not collect
> CMake version: Could not collect
>
> Python version: 3.7 (64-bit runtime)
> Is CUDA available: True
> CUDA runtime version: 10.2.89
> GPU models and configuration: GPU 0: GeForce GTX 1050
> Nvidia driver version: 457.63
> cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\cudnn64_7.dll
> HIP runtime version: N/A
> MIOpen runtime version: N/A
>
> Versions of relevant libraries:
> [pip3] datasets==1.6.2
> [pip3] transformers==4.5.1
> [pip3] numpy==1.19.1
> [pip3] numpydoc==1.1.0
> [pip3] pytorch-metric-learning==0.9.98
> [pip3] torch==1.8.1
> [pip3] torchaudio==0.8.1
> [pip3] torchvision==0.2.2
> [conda] blas 2.16 mkl conda-forge
> [conda] cudatoolkit 10.2.89 hb195166_8 conda-forge
> [conda] libblas 3.8.0 16_mkl conda-forge
> [conda] libcblas 3.8.0 16_mkl conda-forge
> [conda] liblapack 3.8.0 16_mkl conda-forge
> [conda] liblapacke 3.8.0 16_mkl conda-forge
> [conda] mkl 2020.1 216
> [conda] numpy 1.19.1 py37hae9e721_0 conda-forge
> [conda] numpydoc 1.1.0 py_1 conda-forge
> [conda] pytorch 1.8.1 py3.7_cuda10.2_cudnn7_0 pytorch
> [conda] pytorch-metric-learning 0.9.98 pyh39e3cac_0 metric-learning
> [conda] torchaudio 0.8.1 py37 pytorch
> [conda] torchvision 0.2.2 py_3 pytorch | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 227 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq and @hwijeen
Despite upgrading to datasets 1.6.2, still experiencing extremely slow (2h00) loading for a 300Gb local dataset shard size 1.1Gb on local HDD (40Mb/s read speed). This corresponds almost exactly to total data divided by reading speed implying that it reads the entire dataset at each load.
Stack details:
=========
> GCC version: Could not collect
> Clang version: Could not collect
> CMake version: Could not collect
>
> Python version: 3.7 (64-bit runtime)
> Is CUDA available: True
> CUDA runtime version: 10.2.89
> GPU models and configuration: GPU 0: GeForce GTX 1050
> Nvidia driver version: 457.63
> cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\cudnn64_7.dll
> HIP runtime version: N/A
> MIOpen runtime version: N/A
>
> Versions of relevant libraries:
> [pip3] datasets==1.6.2
> [pip3] transformers==4.5.1
> [pip3] numpy==1.19.1
> [pip3] numpydoc==1.1.0
> [pip3] pytorch-metric-learning==0.9.98
> [pip3] torch==1.8.1
> [pip3] torchaudio==0.8.1
> [pip3] torchvision==0.2.2
> [conda] blas 2.16 mkl conda-forge
> [conda] cudatoolkit 10.2.89 hb195166_8 conda-forge
> [conda] libblas 3.8.0 16_mkl conda-forge
> [conda] libcblas 3.8.0 16_mkl conda-forge
> [conda] liblapack 3.8.0 16_mkl conda-forge
> [conda] liblapacke 3.8.0 16_mkl conda-forge
> [conda] mkl 2020.1 216
> [conda] numpy 1.19.1 py37hae9e721_0 conda-forge
> [conda] numpydoc 1.1.0 py_1 conda-forge
> [conda] pytorch 1.8.1 py3.7_cuda10.2_cudnn7_0 pytorch
> [conda] pytorch-metric-learning 0.9.98 pyh39e3cac_0 metric-learning
> [conda] torchaudio 0.8.1 py37 pytorch
> [conda] torchvision 0.2.2 py_3 pytorch | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi @lhoestq thanks for the quick turn-around, actually the plain vanilla way, without an particular knack or fashion, I tried to look into the documentation for some alternative but couldn't find any
> dataset = load_from_disk(dataset_path=os.path.join(datasets_dir,dataset_dir)) | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 36 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi @lhoestq thanks for the quick turn-around, actually the plain vanilla way, without an particular knack or fashion, I tried to look into the documentation for some alternative but couldn't find any
> dataset = load_from_disk(dataset_path=os.path.join(datasets_dir,dataset_dir)) | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | I’m facing the same issue when loading a 900GB dataset (stored via `save_to_disk`): `load_from_disk(path_to_dir)` takes 1.5 hours and htop consistently shows high IO rates > 120 M/s. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 27 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
I’m facing the same issue when loading a 900GB dataset (stored via `save_to_disk`): `load_from_disk(path_to_dir)` takes 1.5 hours and htop consistently shows high IO rates > 120 M/s. | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @tsproisl same here, smells like ~~teen spirit~~ intended generator inadvertently ending up iterator
@lhoestq perhaps solution to detect bug location in code is to track its signature via HD read usage monitoring, option is to add tracking decorator on top each function and sequentially close all hatches from top to bottom, suggest PySmart https://pypi.org/project/pySMART/ a Smartmontools implementation | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 57 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@tsproisl same here, smells like ~~teen spirit~~ intended generator inadvertently ending up iterator
@lhoestq perhaps solution to detect bug location in code is to track its signature via HD read usage monitoring, option is to add tracking decorator on top each function and sequentially close all hatches from top to bottom, suggest PySmart https://pypi.org/project/pySMART/ a Smartmontools implementation | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | I wasn't able to reproduce this on a toy dataset of around 300GB:
```python
import datasets as ds
s = ds.load_dataset("squad", split="train")
s4000 = ds.concatenate_datasets([s] * 4000)
print(ds.utils.size_str(s4000.data.nbytes)) # '295.48 GiB'
s4000.save_to_disk("tmp/squad_4000")
```
```python
import psutil
import time
from datasets import load_from_disk
disk = "disk0" # You may have to change your disk here
iocnt1 = psutil.disk_io_counters(perdisk=True)[disk]
time1 = time.time()
s4000_reloaded = load_from_disk("tmp/squad_4000")
time2 = time.time()
iocnt2 = psutil.disk_io_counters(perdisk=True)[disk]
print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18
print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s
```
Could you run this on your side and tell me if how much time it takes ? Please run this when your machine is idle so that other processes don't interfere.
I got these results on my macbook pro on datasets 1.6.2 | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 130 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
I wasn't able to reproduce this on a toy dataset of around 300GB:
```python
import datasets as ds
s = ds.load_dataset("squad", split="train")
s4000 = ds.concatenate_datasets([s] * 4000)
print(ds.utils.size_str(s4000.data.nbytes)) # '295.48 GiB'
s4000.save_to_disk("tmp/squad_4000")
```
```python
import psutil
import time
from datasets import load_from_disk
disk = "disk0" # You may have to change your disk here
iocnt1 = psutil.disk_io_counters(perdisk=True)[disk]
time1 = time.time()
s4000_reloaded = load_from_disk("tmp/squad_4000")
time2 = time.time()
iocnt2 = psutil.disk_io_counters(perdisk=True)[disk]
print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18
print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s
```
Could you run this on your side and tell me if how much time it takes ? Please run this when your machine is idle so that other processes don't interfere.
I got these results on my macbook pro on datasets 1.6.2 | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Just tried on google colab and got ~1min for a 15GB dataset (only 200 times SQuAD), while it should be instantaneous. The time is spent reading the Apache Arrow table from the memory mapped file. This might come a virtual disk management issue. I'm trying to see if I can still speed it up on colab. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 56 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Just tried on google colab and got ~1min for a 15GB dataset (only 200 times SQuAD), while it should be instantaneous. The time is spent reading the Apache Arrow table from the memory mapped file. This might come a virtual disk management issue. I'm trying to see if I can still speed it up on colab. | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq what is Google Colab's HD read speed, is it possible to introspect incl. make like SSD or HDD ? | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 20 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq what is Google Colab's HD read speed, is it possible to introspect incl. make like SSD or HDD ? | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq Thank you! The issue is getting more interesting. The second script is still running, but it's definitely taking much longer than 15 seconds. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 24 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq Thank you! The issue is getting more interesting. The second script is still running, but it's definitely taking much longer than 15 seconds. | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Okay, here’s the ouput:
Blocks read 158396
Elapsed time: 529.10s
Also using datasets 1.6.2. Do you have any ideas, how to pinpoint the problem? | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 24 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Okay, here’s the ouput:
Blocks read 158396
Elapsed time: 529.10s
Also using datasets 1.6.2. Do you have any ideas, how to pinpoint the problem? | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq, @tsproisl mmmh still writing on my side about 1h to go, thinking on it are your large datasets all monoblock unsharded ? mine is 335 times 1.18Gb shards. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 29 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq, @tsproisl mmmh still writing on my side about 1h to go, thinking on it are your large datasets all monoblock unsharded ? mine is 335 times 1.18Gb shards. | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | The 529.10s was a bit too optimistic. I cancelled the reading process once before running it completely, therefore the harddrive cache probably did its work.
Here are three consecutive runs
First run (freshly written to disk):
Blocks read 309702
Elapsed time: 1267.74s
Second run (immediately after):
Blocks read 113944
Elapsed time: 417.55s
Third run (immediately after):
Blocks read 42518
Elapsed time: 199.19s
| Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 62 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
The 529.10s was a bit too optimistic. I cancelled the reading process once before running it completely, therefore the harddrive cache probably did its work.
Here are three consecutive runs
First run (freshly written to disk):
Blocks read 309702
Elapsed time: 1267.74s
Second run (immediately after):
Blocks read 113944
Elapsed time: 417.55s
Third run (immediately after):
Blocks read 42518
Elapsed time: 199.19s
| [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq
First test
> elapsed time: 11219.05s
Second test running bear with me, for Windows users slight trick to modify original "disk0" string:
First find physical unit relevant key in dictionnary
```
import psutil
psutil.disk_io_counters(perdisk=True)
```
> {'PhysicalDrive0': sdiskio(read_count=18453286, write_count=4075333, read_bytes=479546467840, write_bytes=161590275072, read_time=20659, write_time=2464),
> 'PhysicalDrive1': sdiskio(read_count=1495778, write_count=388781, read_bytes=548628622336, write_bytes=318234849280, read_time=426066, write_time=19085)}
In my case it's _PhysicalDrive1_
Then insert relevant key's string as _disk_ variable
```
psutil.disk_io_counters()
disk = 'PhysicalDrive1' # You may have to change your disk here
iocnt1 = psutil.disk_io_counters(perdisk=True)[disk]
time1 = time.time()
s4000_reloaded = load_from_disk("your path here")
time2 = time.time()
iocnt2 = psutil.disk_io_counters(perdisk=True)[disk]
print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18
print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s
``` | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 115 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq
First test
> elapsed time: 11219.05s
Second test running bear with me, for Windows users slight trick to modify original "disk0" string:
First find physical unit relevant key in dictionnary
```
import psutil
psutil.disk_io_counters(perdisk=True)
```
> {'PhysicalDrive0': sdiskio(read_count=18453286, write_count=4075333, read_bytes=479546467840, write_bytes=161590275072, read_time=20659, write_time=2464),
> 'PhysicalDrive1': sdiskio(read_count=1495778, write_count=388781, read_bytes=548628622336, write_bytes=318234849280, read_time=426066, write_time=19085)}
In my case it's _PhysicalDrive1_
Then insert relevant key's string as _disk_ variable
```
psutil.disk_io_counters()
disk = 'PhysicalDrive1' # You may have to change your disk here
iocnt1 = psutil.disk_io_counters(perdisk=True)[disk]
time1 = time.time()
s4000_reloaded = load_from_disk("your path here")
time2 = time.time()
iocnt2 = psutil.disk_io_counters(perdisk=True)[disk]
print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18
print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s
``` | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Unfortunately no. Thanks for running the benchmark though, it shows that you machine does a lot of read operations. This is not expected: in other machines it does almost no read operations which enables a very fast loading.
I did some tests on google colab and have the same issue. The first time the dataset arrow file is memory mapped takes always a lot of time (time seems linear with respect to the dataset size). Reloading the dataset is then instantaneous since the arrow file has already been memory mapped.
I also tried using the Arrow IPC file format (see #1933) instead of the current streaming format that we use but it didn't help.
Memory mapping is handled by the OS and depends on the disk you're using, so I'm not sure we can do much about it. I'll continue to investigate anyway, because I still don't know why in some cases it would go through the entire file (high `Blocks read ` as in your tests) and in other cases it would do almost no reading. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 177 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Unfortunately no. Thanks for running the benchmark though, it shows that you machine does a lot of read operations. This is not expected: in other machines it does almost no read operations which enables a very fast loading.
I did some tests on google colab and have the same issue. The first time the dataset arrow file is memory mapped takes always a lot of time (time seems linear with respect to the dataset size). Reloading the dataset is then instantaneous since the arrow file has already been memory mapped.
I also tried using the Arrow IPC file format (see #1933) instead of the current streaming format that we use but it didn't help.
Memory mapping is handled by the OS and depends on the disk you're using, so I'm not sure we can do much about it. I'll continue to investigate anyway, because I still don't know why in some cases it would go through the entire file (high `Blocks read ` as in your tests) and in other cases it would do almost no reading. | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Just want to say that I am seeing the same issue. Dataset size if 268GB and it takes **3 hours** to load `load_from_disk`, using dataset version `1.9.0`. Filesystem underneath is `Lustre` | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 31 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Just want to say that I am seeing the same issue. Dataset size if 268GB and it takes **3 hours** to load `load_from_disk`, using dataset version `1.9.0`. Filesystem underneath is `Lustre` | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi @lhoestq, confirmed Windows issue, exact same code running on Linux OS total loading time about 3 minutes. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 18 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi @lhoestq, confirmed Windows issue, exact same code running on Linux OS total loading time about 3 minutes. | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hmm that's different from what I got. I was on Ubuntu when reporting the initial issue. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 16 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hmm that's different from what I got. I was on Ubuntu when reporting the initial issue. | [
-0.4040594697,
0.2139613926,
-0.1343097538,
0.1632937044,
0.2269002348,
-0.1808894873,
0.2195486724,
0.4007900655,
0.1186831445,
-0.0092016449,
-0.3094537854,
0.0660658255,
0.1796628684,
0.1480763704,
-0.1164038032,
0.1400314867,
0.010011836,
0.0462013781,
-0.1018279493,
-0.0599148571,
0.0717089251,
-0.1256885976,
0.0162408426,
-0.2149129063,
-0.3218289316,
-0.0351727866,
0.2733655572,
0.0361014046,
-0.2680940926,
-0.1831434667,
0.2045997083,
0.2419510931,
0.0882459432,
0.3962605894,
-0.0001050314,
-0.0951046795,
0.3049378097,
0.0726465583,
-0.247320354,
0.1302321404,
0.054252658,
-0.3366992474,
-0.1207267419,
0.1083628908,
-0.035014838,
0.1210586205,
-0.2277351022,
-0.0067850854,
0.3558997512,
0.1554211527,
0.258639276,
0.0054165698,
-0.2216919065,
-0.3251928985,
0.1556023657,
0.2288568765,
-0.2061293274,
0.3163352907,
0.4986958504,
-0.1909873188,
-0.534776628,
0.0420747809,
-0.0375933647,
0.1030171141,
-0.2523979843,
-0.0648474097,
0.1814324856,
-0.0184337962,
0.228866756,
0.2305987775,
0.5177356601,
0.2850898504,
-0.3112404346,
-0.2834502161,
-0.3231845498,
-0.3884500563,
0.2092756182,
-0.0874327496,
-0.0877028182,
0.0355128571,
-0.2518313229,
-0.2028425783,
0.0418955758,
-0.0694679171,
-0.3781086504,
-0.1201940626,
-0.0730067939,
-0.0856000334,
0.1283760071,
-0.2761491835,
0.2117173225,
-0.0886536166,
0.1636078507,
0.1016131192,
-0.567292273,
-0.053796228,
0.3513720334,
0.0552258305,
0.1529626399,
0.2054212689,
0.1399327964,
0.2763735354,
0.0849818364,
-0.2167821676,
0.3756535947,
0.2172036022,
-0.2070671618,
-0.0734168962,
0.4972684085,
0.171517089,
-0.2257166058,
0.0879860073,
-0.1456318498,
-0.0804973841,
0.0692877695,
-0.2820040584,
-0.1707883179,
-0.3726627827,
-0.3188099861,
0.2520971298,
0.1120119765,
0.0482921675,
0.1105854139,
0.3219352365,
-0.0813054219,
0.4326563478,
0.0139111169,
-0.1857734472,
-0.1517120749,
-0.213265121,
-0.2128108442,
-0.2773061693,
-0.4498107433,
0.1449788064,
0.4436467886,
0.0247753207,
0.0010010449,
0.2090332806,
0.1273998618,
-0.0103910752,
-0.2007551491,
-0.3551880717,
-0.2446887046,
0.1974932849,
-0.1794242859,
0.3334898353,
-0.1749724895,
0.1509914845,
-0.1955758184,
0.1619164348,
-0.3553526998,
-0.2452232689,
0.3079732358,
0.302539438,
-0.1045794412,
-0.0446105786,
-0.4129052162,
0.2642709613,
-0.1100948304,
0.0590914376,
-0.133437708,
-0.023763461,
-0.1063726023,
-0.0018750952,
0.0808164552,
0.2770811915,
-0.3943965733,
0.1528885216,
-0.221190691,
0.1494279951,
0.1306660622,
0.3977420628,
-0.3263542056,
0.087610513,
-0.1106215343,
0.0166786592,
0.1702521294,
-0.3009160459,
-0.5397738814,
0.3998308778,
-0.2098787576,
0.1034382433,
0.1209400296,
-0.0182543639,
0.3900323808,
-0.2471283823,
0.2662605941,
0.5497130752,
0.0612693503,
0.1136699393,
-0.3252186775,
-0.104757078,
-0.0337087587,
0.5643472672,
0.1143968329,
-0.110496603,
0.1361207068,
0.0966814831,
0.1597174704,
0.0527683906,
-0.0750205889,
0.134538874,
0.1969805062,
-0.0893594921,
-0.0232278276,
0.1839111,
-0.4957304299,
0.4001033008,
-0.0450962149,
-0.2439487427,
0.3706955314,
0.0798823237,
-0.1051796675,
-0.179206565,
-0.1787631661,
0.1509505659,
0.1051252931,
-0.1905719787,
-0.0538966693,
0.1902867854,
0.138385728,
0.3167603016,
-0.3021214008,
-0.001923518,
0.0116817979,
0.1035131589,
0.1402072906,
-0.081319958,
0.1752836853,
-0.0305483192,
0.0584350862,
-0.0661690757,
-0.0891323388,
0.0895659328,
0.1268128604,
0.3413230777,
-0.0124413231,
0.2423079312,
0.1456025988,
0.3362044096,
0.108620137,
-0.029366307,
0.0543255918,
-0.3189198971,
-0.2518001795,
0.4823023081,
-0.0920581743,
0.1507881284,
0.1164513156,
-0.3269927204,
0.4123487175,
-0.1484993249,
0.2559313178,
0.2874786556,
0.553679049,
0.0951027423,
0.4025274813,
0.2306760997,
-0.2004446089,
0.2244459242,
0.2324169427,
-0.0279098097,
-0.342545867,
0.1649187505,
-0.051567398,
-0.2804046273,
0.0083009582,
0.0587804243,
0.5520929694,
0.1125909835,
0.0406087004,
-0.1931915283,
0.4311435521,
-0.3056516051,
0.2764782012,
-0.0137505233,
0.0817664117,
0.4084941745,
0.4574065506,
-0.2098319083,
-0.4086070061,
-0.1135862991,
0.3819159567,
0.1469848901,
-0.0728043541,
-0.1258426011,
-0.2039956003,
-0.0578329265,
-0.0548910052,
-0.1194076762,
-0.2367260307,
-0.268053472,
0.0132280309,
0.3044425547,
-0.0600870103,
0.0084872097,
-0.2665055394,
0.5148741007,
0.0486835875,
-0.0543115698,
-0.4178196788,
-0.0225868989,
-0.215959385,
0.1583642364,
0.1625200659,
-0.2993915081,
0.2113572955,
0.1774644107,
-0.0072440128,
-0.0192260668,
-0.3806326389,
0.0831742659,
0.247445941,
0.0479116701,
-0.2346096337,
0.014320951,
0.1991361678,
0.006342398,
0.0695415437,
-0.3881141841,
-0.1075754985,
0.0090647908,
-0.0538932309,
0.1783519834,
0.054212369,
-0.2898904085,
-0.1657840163,
-0.462560147,
0.2143461257,
-0.1899101138,
0.0008024769,
0.2282610089,
-0.1258067042,
0.0544252843,
0.0254091602,
-0.1182289645,
-0.2713722289,
-0.5140331984,
0.3919063509,
-0.0605121478,
-0.3088649809,
-0.2225768864,
0.1292106956,
-0.0127305016,
0.2743842304,
-0.4091224074,
0.1720884591,
-0.2697907388,
0.1982391179,
0.0265611783,
-0.088687852,
0.0365646929,
-0.2912845016,
-0.2206211686,
-0.0252423268,
-0.0509683676,
0.1468975246,
0.2361963391,
0.3168798685,
-0.2697791159,
0.3415643871,
0.1393635869,
0.48499313,
0.0297216009,
-0.0464569852,
0.3064986765,
0.3087260723,
0.1859565526,
-0.2166089118,
-0.1917748898,
0.0240002181,
-0.2419842333,
-0.1816828102,
0.3324070573,
-0.0094316229,
-0.4836246073,
-0.0519545078,
-0.027916735,
0.2211066484,
-0.1555523723,
0.2269754857,
-0.146874696,
0.0044931248,
0.1748712659,
0.0506790355,
-0.248534888,
-0.2570215762,
0.0509834141,
-0.2897285521,
0.1129224151,
-0.2460880727,
-0.1308771074,
0.3246517479,
-0.6654966474,
0.0506279729,
-0.1267723888,
0.3393505216,
0.1319968253,
-0.0208719764,
0.2086360604,
0.046803914,
0.5165271759,
0.0898200199,
0.1393017769,
0.0003714116,
-0.4541064501,
0.0226786695,
-0.2141716182,
-0.0514462106,
0.0486917123,
0.3995552361,
0.3858706653,
-0.3827712536,
-0.14801085,
-0.0237371996,
-0.0528076477,
-0.2226080745,
-0.2605672777,
-0.005554962,
0.1305887848,
0.128498584,
0.2395778745,
0.1507948786,
0.1218814626,
-0.2085507065,
-0.0549902283,
-0.0681532323,
0.1829020083,
0.2443774939,
-0.1095464155,
0.1049960107,
0.0346528627,
0.5330204964,
0.2021950036,
0.1620400548,
0.391648531,
0.5336759686,
-0.0214429367,
-0.0590331554,
0.1207184792,
0.0848850161,
0.132970944,
0.5663325191,
0.1114223227,
0.0659486055,
-0.3181548119,
0.0906943157,
-0.1745758951,
0.1184813157,
0.1554065198,
-0.1474260539,
-0.3094096184,
-0.1591172665,
0.5107485652,
0.010608484,
0.041992113,
0.1951283216,
-0.2514155805,
-0.0468579568,
0.0357322507,
-0.1320941299,
0.8368296027,
-0.0260927696,
0.104034707,
-0.068080239,
-0.004017828,
0.2523505092,
-0.3498372138,
-0.0505504943,
-0.2066834122,
-0.1628440768,
0.2075825185,
-0.0653008297,
-0.0392132737,
0.2160118371,
0.1681976914,
0.1074094847,
-0.0210479759,
0.3766250014,
-0.1330873668,
0.2871602476,
0.1428233385,
-0.1990965456,
-0.1988935769,
0.2173182368,
-0.1519215703,
-0.0115481317,
-0.059367381,
-0.0738367662,
-0.0321621411,
0.0265140776,
-0.0823038071,
0.0418742672,
-0.1302342713,
0.3452497125,
-0.0467488319,
-0.3350999653,
0.1721289009,
-0.2237442732,
-0.4176704586,
-0.0647134557,
-0.2056356519,
0.3521541953,
-0.1278086007,
0.383657515,
0.357584089,
-0.2768971622,
0.2228884548,
-0.0734644383,
0.0860967785,
-0.1276027858,
-0.0200733878,
-0.2176636904,
-0.2408338785,
0.0453494228,
0.1819570214,
-0.2663727999,
-0.1333115995,
0.0646921769,
0.1159256473,
-0.1442126483,
0.2071657181,
0.1312048584,
0.160945788,
0.317206949,
0.0431220047,
-0.1773991883,
-0.2193928659,
0.6642944217,
-0.0262713768,
-0.2106988132,
0.3752239347,
0.1622524261,
-0.365577668,
-0.121623233,
0.0316353664,
0.3744309247,
-0.4561284482,
0.3150388896,
-0.2884171009,
-0.0785708278,
0.2572209239,
0.0436804816,
-0.0155681958,
-0.4285442531,
0.0068616914,
-0.214542523,
-0.2761790156,
0.0276388824,
-0.0778126419,
0.1018893644,
-0.3613103926,
-0.105253242,
-0.1253166497,
0.3255429864,
-0.3826212585,
0.2146105319,
0.067927815,
0.1204811484,
-0.1848233342,
-0.422362864,
-0.0113014933,
-0.0841147229,
0.107069999,
0.1057986841,
-0.1574968398,
-0.3501000404,
-0.0694131851,
0.112511903,
-0.0117712338,
-0.0029521058,
0.127309233,
-0.3357500434,
-0.0294347368,
-0.1573072076,
0.0086400593,
0.1867411882,
0.0523038059,
-0.3707134426,
0.2300565839,
0.0784842446,
-0.0203801803,
0.3685418963,
0.010748974,
0.1475578547,
0.1166395321,
0.1964166313,
-0.1105830371,
-0.2409085482,
-0.1624664813,
-0.1184790954,
0.2805276215,
-0.046704039,
0.321560055,
-0.3202124834,
-0.0950986296,
0.2012293339,
0.3612820208,
0.5668724179,
-0.0242243521,
-0.380412817,
0.0732545108,
0.2727664709,
-0.153949514,
-0.1301028728,
0.0856585503,
0.0380622186,
-0.1332578659,
0.0265710335,
0.3532827795,
-0.1669160128,
0.1675896049,
0.1402466148,
0.4464416504,
0.097435236,
-0.0348314568,
0.1065551713,
0.1278483719,
0.0280680396,
0.587279737,
0.2597627044,
0.0650207549,
0.4543121457,
0.0269574095,
0.3439673483,
0.0912300125,
0.1599011421,
0.0254586656,
-0.4160401523,
-0.109056212,
0.3545897007,
-0.3630832136,
0.0509820916,
-0.0628616363,
0.1160134599,
0.0191870499,
0.0246345066,
-0.3914383948,
0.0497358777,
-0.2921126187,
-0.054396525,
0.1644136012,
-0.1611651331,
-0.0829839185,
0.243295908,
-0.2323414236,
0.0507891439,
0.4543321431,
0.290466398,
-0.0613239184,
-0.4144063294,
-0.2544575036,
-0.1119510755,
0.1596447974,
-0.245005101,
0.1634243131,
-0.0468113907,
-0.1688563973,
0.104856655,
0.2044881433,
0.1834545732,
0.3097060025,
0.1034326106,
-0.0217747539,
0.0743549839,
-0.0863785669,
-0.1377559155,
0.5175188184,
-0.0090703117,
0.1067919508,
0.160263896,
0.1014398634,
-0.3488076627,
-0.2175480723,
-0.075773254,
-0.1216346845,
-0.2066870928,
0.1268770397,
0.2536278963,
-0.1020720005,
-0.3327091634,
-0.2038651705,
0.0937746167,
-0.2198896557,
0.2739770114,
-0.2362271994,
0.0659083948,
-0.1743783653,
0.1296192855,
-0.3521492183,
0.5997632742,
0.0962919295,
0.0063369954,
-0.4889294803,
-0.047026366,
-0.4901947677,
0.1136226207,
-0.2887199819,
0.3211908638,
0.1183495224,
0.5177028775,
-0.0065306667,
0.0363755859,
-0.0883132741,
0.114680849,
0.0202271398,
0.0085201263,
-0.4558710158,
0.2321362644,
-0.0280460157,
0.0410676412,
-0.1092435047,
-0.4895463884,
0.3563458025,
-0.0153238066,
0.0828862935,
-0.2241466492,
-0.1388384998,
0.184108302,
0.4946782887,
0.399611026,
0.0950392336,
0.2468270808,
0.1787796617,
-0.1524982005,
-0.3793300986,
-0.2371510714,
-0.0333090611,
-0.1625072211,
0.0524968505,
-0.0921577662,
0.0710345805,
-0.0117715988,
0.0052400106,
0.1160592362,
-0.2415508777,
-0.0463600606,
-0.1688951552,
-0.3302363455,
0.0503663346,
0.3088819683,
0.0663309768,
0.3367392123,
-0.1124829054,
0.0192809626,
-0.4977090359,
-0.386077553,
0.332539171,
-0.3619927466,
-0.1143822968,
-0.2368952781,
0.4293967485,
0.3034189641,
0.2264498323,
-0.2960948348,
-0.0187425576,
0.1793894321,
-0.1053810939,
-0.0332278572,
0.4777286947,
-0.0485652797,
0.0319642574,
-0.0503286459,
0.2442064881,
0.0583080314,
-0.2495267242,
-0.1617681533,
-0.0234537348
] |
https://github.com/huggingface/datasets/issues/2250 | some issue in loading local txt file as Dataset for run_mlm.py | Hi,
1. try
```python
dataset = load_dataset("text", data_files={"train": ["a1.txt", "b1.txt"], "test": ["c1.txt"]})
```
instead.
Sadly, I can't reproduce the error on my machine. If the above code doesn't resolve the issue, try to update the library to the
newest version (`pip install datasets --upgrade`).
2. https://github.com/huggingface/transformers/blob/3ed5e97ba04ce9b24b4a7161ea74572598a4c480/examples/pytorch/language-modeling/run_mlm.py#L258-L259
This is the original code. You'll have to modify the example source to work with multiple train files. To make it easier, let's say "|" will act as a delimiter between files:
```python
if data_args.train_file is not None:
data_files["train"] = data_args.train_file.split("|") # + .split("|")
```
Then call the script as follows (**dataset_name must be None**):
```bash
python run_mlm.py [... other args] --train_file a1.txt|b1.txt
``` | ![image](https://user-images.githubusercontent.com/14968123/115773877-18cef300-a3c6-11eb-8e58-a9cbfd1001ec.png)
first of all, I tried to load 3 .txt files as a dataset (sure that the directory and permission is OK.), I face with the below error.
> FileNotFoundError: [Errno 2] No such file or directory: 'c'
by removing one of the training .txt files It's fixed and although if I put all file as training it's ok
![image](https://user-images.githubusercontent.com/14968123/115774207-867b1f00-a3c6-11eb-953b-905cfb112d25.png)
![image](https://user-images.githubusercontent.com/14968123/115774264-9b57b280-a3c6-11eb-9f36-7b109f0e5a31.png)
after this, my question is how could I use this defined Dataset for run_mlm.py for from scratch pretraining.
by using --train_file path_to_train_file just can use one .txt , .csv or, .json file. I tried to set my defined Dataset as --dataset_name but the below issue occurs.
> Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 336, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 291, in cached_path
use_auth_token=download_config.use_auth_token,
File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 621, in get_from_cache
raise FileNotFoundError("Couldn't find file at {}".format(url))
FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/master/datasets/dataset/dataset.py
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
File "run_mlm.py", line 486, in <module>
main()
File "run_mlm.py", line 242, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name, cache_dir=model_args.cache_dir)
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 719, in load_dataset
use_auth_token=use_auth_token,
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 347, in prepare_module
combined_path, github_file_path
FileNotFoundError: Couldn't find file locally at dataset/dataset.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.6.0/datasets/dataset/dataset.py.
The file is also not present on the master branch on github.
| 110 | some issue in loading local txt file as Dataset for run_mlm.py
![image](https://user-images.githubusercontent.com/14968123/115773877-18cef300-a3c6-11eb-8e58-a9cbfd1001ec.png)
first of all, I tried to load 3 .txt files as a dataset (sure that the directory and permission is OK.), I face with the below error.
> FileNotFoundError: [Errno 2] No such file or directory: 'c'
by removing one of the training .txt files It's fixed and although if I put all file as training it's ok
![image](https://user-images.githubusercontent.com/14968123/115774207-867b1f00-a3c6-11eb-953b-905cfb112d25.png)
![image](https://user-images.githubusercontent.com/14968123/115774264-9b57b280-a3c6-11eb-9f36-7b109f0e5a31.png)
after this, my question is how could I use this defined Dataset for run_mlm.py for from scratch pretraining.
by using --train_file path_to_train_file just can use one .txt , .csv or, .json file. I tried to set my defined Dataset as --dataset_name but the below issue occurs.
> Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 336, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 291, in cached_path
use_auth_token=download_config.use_auth_token,
File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 621, in get_from_cache
raise FileNotFoundError("Couldn't find file at {}".format(url))
FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/master/datasets/dataset/dataset.py
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
File "run_mlm.py", line 486, in <module>
main()
File "run_mlm.py", line 242, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name, cache_dir=model_args.cache_dir)
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 719, in load_dataset
use_auth_token=use_auth_token,
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 347, in prepare_module
combined_path, github_file_path
FileNotFoundError: Couldn't find file locally at dataset/dataset.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.6.0/datasets/dataset/dataset.py.
The file is also not present on the master branch on github.
Hi,
1. try
```python
dataset = load_dataset("text", data_files={"train": ["a1.txt", "b1.txt"], "test": ["c1.txt"]})
```
instead.
Sadly, I can't reproduce the error on my machine. If the above code doesn't resolve the issue, try to update the library to the
newest version (`pip install datasets --upgrade`).
2. https://github.com/huggingface/transformers/blob/3ed5e97ba04ce9b24b4a7161ea74572598a4c480/examples/pytorch/language-modeling/run_mlm.py#L258-L259
This is the original code. You'll have to modify the example source to work with multiple train files. To make it easier, let's say "|" will act as a delimiter between files:
```python
if data_args.train_file is not None:
data_files["train"] = data_args.train_file.split("|") # + .split("|")
```
Then call the script as follows (**dataset_name must be None**):
```bash
python run_mlm.py [... other args] --train_file a1.txt|b1.txt
``` | [
-0.2187602073,
-0.1667420566,
0.031390164,
0.4202875793,
0.410284847,
0.2086267173,
0.3599504828,
0.332182467,
0.0959177613,
-0.0865045413,
0.1432957649,
0.1121849567,
-0.3130261004,
0.1154058799,
0.2711094022,
-0.1855070144,
-0.0543439202,
0.1169155836,
0.0061773253,
-0.0527791493,
-0.0572857186,
0.2120705396,
-0.085625954,
0.0367863402,
-0.5357351303,
-0.1124622822,
-0.0895915329,
0.533177197,
-0.1113563403,
-0.4210804701,
0.2054495215,
-0.2190004587,
0.5652352571,
0.3786010146,
-0.0001178408,
0.1366184354,
0.0195878353,
-0.3046215177,
-0.2785405219,
-0.3674177825,
-0.0473930575,
-0.1517330408,
0.31319803,
-0.2982818186,
-0.2849582434,
-0.2986625433,
0.1183679402,
-0.4172201455,
0.5750333667,
0.5418710113,
0.1464993805,
-0.1126834154,
-0.1135131568,
0.1661650985,
0.1643297076,
0.1989792734,
0.0532439388,
0.4563588202,
0.235947907,
-0.1866137832,
0.1223254949,
0.0028429166,
-0.0856469795,
0.2835534811,
0.4207870662,
0.2291146219,
0.267695725,
-0.3368065059,
-0.0659589246,
0.4293657541,
0.5069271922,
-0.4630825222,
-0.1613179594,
-0.2148656696,
0.0965310112,
-0.5334343314,
0.1466607153,
0.1705651134,
-0.1693031937,
0.1613129377,
-0.0401137248,
-0.1284488887,
-0.2960367799,
0.3532931507,
0.1373363584,
-0.0046975273,
-0.237358734,
0.1342296451,
-0.0491268337,
0.2122364342,
0.1465488523,
-0.1308976859,
0.1160606593,
0.3526329994,
-0.2304415852,
0.0151427472,
-0.3056646883,
-0.2286915332,
-0.1049201488,
-0.2218108028,
0.0616086237,
-0.1123378128,
0.0158281941,
0.1886266172,
-0.0349829197,
0.1783738583,
-0.0147657068,
0.251850903,
0.1695749462,
-0.0863320529,
-0.2277291119,
-0.1104216948,
-0.436483413,
-0.3626225591,
-0.1716029942,
0.1861088574,
-0.0098628988,
-0.2603826821,
-0.1868662536,
-0.0135934968,
-0.4629865885,
-0.1196214855,
0.0501889288,
0.4206339419,
0.0471920818,
-0.2701140344,
0.1909436136,
0.3114245236,
-0.298220396,
-0.020537056,
-0.1354184896,
0.2676134706,
-0.1667541116,
0.0067311907,
0.2710703909,
-0.0559691601,
0.5489364266,
-0.1468860358,
0.0182242878,
-0.1580578238,
0.2986270487,
-0.3071925342,
0.111629121,
0.3208243847,
-0.1363293082,
-0.1147708222,
0.2910400033,
-0.0443102419,
-0.1029341072,
0.1777271777,
-0.3631930053,
-0.3632003069,
0.0566770844,
0.0550090075,
-0.076335758,
0.0673878714,
-0.0280142426,
0.1393103749,
0.3043962121,
0.0021815698,
-0.1248049587,
-0.4227058887,
-0.2112960368,
-0.1633839905,
0.3459707201,
0.5008914471,
-0.3272347748,
0.1389871985,
-0.0614091121,
0.0824357644,
0.1293088049,
0.179176107,
-0.474031359,
0.5258908272,
-0.356289506,
0.2602773011,
0.3359386921,
-0.3661051989,
0.2029670626,
0.4296666384,
-0.0621658936,
-0.0405630879,
0.1338307112,
-0.0786806718,
-0.1721276641,
-0.0613218546,
0.1770078689,
0.2244345695,
-0.1008405089,
0.0733386651,
-0.1971501112,
-0.2577084303,
-0.0527975038,
0.1942563057,
-0.0366873778,
0.0767980739,
0.1875153035,
-0.0004551927,
0.1252678335,
-0.267814368,
0.1207693741,
0.3422437012,
0.0662676021,
0.1107202247,
0.046729058,
0.1225750595,
-0.3514123857,
0.1639357358,
-0.0799141005,
-0.0736310035,
-0.1430326253,
-0.0644590333,
-0.1137371361,
-0.2062305063,
-0.3944912553,
-0.2405235469,
0.0265960377,
0.0217936244,
0.0545741729,
0.0177388322,
-0.3444508314,
0.1442455947,
-0.4874130785,
-0.0421782285,
-0.0992306918,
0.2021944672,
0.0164215751,
0.0035268385,
0.0593573935,
0.0558213182,
0.0060581886,
-0.3265494108,
-0.1184616387,
0.323459059,
0.0528179482,
0.0771332085,
-0.1485344172,
0.2100294977,
0.1040450707,
-0.0613659099,
0.1945239455,
0.0633506626,
0.3194553256,
-0.1345399022,
-0.1995002478,
0.3969226778,
0.0695654824,
0.0165772159,
0.1155700237,
-0.2274146974,
0.1046560109,
-0.0991496593,
-0.0072400165,
-0.1597732604,
0.243916437,
0.0610598102,
0.1981469542,
-0.1272438765,
-0.3091565371,
-0.2142791152,
0.3216104507,
0.2545410991,
0.0373859257,
0.0955027938,
-0.1733591706,
0.050598599,
0.0459097773,
0.2077758759,
0.4979128838,
0.0192746129,
-0.2003568262,
0.372538656,
0.0216427706,
-0.2439145446,
0.1191153377,
-0.0843783468,
0.338814497,
0.4956534505,
-0.2445804775,
-0.0676740184,
-0.214152351,
-0.0274475683,
0.3034140766,
0.420214653,
-0.549400568,
0.2633035779,
-0.370783031,
-0.140363276,
-0.4049877226,
0.1483593136,
-0.0332338698,
0.1332533658,
-0.3153636754,
0.1717954427,
0.2486154586,
0.0067795892,
-0.1144895926,
-0.0167526267,
0.0440499298,
-0.3137129545,
0.0948307589,
-0.1302256137,
-0.2783362567,
-0.0179275926,
0.5486425161,
0.1192936376,
0.0776710585,
-0.1489707828,
-0.3432918191,
0.0173715539,
-0.0160411727,
0.1359623969,
0.0386188328,
0.3947207034,
-0.0001717963,
0.3190338016,
-0.2006282806,
-0.0312069114,
0.1276064217,
0.1451540887,
-0.1676793844,
-0.1626078486,
0.004552403,
-0.2500948608,
-0.1370779574,
-0.6858378649,
-0.5413181782,
-0.1693505347,
0.075347431,
0.200332433,
0.1947262287,
0.1813873947,
0.176208213,
0.2450315207,
0.0561479293,
0.1711568087,
-0.0381061137,
-0.4465243816,
0.2264538854,
-0.2394656092,
-0.2247731835,
0.3580353558,
-0.0442437716,
0.0215442106,
0.1005164385,
-0.5381848812,
-0.1136735827,
0.2504938543,
-0.0290174652,
-0.0123380478,
-0.0333244167,
0.284832567,
-0.0811641961,
0.1176243201,
-0.0744210854,
-0.0750231743,
0.3046919703,
0.1528559476,
0.2563611567,
0.3320653141,
0.5313272476,
-0.0368127041,
0.7044879794,
0.2361266762,
-0.2257722914,
0.3754790425,
-0.3037630022,
0.1068048328,
-0.1427260935,
-0.1135768294,
0.2218448669,
0.0835336521,
-0.2613660395,
0.1790175885,
0.047193829,
0.0657034218,
-0.2824084163,
0.3268257678,
-0.0857606903,
-0.1656237394,
0.2103682011,
-0.1576738358,
0.4189040661,
0.0357236266,
0.1311353445,
0.1456911564,
-0.2054313123,
-0.0827770904,
0.5667656064,
0.1291617453,
0.2777433991,
-0.5577232838,
-0.3043444455,
-0.3477807939,
0.1395134926,
0.1647333652,
0.4870905578,
-0.1520964354,
-0.0405336544,
0.3218388557,
0.0231594089,
0.4743597507,
-0.2974194288,
-0.0139401192,
0.360880971,
-0.0608360693,
0.0712911785,
-0.1211801395,
0.1311720461,
0.5619035363,
-0.0362300277,
0.4016290009,
-0.1029695123,
-0.2938932776,
0.083592765,
0.2028919458,
-0.1985016018,
-0.2078432888,
-0.169201687,
-0.1432551146,
-0.2997450829,
-0.2505709231,
0.0571176112,
0.1843992919,
-0.0075566163,
0.2715388536,
-0.0176870488,
0.1675958633,
0.2338578701,
0.0625929385,
0.295753628,
0.1207594052,
0.1210650429,
0.2668472528,
0.3667302132,
0.4993266463,
0.5277526379,
-0.4694197476,
-0.1614114344,
0.1477747262,
-0.1777693331,
0.3248335123,
0.2907817662,
-0.2040281892,
-0.026271563,
0.2625289261,
-0.2953740954,
-0.0472016893,
0.2233002782,
0.2479667813,
-0.0097969873,
-0.0658066571,
-0.5862113833,
0.2136280835,
0.0521746613,
0.1908981949,
0.1354254931,
-0.6723158956,
-0.4462921321,
0.2254082561,
-0.012819469,
0.7663853168,
-0.2099228948,
0.4583088756,
0.1677958518,
0.2719205618,
-0.0255542472,
-0.4253872633,
0.274053514,
-0.4830499887,
0.064250879,
-0.1064784676,
-0.150069952,
0.2763527036,
0.1562799364,
0.0164982043,
0.1594831347,
0.054942362,
0.1809712499,
-0.0730056986,
0.3219029903,
0.2434392273,
-0.1929604858,
-0.2359692752,
0.0102938218,
-0.1801213771,
0.2100581825,
-0.1129736006,
-0.188755542,
-0.1296450943,
0.0862199068,
0.0653890595,
-0.0907204673,
-0.6141549349,
0.1236637756,
-0.1575996876,
-0.3965590298,
0.2871084511,
0.3647826016,
0.1706037968,
-0.0710478798,
-0.2954196632,
0.1321606338,
0.1122569069,
-0.1842179447,
-0.0329519361,
-0.0516681299,
0.2976560593,
-0.09252204,
0.0413705446,
0.2050382942,
-0.3047451079,
-0.3144062459,
-0.0661678985,
-0.2993867099,
0.5104280114,
-0.1897249371,
-0.4631550908,
0.0700424463,
0.0860522017,
0.0621168464,
0.0842691585,
0.164837271,
-0.2388743311,
0.1868061125,
-0.0325409248,
-0.4317284226,
0.0277172606,
0.5185140371,
-0.0289324056,
0.0790056884,
0.5657850504,
0.3568657339,
-0.0299053695,
-0.2044344395,
0.3942808211,
0.071557723,
-0.0699861497,
0.1138025224,
0.4307900667,
0.2418816686,
0.0622124001,
0.2950501442,
0.2360560149,
-0.1236713454,
0.2050520778,
-0.4611518979,
-0.5064795613,
-0.1016916782,
-0.0835033581,
0.2456610054,
0.1716581285,
0.1761140674,
0.0406588167,
-0.2078081071,
-0.2155595273,
0.2344576716,
-0.0199170522,
0.1433345079,
0.2096408457,
0.0812586099,
0.3789622188,
0.0672320947,
0.0618055463,
-0.0272170454,
-0.365114361,
-0.1301807165,
-0.0792096928,
0.1824757606,
0.0090725208,
-0.3380415142,
-0.0017498496,
-0.5721236467,
-0.2706252337,
-0.0220802631,
0.016804982,
0.0830390528,
-0.0859037861,
0.0943691209,
-0.1830235273,
-0.0719619691,
-0.1091134101,
-0.0538005419,
-0.1991328448,
0.0114908256,
0.0659252703,
0.110186182,
-0.0955985934,
0.0075459382,
-0.0074560181,
-0.0916938856,
-0.24380669,
0.1240447685,
0.23280406,
-0.4102421999,
0.189900741,
-0.2137140334,
0.2356958836,
0.4120395184,
-0.4174545109,
0.2346376926,
0.5493926406,
0.0715426505,
-0.1191133782,
0.1600176096,
0.330739826,
-0.0316045508,
-0.110617213,
0.1972020715,
0.3799903095,
-0.0352504291,
-0.1929011941,
0.0609401166,
0.3784879744,
-0.1502982378,
0.0640603155,
0.2975320518,
-0.1603610218,
0.1333838999,
0.2091660351,
0.360165596,
0.1545426399,
0.524030149,
-0.0822411031,
-0.0931550935,
0.0597368442,
0.0534925051,
-0.3930668235,
-0.6014754176,
0.1731498539,
0.21677351,
-0.1283471882,
0.124010466,
-0.1549289674,
0.496799022,
-0.0010900918,
-0.2926056087,
0.0142849572,
0.0785398111,
-0.2275687158,
-0.133901,
-0.4213933349,
-0.1551744193,
0.0502550453,
0.006385183,
-0.1967864782,
-0.1983107477,
-0.181477055,
0.2520406544,
-0.1487799734,
-0.1792173684,
0.0926293731,
0.0937754959,
-0.1402389258,
-0.2473496646,
0.3038436472,
-0.1089146286,
-0.0788342282,
0.1995710582,
-0.150910303,
0.2978537381,
0.3143269122,
-0.1724803299,
-0.2189150751,
0.0805379897,
0.0941956118,
0.2014832199,
0.0283289701,
0.157380119,
0.1723033339,
0.3426737487,
-0.0058865729,
0.0086849779,
0.3166169524,
0.001179358,
-0.0813740194,
-0.0921972021,
-0.0589748248,
0.2395663708,
-0.009671296,
-0.0538716465,
0.1466580033,
-0.3901590407,
0.0225806944,
0.7142034173,
-0.0171019565,
0.3614578545,
-0.0683396906,
0.032517124,
-0.1164208278,
0.3474161923,
0.1298308074,
-0.0834640115,
-0.4065195918,
-0.0060039442,
-0.6180539727,
-0.0460270867,
-0.1617491394,
-0.1863464862,
-0.1596551538,
0.0043890062,
0.1381011158,
-0.0324809477,
-0.1281869411,
-0.090129137,
0.1696688682,
0.3214870989,
-0.0856050625,
-0.2258809507,
-0.1679629236,
0.3584051132,
-0.00315917,
-0.3093915582,
-0.0893945396,
-0.1936805546,
-0.0117187286,
-0.2749818563,
0.0232633539,
0.1074018776,
0.2027435005,
0.2969762683,
-0.2101579159,
0.4309172332,
0.0065390114,
0.1876882464,
-0.1705279648,
0.0723376572,
-0.0811832175,
0.1116089523,
0.0496196076,
0.4050960839,
-0.529505074,
-0.1173660085,
-0.5370400548,
-0.0946171582,
0.0156080108,
-0.2459224463,
-0.1738647521,
0.0654882416,
-0.1364308745,
0.2675384283,
0.2362121344,
0.3413186073,
-0.0979717448,
-0.0337586366,
-0.3247717321,
-0.0526785962,
0.563075304,
-0.4386034012,
0.0079311626,
0.106351018,
0.0169813875,
0.1237156093,
0.1071061641,
-0.3041399717,
0.0648377612,
0.4830063581,
-0.1889517307,
-0.2679225206,
0.3511603177,
-0.0312895849,
0.0399592109,
0.0237282403,
0.0085909897,
-0.0142721403,
-0.3185524642,
-0.3784616292,
-0.4073454738
] |