html_url
stringlengths 48
51
| title
stringlengths 5
268
| comments
stringlengths 70
51.8k
| body
stringlengths 0
29.8k
| comment_length
int64 16
1.52k
| text
stringlengths 164
54.1k
| embeddings
sequence |
---|---|---|---|---|---|---|
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.2992967367,
-0.222871542,
-0.064621754,
0.0151257934,
0.1335907578,
-0.1412786692,
0.0264430866,
-0.1363360286,
-0.1954930425,
0.123049669,
-0.6802902222,
0.125932768,
-0.1547850817,
0.1198720932,
-0.2277211398,
-0.0956800878,
-0.0067191757,
-0.025702931,
-0.2065686584,
0.1308601797,
0.0450625047,
0.1559381187,
0.2409401685,
0.1375781894,
-0.234968245,
-0.1268834174,
-0.2791190147,
-0.3148989081,
-0.1528187692,
-0.3324479461,
0.3127664328,
0.4507706165,
0.2063038051,
0.3868992925,
-0.0001238944,
0.1604949385,
0.0293456484,
0.0402951092,
-0.0567350537,
-0.0817935318,
0.0817744285,
-0.3192557991,
0.2854299545,
-0.153230533,
0.1690669358,
-0.0341491848,
-0.1189531758,
0.0350223482,
0.4042482078,
0.1106406301,
0.0524125174,
0.1972407252,
0.0121195242,
-0.012645416,
-0.3311865032,
0.3505339324,
-0.3129048944,
0.3000720441,
0.0955418646,
-0.1801470518,
-0.1500787586,
0.1911476254,
0.3429263532,
-0.0921716392,
0.5646218061,
0.0947337002,
0.3990189135,
-0.3180499077,
-0.4919624925,
0.192219615,
0.1793988496,
-0.2508136928,
-0.5659950376,
-0.3535728455,
-0.1606235802,
-0.340716809,
-0.4232774377,
-0.071713984,
-0.1374005377,
0.201732263,
-0.3214551806,
-0.0216318332,
-0.292925477,
-0.0346345082,
-0.0127412751,
0.3427120447,
0.1697213948,
-0.2110771984,
0.3974739015,
-0.082120277,
0.3321639299,
-0.2659061551,
0.1673608124,
0.0565475263,
-0.2368426323,
-0.2462356985,
0.2739786804,
0.1305558234,
-0.0841675028,
0.0217713378,
0.2886642218,
0.1091309041,
-0.2407824546,
0.1194921136,
0.1254578531,
0.5836356878,
0.0670509264,
0.5859933496,
0.1789160967,
0.360263437,
0.0608827099,
-0.0031640511,
0.2547968626,
0.1796336472,
0.0882037506,
0.1490268856,
-0.1660264432,
-0.2710512877,
-0.1633440852,
0.1672860086,
0.1109899804,
-0.0777893513,
0.294492811,
0.4754856527,
-0.1721897572,
0.4703605771,
-0.081087321,
-0.0446158797,
0.0116868764,
0.0380170792,
-0.0310279485,
0.3311303258,
-0.2840280235,
0.075527072,
0.1878759116,
0.1341212094,
-0.0454440787,
-0.5317231417,
0.7972846627,
-0.3050078452,
-0.1892515719,
-0.2818906903,
0.3368848562,
0.2114262581,
-0.1106368378,
-0.2374484986,
0.0274331532,
-0.2493317127,
-0.2812484503,
-0.1984666586,
-0.0533043407,
-0.2920436263,
0.102967225,
0.0514632724,
-0.5960327387,
0.1069896072,
-0.2322063595,
0.5729321837,
-0.379060477,
0.104592979,
-0.0657642409,
-0.2093566507,
-0.1626278609,
-0.0070875175,
0.2824579477,
0.2480088472,
-0.1690670848,
-0.2179759145,
-0.1003722101,
-0.2434241474,
-0.1601535976,
0.2256184816,
-0.025373375,
0.1645832956,
0.1001146734,
0.0776346028,
0.179730162,
-0.7268224359,
-0.2085728347,
0.0272011012,
0.260966897,
0.283991307,
-0.0744252205,
0.3155294955,
0.1378123164,
-0.1766492724,
-0.1323248446,
0.4194304347,
-0.0769565478,
-0.2528688908,
-0.1330255866,
0.0419688374,
0.1788371205,
0.1517905146,
0.4420603514,
-0.1673374176,
0.1027846932,
0.0223795138,
-0.1959412545,
-0.3134686947,
-0.1980533302,
-0.0567647628,
0.3496710956,
-0.0370451808,
0.124120675,
-0.2290175557,
-0.5125861764,
0.1457270682,
-0.1106104851,
0.2121102512,
0.1256603599,
-0.3315788507,
-0.0971534923,
0.4307194054,
0.0061917389,
-0.1665686369,
0.041584596,
-0.1597300619,
0.2058893889,
-0.0072756559,
-0.1105470359,
0.2088845074,
0.0971467495,
0.2919768095,
0.4504459202,
0.3401712477,
-0.0702542663,
0.1461791098,
0.1189455986,
0.4619001448,
-0.0725695044,
-0.0189571269,
0.0365773514,
0.3616075218,
-0.0942517966,
0.2670550942,
0.2508044541,
0.5370208025,
0.1578004211,
-0.3334546089,
0.1407444179,
-0.0011264421,
0.0168406665,
-0.0349565819,
-0.0293972902,
0.7423945069,
0.0886612758,
0.4548160434,
0.0976241902,
-0.1052289903,
0.0497462675,
0.0706724226,
-0.2982071638,
-0.3200119436,
0.1700926125,
-0.2512492836,
0.1522046924,
-0.110098958,
-0.028057687,
-0.0896347016,
-0.140191555,
-0.1429973543,
0.1518867612,
0.2873950303,
0.0649261624,
-0.1160392761,
-0.0440656021,
-0.2168456912,
0.2574723959,
0.0891265124,
-0.0151798967,
0.2699398994,
-0.1740831435,
0.1887929142,
0.1882826984,
0.4376368523,
-0.1654494405,
0.2808384597,
0.295763731,
-0.0424119197,
-0.2989653051,
-0.4278820157,
-0.3164433241,
-0.0064288322,
-0.1498692632,
0.3005520701,
0.1229152754,
-0.3501480222,
0.1867867708,
-0.43902722,
-0.2368397713,
-0.5237366557,
0.1158804744,
0.0094080195,
0.0711858347,
0.1030558497,
0.030772984,
0.5409749746,
-0.2853988409,
0.096701175,
-0.1340502203,
-0.3083228469,
0.0993754864,
0.001354482,
0.23957403,
-0.0604023933,
0.2097820938,
0.0812992826,
0.3348240852,
0.0728451759,
-0.5948601961,
0.1543283761,
0.009693265,
0.1603826135,
-0.0054535121,
-0.5465567708,
0.1438090056,
-0.350862056,
0.1390537471,
-0.2130070031,
-0.0825375244,
-0.0648083836,
-0.1963885725,
-0.1453528404,
-0.1572336107,
0.0272409972,
-0.4223476946,
-0.1761986613,
0.384280622,
0.2135613412,
-0.0255787373,
0.1250265092,
0.059472464,
-0.0020091459,
0.0204946361,
-0.146238625,
-0.0204304997,
0.0450166017,
0.4003348947,
-0.1566701233,
-0.0140683409,
-0.247952655,
-0.4340080023,
-0.1029933095,
-0.2318253517,
-0.3111586869,
-0.7258257866,
-0.1302175224,
0.1542341411,
0.039079275,
-0.0355027877,
0.0733731166,
-0.2161288559,
0.1724022627,
-0.0547056049,
-0.3833321631,
0.0750107765,
-0.0586795323,
-0.0996427834,
-0.4895225465,
0.4194800854,
0.2412151098,
0.3879185021,
-0.0364152379,
-0.389667213,
0.087322101,
0.0769904777,
0.368660152,
0.0446515866,
-0.1522577107,
0.1994310915,
-0.1945101023,
-0.2475323379,
0.2475541532,
0.0997979492,
-0.1989656687,
-0.3358206749,
0.0328707546,
-0.3914496005,
-0.2428809255,
0.0035530869,
0.2393057793,
0.0837495402,
0.0150699392,
-0.024155125,
-0.5422309637,
-0.1110890061,
0.4076265395,
0.2536967397,
0.0903866291,
-0.1011145562,
-0.233189404,
-0.1764851213,
-0.4281742275,
0.3581779003,
0.097349219,
-0.0104472116,
0.139220804,
-0.030508481,
-0.0058139004,
-0.0933932066,
0.1738212258,
-0.0761904269,
-0.0466238782,
0.0657276064,
-0.5003890991,
-0.053197708,
-0.291643858,
-0.2771718204,
-0.027176436,
0.1963840425,
0.5380573869,
-0.3245325387,
0.1257044971,
0.2381216586,
0.0402101055,
-0.2187518775,
-0.0233529545,
-0.1505872309,
0.1194387227,
-0.0051199496,
-0.0420502983,
0.0908679813,
0.1580135673,
0.0723907575,
0.1715501547,
0.0252890121,
-0.044991497,
0.5337710381,
0.5966695547,
-0.0149758495,
0.0093430206,
0.0359754562,
-0.0603424013,
-0.4722693264,
0.1994303018,
0.2425859869,
-0.0456343293,
-0.8425170779,
-0.0807878375,
0.1971938908,
0.3074398935,
-0.0292133838,
0.0756807923,
-0.2079822123,
-0.2092400342,
0.2380542159,
-0.3294455111,
0.5146924257,
0.0873057768,
0.2418269962,
-0.1696213633,
0.0292584449,
0.3550981581,
0.191673696,
-0.1663477421,
0.0585921779,
0.0968180895,
-0.1540476233,
0.3305730522,
0.4545245171,
0.818172574,
-0.1192752272,
-0.1273748875,
-0.0061081182,
-0.1531973481,
0.2818472683,
-0.4569689631,
-0.0054493733,
-0.1914539039,
-0.2565261424,
-0.0477845669,
-0.1412291527,
0.0512918122,
-0.1973415166,
-0.0164964348,
0.1554921269,
0.2559517622,
0.2121571898,
0.1271377802,
0.2162207812,
0.0843377337,
-0.3273904622,
0.0339084864,
0.0684916228,
-0.2080330849,
0.1866786033,
-0.1093770042,
0.0122278966,
-0.3065900207,
0.1729825735,
-0.2339266241,
-0.0496131629,
-0.0788516775,
0.2229245007,
0.1845923662,
-0.134613201,
0.0835819244,
0.3559841216,
0.4857668579,
-0.1557328105,
0.0248113032,
0.0844811201,
-0.2943350673,
0.1334501505,
0.0661283508,
-0.2414877415,
0.2837934494,
-0.0743487254,
0.3252245784,
0.1920775771,
0.4238162935,
-0.2977110147,
0.1496536136,
-0.1671897918,
0.1661154628,
-0.0519202761,
0.3414981961,
0.1268110573,
-0.1287819892,
-0.0565660223,
-0.0042446498,
0.1037537754,
-0.2216028124,
0.3126446605,
-0.0375188179,
-0.2261631787,
0.0197011866,
0.0981375277,
-0.0708272755,
-0.1594261527,
-0.0357659534,
-0.1458825171,
-0.2006532103,
-0.0224686339,
-0.2284066975,
-0.1720065773,
-0.3008998632,
0.3120035529,
-0.2381601185,
-0.4723118246,
-0.206920445,
0.3734060228,
0.4046839774,
0.2938786745,
-0.2193950266,
-0.2839433849,
-0.3402781188,
0.2772219181,
-0.2316177189,
0.1614441723,
-0.2128952593,
0.6064304113,
-0.118139416,
0.2897873223,
-0.2132999003,
-0.2823091745,
-0.2256616056,
-0.089231059,
-0.4386070371,
-0.3682978153,
-0.0456231162,
-0.0401676744,
-0.0864479095,
0.2165944278,
-0.2286457717,
-0.040544901,
-0.2426801622,
0.1813552976,
0.0370744094,
0.4435950518,
-0.1740810722,
0.3260140419,
0.050713785,
-0.3729521632,
0.0612890646,
0.0980285406,
-0.0713128522,
0.3006063998,
0.2101421654,
0.178132236,
0.1156241596,
-0.0499996543,
0.3227711916,
0.3425938785,
0.4007495344,
0.3192229867,
-0.3186663389,
-0.0631364658,
0.1415850222,
0.2257973105,
0.1379988492,
-0.091959998,
0.4440923333,
0.298714757,
-0.0951704681,
0.0900459513,
0.3543192744,
0.151992619,
0.0992798507,
0.1784839332,
-0.1570458859,
0.0648357272,
-0.0882317871,
-0.052135136,
0.2720230222,
-0.1416468322,
0.2238741815,
0.4102815688,
0.3358774483,
0.2722455561,
0.1774860471,
0.0816790089,
0.2443528175,
0.4868411422,
0.2100971639,
-0.0321221016,
0.003197141,
0.1310182661,
0.4857234061,
-0.2656270564,
0.4763303101,
-0.0616067313,
-0.1995057762,
0.2071077973,
-0.4220935404,
0.2439747155,
0.3563007116,
0.0155827776,
-0.1459278166,
-0.2326168716,
0.3047083318,
0.319639802,
-0.0256583206,
-0.0917968526,
-0.0305181574,
-0.1278379858,
-0.3761761785,
0.2058966756,
0.1671890765,
-0.1115560383,
-0.1389715523,
-0.094405368,
-0.2057563812,
0.0793883801,
0.0352802537,
-0.4773697257,
-0.1281569302,
0.0162589792,
0.0206925515,
0.3455473185,
-0.1932215244,
0.2982700467,
0.7178533673,
-0.1315581501,
-0.1319901794,
0.426073432,
0.016109677,
-0.1136232913,
0.3595227599,
0.3010452986,
-0.1424923241,
-0.4123660028,
0.2452272177,
-0.0206108466,
0.0123118758,
0.0134778172,
0.1357759684,
0.0556341186,
0.2323544919,
0.2413994968,
0.0532792211,
-0.1330931485,
0.0651905835,
-0.3356488347,
0.3633425832,
-0.4270903468,
0.1345569491,
0.3058611155,
0.0306401551,
-0.1007795483,
0.0238448028,
-0.0561515801,
-0.4548440278,
0.0233867839,
-0.2907951474,
-0.1105626076,
-0.0574181378,
0.0041974448,
-0.1385187656,
0.2731826901,
0.3027714789,
0.2290836722,
-0.3531988859,
-0.1669387221,
-0.4210649729,
0.0429388061,
0.2039074302,
-0.3283084035,
-0.0392369553,
0.2470377982,
-0.0261070617,
0.5584409237,
-0.0272405744,
0.298646152,
0.125082761,
0.0796054378,
-0.4260624051,
0.2039914876,
-0.4621123075,
-0.1067148447,
0.1302573532,
0.0617684647,
-0.2476506978,
0.0420595631,
-0.0984423086,
0.1118497103,
-0.1738925278,
-0.0613049269,
0.5322955847,
0.3644724786,
0.1501181126,
0.3697044849,
0.1324492693,
0.1355476081,
0.0834814161,
-0.2399797738,
0.1174201667,
0.0658703893,
-0.1526992917,
0.3562637866,
-0.1907481104,
0.0470767617,
-0.028796073,
0.2519637048,
0.4928357303,
-0.4842081666,
-0.1030695587,
-0.0302182771,
-0.2237474769,
0.057225775,
0.1399781108,
0.5265302062,
0.194620207,
0.2372904718,
0.1010438949,
-0.3527946472,
0.4254376888,
-0.2472468615,
0.0713142455,
-0.2376301885,
0.05198358,
0.38380301,
-0.0993832201,
-0.5770969391,
-0.1266640425,
0.1802997887,
-0.0949134901,
-0.1268650442,
0.2416343391,
-0.1855224371,
0.0856404454,
-0.112695843,
0.1083847433,
-0.0421000235,
0.0535943508,
-0.1877756715,
-0.2174891233
] |
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.4121345282,
-0.085578382,
-0.0977277905,
-0.1387814283,
0.3114474416,
0.0683752373,
0.3448515236,
0.046587687,
-0.1001308188,
0.1562343687,
0.0433794856,
0.242426753,
0.1581839919,
0.2162969708,
0.0545788109,
0.0232142918,
0.1360674202,
0.4390757382,
-0.2185965925,
0.0374387652,
-0.0659956932,
-0.0208864678,
-0.153553322,
-0.0436114818,
0.3134843707,
-0.0264740903,
-0.2292299569,
0.1753231585,
-0.3534285128,
-0.3225591481,
0.4030124545,
-0.1064580381,
0.4329041839,
0.1327627897,
-0.0001171767,
0.2016098946,
0.3223025203,
-0.1553240716,
-0.0909366608,
0.0166201964,
-0.0741048157,
-0.4187880754,
-0.0570749827,
-0.1152200624,
0.0013723895,
-0.3153112233,
0.1467728317,
-0.3042214811,
0.093527928,
0.1765607595,
0.1489830911,
0.0158207864,
0.3976290822,
-0.0599445254,
-0.0897259563,
0.2228936553,
-0.1047837287,
0.2224471569,
0.3808675408,
-0.0767929852,
0.2623261809,
-0.0150633231,
0.2122558206,
0.0888141766,
0.1605118066,
0.0911398083,
0.8259809613,
-0.3334535658,
-0.0124985091,
-0.0583252758,
0.4455648363,
-0.1256540865,
-0.2552555203,
0.2472819835,
0.1414014399,
-0.3256052136,
0.2614881694,
0.3790606558,
-0.3644765317,
0.0435968488,
-0.3627217114,
-0.2574139833,
-0.4395216703,
0.0149611942,
0.1180060208,
0.082629174,
0.1625451297,
0.1449573785,
-0.0660311282,
0.0814976543,
0.4332497716,
0.0780941099,
-0.1706448197,
0.0194139965,
-0.1333713531,
-0.1515954733,
-0.2876423299,
0.3090681136,
-0.0119880512,
0.0120715983,
-0.3012445867,
-0.2072133124,
0.2847517431,
0.0740561932,
-0.0211099517,
0.314317733,
0.0671260953,
-0.0794964954,
0.100137949,
-0.1034922302,
0.4024325609,
0.0954258442,
-0.2204104811,
-0.4841094017,
-0.1915215999,
0.5020333529,
0.0810900033,
-0.1381356418,
-0.2252851725,
-0.0552829504,
-0.2780646682,
0.1433482915,
0.2262271047,
0.2479151338,
-0.090587087,
-0.0975937098,
0.0245642215,
0.2494822592,
-0.2053816617,
0.1113189608,
0.1260858476,
0.1531591415,
-0.4578862488,
-0.3628820181,
0.2566353977,
-0.2950877249,
0.3838171363,
0.2732482851,
-0.0795326531,
0.2728424966,
-0.0912643299,
0.1905031502,
0.125339672,
0.2146691531,
0.1924125701,
0.1868552864,
-0.0017936905,
-0.2911961079,
-0.0418695137,
0.2853320837,
0.0168280136,
-0.2246380746,
-0.3471567929,
0.1082542911,
-0.1117699444,
0.0175557062,
0.0353530422,
-0.0690594912,
0.0887761191,
0.1203761101,
-0.0526404828,
-0.1925055683,
0.0195803344,
-0.1289807111,
0.3793915808,
0.0687448755,
-0.4063463211,
0.2841973305,
0.0773413032,
-0.1427744627,
0.1688275784,
0.0324340649,
-0.0016665831,
0.1482708603,
-0.241535604,
-0.209438324,
-0.1005012542,
-0.4556684196,
-0.1719740778,
0.3552168906,
-0.0029000789,
-0.4598070681,
0.236548245,
-0.1201218516,
0.0676399469,
-0.1652119905,
-0.0883098543,
0.227696389,
-0.0351364613,
-0.2145302296,
-0.1688688397,
-0.2638673484,
0.1783889979,
-0.0220464319,
-0.0101094861,
-0.2324422002,
-0.0198158585,
-0.1845361441,
-0.0388977043,
-0.156732142,
0.2039208561,
0.3812171817,
0.5579843521,
-0.0816553831,
-0.0684602112,
0.0482344329,
-0.1448995322,
0.159022212,
-0.4344111085,
0.1075438857,
-0.0217334516,
0.1493283361,
-0.0466757417,
0.0853103846,
-0.4496679306,
-0.371180445,
0.1167883873,
0.0079460088,
0.3306219578,
-0.0743469745,
0.1798879653,
0.0693050995,
0.0324374884,
0.1059976816,
-0.1664112955,
0.1343198866,
-0.7459343076,
-0.0168207139,
-0.1043574139,
0.1043142527,
0.0355912596,
-0.0769522041,
0.038283702,
0.1590628177,
-0.1584957391,
-0.3072966933,
-0.0413637199,
-0.3169020414,
0.2125231773,
-0.5566611886,
0.2742673159,
0.1649558544,
0.0273891874,
0.1721838862,
-0.081075117,
-0.1246721596,
-0.2803692222,
-0.03416235,
-0.0767954215,
0.2971683443,
0.3042372763,
0.0494523495,
0.0207220763,
-0.1933779418,
0.4338950217,
0.5759022832,
0.0313210562,
-0.3306671083,
0.2104427218,
0.0414407663,
-0.1986911595,
-0.0196560249,
-0.1421069354,
-0.0658595636,
-0.0807880759,
0.034791097,
0.1587106436,
-0.0406576842,
0.5600026846,
0.1366592646,
-0.0128203556,
0.2236151695,
-0.2414535731,
-0.0290230662,
0.4613446295,
-0.0718434006,
-0.0432940759,
0.1160500944,
-0.3231312335,
-0.100745365,
-0.0150390789,
-0.2076588273,
0.4360069633,
0.366613239,
-0.4145401716,
-0.0872979611,
-0.4251071215,
0.01794108,
-0.3845636249,
-0.5058633685,
-0.148528263,
0.0729685724,
0.2087072134,
-0.1159325689,
0.2937578559,
0.3787654638,
0.1709454358,
-0.1817635894,
-0.0483663306,
-0.0111404695,
-0.0018851086,
-0.0123810358,
-0.2988420129,
0.0734533668,
0.352761358,
0.1322946399,
0.4342381358,
0.026630573,
0.0442591086,
-0.1747367084,
-0.3875649571,
-0.0144540872,
-0.1596357226,
0.7915343642,
0.1893676966,
0.1281995773,
-0.0219013616,
-0.2373067141,
0.266854018,
0.04628589,
-0.2804475129,
0.0047870502,
-0.2273965776,
-0.4810548425,
-0.1802192777,
-0.3516544104,
-0.1246599853,
-0.0893754959,
-0.107180953,
-0.1341091394,
-0.0714599416,
0.4129343629,
-0.0137823597,
-0.0348017402,
0.247074455,
-0.0075238366,
-0.0635408089,
0.11118792,
0.2345678359,
-0.4932153225,
-0.4311944842,
0.2324132025,
0.00998234,
0.1128873974,
0.1875332892,
-0.2512133718,
-0.1148041561,
-0.1031350866,
0.0084202066,
-0.0645649284,
0.2379441261,
0.4715809226,
0.2665566206,
0.0352038443,
-0.0425961129,
-0.2322522998,
0.1093987674,
-0.079174161,
0.4247237146,
0.2350768149,
0.5771474242,
0.0135586038,
0.4463896155,
0.7228886485,
0.0914103687,
0.2535393238,
-0.0413706377,
0.3796833754,
0.0905268788,
-0.3451048434,
0.2690578699,
0.0630213767,
-0.0072042421,
0.1809093207,
-0.0321067944,
-0.1778544486,
-0.2200648487,
0.0465766937,
-0.0596498735,
0.0298708528,
-0.1174277365,
-0.3436407149,
0.3009178042,
-0.2163113654,
0.1664458513,
0.1327337921,
-0.0476564653,
0.0549119711,
0.4625677466,
-0.2057615817,
0.2380175442,
-0.4431189895,
-0.5577780604,
-0.3410709798,
0.216066733,
-0.0173755847,
0.6229287982,
-0.2246488333,
0.4463386536,
0.13816984,
-0.2857893109,
0.4693849087,
-0.474642396,
0.0524854399,
-0.0733334124,
0.0820762143,
-0.321038425,
-0.2203686833,
0.042708829,
0.1718386114,
-0.0350635238,
-0.1515038162,
-0.1922936589,
0.2373285741,
0.2754105926,
0.0534364171,
-0.1614239514,
-0.093639344,
-0.2664469182,
-0.4962082207,
-0.0505330265,
-0.0729673728,
0.065627709,
0.0504230484,
0.2158269584,
0.2125393599,
-0.0627409741,
0.0499400049,
0.12997365,
-0.0029516742,
0.0127461962,
-0.039329581,
0.277926147,
-0.0897322372,
0.2420696169,
0.0891644582,
0.2664802074,
-0.2147504389,
-0.1888160855,
-0.0411370918,
-0.1824874282,
0.4089699686,
0.0675263628,
-0.1009932831,
-0.3996093273,
-0.0261756983,
-0.1057991385,
-0.22917521,
-0.1686868668,
0.247626096,
0.0220552348,
-0.3125374913,
-0.1065757871,
0.0946874171,
-0.0872684494,
0.1268505305,
0.3581097722,
0.2488823235,
-0.2112710327,
-0.0633670166,
0.3672277927,
0.6484237909,
0.0318693779,
-0.1837052703,
0.0639477074,
-0.5025155544,
0.1271097362,
0.0638690069,
0.1315516382,
-0.1698899865,
-0.1872189343,
0.0249395445,
-0.1965134293,
0.3248555958,
0.0538666435,
-0.4849865437,
0.1431674659,
0.4321349859,
0.1235222071,
0.1298966706,
0.1036318764,
0.059383668,
-0.176297456,
0.1346553862,
0.1409142166,
0.0725384206,
0.1524270773,
-0.1616718471,
0.0688692778,
-0.1432242841,
-0.2424298674,
-0.6267002821,
0.1124727651,
-0.2296540737,
0.2772512138,
-0.201339215,
-0.6081688404,
0.4104798138,
0.3885935247,
0.5692139864,
0.2539718747,
-0.2626109421,
0.0875653476,
-0.0031405408,
-0.3031437099,
0.1424962729,
-0.0968290418,
0.0821555182,
-0.2844581902,
-0.3339814842,
-0.1550788432,
-0.0683823973,
0.0433428437,
-0.3456449509,
-0.0371471792,
-0.1009883359,
0.0593316592,
0.2151550949,
-0.1247697249,
0.2778623104,
0.0004334673,
0.0718653649,
-0.0310866199,
-0.0376358293,
0.3993117213,
-0.298511833,
-0.1572420001,
-0.0628592744,
0.0892677233,
-0.1416340321,
-0.0978498012,
0.3126448691,
0.0009066537,
-0.1707310379,
-0.1474592835,
0.0576615706,
-0.2658414841,
-0.2694557905,
-0.4231140018,
0.1549918354,
0.0106098652,
0.1373021305,
-0.1414519846,
0.1642698944,
-0.2475142181,
-0.0291163623,
-0.3162648976,
-0.1858839691,
-0.0911563784,
-0.2300191522,
0.2858872116,
0.1424529105,
0.2312101871,
0.2592297196,
-0.0326084495,
-0.2188582271,
0.0014804862,
0.2834207118,
0.1979218423,
-0.0843516588,
-0.3264656663,
-0.0342854857,
-0.0405881144,
0.0829681158,
-0.2389819622,
-0.1508961022,
-0.1201623008,
0.1044124514,
0.110831514,
0.0316661522,
-0.2158531696,
0.175856635,
-0.3454001844,
-0.3830914497,
0.0388580672,
-0.0019292459,
0.1529801339,
-0.1848094165,
0.3930838704,
0.0458369106,
-0.0579168871,
-0.2661428452,
0.0873570442,
-0.2104156762,
0.5279400349,
0.0870258957,
0.2425912768,
0.0917050689,
-0.0350839347,
-0.6708036661,
0.2103812993,
0.0831127539,
0.074215427,
-0.0349072777,
-0.1580382288,
0.1837059557,
-0.2213372588,
0.2976186275,
0.32652089,
-0.0052294917,
0.1880480796,
0.5457713604,
0.1286131889,
-0.2370146364,
0.169636786,
0.1250644028,
-0.0786487609,
-0.1110884324,
0.1126398444,
0.2368842512,
-0.2054816484,
0.3799753487,
-0.0941828936,
0.4906443655,
-0.2079766393,
0.0040079877,
0.5395566821,
0.0277875066,
0.0393730849,
-0.0421882942,
0.0318805836,
0.1792408228,
0.5831444263,
0.0031548906,
0.0298066232,
0.1406377703,
0.3013635874,
-0.1679565758,
-0.024342116,
-0.1806920022,
-0.2011103034,
0.2749938369,
0.018362632,
0.2508784533,
0.624589622,
-0.4090290666,
-0.0618057176,
-0.5428096652,
0.2052147835,
-0.2572388649,
-0.0793284327,
-0.2710333169,
0.2098780572,
0.058104068,
0.0631142855,
0.1123110652,
-0.1852892488,
0.0515829325,
0.2637983263,
-0.4474709928,
-0.221647948,
0.3423317969,
0.3455910087,
-0.1874864399,
0.0017539784,
0.2871091366,
0.2440223247,
-0.1056911796,
-0.0194139853,
0.4746490717,
0.64443928,
0.4055104256,
-0.3922819793,
-0.0329238176,
0.0636444166,
0.0366325453,
-0.1734560728,
0.2106982917,
0.0308563039,
0.191832751,
0.1406433284,
0.0972325057,
0.0374465138,
-0.0763896853,
0.2183974087,
-0.1176236272,
0.2614663839,
0.0845800564,
0.1263474524,
0.1881268173,
0.1792557985,
-0.0836742371,
-0.3425417542,
-0.069667533,
0.1219687536,
-0.0048621446,
-0.1159547269,
-0.1105761975,
0.04033399,
-0.2090081275,
0.3243710399,
0.2986625135,
0.0329848751,
-0.3327322602,
-0.1645352691,
-0.3989804983,
-0.172130689,
-0.0934054926,
-0.3542163968,
-0.0387814082,
-0.1040401906,
0.0048026629,
0.0792967826,
0.0293139108,
0.0266955718,
0.1461550593,
0.6865946054,
-0.2840730548,
0.0265497081,
0.3582299352,
0.1359499544,
0.0420462266,
-0.3306717873,
0.0253975596,
0.3507260978,
-0.083906807,
-0.1968304664,
0.264007777,
0.1867133379,
-0.1484744996,
0.3411537707,
0.2205910534,
0.7242162228,
0.1210332215,
-0.0829705,
-0.3107080162,
0.0463102944,
-0.1874602735,
0.3284566104,
0.4097309411,
-0.2244557738,
-0.3802428246,
-0.4079794288,
-0.1977365166,
0.1020834818,
0.0908950865,
0.4288522005,
-0.3884783387,
0.3272825778,
-0.074227646,
0.1896982491,
0.1040759981,
0.026520865,
-0.0568276867,
0.2692764401,
-0.46517995,
-0.2999320626,
0.0334036052,
-0.0166975744,
-0.0271504521,
-0.0090620033,
-0.0695155188,
-0.3448974192,
0.3211406767,
-0.3420502543,
0.0472640842,
0.2058967054,
0.0268768296,
-0.3330898583,
0.2316469699,
0.174876079,
-0.127886191,
-0.0696924999,
0.4330186844,
-0.106629394,
-0.1177694276,
-0.0149018764,
-0.1021673009
] |
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.2925271392,
0.2328720987,
-0.0486935005,
-0.0753519386,
-0.1558789164,
-0.1852183491,
0.3809297681,
0.2100730985,
-0.0260843076,
0.2548180819,
-0.2955555022,
0.0939444304,
-0.5140134096,
0.2282821238,
-0.0125599038,
-0.3366337121,
0.0352495164,
0.1592862904,
0.1379971951,
-0.1640637219,
-0.1692883372,
-0.1792170405,
-0.3667649031,
-0.3199282885,
-0.2815555036,
-0.0437959097,
-0.171410352,
-0.200276494,
-0.2472257912,
-0.4485915303,
-0.2518495321,
0.014417069,
0.2051720619,
0.71536237,
-0.0001053368,
-0.2415971756,
-0.0325992741,
-0.2413592041,
-0.1185307503,
0.1629432589,
-0.1493935436,
-0.0004096329,
-0.5305423141,
-0.1669962108,
-0.2364862263,
-0.1963235736,
-0.0257731117,
-0.3211329579,
0.2954050004,
0.1716523767,
0.2048165798,
-0.2917950153,
-0.0625555366,
-0.0694861859,
0.2304437608,
0.0651995391,
-0.0031292364,
-0.0924548507,
0.0819318593,
0.1289020628,
0.0632566959,
0.4567220211,
0.0480354279,
-0.2020329833,
0.1953828633,
-0.2308382541,
-0.3671849668,
-0.4931640625,
-0.1287540942,
0.5815054178,
0.6085774302,
-0.2704020441,
-0.3155980706,
-0.1887134016,
0.0172960088,
-0.3431017697,
-0.3455100656,
0.3020209074,
-0.1481224746,
0.1379404664,
-0.0139236338,
-0.3403760493,
-0.1398060769,
0.0945606083,
0.0610955134,
0.3523587584,
0.0075404644,
-0.0270668156,
-0.0055155568,
-0.2872102857,
-0.4808889925,
0.0372109711,
0.2388419062,
0.419349432,
-0.0955714136,
-0.3250353336,
-0.105861038,
-0.141199261,
0.1988046914,
0.0749901012,
-0.0428450555,
0.0520786904,
0.1216940135,
-0.0533866733,
0.2828868628,
0.0018170439,
-0.0796326697,
0.0618964359,
0.1066369414,
-0.3097327054,
0.079274267,
0.077979058,
-0.2079363465,
0.0881981999,
-0.2041266263,
0.0717203841,
-0.0003144071,
-0.0222757384,
-0.0367469378,
0.0304691494,
-0.3467603326,
-0.0008887276,
-0.0230710823,
0.0554764271,
-0.2168716192,
-0.0929946154,
-0.1684413105,
0.259188056,
-0.0406802446,
-0.0559700914,
0.0351966247,
0.1009163111,
-0.1506541967,
0.2815231681,
0.2222899646,
-0.0228012092,
-0.0549540967,
0.1347346604,
0.209641993,
0.0041601211,
-0.1650162041,
-0.0868012905,
0.281671524,
-0.1880039424,
-0.0206577405,
0.0136983171,
-0.407944262,
0.2230233997,
-0.2369122207,
-0.0792808682,
0.2260554135,
-0.2475364357,
-0.3368157148,
0.2681539953,
-0.2152199447,
0.0765841007,
0.3830370307,
0.4839091301,
0.0821428001,
-0.4656516314,
0.1455120444,
0.1029923409,
-0.0668400079,
-0.0582664907,
0.243494451,
0.1746969074,
-0.4136835933,
-0.1219652519,
0.1921567172,
0.1991188526,
0.0906347036,
0.2032757849,
-0.0010411851,
0.1211844832,
0.0335893407,
0.3394370675,
-0.0144697651,
-0.2765727639,
-0.2051727474,
-0.003993094,
-0.0700619221,
0.0412311107,
0.030718185,
0.1075342447,
0.7296261787,
-0.2890872657,
0.2939642668,
0.3556069136,
-0.0669099092,
-0.0297854468,
-0.135075599,
-0.3457036912,
0.1745290905,
0.2376141399,
-0.0093145063,
-0.0910744593,
-0.2259640098,
0.4240361154,
0.2799820304,
-0.1462577432,
0.2492962182,
0.0866703466,
0.4744335413,
0.0259643812,
0.0415909998,
-0.5515682101,
-0.0342333987,
-0.0477554128,
-0.0555824228,
0.3149367571,
0.047655087,
-0.4406021535,
-0.0364437774,
-0.3342241645,
0.0223342404,
-0.0017870981,
0.1680094898,
0.0543689653,
0.1334089488,
0.044933334,
-0.5313398838,
-0.3334076405,
0.3088923693,
-0.0396383628,
-0.0941550508,
0.0056674704,
0.047612533,
-0.0103824474,
0.1713315845,
0.4110594392,
0.2039597332,
-0.1203438342,
0.3768960834,
0.301194936,
0.0983221307,
-0.0104774088,
-0.3251630664,
0.1853757799,
0.2171083987,
-0.3233447969,
0.1568770856,
0.3292602003,
0.1090735793,
-0.2232829034,
-0.0851834044,
0.2577805221,
0.4536963701,
0.1915160865,
0.0335362256,
-0.175367564,
-0.1085520014,
-0.0654786676,
-0.2391392291,
-0.1759952903,
-0.0669455081,
0.0106974617,
0.1357724071,
0.1745661497,
-0.3150486946,
0.1541745663,
0.4628358185,
-0.2876066566,
0.1285881996,
-0.0026044007,
-0.3632549644,
-0.2040611356,
-0.0164076425,
-0.4502244294,
0.0546336249,
0.2087281495,
0.2128760219,
0.0812144578,
0.3439451456,
-0.0911908299,
0.0179573633,
0.1442554891,
-0.0896608979,
0.3438568115,
-0.071565181,
0.0123667158,
-0.0352521315,
-0.3124833703,
-0.0005496703,
-0.0457018018,
0.0406431481,
-0.1953160167,
0.075868167,
-0.2181119025,
0.0700932965,
-0.6984208226,
-0.1143319905,
0.1414817721,
0.387327075,
-0.1372509897,
-0.1164512932,
0.3872790337,
-0.0124244019,
0.6995112896,
-0.0220749639,
-0.1269965917,
0.0451534688,
-0.0926733539,
0.1592120826,
0.1802599728,
-0.0271615889,
0.2576536238,
-0.0187914632,
0.1747028083,
0.0832938626,
0.2450945079,
-0.075541243,
0.2807093263,
-0.0216198768,
0.103116788,
0.0060362369,
-0.0342007168,
0.2087464035,
-0.3511864841,
-0.177394405,
-0.0107187741,
0.0613085553,
-0.1447470635,
-0.2861632705,
0.2674385309,
-0.0853765458,
-0.2339543551,
-0.6628139615,
-0.4774098098,
0.3154147267,
0.3436958194,
0.1062129736,
0.0269194394,
-0.1817499101,
0.0004487224,
-0.0913958773,
0.117512323,
-0.1941930354,
-0.0850747451,
0.3067543507,
-0.303391397,
-0.101105243,
-0.2366934121,
-0.1138289794,
0.002907454,
0.0257748663,
-0.0672821105,
0.3524060845,
0.033818759,
-0.0124957711,
-0.0293373112,
-0.1199405789,
0.1766285896,
-0.0328030214,
-0.0975782722,
-0.0202307105,
0.168716535,
-0.1106216609,
0.1685242653,
0.0209707543,
-0.006221069,
-0.1654156148,
0.1592140049,
0.9956922531,
0.4840340018,
0.0175146703,
-0.0846366137,
-0.0097521925,
0.0726344585,
-0.179618299,
-0.0587082319,
0.5532768369,
-0.0530378446,
-0.1393409371,
0.3943898678,
0.0936163291,
-0.3328877091,
-0.0402031615,
0.1430508941,
-0.1820315123,
-0.2135004401,
0.1223310009,
0.0459816195,
0.1855964065,
-0.0658071637,
0.1167557016,
-0.2406722605,
-0.0907289982,
0.0895981491,
-0.0965596586,
0.2592723966,
0.0846504197,
-0.3579290509,
0.029974103,
-0.4366186261,
-0.0892414451,
0.196777001,
-0.0965185165,
-0.09277796,
-0.3198330998,
-0.156083256,
0.1696870029,
-0.1161276698,
-0.0806686878,
-0.0641262829,
0.2182723284,
0.6738343239,
0.0340833291,
0.4116017222,
-0.1827398688,
-0.0359324031,
0.4898309708,
0.2419966012,
-0.384093821,
0.2102403343,
0.2967364788,
0.501862824,
0.0241964534,
-0.0471391603,
0.0332082659,
0.0032872185,
-0.1292330623,
0.2143201828,
0.2693783641,
0.2161968499,
0.1171034202,
0.0696159005,
0.1879121959,
0.1066988409,
0.2010372281,
0.0410471521,
0.1091635972,
-0.0508443601,
0.1418713927,
0.1368930787,
-0.3504535258,
0.4271066189,
0.3146426082,
0.1403207779,
-0.055156678,
0.1650426239,
-0.0094348527,
0.2653466463,
0.2739953697,
0.2458315194,
0.1712571532,
-0.0407833606,
0.3296457529,
-0.3226226568,
-0.0500218831,
0.0061404333,
-0.0895619094,
-0.7040660977,
-0.479926914,
0.208713308,
0.007054083,
-0.1786897182,
0.1951505244,
0.0504535846,
-0.1807205677,
0.6409839988,
-0.1242551133,
1.1574863195,
0.4827519655,
0.1591488719,
0.1125211716,
0.2006057203,
0.2373843491,
-0.3035923839,
0.0677878261,
-0.0783930197,
0.1987783909,
-0.0498538092,
0.0647742152,
-0.1585075855,
0.0622847378,
-0.4324498177,
-0.1228509992,
-0.0842517614,
0.0584111996,
-0.0590637326,
0.3170297146,
-0.0231891386,
-0.4224410057,
-0.0628531128,
0.2179553807,
0.0070259334,
0.1343669146,
0.0345463008,
-0.1556110382,
0.2441347986,
0.054478839,
-0.3005511165,
0.069426164,
-0.1215174422,
-0.2669511139,
-0.2369614542,
-0.1326867193,
0.0626228303,
0.1947981566,
0.0110709909,
0.2505170107,
-0.0093567539,
0.1420044452,
0.2104909569,
0.0371186137,
0.2002176344,
-0.0400162227,
0.3876714408,
-0.1026767865,
-0.2133580297,
0.2087535858,
0.0845870748,
-0.2225946188,
-0.2089504451,
-0.1261924654,
0.2238058299,
-0.2065967917,
0.1338755488,
0.244167909,
0.045111917,
-0.1616762877,
0.1447421163,
0.0308182742,
-0.3660281301,
0.2378795892,
-0.1021043137,
-0.0897376835,
-0.2988922596,
0.2991769314,
0.1991945654,
-0.0660863817,
0.2654157579,
0.1631921828,
-0.2442840189,
-0.3363745809,
0.3560640812,
0.0272334144,
-0.2357187569,
-0.089747414,
0.0112668276,
0.0744600296,
0.0584657975,
0.3196856678,
0.1003474966,
-0.1523533463,
-0.227984786,
-0.1858521998,
-0.4159484506,
0.1065221727,
0.1921975017,
0.1433027387,
0.0104508176,
0.051623214,
-0.1151611358,
0.0882367715,
-0.4500927329,
0.0385352597,
-0.1323822886,
0.1920956224,
-0.1528329104,
-0.3040906489,
-0.0052291825,
-0.0048891529,
0.1730178893,
0.2098674029,
-0.1454312354,
-0.2495697737,
-0.3390628695,
0.1457418799,
0.2924628556,
-0.1402600557,
-0.1638765931,
0.0836845264,
-0.2418483794,
-0.1068435609,
0.3897121847,
0.3422495127,
0.0888575986,
-0.2039665431,
-0.0724267662,
-0.0383627862,
-0.048095759,
0.0086665656,
0.2314360589,
0.1936446428,
0.2700585425,
0.2792685926,
-0.1034336984,
-0.1198391542,
0.1107205451,
0.4209378362,
0.4609632492,
0.0164930429,
0.2232059538,
-0.2835409641,
0.3192583919,
0.105282411,
0.4450282454,
0.2600058019,
-0.2056763172,
-0.0049462952,
0.393594116,
0.3718564212,
-0.177359134,
0.0193235502,
0.0810717791,
-0.2412967831,
0.3103739917,
0.2030957341,
0.148863107,
0.1200705767,
0.0676813871,
-0.0242294408,
0.032860674,
-0.0844698548,
0.2874404192,
0.3628754616,
-0.163251251,
-0.0739804059,
0.1752861738,
0.3543742299,
0.3791214228,
0.576295495,
-0.1655837297,
0.4650756419,
0.3072718978,
-0.3316731751,
0.2191114426,
-0.1568673253,
-0.160980612,
0.2824743986,
0.0721071512,
0.3706005812,
-0.0795153156,
0.3249425292,
-0.631024003,
-0.3518258929,
0.0803154781,
0.1161886156,
0.1487326026,
-0.1080911011,
-0.292943716,
-0.0418262184,
-0.0189677775,
-0.1837137341,
0.0820152685,
-0.1899730712,
-0.1283592284,
-0.0696762726,
0.0318357199,
-0.0394863486,
-0.322429955,
-0.1900801659,
0.4205603898,
-0.2098813057,
0.0343904644,
-0.0753980577,
0.0150794853,
0.1595043391,
0.2452430725,
0.1217795461,
-0.0540571064,
-0.4147153795,
0.2664082944,
-0.2052636445,
-0.0796636865,
0.015525423,
0.1405999213,
0.2044267505,
0.2787299752,
0.3516683578,
0.1802438498,
-0.2170606703,
0.071203351,
0.1786266565,
0.0285101198,
-0.1079896539,
0.0210356694,
-0.1912673712,
-0.0878528953,
-0.2785836458,
-0.281231761,
-0.3557814658,
-0.1439832896,
0.1353620589,
-0.1966171265,
0.1673760414,
-0.0332600698,
0.1274765283,
-0.1395260543,
0.0831313208,
0.1159179658,
0.0855442733,
0.0874627829,
-0.0615018681,
-0.2160031796,
-0.0088677108,
-0.1558317542,
-0.0121779665,
-0.2357168496,
0.1340301335,
0.2658377886,
0.3944411874,
-0.3273133039,
0.1216309667,
-0.4167951047,
0.2804066539,
-0.3058730364,
0.4049425721,
-0.3673973978,
0.5024869442,
0.0545746982,
-0.305164367,
-0.0807009935,
0.0088899694,
0.1484775841,
0.0989564955,
-0.2811572552,
-0.0034876391,
-0.370262146,
0.4069082141,
-0.2077630758,
0.2602317333,
-0.2546187937,
-0.1644985974,
-0.0612240247,
0.1538013518,
-0.1738909632,
-0.1906511039,
0.1229963601,
0.4134191573,
-0.135033533,
0.2048760355,
-0.0354043916,
0.1267118603,
-0.0008091182,
0.0561116599,
-0.1075563729,
0.1782754362,
-0.1608629823,
0.236017704,
0.1800750494,
0.1975185126,
-0.2519266605,
0.0901322886,
-0.1539796591,
-0.2482718825,
0.5132051706,
-0.2454800159,
-0.3263626099,
-0.2705002427,
0.2024951428,
0.311545074,
0.0868824869,
-0.533213377,
0.1467756927,
0.2074881047,
-0.0956714749,
-0.0311995782,
-0.0753797814,
-0.3398633003,
-0.3039981723,
-0.2820353508,
0.2117497623,
0.0541308038,
-0.1605184525,
-0.0391395688,
-0.2843500674
] |
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.3622047901,
0.206051141,
-0.0382297933,
0.0014163647,
-0.1214069426,
-0.129606545,
0.285892576,
0.3488551974,
0.1810040623,
0.2673176527,
-0.1220438853,
0.1734328121,
-0.5791185498,
0.2486565411,
0.1030065417,
-0.1610255986,
0.1628734767,
0.2866100073,
0.0956863612,
-0.1880007386,
-0.129065305,
-0.0335458219,
-0.2270614952,
-0.2975463867,
-0.35311535,
0.0726717487,
-0.1824730337,
-0.2084127218,
-0.1638894826,
-0.2925846577,
-0.2777968049,
0.0334551409,
0.2236546427,
0.5653851628,
-0.0001063294,
-0.1449196637,
-0.0884730816,
-0.3044511676,
0.0654771999,
-0.07464917,
-0.0837005526,
-0.1278289855,
-0.4064910412,
-0.0930256695,
-0.2304192036,
-0.1425431669,
-0.0099479798,
-0.2797590494,
0.2190804929,
0.2948246598,
0.2410484701,
-0.0154667795,
-0.0557160191,
-0.1818624139,
0.1919793189,
0.0053664818,
-0.0167084336,
-0.1235179752,
0.0366831906,
0.0193055272,
0.0953447744,
0.5634722114,
-0.020344656,
-0.2623257339,
-0.0066588745,
-0.0895407945,
-0.1298709065,
-0.4109852612,
-0.0241050404,
0.4772326052,
0.4497813582,
-0.2047095895,
-0.2180190235,
-0.1389561892,
0.082296133,
-0.2967884541,
-0.1726080626,
0.2062318027,
-0.0013448596,
0.1559954584,
0.1247614175,
-0.3047011793,
-0.0445499867,
0.2275998592,
-0.064935565,
0.4114827514,
-0.0107395463,
-0.1321665645,
0.014494678,
-0.298453033,
-0.3767271936,
0.2829952836,
0.2045619339,
0.2323183864,
-0.1000511348,
-0.3026237488,
0.1004269198,
-0.0496398509,
0.1847790927,
-0.0104827397,
-0.1364688277,
0.1110458747,
0.0976456702,
0.0904046968,
0.2405509949,
-0.0651147366,
-0.0079655685,
-0.1032883376,
0.1962270737,
-0.2124025077,
-0.1570111215,
0.1893926412,
-0.2619786859,
0.1155810803,
-0.0177205577,
0.0266587734,
0.0966511667,
-0.1736463606,
0.017109476,
0.2102118284,
-0.1320615411,
0.0434754714,
-0.0822210461,
0.3474675119,
-0.1171208322,
0.2644561827,
-0.0594006106,
0.3889173865,
-0.1311835945,
-0.2085462511,
-0.0338917114,
0.1506563276,
-0.040968772,
0.2504804432,
0.1820814162,
0.1834037453,
0.0814339966,
0.0801912397,
0.4036088586,
0.046203509,
0.0749737695,
-0.0386665687,
0.1496946067,
-0.2442623079,
0.0992057174,
-0.0477511995,
-0.0776874349,
-0.0466319993,
-0.2552613616,
-0.0784298331,
0.2434821427,
-0.2535856962,
-0.2981432676,
0.2990469038,
-0.1131110415,
-0.117632091,
0.2105848044,
0.6592454314,
-0.0265017189,
-0.3424620032,
-0.0631872267,
0.052625645,
-0.1718242764,
-0.0150963776,
0.1499961913,
0.2983686328,
-0.3179383874,
-0.1984021962,
0.0946155414,
0.2202682048,
0.0514326766,
0.2936133146,
-0.00168759,
0.0959734395,
-0.0085592307,
0.2231383771,
0.0867230147,
-0.3522509336,
-0.3762063384,
0.0857582688,
-0.0944089144,
0.0374453887,
0.1689457893,
0.2056658864,
0.5524088144,
-0.2033008337,
0.3426637352,
0.4188266397,
-0.0198921096,
-0.0120017789,
-0.0937541351,
-0.3128603995,
0.2254298031,
0.3783737421,
0.004375698,
0.0188303012,
-0.2665967941,
0.3279887438,
0.3670644462,
-0.276188761,
0.1107820421,
0.1414889246,
0.4262056947,
0.0683254078,
-0.0993258357,
-0.4540150166,
-0.0165984929,
-0.0257258117,
-0.095650889,
0.3194209635,
-0.0702556819,
-0.5392351747,
0.025033921,
-0.3108381331,
0.0048712278,
0.0713822842,
0.2480748892,
0.1039578021,
0.1168509573,
0.0260644183,
-0.4303717017,
-0.0316607207,
0.1560540944,
-0.1150337011,
-0.125570029,
0.1169829369,
-0.0194777586,
-0.1644622535,
0.2081954181,
0.2909439504,
0.0755519196,
0.0528747477,
0.2668862641,
0.0709271431,
0.1357492059,
-0.1132399887,
-0.0462314896,
0.0530096889,
-0.0085944291,
-0.3846392632,
0.0634873882,
0.3921804428,
-0.0621205643,
-0.0536217541,
0.0895173997,
0.2135982513,
0.4971491694,
0.0607670285,
-0.024805665,
-0.0618539974,
0.0949490666,
-0.0250035971,
-0.1085492074,
-0.282754004,
0.1236064285,
0.1179463565,
0.1139038652,
0.1439706832,
-0.433542192,
0.0984676927,
0.4523303509,
-0.1298231184,
0.3852921128,
0.0481189117,
-0.3084796369,
-0.0194220059,
-0.0551848635,
-0.3254058361,
0.1220446974,
0.3093284965,
0.0621401556,
-0.0152724115,
0.244361937,
-0.0327318572,
0.0469604284,
0.0170569755,
-0.1983921528,
0.2099428624,
0.0601658225,
-0.1522660404,
-0.2575825453,
-0.3199754357,
-0.0662789866,
-0.0185558628,
0.0975537598,
-0.2175049782,
0.0117303878,
-0.0706100315,
0.0489456318,
-0.3854293823,
-0.1949516237,
0.1977466345,
0.3800061345,
-0.0833935887,
-0.1135619357,
0.2648080885,
-0.0519087464,
0.4458293617,
-0.0833613425,
-0.319098562,
0.1689810157,
-0.1556271315,
0.0674683005,
0.189888373,
0.003277339,
0.2206190974,
0.0939170793,
-0.038563855,
0.0312704593,
0.1009202376,
-0.1914324462,
0.1785157919,
-0.1373094916,
0.0531250164,
0.0208643731,
0.078951627,
0.0419875309,
-0.2782668769,
-0.0537758507,
-0.1046975404,
0.1359054893,
-0.0085709766,
-0.2253917456,
0.1661048532,
0.0294248611,
-0.3284977973,
-0.7819318771,
-0.5647488832,
0.243054837,
0.3136271238,
0.1024921313,
-0.0683983266,
-0.1409724355,
-0.0563665368,
-0.1719585657,
0.247058019,
-0.2032079399,
0.0324628502,
0.4612771273,
-0.2707380354,
-0.1865021884,
-0.2920601964,
-0.2375634462,
0.0957438201,
-0.1553488225,
-0.2603886127,
0.2003101408,
-0.1632536501,
0.0965489447,
-0.0052644098,
-0.0262271557,
0.3263148367,
0.1320693344,
-0.131696701,
-0.0994006619,
0.115309611,
-0.0704141408,
0.139061138,
-0.0816311389,
0.0134751312,
-0.1746076643,
0.0314375386,
0.6643482447,
0.3344541788,
0.0125744129,
0.175095737,
-0.0013844892,
0.1119309664,
-0.1227553785,
-0.1437573731,
0.1638988256,
-0.0561095625,
-0.118738234,
0.5490953922,
0.0184464678,
-0.4654213786,
-0.1587921977,
0.103869617,
-0.213449657,
-0.2118080258,
0.2113969624,
0.0388387591,
0.174300611,
-0.1160269305,
-0.0555655062,
-0.2088224739,
-0.0120236911,
0.1845557988,
-0.0107938685,
0.1448999494,
-0.1179812178,
-0.2399495244,
0.0103757344,
-0.4669719636,
0.1290616989,
0.0955213383,
-0.1345150173,
-0.1190471128,
-0.2967169881,
-0.2244535536,
0.0841993541,
-0.0949917734,
-0.2629109621,
-0.1887691915,
0.180809319,
0.361107856,
-0.1731305122,
0.4214000702,
-0.3377195299,
-0.1228828579,
0.3760775924,
0.250703007,
-0.4433842003,
0.3351087868,
0.1823345423,
0.5083807111,
0.0011388287,
-0.0721249059,
-0.2182143629,
0.0266424939,
-0.2039165348,
0.4047906399,
0.1798476875,
0.0870758444,
0.2208211273,
0.0615780726,
0.0703689754,
0.1028541774,
0.3789215088,
0.0770466328,
0.2333376706,
0.0289208293,
0.1345977634,
0.1121224836,
-0.188121587,
-0.0295364279,
0.4321109056,
0.0630021393,
-0.2604456842,
0.0249345563,
0.0034137852,
0.3576075137,
0.3181087971,
0.2150358856,
0.4056580663,
0.0334022306,
0.1880112439,
-0.2066319883,
0.0695326328,
0.2023232728,
-0.1256694794,
-0.451610893,
-0.5478141904,
0.1800529063,
0.1455732137,
-0.1372803599,
0.0861359239,
0.02288118,
-0.1187795922,
0.6165671945,
-0.3423855007,
1.1753393412,
0.3344914317,
0.2076605409,
0.0480144285,
0.1837857962,
0.3083377779,
-0.3009545207,
0.0103776492,
0.0684074759,
-0.0885393918,
-0.0191612206,
0.0707408786,
-0.1447669864,
0.1776676476,
-0.7377355695,
0.0661364943,
-0.184496969,
-0.0211431105,
-0.1358197629,
0.2500276566,
-0.1251885891,
-0.5233944058,
-0.444770813,
0.2471958399,
-0.0130944885,
0.1376271099,
-0.0007745102,
-0.0571645349,
0.0897978544,
-0.0959881395,
-0.2057287693,
0.0694095492,
-0.1310456246,
-0.1545065939,
-0.3360478282,
-0.0461532921,
0.0329299197,
0.2875266671,
0.1190966815,
0.4786849022,
-0.1238555983,
0.0854962915,
0.3140232563,
0.1191115081,
0.1748800576,
-0.0558031052,
0.2491299659,
-0.0389485359,
-0.3561420441,
0.2521934509,
0.1491468996,
-0.2774616182,
-0.2780533731,
-0.1171091199,
0.1806351542,
-0.0457686819,
-0.0004739054,
0.3075363338,
0.0031316355,
-0.2630973756,
0.2051135153,
0.0770246685,
-0.4349074364,
0.0878980458,
0.0002254195,
-0.0886178762,
-0.1464882344,
0.2452912033,
0.3076663315,
-0.0739833266,
0.1029378027,
0.3325700164,
-0.1294415593,
-0.3821824491,
0.1188279092,
0.0627315342,
-0.2772651017,
-0.1331380308,
0.0890587345,
-0.1484773159,
-0.1134965494,
0.2436073422,
0.1177871972,
-0.2202750891,
-0.1120532751,
0.0209177881,
-0.6115117669,
0.2955406308,
0.3633835912,
0.104099527,
0.2315914631,
-0.130938679,
-0.2784083486,
0.1934370399,
-0.4642870128,
-0.0632443279,
-0.0965128765,
0.160890758,
0.0074286666,
-0.2459557503,
0.1158765852,
-0.0405658707,
0.2241310775,
0.1675934047,
-0.017686151,
-0.3255051672,
-0.2224098742,
0.0868889838,
0.236650601,
0.1457110345,
-0.0152937211,
0.0368035361,
-0.1100720614,
-0.1060400903,
0.4459155202,
0.2392484993,
0.0525277853,
-0.0880475342,
-0.1513986737,
-0.2160507739,
-0.1253120005,
-0.06631542,
0.1494651735,
0.1749303937,
0.230473727,
0.0673188195,
0.0116898417,
-0.1654165834,
0.0794727653,
0.3628194928,
0.3833222389,
0.1561155915,
0.0436236411,
-0.2703098655,
0.2227496952,
0.1688224524,
0.4512782097,
0.1104409248,
-0.1209567338,
0.0941595063,
0.4990378618,
0.4179680347,
-0.4108498096,
-0.0577695295,
0.2328462005,
-0.3552446961,
0.3839776516,
0.3740127981,
0.0952963531,
0.1067196876,
0.0465503745,
0.0371722467,
-0.115101546,
-0.0377179049,
0.2571500242,
0.1460975409,
0.1024780348,
-0.0748103559,
-0.0013251696,
0.3439778984,
0.3266226947,
0.530084312,
-0.2825894654,
0.388651073,
0.0956529081,
-0.2597622275,
0.2736117244,
0.064205654,
0.1377782524,
0.2306453586,
0.1587525308,
0.2691071033,
-0.0515616387,
0.4701896012,
-0.5321553946,
-0.2839860022,
-0.0702506304,
0.098294735,
0.0657479167,
-0.1043236777,
-0.0354630463,
0.0261131674,
-0.2292877734,
-0.1708307564,
0.2301442027,
-0.1359265745,
-0.268232733,
0.2988191247,
0.1705302298,
-0.2401819527,
-0.1490207314,
-0.147034049,
0.3594736457,
-0.2478772998,
0.1671845466,
-0.1194425374,
0.0528096259,
0.2467087656,
0.289206475,
0.146504283,
-0.0964317918,
-0.3751777709,
0.32986781,
-0.2860943973,
-0.0447453037,
-0.1460155696,
0.0783333629,
0.1508558691,
0.422197938,
0.2761324644,
0.2086018622,
-0.3079875112,
-0.1333695948,
0.158604458,
0.0423179902,
-0.1505165398,
0.0643149763,
-0.1524140984,
0.0442223474,
-0.4095977545,
-0.2510286272,
-0.6997448206,
-0.1190192252,
0.161410287,
-0.052483853,
0.071913138,
-0.083918497,
0.14172858,
-0.0368319824,
-0.0125219338,
0.0663311258,
0.2649338245,
-0.0075703412,
-0.0811247602,
-0.358141005,
0.2474454641,
-0.2162039578,
-0.0841437131,
-0.2664986551,
0.0812275037,
0.3445625901,
0.4079993367,
-0.288879931,
0.020823013,
-0.3841980994,
0.1748023033,
-0.2963864207,
0.2929531932,
-0.2503390014,
0.472278595,
0.1480896771,
-0.3501278758,
-0.3310794234,
0.0409936644,
0.1730995923,
0.0031627752,
-0.4065483809,
-0.0937647894,
-0.3867295682,
0.4055826366,
-0.1437371671,
0.5092086196,
-0.3020285964,
-0.2368840724,
0.033028096,
-0.0799097121,
-0.2482532263,
-0.1539030075,
0.0322415307,
0.459618777,
-0.1901185811,
0.2216010988,
-0.0705073401,
0.1909004301,
0.0626068041,
-0.0679497942,
-0.1536721289,
0.2455643713,
-0.0057617053,
0.1625897586,
-0.0941637903,
0.2533111572,
-0.2927539051,
0.101081267,
-0.126283288,
-0.2569382787,
0.3687209487,
-0.3402693868,
-0.2988108993,
-0.2196719944,
0.357960999,
0.1641683131,
0.084554188,
-0.2945982814,
0.1834282875,
0.0427228883,
0.1098534018,
-0.0096264705,
0.0706699044,
-0.1355888247,
-0.2739542127,
-0.2798532844,
0.1673710644,
0.0584492236,
-0.0878949985,
-0.1146519929,
-0.3189826906
] |
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.436086446,
-0.3340415359,
-0.033181265,
-0.0555871762,
0.0697015896,
-0.194478482,
0.3812374473,
0.2073158175,
-0.2748001516,
0.0517775901,
0.3157569766,
0.3878786564,
-0.2385889739,
-0.0081709847,
-0.2220511734,
0.1165849864,
0.1717213094,
0.1350865215,
0.3698126078,
-0.1361590028,
-0.2459042966,
-0.0289520863,
-0.4537951648,
0.1861462295,
-0.5515934229,
-0.0939205438,
0.016847834,
0.0239227526,
-0.1578884572,
-0.332066685,
-0.2777600288,
0.0381638817,
0.0004328713,
0.3452005386,
-0.0001291091,
-0.2028735876,
0.3343114257,
0.3039596677,
0.068397671,
-0.0113465711,
0.1007518619,
-0.4201105237,
-0.0934072137,
-0.0518575907,
0.0113795474,
0.0090430789,
0.2106573284,
-0.0802218318,
0.1935955733,
0.0336161442,
0.0578774735,
0.3355195522,
-0.4118833244,
0.3002009988,
-0.0285428539,
0.1999464035,
-0.0942219496,
-0.0267876443,
0.1064963266,
-0.1693149507,
0.162775889,
0.1288419962,
-0.2492697835,
-0.0105362926,
0.2192679048,
0.1379472911,
0.5077479482,
-0.4718613923,
0.3414837122,
0.2420953214,
-0.1116660386,
0.1792000681,
-0.3060408533,
-0.3064303398,
0.0190433823,
-0.411524415,
-0.0026200525,
0.0045572631,
0.0472664386,
-0.0208517537,
-0.4781555235,
0.1738858223,
0.1423052847,
0.0237272233,
-0.2842416763,
0.6366428733,
0.0835531652,
0.1209812313,
0.1686225235,
-0.1988870203,
-0.2149645686,
-0.2544275224,
0.1541731954,
0.5229038596,
-0.1893165708,
-0.1005732864,
-0.1133746952,
-0.0243342966,
-0.2357409745,
-0.3004846275,
-0.391384095,
0.3871784508,
0.0365635194,
0.1213995665,
0.0062339846,
-0.079198882,
0.0439269319,
0.2379095405,
0.2816815972,
-0.4815147221,
-0.2453263998,
0.0616535246,
-0.2930655777,
-0.1480613202,
-0.0174207836,
0.1158760488,
-0.21604608,
-0.0180587322,
-0.067855157,
0.064253062,
-0.3971652389,
0.0320902355,
0.331068635,
0.1310612857,
-0.0551013313,
0.5344247222,
-0.35351336,
-0.0543105416,
-0.5124525428,
0.0594563894,
-0.0384579375,
-0.1878848821,
-0.2003134489,
0.1468881369,
-0.034380652,
0.1941289008,
0.1312454492,
0.0913661569,
0.1758318543,
0.0764412731,
0.553352952,
-0.2733446956,
0.2202518135,
0.2896811664,
-0.2941049039,
0.4735397398,
-0.0568002425,
0.2583465278,
-0.213285327,
0.4684458673,
-0.513767004,
-0.4455689788,
0.1040069535,
-0.0502087437,
-0.0349192321,
0.2365923822,
-0.2229654491,
0.3019236028,
0.3209951818,
-0.0065402463,
-0.19023332,
-0.258133918,
-0.5693917274,
-0.093162708,
0.2414501309,
0.2863371372,
-0.1284326762,
0.0288034156,
0.1292351186,
0.2965085804,
0.7083094716,
0.3495639861,
-0.1610261798,
0.1975355446,
-0.1121667251,
0.5817087293,
-0.057308428,
-0.0024947301,
-0.1221967489,
0.3314131796,
-0.3430328965,
-0.1398529857,
-0.0191544294,
0.0702574253,
0.2119110227,
-0.1398649216,
0.2076436877,
0.0084966905,
-0.0263472386,
0.3012175858,
-0.4460813403,
0.0836736187,
0.2569980025,
-0.0578042865,
-0.1963773221,
-0.1404870898,
-0.3174522221,
0.0300512724,
0.0254322663,
-0.0975901484,
0.1209551245,
0.0960759073,
0.1515374929,
-0.1494010389,
0.0074112453,
0.0793569461,
0.0448694378,
0.1637544036,
-0.1777203679,
0.0571317188,
0.0228355378,
-0.0804907978,
0.1946887523,
-0.0073323771,
-0.0777317509,
0.0006753262,
-0.1042291671,
-0.1330374777,
-0.1713919044,
-0.0241132751,
-0.0527577363,
0.0256194063,
0.0285965055,
-0.0098103099,
0.1717208326,
-0.1269737929,
0.0856131539,
-0.1991584748,
-0.3183266521,
0.1766965985,
0.2936832011,
-0.1260848492,
0.0239194073,
0.3493394554,
0.3390117288,
0.0682440326,
-0.0969688818,
0.257764101,
0.3222966492,
0.2259222865,
0.2996604443,
-0.2068663836,
-0.0924342573,
-0.2335605919,
0.2150353491,
0.8690195084,
0.3758693337,
0.2990354896,
-0.0244135931,
-0.2960142195,
-0.0128678828,
0.2824968398,
-0.0023054257,
-0.0397012383,
0.236777395,
0.3676809072,
0.3466967642,
0.2306514829,
-0.0149929449,
0.1968120784,
0.1363526881,
-0.2129917443,
-0.1881495118,
0.0376622118,
-0.0343602486,
-0.1988099068,
0.1022653729,
-0.585914731,
0.2442329526,
-0.035227295,
0.1711595207,
-0.00637531,
-0.1822372079,
-0.0630131587,
0.1467840075,
0.1539622396,
0.0412816554,
-0.0272233114,
0.1279743761,
0.0700947344,
-0.0916840583,
-0.1123029217,
0.2207985967,
0.5185967684,
-0.2242199033,
0.1264094412,
-0.1815517247,
0.3484583497,
-0.0092582963,
-0.1181668192,
-0.1135652065,
-0.2855656147,
-0.0233043432,
0.0805969238,
0.1668617725,
0.1096137241,
-0.0144177936,
-0.0733011961,
-0.1003978997,
0.227721855,
-0.0665107071,
-0.0254167505,
-0.2751340568,
-0.1501683891,
0.3499273956,
0.0754397511,
0.0420036763,
-0.0100304373,
-0.3488821387,
0.0729174986,
-0.5219575167,
-0.0330346152,
0.063374415,
-0.033186391,
0.0179083794,
0.0217055343,
-0.5248931646,
0.1516859233,
0.1539481282,
-0.1330844611,
-0.2944361567,
-0.0114100352,
-0.2839923501,
-0.2393364459,
-0.0805285498,
0.1574740112,
-0.0880604237,
0.3033662438,
0.1242296547,
-0.1432496756,
0.1995023042,
-0.1756277382,
-0.1001196951,
0.1543434262,
-0.0461928472,
-0.390545994,
-0.0550691448,
-0.2851265669,
0.3271593153,
-0.1026912481,
0.0898138881,
0.0317499191,
-0.0419972837,
-0.0872767568,
0.1167669296,
0.0802400261,
0.010884583,
-0.0897265747,
0.02749639,
-0.058001928,
-0.0622240379,
0.3971164227,
0.1535113454,
0.0334780999,
0.1151601076,
-0.3876469135,
-0.1599525362,
0.0064626466,
-0.0498174429,
0.0998837948,
0.3346402347,
0.087435618,
0.978351891,
0.1062368453,
-0.2804867625,
-0.133696124,
-0.1836687028,
-0.2738051713,
0.0565304086,
0.0110868141,
0.2926234603,
0.3481584191,
-0.1060489118,
0.351615876,
0.0360320881,
-0.4280946851,
0.1520731151,
0.0106278658,
-0.2330414057,
-0.1345244497,
0.1594468802,
-0.235710755,
0.2996189594,
-0.0050076917,
0.2305288166,
-0.4275159836,
-0.359606564,
-0.1457599103,
0.0265661348,
0.0506896973,
-0.337636739,
-0.6599954367,
-0.1241077185,
-0.8557751775,
0.3928838372,
0.0668694228,
0.4000654519,
0.3554158509,
-0.0419251658,
0.2548027933,
-0.1705654562,
0.9261286259,
-0.3752494156,
-0.0479905345,
0.0609392226,
-0.3622170091,
-0.1824947596,
-0.2055875659,
-0.0673927963,
0.5040717125,
0.4771127999,
0.6695145965,
-0.0840028226,
-0.3767010868,
0.0516610891,
-0.1607218087,
0.1572797149,
-0.1000595689,
-0.3202100098,
0.0091816485,
0.1780500412,
0.3636065722,
-0.1326893419,
0.1217945069,
-0.1157526001,
-0.1865266562,
-0.0926811546,
-0.0315529071,
0.3476768732,
0.0403212234,
0.1968772113,
0.2026277483,
0.2127322853,
0.3579657972,
0.2923237979,
0.3474161327,
-0.3887327313,
-0.074283883,
0.0921958685,
0.1749229878,
-0.1078393608,
0.4646160007,
0.5473304987,
0.1076298952,
0.1817888916,
0.0966074616,
0.3447217941,
-0.1060338318,
0.250379622,
0.5614131093,
0.2437326014,
-0.5444431901,
-0.2288586795,
0.0744212046,
0.5478262305,
-0.0730597898,
-0.0137784556,
-0.4667116404,
-0.054907456,
0.115440622,
0.3533853292,
1.1370747089,
-0.4572672248,
0.2235989273,
-0.3345708847,
0.1865453571,
0.1391561329,
-0.3053277135,
0.169403702,
-0.3431825638,
0.1261919886,
-0.0519641936,
-0.0698041767,
0.2564780116,
0.470136106,
0.1489554346,
0.1898183823,
-0.0283733457,
0.2957147062,
-0.1705439091,
0.0933229178,
0.541778028,
-0.3341781199,
0.1757442057,
-0.0575113818,
0.2041955739,
0.0147021916,
-0.0116624907,
0.0275174454,
-0.0299488157,
-0.1083595827,
-0.1351929158,
-0.3347499371,
-0.2640464306,
-0.1044403985,
0.2398075759,
-0.0443114936,
-0.0281099863,
0.0686318576,
0.2051472962,
0.2910551131,
-0.0669768155,
0.0809769183,
0.0974567533,
0.1381749511,
0.1266133487,
-0.3745391071,
-0.1369052678,
-0.0491357818,
0.0354472697,
-0.1650298387,
-0.1853075325,
0.0037485883,
-0.2561006248,
0.0792189538,
0.6586586833,
0.3335110545,
-0.1097470373,
0.1790462732,
-0.1239250749,
-0.1210861206,
-0.0148875257,
-0.0461563729,
-0.1962200999,
0.4305235445,
-0.1915862709,
-0.491783917,
-0.0159023087,
0.4187043309,
0.1013253778,
-0.1454495341,
0.5520438552,
-0.2703858018,
-0.2152640224,
-0.0652344152,
0.4115818739,
0.1103636473,
0.1579064727,
0.0483677015,
0.3706418574,
-0.025278002,
0.3468016386,
-0.0522841364,
-0.2708884776,
0.0632005259,
-0.193521291,
-0.1205903217,
-0.3543400466,
-0.3424693346,
-0.1876293421,
-0.093329519,
0.0107334927,
0.2203309983,
-0.2272357196,
-0.134309724,
-0.1209257916,
0.0782524049,
-0.0859040916,
0.2770216465,
-0.205943346,
-0.0328887105,
-0.0524548255,
-0.0511378199,
0.0184967667,
0.2247286737,
-0.2035122067,
-0.0793928206,
-0.0961865261,
0.2424827516,
0.0696055144,
-0.4496531188,
0.3252122998,
0.151325956,
-0.3381517828,
-0.261351645,
-0.1411796808,
0.2994888425,
-0.0444701761,
-0.1229889765,
0.4639208615,
0.1736135036,
-0.1211529225,
0.1722889692,
-0.0991257429,
0.1508994102,
-0.052426856,
0.3517230451,
0.3136865497,
-0.088929534,
0.2567597032,
-0.0925769284,
0.1440127194,
0.1110241562,
0.0540261902,
-0.0857153758,
0.0341706276,
0.1923609078,
-0.0414828435,
0.1802285612,
0.03389512,
-0.3946096897,
0.6167110205,
0.0001259383,
0.0131851435,
-0.1981575191,
0.3172851801,
0.0790934563,
-0.0049077123,
0.1999773681,
0.3037666082,
0.3584085107,
-0.2044158727,
0.0103775635,
-0.1436357498,
-0.2623721361,
0.0120440051,
0.1228776276,
0.1161627173,
0.1627410352,
0.4875867367,
0.019633878,
-0.0676995367,
0.4756559432,
0.3589250743,
0.5300141573,
0.3057099879,
0.410143733,
-0.4583231807,
-0.3641136587,
-0.2764772475,
0.6516805887,
0.0236859191,
0.2694936097,
-0.0620532148,
0.2542203069,
-0.1229634583,
-0.4720281661,
0.1158057079,
0.3828216791,
-0.3418947756,
-0.514667511,
-0.258123368,
-0.082867071,
-0.0889223814,
0.1356116682,
-0.2706582546,
0.1188924015,
0.3547162116,
0.0894193426,
0.0913791656,
0.0061075836,
-0.1751970202,
-0.1463090777,
0.3146531284,
-0.0293299779,
0.1819392741,
-0.6590740681,
0.121675685,
0.152223289,
-0.0928071141,
0.3953402638,
0.6274183989,
-0.411616981,
-0.0309420303,
0.0173123404,
0.0739464983,
0.1964253187,
0.2626112998,
0.0273687914,
-0.1165741086,
-0.0630779937,
-0.2329761833,
-0.1438364983,
-0.3250844181,
0.0415995158,
0.0322759449,
0.1660141796,
0.2918977439,
-0.0513232015,
-0.2218303084,
-0.0675223842,
0.2138189971,
-0.1194085032,
0.0062770359,
0.1002985463,
-0.1701911986,
0.1046152562,
0.1089518741,
-0.0085930116,
-0.2315933257,
0.4062277675,
0.2074525654,
-0.0814040378,
-0.4438836277,
-0.129189834,
-0.472083509,
0.1414042562,
-0.391308248,
0.1325628459,
-0.1618441194,
0.0186503083,
-0.0297394954,
-0.017582519,
0.1155498475,
-0.0919882879,
-0.0879414976,
0.2840392888,
-0.20839867,
0.488794744,
-0.3455664814,
-0.2010158598,
-0.0177064575,
-0.3488204479,
0.4559252858,
-0.0328084975,
-0.1777759045,
-0.0711353421,
0.1870517433,
-0.1703268141,
0.3382769823,
0.3156834543,
0.1269316673,
0.2096211463,
0.0929426849,
0.1342772245,
0.0061376006,
0.3694493473,
-0.2378084064,
0.2162376344,
-0.0895205289,
-0.0584536493,
-0.0820981413,
0.0643766671,
-0.0697736815,
-0.0684573054,
0.195774883,
-0.0802556127,
-0.1768535078,
0.2231900394,
0.0027979687,
0.0258170068,
-0.153359428,
0.1623666734,
0.2284025252,
-0.0751338303,
-0.3145276308,
0.1471105218,
0.2970349789,
-0.5313221216,
-0.1263433993,
-0.7054092288,
0.0914075822,
0.0993222743,
0.1780921817,
-0.1492675692,
-0.2474095672,
0.4167238772,
-0.1845205873,
-0.3637080193,
0.2536583841,
-0.0623040535,
-0.2088902891,
-0.3710054457,
0.0534606352,
-0.1362580359,
-0.081228599,
0.047062099,
-0.0913573653
] |
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.421677649,
-0.2463766336,
-0.0001557916,
0.0670944452,
0.030975204,
-0.2085660994,
0.4310256243,
0.2237497419,
-0.25451684,
0.045072969,
0.2334743738,
0.3255726695,
-0.1414713562,
0.0176057965,
-0.2975897193,
0.0944023132,
0.1700218618,
0.1978501379,
0.3180065453,
-0.1069222242,
-0.1142961681,
-0.0325473659,
-0.5134145021,
0.0937800407,
-0.516996026,
-0.0942345709,
-0.0523553975,
-0.0085095614,
-0.0878394544,
-0.3727585077,
-0.1796106994,
0.0533387586,
0.0209059119,
0.3229081035,
-0.0001312325,
-0.2167609036,
0.3219808638,
0.2510375381,
-0.0777236521,
0.0198328719,
0.0318119973,
-0.3308934271,
-0.0778875351,
-0.1234235242,
0.0175315663,
0.0237416029,
0.0749673843,
-0.2054027915,
0.0913551599,
0.0141810998,
0.0364925414,
0.3499346375,
-0.350489825,
0.2594858408,
-0.0747997463,
0.2026159614,
-0.0626253262,
-0.0495990142,
0.1012017727,
-0.1707476974,
0.1734011471,
0.2813489437,
-0.2406678498,
-0.0495629162,
0.1356948465,
0.1603331566,
0.4377092123,
-0.4210778773,
0.3177551627,
0.2465801984,
-0.0422625728,
0.0978337452,
-0.3110386729,
-0.2917481661,
0.0804974735,
-0.2755729854,
-0.0260987766,
0.0504077598,
0.0243026987,
-0.0064562112,
-0.4279643893,
0.101087302,
0.1111117527,
0.1455284208,
-0.2755876184,
0.5521758795,
0.106767267,
0.2040681541,
0.1689037681,
-0.2546338737,
-0.3334893584,
-0.4314100444,
0.1836212575,
0.4776844978,
-0.2874282002,
-0.1189518124,
-0.1553749442,
-0.2407780588,
-0.1358042359,
-0.325650543,
-0.429595232,
0.3585686088,
0.0314978249,
0.0367215723,
0.1139291078,
0.0111998022,
0.141597569,
0.3352189064,
0.2813812196,
-0.3873303235,
-0.2329003066,
0.094789654,
-0.3194717169,
0.0019108281,
-0.1017474979,
0.0573488474,
-0.1384475976,
-0.0624516457,
-0.086314708,
0.0299607329,
-0.4705277979,
0.032419391,
0.3583806157,
0.1112595499,
-0.089109078,
0.556710422,
-0.3564698994,
-0.0558775365,
-0.4742580056,
0.1034274101,
-0.0102328844,
-0.1693373471,
-0.2180456221,
0.1857893169,
0.0246350169,
0.0998851508,
0.0603746548,
0.1137021184,
0.1227450371,
0.0288295299,
0.5027253628,
-0.3931923211,
0.2299547195,
0.2137597948,
-0.2416320443,
0.5415731668,
-0.0803955346,
0.0517804474,
-0.2654266357,
0.4353520274,
-0.5407431126,
-0.4055195451,
-0.0378006212,
-0.0362009592,
-0.0213707909,
0.288274467,
-0.28982988,
0.3646249473,
0.356054157,
-0.0592742823,
-0.2194039375,
-0.1098219976,
-0.4298149943,
-0.0662316233,
0.1920268238,
0.3820968866,
-0.0858681649,
-0.0251057297,
0.2118611932,
0.3647101521,
0.704442203,
0.4722285569,
-0.2808416188,
0.1810287386,
-0.1422217786,
0.6345633268,
0.1009041518,
-0.2661669254,
-0.1717860401,
0.4077458382,
-0.3184233606,
-0.0377774313,
0.0876830369,
0.0555644222,
0.1874471903,
-0.1130772233,
0.2441988885,
0.1069107354,
0.0766588151,
0.3537724018,
-0.423173666,
0.023315765,
0.3323547244,
-0.046713952,
-0.2578984499,
-0.1601986587,
-0.2706968784,
0.0933793783,
0.0737237334,
-0.1934673488,
0.1603429019,
0.2436687499,
0.1488004178,
-0.1971046478,
0.0145642161,
0.1307734102,
-0.1473888755,
0.1625457406,
-0.0961499363,
0.1292531639,
-0.0469142124,
-0.2002082169,
0.1997577697,
-0.1230454147,
-0.108826749,
-0.0366090983,
-0.121484451,
-0.1047695279,
-0.1175521538,
0.0085358173,
0.0045816079,
0.0854113474,
0.0250086933,
-0.0044683814,
0.0385741033,
-0.03871461,
0.1060214862,
-0.0975367576,
-0.2942661047,
0.2391218841,
0.2922898531,
-0.1670206636,
0.0466097891,
0.3752070069,
0.2724762559,
0.0439520143,
-0.0118866218,
0.1884018481,
0.3430137038,
0.1958227009,
0.2216544896,
-0.1940376759,
0.0055269338,
-0.2589850426,
0.0628026724,
0.8033879995,
0.4351349175,
0.378760457,
0.0590229034,
-0.3100726902,
0.0016222522,
0.1633838713,
-0.0873768926,
-0.1206291988,
0.1915403157,
0.3726436794,
0.3853444457,
0.3481547534,
-0.0425093174,
0.2032210827,
0.2762520909,
-0.1238580346,
-0.1909556985,
0.0339907892,
-0.1010524184,
-0.2211480737,
0.1905422807,
-0.5782693028,
0.3371143937,
0.0041401535,
0.1818534732,
-0.0196052473,
-0.1397615671,
-0.0293811634,
0.2084516734,
0.1059032232,
-0.0174113624,
-0.00559422,
0.2592740059,
0.0706541091,
-0.0856021792,
-0.2151542902,
0.2720206678,
0.4728946984,
-0.1735390425,
0.144251436,
-0.1528490931,
0.251860559,
-0.0047392529,
-0.2206525952,
-0.0835443437,
-0.2356710583,
-0.0855706781,
0.1491013616,
0.1920591742,
0.1763484031,
0.0780315697,
-0.0344595015,
-0.0481048524,
0.0793813989,
-0.0425899625,
-0.0353819802,
-0.2902142704,
-0.177406162,
0.3210525513,
0.0619787946,
0.0119387433,
0.0396471396,
-0.311113596,
-0.0545602292,
-0.5426448584,
-0.0045081927,
0.0185828041,
-0.1482395828,
-0.0001311526,
-0.0861119106,
-0.5322769284,
0.0132140182,
0.1309880912,
0.1258890331,
-0.3133977652,
0.1124276817,
-0.253844142,
-0.3051471114,
-0.1234660894,
0.1048954949,
-0.0565838069,
0.2436975539,
0.1446893662,
-0.1881220043,
0.1945781559,
-0.0590646267,
-0.0902349651,
0.1419097632,
-0.0224593524,
-0.34831357,
-0.093134284,
-0.2128522992,
0.2848572731,
-0.0747310594,
0.0934049189,
-0.0979233682,
-0.0383976512,
-0.0665078908,
0.2167904377,
-0.0050207376,
-0.0108642094,
-0.191953674,
0.110256426,
-0.1700982451,
-0.0288525186,
0.3901929259,
0.2208696753,
0.00893341,
0.1864256263,
-0.24930951,
-0.1036617458,
-0.0369431674,
-0.0451332629,
0.0267366208,
0.2068388313,
0.1386744827,
0.8986779451,
0.2649660707,
-0.347802639,
-0.1407362968,
-0.1692237258,
-0.1681491137,
0.0339973345,
-0.070273675,
0.1933216304,
0.2878663242,
0.0653431565,
0.3337762356,
0.0477309115,
-0.4255110621,
0.0757418051,
0.0679422617,
-0.2009891868,
-0.1883062273,
0.1098383144,
-0.3344597518,
0.3503893316,
0.0369550958,
0.1809239388,
-0.3938421905,
-0.3281772435,
-0.1703467518,
-0.0127213709,
-0.0705465674,
-0.431749016,
-0.7411490083,
-0.1603210866,
-0.8604409695,
0.3774623275,
0.1138945147,
0.4273203015,
0.4424972236,
-0.049672775,
0.2007025778,
-0.1443955004,
0.9118056893,
-0.2354823202,
-0.1320425272,
0.0651301593,
-0.2948302329,
-0.2825041711,
-0.1848841906,
-0.1350063086,
0.5606458783,
0.4132288992,
0.8910480142,
-0.288185358,
-0.3910264969,
0.0918287635,
-0.0542338863,
0.2368578613,
-0.0117616095,
-0.2989798188,
0.0217598453,
0.0537793785,
0.3063644171,
-0.1271668822,
0.2147832811,
-0.1256706417,
-0.2243689597,
-0.104586944,
-0.0579675809,
0.3222069442,
0.0160491765,
0.2576270401,
0.2704820931,
0.2573384643,
0.252600491,
0.2224622369,
0.4124113917,
-0.327465266,
-0.045770295,
-0.0760481954,
0.0832426548,
-0.0973725915,
0.4350222051,
0.5226230621,
0.0872128308,
0.2733350694,
0.0553378128,
0.4113696814,
-0.0891618058,
0.3040414453,
0.5810802579,
0.2233849615,
-0.6745129824,
-0.1365584135,
0.054813236,
0.4843259454,
-0.117183879,
0.1027105525,
-0.4373591542,
-0.1425434649,
0.0541651957,
0.0916482061,
1.1344277859,
-0.391264677,
0.298722297,
-0.3353005946,
0.2050498724,
0.2643355727,
-0.2932564616,
0.1459595859,
-0.2696007788,
0.0886796266,
-0.0223328955,
-0.0719440654,
0.2274924815,
0.4449830055,
-0.0161433145,
0.2005716711,
-0.096137315,
0.3847247958,
-0.1948963404,
0.2793483138,
0.519538939,
-0.3606708646,
0.0977192372,
-0.0962956697,
0.106865257,
-0.0045545818,
0.0402073637,
0.0704549029,
-0.1235214174,
-0.2152333111,
-0.1378231794,
-0.2195769548,
-0.2363104969,
0.1335583329,
0.1438666135,
-0.0820707381,
-0.0600902997,
0.1567385495,
0.1476807296,
0.3711024225,
-0.0738878623,
0.037358202,
0.0624030083,
0.1400867701,
0.1169227809,
-0.4759305716,
-0.1420598775,
0.0166000873,
0.0216806233,
-0.051134374,
-0.2104132026,
0.0044903457,
-0.2595066428,
0.1267158836,
0.6846942902,
0.2058443725,
-0.0773867518,
0.287179172,
-0.1554274857,
-0.1291231811,
-0.0603239052,
-0.0261627212,
-0.1896751821,
0.4373888373,
-0.0392105281,
-0.545055151,
-0.0115868747,
0.546225667,
0.1766416132,
-0.1305160373,
0.5346006155,
-0.3273346424,
-0.236520499,
-0.0676726401,
0.3629670739,
0.0064803362,
0.0368446633,
0.0092678145,
0.3748606741,
-0.001021713,
0.3156610131,
0.0579903685,
-0.3333625793,
0.1151415482,
-0.1335594803,
-0.1369020045,
-0.2969364226,
-0.230531022,
-0.1561617404,
-0.0337158106,
0.0789393336,
0.2386433035,
-0.3597069085,
-0.1117156819,
-0.1031239778,
0.1722775698,
-0.1716843098,
0.3474076092,
-0.1470313668,
-0.0098968968,
-0.0367304794,
-0.0710791498,
0.0576291606,
0.120615527,
-0.0915221274,
-0.0774665326,
-0.1411892474,
0.2497136742,
0.0052958224,
-0.3966464102,
0.2849987149,
0.0630084798,
-0.3061584532,
-0.308570236,
-0.0362928025,
0.3132322431,
-0.0114059113,
-0.1323162019,
0.3741418123,
0.1712278426,
-0.1985109448,
0.2360491753,
-0.1497824043,
0.0487585403,
-0.0171281807,
0.3821554482,
0.2901316583,
-0.0776533335,
0.1234235913,
-0.0667801946,
0.2899847925,
0.1601425111,
-0.0129376762,
-0.0384362675,
-0.0291012153,
0.1701574624,
-0.038661357,
0.2133075744,
0.0034068823,
-0.4337033927,
0.549469471,
-0.0024499926,
-0.0012661889,
-0.2942692637,
0.2426231802,
-0.0435252078,
0.0206861719,
0.1721120626,
0.2906185091,
0.3161357343,
-0.1133485734,
-0.0637254938,
-0.0128461849,
-0.0209684204,
0.0833921134,
0.1557508111,
0.1571675837,
0.0776257142,
0.3752677441,
0.0021047909,
-0.0302343592,
0.3816515803,
0.2634069026,
0.529810071,
0.4195985198,
0.4187684655,
-0.4285307825,
-0.2606980503,
-0.1719608605,
0.5843435526,
-0.0457375869,
0.1622937769,
-0.1014738381,
0.2947356999,
-0.1984381229,
-0.4319772124,
0.1838298142,
0.3817294538,
-0.2996103466,
-0.4777972102,
-0.1748476923,
-0.0874692351,
-0.0691170171,
0.0974076912,
-0.2252936959,
0.1270913333,
0.3971891105,
0.1053197831,
0.0954692513,
-0.1167220771,
-0.0512645952,
-0.0514087155,
0.3568260372,
-0.0892329365,
0.2188122869,
-0.5762063861,
0.1682054996,
0.0820519775,
0.0075191818,
0.41376248,
0.6114664078,
-0.3368602395,
-0.0594511665,
0.0809926838,
0.0561211854,
0.2254050374,
0.2264371812,
0.1319907606,
-0.30402565,
-0.0107803605,
-0.2309983224,
-0.147258848,
-0.3216590881,
0.0735698193,
-0.1181311756,
-0.0113394335,
0.1541373879,
-0.096338585,
-0.2762734294,
-0.0361947939,
0.1771428585,
-0.1627212316,
-0.0665555224,
0.2220114917,
-0.2043379098,
0.0730707124,
0.044065088,
-0.0161617361,
-0.2055456191,
0.4363068044,
0.1931473315,
0.0088000139,
-0.5149211287,
-0.2020197958,
-0.4283941686,
0.1290433407,
-0.3554838896,
0.1211773753,
-0.2088880241,
0.103578724,
-0.0451579057,
0.0453557521,
0.0580851994,
-0.068092376,
-0.1239586771,
0.228916049,
-0.3094984591,
0.5009473562,
-0.2956528962,
-0.2376544029,
-0.0127012953,
-0.4991869926,
0.4623534679,
0.0846224576,
-0.1847005486,
-0.0811257213,
0.187453568,
-0.0802226067,
0.2932306528,
0.3498601913,
0.115915671,
0.3047505319,
0.087845996,
0.0769956633,
0.0760030895,
0.3194643557,
-0.137179628,
0.273665458,
-0.0183785427,
-0.0892863721,
-0.1453271955,
0.0888005048,
0.0161175095,
0.0099066608,
0.292294234,
-0.0905244499,
-0.1410575807,
0.2335030735,
-0.0231725052,
0.0249356665,
-0.167915076,
0.2333767563,
0.214135915,
-0.0457363203,
-0.2683859766,
0.0445176512,
0.3343245983,
-0.419791609,
-0.1525998116,
-0.6207872033,
0.1547617018,
0.1683094203,
0.1688879579,
-0.1889674067,
-0.2531670332,
0.5244734287,
-0.1408541054,
-0.4507500529,
0.298217535,
-0.0810269117,
-0.2373619378,
-0.3806573153,
0.0726998895,
-0.1702398956,
-0.1334685385,
0.0099516585,
-0.1878968477
] |
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.4388077557,
-0.2752538025,
-0.0035830028,
-0.0195048712,
0.0376553126,
-0.168846637,
0.3846202791,
0.247096628,
-0.2695716619,
0.07264781,
0.1870825589,
0.3446465731,
-0.198602125,
0.0340101495,
-0.3061353564,
0.0878569931,
0.1165524721,
0.1894624531,
0.2597584128,
-0.097663179,
-0.1504402757,
-0.0872969404,
-0.4416112006,
0.0910412297,
-0.4734843373,
-0.0844968632,
-0.0814723149,
0.0456180535,
-0.1439365447,
-0.29982844,
-0.2264625132,
0.1087270826,
-0.0366152897,
0.3386250436,
-0.0001279823,
-0.232973665,
0.212687254,
0.2498808354,
0.045799356,
-0.0689348131,
0.0412355363,
-0.3254991472,
-0.1309284717,
-0.0187024027,
-0.0309802294,
-0.0179252569,
0.1673597544,
-0.1152554676,
0.1905250996,
-0.0400752276,
0.0446927883,
0.3407948911,
-0.3702799082,
0.2314545512,
-0.0591440164,
0.183205083,
-0.0711282492,
-0.0657922328,
0.1532547772,
-0.2268456519,
0.1455454081,
0.1906766593,
-0.2239545584,
-0.0393580869,
0.1851700246,
0.1328699291,
0.4181731045,
-0.4273696542,
0.2814037204,
0.2699202001,
-0.1735961288,
0.1514287293,
-0.3362785876,
-0.3355286121,
0.0419162512,
-0.3565229177,
-0.0188184977,
-0.0346329026,
0.0667284429,
-0.0074803527,
-0.5250088573,
0.1170423999,
0.1661503762,
0.0660809875,
-0.3220514059,
0.6341157556,
0.1833462417,
0.1864079535,
0.1982423514,
-0.267438978,
-0.3257968128,
-0.3126782775,
0.1464712322,
0.4830000699,
-0.2674061954,
-0.1194259748,
-0.0261693075,
-0.201155439,
-0.1995179355,
-0.3869152665,
-0.4060809612,
0.3477785587,
0.007418517,
0.0792022273,
0.1178821176,
0.0061182566,
0.0867659003,
0.3740826845,
0.2561855018,
-0.476004988,
-0.2496017218,
0.1057587489,
-0.3221828043,
-0.0576486103,
-0.1828145385,
0.0616205335,
-0.2615199387,
-0.0441682413,
-0.1043369099,
-0.0334297419,
-0.4193736613,
0.0477111079,
0.3961853087,
0.0800351351,
0.0011542402,
0.5042103529,
-0.3501888514,
0.0108957831,
-0.418254137,
0.1281472445,
-0.0084884241,
-0.1850924492,
-0.2621051073,
0.1198891625,
-0.0490980186,
0.2026845962,
0.0051388368,
0.133430779,
0.1958025098,
0.2225050777,
0.4963683784,
-0.2874112129,
0.2397122234,
0.2287210226,
-0.1848640442,
0.4846338332,
-0.0675851703,
0.1625757962,
-0.2317887843,
0.4496636987,
-0.4836654067,
-0.3581535518,
0.0886901692,
-0.050315246,
-0.0290918462,
0.2750346065,
-0.2045659423,
0.4464251101,
0.3693268597,
-0.0993713439,
-0.2557810843,
-0.1525740325,
-0.5478853583,
-0.0989277214,
0.2410936207,
0.252189219,
-0.1584028304,
-0.0110204443,
0.1865360737,
0.3694745302,
0.666970849,
0.5067362189,
-0.2878704965,
0.1310136914,
-0.160769552,
0.6380209923,
0.0407220908,
-0.10919296,
-0.1088484898,
0.3064480126,
-0.4410431385,
-0.0714501143,
0.0128972419,
-0.0292179026,
0.1942565739,
-0.1717971563,
0.3794989586,
0.0860753059,
-0.124223575,
0.2882741094,
-0.420545578,
0.0442049205,
0.3506420851,
-0.0837408304,
-0.2194920778,
-0.1622110158,
-0.2516686916,
-0.026685508,
0.0405646861,
-0.1992123872,
0.1669298708,
0.0959287584,
0.165044561,
-0.1816594303,
-0.0439747609,
0.1550925076,
-0.0143418908,
0.1894252151,
-0.1078043133,
0.1165864244,
-0.0158079639,
-0.118894875,
0.2822367549,
-0.135815531,
-0.0231442228,
0.0286240689,
-0.1187130287,
-0.1488007456,
-0.1367196888,
-0.0344718248,
-0.0475834198,
0.0045012757,
0.0934301019,
-0.0588059612,
0.1493181884,
-0.0622192919,
0.1166625395,
-0.1637581587,
-0.295439899,
0.2489109039,
0.2838459015,
-0.1420404911,
0.1078456938,
0.3962520659,
0.2024593204,
0.0529391915,
-0.0186132286,
0.1946263015,
0.3567744195,
0.2995519638,
0.2858372927,
-0.3156942427,
-0.0897185877,
-0.2797774673,
0.1507816315,
0.8951516747,
0.3780685961,
0.3151250482,
0.0568149537,
-0.2766114771,
-0.0043333024,
0.2213647366,
-0.0341793448,
-0.0283551365,
0.2033927739,
0.3341962099,
0.3051332831,
0.2553846836,
-0.04301548,
0.2804566622,
0.2164856493,
-0.0998887122,
-0.1958737969,
0.0009241467,
-0.0914535224,
-0.1556075215,
0.1186439469,
-0.4987291098,
0.3116349876,
0.0389196798,
0.2497679442,
0.0012794714,
-0.1723954529,
-0.0137268975,
0.1406293809,
0.1262093484,
-0.0237513781,
-0.0348010473,
0.2234737128,
0.033609692,
-0.0484148972,
-0.1124184728,
0.3035725951,
0.4295850992,
-0.2028119564,
0.0842254981,
-0.1635440141,
0.2961603999,
-0.0375075191,
-0.2037376761,
-0.0970496386,
-0.2546181977,
0.0398240089,
0.1681343317,
0.0835210383,
0.1886326671,
0.0789040774,
-0.1020121276,
-0.1018422395,
0.1730249077,
0.0364544913,
-0.0307043474,
-0.2684114277,
-0.1226453334,
0.3741770089,
0.0297646709,
0.0512431562,
0.0608649552,
-0.3349953294,
0.0814582631,
-0.5531003475,
-0.0262761004,
-0.0215873346,
-0.156688273,
0.0560895689,
-0.082902573,
-0.6097154617,
0.0379513502,
0.1915588975,
0.0100362301,
-0.309900254,
0.0293187425,
-0.2165518552,
-0.3161250949,
-0.1767940521,
0.124143362,
-0.0743782148,
0.2454776466,
0.1708729863,
-0.2345408499,
0.2101936042,
-0.1212064624,
-0.0949991345,
0.1285720319,
-0.1188471913,
-0.482581377,
-0.0787340254,
-0.2240340859,
0.3454925418,
-0.0826595575,
0.0813402459,
-0.006723009,
-0.0524938889,
-0.1030179858,
0.2512446642,
0.1546484232,
0.0125440508,
-0.0915630981,
0.0958881825,
-0.0917695761,
0.0141658988,
0.4137441516,
0.1844603121,
0.0286020786,
0.1182154119,
-0.3019362092,
-0.0392445773,
0.0395168252,
0.0175781399,
0.0223319642,
0.2818384171,
0.199490875,
0.9364290833,
0.1769336462,
-0.2471613288,
-0.1466755569,
-0.1311272383,
-0.1864520758,
0.0355856605,
-0.0280276649,
0.2754463553,
0.3319623172,
-0.0654486269,
0.3055554628,
0.0692316741,
-0.4447915554,
0.0683291405,
0.0655263439,
-0.1484709382,
-0.1748002619,
0.1976067722,
-0.2921214998,
0.2222036123,
0.0639031678,
0.2113484144,
-0.4197666645,
-0.2751145959,
-0.1789602935,
-0.0849714577,
-0.0347941518,
-0.3862005174,
-0.7608803511,
-0.1851510406,
-0.8920636773,
0.4031718969,
0.1285984814,
0.4056975543,
0.4040028155,
-0.1473229527,
0.1809921563,
-0.1462071538,
0.9515535831,
-0.3148617446,
-0.1018193513,
0.0942881033,
-0.2907171249,
-0.2164983004,
-0.1962088943,
-0.0544165932,
0.4924842119,
0.4774305224,
0.773324132,
-0.196278885,
-0.3250949681,
0.0093721561,
-0.1400547326,
0.2199726254,
-0.0067692995,
-0.2870979309,
0.0898107588,
0.109154053,
0.2544773817,
-0.0445638299,
0.1162586138,
-0.1389714479,
-0.1802915931,
-0.0156381279,
-0.0378978364,
0.3263305128,
0.0452068448,
0.2420584559,
0.2547129393,
0.2709084153,
0.4144828916,
0.2233684361,
0.3825790882,
-0.3118923903,
-0.0680492371,
0.0341821089,
0.1353443712,
-0.0929420739,
0.4539323449,
0.5498085618,
0.12770316,
0.1894684583,
0.0446935333,
0.3629504144,
-0.0970465094,
0.2474794388,
0.5302974582,
0.222989589,
-0.6152863503,
-0.187072888,
-0.0418681242,
0.500403583,
-0.0977364033,
0.1358555257,
-0.484772861,
-0.1182467788,
0.0849324614,
0.0773486197,
1.0334551334,
-0.5148509145,
0.2964820564,
-0.3219098151,
0.1757463515,
0.210013032,
-0.2687895596,
0.1971259266,
-0.2429302484,
0.0711007863,
-0.0187862664,
-0.0614189841,
0.2567288578,
0.4876918495,
0.048589617,
0.1938778162,
-0.0276016966,
0.3981176615,
-0.2274306566,
0.0628068298,
0.545024097,
-0.3392466903,
0.0779136121,
-0.0579875223,
0.2245114744,
-0.0643871352,
0.0137375854,
0.0008115135,
-0.1434348524,
-0.1669961214,
-0.1103079394,
-0.2305848449,
-0.2144279778,
0.0163935758,
0.1533910483,
0.0040016621,
-0.0636674762,
0.0405459777,
0.1298915297,
0.2966967821,
-0.0708945394,
0.0827690288,
0.1352579147,
0.1543612778,
0.1289828271,
-0.4702275097,
-0.1566710472,
0.0467621982,
0.0551215708,
-0.1249581575,
-0.1654786617,
-0.0354790017,
-0.3376191854,
0.1171022207,
0.6711373329,
0.2838166356,
-0.0546956249,
0.3056976199,
-0.0777953789,
-0.1577308476,
-0.0371344313,
-0.0486759096,
-0.190868184,
0.4021509886,
-0.2150212377,
-0.4364954233,
0.0072041526,
0.5445731282,
0.166162014,
-0.1699451208,
0.4865757227,
-0.2501218021,
-0.1797344983,
-0.0319508389,
0.3752321005,
0.1716775,
0.1371525377,
0.0203049146,
0.3294656277,
-0.0705560148,
0.3392578959,
0.0268395692,
-0.2536615431,
0.0797122717,
-0.1415092349,
-0.107689172,
-0.3482830524,
-0.2523833513,
-0.1526267976,
-0.097580947,
0.016270943,
0.2962121665,
-0.2722662091,
-0.0762866959,
-0.1294941455,
0.0739236549,
-0.0707215667,
0.3378511965,
-0.1955769807,
-0.0156834368,
-0.01531161,
-0.1194770262,
0.0632919669,
0.1958327442,
-0.1811698675,
-0.088089563,
-0.0486482829,
0.2328053117,
0.0942500085,
-0.4132828414,
0.3264919817,
0.074244909,
-0.3295324147,
-0.2957632542,
-0.0713586286,
0.3769730031,
-0.0888146311,
-0.2104260921,
0.4065172374,
0.1312714815,
-0.0231065899,
0.1755514741,
-0.1344914734,
0.0307520125,
-0.0640718937,
0.3533712626,
0.2714122236,
-0.0806885064,
0.227709204,
-0.1471526027,
0.2102839947,
0.143819958,
-0.0448987223,
-0.0448772348,
-0.0620041378,
0.1628133655,
0.0859895945,
0.2296499014,
0.0315995701,
-0.3968467414,
0.6052675843,
0.0025993555,
-0.0253978595,
-0.2075588107,
0.3047804236,
0.1090013608,
0.0441237986,
0.1556784809,
0.2953762114,
0.2974736989,
-0.2237291783,
-0.0349691398,
-0.1236262396,
-0.1364786029,
0.0851324201,
0.201451391,
0.0931704268,
0.0903859437,
0.3620445132,
-0.0252308883,
-0.0473215245,
0.422205627,
0.246916458,
0.5134435892,
0.3462409377,
0.3657304943,
-0.3900964558,
-0.3400641084,
-0.2001994848,
0.6330744028,
0.0776192993,
0.2425190359,
-0.0193523802,
0.2777515054,
-0.1924541891,
-0.4998669922,
0.178722471,
0.4119102359,
-0.3552471995,
-0.4772708118,
-0.141546309,
-0.1361976862,
-0.0916009992,
0.1225050539,
-0.2288356423,
0.1500302106,
0.4793521166,
0.0331875682,
0.1832872033,
-0.0671392232,
-0.1805014014,
-0.1006515026,
0.3039548397,
-0.072186701,
0.1637683809,
-0.5421497822,
0.0823062807,
0.2256787568,
-0.0529550798,
0.3514053226,
0.6039908528,
-0.3567197621,
0.0075332411,
0.017476134,
0.0715857446,
0.1786412448,
0.2215697765,
0.0940288752,
-0.2806371152,
-0.0183811747,
-0.2068704218,
-0.1642172486,
-0.2842899859,
0.0092654089,
0.0029795207,
0.1242680699,
0.1480991244,
-0.096676372,
-0.2055512071,
-0.0035364171,
0.1343884319,
-0.1567651629,
-0.045496121,
0.0952082127,
-0.2115175128,
0.0895371437,
0.073449716,
-0.0024371445,
-0.1321172267,
0.3498380184,
0.2209890485,
-0.1230858788,
-0.4596056044,
-0.1800461262,
-0.5000238419,
0.142548129,
-0.419133693,
0.1426112056,
-0.2712026536,
0.1326366216,
0.047700204,
0.0183828715,
0.139837414,
-0.0291798208,
-0.0783361867,
0.2604599297,
-0.2813757658,
0.5002378821,
-0.2853154242,
-0.2422319502,
-0.0138353333,
-0.4122862816,
0.4706128538,
0.0631024987,
-0.1594396234,
-0.0784420967,
0.2328393459,
-0.1661155522,
0.2907160521,
0.2665555477,
0.1540993005,
0.3074611425,
0.0896098465,
0.1229651496,
0.020350039,
0.3362581134,
-0.2440009415,
0.2080633342,
-0.0524316095,
-0.0398027338,
-0.2057075053,
0.0260175727,
-0.0121332742,
-0.1082288474,
0.2541701794,
-0.0816438198,
-0.2034931183,
0.2863990366,
0.0140947551,
0.0633786023,
-0.2183953226,
0.2291814834,
0.2644094825,
-0.0783022344,
-0.252302587,
0.1403755248,
0.3205936253,
-0.5568312407,
-0.2029643953,
-0.6513805985,
0.0344408788,
0.1288059056,
0.128698647,
-0.2269718796,
-0.2931537032,
0.3912013173,
-0.1233501807,
-0.3294094503,
0.2369914651,
-0.125051111,
-0.2932345271,
-0.3721489608,
0.0813703761,
-0.1436472088,
-0.1949796677,
0.0596724972,
-0.1216475666
] |
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.110432148,
-0.0460994393,
0.0017929263,
0.074747704,
0.4480466545,
0.0627771765,
0.4552135468,
0.2196824551,
0.2994901538,
-0.1329667568,
0.2060755789,
0.4624339938,
-0.0728463754,
0.0797178,
-0.0546838902,
-0.2258629054,
0.1463976651,
0.1216586232,
-0.0681670532,
-0.051405631,
-0.2214133292,
0.1172490418,
-0.2457357645,
0.0626453459,
0.1473496705,
0.0675001442,
0.0444806218,
0.1194713116,
0.1582894623,
-0.411906302,
0.1597043425,
-0.1485555768,
0.3543723822,
0.2177933007,
-0.0001225974,
-0.0308731794,
0.2000943124,
-0.0455259308,
-0.1343294978,
-0.4299836755,
-0.3686628044,
-0.4428125918,
0.6035305262,
-0.2337205708,
0.0679722428,
0.0058744848,
-0.1318270862,
-0.4414080083,
0.370452702,
0.4917434454,
0.1028463468,
0.2604970932,
-0.212897107,
0.0683708042,
0.2531424761,
0.1729602367,
-0.2683461607,
0.0115077049,
0.2413827777,
0.2831137776,
0.0202590432,
-0.2514044046,
-0.3278875053,
-0.1090303585,
0.450230211,
0.1004334986,
-0.1728934348,
-0.2152021378,
-0.018569123,
0.0967388898,
0.6940963864,
-0.0439014807,
-0.3437823951,
-0.1345559806,
0.1029635593,
-0.326556921,
0.0719099939,
0.0394790694,
-0.0936724693,
0.2009942979,
-0.2288367003,
0.0179860927,
-0.02105093,
0.2387347221,
0.0580497086,
-0.068475306,
-0.1830669492,
0.210805133,
-0.0479419418,
-0.2082453072,
0.1586767882,
-0.2253187597,
0.1418037415,
0.307048142,
-0.4954451919,
0.1484595686,
0.1250784397,
-0.1021135747,
-0.0821914524,
0.2027685344,
0.3144243658,
0.1013438404,
-0.0861862227,
0.205159992,
0.2729564011,
0.2770816982,
0.2978348136,
0.0810163766,
-0.0635051131,
-0.0946140513,
-0.1663812101,
0.0363046527,
-0.3185819983,
-0.1923482269,
0.3789393306,
0.1587803662,
0.1375380307,
-0.3657592535,
-0.3626992702,
0.2351654768,
-0.2413615882,
-0.0889681354,
0.0760769397,
0.283633858,
-0.1297879666,
0.4884746075,
0.1027973816,
0.3484077454,
0.1101018712,
-0.140617162,
-0.1618346274,
-0.1079707816,
-0.0891123489,
-0.0602727272,
0.0965369195,
-0.3631424904,
0.104366377,
-0.0351546481,
0.0497358069,
-0.1586526036,
-0.2356229275,
-0.0306245796,
0.0038656257,
0.2680174112,
0.0140142739,
0.0956333056,
0.3562786877,
-0.0459539667,
-0.2184283137,
0.3119081855,
-0.4620771408,
-0.2153679729,
0.0045841336,
-0.0065714731,
-0.2278193831,
-0.0331733488,
-0.4317631721,
0.069049485,
0.1968416721,
0.1540488452,
-0.1759972274,
-0.4027113914,
-0.206836611,
-0.4180801213,
0.1779426336,
0.3996341825,
-0.5163903832,
0.0751356184,
0.0115569718,
0.0245535858,
0.1286626458,
0.4650028944,
-0.1831558049,
0.2963225543,
-0.1501669586,
0.3829423487,
0.5047296286,
0.0998841673,
-0.053518299,
0.5566628575,
0.0630637109,
0.0640881509,
0.1053320765,
-0.0127032921,
0.3253757358,
-0.170078516,
0.026985338,
0.4483286738,
-0.1635104418,
-0.0150684789,
-0.1051957309,
-0.1559160054,
0.2475551069,
0.1033510193,
-0.1184361055,
0.3426094651,
0.1636875421,
-0.0604911745,
0.0419214666,
-0.3142807782,
0.1542034745,
0.205768764,
-0.0115864128,
0.158403337,
-0.0495416857,
-0.0531676635,
-0.6366580725,
-0.0379677489,
0.221362859,
-0.1010950506,
-0.3996530175,
-0.0541030988,
-0.3353928924,
0.2223337591,
-0.0879019499,
0.547000885,
-0.1008091718,
0.1392116845,
-0.0799392387,
0.0280993357,
-0.0997859463,
0.0700337812,
-0.2976451218,
0.0392471999,
-0.2093293667,
0.0670426637,
0.2348163426,
-0.1278735399,
-0.0986960009,
0.091928795,
0.3017797768,
-0.0927235112,
-0.2805354893,
0.3237704337,
0.0724091828,
-0.1806601137,
-0.4057726264,
0.0707104877,
0.1225669906,
-0.4118909836,
-0.0960493237,
0.3675076365,
0.2982912958,
-0.1217673272,
-0.1948544979,
0.5355861187,
-0.1639041603,
0.3591677547,
-0.100353241,
0.0166160241,
0.4018522501,
0.0990031511,
-0.2214927971,
-0.0735374838,
0.1187487841,
0.1199112833,
0.2753316164,
0.0832990408,
-0.4843607545,
-0.1074098721,
0.2010635287,
-0.1397024542,
0.1424910575,
0.3510161936,
-0.036859829,
0.102304481,
0.0236883145,
-0.2591194808,
0.338377744,
-0.0355218537,
-0.0439347886,
-0.0970788375,
-0.0985547528,
-0.0578275286,
0.1779477298,
-0.0333616361,
0.114008598,
0.2376086861,
0.0508311428,
-0.0402043015,
-0.2066463977,
-0.1779195517,
0.1371904612,
0.1496103257,
-0.6657977104,
0.1570386142,
-0.4116669893,
0.259396255,
-0.2830722928,
-0.085263826,
0.1355611384,
-0.1846072674,
-0.2917079926,
0.2667336762,
-0.1641354859,
0.1261746287,
-0.5663660765,
-0.0178409517,
0.2130137533,
-0.6803794503,
0.1811014712,
0.0629811734,
-0.1782785356,
-0.0764445737,
0.399111867,
0.2297203541,
0.0199133661,
-0.0418583788,
0.0285447761,
-0.1528596878,
-0.1876205206,
0.1119920313,
-0.1340638995,
0.1883441955,
0.1034663767,
0.0608446747,
-0.2700406313,
-0.5033230186,
0.2780168056,
-0.1225628033,
-0.1226957291,
0.4148801565,
-0.0341413356,
-0.3602369428,
-0.2041590214,
-0.4714082479,
-0.173500523,
-0.3078493178,
0.1805061847,
0.1036362499,
-0.0178937279,
0.0935265198,
0.2594174743,
0.078049019,
0.2604347169,
0.0436238572,
-0.0324877277,
0.0536319166,
0.5690495372,
-0.1156725585,
-0.4092381597,
0.0243678689,
-0.2021603435,
-0.195537433,
0.3714092076,
-0.1427940428,
0.1118419096,
-0.0826793164,
0.2352450788,
0.0215757024,
-0.0280706696,
0.3271405697,
-0.0308697931,
0.0953569412,
-0.1797703952,
-0.2646719217,
0.1653976142,
0.267655164,
0.0848531127,
0.499999851,
0.6963592768,
-0.238138184,
0.4044568241,
-0.0274045505,
-0.1215993911,
0.4540216625,
-0.1748411655,
0.0772479475,
-0.1671358496,
-0.230494529,
-0.2067229003,
-0.2361324728,
-0.3253374994,
0.3207269311,
-0.1002925038,
-0.311711669,
-0.1034620032,
0.3674573898,
-0.3126693666,
-0.2034709454,
0.3986495435,
-0.2290896177,
0.3204393089,
-0.0259237476,
0.160392791,
-0.0733196884,
-0.149263829,
-0.0054992661,
0.1686309427,
0.1123348027,
-0.1163133755,
-0.45715487,
-0.0342426822,
-0.3056699038,
0.1775711477,
0.3312333822,
0.5592120886,
-0.0358424187,
-0.1711426973,
0.1063517183,
0.1083457023,
0.39011693,
-0.2086947858,
-0.0011615581,
0.2523575723,
0.0397786647,
-0.0906482041,
0.0091874823,
-0.1796160638,
-0.0382776856,
-0.0817607492,
0.1339764595,
-0.2366572618,
-0.1357565522,
-0.1948538125,
0.3967035711,
-0.2197415382,
-0.0785209686,
-0.1300491542,
-0.3525590897,
-0.2233393341,
-0.0077137947,
0.2062226683,
0.4148726165,
-0.0111162588,
0.1392097771,
-0.4173449576,
-0.0830806643,
0.3357976973,
0.0164371058,
0.3778495193,
0.0730972439,
0.2380175889,
-0.2853321135,
0.0951166078,
-0.0547425374,
0.7008430362,
0.0187546685,
-0.8055834174,
0.1155388951,
-0.2347241044,
0.610119164,
0.1196994111,
-0.3118104339,
0.089700222,
0.0616618507,
-0.0284206159,
0.0239185356,
0.0324668661,
0.1782879084,
-0.1129928753,
-0.0735788792,
-0.5334355235,
0.2675794959,
-0.0179277807,
-0.0700028315,
-0.1552607119,
-0.0905959457,
-0.3439861536,
0.5822554827,
0.1116436571,
0.8149847388,
-0.1586088538,
0.0223724116,
0.1512667835,
0.1094428897,
0.3992293775,
0.4279818833,
-0.0887041688,
-0.3721046448,
-0.1322129667,
-0.1304242909,
-0.0532290637,
0.2831766605,
0.3073972464,
-0.1827315092,
0.3941600323,
-0.2625226974,
0.4788020849,
0.1579051316,
0.0136172622,
0.3976051807,
-0.5610570312,
-0.436123997,
0.0566089861,
-0.0795364082,
-0.0500402376,
0.1793602407,
-0.1025279388,
-0.0147749111,
-0.0690697283,
-0.16715765,
0.202320978,
-0.0245171022,
0.0333178043,
0.0225514397,
-0.3911598921,
0.3321497738,
0.3873805404,
0.2140109986,
-0.1236120015,
0.053074874,
-0.1053179204,
0.0653138757,
0.1610912532,
-0.1094207615,
-0.1727658808,
0.3233714998,
0.2814847231,
0.0633919388,
0.1883976907,
-0.187705636,
-0.4563295245,
0.2772747278,
0.0200753659,
0.2457721382,
-0.6801097393,
-0.606752336,
-0.1620602459,
0.1821792126,
-0.0854546577,
-0.0015260065,
0.0692156255,
-0.0136249997,
0.1043778062,
0.0404800363,
-0.1276171058,
0.0908663943,
0.1430971473,
0.0589277595,
-0.1127818525,
0.4481780231,
0.3223389983,
-0.0844490603,
-0.0717107803,
0.1627794206,
0.2564381957,
-0.5918010473,
0.0548071526,
-0.1395564079,
-0.1452338099,
0.0483493768,
0.6411303878,
0.0509416237,
0.1388816237,
-0.0750024989,
-0.4760088325,
-0.3894129395,
0.1771921515,
0.197563991,
0.0376204401,
-0.053181082,
-0.0236832835,
-0.1459556371,
-0.2336322218,
-0.1492190957,
-0.2112295032,
-0.0947555453,
0.1627301425,
0.082160987,
0.2315100878,
0.1650508642,
0.0571824089,
0.0496042073,
0.0728445277,
0.0216935053,
-0.1048053801,
-0.0801290423,
0.2456324846,
0.1700915694,
-0.0133301131,
-0.240971759,
-0.2888041139,
-0.1671983153,
-0.3431459963,
-0.1311100274,
0.1529917419,
-0.1177065745,
0.0611684956,
0.123254627,
0.1416047215,
-0.2951572537,
0.2083013058,
-0.2207980603,
0.3090308309,
-0.0685166568,
0.2035959512,
0.0723570585,
0.0867718607,
-0.1694904119,
0.1411752403,
0.2775627375,
0.0172086582,
0.2658578753,
-0.3038054109,
0.1008636355,
0.1427966356,
0.2968774736,
0.4185533524,
-0.0852780044,
0.039154239,
0.307212323,
0.0333188698,
-0.1571906209,
-0.1819156706,
0.1860197186,
-0.044763498,
-0.0816644654,
0.3542859554,
0.1773700118,
-0.1022177786,
0.1233808398,
-0.028682638,
0.5112875104,
-0.1949406266,
-0.0704224929,
0.6916538477,
0.291328907,
0.1611916423,
0.1603683829,
-0.0132483207,
0.1994771361,
0.3682758212,
-0.1253437102,
-0.096383594,
0.2946386635,
0.4194569588,
0.0165844746,
-0.4054481089,
0.2480331808,
0.2353257686,
-0.0219286494,
0.2139557153,
0.1303157657,
0.2696862817,
-0.1014124751,
-0.2234064937,
-0.1427472532,
0.3004921079,
-0.1382133216,
-0.3201159537,
-0.3272535503,
-0.1077625901,
-0.2257194519,
-0.0402906016,
-0.1128791645,
-0.1230406761,
0.3907461464,
0.1284092963,
0.2790489495,
-0.3674769104,
-0.3075928688,
0.0543780848,
0.0201760959,
-0.239843592,
0.3100337982,
-0.1282325685,
0.0060278606,
0.3204963207,
-0.0867382362,
0.3156222105,
0.5036236644,
0.0794754773,
-0.0671956986,
-0.0450186916,
-0.1410573721,
-0.061794553,
0.2614476085,
-0.183598578,
0.341887176,
0.2386569083,
0.0206037126,
-0.051791843,
0.4905468822,
-0.1872001737,
0.0214816444,
-0.1375132352,
0.3965116739,
0.2406616509,
-0.1396110058,
-0.0916911811,
-0.1429030895,
-0.0435064286,
-0.0867453888,
0.4419136941,
0.0340844244,
0.2552064061,
0.221196264,
0.0060106814,
-0.0808287114,
0.1633160263,
0.2484548986,
0.109889999,
-0.2191246152,
0.1393924356,
-0.7467552423,
0.052685719,
0.1535259932,
-0.2677980661,
0.4478869736,
0.2577356994,
0.2434033751,
0.27366063,
-0.4172682464,
-0.1067541093,
0.1898747832,
0.2864473462,
0.0744640231,
-0.2029290944,
0.1791159958,
0.2065349221,
-0.2200175822,
-0.541321516,
0.0190441292,
-0.1167135984,
-0.0261460245,
-0.1522410959,
-0.2528544664,
-0.0122336894,
-0.0994632244,
0.2671572268,
-0.0228852052,
0.5270896554,
-0.0979365557,
0.0292958394,
-0.0202064551,
-0.3900429606,
-0.2294014394,
0.4323120117,
-0.220796749,
0.494823277,
-0.2900179625,
0.4376682639,
-0.2634707093,
-0.0292546824,
0.1528314054,
-0.1753902435,
-0.458653599,
0.4043568373,
-0.50124681,
0.183505401,
0.0770837367,
0.1095324829,
0.0006309459,
0.2872668207,
0.0253674239,
-0.3708913326,
0.3762869835,
-0.5570363402,
-0.3053694367,
-0.0174346045,
-0.0726698041,
0.0540478267,
-0.0671416819,
-0.4190597534,
-0.1293235421,
0.2275843769,
-0.1773217022,
-0.266245693,
0.0923741013,
-0.0665554255,
0.0066872165,
-0.2397063822,
0.2292443961,
0.1236813068,
-0.1978789568,
-0.1641544104,
-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.1745121777,
-0.1091786101,
-0.0231068786,
0.0980235785,
0.4885462224,
0.0214579776,
0.4982635677,
0.2223210037,
0.366142571,
-0.0579063371,
0.0228602439,
0.5268845558,
-0.0411035381,
0.1786160171,
-0.087103948,
-0.1635924578,
0.1504180133,
0.1215562224,
-0.0954686552,
-0.0548117533,
-0.2822068036,
0.1153571829,
-0.2327807546,
0.102890186,
0.0758109689,
-0.021244375,
0.1522946656,
0.0589681156,
0.1551151127,
-0.4690175056,
0.0427116901,
-0.1593900323,
0.4239127636,
0.1603817642,
-0.0001222864,
-0.0723951906,
0.201404646,
-0.0017854199,
-0.170044452,
-0.2721404135,
-0.333453685,
-0.3312610984,
0.5561584234,
-0.2470592111,
0.1309709251,
-0.0750067309,
-0.0999574885,
-0.4044759274,
0.2009783834,
0.4960657358,
0.1088149399,
0.1556664407,
-0.0642048568,
0.0743323863,
0.3011790216,
0.1582483947,
-0.2453444898,
0.0072980933,
0.2836194932,
0.4058946073,
-0.017299477,
-0.1583523899,
-0.2349089682,
-0.1760405153,
0.5206282735,
0.0213499591,
-0.1103871614,
-0.2337293327,
-0.0291653909,
-0.0270525552,
0.8242399693,
-0.0337934159,
-0.3313738406,
0.0284712091,
0.0084751844,
-0.4012272954,
-0.0091966726,
-0.0444255136,
-0.0706205219,
0.1964198202,
-0.2307464778,
-0.0202313624,
-0.1065665334,
0.2094971389,
0.1264787763,
0.0024119094,
-0.1604215801,
0.2525997758,
-0.023193419,
-0.3424346149,
0.1272236407,
-0.1139907092,
0.0617733151,
0.2001873553,
-0.5123821497,
0.0699718148,
-0.0475857817,
-0.0426837429,
-0.051140219,
0.1655862778,
0.2130742073,
0.1673609763,
-0.0533784106,
0.169511795,
0.2711192966,
0.4393446743,
0.3845515847,
0.1459637135,
-0.0772825778,
-0.2162697613,
-0.1859952956,
0.0367970094,
-0.3532292247,
-0.1677087098,
0.4503812492,
0.1206076294,
0.04539527,
-0.472184211,
-0.362665534,
0.154942438,
-0.226535663,
-0.0372204967,
0.1171710491,
0.3768066168,
-0.1251847744,
0.5413233042,
0.1200022697,
0.277110666,
0.1804116666,
-0.1838900745,
-0.1071731001,
-0.0954612568,
-0.1457131803,
-0.0957703888,
0.0384717137,
-0.3362176716,
0.1143923178,
-0.0716410726,
0.0394220129,
-0.1666860133,
-0.2015027255,
-0.1003283709,
0.1008358449,
0.2000790834,
-0.0727954507,
0.1101018339,
0.2909410894,
-0.0541026704,
-0.1701565832,
0.3316214085,
-0.506131053,
-0.2791662812,
-0.0096540181,
0.0039625382,
-0.0279719308,
-0.0403443575,
-0.3437796235,
0.1190862358,
0.1428309679,
0.0864049345,
-0.2007547915,
-0.4404554367,
-0.1076720208,
-0.3787829876,
0.0964558572,
0.2499113679,
-0.5306061506,
0.121610865,
0.0757073164,
0.0141589977,
0.2510150075,
0.5593868494,
-0.1469876021,
0.2511621416,
-0.1406388581,
0.3639692366,
0.5061859488,
-0.0752417371,
-0.0687341467,
0.5408248305,
0.1516239792,
-0.1511902511,
0.0947823152,
0.1008555293,
0.3451000154,
-0.1787752062,
0.025926359,
0.3236458898,
-0.1099793762,
-0.0535837151,
-0.2369866967,
-0.0890310258,
0.2300911099,
0.1359634101,
-0.1365002394,
0.3274651766,
0.1866752803,
0.0384793617,
-0.0829609558,
-0.3018823862,
0.1766662598,
0.1386436075,
-0.1012360305,
0.1233695894,
-0.0199297667,
0.0147776082,
-0.6875215173,
-0.1371832639,
0.1024217308,
-0.0769348592,
-0.2303439379,
-0.0767377242,
-0.3774006367,
0.2323753685,
-0.0619986579,
0.5937695503,
-0.1051986888,
0.1890157163,
-0.0905120969,
-0.0568342954,
-0.1481355131,
-0.0236118305,
-0.3030286431,
0.0087987743,
-0.1092746407,
-0.1342166066,
0.1625544131,
-0.1477347761,
-0.1353448778,
0.0716531426,
0.3193821013,
-0.0587822422,
-0.3308489323,
0.3488802612,
0.0969924405,
-0.2780359387,
-0.3008566499,
0.1070828661,
0.0893101916,
-0.5350100994,
-0.0993568227,
0.2644626796,
0.3447469473,
-0.156527102,
-0.1530912817,
0.4296926856,
-0.2420475185,
0.4259824753,
-0.1141403392,
-0.0087802559,
0.3594488204,
0.1318298429,
-0.2028185278,
-0.0955799222,
0.0416046306,
0.0982767269,
0.3094272912,
0.1073542312,
-0.5325561762,
-0.024694901,
0.2461337149,
-0.1355322301,
0.1485409439,
0.3439362645,
0.0264564622,
0.0583644062,
0.1440452188,
-0.3772361875,
0.3147377372,
0.0168544203,
0.0069150664,
-0.1343994737,
-0.1218229085,
-0.0391920805,
0.2447087616,
-0.0561149754,
0.0706909001,
0.2142900676,
0.0330250524,
-0.1653950512,
-0.1804197431,
-0.2334326655,
0.0790092051,
0.1729779541,
-0.6239628792,
0.094231002,
-0.3296731114,
0.1743193418,
-0.2370876819,
-0.2676623464,
0.1135045663,
-0.2016698271,
-0.2089028358,
0.2420659214,
-0.1201274693,
0.1385367513,
-0.403314054,
0.0975715593,
0.1901012063,
-0.5237885714,
-0.0100405514,
0.0020123459,
-0.2710902989,
-0.0818772241,
0.3792651594,
0.2798447907,
0.0619554743,
-0.1255288273,
0.1523254961,
-0.1678496003,
-0.2552998364,
0.0680266693,
-0.0739111602,
0.1182407662,
0.0621923059,
0.0708521307,
-0.3248398304,
-0.3971909583,
0.2296406329,
-0.1051726788,
-0.1522284597,
0.3554172814,
-0.104435876,
-0.3573532999,
-0.1748082787,
-0.5161355734,
-0.2136058658,
-0.4151928127,
0.1933622062,
0.1393044293,
0.0469272211,
0.0435750857,
0.2623167038,
0.1231549978,
0.3312581778,
0.1154700592,
-0.074069649,
0.0053718239,
0.5278596282,
-0.1268098354,
-0.3519245088,
0.0330698341,
-0.1132659465,
-0.0612163246,
0.310937196,
-0.0418368429,
0.1912270188,
-0.0278602429,
0.264898628,
-0.0023113783,
0.0812978745,
0.2223410606,
0.031155929,
0.0761905834,
-0.1425581574,
-0.2828027606,
0.3175474107,
0.123231262,
0.1157071367,
0.5898656845,
0.6031091213,
-0.3257273436,
0.3851872981,
-0.0492634773,
-0.1964693964,
0.4677954316,
-0.15193744,
0.1013601124,
-0.231947571,
-0.1796563566,
-0.1222321838,
-0.1774989367,
-0.2684708238,
0.307085216,
-0.1230676472,
-0.3154538274,
-0.129395023,
0.3553230166,
-0.2967692912,
-0.0969945937,
0.3734415472,
-0.2136845589,
0.2447089851,
-0.1190205216,
0.0842541754,
-0.0764389932,
-0.1087260842,
0.0913233235,
0.1315592825,
0.1068796664,
-0.0873863399,
-0.5244097114,
-0.1038899124,
-0.285705328,
0.2556536794,
0.329259634,
0.6557887793,
-0.1432277262,
-0.1253602505,
0.0668187141,
0.1294067949,
0.3343356252,
-0.2652458251,
-0.0857284814,
0.2183836848,
0.0955889225,
0.021262899,
0.0911460072,
-0.2352446914,
-0.1220684797,
-0.0932943299,
0.1723743677,
-0.312143594,
-0.1891806573,
-0.1928464621,
0.3368744552,
-0.1755697131,
-0.0354148969,
-0.1357356757,
-0.3079074025,
-0.2543924451,
0.0501424521,
0.2633686066,
0.3873687983,
0.0648975298,
0.0652581751,
-0.4860834777,
-0.0539550781,
0.3168367147,
0.0468861684,
0.3901627362,
0.0490332618,
0.1119226962,
-0.3145265281,
0.1846652031,
0.0357679352,
0.6665098667,
-0.0731323212,
-0.8118276596,
0.1926192045,
-0.2284467816,
0.6646198034,
0.0639150366,
-0.2622723579,
0.0321489088,
-0.0808481127,
-0.0392320938,
0.0516322255,
0.1157314628,
0.1197477281,
-0.0257610958,
-0.1189157441,
-0.439547956,
0.2684924006,
-0.0307261385,
-0.0509763882,
-0.0223325659,
-0.0436792709,
-0.3465599418,
0.5494554639,
0.2992221713,
0.9601739645,
-0.1665424258,
-0.0754784271,
0.1074845642,
0.0600274056,
0.418428719,
0.4510519803,
-0.110442847,
-0.478346467,
-0.0814774483,
-0.0965282619,
-0.1091402769,
0.139284566,
0.3080067933,
-0.298045516,
0.4427348077,
-0.1956775188,
0.3273770809,
0.1547432095,
0.1308042109,
0.421652019,
-0.6057388783,
-0.3888360262,
0.0494439863,
-0.2001888454,
-0.0558026657,
0.1221093684,
-0.1107901335,
0.0048693344,
-0.0194990411,
-0.0054049194,
0.1903209239,
0.0289518498,
0.0167374276,
0.0370974541,
-0.2289069891,
0.2931973338,
0.4237112403,
0.3239545524,
-0.1413276792,
0.0419275686,
-0.1754637361,
0.0567616448,
0.2114453316,
-0.1153768227,
-0.1104581952,
0.3753100038,
0.2046166211,
0.1186155081,
0.2687426507,
-0.2008624375,
-0.4143676758,
0.1782289743,
-0.0760681927,
0.3111488521,
-0.7221403718,
-0.4602561295,
-0.1285829246,
0.0333975405,
-0.0694586858,
-0.0068865325,
0.0017648209,
0.0250655338,
0.1748297513,
0.1566282511,
-0.161320433,
0.1177102476,
0.0944812819,
0.0566835105,
-0.0683544427,
0.3383950889,
0.2126651704,
-0.1351851225,
-0.0864235833,
0.2136962861,
0.260602504,
-0.6703618169,
0.1074097157,
-0.1867017746,
-0.2304182798,
0.0568597093,
0.6951978207,
0.0893608779,
0.2368176877,
-0.1200569421,
-0.3224505484,
-0.5295476913,
0.232518971,
0.0771250725,
0.124512732,
-0.0255276337,
-0.0955992714,
-0.1672353745,
-0.2512120306,
-0.1790680289,
-0.2260364592,
-0.2031999081,
0.1978925616,
-0.0268362705,
0.1749274433,
0.0735567808,
0.1984946132,
0.0286732689,
0.122110799,
-0.0104307346,
-0.0668749362,
-0.0072935484,
0.263835609,
0.221924752,
0.0452934131,
-0.3669614792,
-0.2743259668,
-0.1671472639,
-0.3020285368,
-0.1595326066,
0.0931515694,
-0.1908309758,
0.0694067478,
0.1221773028,
0.1618800759,
-0.2803741097,
0.2299580127,
-0.0745546669,
0.2896383107,
-0.1253438145,
0.1830165386,
0.0148311965,
-0.0342968106,
-0.1972382516,
0.2030230016,
0.4118268788,
-0.0762394294,
0.2323230356,
-0.2946211398,
0.1638779193,
0.153706193,
0.2169140726,
0.3342396617,
-0.0989019126,
-0.022551138,
0.3155773282,
0.0290142484,
-0.0749649778,
-0.2232450247,
0.0144934393,
-0.0943713188,
-0.1142102927,
0.4057324529,
0.2134424746,
-0.1341504902,
0.1725121886,
-0.1364740729,
0.4199764132,
-0.2052785158,
-0.2592466474,
0.6168778539,
0.1744419634,
0.1732781678,
0.3604378104,
0.0263556056,
0.1716963798,
0.348608315,
-0.1904981732,
0.0358636081,
0.2933237255,
0.5195003152,
0.0373276882,
-0.2363220155,
0.2139701992,
0.3423800468,
0.0165668055,
0.1976494491,
0.1567906737,
0.2483704835,
-0.165909946,
-0.3684505522,
-0.0531708747,
0.2683326006,
-0.2123144865,
-0.2660959959,
-0.455982089,
-0.159557566,
-0.292082876,
-0.0755718276,
-0.2318984121,
-0.0610433482,
0.4262930155,
0.1574835926,
0.330252558,
-0.3787963688,
-0.42304793,
0.1484676898,
0.0860213935,
-0.2165572941,
0.4323188365,
-0.1213349253,
0.0173092782,
0.3313527703,
0.0118939895,
0.3481971323,
0.5415484905,
0.1784790307,
-0.1693001539,
0.0555144995,
-0.1464320123,
-0.0100352988,
0.2831678092,
-0.1197290123,
0.2042814046,
0.2606139481,
0.0198880397,
-0.028793674,
0.4744404256,
-0.2728383839,
0.0609484799,
0.0328227431,
0.3194429576,
0.2836459577,
-0.2071184218,
-0.1013969779,
-0.14262335,
-0.1514362097,
-0.0781532675,
0.3565252721,
-0.0592494272,
0.2234140933,
0.1519924998,
0.0196994916,
-0.0528685302,
0.2357497215,
0.1952366829,
0.0818013102,
-0.2347946614,
0.0796155185,
-0.6122213006,
0.1297814846,
0.3405698836,
-0.192315951,
0.4770172238,
0.2007790208,
0.2242656797,
0.3185648322,
-0.348652482,
-0.1267264187,
0.2773862481,
0.3379608393,
0.0695359781,
-0.0097363815,
0.2614301443,
0.2672413886,
-0.2102862298,
-0.5415984392,
0.0850286931,
-0.0747509152,
-0.0380544402,
-0.1727864295,
-0.1443445534,
-0.0024615675,
-0.0389543399,
0.2549993098,
0.0003755875,
0.5277969837,
-0.0800938383,
0.0247713327,
0.1740866005,
-0.4902580082,
-0.1550230384,
0.3757009208,
-0.1601572633,
0.4425731301,
-0.1881637275,
0.5270154476,
-0.2822114527,
-0.1201010197,
0.1412360668,
-0.0103474781,
-0.4238345027,
0.3756211698,
-0.5192406178,
0.0653478652,
0.1564181,
0.1585125625,
0.1654800177,
0.191367805,
-0.1295811683,
-0.3327225149,
0.4483353198,
-0.3660877049,
-0.3723257184,
0.1123898327,
-0.0695719793,
0.1881096512,
-0.1034300476,
-0.5125928521,
-0.1575302184,
0.2134392411,
-0.1684265435,
-0.3530285954,
0.0400136188,
-0.1029166132,
0.1037677079,
-0.2346634567,
0.1878365576,
0.1710441113,
-0.0456503704,
-0.1793134809,
-0.4535677433
] |
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.2392031848,
-0.0001859218,
0.0175925568,
0.1512312144,
0.1369381696,
-0.1672839224,
0.5160796046,
0.0982800126,
-0.0554774776,
-0.1596170217,
0.1894439757,
-0.1941062957,
-0.1646526009,
0.1340248287,
0.1435166895,
-0.0841107368,
0.1339858323,
0.0562889799,
0.1950117499,
0.0235833228,
0.0756418481,
0.0561198294,
-0.0015377402,
-0.0821401626,
-0.5577694774,
-0.1091075614,
-0.183193922,
-0.122709617,
-0.3284451962,
-0.4212742448,
0.0153293088,
0.3389092386,
0.4065938592,
0.4958456755,
-0.0001238081,
-0.2122488618,
-0.1774332374,
-0.2544005513,
-0.0525414199,
-0.2375395298,
0.3744875789,
-0.4061253071,
0.1074685976,
-0.1326392591,
0.0795989037,
-0.2096721083,
-0.0318120122,
-0.2318025231,
0.5191585422,
0.4787015617,
0.0087788217,
0.0259200186,
0.0743120462,
0.1130470186,
-0.342888236,
0.1746680737,
-0.1214062572,
0.1298535466,
0.3205681145,
-0.0565027595,
-0.0402817726,
-0.0930832252,
0.0166852102,
-0.3108219802,
0.3316011131,
0.1152971238,
-0.1415724009,
-0.451603353,
0.0755914152,
0.2538360357,
0.6707492471,
-0.3457719684,
-0.3893294632,
-0.4439041615,
-0.1682326794,
0.0374632254,
-0.0296419151,
0.0730164349,
-0.2541882098,
0.1022672653,
-0.1240607351,
-0.2946549654,
-0.2216565311,
0.0544247329,
-0.3207276464,
0.3257496059,
-0.0336121693,
0.0357046425,
-0.1194256246,
-0.2430413067,
-0.0599063262,
-0.2204924673,
0.2210460454,
0.4883925021,
-0.0837701559,
-0.3066203594,
-0.2297290564,
-0.3395672441,
0.5583882928,
0.086836122,
-0.0990154445,
0.0349288508,
-0.2218428552,
-0.0805968046,
0.035031341,
0.3476087749,
0.504622221,
-0.1744387746,
0.010841745,
-0.1692951322,
-0.1438458264,
-0.2762908041,
-0.6274004579,
0.1172757149,
-0.0599245988,
-0.0570776761,
0.039243646,
-0.0520312972,
0.2307768166,
-0.0069925841,
-0.2350394726,
-0.0044793747,
0.0452590622,
0.0356491506,
-0.06750191,
-0.0861179978,
-0.2376567721,
0.421277374,
-0.2759158015,
-0.2418375015,
0.0703430921,
-0.1863945276,
-0.1865321696,
0.1939845085,
0.1796315312,
0.0179879852,
0.3778650463,
0.1087443978,
-0.1177098304,
-0.2375998497,
0.1789946854,
-0.2524816692,
-0.0524348803,
-0.0748902485,
0.1091083214,
0.2168312222,
0.1097023338,
-0.4177302718,
-0.2348012924,
0.0331998914,
-0.0249292701,
-0.3025583923,
-0.033383742,
0.0284934975,
-0.1920481622,
-0.1472053975,
-0.2405373752,
0.6766545177,
0.4798666537,
0.0126456544,
-0.0017274283,
-0.0322488621,
-0.1381381303,
-0.099968195,
0.2362456769,
0.4747396111,
-0.7666446567,
0.0063366592,
0.002641473,
-0.0365215838,
0.096515052,
0.3493334651,
-0.1648328006,
0.6068564653,
-0.0613508373,
0.5180054903,
0.3503057659,
0.1305188239,
-0.2049501836,
0.1372380704,
0.029210411,
0.1867634654,
-0.1073110476,
-0.156243965,
0.5612365007,
-0.2129069269,
-0.03619859,
0.1182913333,
-0.1476489305,
-0.0669576377,
0.0326256678,
0.0857676789,
0.2753351927,
-0.1395991147,
0.0697685629,
-0.0398721881,
-0.0444107093,
0.3139218092,
0.1966238916,
-0.1594020724,
0.2759894729,
0.0362151228,
0.2324162126,
0.4073256254,
-0.0153670646,
-0.2693259716,
-0.075975664,
0.056763649,
0.2049037963,
0.2655688822,
-0.0570136122,
-0.1916297972,
-0.2474738508,
-0.1511304379,
0.0207672231,
-0.1977971494,
-0.0181167349,
0.0179736186,
-0.1353478581,
0.0234733596,
-0.3133319318,
0.1876452714,
-0.2843899131,
0.3427194953,
-0.2325660288,
-0.0005957559,
0.2443992645,
-0.1013841331,
-0.1625290662,
0.3830213845,
-0.0273515321,
-0.131312117,
0.0279481225,
0.2366937101,
0.3679014146,
-0.1408001333,
-0.2275568396,
0.4600906968,
0.3784698844,
0.0309689268,
0.4578376412,
-0.2016492188,
0.0193805173,
-0.1889166385,
0.0346813425,
0.3599473536,
0.2090637684,
0.2274588645,
-0.0112377554,
-0.0714984313,
0.3128147721,
0.0040352494,
-0.0427539237,
-0.0139180347,
-0.0154758729,
0.1952089667,
0.3493804336,
0.0107710082,
0.0465694293,
0.3449258804,
0.2432108223,
-0.1532548815,
0.1287157834,
0.2910188437,
-0.2863340974,
-0.205299601,
-0.1908234656,
0.0046361238,
0.0556726977,
0.0476994403,
0.3897699416,
0.0664353594,
-0.1433894634,
-0.1299940199,
0.2656418979,
0.0605866909,
-0.0630756468,
0.3100696206,
-0.1549257636,
0.1154169738,
-0.2331501395,
-0.4740206301,
-0.1258015335,
0.2036345452,
-0.1853826195,
0.1338461637,
0.0487245098,
-0.0661096871,
-0.396555841,
-0.1830103397,
-0.3718721867,
0.0566232502,
-0.0349519551,
-0.1158750206,
0.1493790597,
0.0335760266,
0.2499830723,
0.5063268542,
0.0095730051,
0.0583955646,
0.20632267,
-0.2811831534,
-0.2502627075,
-0.0346412137,
0.0933179036,
0.2416537106,
0.1541722715,
-0.087047182,
0.0865252316,
-0.0161854066,
-0.5051583052,
0.1515580714,
-0.1692165434,
0.4367188215,
0.0554253273,
0.1744431853,
0.0144785717,
-0.0833800212,
-0.2698354721,
0.0895951837,
-0.2077245712,
-0.2291133702,
-0.1111393273,
-0.0045477636,
0.0718694925,
-0.130814001,
-0.3728196621,
-0.0504081398,
0.272254914,
0.1782397926,
0.1835107207,
-0.0798520297,
-0.0299038105,
0.2354943454,
0.1032654718,
0.0373405516,
0.0435232669,
-0.0512596108,
0.2787411511,
-0.2501344979,
-0.236603722,
-0.0474131592,
-0.1261128932,
0.2636548281,
0.1433217525,
-0.2231926769,
0.2140241563,
-0.1526659429,
0.0093197748,
0.0154489093,
-0.0238185953,
0.4051700532,
-0.0522559993,
0.2788365483,
-0.1214465424,
0.0180851966,
0.0984242857,
-0.276183337,
0.1969470382,
-0.0060328031,
0.6503129005,
0.0369088277,
0.6386394501,
0.3684069514,
-0.1325148642,
0.0752434582,
-0.0477322713,
0.0422271565,
-0.3112986386,
-0.2277129889,
0.0006073043,
0.0090356469,
-0.0301075801,
0.3956708312,
0.2423076332,
0.1143693253,
0.2021978199,
-0.1181012169,
-0.13948524,
-0.2757113278,
0.2836947739,
-0.4695576131,
0.4671967626,
-0.0721845701,
0.0116694495,
-0.3317281604,
-0.1169729009,
-0.2223071307,
0.3786239922,
-0.0282128267,
0.0598834977,
-0.5507217646,
0.3868108094,
-0.6631573439,
0.0291503742,
0.2206851095,
0.3547828794,
0.1103870943,
0.1463712305,
-0.0709168464,
-0.0203722622,
0.4026373327,
-0.0227485877,
-0.2894218266,
-0.108224228,
-0.1320894212,
-0.2538170516,
0.2933551073,
-0.039580524,
0.1975637227,
0.531175375,
0.6587136984,
-0.3302848935,
-0.2319724411,
-0.3782880604,
0.5049982667,
-0.1509031057,
-0.0131165832,
0.1996589899,
-0.0180585533,
-0.2463344187,
0.044116348,
0.1279944777,
0.187322408,
0.0992732421,
0.0426308066,
-0.1333944947,
-0.2861353755,
0.2563574016,
0.0594394691,
0.1277617663,
-0.2765386403,
0.0873953179,
0.2656546235,
-0.135041371,
-0.0495323911,
0.1073108464,
0.1759167314,
-0.4010821581,
-0.012960312,
-0.1064641029,
0.4982677102,
0.0072954223,
0.1161930412,
0.1759972274,
-0.0717404038,
-0.1283391416,
-0.2516773939,
0.4990402758,
-0.0004323423,
0.1072118729,
-0.4950764477,
-0.5806416869,
0.1287847906,
0.0022291243,
-0.0955413431,
0.3580076396,
-0.0112047084,
-0.586191535,
0.5469619632,
0.2339940071,
1.0034732819,
0.0364246555,
0.1965815276,
-0.0692432299,
0.2333041131,
0.3526034653,
-0.5463706255,
-0.2250964642,
-0.4049319625,
0.2398341894,
-0.1035825759,
0.053146407,
0.203110382,
0.4196672142,
-0.097806111,
0.0434214137,
0.1982335001,
-0.0273170657,
0.1032380015,
0.4068477154,
-0.3265763819,
-0.2755765915,
0.051728297,
0.0033749528,
-0.0178097337,
-0.2065851837,
-0.1173749939,
0.1841157675,
0.0330488011,
-0.0679972321,
-0.4975014329,
-0.3805790544,
-0.3608531058,
-0.0133372601,
0.1129646897,
-0.2078264952,
0.4366977215,
0.2826575935,
0.6320576072,
0.391250968,
-0.2255337089,
0.0295787267,
-0.2768983245,
-0.1763714105,
0.0498523749,
-0.2072148323,
0.3300942183,
0.0513831377,
-0.1469300389,
-0.3165058494,
0.0341583639,
0.024863869,
-0.3118891716,
-0.3918747008,
0.2977170944,
-0.5495628715,
0.0693324953,
0.1410161406,
0.1742271036,
-0.1622754931,
-0.0320815295,
0.2196673155,
-0.0508988462,
-0.0259327553,
-0.16207394,
-0.0592634231,
-0.1033972204,
0.074757345,
-0.0118697463,
-0.29103598,
0.5136495829,
0.2392342091,
-0.106696777,
-0.1358098984,
0.3822306395,
0.2690791786,
-0.4311944544,
0.0318618529,
-0.2794517279,
-0.1974167824,
0.0385376886,
0.3607569337,
0.2582134306,
-0.1642008126,
-0.0545678549,
-0.4993221462,
-0.4086223841,
0.004934866,
-0.0258856006,
0.2762123644,
-0.1327499747,
0.3132952154,
-0.1386004537,
0.1803968698,
-0.1185474619,
0.2509555817,
0.2383133769,
0.2692072392,
-0.0381938405,
-0.1312279403,
-0.1876063645,
0.0220612027,
-0.1256457269,
0.3032782972,
-0.1072251499,
-0.0504503697,
-0.481066823,
0.2701502442,
0.2685160041,
-0.3452087641,
0.1435488313,
0.0769625753,
-0.2080496997,
-0.340121448,
0.1666087508,
0.065256536,
0.0499010272,
0.1358624399,
0.4429149032,
0.3076675832,
-0.308845073,
-0.1887062341,
0.1123207659,
0.210212335,
0.4263603389,
0.1400436163,
-0.1221101731,
-0.0386327654,
-0.2016712129,
0.5881648064,
0.5096356869,
-0.0835169554,
0.0431772657,
0.0823901743,
0.1406504363,
0.1542517841,
0.1059379503,
0.4155411422,
0.0251163431,
-0.2322398126,
0.6475021839,
0.0915134624,
0.0303588733,
0.106591329,
0.1562036276,
-0.1744715124,
0.0069194734,
0.358222276,
0.0635337234,
0.1894372106,
-0.2472035885,
-0.2593579292,
0.5303355455,
0.0892978907,
0.0578917637,
0.1401205361,
-0.1871413141,
0.0493194051,
0.2193016112,
0.1716694236,
0.325933665,
0.5564160943,
-0.0698602125,
0.3214527071,
0.0531292558,
0.004704372,
0.0471901521,
-0.3095895052,
-0.0800244138,
0.0480233245,
0.1656667292,
-0.1105849072,
-0.194738552,
0.197837159,
0.0363032073,
-0.1083431989,
0.1280539334,
0.277251184,
-0.1708550602,
-0.4737074375,
-0.3481685221,
-0.2068166733,
0.016413331,
-0.1115107536,
0.013460137,
-0.3089471757,
-0.3214223087,
-0.1910706013,
0.0930111483,
-0.4402128756,
0.2264524549,
-0.1502148062,
-0.0590886846,
-0.0950691104,
0.4051767886,
0.0410049558,
0.0708767176,
-0.1157149523,
0.2022528797,
0.1273885369,
0.1905831993,
-0.1700424254,
0.1962482333,
-0.4156351686,
0.0052444786,
-0.0055858307,
0.3747946024,
-0.0177562237,
0.3423498869,
0.1662877649,
-0.0815358907,
0.0093166418,
-0.0729302242,
0.3396166861,
-0.4478395879,
-0.1336389184,
0.4081299901,
0.1175647676,
-0.0746408477,
-0.0261993781,
0.0599858388,
-0.2737569511,
-0.0408929028,
0.5035933256,
-0.0996120051,
0.1589267701,
-0.1605336368,
-0.0049138535,
-0.0532942787,
0.3754830658,
0.4513395131,
0.2204483449,
-0.1742960066,
-0.2868294716,
-0.4054219127,
-0.037569467,
0.0112628769,
-0.0795192793,
-0.0870297626,
0.0210074708,
0.1426894665,
0.1683026552,
-0.3433711827,
0.3283091187,
-0.2516365647,
-0.0704325885,
-0.0427421778,
-0.0357310325,
-0.0338966735,
0.4775055945,
-0.1342855692,
-0.1031245664,
-0.0185356401,
-0.0347544998,
-0.1216443777,
0.0555415303,
-0.0064601153,
0.2513418496,
-0.2258572876,
0.1185981259,
0.2096251696,
0.3537659049,
0.0451679304,
0.2406835109,
-0.2795902491,
0.146435976,
-0.2605935335,
0.3197109401,
0.1615740806,
0.371563673,
-0.3493006825,
0.0580707379,
-0.0444216877,
0.1008121893,
0.197295025,
-0.2761370838,
-0.3211239576,
0.1628668308,
-0.2799777389,
-0.2471337914,
0.1270717531,
0.6248328686,
-0.1231766939,
0.3606706858,
0.0793346316,
0.0421328694,
0.1611796916,
-0.4122856259,
-0.4679848552,
-0.0765419379,
-0.039569363,
0.6494613886,
-0.2072230428,
-0.6433720589,
-0.0226899236,
0.5512031913,
0.0085754432,
-0.2864913344,
0.2637564242,
0.2395218313,
-0.2832234502,
-0.2148467153,
0.5683007836,
-0.1135209128,
-0.0341539122,
0.0079851821,
-0.3772536218
] |
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.1428115964,
-0.1723925769,
0.1075330898,
0.1302345395,
0.0596387647,
-0.0772049874,
0.290861994,
0.259878397,
0.2259385139,
0.0111387148,
0.1740460396,
0.2267902195,
-0.2015921623,
0.0207946897,
0.0591224693,
-0.2397234738,
0.4002411067,
0.1342247277,
-0.3602031469,
-0.0450368337,
-0.1554612219,
0.5982701182,
-0.3146858215,
-0.0109575428,
-0.4952146709,
0.0392146856,
-0.051910419,
0.1466765553,
0.1343916655,
-0.1309380382,
0.40626809,
-0.1249717623,
-0.0909754783,
0.7543856502,
-0.0001224395,
0.0493885577,
0.2803663611,
-0.0356525332,
-0.3091665506,
-0.3431198597,
0.4603337646,
-0.2034226656,
0.1984530091,
0.0210754722,
-0.1604527831,
-0.031238541,
0.0431692004,
-0.1770753562,
0.3062653542,
0.2292728424,
0.1635721326,
0.6086136699,
0.2872377634,
-0.2450603396,
0.1327302754,
0.0671042949,
-0.301982373,
0.1775179058,
0.3917793632,
0.0825864524,
0.1014889106,
0.3350149691,
0.1052377895,
-0.2016976029,
0.4753357172,
-0.0923257768,
-0.2559215128,
-0.2584761679,
0.0923650339,
0.1190380454,
0.1131736338,
-0.3634864092,
-0.4058306813,
-0.5498494506,
-0.2388641685,
0.2090979964,
0.3674342334,
-0.229259938,
-0.0580106303,
0.1378618777,
-0.3331098258,
-0.3827237189,
-0.1197224557,
-0.0331872292,
-0.0127180368,
0.8859992027,
-0.0173581894,
0.1676163375,
0.0610814095,
0.0065577272,
0.0001211911,
-0.1602582484,
0.0085461438,
0.1647606641,
-0.1325273067,
-0.0888527855,
0.0530817136,
-0.1233679354,
0.0066026673,
-0.1705618054,
-0.2632813454,
-0.1685596108,
-0.1061792672,
0.1360404044,
0.0399863534,
0.2783111036,
-0.1579051614,
0.473905921,
0.2186332047,
0.2473485321,
0.3216752112,
-0.1070391089,
0.1026502773,
-0.2637829483,
-0.1310983896,
0.117757827,
0.209228918,
-0.2898228765,
-0.0179973952,
-0.0566720925,
-0.0108648762,
0.2226476967,
0.0681746379,
0.1660168618,
-0.0328398161,
0.3804474175,
0.092811957,
0.2229461521,
-0.1679708362,
0.2382939756,
-0.1164787337,
-0.0974211693,
-0.0144357383,
-0.0716304705,
0.169159323,
-0.0391607843,
0.2538378239,
0.2059005797,
0.4203246236,
0.0874160677,
-0.1992434114,
0.0457500294,
0.0518942885,
0.3462992013,
-0.4304383695,
0.3338394761,
0.1684205085,
-0.3088177443,
-0.3119701743,
-0.009893233,
-0.0638601184,
-0.091493018,
-0.0469187051,
0.063266091,
-0.2492464632,
0.0130641889,
0.0124970488,
0.1144578308,
0.172650665,
-0.4946888685,
0.276992172,
-0.2337838709,
-0.2119736373,
-0.0241524167,
0.1076131389,
0.0356381796,
-0.2591189444,
-0.4424848557,
0.3240967989,
-0.0839909464,
-0.0312674828,
0.2439704388,
-0.1142875701,
-0.3914648294,
-0.1942075938,
-0.0358675867,
-0.2203383446,
-0.1526677758,
-0.5307195187,
0.0207094029,
0.085997045,
0.2394688725,
-0.0067257434,
-0.0262467302,
0.061526522,
-0.2693710625,
-0.1275818944,
0.3495990932,
0.1197855622,
0.0980080888,
-0.4085879028,
-0.3331645727,
-0.0149047431,
-0.0940909907,
0.1942505091,
-0.164009124,
-0.1923218966,
0.1174800172,
0.4155254364,
-0.2786255777,
-0.0290602148,
0.1464766264,
0.519697845,
0.0005211122,
0.0618167706,
-0.1114570349,
-0.6179244518,
0.4469008446,
-0.2873840928,
0.1566895843,
-0.3138539195,
-0.1721372604,
-0.0007826276,
0.1277839094,
0.0836198628,
-0.395760566,
-0.0320511013,
0.0547228232,
0.1871065497,
0.0526262522,
-0.1427205354,
0.2477561831,
0.0274524763,
0.007891871,
-0.4396378696,
0.3152775466,
-0.0824751034,
-0.1737359911,
0.1070351973,
0.2113478184,
0.0512976088,
-0.3297807574,
-0.1780620366,
0.3240362406,
-0.1270818561,
0.1900221258,
-0.3105563223,
0.0714246035,
0.2983860373,
-0.041949898,
-0.0758858994,
0.3169097304,
-0.0071654655,
0.0673381984,
0.0863994658,
0.1811777204,
0.0145423803,
0.1595083028,
0.2673685551,
0.0799956769,
0.0134188756,
-0.028026633,
-0.0551778674,
-0.205768913,
0.053303279,
-0.0545431376,
-0.0722140819,
0.1719161421,
-0.1459623426,
-0.0196433626,
0.6664277315,
0.045190312,
0.0067487778,
0.1859145164,
-0.1284981519,
-0.1042101383,
0.1641649157,
0.3101859093,
0.2909154892,
0.1102725863,
-0.0396557115,
0.2677046657,
-0.0750832707,
-0.1431830525,
0.2155106515,
0.096881032,
0.4194387794,
0.0191844758,
0.0385330766,
0.3056657314,
0.0614310503,
-0.0603860058,
-0.2637177706,
0.091435425,
-0.3121882677,
0.4507686794,
-0.0368029363,
0.0784676522,
-0.1586847752,
-0.157732904,
-0.785261631,
-0.1883606315,
0.0067412034,
0.0399593636,
-0.1980157346,
0.3214105964,
-0.0444883332,
0.1915930361,
-0.2949769199,
-0.2638165355,
-0.2137810588,
0.0314919539,
-0.5112410188,
-0.0231350642,
0.2785096765,
0.1089703739,
0.0357540175,
-0.072816968,
-0.1063584387,
0.039417848,
-0.5937505364,
0.2073414624,
-0.0966714621,
0.3363632858,
0.0931136832,
-0.1605441719,
-0.1574151814,
-0.2098425478,
0.2231023163,
-0.8244646788,
-0.0332417823,
-0.0670600981,
-0.0330604315,
-0.2129865289,
-0.3109067678,
0.0425580628,
-0.193734467,
-0.2245923579,
0.0641578883,
0.0267931223,
0.1504383683,
0.6384633183,
0.0632365644,
0.066841796,
-0.3688483238,
-0.0192969926,
0.0950938761,
0.1094496474,
0.2644440234,
0.0237144642,
-0.4643276632,
-0.1210151762,
-0.0489235148,
0.1750032604,
0.1410593987,
-0.3063696027,
-0.2472432703,
-0.42177549,
0.08008717,
0.1932057589,
-0.0237944052,
0.4895008206,
-0.2125198245,
0.1190253943,
-0.2503905892,
-0.1644293666,
0.1279211193,
-0.0880081281,
0.1465211362,
0.0695350766,
0.1001238227,
0.1234060824,
0.7045314908,
0.4875883758,
-0.0884718597,
0.1642234623,
0.1532944292,
0.4174871445,
-0.2423342168,
-0.3420732617,
-0.0094387867,
0.0148863196,
-0.1092204601,
0.1582185179,
-0.0186669342,
-0.1451959163,
-0.311971724,
-0.0997492224,
-0.0315328315,
-0.386444658,
0.1610625982,
0.3849336207,
0.4469645917,
0.1315155029,
0.070241645,
-0.026265759,
-0.006187316,
0.2651169896,
0.2288968414,
0.100570783,
0.1592471004,
0.0106107071,
0.0563790612,
-0.4902707934,
0.1502768397,
0.1207989007,
0.2744879425,
-0.0123041794,
-0.2598347664,
-0.092697382,
-0.0416161753,
0.3547390103,
0.2080984563,
-0.1358808279,
0.0037822053,
-0.0252401903,
-0.5615044236,
-0.084536396,
-0.1922895163,
0.029599458,
0.6906400919,
0.7015834451,
-0.2574878931,
-0.2235772908,
-0.0012596231,
0.198622182,
-0.085906148,
-0.1249648705,
-0.4714789391,
0.0180770457,
-0.2427761555,
-0.0761247277,
0.2081295401,
0.0937623829,
-0.0123716556,
0.1114060879,
-0.0792527273,
-0.3343801498,
-0.1157328635,
0.2385465056,
0.2372387201,
-0.0853748545,
0.1637603045,
0.1426897198,
-0.0472991727,
-0.0937490612,
0.5736644864,
0.0868206695,
-0.1973436177,
-0.0140722012,
0.252895534,
0.3823762536,
0.3725433648,
-0.3145150542,
-0.0523284301,
0.0576482937,
0.1869301945,
0.0717085749,
-0.2260336578,
0.1847771853,
0.1969467402,
-0.3472762406,
-0.2714083195,
0.3154608011,
0.2166330516,
-0.0438232049,
-0.0723233968,
0.3505692482,
-0.2092167437,
0.2476400584,
0.0264696442,
0.8544820547,
0.1244776845,
0.2327863574,
0.2973267138,
-0.02587419,
0.7188071609,
0.3994668722,
0.1941174269,
-0.4109278321,
-0.341868192,
-0.0140613317,
-0.0808943063,
0.4022876024,
-0.2950653136,
-0.3223610222,
0.3390086293,
0.2339358926,
0.1027211845,
0.0795768499,
0.0588903278,
-0.1981143802,
-0.1559316516,
-0.2919668853,
0.0332193747,
0.0540285558,
0.3022702336,
-0.0552453734,
-0.1685111374,
-0.349358201,
-0.4462104142,
-0.282032758,
0.2805141211,
-0.3277341127,
-0.0141643276,
0.5910343528,
-0.2505151927,
0.4873716533,
-0.0331624262,
0.177880615,
0.2963130474,
-0.2713109553,
0.2396021187,
-0.2851701379,
0.0019539185,
0.1223959178,
0.0028116368,
0.3139872849,
-0.1776820421,
-0.1181392744,
-0.2422827631,
-0.1403474808,
-0.1115922853,
0.0921532512,
-0.1329474151,
-0.0848165229,
-0.0531586856,
-0.1113057286,
0.0065423995,
0.180899024,
-0.2863343358,
0.1043159515,
-0.0331021957,
-0.1111450642,
-0.1462765038,
-0.0809004083,
-0.252056092,
-0.0680326521,
0.1273739338,
-0.1710669994,
0.088003166,
0.4218150973,
0.462512821,
-0.1962949038,
0.0047669709,
-0.2927005291,
0.1706175059,
-1.0560750961,
0.0434697233,
0.1184035093,
-0.0590664893,
-0.2321719825,
0.4432280064,
0.3857440948,
-0.2091692239,
-0.1934963763,
-0.1018270627,
-0.268640548,
0.0025453269,
-0.0818316787,
0.1668406427,
-0.1092047915,
-0.1131563336,
0.0659627914,
0.200472042,
-0.2183969319,
-0.0878218412,
0.0255134553,
-0.1071734577,
-0.0951181352,
-0.3705212474,
0.2673201859,
-0.2820158899,
-0.0297694169,
0.1741182804,
-0.1012773067,
-0.0719068497,
-0.2767720819,
0.1109215468,
0.3009899259,
-0.1892266273,
-0.1592649966,
0.0971671194,
-0.0445921421,
-0.2512550056,
0.3204422295,
0.370295167,
-0.005415488,
0.1673936695,
0.1635504514,
0.0742889345,
0.0051830038,
0.1371878535,
0.0004125312,
0.1637768894,
0.2630917132,
0.265512526,
0.0087822564,
0.1276263446,
0.0735778213,
0.2405822575,
-0.0842643082,
0.1357295662,
0.0359872952,
-0.1764383018,
0.0797160715,
0.2588963807,
0.3712697923,
0.2570673525,
-0.0932637155,
-0.1037777364,
0.2864117026,
0.0947104543,
-0.2520166039,
-0.0810542554,
0.1429406703,
0.2257422954,
0.0062077492,
0.2939153612,
0.3655893207,
-0.0921465382,
0.2926076651,
0.2397044301,
0.2022413164,
0.3121078312,
0.4906816185,
0.3819250166,
0.2148481607,
0.1730958223,
0.3125340343,
0.0882161409,
0.1764629334,
-0.0680323467,
-0.2254636288,
0.0927054435,
-0.3624398708,
0.0612281114,
0.2626802921,
-0.3448005915,
-0.1063370183,
-0.2771712542,
0.1597812027,
0.178962633,
0.0619784296,
0.3423137963,
-0.1999438405,
-0.1018968672,
-0.2147203982,
0.165359512,
-0.1557973623,
-0.1243794411,
0.3625318408,
-0.0575806201,
-0.2877354622,
0.0142007545,
-0.1381665617,
-0.1885122955,
0.0023842379,
0.086293757,
-0.1487509906,
-0.1796550155,
0.0309444293,
0.110782966,
0.2017217278,
0.0674138814,
0.2881188691,
0.2268688679,
-0.1005050391,
-0.2474520802,
0.2419555187,
0.4578123689,
-0.0087834643,
0.0842527822,
0.1260660887,
-0.1481117904,
0.1541391313,
0.0521553531,
0.3505435586,
-0.0320188478,
0.1383473277,
0.1348991096,
0.0451739579,
-0.0982145816,
-0.0344970003,
-0.3612898886,
0.3455743194,
-0.2912254035,
0.7918102145,
-0.4724252522,
-0.0623588786,
-0.1419644058,
0.2556202412,
-0.4287145734,
-0.1302294731,
0.3787559867,
-0.0227483958,
0.1456228793,
-0.2917765975,
0.0362586454,
0.0979722142,
0.394186765,
0.3059560359,
0.2157987505,
0.0930603668,
-0.0810706541,
-0.4841984808,
0.2380544543,
0.0206124224,
0.3427096903,
0.2149205357,
-0.222481057,
0.0794464201,
0.0694114715,
0.2120190561,
0.4279301763,
-0.2316808403,
-0.2786812186,
-0.1207926869,
0.0128874294,
-0.4145511687,
-0.3672769368,
0.1829686612,
-0.1834723055,
-0.0652337521,
-0.3103597164,
-0.0375361741,
-0.2787759602,
0.0337751806,
-0.1651545763,
-0.3191039562,
0.2987806499,
0.3485631049,
0.2140876353,
-0.0922433585,
-0.3349894881,
-0.2125600874,
-0.0605015531,
-0.1788995564,
0.2837646008,
-0.2700267732,
0.3132869899,
-0.269992888,
-0.1873682588,
-0.1783804595,
0.0091541037,
0.0317162797,
-0.1672868431,
-0.0790596008,
0.0237621963,
-0.2985112071,
0.0984310731,
0.3186788857,
0.3591606617,
0.053078182,
-0.0591427684,
-0.3668981493,
-0.2386038601,
0.6176967621,
-0.3460365832,
-0.1892913133,
-0.1798470914,
0.1215005368,
0.1456497312,
-0.4370312095,
-0.6966890693,
-0.0974389687,
0.0974256694,
0.0474989451,
0.0741254836,
0.059034463,
-0.0778407902,
-0.0506133996,
-0.0690908507,
0.684530437,
0.0159650221,
-0.2760545015,
0.2355743349,
-0.101307109
] |
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.1428115964,
-0.1723925769,
0.1075330898,
0.1302345395,
0.0596387647,
-0.0772049874,
0.290861994,
0.259878397,
0.2259385139,
0.0111387148,
0.1740460396,
0.2267902195,
-0.2015921623,
0.0207946897,
0.0591224693,
-0.2397234738,
0.4002411067,
0.1342247277,
-0.3602031469,
-0.0450368337,
-0.1554612219,
0.5982701182,
-0.3146858215,
-0.0109575428,
-0.4952146709,
0.0392146856,
-0.051910419,
0.1466765553,
0.1343916655,
-0.1309380382,
0.40626809,
-0.1249717623,
-0.0909754783,
0.7543856502,
-0.0001224395,
0.0493885577,
0.2803663611,
-0.0356525332,
-0.3091665506,
-0.3431198597,
0.4603337646,
-0.2034226656,
0.1984530091,
0.0210754722,
-0.1604527831,
-0.031238541,
0.0431692004,
-0.1770753562,
0.3062653542,
0.2292728424,
0.1635721326,
0.6086136699,
0.2872377634,
-0.2450603396,
0.1327302754,
0.0671042949,
-0.301982373,
0.1775179058,
0.3917793632,
0.0825864524,
0.1014889106,
0.3350149691,
0.1052377895,
-0.2016976029,
0.4753357172,
-0.0923257768,
-0.2559215128,
-0.2584761679,
0.0923650339,
0.1190380454,
0.1131736338,
-0.3634864092,
-0.4058306813,
-0.5498494506,
-0.2388641685,
0.2090979964,
0.3674342334,
-0.229259938,
-0.0580106303,
0.1378618777,
-0.3331098258,
-0.3827237189,
-0.1197224557,
-0.0331872292,
-0.0127180368,
0.8859992027,
-0.0173581894,
0.1676163375,
0.0610814095,
0.0065577272,
0.0001211911,
-0.1602582484,
0.0085461438,
0.1647606641,
-0.1325273067,
-0.0888527855,
0.0530817136,
-0.1233679354,
0.0066026673,
-0.1705618054,
-0.2632813454,
-0.1685596108,
-0.1061792672,
0.1360404044,
0.0399863534,
0.2783111036,
-0.1579051614,
0.473905921,
0.2186332047,
0.2473485321,
0.3216752112,
-0.1070391089,
0.1026502773,
-0.2637829483,
-0.1310983896,
0.117757827,
0.209228918,
-0.2898228765,
-0.0179973952,
-0.0566720925,
-0.0108648762,
0.2226476967,
0.0681746379,
0.1660168618,
-0.0328398161,
0.3804474175,
0.092811957,
0.2229461521,
-0.1679708362,
0.2382939756,
-0.1164787337,
-0.0974211693,
-0.0144357383,
-0.0716304705,
0.169159323,
-0.0391607843,
0.2538378239,
0.2059005797,
0.4203246236,
0.0874160677,
-0.1992434114,
0.0457500294,
0.0518942885,
0.3462992013,
-0.4304383695,
0.3338394761,
0.1684205085,
-0.3088177443,
-0.3119701743,
-0.009893233,
-0.0638601184,
-0.091493018,
-0.0469187051,
0.063266091,
-0.2492464632,
0.0130641889,
0.0124970488,
0.1144578308,
0.172650665,
-0.4946888685,
0.276992172,
-0.2337838709,
-0.2119736373,
-0.0241524167,
0.1076131389,
0.0356381796,
-0.2591189444,
-0.4424848557,
0.3240967989,
-0.0839909464,
-0.0312674828,
0.2439704388,
-0.1142875701,
-0.3914648294,
-0.1942075938,
-0.0358675867,
-0.2203383446,
-0.1526677758,
-0.5307195187,
0.0207094029,
0.085997045,
0.2394688725,
-0.0067257434,
-0.0262467302,
0.061526522,
-0.2693710625,
-0.1275818944,
0.3495990932,
0.1197855622,
0.0980080888,
-0.4085879028,
-0.3331645727,
-0.0149047431,
-0.0940909907,
0.1942505091,
-0.164009124,
-0.1923218966,
0.1174800172,
0.4155254364,
-0.2786255777,
-0.0290602148,
0.1464766264,
0.519697845,
0.0005211122,
0.0618167706,
-0.1114570349,
-0.6179244518,
0.4469008446,
-0.2873840928,
0.1566895843,
-0.3138539195,
-0.1721372604,
-0.0007826276,
0.1277839094,
0.0836198628,
-0.395760566,
-0.0320511013,
0.0547228232,
0.1871065497,
0.0526262522,
-0.1427205354,
0.2477561831,
0.0274524763,
0.007891871,
-0.4396378696,
0.3152775466,
-0.0824751034,
-0.1737359911,
0.1070351973,
0.2113478184,
0.0512976088,
-0.3297807574,
-0.1780620366,
0.3240362406,
-0.1270818561,
0.1900221258,
-0.3105563223,
0.0714246035,
0.2983860373,
-0.041949898,
-0.0758858994,
0.3169097304,
-0.0071654655,
0.0673381984,
0.0863994658,
0.1811777204,
0.0145423803,
0.1595083028,
0.2673685551,
0.0799956769,
0.0134188756,
-0.028026633,
-0.0551778674,
-0.205768913,
0.053303279,
-0.0545431376,
-0.0722140819,
0.1719161421,
-0.1459623426,
-0.0196433626,
0.6664277315,
0.045190312,
0.0067487778,
0.1859145164,
-0.1284981519,
-0.1042101383,
0.1641649157,
0.3101859093,
0.2909154892,
0.1102725863,
-0.0396557115,
0.2677046657,
-0.0750832707,
-0.1431830525,
0.2155106515,
0.096881032,
0.4194387794,
0.0191844758,
0.0385330766,
0.3056657314,
0.0614310503,
-0.0603860058,
-0.2637177706,
0.091435425,
-0.3121882677,
0.4507686794,
-0.0368029363,
0.0784676522,
-0.1586847752,
-0.157732904,
-0.785261631,
-0.1883606315,
0.0067412034,
0.0399593636,
-0.1980157346,
0.3214105964,
-0.0444883332,
0.1915930361,
-0.2949769199,
-0.2638165355,
-0.2137810588,
0.0314919539,
-0.5112410188,
-0.0231350642,
0.2785096765,
0.1089703739,
0.0357540175,
-0.072816968,
-0.1063584387,
0.039417848,
-0.5937505364,
0.2073414624,
-0.0966714621,
0.3363632858,
0.0931136832,
-0.1605441719,
-0.1574151814,
-0.2098425478,
0.2231023163,
-0.8244646788,
-0.0332417823,
-0.0670600981,
-0.0330604315,
-0.2129865289,
-0.3109067678,
0.0425580628,
-0.193734467,
-0.2245923579,
0.0641578883,
0.0267931223,
0.1504383683,
0.6384633183,
0.0632365644,
0.066841796,
-0.3688483238,
-0.0192969926,
0.0950938761,
0.1094496474,
0.2644440234,
0.0237144642,
-0.4643276632,
-0.1210151762,
-0.0489235148,
0.1750032604,
0.1410593987,
-0.3063696027,
-0.2472432703,
-0.42177549,
0.08008717,
0.1932057589,
-0.0237944052,
0.4895008206,
-0.2125198245,
0.1190253943,
-0.2503905892,
-0.1644293666,
0.1279211193,
-0.0880081281,
0.1465211362,
0.0695350766,
0.1001238227,
0.1234060824,
0.7045314908,
0.4875883758,
-0.0884718597,
0.1642234623,
0.1532944292,
0.4174871445,
-0.2423342168,
-0.3420732617,
-0.0094387867,
0.0148863196,
-0.1092204601,
0.1582185179,
-0.0186669342,
-0.1451959163,
-0.311971724,
-0.0997492224,
-0.0315328315,
-0.386444658,
0.1610625982,
0.3849336207,
0.4469645917,
0.1315155029,
0.070241645,
-0.026265759,
-0.006187316,
0.2651169896,
0.2288968414,
0.100570783,
0.1592471004,
0.0106107071,
0.0563790612,
-0.4902707934,
0.1502768397,
0.1207989007,
0.2744879425,
-0.0123041794,
-0.2598347664,
-0.092697382,
-0.0416161753,
0.3547390103,
0.2080984563,
-0.1358808279,
0.0037822053,
-0.0252401903,
-0.5615044236,
-0.084536396,
-0.1922895163,
0.029599458,
0.6906400919,
0.7015834451,
-0.2574878931,
-0.2235772908,
-0.0012596231,
0.198622182,
-0.085906148,
-0.1249648705,
-0.4714789391,
0.0180770457,
-0.2427761555,
-0.0761247277,
0.2081295401,
0.0937623829,
-0.0123716556,
0.1114060879,
-0.0792527273,
-0.3343801498,
-0.1157328635,
0.2385465056,
0.2372387201,
-0.0853748545,
0.1637603045,
0.1426897198,
-0.0472991727,
-0.0937490612,
0.5736644864,
0.0868206695,
-0.1973436177,
-0.0140722012,
0.252895534,
0.3823762536,
0.3725433648,
-0.3145150542,
-0.0523284301,
0.0576482937,
0.1869301945,
0.0717085749,
-0.2260336578,
0.1847771853,
0.1969467402,
-0.3472762406,
-0.2714083195,
0.3154608011,
0.2166330516,
-0.0438232049,
-0.0723233968,
0.3505692482,
-0.2092167437,
0.2476400584,
0.0264696442,
0.8544820547,
0.1244776845,
0.2327863574,
0.2973267138,
-0.02587419,
0.7188071609,
0.3994668722,
0.1941174269,
-0.4109278321,
-0.341868192,
-0.0140613317,
-0.0808943063,
0.4022876024,
-0.2950653136,
-0.3223610222,
0.3390086293,
0.2339358926,
0.1027211845,
0.0795768499,
0.0588903278,
-0.1981143802,
-0.1559316516,
-0.2919668853,
0.0332193747,
0.0540285558,
0.3022702336,
-0.0552453734,
-0.1685111374,
-0.349358201,
-0.4462104142,
-0.282032758,
0.2805141211,
-0.3277341127,
-0.0141643276,
0.5910343528,
-0.2505151927,
0.4873716533,
-0.0331624262,
0.177880615,
0.2963130474,
-0.2713109553,
0.2396021187,
-0.2851701379,
0.0019539185,
0.1223959178,
0.0028116368,
0.3139872849,
-0.1776820421,
-0.1181392744,
-0.2422827631,
-0.1403474808,
-0.1115922853,
0.0921532512,
-0.1329474151,
-0.0848165229,
-0.0531586856,
-0.1113057286,
0.0065423995,
0.180899024,
-0.2863343358,
0.1043159515,
-0.0331021957,
-0.1111450642,
-0.1462765038,
-0.0809004083,
-0.252056092,
-0.0680326521,
0.1273739338,
-0.1710669994,
0.088003166,
0.4218150973,
0.462512821,
-0.1962949038,
0.0047669709,
-0.2927005291,
0.1706175059,
-1.0560750961,
0.0434697233,
0.1184035093,
-0.0590664893,
-0.2321719825,
0.4432280064,
0.3857440948,
-0.2091692239,
-0.1934963763,
-0.1018270627,
-0.268640548,
0.0025453269,
-0.0818316787,
0.1668406427,
-0.1092047915,
-0.1131563336,
0.0659627914,
0.200472042,
-0.2183969319,
-0.0878218412,
0.0255134553,
-0.1071734577,
-0.0951181352,
-0.3705212474,
0.2673201859,
-0.2820158899,
-0.0297694169,
0.1741182804,
-0.1012773067,
-0.0719068497,
-0.2767720819,
0.1109215468,
0.3009899259,
-0.1892266273,
-0.1592649966,
0.0971671194,
-0.0445921421,
-0.2512550056,
0.3204422295,
0.370295167,
-0.005415488,
0.1673936695,
0.1635504514,
0.0742889345,
0.0051830038,
0.1371878535,
0.0004125312,
0.1637768894,
0.2630917132,
0.265512526,
0.0087822564,
0.1276263446,
0.0735778213,
0.2405822575,
-0.0842643082,
0.1357295662,
0.0359872952,
-0.1764383018,
0.0797160715,
0.2588963807,
0.3712697923,
0.2570673525,
-0.0932637155,
-0.1037777364,
0.2864117026,
0.0947104543,
-0.2520166039,
-0.0810542554,
0.1429406703,
0.2257422954,
0.0062077492,
0.2939153612,
0.3655893207,
-0.0921465382,
0.2926076651,
0.2397044301,
0.2022413164,
0.3121078312,
0.4906816185,
0.3819250166,
0.2148481607,
0.1730958223,
0.3125340343,
0.0882161409,
0.1764629334,
-0.0680323467,
-0.2254636288,
0.0927054435,
-0.3624398708,
0.0612281114,
0.2626802921,
-0.3448005915,
-0.1063370183,
-0.2771712542,
0.1597812027,
0.178962633,
0.0619784296,
0.3423137963,
-0.1999438405,
-0.1018968672,
-0.2147203982,
0.165359512,
-0.1557973623,
-0.1243794411,
0.3625318408,
-0.0575806201,
-0.2877354622,
0.0142007545,
-0.1381665617,
-0.1885122955,
0.0023842379,
0.086293757,
-0.1487509906,
-0.1796550155,
0.0309444293,
0.110782966,
0.2017217278,
0.0674138814,
0.2881188691,
0.2268688679,
-0.1005050391,
-0.2474520802,
0.2419555187,
0.4578123689,
-0.0087834643,
0.0842527822,
0.1260660887,
-0.1481117904,
0.1541391313,
0.0521553531,
0.3505435586,
-0.0320188478,
0.1383473277,
0.1348991096,
0.0451739579,
-0.0982145816,
-0.0344970003,
-0.3612898886,
0.3455743194,
-0.2912254035,
0.7918102145,
-0.4724252522,
-0.0623588786,
-0.1419644058,
0.2556202412,
-0.4287145734,
-0.1302294731,
0.3787559867,
-0.0227483958,
0.1456228793,
-0.2917765975,
0.0362586454,
0.0979722142,
0.394186765,
0.3059560359,
0.2157987505,
0.0930603668,
-0.0810706541,
-0.4841984808,
0.2380544543,
0.0206124224,
0.3427096903,
0.2149205357,
-0.222481057,
0.0794464201,
0.0694114715,
0.2120190561,
0.4279301763,
-0.2316808403,
-0.2786812186,
-0.1207926869,
0.0128874294,
-0.4145511687,
-0.3672769368,
0.1829686612,
-0.1834723055,
-0.0652337521,
-0.3103597164,
-0.0375361741,
-0.2787759602,
0.0337751806,
-0.1651545763,
-0.3191039562,
0.2987806499,
0.3485631049,
0.2140876353,
-0.0922433585,
-0.3349894881,
-0.2125600874,
-0.0605015531,
-0.1788995564,
0.2837646008,
-0.2700267732,
0.3132869899,
-0.269992888,
-0.1873682588,
-0.1783804595,
0.0091541037,
0.0317162797,
-0.1672868431,
-0.0790596008,
0.0237621963,
-0.2985112071,
0.0984310731,
0.3186788857,
0.3591606617,
0.053078182,
-0.0591427684,
-0.3668981493,
-0.2386038601,
0.6176967621,
-0.3460365832,
-0.1892913133,
-0.1798470914,
0.1215005368,
0.1456497312,
-0.4370312095,
-0.6966890693,
-0.0974389687,
0.0974256694,
0.0474989451,
0.0741254836,
0.059034463,
-0.0778407902,
-0.0506133996,
-0.0690908507,
0.684530437,
0.0159650221,
-0.2760545015,
0.2355743349,
-0.101307109
] |
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.1725192219,
-0.5047549605,
-0.0494231954,
0.4731768966,
-0.0721401647,
-0.3464436829,
0.0108582238,
0.0527498163,
-0.4997348189,
0.1422905624,
-0.0995595828,
-0.0388609432,
0.1009054333,
0.254296422,
0.0646133423,
-0.2345317453,
-0.0951781347,
0.2984141111,
-0.1135933325,
-0.2847174108,
0.046721831,
0.7516419888,
-0.0423596501,
0.4498419762,
-0.1351103634,
0.0491325334,
0.1681938022,
-0.1435231566,
-0.1015467793,
-0.1026617885,
0.0283566341,
-0.2763161063,
-0.1589077413,
0.2016080022,
-0.0001213429,
-0.0264125764,
0.2445290685,
-0.0716521814,
-0.1024018228,
0.0959484503,
0.2629528642,
0.1162962839,
0.131611824,
-0.1478681862,
-0.4186838865,
-0.452596575,
-0.1050604284,
-0.3300444782,
0.2786359787,
0.1565031856,
0.0447499752,
0.4286802411,
-0.2391529977,
0.0296925046,
0.1258456856,
0.2987283766,
-0.3401527405,
-0.2796238959,
0.026095314,
-0.310376972,
0.3510199487,
0.2686965764,
0.3863428533,
-0.3036615551,
0.0181093011,
0.371039331,
0.1963020712,
0.0109900068,
0.0251030438,
0.2208729982,
0.2916791141,
-0.1006678343,
-0.1725568771,
-0.3272693455,
-0.0763474926,
-0.5108534098,
-0.0946469158,
0.11572247,
-0.2886105776,
0.1027032435,
-0.0897854716,
0.1514851749,
-0.3256936073,
-0.1401703954,
-0.1286067069,
-0.0098548047,
0.1015226021,
0.0668269694,
0.2126815766,
-0.0489520468,
-0.4141368866,
0.4112629294,
-0.1428753138,
-0.292142868,
-0.2007184476,
-0.5218159556,
0.4599569142,
0.2730277777,
0.0312605575,
-0.0208963566,
0.1309310496,
-0.2003553808,
-0.2176469415,
0.0279036816,
0.1375723779,
-0.0961226597,
0.4073673785,
0.1480402052,
0.1019014493,
-0.0475522839,
0.1873632669,
-0.1528676003,
0.4590640962,
0.3763072193,
0.0797445327,
0.1429796666,
0.0296134949,
-0.4953491688,
-0.2803036273,
-0.2522746623,
0.1631973684,
0.1406689137,
-0.108839795,
-0.1343108714,
-0.0160848238,
0.1368660629,
0.47404024,
-0.1410939842,
-0.2202250808,
0.1094307005,
-0.050410483,
0.0339514278,
-0.4868870378,
0.1971948147,
0.1035983413,
0.3923439682,
0.0333320498,
-0.3985877037,
-0.2281470895,
0.2114375532,
-0.0236335471,
-0.058128003,
0.4313164055,
0.2363341749,
-0.2228948623,
-0.2575087249,
-0.1625896841,
-0.2158328593,
-0.3757218719,
-0.2422762364,
0.4703896046,
0.1956527084,
-0.1677267402,
0.1122746468,
0.0742419809,
-0.1150669307,
0.0617527477,
0.3946146071,
-0.0748203844,
-0.1125268564,
0.2280464023,
-0.0367226973,
-0.3630045056,
-0.1009184942,
0.147413224,
0.2012514174,
-0.014040038,
-0.5118098259,
0.2428095192,
-0.3641563952,
-0.100324437,
0.6593742371,
0.0223974921,
-0.0343958028,
-0.1571909189,
0.0668359846,
0.1328685135,
-0.1298776418,
-0.1844611615,
-0.4084613025,
-0.1652339697,
-0.1120059565,
0.0725028291,
0.0194829144,
0.0134644173,
-0.1131597906,
0.1517072022,
0.227748245,
-0.1084790751,
-0.029286854,
-0.1077154204,
-0.1577302217,
0.2575595081,
0.077276513,
0.0432773754,
-0.0455065817,
-0.0621430762,
-0.0667329505,
0.0941628665,
-0.1415489018,
-0.0810552686,
-0.2618049681,
0.3792397678,
-0.3635043502,
0.2026860416,
-0.2679691315,
-0.276374042,
0.0226156041,
-0.5987127423,
0.4693307579,
0.0762631446,
-0.2173782736,
0.1839210391,
-0.0067560226,
0.4335823953,
0.1400044858,
0.1324245036,
0.1296620369,
0.0034156516,
0.2564791143,
-0.0129539371,
0.0517179146,
0.0345515758,
-0.0483001545,
-0.3150787652,
0.1414651275,
0.2187712193,
-0.2970019579,
-0.0528166108,
0.0064468067,
0.2238235474,
0.1665392518,
0.0170900263,
-0.0132076684,
-0.3755170107,
0.4678090215,
0.1800199449,
0.8736051321,
0.2860050201,
-0.0812123045,
-0.2098024637,
0.3937196434,
-0.1191531718,
-0.1728305668,
-0.1444350779,
0.1783285439,
0.4140583873,
-0.059188474,
0.2585325241,
-0.0206660181,
-0.1965888143,
-0.1870830953,
-0.3010658026,
0.140565455,
0.1782160848,
-0.3403764963,
-0.0610637888,
-0.1732199639,
-0.4480157495,
-0.0855617374,
0.5458109975,
-0.1134901941,
0.1407276392,
0.1678897291,
-0.163472414,
0.2742596865,
0.1547587216,
-0.1610349417,
0.5066567659,
0.0889241397,
0.4276525378,
0.1344051957,
-0.007240165,
-0.1800986677,
0.2707960606,
0.1540864408,
0.0585373603,
0.1390318722,
0.1704629362,
0.0915149748,
-0.2852137685,
0.0512630045,
-0.384313345,
-0.2931555808,
-0.0383237712,
-0.1311170906,
0.1286752075,
-0.4033596218,
-0.2206861675,
-0.1276964396,
0.1210236251,
-0.0528595075,
0.282781601,
-0.06953495,
-0.2162184864,
-0.2116765231,
0.2628985345,
0.5175612569,
-0.0787358359,
0.5037270188,
-0.4499670863,
-0.0716034845,
-0.2682846189,
0.1174157858,
-0.4420119524,
-0.3176289201,
0.3655712605,
-0.2907850444,
-0.0914600715,
-0.0759958625,
-0.1990362108,
0.3708019257,
0.0023100562,
-0.313631475,
0.1398542523,
0.0063222088,
0.0689286813,
0.0739047229,
0.1504745483,
-0.6341791153,
-0.0714749619,
-0.2168477774,
-0.0190157369,
0.1884605736,
-0.483835578,
-0.0596144125,
-0.3014621437,
-0.2533228099,
0.5574226975,
-0.0429195277,
0.0389953703,
0.8306109309,
-0.5347172618,
0.0162804723,
0.0899462774,
0.270884037,
0.0525012091,
-0.0101969689,
-0.0211199112,
-0.1664484441,
-0.0324040726,
-0.1454052031,
0.5164798498,
-0.0634632409,
0.0934327841,
-0.237523973,
-0.3187120855,
0.0204696301,
-0.0377337374,
-0.1212204322,
0.0364745483,
0.6025368571,
0.0533908047,
-0.172406286,
-0.0387756452,
-0.141135484,
0.1813827902,
0.1829166859,
0.2384240925,
-0.0252662301,
0.1747945845,
0.1527780592,
0.2597798109,
0.172674343,
-0.5284252763,
0.0049806545,
0.0444115326,
-0.1989772916,
0.1114134938,
-0.0615122579,
-0.2533991337,
0.0268972665,
-0.0674715936,
0.0926113129,
0.1822878569,
-0.447348088,
-0.2816171646,
-0.0643137693,
-0.4277186096,
-0.2260355651,
-0.2386198044,
0.3652971089,
0.0498349294,
-0.3288975656,
0.0844353288,
0.1946459711,
0.0669981912,
0.5939670205,
0.1519529223,
0.1812236458,
-0.1348910034,
-0.1274598539,
-0.0367072001,
-0.4204013348,
0.1611360162,
-0.3509566784,
-0.2312133014,
-0.3339870572,
0.0014868379,
-0.0494287126,
0.1004783586,
0.4226031005,
0.1340401322,
-0.010437808,
0.0897463933,
-0.3559640646,
0.1411967725,
0.0403475761,
-0.2209931463,
-0.1935635805,
0.7315772176,
0.3855084777,
-0.4366106093,
-0.2343101948,
0.3028858304,
-0.105660364,
-0.0878251344,
0.0988221318,
-0.0412240066,
-0.1869121492,
0.1169940308,
-0.0313214324,
0.2398987561,
-0.0064870007,
-0.173032552,
-0.2637084424,
0.1085904837,
-0.1694782078,
0.0811258852,
0.022601977,
0.22443977,
-0.1065654606,
-0.1305894554,
0.1412334442,
0.5329355001,
-0.2432241738,
0.1484336108,
0.6979493499,
-0.0205303393,
0.0702241957,
0.1610844582,
0.0437212437,
0.2752021253,
0.0382404365,
-0.0344762653,
-0.2715019584,
0.3770997226,
-0.077686511,
0.2162352949,
0.0598706678,
-0.0110793188,
-0.1531208158,
0.5143988132,
0.4952766895,
0.2290318608,
-0.3437063396,
0.5232906938,
0.2530077696,
-0.5994129181,
-0.0423604846,
0.0932855755,
1.2044780254,
0.0724360496,
0.223526895,
0.0314203016,
-0.3536102772,
0.4067273736,
0.1242624223,
0.0078919157,
-0.0750906169,
-0.2230891883,
-0.0305301547,
0.0422625691,
0.0691005513,
-0.1389257014,
-0.0713881105,
0.1323724389,
0.4221555293,
-0.0152451517,
0.083733663,
0.402140826,
0.3814328313,
-0.205150038,
-0.0883510783,
-0.0082328953,
-0.0135498587,
0.4488618076,
-0.0580670759,
-0.323690027,
0.0099245831,
0.0581383407,
-0.425767988,
0.046080105,
-0.221944958,
0.1018628329,
0.1866087914,
-0.421505034,
-0.1442056447,
-0.0665628314,
0.3502729535,
0.1162474602,
-0.228877902,
0.2055515498,
-0.6553249359,
0.1337072551,
-0.1111474633,
-0.0223607235,
0.3049786687,
-0.1374573261,
-0.2320298553,
0.2556150258,
0.2460424453,
-0.0239813328,
-0.3673837781,
-0.3370626569,
-0.178654775,
0.0387846455,
0.2585058808,
0.0523236692,
-0.3759313226,
0.0676310509,
0.033230789,
0.4689508379,
-0.2207185924,
0.1279876232,
0.0771206319,
-0.1748057902,
-0.1103820875,
0.1873653829,
0.3356001377,
-0.0485888273,
-0.0124247354,
0.1048638672,
0.0102065504,
-0.0349712744,
-0.518281579,
0.0962410867,
-0.4879130721,
0.0929767787,
0.1731508374,
-0.0834302008,
0.0521248952,
0.4990671575,
0.1579140425,
0.3171497583,
-0.2819815874,
-0.0256076679,
-0.2516599894,
0.2031753659,
-0.0348428115,
0.5519407988,
0.3784833252,
0.2552001178,
0.2363878936,
-0.0135563603,
-0.2735292614,
-0.2293471992,
-0.1390468776,
0.1046971977,
0.3563312292,
-0.1656012982,
-0.1046917886,
-0.0334441476,
-0.0603809282,
0.4253436625,
-0.0404493138,
-0.0159087889,
0.1120930836,
0.1498154253,
0.1353458464,
0.0684857517,
-0.1953893006,
-0.0157235973,
0.204560712,
0.0757183582,
0.1717638671,
-0.2325241864,
0.2176930308,
0.574739933,
0.391425699,
0.245803535,
0.2725378573,
0.1071841642,
0.3449462652,
-0.0029917397,
-0.1375881732,
0.1985435039,
-0.0066129193,
-0.1798164397,
-0.2169684172,
0.3240686357,
0.053320013,
-0.0288354866,
0.2950300574,
0.3801260293,
-0.4418632388,
-0.0599840321,
0.0650191903,
-0.406001538,
0.0577242896,
-0.2160562277,
-0.2143874615,
0.0848919302,
-0.0300174877,
-0.0424118564,
0.1603683829,
0.0849682763,
0.1243041605,
0.1374168843,
0.153450951,
0.0862915665,
0.226229012,
-0.1230446249,
0.2260156274,
-0.0153783821,
0.0753921419,
-0.5670803189,
-0.1740175188,
-0.0271149352,
-0.0003517754,
-0.1932017356,
0.2002459764,
-0.1940698028,
0.0959670693,
0.1983017921,
-0.1597931087,
0.0894910619,
-0.1692632139,
0.4100297093,
-0.1874141246,
-0.0285620242,
0.0504291058,
0.4167962074,
0.4355940223,
-0.3474954367,
0.0660832524,
-0.1334556341,
-0.0092367381,
0.4053117931,
-0.0700922757,
-0.0862435624,
-0.2403076291,
-0.1606181413,
0.14115417,
-0.0841543302,
-0.0286075175,
0.0938245803,
0.1536004841,
-0.2205556482,
0.1354840696,
0.5547668338,
-0.2569060922,
0.4653140903,
0.5305712819,
-0.1931666732,
-0.1419740915,
0.4079793394,
0.188565433,
-0.5202427506,
0.6899911165,
0.0674934313,
-0.1904235929,
-0.2995374203,
0.4237953126,
0.1942039728,
0.021233581,
0.0459431112,
0.055072844,
0.0988915563,
-0.0965901166,
0.0894845128,
0.0906345248,
-0.0860466063,
-0.0521746315,
-0.1964579225,
0.1391914636,
-0.7284786105,
0.1248766109,
-0.2312434167,
-0.3695224226,
-0.3456450403,
0.0206569843,
-0.1900029927,
-0.1387184262,
-0.0223028641,
0.0365553387,
0.0158293284,
-0.2200502306,
0.0230329223,
-0.0675523877,
0.2398564368,
0.1897878945,
0.4737428725,
-0.0260193199,
-0.3410232067,
0.1662020832,
0.0969292969,
0.3595589995,
-0.0218516216,
0.0608390123,
0.0311374441,
0.3090900481,
0.202823773,
0.1055343598,
0.6015225649,
-0.0134015121,
-0.0921444595,
-0.3707889318,
0.3012417555,
-0.195647493,
-0.1594758034,
0.1906780154,
0.1231780201,
0.1067442298,
-0.1550706923,
0.0696810409,
-0.2585227489,
0.1412055045,
-0.0900474638,
0.5153778791,
0.2933413386,
0.2858648598,
-0.0991799384,
-0.1435770392,
-0.3841884434,
0.430468142,
-0.0727622509,
-0.1152708381,
-0.1751077622,
-0.0556304641,
0.2661166191,
0.1156070456,
-0.0146459742,
-0.0104155466,
0.0005028509,
0.0609776527,
-0.1666044295,
0.1279956102,
-0.0895330608,
-0.0738782957,
-0.4382948279,
0.0800396055,
0.3747511506,
-0.0401324183,
-0.124553591,
-0.2125291228,
-0.4079284966,
0.3229066432,
0.0529317968,
-0.100544706,
-0.0648526922,
0.177710712,
0.0544745214,
0.2989238203,
-0.5815800428,
-0.1861034781,
0.1627863646,
-0.1288930923,
-0.0801475868,
0.2587031424,
0.2808334231,
-0.3622456789,
0.0584176481,
0.2710864842,
0.3739873767,
-0.088183865,
0.0602199063,
-0.26858899
] |
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.208497256,
-0.1142903641,
0.0484716594,
0.4346455634,
0.1993301511,
0.1706530154,
-0.1373959631,
0.2591968477,
-0.1694812626,
0.0429845713,
0.0269324332,
0.21090886,
0.0059094764,
-0.2283868045,
-0.1217164844,
0.1358806193,
0.2059148848,
0.0483620875,
-0.293278873,
-0.0278222263,
-0.2548552155,
0.2438369095,
-0.3456242383,
-0.3321818411,
-0.3617052734,
0.2683998942,
-0.2888361216,
0.4278265536,
0.0539540648,
0.0645483881,
0.3253511488,
-0.0345087275,
0.0323291235,
0.4721654356,
-0.0001129602,
-0.0248595327,
0.1940785944,
-0.1648727059,
-0.3701838553,
0.0790074542,
-0.2577258646,
-0.4280105233,
-0.1000077128,
0.0440546423,
0.419039011,
0.033717934,
-0.1139070466,
-0.7214252353,
0.031101577,
0.1015500724,
0.2013145983,
0.0450459421,
0.3114582598,
-0.1664171666,
-0.0396207795,
0.0367015637,
-0.1191300079,
0.3378040791,
0.1667078882,
-0.2502476275,
0.0814066976,
0.03722452,
-0.2164466679,
-0.192528367,
0.0617965311,
0.2860532105,
-0.2610839009,
-0.4039141238,
0.0245435759,
0.0290221591,
0.2679311037,
-0.4100949168,
-0.0420929827,
-0.4409760237,
0.0366232134,
-0.1752432883,
0.2727945447,
0.4027750492,
-0.2462695986,
0.2937925458,
-0.089459911,
0.0641689301,
0.0416414589,
0.0172058064,
-0.2132969052,
0.1253424436,
-0.0891544521,
0.08147569,
0.4102661312,
-0.0002171434,
0.292098701,
-0.316837281,
-0.3524681032,
0.0377516225,
-0.5595110059,
-0.0498273373,
0.0755837858,
-0.4589990079,
0.2216622084,
0.1062298417,
0.1199402958,
0.0183506012,
0.2121270895,
-0.018755611,
0.3851089478,
0.2461848557,
-0.0689737201,
0.4001850486,
0.0538029261,
-0.1622482389,
0.3026244044,
0.0824344456,
-0.0298581198,
-0.2151601613,
0.21674034,
-0.2746641338,
0.2562696934,
-0.0793106332,
-0.491881609,
0.2032413781,
-0.1662214994,
0.1221665889,
-0.0328875445,
0.1849792004,
0.031382516,
0.5110006332,
0.1733137369,
0.1208143383,
-0.0608103648,
0.1380165815,
-0.1753143668,
-0.1013805047,
-0.2131147683,
0.3016287386,
0.2818208933,
-0.0465137437,
0.0303949341,
0.2547304332,
0.1015235931,
-0.2291040868,
0.0861582085,
-0.3414564729,
0.0732797384,
0.1529538631,
0.0300753638,
0.3761547804,
0.1255547404,
-0.0855324119,
-0.0447998419,
0.3257977366,
-0.3125361204,
-0.1928355694,
-0.290473938,
0.1899367273,
0.0848515034,
0.117109865,
-0.2278673351,
0.2889300883,
0.3921439946,
0.2276149094,
-0.0246091075,
-0.0160903204,
0.1302625388,
-0.3428186476,
0.3278462291,
0.4563959837,
-0.1643467247,
0.2442181706,
0.1593948752,
0.2009993047,
0.5149563551,
0.3146010041,
-0.0787219182,
0.0898944288,
-0.4410283566,
-0.0834654421,
0.1891031116,
-0.1437193304,
-0.2636672556,
0.2389309257,
-0.2507338524,
0.3553434908,
-0.0772487521,
0.1755166054,
-0.0911853984,
0.1544355899,
0.713059783,
0.4093848467,
0.0317518935,
0.1562932432,
-0.3548539877,
-0.0897671878,
0.1346036792,
-0.0315747745,
-0.0920925438,
0.2037223727,
-0.032673765,
0.1011365205,
0.4664763808,
-0.107711032,
0.1537833959,
0.4310879111,
0.0536219887,
-0.0714830533,
-0.2064581066,
0.0748018399,
-0.5007078052,
0.0443880334,
0.0569926873,
-0.2531939745,
-0.0204964466,
-0.0257828943,
-0.0208260305,
-0.0269897655,
0.0041292682,
0.0003337255,
0.0507820621,
0.2245368958,
-0.1111167073,
-0.0524474382,
-0.0241559818,
0.8368055224,
-0.1254527271,
0.0507053807,
-0.4194498062,
0.1712568849,
-0.0288675111,
-0.230003804,
-0.0660290495,
0.052321665,
0.1158134192,
0.0188082531,
-0.1096440405,
0.5126366019,
-0.1974746883,
-0.0526323803,
-0.2070368528,
-0.255223155,
0.0165734831,
-0.0363014936,
0.0188741256,
-0.2550829053,
0.098157011,
-0.1478390098,
-0.0155782141,
0.3320587277,
-0.0144177973,
0.0340215117,
0.0131642669,
-0.0984582156,
-0.0694325715,
-0.199783653,
0.1187122464,
-0.1878786087,
0.1486688852,
0.2488638163,
0.2260710746,
0.2236914635,
-0.484082967,
-0.0810609758,
0.2194008529,
0.0873405486,
0.2150365263,
0.1140582412,
-0.3331509233,
-0.1729367971,
-0.0043811984,
0.1619128287,
0.7703347206,
0.1586799175,
0.2190236151,
0.0276027601,
-0.067048043,
-0.2215753645,
0.2817302346,
-0.0253937393,
0.0702337176,
0.2413839251,
0.2463649511,
-0.0040908828,
-0.2063645571,
0.1619839072,
0.1250703335,
0.0066982005,
-0.2925807238,
0.1093799993,
-0.209811464,
0.0715501159,
-0.3482339978,
-0.3516214788,
-0.0114575531,
-0.4532115757,
-0.3251946867,
0.3953498304,
-0.0905610248,
-0.1436626315,
0.055875428,
0.2527941465,
-0.0280834846,
0.0283190068,
0.0868097991,
0.2992717922,
-0.3061574101,
0.0406388044,
0.0782497972,
-0.2633136809,
0.0490672961,
0.1617474556,
-0.1413247734,
0.0032181945,
-0.0775125325,
-0.0589705259,
-0.0648289323,
0.0027316939,
-0.1926747859,
0.1106750816,
0.0238210931,
-0.3615092039,
0.0093957596,
0.4291677475,
0.0770543441,
0.4083510935,
0.2699894011,
-0.1056147814,
-0.3779594898,
-0.1318798661,
-0.310464114,
-0.3968414962,
0.0882831439,
-0.04851849,
0.0247032195,
0.3051521778,
0.1884798408,
-0.0642442852,
0.0278733373,
0.0880291238,
-0.1925896555,
-0.2163113356,
0.418618083,
-0.0596593544,
-0.2062428445,
-0.1150500104,
0.1457553655,
-0.2462956309,
0.2110214233,
-0.4671840072,
0.119166255,
-0.5144691467,
0.0361624733,
-0.2598981857,
0.0987707973,
0.0204597283,
0.0733609274,
-0.0751941353,
-0.0873618275,
-0.0732142478,
-0.1453308165,
-0.029052224,
0.3612682819,
-0.2521464229,
-0.0733989999,
0.2915201783,
-0.0696367919,
0.4133877158,
0.0289637335,
0.3018461168,
0.1516515464,
0.5536731482,
-0.2386163771,
-0.4298309386,
-0.1228620857,
-0.1587635428,
-0.0061717182,
-0.1209722534,
-0.0357559323,
-0.1237008572,
-0.1062173545,
0.2274901569,
0.1769467443,
-0.1957770586,
0.24411726,
-0.2653464079,
-0.0477352478,
-0.0598615073,
0.0071459487,
-0.0704567432,
-0.0330449007,
-0.1874566674,
0.0097139813,
0.0092435852,
-0.1222306937,
-0.2583732605,
0.048111286,
-0.6078561544,
0.0813035816,
-0.1773091257,
0.5477056503,
0.1794639081,
-0.3359863758,
-0.0903054401,
0.0117471144,
0.712983489,
0.3859624565,
-0.4184197187,
0.2137076259,
0.1342880875,
-0.508459866,
-0.1242009848,
-0.1015695333,
0.242720142,
0.1661405563,
0.2337722033,
-0.1978383362,
0.0345436372,
0.1394105405,
0.3654302061,
-0.1443137527,
-0.01902356,
-0.2345575541,
-0.2062201947,
-0.1828332692,
-0.2722641826,
0.1025900915,
0.3259936273,
-0.2024846971,
-0.3330008686,
-0.0266627483,
-0.1827155948,
0.2898464501,
-0.1630957127,
0.4102863669,
-0.0018577091,
0.3690980375,
-0.2302060574,
0.2487224489,
0.3287045956,
0.544467032,
0.1445557475,
-0.1886041611,
0.2795900404,
0.0070744716,
0.3126007915,
0.2015109956,
-0.1283902377,
0.0842768848,
-0.2613304257,
0.180906564,
-0.5846993327,
0.1711180955,
0.0644455403,
0.0806887299,
-0.6066935062,
-0.1957485974,
0.2711178958,
0.1606956422,
-0.013171725,
0.5433197021,
-0.4463487267,
-0.4786522985,
0.1642615348,
-0.1519676447,
0.8347204328,
0.0207110234,
0.256837517,
0.0044032857,
-0.059723299,
0.2216633856,
0.0106039196,
0.2319182754,
-0.1823973954,
-0.2544631958,
0.1474298686,
-0.2599657178,
0.083635956,
-0.271831274,
-0.4256107807,
0.1060700491,
-0.3712704182,
-0.0229354985,
-0.2223652303,
0.0113986209,
-0.2986969054,
-0.3575040102,
-0.0757505745,
0.1579179466,
0.2478518039,
-0.0842900425,
0.0014609173,
-0.0135904588,
-0.1467342973,
-0.130782038,
-0.3107578158,
0.3131838441,
-0.1598423272,
0.4684117734,
-0.2722896338,
-0.182964325,
-0.1438465118,
0.132018894,
0.2478928566,
0.340720892,
0.0169647168,
-0.0956034511,
-0.1326026618,
0.2782520056,
0.0808185637,
-0.2257165015,
0.0548751503,
0.3345300257,
-0.1280460954,
0.1026323885,
-0.0138708241,
-0.2697596252,
-0.2939836979,
0.2856153846,
0.0197919309,
-0.2719837427,
-0.1172967255,
0.275182724,
0.210570097,
-0.1763991266,
0.1346273571,
0.2218140662,
-0.1078089178,
0.2202521563,
-0.4233261347,
-0.3826936483,
-0.1413324177,
0.332201153,
0.2150722295,
-0.0476865284,
0.2619223297,
0.0064736307,
0.0373305455,
-0.1044235304,
0.2194758207,
0.0214491859,
-0.1695191562,
0.2213663012,
-0.1948364675,
-0.0924791023,
0.0339001231,
0.206398204,
0.119602859,
-0.0841680914,
-0.0830371231,
-0.1579920501,
-0.4656387269,
0.0776984543,
0.0747642964,
0.3520535529,
-0.0351994559,
0.0434462689,
-0.1197490096,
0.1185340136,
-0.2961997986,
-0.031785138,
-0.2356136739,
0.1773301065,
-0.1427199841,
0.0333634615,
-0.0078616999,
-0.0961167067,
0.1403389573,
0.2220599949,
0.0875293985,
-0.2014868557,
0.0818397403,
0.0819425583,
0.0577593707,
-0.1826284826,
-0.2424245775,
-0.4744132459,
0.076153025,
-0.3522908986,
0.2711901963,
0.284157753,
-0.0429668725,
-0.0853776187,
0.0960474685,
0.0166844726,
0.0894246101,
0.0766521916,
-0.0908354521,
0.0558215529,
-0.0828099251,
0.2883353531,
-0.0166555308,
-0.00944563,
-0.5261991024,
0.13556844,
0.0457161888,
0.0580820069,
0.0829281285,
-0.2150712013,
-0.2936802506,
-0.0760250241,
0.0833572149,
0.4004904032,
-0.1983559728,
-0.0106342919,
-0.0482329614,
0.1880170554,
0.2002943158,
-0.3394597769,
-0.1354783773,
-0.0541341491,
-0.0755009502,
0.1981996894,
0.1597377807,
-0.3077151179,
-0.2801882327,
-0.0657668412,
0.5569904447,
0.2812488973,
0.3075850606,
0.2442365587,
0.2052913606,
0.1028156355,
0.1233466715,
0.0502334498,
0.2296519428,
0.3803375363,
-0.0192460194,
0.2851465344,
0.1478357613,
-0.0647624731,
-0.1967906952,
-0.4574257731,
0.2853146195,
0.4371396899,
-0.244053632,
0.3275416791,
0.0515152514,
-0.0573757589,
-0.4356240928,
-0.2360715717,
-0.0457511991,
0.1197237968,
-0.3212193549,
-0.0957368016,
0.2676943541,
-0.0858539715,
0.0629817694,
0.1351405233,
0.1661014259,
-0.3355976641,
0.4730650783,
0.0138576664,
-0.2500504255,
-0.1553127319,
0.2223837376,
0.5034974813,
0.0119021572,
-0.3562343121,
0.0451846644,
0.1132242531,
-0.0502088703,
-0.0544720143,
0.4576026797,
0.525603056,
0.5564419627,
0.2286737561,
0.2088663578,
0.3797375858,
-0.0563464127,
-0.301923722,
0.2601630092,
-0.0157609843,
-0.0937588215,
0.0445710421,
0.1994583309,
-0.1327548623,
0.0180626251,
0.4137894809,
0.16920349,
-0.375502497,
0.0050655454,
-0.0561922789,
-0.2994549274,
0.0719395131,
0.1382434368,
-0.2935512364,
0.019972302,
0.4786640704,
-0.1998846829,
0.1544064134,
0.0871198252,
0.0902590379,
0.3071343303,
0.3065688908,
0.2413417548,
-0.072860539,
-0.3713640571,
-0.3787606955,
-0.2045228183,
0.2920804024,
0.013159791,
0.2769448757,
-0.0518891662,
0.3205879331,
0.0929842293,
-0.0158900768,
-0.1567932665,
0.2470314354,
-0.1267682314,
0.0205863807,
-0.5303440094,
-0.1706694663,
0.2856863141,
-0.0350448638,
-0.0198061429,
-0.4125314355,
0.4139530659,
0.0030132011,
0.0885184705,
-0.1432078928,
0.2161065936,
0.1710319817,
0.2663676739,
0.4304056764,
0.2482925504,
0.1741648763,
-0.1628274024,
-0.3097066581,
-0.2974678874,
-0.3777625859,
0.0783982128,
-0.1954628527,
0.0234469324,
0.0784440637,
-0.378097415,
0.0148941334,
-0.1069141924,
0.0385916084,
0.20030424,
0.1180156097,
-0.1220132411,
0.0405566543,
0.0305428654,
0.1406042576,
0.1762434244,
0.387368679,
-0.0808450878,
0.3279302418,
-0.076997757,
-0.2976799607,
-0.0052271485,
0.0882840753,
-0.2614134848,
-0.200334996,
0.2056046426,
-0.0715870261,
0.1235281825,
-0.5712339878,
-0.1176658273,
0.3252484202,
-0.1334315389,
-0.4380506873,
0.4799675345,
-0.1831928939,
-0.0903029144,
-0.0132819042,
0.4617714584,
0.0376565978,
-0.4231993258,
0.3124880493,
-0.1770282388
] |
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.1655789018,
0.0086440742,
0.0250856169,
0.3855165243,
0.2144167125,
0.132960692,
0.0000967896,
0.2391078323,
-0.2387408167,
0.043520499,
0.1007448509,
0.1849095821,
0.1349060833,
-0.1963896155,
-0.1764699817,
0.2529345155,
0.2075012028,
0.1770741045,
-0.3354966044,
-0.0526400581,
-0.262876153,
0.2321233153,
-0.3049419522,
-0.4224449694,
-0.4580215812,
0.2613820732,
-0.356516093,
0.3417984545,
0.0743393674,
-0.0279051848,
0.3124288321,
0.0880530402,
0.0267185792,
0.4711243212,
-0.0001092321,
-0.0790267661,
0.2231827378,
-0.1731622517,
-0.3741955757,
-0.0006444901,
-0.2066478729,
-0.4626249969,
0.0248351619,
-0.04484348,
0.3222418129,
0.0223690309,
-0.1336589307,
-0.5861006379,
0.0342042223,
-0.0428406969,
0.266333282,
-0.0470444262,
0.1371284127,
-0.0761274472,
-0.0676252693,
0.1555086374,
-0.0315028355,
0.1939265132,
0.0748436004,
-0.0581820607,
0.1401503682,
0.1468089819,
-0.2224320173,
-0.0578749329,
0.0761221573,
0.3823085427,
-0.1556167006,
-0.3912760019,
0.1003554612,
0.0139221791,
0.3194789886,
-0.3667294383,
-0.1034777313,
-0.3596836627,
0.0806933865,
-0.1792729199,
0.2723420262,
0.4094533324,
-0.1917518079,
0.182149902,
-0.095539391,
0.0062457994,
-0.0361385718,
-0.0321249664,
-0.1807834953,
0.1143901199,
-0.1381176561,
0.0591761246,
0.2896772325,
0.0071409699,
0.2253640145,
-0.4683858454,
-0.2991126776,
0.1013633981,
-0.478536129,
-0.0062480941,
-0.0034642182,
-0.3938519061,
0.1206181645,
0.1632407159,
0.0700612366,
0.0221849978,
0.2331522703,
0.023427913,
0.3330493271,
0.1919009984,
-0.0601133481,
0.353369385,
0.1467999816,
-0.1694046855,
0.1771907955,
0.0226119272,
-0.1276814938,
-0.2536399066,
0.2378405631,
-0.2868469357,
0.2203754485,
-0.1418629885,
-0.497676909,
0.124011904,
-0.1110915989,
0.0674399957,
-0.0226401724,
0.2313438356,
-0.0302148443,
0.4687633216,
0.2255091071,
0.2407607287,
-0.0569588989,
0.193604663,
-0.1889928728,
-0.1315045357,
-0.1324184835,
0.2119249701,
0.2942712009,
-0.2170791924,
-0.0015046522,
0.3486466706,
0.0658851042,
-0.1580255628,
0.0930391401,
-0.3391187489,
0.191235438,
0.1524961889,
0.1535513401,
0.3738385439,
0.0881199986,
-0.1477621347,
-0.0577588975,
0.4209816456,
-0.2102910131,
-0.1051316112,
-0.2599581182,
0.2226826698,
0.0764070451,
0.1525426358,
-0.1444149166,
0.2782828808,
0.3907814622,
0.2938725948,
-0.1349302679,
0.0010444559,
-0.0442564674,
-0.4204100966,
0.4669270813,
0.4033463001,
-0.1331068873,
0.223131597,
0.09506464,
0.2323825806,
0.504742384,
0.3542570174,
-0.0591240004,
0.0130129084,
-0.3014684021,
0.0535795093,
0.165954411,
-0.1710006297,
-0.1954695731,
0.2662728727,
-0.2416404784,
0.3232172728,
-0.022368215,
0.1308974624,
-0.0406766757,
0.1153153926,
0.5678358078,
0.428085953,
0.1203773916,
0.1059349552,
-0.3661511838,
-0.1243510246,
0.143098712,
-0.1485829949,
-0.2223391533,
0.236729905,
-0.0745880976,
-0.1166885868,
0.4902274013,
-0.1383096576,
0.2293734848,
0.3590707779,
0.2224218547,
-0.0895939395,
-0.2062207907,
0.189864397,
-0.4102154076,
0.0116716921,
0.1662635952,
-0.2398367971,
-0.0783681571,
-0.0948772728,
0.096828334,
0.0360406339,
-0.028846886,
-0.0119436104,
0.078914769,
0.2847229838,
-0.022263512,
-0.0659038946,
0.036866501,
0.8320490122,
-0.0992907137,
-0.037310183,
-0.2667586207,
0.1807724237,
-0.0037858244,
-0.297531426,
-0.023478359,
0.1025626212,
0.238166675,
0.0583729111,
-0.0710332543,
0.4748393893,
-0.2936933935,
-0.0626464188,
-0.1457628906,
-0.2413438708,
-0.0273025408,
0.0979814678,
0.0734951198,
-0.1472254992,
0.1992409229,
-0.1914405227,
0.0033333702,
0.3507956266,
0.1001459509,
0.1305983216,
0.0190080255,
-0.1095674336,
0.0522731617,
-0.1929918528,
0.1165607795,
-0.2192909867,
0.1902210712,
0.2370197624,
0.1897491813,
0.2867829204,
-0.473908782,
0.0853216872,
0.2243830115,
0.0859738812,
0.1345878839,
0.1528248638,
-0.3762894869,
-0.1647812426,
-0.1182957962,
0.2007666528,
0.7927385569,
0.1822928935,
0.1886886209,
-0.0461794622,
-0.0195287447,
-0.2375983298,
0.330181241,
-0.0596760884,
0.0493186042,
0.2444159985,
0.2638576627,
-0.0619978569,
-0.1087930053,
0.2657488286,
0.0917521715,
-0.0722231343,
-0.2444092184,
0.0349159092,
-0.2231037617,
0.1363503039,
-0.3180534542,
-0.2835677266,
-0.0104355533,
-0.3355412483,
-0.3896483779,
0.4484144747,
-0.0530083291,
-0.1751146019,
0.0252495557,
0.2732765377,
-0.0759382993,
0.0165622663,
-0.0371093825,
0.2551339567,
-0.4038929343,
0.0515387654,
0.0634796768,
-0.2436133325,
0.0719501302,
0.1281694472,
-0.034850806,
-0.0180503298,
-0.0568419546,
-0.137033388,
-0.081414476,
0.102767162,
-0.2358751893,
0.1462713778,
0.0238741562,
-0.3808458745,
0.05964211,
0.3619406521,
0.0492811576,
0.3570199013,
0.3117460012,
-0.2407875955,
-0.3567047715,
-0.1098103151,
-0.3115663528,
-0.3086030185,
0.0800432414,
0.0158421695,
0.1094315797,
0.1882319152,
0.0879656374,
-0.1080849692,
0.111980781,
0.1333829314,
-0.2219353616,
-0.2804145515,
0.5735883117,
-0.1309703588,
-0.3618884385,
-0.0370362401,
0.0512447655,
-0.1881376803,
0.1929488033,
-0.5059257746,
0.1453741789,
-0.4991857708,
0.0533201098,
-0.2712646723,
0.1151777804,
-0.0531396233,
0.1162870079,
-0.1049733162,
-0.1924839616,
-0.1470503658,
0.0249404609,
0.0444606543,
0.2594724894,
-0.2077742219,
-0.1047966778,
0.1587516218,
-0.1050416827,
0.5049680471,
-0.050889425,
0.3199083507,
0.2215719372,
0.4598448873,
-0.2015453875,
-0.4354870915,
-0.1995422244,
-0.2189508677,
0.0760168284,
0.0926738456,
0.0842146128,
-0.1030301601,
-0.0882743895,
0.1886630505,
0.1009896398,
-0.2592321634,
0.1957738847,
-0.1638154835,
0.0225303881,
-0.0280095227,
-0.0647338629,
-0.1412207633,
-0.08148247,
-0.2522289753,
0.0069882572,
0.0326023847,
-0.0900958851,
-0.2615719736,
0.0022697672,
-0.6186499,
0.151533097,
-0.0837037265,
0.4394445121,
0.1057547927,
-0.3408280611,
0.0717102885,
-0.0512027107,
0.7416380048,
0.306371659,
-0.4622935653,
0.2142735273,
0.1128516346,
-0.4659019113,
-0.090079695,
-0.0442952141,
0.1861100495,
0.1753769368,
0.1690665036,
-0.2508673966,
-0.0587701276,
0.0620602071,
0.3879022002,
-0.1628972143,
-0.0929847509,
-0.3386982083,
-0.2011762261,
-0.1498248577,
-0.3379558027,
0.0504354537,
0.4113535583,
-0.2342182398,
-0.2840873003,
-0.0269441269,
-0.1616677642,
0.2719670534,
-0.2362778634,
0.5309254527,
0.0917567536,
0.403606534,
-0.0857968926,
0.2549724877,
0.2840245664,
0.5802755356,
0.0843177736,
-0.0551952384,
0.2512031794,
-0.2015674859,
0.3931275606,
0.2361781895,
-0.1646122932,
0.2078149319,
-0.3127160072,
0.1511194259,
-0.6362518668,
0.1367298067,
0.1120365337,
0.1204807758,
-0.6141214371,
-0.2566089034,
0.2589707971,
0.0819212645,
-0.0361667797,
0.5582146645,
-0.5020985603,
-0.3950895071,
0.0777552351,
-0.1777589619,
0.848144412,
0.0699068159,
0.2565592229,
0.0027996264,
-0.2009336501,
0.1584959626,
0.1039955094,
0.2797349691,
-0.1751071513,
-0.181447491,
0.1522356272,
-0.2464659661,
0.0690387338,
-0.1220559627,
-0.4632969499,
0.0091000497,
-0.5243906975,
-0.0217023455,
-0.1231715977,
0.1032257974,
-0.2120979875,
-0.3028659821,
-0.0358664989,
0.2050857544,
0.3308331072,
-0.0084453719,
0.0268152617,
-0.0175382085,
-0.2335457206,
-0.1823989749,
-0.1997534186,
0.3178455234,
-0.174387753,
0.4426389337,
-0.2106556594,
-0.3191384971,
-0.1032406688,
0.0957935303,
0.3153253794,
0.2377961874,
-0.009543567,
-0.0968258679,
-0.0856419429,
0.3278060555,
0.0898514241,
-0.2695420384,
0.0056699961,
0.2372927219,
-0.1189017966,
-0.0290074572,
-0.0130606294,
-0.195152238,
-0.3066831231,
0.2422955334,
0.032661669,
-0.3036011159,
-0.0849660039,
0.3106266558,
0.2804534137,
-0.1517195404,
0.1858511269,
0.2436746359,
-0.1264245361,
0.269448638,
-0.3472908735,
-0.3536491394,
-0.1472582072,
0.3546777666,
0.3105776608,
-0.0207008906,
0.3795064688,
-0.0259321406,
-0.0461531319,
-0.1392716467,
0.1437415034,
-0.0492216796,
-0.1437405944,
0.2533925474,
-0.0723612458,
-0.0245764107,
-0.0736330003,
0.2642334104,
-0.010750466,
-0.0522374585,
-0.0499435663,
-0.2327730358,
-0.3944985271,
-0.0881242454,
0.0223936401,
0.2742870748,
-0.0259233005,
0.0368152708,
-0.0961184129,
0.2236867696,
-0.3511757553,
-0.1262111366,
-0.1875376701,
0.2015402913,
-0.0892663896,
-0.0035377983,
0.1460660696,
0.0338847563,
0.1957266927,
0.170904085,
0.0599290803,
-0.2495285124,
0.0352633968,
0.086439915,
-0.0465428382,
-0.2119363844,
-0.203942135,
-0.3957461715,
0.0185142793,
-0.3560480177,
0.2193856388,
0.2203258425,
-0.052705802,
-0.1323362291,
-0.0683468655,
0.0547502078,
0.0508897901,
0.0306920446,
-0.1557454318,
0.0050944947,
-0.0430692397,
0.1874601245,
-0.0439722016,
-0.0179946572,
-0.4997472167,
0.0306649841,
0.0877425447,
-0.0207829066,
-0.0201892778,
-0.1921586245,
-0.2383554578,
-0.1208875626,
0.131478548,
0.3539879918,
-0.2005268633,
0.0096166059,
-0.0026400499,
0.2471838892,
0.0900183022,
-0.2926792502,
-0.212176621,
-0.143819198,
-0.1670495868,
0.1733812243,
0.1612118185,
-0.2851783037,
-0.2628610432,
-0.0674716979,
0.5141931772,
0.1537665725,
0.2914770842,
0.1864931285,
0.211590603,
0.1594835073,
0.0799724609,
0.1450883746,
0.0747696236,
0.2733057439,
-0.0731558353,
0.2683880329,
0.2369282246,
-0.163863942,
-0.1892026067,
-0.4537917376,
0.2869060636,
0.4056820869,
-0.1335876882,
0.2038644403,
-0.0452831462,
0.0616544373,
-0.3951907456,
-0.2849050164,
-0.1014392599,
0.1666639894,
-0.3034029901,
-0.1454536319,
0.1830056161,
-0.0824942961,
0.0329313204,
0.1180340573,
0.1921323538,
-0.2573125064,
0.4321694374,
0.1411123276,
-0.1275138259,
-0.2316102982,
0.2931309342,
0.3955431879,
0.0570616908,
-0.3257537484,
0.0650610775,
0.0920056105,
0.0739111379,
0.0520133376,
0.3636524677,
0.5503234863,
0.6578986645,
0.2299026549,
0.1052019447,
0.2951347828,
-0.0638791174,
-0.2650011778,
0.2549954057,
-0.0617020316,
-0.0989862382,
0.117521666,
0.2143209279,
-0.1710013747,
0.0013895016,
0.3623442352,
0.1524402946,
-0.3825713396,
0.1151851416,
-0.026154954,
-0.2708130777,
0.0641743541,
0.0036000758,
-0.2895315289,
-0.0531745814,
0.5402072072,
-0.2178837061,
0.1411160231,
0.0234851018,
0.1104840562,
0.1662440002,
0.3059569299,
0.0939163789,
-0.0284782797,
-0.4043637812,
-0.3820247054,
-0.2501633763,
0.2439371645,
0.0739299208,
0.2556682527,
-0.1245226115,
0.3312849998,
-0.0306095518,
-0.097601071,
-0.1264608353,
0.1275254041,
-0.1415268779,
-0.0024956474,
-0.5370714068,
-0.0231019165,
0.208838746,
0.0114367474,
-0.0010786653,
-0.3491339087,
0.3652960956,
-0.1066994295,
0.160867095,
-0.1346102059,
0.2273356915,
0.1830499172,
0.3793091178,
0.4042255878,
0.2506742179,
0.2433476299,
-0.2374551594,
-0.2472521514,
-0.2280049771,
-0.279997021,
-0.0099123232,
-0.1266327053,
0.0126281232,
0.0822142065,
-0.389475137,
0.0802965462,
-0.1074460372,
0.0438101143,
0.1785130799,
0.1614348888,
-0.0175020881,
0.0740024522,
0.0483426228,
0.1693348438,
0.2136317939,
0.2484336793,
-0.0600394309,
0.2875374258,
-0.1768733859,
-0.3218997121,
0.1524878889,
0.0063736364,
-0.2955352068,
-0.1489924788,
0.3120767772,
-0.068046242,
0.1580914855,
-0.6385352612,
-0.1486534774,
0.3362167478,
-0.1242275983,
-0.4552141726,
0.4964092076,
-0.1591982841,
-0.116471,
-0.0237518921,
0.3737538755,
0.0552554838,
-0.4150144458,
0.2294658571,
-0.2355406582
] |
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.1189592555,
0.0833053589,
0.1260728091,
0.3719975352,
0.0171172563,
0.1133870482,
-0.1137913167,
0.3422016799,
-0.3763223588,
-0.0313396454,
-0.0029887445,
0.2833092213,
0.1032995284,
-0.1568284333,
0.0146101341,
0.4244331121,
0.2601237595,
0.1345781982,
-0.4625253379,
-0.1483724862,
-0.3425716758,
-0.00259104,
-0.1786785871,
-0.4195241034,
-0.4456116855,
0.3286663592,
-0.3202903569,
0.2377290279,
-0.0560326874,
0.1286331415,
0.3555447757,
0.1864214391,
-0.0315983258,
0.5348337889,
-0.0001191608,
0.0577580631,
0.2564499378,
-0.1635587513,
-0.4494659305,
0.1362712234,
-0.3920055628,
-0.3536658883,
0.1314738393,
0.0160407126,
0.4164900184,
0.0663912743,
-0.2298908085,
-0.4634820819,
-0.0232500844,
0.0652263612,
0.1593082547,
0.1110115349,
-0.0350351781,
-0.1213510185,
0.0089879893,
0.1179197058,
-0.1411334276,
0.2453011721,
-0.1013236716,
-0.1167630106,
0.0576566905,
0.1684360206,
-0.3590689898,
-0.0874378979,
-0.0095489882,
0.2900183797,
-0.1620874256,
-0.2823731899,
0.2129002362,
0.0464697294,
0.2146039605,
-0.4365735054,
-0.0415482521,
-0.4749779403,
-0.0196936876,
-0.3048730195,
0.0995294079,
0.308213383,
-0.1891004443,
0.1121600643,
-0.1328095645,
0.0581191033,
0.0337474644,
-0.0737374276,
-0.1217983663,
-0.1695669889,
0.0101736076,
0.0271479581,
0.4104746282,
-0.0549750738,
0.4511059225,
-0.3960838914,
-0.2956273556,
0.0855894685,
-0.5441938639,
0.0141931027,
0.1144325435,
-0.2700992525,
0.19560121,
0.2327722758,
0.2149357796,
0.0469081216,
0.1379220784,
-0.0228498392,
0.4365807772,
0.1996462345,
-0.1025638506,
0.5009908676,
0.1304700077,
-0.1632463485,
0.3409539163,
0.1101419777,
-0.1132148206,
-0.0781086013,
0.3009510338,
-0.3656767607,
0.2292410135,
-0.1927220225,
-0.3715543151,
0.139765352,
0.0065255016,
0.0778655857,
-0.0496672317,
0.3585066497,
0.0671441182,
0.2547059357,
0.1538926214,
0.3614988327,
-0.0698515773,
0.1949402392,
-0.2237622738,
-0.1218687147,
-0.1603538692,
0.2349947989,
0.3661680222,
0.0074923262,
-0.0572897345,
0.3013067544,
0.0723041743,
-0.1387106329,
-0.060999617,
-0.3262604475,
0.3241435587,
0.2703716755,
0.0587165877,
0.2103707641,
0.226668179,
-0.1304644197,
-0.1423018575,
0.4503261447,
-0.2546397448,
-0.0735559687,
-0.0693548024,
0.1033571437,
0.0362260938,
0.0443490259,
-0.4758994281,
0.3106040657,
0.4347766638,
0.2327106297,
0.0285809133,
-0.1107445806,
-0.1464838386,
-0.3564537764,
0.4472278059,
0.4729624391,
-0.0541459881,
0.0487056524,
0.0353438221,
0.2649783194,
0.5495265126,
0.3402067423,
0.043460276,
0.0879205018,
-0.23720029,
0.0179052949,
0.0983417332,
-0.0005002469,
-0.2484385669,
0.1872134954,
-0.2704435587,
0.3351166546,
-0.0241544917,
0.101625286,
0.1242659688,
0.0973196924,
0.6602460146,
0.2771524191,
0.0627573654,
0.1526486725,
-0.3004393578,
-0.1258179247,
0.0933524892,
0.0086357966,
-0.1207739189,
0.3070910275,
-0.0019086599,
-0.2292073965,
0.3863340914,
0.0090977661,
0.1405577362,
0.2855956852,
0.1549438387,
-0.0899414718,
-0.1746754646,
0.2379612476,
-0.3544645011,
0.0971630365,
0.1835031509,
-0.0397739969,
-0.1856775731,
-0.1383265257,
0.1348204017,
0.2285037339,
-0.2306196988,
0.0922535136,
0.0155480243,
0.0989255458,
-0.0327141732,
0.1316239387,
0.1348375827,
0.6968743801,
-0.1539063454,
0.0587004274,
-0.4625234604,
0.1415290684,
0.1405998021,
-0.2519922256,
-0.0621952266,
0.2103709579,
0.1967874467,
0.0732989758,
-0.1008109301,
0.4235237539,
-0.3193055689,
-0.1450688988,
-0.2693097591,
0.0403386354,
-0.0298414193,
-0.0516966991,
0.1415464133,
-0.225473091,
0.2247686535,
-0.1563022882,
-0.0567419752,
0.450727582,
0.0112397969,
0.1874462068,
-0.0045901537,
-0.1919714212,
0.079323113,
-0.1642475724,
0.0901825428,
-0.1586998701,
0.111550957,
0.3809705675,
0.151738435,
0.3321411312,
-0.3299788237,
0.1686088145,
0.1915563643,
-0.0641719922,
0.2080635726,
0.2489988506,
-0.3479629755,
-0.2832606435,
-0.1409808397,
0.3459082544,
0.7657052279,
0.0833004266,
0.2235914022,
-0.1126446575,
-0.0013693497,
-0.1795596182,
0.3187161684,
-0.0918821543,
0.1735781133,
0.207020551,
0.2243026793,
-0.147270456,
-0.2065800726,
0.4320194721,
0.1452323496,
-0.0747568309,
-0.2772230506,
0.0283991769,
-0.336288631,
0.0518881977,
-0.3733004928,
-0.1222398579,
0.0817802995,
-0.3311996758,
-0.2710940838,
0.3929059207,
-0.0935638696,
-0.1096559241,
-0.0498728901,
0.384296298,
-0.0503478572,
-0.1125858575,
0.0026580542,
0.1787289977,
-0.2788047791,
-0.0525807999,
-0.0056802928,
-0.321570009,
0.0520073175,
0.2059118152,
-0.1652083993,
0.0415374115,
0.0537943467,
0.0260793827,
-0.19592309,
0.0513001233,
-0.1727584153,
0.1507133693,
0.0790431798,
-0.2274553627,
-0.0169859342,
0.3729393482,
0.0160090923,
0.5513109565,
0.2199633271,
-0.2465395778,
-0.1986987591,
0.0650124326,
-0.3557267785,
-0.1634888798,
0.2513191998,
-0.1487260908,
0.0252161212,
0.1737631261,
0.0827576071,
-0.1229355782,
0.0731972456,
0.1564645469,
-0.199131906,
-0.1466025263,
0.4220418036,
-0.0023798011,
-0.3424714208,
-0.2232854366,
0.0801082924,
-0.3310312033,
0.1510906219,
-0.5484547615,
0.2285900861,
-0.5363155007,
0.2024653256,
0.0190959368,
0.0740159899,
0.1360853016,
0.110119909,
-0.0381848291,
-0.1437599361,
-0.2721312046,
0.0334947295,
0.0069906805,
0.0654357523,
-0.0745998919,
0.2158825696,
0.2305160612,
0.0186750572,
0.390752852,
-0.0177375712,
0.3915448189,
0.1259575784,
0.5700922608,
-0.3393675387,
-0.4471697211,
-0.3153420091,
-0.372949481,
-0.0552658513,
-0.0380563177,
-0.0817662403,
-0.2075940371,
0.0566456765,
0.1470751911,
0.0643214881,
-0.2225523293,
0.159255296,
-0.2326897681,
-0.1527372152,
0.1568510085,
-0.1012193412,
-0.1353791654,
-0.0830879509,
-0.2535194457,
-0.0893901289,
-0.1491839588,
-0.1135689095,
-0.3458330035,
-0.1257228404,
-0.6547680497,
0.0768066496,
-0.1478189826,
0.60402596,
0.1357031465,
-0.3745177388,
0.0399745181,
0.0413491204,
0.8027872443,
0.3686521947,
-0.2305441499,
0.1310172975,
-0.0224335119,
-0.3862509727,
-0.0591941737,
0.081364803,
0.2802152336,
0.122907944,
0.0950160027,
-0.244275406,
0.0788229182,
0.2331957519,
0.2669422626,
-0.2513375878,
0.0450552627,
-0.2758743167,
-0.2127848566,
0.0257184058,
-0.233764112,
0.2033436894,
0.2741472125,
-0.3531467319,
-0.2460869402,
-0.0267987326,
-0.2043597549,
0.2672512531,
-0.2123704106,
0.4381568134,
0.1416172981,
0.4936625659,
-0.1587227583,
0.2963471115,
0.3730774522,
0.7436977029,
-0.1091232151,
-0.1179476604,
0.1731950194,
-0.2392698079,
0.3826469183,
0.2412308156,
-0.1666252017,
0.2367010564,
-0.2310510427,
-0.0033403672,
-0.5372427702,
-0.0061614141,
-0.0372623727,
0.073599495,
-0.5417615175,
-0.2735447288,
0.4134726524,
0.1998051107,
0.0134618729,
0.4708476365,
-0.5638409257,
-0.3500663638,
0.1962457448,
-0.3353709579,
0.8098760843,
0.0702944994,
0.2955166996,
-0.0543086827,
-0.0189362019,
-0.0495377108,
0.1149439439,
0.1686784923,
-0.0994603932,
-0.394872576,
0.2031389177,
-0.2248125374,
-0.1883258075,
-0.2532236576,
-0.2801166177,
0.090768382,
-0.415078938,
-0.133360669,
0.024522908,
-0.145651117,
0.00618078,
-0.2912024856,
0.0734749511,
0.1313215047,
0.4107918441,
-0.2013478875,
0.1182066351,
0.0275955498,
-0.3105554879,
-0.3001869321,
-0.2445830405,
0.2241716683,
-0.2056497931,
0.5132958293,
-0.2175204158,
-0.2047215253,
-0.1777375638,
-0.0141705368,
0.2302372009,
0.1844240725,
0.0014672168,
-0.2093810737,
0.2169168741,
0.381698519,
0.2162960023,
-0.3113327324,
0.0308294576,
0.2869880497,
-0.0235171765,
-0.0897095054,
-0.0129278302,
-0.251547724,
-0.3127515912,
0.1624221355,
0.1311500967,
-0.2297177166,
-0.222189039,
0.28845644,
0.2736465037,
-0.2233535647,
0.1020717621,
0.1862878501,
-0.1079064608,
0.3019554317,
-0.4452910721,
-0.4008276463,
-0.1504718214,
0.5288501978,
0.4275747538,
0.137094155,
0.3589572608,
-0.0255245566,
-0.0275361873,
-0.0926669389,
0.3038040698,
0.2948082387,
-0.3083602786,
0.3327581882,
-0.2347119749,
-0.0889831483,
-0.1223550141,
0.1906555891,
-0.0902996808,
-0.1498220265,
-0.2004103363,
-0.1588422656,
-0.1792376041,
0.0921351314,
0.0629843324,
0.2616427541,
0.0333866104,
0.0792111978,
-0.1321288943,
0.2453099042,
-0.2345610112,
-0.1031526104,
-0.0935179517,
0.1942148954,
0.0110162236,
0.1036980525,
0.2282831669,
-0.0901649594,
0.0720121339,
0.2308769673,
0.1835253835,
-0.1775110364,
0.1119422168,
0.1160487309,
-0.078404516,
-0.0639153272,
-0.3406566978,
-0.4153367877,
-0.1584490985,
-0.2976613641,
0.2195539176,
0.1389334351,
-0.0571224876,
-0.202578485,
0.2531112731,
0.0496824533,
0.0989654213,
0.1189785376,
-0.1670354307,
-0.0721579194,
-0.0590217598,
0.1988938451,
-0.1856141686,
-0.0442988202,
-0.4569975138,
0.0580303371,
0.1112945676,
-0.1273509413,
0.0608634353,
-0.2804781497,
-0.3058775663,
-0.1940652728,
0.0891561359,
0.4233353734,
-0.1628592461,
-0.1574441493,
-0.0450262763,
0.1168306023,
0.0327357277,
-0.3386600614,
-0.2539919615,
-0.2116801441,
-0.082682997,
0.3108477294,
0.1218879446,
-0.3003920913,
-0.2763796747,
-0.0822507441,
0.512406528,
0.1108017042,
0.3124133646,
0.1702505052,
0.2720429897,
0.2492615134,
0.0365551412,
0.1158341318,
0.02442386,
0.2108103782,
0.0569148846,
0.36013785,
0.265935421,
-0.2367971241,
-0.1599994004,
-0.4941539168,
0.3613446951,
0.5100722909,
-0.1413558722,
0.3520649076,
-0.0123266615,
0.0729842484,
-0.356743902,
-0.2225815058,
-0.2216585279,
0.1330319047,
-0.191454947,
-0.2346656024,
0.207704246,
-0.12916933,
-0.0449784771,
0.1002359539,
0.0568047091,
-0.2421501428,
0.320277065,
0.1047632098,
-0.2098564953,
-0.0811473951,
0.1302896887,
0.310911119,
-0.0603779033,
-0.2923102081,
0.0793739408,
-0.0151288472,
-0.023587402,
0.0448477119,
0.4151217043,
0.4353759885,
0.5306360722,
0.2169144899,
0.112867102,
0.3910492659,
-0.1669704914,
-0.2181598544,
0.2484211177,
-0.1326763034,
-0.201514408,
0.0555641428,
0.113180697,
-0.1079041958,
-0.0361437984,
0.4862873852,
0.1950152665,
-0.3314706683,
0.1184651181,
0.0301659591,
-0.2474867553,
0.1125628278,
0.0522431731,
-0.3138692677,
0.0204907246,
0.6549022198,
-0.3941718936,
0.05427121,
0.0577680692,
0.0555417389,
0.1530133635,
0.4801188111,
0.1707009375,
-0.0453493372,
-0.351020664,
-0.2779952884,
-0.1362154335,
0.1387813538,
-0.0248800255,
0.166761905,
0.092518501,
0.2837330997,
0.0989440978,
-0.1669980586,
-0.2755036354,
0.0935918018,
-0.2863231599,
0.0450815707,
-0.4407545924,
-0.2045116723,
0.1137033254,
0.1588918418,
-0.0348875225,
-0.3842608333,
0.3081074357,
-0.0702198446,
0.0374395251,
-0.0346697792,
0.1880492866,
0.1128130853,
0.4133763611,
0.2729745209,
0.2253099978,
0.1860001832,
-0.1833369136,
-0.1867903769,
-0.106315881,
-0.2303205729,
-0.1898797005,
-0.1697675288,
0.0219485685,
-0.0460426137,
-0.2856989503,
0.1003536135,
-0.0203455314,
-0.0850028098,
0.2123135477,
0.0074449703,
-0.0953529477,
0.2097871304,
0.0374385417,
0.262657553,
0.1896251589,
0.1903235018,
-0.0774146616,
0.4393137097,
0.0394963771,
-0.3373167217,
0.1008081734,
-0.0407976955,
-0.1056734622,
-0.1429012418,
0.3319271207,
-0.1910949051,
0.114639163,
-0.4796127677,
-0.1773149371,
0.2614831924,
-0.1287756562,
-0.5020698309,
0.6252388954,
-0.1250653565,
-0.0407963917,
-0.1198753789,
0.4905555844,
0.0633975267,
-0.4901545048,
0.2776885033,
-0.3202512562
] |
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.1398510635,
0.0151150823,
0.0576701909,
0.3696737289,
0.1839568466,
0.1596759558,
-0.0336781181,
0.266921401,
-0.2130462974,
0.0089294091,
0.0735275075,
0.1821826696,
0.1092259288,
-0.2046647519,
-0.1817611903,
0.330411762,
0.2417271882,
0.2320265621,
-0.2873950303,
-0.0829892829,
-0.2531093955,
0.2507128417,
-0.3118990064,
-0.3932683468,
-0.4115403891,
0.2931381166,
-0.3173238337,
0.2868467867,
0.0731339604,
0.0163129233,
0.3663008511,
0.0684921443,
-0.0108419172,
0.4899152517,
-0.0001141718,
-0.0399470776,
0.2374243736,
-0.1666594595,
-0.3710727692,
0.0382389612,
-0.2115314454,
-0.4239181578,
0.0949021578,
0.0163907558,
0.3227260411,
0.027634427,
-0.1392495185,
-0.619589746,
-0.0363316648,
-0.0184870474,
0.2055884302,
-0.0736073852,
0.0873236507,
-0.0346820243,
-0.1545481086,
0.1501188278,
-0.0562113337,
0.2053208947,
0.0462265983,
-0.086843662,
0.1201178432,
0.1036040783,
-0.286164701,
-0.066271089,
0.0869725943,
0.3886123002,
-0.1644801199,
-0.4153284729,
0.0623525381,
0.028984338,
0.2989787459,
-0.3810659945,
-0.0750826672,
-0.4106537402,
0.0723073781,
-0.151874125,
0.2585918605,
0.5170177817,
-0.2185687274,
0.2292113304,
-0.1242384315,
-0.0252379868,
-0.0161853284,
-0.0290716253,
-0.2198184729,
0.1054315269,
-0.1261252314,
0.0533120483,
0.3340790868,
0.0692820549,
0.261744976,
-0.462505132,
-0.3334727883,
0.102464959,
-0.5122955441,
-0.0164026096,
-0.0102711357,
-0.3762556911,
0.1318043321,
0.2016308308,
0.0878396109,
0.0035142535,
0.1841771156,
0.0197744966,
0.3769459724,
0.1765154004,
0.0080640726,
0.3474485874,
0.105243355,
-0.2071620524,
0.2690297365,
0.0588002875,
-0.0470573232,
-0.20884341,
0.2501568794,
-0.3447653055,
0.1984030604,
-0.1314505339,
-0.4553025365,
0.1100057811,
-0.1005399898,
0.0687939003,
-0.0308023728,
0.2494180501,
-0.0282950252,
0.4881115854,
0.1856010109,
0.3167207837,
-0.0345311724,
0.199231863,
-0.1725661755,
-0.1550679952,
-0.0954504758,
0.2142078876,
0.3256212473,
-0.2365007848,
-0.0088532008,
0.4181312621,
0.0340126753,
-0.1766605377,
0.0817503929,
-0.3128966093,
0.2096927315,
0.1971650571,
0.1583946049,
0.4220798016,
0.1548350751,
-0.1589884013,
-0.0694988072,
0.4355959892,
-0.2879332304,
-0.0658498108,
-0.2847756743,
0.1766029596,
0.0320009664,
0.107761912,
-0.2073269337,
0.3298121989,
0.4095005989,
0.2896983027,
-0.0911843106,
0.0171628166,
-0.0444945209,
-0.3863943815,
0.4746124148,
0.3746914864,
-0.1228755265,
0.180433467,
0.07965523,
0.2555891573,
0.5120505095,
0.3279236257,
-0.0482979156,
0.0531706586,
-0.3730936348,
0.0125811696,
0.1686257124,
-0.1546408683,
-0.1727766991,
0.303265065,
-0.2416497618,
0.328774929,
-0.0439334773,
0.1694867611,
-0.0733177513,
0.1647849381,
0.5839227438,
0.4656879902,
0.1425248533,
0.127551198,
-0.2993755937,
-0.1339702904,
0.1769674122,
-0.1294548213,
-0.2251121551,
0.3253211081,
-0.0589599833,
-0.1444769502,
0.5275813341,
-0.1006270945,
0.2085408568,
0.3714689016,
0.1504820138,
-0.1359593868,
-0.2112357765,
0.1942197829,
-0.4309013188,
0.0013528466,
0.1675440073,
-0.2653863132,
-0.062171448,
-0.0578748062,
0.1020052508,
0.0258222222,
-0.0636252165,
0.0238727741,
0.0121605322,
0.2641773224,
-0.0993796065,
0.0258627012,
-0.0086659715,
0.8541283607,
-0.0331424884,
0.0026919357,
-0.296015799,
0.1831161976,
0.0733398572,
-0.2640357018,
-0.074699685,
0.0341203697,
0.1943827271,
0.0817593336,
-0.0983498469,
0.4858407676,
-0.3071310818,
-0.0535062402,
-0.175615713,
-0.2325034738,
-0.0301672854,
0.0834079534,
0.0084748399,
-0.1559776962,
0.1944575459,
-0.2200032473,
-0.0202957094,
0.3703813255,
0.0729342401,
0.1607591957,
-0.0248842835,
-0.0984201729,
0.0550478622,
-0.1947638392,
0.1069363207,
-0.2017449737,
0.1457112432,
0.2696822584,
0.1671739221,
0.3178858161,
-0.4692429304,
0.0399977118,
0.218240425,
0.0924291164,
0.1402142793,
0.168979764,
-0.4341334701,
-0.1735431254,
-0.1096332595,
0.1892323941,
0.7930137515,
0.1422209144,
0.2025084496,
-0.0815571174,
0.0044436641,
-0.2626175582,
0.3425414264,
-0.0330346487,
0.0056892559,
0.2706082463,
0.2729272544,
-0.1077962965,
-0.1397443563,
0.3924455047,
0.0544330254,
-0.0995831043,
-0.2963494956,
0.1051602587,
-0.247294426,
0.1749791801,
-0.3388813138,
-0.2995423377,
-0.0429707319,
-0.3729387522,
-0.3870544732,
0.4966089725,
-0.0050711185,
-0.2058934867,
-0.0000235438,
0.3029480577,
-0.0802881643,
-0.1078601256,
-0.0437194146,
0.2978871465,
-0.4031482637,
0.002326645,
0.0329102725,
-0.241467312,
0.0255988892,
0.1616853774,
-0.0746065974,
0.0062472615,
-0.0376014113,
-0.1460680366,
-0.1108779535,
0.1193872243,
-0.2633407116,
0.1448410451,
0.006790638,
-0.3595243394,
0.0139943026,
0.4124946594,
0.060703814,
0.4417827725,
0.3276703358,
-0.2216091752,
-0.3578846753,
-0.0738943815,
-0.2946991324,
-0.267267406,
0.0994077176,
0.0303420797,
0.0763324201,
0.1941416264,
0.0754336938,
-0.1641863585,
0.0795485005,
0.1035595164,
-0.1700499654,
-0.3065528274,
0.5985966921,
-0.0416412652,
-0.3260038197,
-0.0542533137,
0.0742416382,
-0.2196605653,
0.1507498473,
-0.5239764452,
0.2077147812,
-0.5243374705,
0.0357964486,
-0.2324326187,
0.0915297717,
-0.0867219865,
0.0982721969,
-0.0368087851,
-0.155875653,
-0.1413527727,
0.0125800222,
0.0044494607,
0.2630651891,
-0.1881359816,
-0.1222266704,
0.1747362465,
-0.1320964098,
0.5040394664,
-0.0255292691,
0.3300639093,
0.1965640038,
0.5206707716,
-0.225272119,
-0.4929821789,
-0.2043380439,
-0.201664567,
0.1007429063,
0.0577181317,
0.0778431967,
-0.0946504176,
-0.0817828327,
0.2344908118,
0.0969502255,
-0.2222569883,
0.1670325696,
-0.2054094374,
-0.0506109744,
0.0042489246,
-0.031207487,
-0.1099206954,
-0.149773404,
-0.2375929654,
0.0199278332,
0.0114062801,
-0.0618965402,
-0.2488286793,
0.034611892,
-0.5779018402,
0.0993205011,
-0.1357798725,
0.4480731785,
0.129920736,
-0.3381295502,
0.0687865913,
0.0045526959,
0.7800456285,
0.3826604784,
-0.4314599335,
0.2051055729,
0.1531834304,
-0.4868684411,
-0.1069031432,
0.0146360025,
0.1714552641,
0.1549955457,
0.1559251994,
-0.1871201992,
-0.0236668922,
0.0183730274,
0.392737627,
-0.2104060352,
-0.1052648574,
-0.3675714731,
-0.16921103,
-0.1150121614,
-0.3382617831,
0.0803160891,
0.370501399,
-0.2373081148,
-0.3466645181,
-0.0292503349,
-0.1737225354,
0.2647719979,
-0.2550114989,
0.5063936114,
0.0859554708,
0.3880679607,
-0.1179888174,
0.2238130718,
0.2197094113,
0.5938228369,
0.1231939346,
-0.1026301831,
0.2181451023,
-0.2252629101,
0.3985521197,
0.1742033958,
-0.1846558005,
0.1840726286,
-0.3219741285,
0.085688971,
-0.6387631297,
0.1511772424,
0.0732671544,
0.1199123412,
-0.6324183941,
-0.2313170135,
0.2561935186,
0.1056600511,
-0.021633558,
0.5527474284,
-0.5034880042,
-0.4059452415,
0.0405909233,
-0.2261583805,
0.8108160496,
0.0540831946,
0.287609458,
-0.0171812363,
-0.1803120673,
0.1524909884,
0.1116672605,
0.2736447453,
-0.2010593414,
-0.2040136158,
0.128779605,
-0.2660426497,
0.0044185333,
-0.1600614339,
-0.4527008832,
0.0691424608,
-0.5905041099,
-0.050621435,
-0.0806238204,
0.0679043159,
-0.1449849606,
-0.3061990142,
0.0529617742,
0.1591801941,
0.2841211557,
0.0000369353,
0.0886318237,
-0.0578100421,
-0.2199355364,
-0.214844048,
-0.1946784556,
0.3777416945,
-0.1425355375,
0.4557340145,
-0.2058805227,
-0.2754251361,
-0.1219581068,
0.163479656,
0.3350863457,
0.2765884995,
-0.0273095798,
-0.137531653,
-0.0673854649,
0.3632538915,
0.1302050054,
-0.2657194138,
-0.0197191574,
0.2913515568,
-0.0664218962,
-0.0717535764,
0.0024252832,
-0.2321027815,
-0.2963327765,
0.2948569059,
0.0133138923,
-0.2735063732,
-0.1186899692,
0.3011371791,
0.3806626499,
-0.1508242786,
0.1304543316,
0.2537246943,
-0.0948472843,
0.2317898273,
-0.3779788017,
-0.3909696341,
-0.1365136057,
0.3814928532,
0.314407438,
-0.0888849869,
0.3437523246,
-0.0430451632,
-0.0188746937,
-0.114352338,
0.2174156457,
-0.0165061951,
-0.1529433429,
0.2706178427,
-0.0953310132,
0.0080777109,
-0.0805861354,
0.2164024413,
-0.0599568747,
-0.0798116401,
-0.0548538342,
-0.1989967227,
-0.3820287287,
-0.0718338192,
0.0063270042,
0.2280541807,
0.054697521,
0.01060763,
-0.0638364702,
0.2170871943,
-0.2776568532,
-0.1158027723,
-0.154030785,
0.1460760534,
-0.0868835524,
0.0577558614,
0.1480902582,
-0.0008429475,
0.1407096684,
0.1058208048,
0.1066783071,
-0.2063991725,
0.0332689658,
0.114385657,
-0.0116973836,
-0.1314937025,
-0.2068293989,
-0.418602556,
0.0010653026,
-0.3671500683,
0.1847520024,
0.2422652841,
-0.0208057165,
-0.1279928386,
-0.0086685792,
0.0280058514,
0.0371196121,
-0.0186049454,
-0.1917669326,
-0.0357005894,
-0.0672507435,
0.1754502654,
-0.0418210961,
0.0059079081,
-0.5367485881,
0.0873260051,
0.1139784232,
0.0057071634,
-0.0187882259,
-0.2345139682,
-0.220379144,
-0.1694925725,
0.1231051236,
0.3735878766,
-0.2358668596,
0.0285469368,
-0.0396065079,
0.1834031492,
0.110833481,
-0.3205861449,
-0.1787669212,
-0.0526628643,
-0.1876268834,
0.1849689186,
0.1193197742,
-0.3131453991,
-0.2715874612,
-0.0768370628,
0.5262079835,
0.1203002781,
0.2920234799,
0.2118809819,
0.202556625,
0.1655831188,
0.0613665879,
0.1247074157,
0.0348169208,
0.3070792854,
-0.0530882291,
0.2144798934,
0.2865366936,
-0.2327164412,
-0.2356667221,
-0.428355813,
0.2475952208,
0.4237317443,
-0.1550307572,
0.2289583087,
0.0401216783,
0.0791493058,
-0.4021759033,
-0.3282314837,
-0.0945641249,
0.1622193009,
-0.2592238188,
-0.1383006126,
0.2126483023,
-0.0485824719,
0.0484618992,
0.0994848534,
0.214546591,
-0.2807630599,
0.4253139496,
0.1433027834,
-0.1721545905,
-0.2424560487,
0.2480066419,
0.4640235603,
0.0112847872,
-0.3268960118,
0.0366256759,
0.0277843513,
0.0765664726,
0.0569228828,
0.320804745,
0.4883128405,
0.6327387691,
0.2889397144,
0.104066506,
0.3102715015,
-0.0706409663,
-0.2328089029,
0.265406698,
-0.1099807546,
-0.0806346387,
0.0893705264,
0.1750107408,
-0.1282294691,
0.0753756166,
0.3534377515,
0.2108038664,
-0.4426005483,
0.16052863,
-0.001184687,
-0.2379379719,
0.0257547274,
0.0223684497,
-0.2537687123,
0.0047234073,
0.5532047749,
-0.1821504235,
0.1118658856,
0.0138443671,
0.0740121007,
0.2559779286,
0.2634491324,
0.0847180188,
-0.0089973696,
-0.3793722987,
-0.3257668912,
-0.1911379993,
0.2649614811,
0.1162207052,
0.3654851913,
-0.1273176521,
0.2802458704,
0.0141841061,
-0.0619111136,
-0.1746498346,
0.1437334567,
-0.1585674733,
-0.0395418145,
-0.4842321873,
-0.0827422738,
0.2124893814,
0.0345618874,
-0.0472926497,
-0.3593176007,
0.3947598934,
-0.1068708152,
0.1028016806,
-0.0799385533,
0.2341650724,
0.1995651722,
0.3372665048,
0.3748332262,
0.2423322201,
0.2296585739,
-0.2148532718,
-0.196312964,
-0.2213146538,
-0.3038083315,
-0.0730424598,
-0.1656858176,
0.0013528662,
0.0800111666,
-0.4104304314,
0.1225762218,
-0.1289907098,
0.0115280263,
0.2242872119,
0.1620289683,
-0.0820094347,
0.0895313323,
0.0539804697,
0.2117810845,
0.196469605,
0.1748432815,
-0.0805259645,
0.3490607142,
-0.1060525402,
-0.3138890266,
0.098973915,
0.0467911996,
-0.2664644718,
-0.1155916005,
0.3089936376,
-0.0543670356,
0.1614171565,
-0.6315425634,
-0.1777592897,
0.3585124314,
-0.1232247651,
-0.4799725115,
0.5117145777,
-0.1925514936,
-0.1067778617,
-0.0470471829,
0.3618284166,
0.1069894433,
-0.4236907959,
0.281674087,
-0.2509838939
] |
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.1705919802,
0.0092169791,
0.029283911,
0.3677375019,
0.1755021214,
0.1506506205,
-0.0363329574,
0.2557008564,
-0.2184762955,
0.0205548257,
0.0756374374,
0.2006988376,
0.1137189269,
-0.1913739443,
-0.1878062487,
0.3212848008,
0.224128589,
0.2327462137,
-0.3028808832,
-0.0799712688,
-0.250978291,
0.2532585561,
-0.3152189851,
-0.4041965902,
-0.3926775455,
0.2633897364,
-0.3242085278,
0.2930182815,
0.055178389,
0.0143007152,
0.3530980945,
0.0911314636,
-0.0061370879,
0.516686976,
-0.0001119336,
-0.0348055288,
0.219003126,
-0.160305351,
-0.3798378408,
0.013400577,
-0.2082092166,
-0.43105492,
0.0528314561,
-0.0045531094,
0.3232038915,
0.0165412314,
-0.114432238,
-0.6221045256,
-0.0218277946,
-0.0040231161,
0.2312555015,
-0.0567462482,
0.1109550595,
-0.0584034137,
-0.140624553,
0.1617467701,
-0.0351834148,
0.1927781254,
0.0371736959,
-0.0715287998,
0.1079412922,
0.079248473,
-0.2629719377,
-0.0831597671,
0.0752241537,
0.384288013,
-0.1346912682,
-0.4134611785,
0.0804956406,
0.0150399953,
0.3004924059,
-0.3991722763,
-0.0938758701,
-0.3797349334,
0.0740214288,
-0.1438546181,
0.2679313421,
0.4909184873,
-0.2104187906,
0.2195637524,
-0.1331173778,
-0.0365269408,
-0.0239777565,
-0.0288993157,
-0.2043293118,
0.0931628644,
-0.1354396045,
0.0305273701,
0.3242893815,
0.0352998637,
0.270270139,
-0.4690799415,
-0.3298482895,
0.1103057265,
-0.5132635832,
-0.0276160389,
-0.0030134879,
-0.3875361681,
0.1243831441,
0.2151880562,
0.087588042,
0.0227859356,
0.1844989359,
0.0349110514,
0.3635177016,
0.180408299,
0.0184644498,
0.3571965396,
0.1284896135,
-0.1866256595,
0.2579455674,
0.0578462183,
-0.065624617,
-0.2233368903,
0.2364629358,
-0.3508512676,
0.1808035225,
-0.1380874515,
-0.4598098099,
0.117435649,
-0.0863995031,
0.0496026278,
-0.0094316639,
0.2542223334,
-0.0292179156,
0.472669661,
0.1849808991,
0.2863076031,
-0.03443598,
0.2018057108,
-0.1823037118,
-0.1430382431,
-0.1071338505,
0.2081675828,
0.3183360398,
-0.2373675704,
-0.0012823232,
0.3865207732,
0.0339646116,
-0.1422037333,
0.0747800916,
-0.3283979297,
0.1817576736,
0.1874953657,
0.159901917,
0.3855144382,
0.1233887449,
-0.1299316138,
-0.0734611452,
0.4197446704,
-0.2636740208,
-0.0535450839,
-0.2766645253,
0.2080069333,
0.0323730558,
0.0900532156,
-0.1872915179,
0.3255516291,
0.3913211823,
0.2665784955,
-0.1022030637,
0.0159125123,
-0.0254236832,
-0.4058589637,
0.4793983698,
0.3491701186,
-0.1226654202,
0.1716084778,
0.0541147292,
0.2214608938,
0.5023222566,
0.3170528412,
-0.0411460549,
0.0464434661,
-0.3630583882,
0.0208722055,
0.1720962524,
-0.1713981479,
-0.1892302036,
0.2992792726,
-0.2327096164,
0.3057885468,
-0.0190435089,
0.1393658072,
-0.0547651127,
0.1674484015,
0.5857989788,
0.4550623298,
0.1370739937,
0.1111656874,
-0.3130152822,
-0.1439276636,
0.1525892615,
-0.1146863848,
-0.2094822824,
0.3083631992,
-0.0232085027,
-0.1329601109,
0.5200493336,
-0.100935325,
0.2115398198,
0.3745299578,
0.1742047817,
-0.1261508763,
-0.2095543444,
0.1763240248,
-0.4116715491,
-0.0128654465,
0.1423325092,
-0.2536486685,
-0.0743055195,
-0.0587703027,
0.0862646252,
0.0054154918,
-0.0461515002,
0.0131204315,
0.0468460694,
0.2829904556,
-0.0541429594,
0.0100653768,
-0.0051474124,
0.844551146,
-0.0522516444,
-0.0038747005,
-0.2735114396,
0.2024549842,
0.0517794713,
-0.2781855464,
-0.060439419,
0.0601670109,
0.1768257469,
0.0623119175,
-0.0969209522,
0.5086948276,
-0.3162319362,
-0.0530031621,
-0.1282172352,
-0.2386728078,
-0.0197944529,
0.0813363194,
0.0303823892,
-0.1581409872,
0.1951513886,
-0.2013556361,
-0.0485713743,
0.362767458,
0.0637391433,
0.1470876932,
0.0014078468,
-0.1114586592,
0.0617570952,
-0.1842129081,
0.1107686386,
-0.1929575056,
0.1656011045,
0.2717432976,
0.18824251,
0.2941266298,
-0.4811879992,
0.0245009083,
0.2233474851,
0.0795772895,
0.1472450942,
0.1627759933,
-0.4270972908,
-0.1794690043,
-0.1047099754,
0.1944565624,
0.801423192,
0.1726984829,
0.2021737397,
-0.0856784508,
-0.0116207059,
-0.2446805388,
0.34702456,
-0.0430200323,
0.0150328092,
0.2690575123,
0.2735055089,
-0.1009963453,
-0.1482653767,
0.3355563879,
0.0742282793,
-0.1128374189,
-0.277372539,
0.0631774142,
-0.2430235445,
0.1607271135,
-0.3150874078,
-0.284452647,
-0.0286443215,
-0.3622500896,
-0.3986126482,
0.4999142289,
0.000371635,
-0.1869666278,
0.0068634599,
0.2999917865,
-0.0691006631,
-0.0762330741,
-0.0526447184,
0.2924112082,
-0.3996618092,
0.0342251286,
0.0327191763,
-0.2350404561,
0.0591159612,
0.1551665664,
-0.0633145869,
-0.0152565138,
-0.0391109437,
-0.1443188637,
-0.1046110019,
0.130956009,
-0.2461870611,
0.1443765014,
0.0002403483,
-0.3521912098,
0.0151466541,
0.3860210776,
0.0331956297,
0.4261020422,
0.3176251054,
-0.2234507203,
-0.3679215908,
-0.0894456655,
-0.3102514446,
-0.2938085198,
0.0898831189,
0.0360093191,
0.0871713161,
0.1884697378,
0.0940237194,
-0.1125217825,
0.075263381,
0.12726897,
-0.1948868781,
-0.3146143258,
0.5944068432,
-0.0795408636,
-0.3260224462,
-0.0507530086,
0.0738562196,
-0.2051506191,
0.1580086648,
-0.5181680322,
0.1775108278,
-0.5287157893,
0.055396691,
-0.2294148207,
0.128755033,
-0.0821997076,
0.1013927609,
-0.0731061623,
-0.1697250158,
-0.1496968567,
-0.0004371479,
0.0265975408,
0.2668584287,
-0.1863803118,
-0.1166979671,
0.1746390313,
-0.1422039121,
0.5094491243,
-0.035705477,
0.3200165033,
0.1902726889,
0.5234616995,
-0.1986841559,
-0.4719848037,
-0.1932121515,
-0.2005852312,
0.0893357992,
0.0563368425,
0.0636831969,
-0.0920830742,
-0.0806080028,
0.2244478017,
0.0911798924,
-0.2175604999,
0.147300154,
-0.1959720403,
-0.0329136699,
-0.0192276835,
-0.0387285426,
-0.1207240969,
-0.1115190834,
-0.2408661842,
0.0230468456,
0.0003597662,
-0.0564637817,
-0.2714481652,
0.0201333575,
-0.5876373649,
0.1094757318,
-0.1373865008,
0.4535588622,
0.1090086401,
-0.3208842278,
0.0583272018,
-0.0161348283,
0.7636983395,
0.3329623342,
-0.4363059998,
0.2071589828,
0.1552898884,
-0.4658374786,
-0.0835807845,
-0.021317251,
0.1899802685,
0.1312688589,
0.1583265215,
-0.2055955529,
-0.0296575297,
0.0358313695,
0.3744697571,
-0.2042752057,
-0.0955860466,
-0.3499987721,
-0.1737556458,
-0.1365811825,
-0.3245690763,
0.0489246324,
0.407644093,
-0.2329460531,
-0.3107889891,
-0.0368187875,
-0.1849572659,
0.2744170129,
-0.2308511734,
0.5145856738,
0.0639486462,
0.3858356476,
-0.0978935063,
0.2156772017,
0.2473816276,
0.5988693833,
0.1038333625,
-0.1060994714,
0.2526395321,
-0.2163179815,
0.4124966562,
0.1633564234,
-0.1602386534,
0.1917661279,
-0.3098960519,
0.0977838784,
-0.6230971217,
0.1641239822,
0.0725564063,
0.1276912987,
-0.6346238256,
-0.2413495481,
0.2271974236,
0.1082771793,
-0.0185785517,
0.5124947429,
-0.490121752,
-0.4179085493,
0.069712989,
-0.2118566483,
0.8130755424,
0.0547282062,
0.2585771382,
-0.0296549052,
-0.1845356822,
0.1582951695,
0.0853044838,
0.2678158879,
-0.1852395833,
-0.1961279511,
0.1438760459,
-0.2712043524,
0.0100165587,
-0.1378269047,
-0.4844802916,
0.0686793327,
-0.5488299131,
-0.0551480167,
-0.0857353956,
0.0833577812,
-0.1527259946,
-0.3045672178,
0.0371955857,
0.1895385832,
0.3127611876,
0.0013445811,
0.0653889328,
-0.0448100343,
-0.2109619975,
-0.1944258064,
-0.1934615374,
0.3593728542,
-0.1455608904,
0.4600487649,
-0.2225941122,
-0.2794793248,
-0.1271816045,
0.1378701627,
0.3171216249,
0.2699972093,
-0.0230864696,
-0.130508408,
-0.0730520636,
0.3410403728,
0.1088791192,
-0.2430871129,
0.0008911882,
0.2779828906,
-0.0806920528,
-0.0385391824,
-0.0032456741,
-0.229698211,
-0.2879565358,
0.2690274715,
0.0109512908,
-0.2714540958,
-0.0941426754,
0.304525584,
0.3451377451,
-0.1455771625,
0.1580165625,
0.2575799525,
-0.0873664618,
0.2418085039,
-0.3634418249,
-0.3893839717,
-0.1616249532,
0.3766775727,
0.2974400222,
-0.0833570883,
0.326115787,
-0.0495862924,
-0.0365192108,
-0.143290773,
0.1960611641,
-0.0354604647,
-0.1487310231,
0.271460861,
-0.0911772549,
-0.0164951086,
-0.0638386011,
0.2176410258,
-0.0276384372,
-0.0734698623,
-0.0515612774,
-0.220101133,
-0.3964552879,
-0.0557606518,
-0.0022765598,
0.2487777472,
0.0545785576,
0.0049687475,
-0.0857974514,
0.2177581191,
-0.3150095642,
-0.1085961163,
-0.1695528328,
0.1493174732,
-0.0745883361,
0.0430759564,
0.146240741,
0.0055680946,
0.1722054929,
0.1193138063,
0.1077751666,
-0.2334418297,
0.0453126654,
0.0964168906,
-0.0259037968,
-0.1499044597,
-0.2246694863,
-0.4041143656,
0.0112566948,
-0.3703247905,
0.1964094937,
0.2312368751,
-0.0353978202,
-0.1200983673,
-0.0055263881,
0.0413134992,
0.0197680071,
-0.0121567482,
-0.1634086818,
-0.047217764,
-0.0828912854,
0.1975089908,
-0.0617208816,
-0.0061476305,
-0.5149456263,
0.0845450088,
0.1428640485,
-0.0128745586,
0.0052394466,
-0.2167883962,
-0.210098654,
-0.1587082744,
0.1227074414,
0.3723143041,
-0.2173629403,
0.0193792582,
-0.0240693428,
0.2157366425,
0.0988936126,
-0.3250529468,
-0.2007530183,
-0.0765902996,
-0.1589842141,
0.1698934138,
0.1420830488,
-0.2991501093,
-0.2625756264,
-0.0591581948,
0.5463076234,
0.1247393936,
0.2897944152,
0.2192462534,
0.2227223217,
0.1619436145,
0.0821056738,
0.1254656017,
0.0443910211,
0.3199918568,
-0.0474389903,
0.2595849037,
0.2789168656,
-0.217184931,
-0.2115838677,
-0.4280097187,
0.2837205529,
0.4275853932,
-0.1443536282,
0.2253154516,
0.0233593583,
0.0850131214,
-0.4194728136,
-0.2932544947,
-0.1019083858,
0.1396281123,
-0.2674473822,
-0.1335683465,
0.196060285,
-0.0838553011,
0.0306118578,
0.0907149911,
0.2005171031,
-0.268969059,
0.4259611964,
0.1229151338,
-0.1554671377,
-0.240555346,
0.2527748048,
0.4658413827,
0.0022956245,
-0.3160015941,
0.0356348604,
0.0271697026,
0.0720898062,
0.0554054119,
0.3411989808,
0.4986338615,
0.6147715449,
0.2721050978,
0.1044658795,
0.3074157238,
-0.0678058341,
-0.2478256077,
0.2650790513,
-0.1127171144,
-0.1081437692,
0.0906784534,
0.206534192,
-0.1485037059,
0.0566633269,
0.3594039679,
0.1688802391,
-0.4155341089,
0.1474209428,
0.0089650322,
-0.252756834,
0.0678590983,
0.010829661,
-0.2431133986,
-0.0130257029,
0.5400261879,
-0.2046990395,
0.1184389219,
0.0085531212,
0.0944712833,
0.2409150898,
0.2731512487,
0.1047123373,
-0.0267013423,
-0.3710479438,
-0.3345953226,
-0.2055733204,
0.2501989603,
0.1388464868,
0.3416659534,
-0.1382293403,
0.2902059555,
0.0189287309,
-0.0795919299,
-0.1497367322,
0.1210184693,
-0.1521126479,
-0.0313670412,
-0.4907976985,
-0.0563849881,
0.2144360542,
0.026117878,
-0.0263205543,
-0.3582001626,
0.3783017397,
-0.1205615699,
0.1346715093,
-0.0968300477,
0.229624778,
0.2119970173,
0.3251647949,
0.3890553713,
0.2415724248,
0.2294234037,
-0.2480791509,
-0.2008242905,
-0.224273771,
-0.2944234014,
-0.0670724511,
-0.1548819244,
-0.0179352965,
0.0812753588,
-0.4103183448,
0.1024461836,
-0.1002154797,
0.0182397179,
0.2129151225,
0.154631272,
-0.0696230978,
0.0950293764,
0.0535513982,
0.1901404709,
0.2027446181,
0.1909311861,
-0.0671831071,
0.3385688066,
-0.1113280952,
-0.3111753464,
0.0780566484,
0.0500971824,
-0.2669706643,
-0.1360527724,
0.2945311069,
-0.0741826445,
0.1726399362,
-0.6362550259,
-0.1700380147,
0.3600722551,
-0.135940969,
-0.4746206403,
0.50729388,
-0.1810387671,
-0.1051709354,
-0.0325117446,
0.3822628558,
0.0733079314,
-0.4318178296,
0.2638350129,
-0.244410336
] |
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.2989760637,
-0.3761274815,
-0.0328566283,
0.2222822458,
0.0694197416,
0.0815879554,
0.3312397599,
0.169194147,
0.181328088,
0.2444590628,
-0.3545390964,
0.4890282452,
-0.1160791665,
0.2643210888,
-0.0070860889,
0.1549566388,
0.2352824807,
0.3039815724,
0.2841204405,
-0.3298658133,
-0.2717858553,
0.0914114267,
-0.4051929712,
0.2479597181,
-0.3731480837,
0.0205869917,
0.1299514621,
-0.0096964259,
0.0335910469,
-0.5129567385,
0.0948818251,
0.1173790842,
-0.0772677585,
-0.07241638,
-0.0001088527,
-0.2403395176,
0.0697497725,
-0.0470229909,
-0.62233603,
-0.2529822588,
-0.1181871071,
0.2077095509,
0.0751573369,
0.017291069,
-0.0961226076,
-0.0527753942,
0.0744383857,
0.1242417991,
-0.0809798688,
0.332657218,
0.1794923246,
0.3804581761,
-0.1768753827,
0.0707378909,
0.3439859152,
-0.1560858637,
0.0178828016,
0.2107768804,
-0.0133290961,
0.0425253436,
0.2260409743,
0.5354087353,
-0.0452151783,
0.0348851867,
0.3393328488,
0.0228580721,
-0.0777819604,
-0.4266031981,
0.0421024784,
0.3638971746,
0.0810521096,
-0.2305556685,
-0.367146492,
-0.2749625444,
0.2244778872,
-0.2685076892,
0.0582702607,
0.2668512166,
0.0697489008,
0.2614788711,
-0.1460722238,
-0.0509524606,
-0.1751929224,
0.0005082916,
-0.1057194844,
0.6413043737,
-0.1593692303,
0.128983587,
0.5075030923,
0.072835736,
-0.4432063103,
0.0394589342,
0.1568492651,
0.4317366481,
-0.5694572926,
-0.1717997342,
-0.0282680094,
0.1632056683,
0.0481878147,
0.2185508162,
0.043785423,
0.0269279294,
-0.0140581802,
0.2916793227,
-0.069484666,
0.1436824054,
0.3065779507,
-0.0466931835,
0.2114735693,
0.0162283704,
0.360098362,
0.0481921881,
-0.2132716477,
-0.1394186467,
0.1308574975,
-0.2398139536,
0.199852854,
-0.262675941,
-0.6473468542,
0.2097322345,
-0.3907648325,
0.1524566263,
0.0866873562,
0.0645213872,
0.2203203738,
-0.0598429479,
-0.0791029036,
0.0456992351,
-0.1378148198,
-0.4292083979,
-0.1970971972,
0.0903698653,
-0.0988866836,
-0.1167687327,
0.2107843608,
-0.3131536841,
0.331553936,
0.0532462001,
-0.2020502388,
-0.0207848474,
0.1787773371,
0.1645312905,
0.2473971248,
0.5771651268,
-0.348819077,
0.3330376446,
0.0659813434,
-0.1964194775,
-0.101756759,
-0.0393126719,
-0.172300756,
-0.2989450097,
-0.0818257332,
0.1699970365,
-0.1952712238,
-0.1519027352,
-0.0912286118,
0.0878945738,
-0.1778072119,
0.1813960969,
0.2566715479,
-0.2120782733,
-0.0585162491,
-0.0010472871,
0.3605416715,
0.1575619578,
-0.4851133227,
-0.2034795582,
0.1237735599,
-0.4227321148,
-0.0173458718,
0.2736924589,
0.0932889581,
-0.1971942484,
-0.0713966489,
0.2520914972,
0.2139835358,
-0.2968646586,
-0.3827933371,
0.027174864,
-0.3269346952,
-0.1678780019,
-0.1895412803,
0.308136344,
-0.1457921416,
0.1059514508,
-0.0698812455,
-0.2019358724,
0.0900852308,
-0.2835514545,
-0.5512372851,
-0.2125913054,
0.2463145852,
0.3127195537,
-0.0492921844,
0.0508235544,
-0.1639028788,
-0.00707734,
0.2720734775,
0.0131315663,
0.2313566655,
0.1837441474,
0.4308995306,
0.1810056269,
0.082325004,
-0.0849985108,
-0.3912088275,
0.2321950942,
0.0310570449,
0.3658101559,
0.1825837642,
-0.2678921223,
-0.2410058677,
-0.2028994113,
-0.2412318587,
-0.202688694,
0.086942032,
0.0619796254,
0.2216903865,
-0.0590654574,
-0.3432807326,
0.0738289729,
-0.3657286763,
0.2240728438,
-0.4974217415,
-0.1394049525,
0.1059824228,
0.1703775525,
-0.1773587167,
0.2051084787,
0.2067948878,
0.026194863,
-0.0004640874,
0.3204997778,
-0.1998346001,
-0.2124388516,
0.230879277,
0.4564018846,
0.1108060628,
-0.4229477048,
-0.0603928268,
0.3066325784,
0.034660887,
0.0723259449,
-0.3624302149,
0.36998564,
-0.1780646145,
0.1303418726,
-0.1571430862,
0.1258880049,
0.1038827598,
0.0623038113,
-0.3292541802,
-0.2804181576,
-0.1012576669,
-0.3951131105,
0.3665448427,
0.1523703635,
-0.6327456236,
0.1134548932,
0.0347605497,
-0.3291111588,
-0.0887433067,
0.0729336888,
-0.2424842417,
-0.1196303964,
0.3244643807,
0.241127491,
0.1161466241,
0.230164215,
0.1370832324,
0.1427649111,
-0.3513401449,
-0.2686565816,
0.0397714712,
0.1523794681,
-0.1068360284,
-0.120884195,
0.1304070503,
-0.0173291564,
-0.3405172527,
-0.2308852077,
-0.0885476172,
0.2723145187,
-0.4020913243,
0.0290393829,
-0.2172335684,
-0.1394995004,
-0.3488055766,
-0.0022710375,
-0.2464650124,
-0.2919359803,
0.3128001988,
0.0047454918,
-0.2030444741,
0.1004573107,
0.031630896,
0.509346962,
-0.1519940197,
0.2992753088,
-0.3002232611,
-0.2652914524,
-0.2074292004,
0.0390338972,
-0.2587572932,
0.2907176912,
0.3018004298,
-0.1576563567,
-0.3338997364,
-0.0033461954,
-0.3023772836,
0.0480287112,
-0.1426196247,
0.1002899036,
0.1844928265,
0.0393267907,
-0.051174771,
0.3166732788,
0.0049947202,
-0.2142880857,
-0.1116833165,
-0.0925554559,
-0.0810803771,
0.1272655278,
-0.5270536542,
-0.3587162793,
-0.1944818795,
-0.0670323446,
0.2488204092,
-0.1992381364,
0.0729882047,
0.3046568334,
-0.0580608547,
0.3074792325,
-0.1491303593,
0.1342585981,
-0.1992036998,
-0.4086111784,
0.1899919659,
0.0326559544,
-0.2425483763,
0.1930105835,
0.2684445381,
-0.0160765499,
-0.2244114429,
-0.3304810524,
-0.089458622,
0.1758215576,
0.082393527,
0.1061904281,
-0.0795195997,
-0.1110926121,
0.0465241112,
0.0067265108,
-0.2253057361,
0.0642925799,
0.3514792621,
-0.4254741371,
0.2542330325,
-0.1100140959,
0.1659719944,
0.0102353394,
0.266856432,
0.4718403518,
0.0371448956,
-0.1448505819,
0.0275475625,
0.1412936151,
-0.0483854935,
0.1749219447,
0.1657844484,
0.2737947702,
-0.0954467803,
0.4123097062,
0.0016731992,
0.0518999472,
0.0887967646,
-0.0069070086,
0.0350571796,
-0.1055700183,
-0.1193993688,
-0.0342237167,
-0.0516612157,
-0.0025482699,
-0.0705695152,
-0.0076272376,
-0.0360235125,
-0.1251479834,
0.1299677938,
0.0240501873,
0.0580962673,
-0.3151966929,
0.0465813614,
-0.2711877823,
-0.092170015,
-0.1488163769,
0.2241199166,
0.0887400359,
-0.0866958648,
0.4816253781,
0.2233079821,
0.6515529156,
-0.2569717169,
0.1707717627,
0.1465686858,
0.3238312602,
-0.2031406164,
-0.2338122725,
-0.4656895399,
-0.2860246301,
0.3575040698,
0.3194350898,
-0.1423306465,
-0.5077238679,
0.4295348227,
0.034850955,
-0.1356570274,
0.0319491513,
-0.2754109502,
-0.2216801494,
-0.0745625943,
0.201795429,
0.0877771229,
0.0055553168,
-0.265932709,
0.1474955678,
0.2062807679,
0.1089138016,
0.4171216488,
0.3996472955,
0.0480078012,
0.1336190104,
-0.0788363144,
0.4705044329,
0.2033639848,
0.1280691475,
0.5412424803,
-0.032021042,
-0.4326096475,
0.1952378452,
-0.30174914,
0.482466042,
0.2719441354,
0.151571095,
0.0913843215,
-0.2434858531,
0.3418336809,
-0.2550146878,
0.0671939999,
0.2685759068,
-0.0562020801,
-0.1702011526,
-0.2825744748,
0.5954550505,
-0.0494574197,
-0.3141208887,
0.024750473,
0.4294595122,
-0.2368097305,
0.2148874104,
0.3691092134,
1.0459471941,
-0.0521238483,
0.0110979648,
0.3327125013,
-0.5709404349,
0.5602003932,
-0.1948113889,
-0.0722165406,
-0.2561848164,
0.0398422256,
0.1239633113,
0.2006254196,
-0.1609840095,
0.4800282419,
0.1506716907,
0.1787362993,
-0.2310986072,
0.183551684,
0.1390640885,
-0.0544173382,
0.2079625726,
-0.0026003756,
-0.2688747346,
0.1545752287,
0.0909166038,
0.137250632,
-0.1643724293,
0.0725011677,
0.0128596425,
-0.0502959676,
-0.0006515086,
-0.207704559,
0.2996357679,
-0.0168240424,
0.164865464,
-0.0320591331,
-0.1578758657,
0.3023851216,
0.6914596558,
-0.1512020975,
-0.0364848152,
0.0953298137,
0.0168685857,
0.3420290947,
0.0187349953,
0.1816221774,
0.5679468513,
0.0848259032,
-0.3281461298,
-0.0055451673,
0.0921956897,
0.198677361,
-0.396327883,
-0.0232436061,
-0.2978696525,
0.109867394,
0.0510894209,
-0.2207342535,
0.2528725266,
-0.1529620588,
0.1644692868,
0.0812317133,
-0.2304651439,
-0.2184700072,
0.0326977931,
-0.4425133169,
-0.2420797348,
0.255895853,
-0.1108555049,
0.2954890132,
0.1164969727,
-0.2047532499,
-0.1425513029,
-0.2471477389,
0.0117640793,
0.4294540584,
-0.6151468754,
0.1111140773,
0.2049758583,
-0.1036675423,
0.0305259638,
0.3982726932,
0.0723205954,
-0.0505542159,
-0.0751853511,
-0.1825866103,
-0.2546255291,
0.0325337723,
-0.0457648262,
0.4078813791,
-0.0299975164,
0.2271570414,
-0.1240517646,
-0.1573384553,
-0.35442698,
-0.0750738978,
-0.425121367,
0.2522551119,
0.1342234015,
0.3542677462,
-0.0405721702,
-0.0353888646,
0.0837237015,
-0.0655843616,
-0.0464522354,
-0.1373877525,
-0.3091198802,
0.1497507691,
0.0685370564,
-0.1972482204,
-0.0483179018,
0.2364223152,
-0.0852423534,
-0.0070721898,
0.3630235791,
0.2377917022,
0.318718195,
0.8635641336,
-0.0884640962,
0.2512856722,
0.0050876886,
-0.1277726591,
0.1021057516,
0.0536884293,
0.1734297872,
-0.0303517655,
-0.1872660667,
-0.0045389086,
-0.1407217979,
0.1538669318,
-0.2063364238,
-0.139711827,
0.0252370089,
-0.2607496381,
0.2843094766,
-0.0573382415,
0.3268588185,
0.1496071666,
-0.1952589154,
-0.2138923258,
0.2366321385,
0.2653482854,
-0.1799708605,
0.0295336246,
0.2653585672,
0.023408968,
0.0868368745,
0.1953818351,
0.1683210582,
0.0460223407,
0.0783973932,
-0.0725746602,
0.2347390354,
-0.2773816586,
0.100228548,
0.3798257113,
-0.147403717,
0.0760473609,
0.4589990079,
-0.1008724794,
0.1375338584,
0.3812132478,
-0.0973137319,
0.6287069321,
-0.2104886025,
0.3015152514,
-0.1653846502,
0.0593549386,
-0.089373894,
0.2047703117,
-0.3985277116,
0.1160478741,
-0.0631501824,
0.3170560896,
-0.2719573975,
-0.2514198124,
0.182587266,
0.3171637356,
-0.203442201,
-0.3677089214,
-0.6252560616,
-0.0939052105,
-0.1328831166,
0.3004603386,
-0.1347045004,
-0.1321980357,
0.2144760191,
-0.0496289805,
-0.1165574044,
-0.309637934,
-0.3505444825,
0.2089572251,
0.4235257506,
0.0082151592,
-0.0533897206,
0.1345662475,
0.1074736565,
0.2328768075,
-0.0599114597,
0.2295923233,
0.0902945325,
0.324514538,
-0.0794227123,
-0.1306713521,
-0.1107172891,
-0.117375344,
0.1408375353,
0.1603414118,
-0.0306675695,
0.1941062808,
0.0937065482,
-0.157420814,
0.3419392407,
-0.072227627,
0.4403963089,
-0.3386830091,
0.1590572298,
-0.1795812547,
-0.2903946638,
-0.2629446983,
-0.140144363,
-0.0519084632,
0.3314609528,
-0.0606242307,
0.2896046638,
0.1731743962,
-0.1960673481,
0.0994278193,
0.2572848797,
0.3898850977,
0.0960831195,
-0.0798743218,
-0.1623770744,
-0.0282625481,
-0.8415150046,
-0.0190443993,
-0.0237929113,
-0.0034848303,
0.2146438807,
0.038353011,
-0.2455152273,
-0.2468419224,
-0.0246149898,
-0.006290406,
0.1036541462,
0.039605476,
-0.0095446035,
0.0344998315,
-0.2680268586,
-0.0806605965,
0.109181568,
-0.0008416548,
0.0605219603,
-0.1485964805,
-0.0186840855,
-0.0961733311,
0.3204783499,
-0.1085052937,
0.1731995642,
0.1230698228,
-0.015440613,
0.3519541025,
0.2310052961,
-0.0790175721,
-0.3477731049,
0.1440773308,
-0.4776945114,
-0.0361931808,
-0.224715203,
0.3466449976,
0.0888936892,
-0.2870788574,
-0.0480912253,
0.166885674,
0.0773950964,
-0.0106207244,
-0.5227892399,
0.2769578695,
-0.1839487702,
0.1439639479,
0.2457564771,
0.1054010168,
0.1986225843,
-0.1199093163,
-0.337620914,
-0.2967924476,
0.4267442524,
-0.3606746197,
-0.0565034673,
0.0524059683,
0.3034638166,
0.4309641421,
-0.3343272507,
-0.9000045657,
-0.0720248595,
0.2416549772,
-0.1272200644,
-0.4244157076,
0.2112101018,
0.2320236862,
0.090948686,
-0.1002705097,
0.0472114086,
0.3323102891,
0.0538824201,
0.3208733797,
-0.409167707
] |
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.0357849672,
-0.1575220674,
-0.0868109614,
0.2376334369,
0.5289875269,
0.1175256222,
0.5686450601,
0.3704491556,
0.2597453594,
0.1947684288,
-0.1332871616,
0.54302001,
0.099426493,
0.33419469,
0.0166780241,
-0.1077987999,
0.1042394191,
0.1556778848,
-0.5332586765,
-0.2485719025,
-0.3539149761,
0.1785125136,
-0.1895940453,
0.0363142788,
-0.0856322944,
0.2268483639,
-0.0752514526,
0.0718289018,
-0.1968089044,
0.0467562042,
0.2146316618,
-0.1659523994,
-0.1237036139,
0.0771569163,
-0.0000990271,
0.0114663243,
0.0859175324,
-0.009156134,
-0.1566773355,
0.0474112779,
-0.1982405484,
-0.0677879006,
-0.0882977396,
-0.2672232389,
-0.1891157627,
-0.222938627,
-0.1765219271,
-0.2252688408,
0.1340979934,
0.021198824,
0.3522589803,
0.2214995623,
-0.1476594508,
-0.0600135177,
0.2655744553,
0.2174872607,
-0.0632188618,
-0.1774151027,
0.020780094,
-0.0078306943,
-0.0524009541,
0.4466291964,
0.0209639296,
-0.1336339265,
-0.0051342901,
0.2034534514,
-0.0406313613,
-0.0303325038,
0.3821033835,
0.1162568629,
0.240949437,
-0.0864885449,
-0.175011009,
-0.2274490893,
0.0348634794,
-0.2414516807,
0.1153324693,
-0.0931092724,
0.1492735595,
0.1759850681,
-0.3822606504,
-0.0089525655,
-0.0970891193,
0.1939299405,
-0.2835184634,
0.1710605919,
-0.2821825445,
0.0852565765,
0.0107296258,
0.0057511786,
-0.2462011278,
-0.1706469208,
-0.0102344286,
0.1799634397,
-0.0588386729,
-0.2139722109,
0.0842071921,
0.162787348,
0.2372649908,
-0.1169940829,
-0.0369561389,
0.2024583369,
-0.017068401,
0.1216711998,
0.3319073021,
0.1637550592,
0.1191613525,
0.3312913179,
0.2741268277,
0.0048440062,
0.0452919751,
-0.1319953501,
0.3326643407,
0.2048240006,
0.0835305899,
-0.1131554544,
0.084329851,
-0.2055877745,
-0.1399454474,
0.1899601817,
0.0204548761,
-0.0261588413,
-0.0671978593,
0.3910752535,
0.0939427763,
0.1522227675,
0.0091073066,
0.1897301525,
0.0487883464,
-0.1829745322,
-0.4172065258,
-0.0833830982,
-0.1617069244,
-0.1496152133,
0.0571541116,
-0.0215366371,
0.3924635351,
0.2146309614,
-0.100804314,
-0.0021818355,
-0.1540978551,
-0.007912118,
0.4681972861,
0.0567123517,
-0.1498760879,
0.200974822,
0.182189092,
-0.2646002769,
0.0076708496,
-0.0745367184,
-0.1921509355,
-0.065047279,
-0.1382558644,
0.310587436,
0.0283278674,
0.1095168963,
-0.1155265719,
0.2912954092,
0.3388135731,
-0.175012961,
0.1155870557,
-0.3287633061,
-0.2149406374,
-0.1349685192,
0.1861956567,
0.0695463493,
-0.2191281319,
-0.2320274115,
0.3701493442,
-0.1202199385,
0.0886878669,
0.2754110396,
-0.1826440692,
-0.0655735284,
-0.1955091953,
0.2797735929,
0.1806041598,
-0.0834466144,
-0.4100649655,
0.1806077361,
0.0971923247,
0.0853631645,
-0.150641039,
-0.0745888948,
0.2699151635,
-0.0252980795,
0.0880027413,
0.1082191467,
0.0613477156,
0.1780361831,
-0.1506053507,
-0.058544457,
0.1019944474,
-0.1354882717,
-0.0786000192,
0.1987275332,
0.1226851493,
-0.1103498638,
0.355103761,
-0.2854628265,
0.1658903509,
0.2804603577,
0.0421768762,
-0.1347811222,
0.0597591288,
-0.2607401907,
-0.4284386337,
-0.0199493729,
0.2042557895,
-0.1423265338,
-0.1081607193,
-0.3205406666,
-0.2251667976,
-0.0325765237,
-0.1822500378,
0.0456579067,
0.255636692,
0.0194954947,
0.0197298825,
0.0542693436,
-0.219706744,
0.1615283191,
-0.2340633869,
0.0589020923,
-0.451290369,
0.1625318825,
0.0268575009,
0.0533038639,
-0.059221603,
0.2286078781,
0.1907046288,
-0.1196360216,
0.0058784708,
0.1681662649,
-0.2004973143,
0.1012765914,
-0.255215317,
0.025185883,
0.2435627282,
0.0634227544,
-0.0079600923,
-0.1525691897,
0.1898520291,
-0.0640750527,
-0.3242455721,
0.3277554214,
0.1052784622,
0.0502942279,
0.0834908336,
-0.0356511921,
0.0753539354,
-0.1134132296,
-0.2598537207,
-0.4904219806,
-0.1066015959,
-0.1074672639,
-0.0115833059,
0.0517562851,
-0.3236915469,
0.1402302384,
0.9188792706,
-0.0623416193,
-0.0147717409,
-0.093986623,
-0.3445658386,
0.0729152337,
0.1259706616,
0.3295143545,
0.3965096474,
0.2283824086,
0.2659599781,
0.0557791144,
-0.1804531515,
-0.0716972649,
0.2371602654,
0.0097747929,
-0.0305782817,
0.2169628888,
0.2506073415,
-0.0417707153,
-0.556048274,
0.4048534632,
0.0905834436,
0.0257223714,
-0.395653069,
0.0577438474,
-0.5252434611,
-0.0719337612,
0.07489568,
-0.0868825763,
0.1610774398,
-0.422963798,
0.0589337312,
0.0997521281,
-0.4003637135,
0.1637859046,
-0.0271168388,
-0.0133933723,
0.0148532838,
0.0539085269,
-0.1009224281,
-0.1556563675,
-0.0931528956,
0.1648464203,
-0.0498674065,
-0.1709075719,
0.1399345547,
-0.0500380285,
-0.2620823383,
-0.2865417898,
-0.4427242875,
0.2523183227,
-0.3048397601,
0.058829695,
0.1076537967,
0.1922371238,
-0.3203524947,
0.0516174361,
0.3080894053,
-0.1982466131,
-0.3238242567,
0.1872300208,
0.1801668853,
-0.178922087,
-0.3981726766,
-0.4971636236,
0.1300307959,
-0.1350488067,
0.1815887541,
-0.1555294544,
-0.0630829036,
0.0275860578,
0.0029283091,
0.0385406688,
-0.3008103073,
0.0293907598,
-0.6573465466,
-0.2217812836,
0.3632721901,
-0.2966220975,
-0.5062741637,
-0.1254554242,
0.0979087502,
0.1011658832,
0.0171905383,
-0.3091312051,
-0.3677558601,
-0.0832215548,
0.1842752397,
-0.0637972802,
0.2143398821,
0.351496011,
-0.0061679631,
-0.1157656908,
-0.162976414,
-0.1138972342,
0.1560922414,
0.2188881338,
0.0149244554,
-0.2122609168,
0.4909070432,
0.1053584591,
0.2070963085,
0.2912399471,
0.0119978664,
0.2866947353,
-0.0825411007,
0.5360161662,
-0.1932150126,
-0.219810456,
0.1119848639,
-0.2987490296,
0.2717896402,
0.2111549675,
0.0109975636,
-0.1812850684,
0.0832055956,
0.2468917221,
-0.033726871,
-0.3023665249,
0.0729222447,
0.1730729043,
0.0819154829,
0.3885633349,
0.2997323275,
-0.0978402644,
-0.0457863398,
0.1973556876,
-0.2071419209,
0.0532041565,
-0.1990229189,
-0.55464077,
-0.1234235317,
-0.4953659773,
0.2916844189,
0.046814166,
0.0535959192,
-0.0667387322,
-0.3529547453,
0.0443254113,
0.1029575691,
0.4472457469,
-0.2107107043,
-0.1056638658,
-0.0093875416,
0.0204983577,
-0.308619231,
-0.0045577288,
-0.2849847078,
0.0043289438,
0.1969814897,
0.5901805758,
-0.3379149437,
-0.1179240569,
0.4202675521,
0.132851392,
-0.1366238594,
0.0133239664,
-0.1167633981,
-0.2524290681,
-0.1269263327,
-0.0232579336,
0.2281381637,
0.1141955331,
-0.1179246828,
-0.3082920313,
0.0313447043,
-0.2168827802,
0.074127391,
0.1819997579,
0.291056186,
0.0874120742,
0.1533721983,
0.0328699201,
0.2015524507,
-0.0967384651,
0.483946532,
-0.1953886598,
-0.1645174623,
0.1696025431,
-0.3728147149,
0.3802327812,
0.3001915812,
-0.0873067677,
0.063068442,
-0.0684941709,
-0.0157054774,
-0.2186793089,
-0.0503549874,
0.4710476398,
0.1342892349,
-0.0705215931,
-0.2062287331,
0.2522028983,
-0.1254612803,
-0.1417609602,
0.2963754237,
0.2017966956,
-0.3386617303,
0.259396106,
0.0027741492,
0.6919938922,
0.013143477,
0.1439872086,
0.1355213225,
-0.0851736963,
0.2800985873,
0.0058677271,
0.1299840659,
-0.3186069727,
-0.4095246792,
0.0413689837,
0.1173002794,
0.2598939538,
0.0215867087,
-0.0184926912,
0.1189651191,
0.0529270917,
0.5219531059,
-0.1091251597,
-0.1962872744,
0.0781301931,
-0.2820719481,
-0.2800421715,
0.2990986109,
0.1022765934,
-0.1271908879,
0.1078758985,
0.0645868629,
0.0232882202,
-0.2749246955,
0.0634103417,
0.130959481,
-0.039398402,
0.1502910256,
0.2416626066,
-0.3254873753,
-0.0723646805,
0.3597700894,
0.3453977108,
0.116304189,
0.0017101821,
0.0124283489,
0.0512766615,
0.4156193435,
-0.0058011636,
0.1373182982,
0.1973050088,
0.0137809366,
-0.0776174814,
0.1323335022,
0.0666213483,
-0.0871185884,
-0.1424061209,
0.0675828457,
0.06471394,
-0.5439126492,
-0.0392956212,
-0.0201067626,
0.3515427709,
-0.4296718538,
0.2250391245,
0.0568188876,
-0.1846992522,
0.30392012,
0.3186179698,
-0.2402120531,
-0.1534903198,
0.4318381846,
0.0366682038,
0.11578013,
0.4951033294,
-0.0813175738,
-0.2604909539,
-0.2637654543,
0.0334139913,
0.3343143463,
-0.2594819665,
-0.0055017266,
-0.149761036,
-0.048223868,
-0.0830149055,
0.1514919251,
-0.227889955,
-0.081410937,
-0.1304177344,
-0.1993327439,
-0.3260851204,
0.1621862352,
0.1392478049,
0.2407762706,
0.1289316863,
-0.0627674609,
-0.2677087188,
0.1025728285,
-0.4605870545,
-0.0582602583,
-0.080295302,
0.2680490315,
0.3867275715,
0.0230648108,
0.1932047606,
-0.2736715376,
0.3206257522,
0.3222122192,
-0.0779008344,
-0.3718765974,
-0.2599532604,
0.045859836,
0.1076994538,
0.1018245965,
-0.0309774578,
0.024044916,
-0.2011664957,
-0.3315498233,
0.3971155584,
0.0532397777,
0.0873994753,
0.3024339974,
-0.086399056,
0.0604444668,
0.2415838838,
-0.0798692405,
-0.0203666277,
-0.0690582767,
0.0304769799,
-0.0131827835,
-0.0466161296,
0.065599665,
0.0671438128,
0.0691493377,
0.0119935572,
0.0322475508,
0.5499171615,
-0.3013333082,
0.0264209211,
0.2025973797,
0.2565909028,
-0.0716707781,
-0.362675339,
0.0013689473,
0.1364888847,
0.3815193772,
-0.3571907282,
-0.1150806099,
0.4075303376,
0.1416532695,
0.1356966496,
0.1534601152,
0.1509611458,
-0.0615382269,
0.3127656579,
0.0162294097,
0.1870700717,
-0.1838775873,
0.1210739613,
0.3842480481,
-0.0590950958,
0.1473536193,
0.3182500005,
0.2877363265,
-0.0495943204,
0.2911366522,
0.0663148463,
-0.0297499634,
-0.1791939139,
0.2915976346,
-0.096802175,
-0.2994915545,
0.3273136616,
0.1368471682,
-0.2408311218,
0.3581096232,
0.1708301008,
0.2096785605,
-0.1921668798,
-0.2833564579,
-0.2604630589,
0.3138657808,
-0.4095667601,
-0.2418337464,
-0.1223416403,
-0.1359009445,
0.0042576045,
0.1382558346,
-0.1698545069,
-0.0716607869,
0.4369068146,
-0.0963118076,
-0.1244530156,
-0.2713049948,
-0.0526376925,
-0.1426900029,
0.2615810335,
0.0010812655,
0.2203297019,
-0.0193680562,
0.0602743477,
0.10058707,
0.0835644603,
-0.0154712722,
-0.1095958054,
0.2074825913,
0.142990157,
-0.1010166854,
-0.2637552917,
-0.0882175863,
0.3772137761,
0.1925727576,
0.0887078866,
0.2937476039,
0.2467879057,
-0.2389924228,
-0.0411044843,
0.1555912644,
0.4759064615,
-0.2429938763,
0.2295663357,
-0.1152867228,
-0.3539078236,
-0.1549536884,
-0.3295600116,
-0.1710233837,
0.037580099,
0.1887457371,
0.0451498702,
0.3476092219,
-0.124107793,
0.1588977575,
0.2408938706,
0.1669629216,
0.0467544012,
-0.4708096087,
-0.1284574568,
-0.2433347255,
-0.5270621777,
-0.0078693852,
0.0818513185,
-0.0226912461,
-0.1237663925,
0.1700596511,
0.4372746944,
-0.0557212494,
0.1674908996,
-0.2988943756,
0.0277434848,
-0.0554371811,
-0.1381867379,
-0.2429214418,
-0.0012600999,
-0.0526816808,
0.0943693668,
-0.2242774665,
0.1800947487,
0.193557024,
0.1312591434,
-0.1239116862,
0.3565219045,
-0.5263642073,
-0.3031452894,
0.1618171781,
0.3016984165,
0.0715804398,
-0.247328788,
-0.0058234371,
-0.0275592841,
-0.1512510329,
-0.0774735883,
0.2821403444,
-0.1465466619,
0.3806611896,
-0.0500941426,
-0.3484113812,
-0.0685105696,
0.1027242243,
0.2090615332,
-0.0204190575,
-0.2849867344,
0.315435946,
-0.0171892047,
-0.1848485172,
0.0949904621,
0.227932483,
-0.0925654247,
0.0231069773,
0.0586346835,
-0.4211028218,
0.4729935825,
-0.4269506335,
-0.3738433123,
0.0709981769,
0.1301802695,
0.1701503396,
-0.2235271782,
-0.6250747442,
-0.0060521215,
0.1710982323,
-0.3379547894,
-0.1425619423,
0.3280797601,
-0.1809663028,
0.1133661419,
-0.1432526708,
0.4612303078,
0.2436233908,
-0.2658312023,
0.2238110304,
-0.229427442
] |
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.1946799606,
0.1140984297,
-0.0127637908,
0.2849429548,
0.0645922571,
-0.0614171103,
0.132340163,
0.4565902054,
0.4422374368,
0.179229036,
0.2358962893,
0.38085109,
0.0545871705,
-0.0561686493,
-0.1504482627,
-0.062248785,
0.2574024796,
0.1362524033,
0.0472621247,
0.1269331276,
-0.1914966106,
0.2465310991,
-0.1496891379,
-0.0032422133,
-0.1895999908,
0.1437864304,
-0.2581938505,
0.2942797542,
-0.3553468585,
-0.6636258364,
0.2940474153,
0.4080142975,
0.3425832391,
0.5095258355,
-0.0001234102,
0.0544175655,
0.2841648161,
-0.2096640468,
-0.4484793842,
-0.464017868,
-0.1993892491,
0.0136942342,
0.247311458,
-0.1567812264,
0.1745912433,
-0.0732850656,
-0.0321103334,
-0.4220353365,
0.1694842428,
0.3417605758,
0.1407152563,
0.2266557813,
0.2764902413,
-0.2219138741,
-0.2547795773,
0.3302722871,
-0.0204172358,
0.4828839898,
-0.0186928958,
0.0731683671,
0.0414440706,
0.0742254406,
-0.0195428245,
-0.101779677,
0.0939250812,
-0.0247306079,
0.1620428264,
-0.0513428785,
0.2408138812,
0.1979950964,
0.6499522328,
-0.2013998181,
-0.5342012644,
0.035244748,
-0.0611303374,
0.1786231995,
0.3324408829,
-0.0698242933,
0.0839632601,
0.3244955242,
-0.0997815132,
-0.3653489947,
-0.2351393998,
-0.1203212887,
0.0710188448,
-0.2877637744,
-0.0193994213,
0.1131955758,
-0.03970927,
0.021446228,
0.4245888591,
-0.3535504341,
-0.3489904702,
-0.1019977108,
-0.0459272228,
-0.1144011319,
-0.0653344542,
-0.2706745267,
0.1133465692,
-0.0720997974,
0.251762718,
0.1316186935,
-0.0391714722,
0.0602459721,
0.2115244567,
0.2749887407,
0.4198957682,
0.2743372321,
0.035751611,
0.0714352429,
-0.2357527614,
0.0838929862,
-0.0404100642,
-0.1516599059,
0.2088323832,
-0.1358044893,
0.5703295469,
-0.4004872143,
-0.3274165392,
0.2602043748,
-0.2743057609,
-0.1729608327,
-0.1039799452,
0.2240312397,
0.093279168,
0.1972417831,
0.1087378711,
0.3317793012,
0.0468947962,
0.0277815871,
-0.1801335365,
0.0353043377,
0.0400687009,
0.0117865019,
0.0179785639,
-0.0999573618,
0.267460525,
0.0151784569,
-0.4577175379,
-0.1766546667,
-0.041361548,
-0.0473276749,
0.2514304519,
0.0383213982,
-0.2181575596,
-0.0566826537,
0.2363062948,
0.126300171,
-0.2239947617,
0.2120420933,
0.0718442202,
-0.15890643,
-0.1686421633,
0.1228037775,
-0.3944002092,
-0.260253638,
-0.2819333076,
-0.0493996628,
-0.0836640298,
-0.292011857,
-0.1123727486,
-0.3287760913,
-0.2373554409,
-0.122571528,
0.1428989023,
0.4307115078,
-0.5336274505,
0.1942442656,
0.186076045,
-0.0290214196,
0.0966061056,
-0.0230781697,
0.0003095008,
0.138022393,
-0.1793205738,
0.1278738528,
0.4110458493,
-0.5454347134,
-0.615943253,
0.3077107668,
-0.004989028,
0.1782057583,
-0.1437653899,
-0.021747116,
0.212734431,
-0.0530059189,
0.054437615,
0.0589729026,
0.053436242,
-0.0575243235,
-0.4947073758,
-0.332870543,
0.1166521013,
-0.0132596605,
-0.0556111299,
0.0919381231,
0.158182323,
-0.2094929069,
0.4844790399,
-0.0858413205,
-0.1812548041,
0.1170094311,
0.4515589774,
-0.0738896504,
0.0274725631,
-0.2316355705,
-0.550896883,
0.4312415421,
0.037728779,
-0.0222504009,
-0.0489410236,
0.0583771989,
-0.4379802048,
0.120342724,
-0.3182471097,
0.0465110913,
0.0106166974,
0.0783771574,
-0.0866949558,
-0.0088241994,
-0.1149404794,
0.1405700445,
-0.1519614458,
0.069858402,
0.0043590181,
0.3365994096,
-0.2037378848,
-0.2205162048,
0.1709298939,
-0.0127888508,
0.2898360193,
-0.2678136826,
-0.3201780617,
0.4959193468,
0.2282745093,
0.0215908065,
-0.0704144686,
-0.3370971382,
-0.0950708836,
-0.0260213017,
0.1928254515,
0.498344332,
0.0574059784,
0.0559967607,
-0.2572027445,
0.3138728738,
0.0657232702,
0.0568131171,
0.0700780302,
0.178189978,
0.2946605086,
-0.0244198143,
-0.0170398802,
-0.3440819979,
0.2174292803,
0.0188182555,
0.0102336109,
0.0753728151,
-0.1335324943,
0.1482356042,
0.2589489222,
0.0366389155,
0.1828768104,
0.0873259306,
0.0021233018,
-0.4102321267,
0.059199065,
0.3296465874,
0.6812977791,
-0.0120208357,
-0.0898990259,
-0.0542865917,
-0.0393868349,
0.039272517,
0.1494916081,
-0.0172951445,
0.2711473703,
0.1783985943,
0.1901723742,
0.0689663962,
-0.2123127729,
-0.1901509166,
-0.0073721819,
0.0510647073,
-0.3820839524,
0.1315281093,
-0.1379302442,
0.5604394674,
-0.2043239921,
-0.5258817077,
-0.0548610725,
-0.3896039426,
-0.1108687744,
0.3982455134,
-0.1051947922,
0.0420948192,
-0.5863331556,
0.0428648517,
-0.0554989353,
-0.3256072998,
-0.1113469452,
-0.1962000132,
-0.1263740063,
-0.1553940773,
0.1137430072,
0.1928960085,
0.2179134637,
-0.1094698459,
-0.1682272553,
-0.4347152114,
-0.333981514,
0.1541956067,
-0.1012643278,
0.0506949425,
0.1850076169,
-0.0659797788,
0.1797926128,
-0.0064855479,
0.0098093525,
-0.1555844694,
-0.3324506879,
0.1918929815,
0.2623597383,
-0.1795148402,
0.0405298397,
-0.4744684994,
-0.3170479238,
-0.3201009631,
0.2410695255,
-0.0716331154,
0.0295917485,
0.0510347299,
0.174956724,
0.1524554342,
0.0156617872,
0.1022226587,
-0.0204781443,
-0.1949145198,
0.117174983,
-0.0141775012,
-0.4500831962,
0.108824119,
0.0357695967,
0.1472646594,
0.2089919299,
-0.2778184116,
-0.1442974806,
0.0047043487,
0.4145676196,
-0.0329647809,
-0.2965222597,
0.4994243383,
0.3355879188,
0.0297878683,
-0.1571240276,
-0.0598423593,
0.1395884007,
0.099757269,
0.2127373815,
-0.3571594357,
0.4544911683,
-0.3967371881,
0.2623895407,
-0.056121476,
-0.1933415979,
0.2192242593,
0.135514006,
0.3633721173,
-0.4195737541,
-0.2501191795,
-0.0181207806,
-0.2273001671,
-0.1420901418,
0.0491863936,
-0.1898753643,
0.3078669906,
-0.0113014579,
-0.271341145,
-0.1212764978,
-0.3088130057,
-0.0883088261,
-0.6213794351,
0.2525455058,
0.1294983625,
0.2512168288,
-0.1520727873,
0.0570481457,
0.0548917279,
0.1056843251,
0.361989826,
-0.1298967004,
-0.6689376831,
0.4119168818,
-0.2728250325,
0.3531419337,
0.0170029067,
0.6950644255,
0.0251038671,
-0.1877916157,
-0.074011445,
-0.0956238061,
0.371663332,
0.1301260889,
0.0777467042,
0.187523216,
-0.1503261328,
-0.6920771599,
-0.1083947644,
0.0503960103,
0.3830851316,
0.1262313724,
0.362961024,
-0.0177811235,
-0.1991339922,
0.2198237926,
0.3881292045,
-0.1670644134,
-0.274376452,
-0.2853177786,
-0.13652426,
-0.1515446752,
-0.2810796201,
-0.0419631898,
0.2196073532,
-0.2597107291,
-0.062531203,
-0.5216524601,
-0.3158729672,
0.0641467422,
0.1999336481,
0.4470639229,
-0.3979618847,
0.2182784677,
0.250328064,
0.1697053909,
0.5388913751,
0.4505367279,
-0.0512385629,
-0.4795737267,
-0.0396613628,
-0.1913183928,
0.0461554267,
0.0478833914,
-0.0462602787,
-0.1848698258,
0.0630238429,
-0.2803146839,
-0.3086192012,
0.0911358297,
0.0995176956,
0.0440451503,
-0.3165178299,
-0.1771358252,
0.5262104273,
-0.0977218673,
-0.1301517636,
0.4414812028,
0.3330864012,
-0.2364698052,
0.5683751702,
-0.0350574143,
0.6247903109,
0.2005381286,
0.1264472902,
0.272700727,
-0.51545012,
0.0626659989,
0.5921404362,
0.0294376761,
-0.5868448019,
-0.1553601921,
0.0331247747,
-0.1253830194,
0.0326818116,
0.0368703604,
-0.3613359928,
0.0716337636,
0.0084464103,
-0.2822268903,
0.1183373705,
0.3593576849,
-0.2079015076,
0.1589394808,
-0.3033197224,
0.0912196264,
0.1137904376,
0.1030309945,
-0.0877369791,
-0.0660763383,
-0.1419513971,
-0.3079771698,
-0.1325314492,
0.2350483835,
-0.1199389994,
0.4439126253,
0.2897055149,
-0.4493186474,
0.2196411788,
0.2174479961,
0.4070448279,
-0.0582864508,
-0.1289930493,
-0.0443205871,
-0.2538414598,
-0.0569629073,
0.2750829458,
-0.0208604001,
0.2357588112,
0.0243198723,
-0.2413081974,
0.0149242105,
-0.2202431411,
-0.3488709927,
-0.2136552036,
-0.0252611786,
0.0917009264,
-0.4033419192,
-0.5704157948,
-0.3656396568,
-0.1338035613,
-0.3513587117,
0.0451619998,
0.1369812191,
0.0903128907,
0.1345511228,
-0.030370431,
-0.3727881312,
0.1286840141,
0.478513062,
-0.1395129412,
-0.2365069836,
0.5704622269,
-0.0664494932,
0.1163968071,
-0.2200825661,
0.1668680161,
0.2937475145,
-0.2160444856,
0.4291683137,
-0.2352194935,
-0.1053849906,
-0.0334324762,
0.5656456947,
0.1970901042,
-0.1196102351,
0.0568212122,
-0.2952888012,
-0.3237189353,
0.137645334,
-0.0380472466,
0.4634031355,
-0.0172832757,
-0.3075000048,
-0.2098487616,
0.1128284633,
-0.2028449774,
0.0374975279,
0.0160003006,
0.0449074432,
0.1605365872,
-0.046205394,
0.1810543984,
-0.3117863238,
0.097540766,
-0.1628715247,
0.0355672054,
-0.0206244849,
-0.2262710631,
0.1717493385,
0.1430511028,
0.2631167769,
-0.0958964378,
-0.1393289864,
0.0043115746,
-0.0736729652,
-0.0378091745,
0.3947648704,
-0.1223446801,
0.2778860927,
0.0895337313,
0.206466198,
-0.131205678,
0.2292110324,
0.0644207001,
0.3075909615,
-0.0757779106,
0.2196437269,
-0.079422161,
-0.0892367512,
-0.2326030433,
0.1826040149,
0.0293284673,
0.0955830514,
0.1823246926,
-0.1802756488,
-0.0411884189,
0.1104307175,
0.2567685246,
0.5237183571,
-0.1497170031,
-0.2371404767,
-0.0213251002,
0.1600281745,
-0.1601505876,
-0.2017438114,
0.300362289,
-0.0835292786,
-0.1162904873,
-0.0765227526,
-0.2054961026,
-0.1942749172,
-0.1985164732,
0.3335353732,
0.5401272178,
-0.0722699016,
0.2756745815,
0.1050366536,
-0.1331187636,
0.1698140204,
0.4339621067,
-0.0268715732,
0.2728075981,
0.296913892,
-0.01069941,
0.4752701521,
0.1081377417,
0.1763000935,
0.1444733143,
0.0295527354,
0.0501387157,
-0.2383727878,
0.0339758918,
0.0337765738,
0.0379044116,
0.2074877918,
-0.533828795,
-0.0095713809,
-0.0529129058,
-0.3925663829,
-0.0503621958,
-0.2166734189,
-0.2375061512,
-0.1166065037,
0.1916656494,
-0.0871482491,
-0.1870366633,
0.2569026351,
0.1854580343,
0.134134084,
-0.1262692064,
-0.1991170943,
0.2447040379,
0.1286830604,
-0.1152324229,
-0.2423140705,
0.1165310219,
0.0655260533,
-0.0270041004,
0.284368813,
0.3048305511,
0.5131986141,
0.4630438089,
-0.1235536784,
-0.0936735123,
-0.0676190257,
-0.0890744478,
0.1606598049,
0.1176436394,
-0.2288688123,
0.14198789,
0.3497954905,
0.1042522937,
0.0525656529,
0.3554263711,
0.182885319,
0.2552397847,
-0.0793644711,
0.8174859881,
0.0652652979,
-0.4018479586,
0.1853938997,
0.2061244547,
-0.0562278442,
-0.2423316836,
0.2547926903,
0.2379752249,
0.0354117341,
0.043099422,
0.0429511145,
-0.0761297494,
0.4061383009,
0.3945251703,
-0.0091296546,
-0.2530899942,
0.2011502534,
-0.5567246079,
0.1267213374,
0.1150674969,
-0.0242358148,
0.1735586524,
0.1886163354,
0.1791177988,
-0.0079983212,
0.1234041452,
0.3020166755,
-0.2655390799,
-0.073275812,
-0.2039493322,
-0.0483578295,
0.1700235605,
-0.038417004,
-0.0339167267,
-0.435308069,
0.2317861915,
-0.2152295858,
-0.0408022925,
-0.1203103364,
-0.1444329619,
-0.0316803418,
-0.0343609564,
0.4194561839,
0.1286737025,
0.4079838991,
0.0496628508,
-0.4076711237,
-0.2884939909,
-0.197359845,
-0.1579229236,
0.2628086507,
0.0948494077,
0.6385341883,
-0.0972696543,
0.0452130213,
-0.2792317271,
0.2594891191,
-0.1286930591,
-0.0773253441,
-0.2083820999,
0.1652531922,
0.1398074925,
0.0103357881,
0.2678921819,
0.1165605038,
-0.0676964968,
0.375880748,
-0.3817229569,
-0.2833262086,
0.4406761527,
0.0210839659,
-0.1905986071,
-0.0162197836,
0.300540179,
-0.0426338688,
-0.1816292703,
-0.7152318954,
0.0028659105,
0.415509522,
-0.0063178092,
-0.0824660584,
0.1022369638,
0.2898764014,
0.186523661,
-0.0089994743,
0.5413073301,
-0.0108731277,
0.0113002956,
-0.0968639255,
-0.0729475543
] |
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.1946799606,
0.1140984297,
-0.0127637908,
0.2849429548,
0.0645922571,
-0.0614171103,
0.132340163,
0.4565902054,
0.4422374368,
0.179229036,
0.2358962893,
0.38085109,
0.0545871705,
-0.0561686493,
-0.1504482627,
-0.062248785,
0.2574024796,
0.1362524033,
0.0472621247,
0.1269331276,
-0.1914966106,
0.2465310991,
-0.1496891379,
-0.0032422133,
-0.1895999908,
0.1437864304,
-0.2581938505,
0.2942797542,
-0.3553468585,
-0.6636258364,
0.2940474153,
0.4080142975,
0.3425832391,
0.5095258355,
-0.0001234102,
0.0544175655,
0.2841648161,
-0.2096640468,
-0.4484793842,
-0.464017868,
-0.1993892491,
0.0136942342,
0.247311458,
-0.1567812264,
0.1745912433,
-0.0732850656,
-0.0321103334,
-0.4220353365,
0.1694842428,
0.3417605758,
0.1407152563,
0.2266557813,
0.2764902413,
-0.2219138741,
-0.2547795773,
0.3302722871,
-0.0204172358,
0.4828839898,
-0.0186928958,
0.0731683671,
0.0414440706,
0.0742254406,
-0.0195428245,
-0.101779677,
0.0939250812,
-0.0247306079,
0.1620428264,
-0.0513428785,
0.2408138812,
0.1979950964,
0.6499522328,
-0.2013998181,
-0.5342012644,
0.035244748,
-0.0611303374,
0.1786231995,
0.3324408829,
-0.0698242933,
0.0839632601,
0.3244955242,
-0.0997815132,
-0.3653489947,
-0.2351393998,
-0.1203212887,
0.0710188448,
-0.2877637744,
-0.0193994213,
0.1131955758,
-0.03970927,
0.021446228,
0.4245888591,
-0.3535504341,
-0.3489904702,
-0.1019977108,
-0.0459272228,
-0.1144011319,
-0.0653344542,
-0.2706745267,
0.1133465692,
-0.0720997974,
0.251762718,
0.1316186935,
-0.0391714722,
0.0602459721,
0.2115244567,
0.2749887407,
0.4198957682,
0.2743372321,
0.035751611,
0.0714352429,
-0.2357527614,
0.0838929862,
-0.0404100642,
-0.1516599059,
0.2088323832,
-0.1358044893,
0.5703295469,
-0.4004872143,
-0.3274165392,
0.2602043748,
-0.2743057609,
-0.1729608327,
-0.1039799452,
0.2240312397,
0.093279168,
0.1972417831,
0.1087378711,
0.3317793012,
0.0468947962,
0.0277815871,
-0.1801335365,
0.0353043377,
0.0400687009,
0.0117865019,
0.0179785639,
-0.0999573618,
0.267460525,
0.0151784569,
-0.4577175379,
-0.1766546667,
-0.041361548,
-0.0473276749,
0.2514304519,
0.0383213982,
-0.2181575596,
-0.0566826537,
0.2363062948,
0.126300171,
-0.2239947617,
0.2120420933,
0.0718442202,
-0.15890643,
-0.1686421633,
0.1228037775,
-0.3944002092,
-0.260253638,
-0.2819333076,
-0.0493996628,
-0.0836640298,
-0.292011857,
-0.1123727486,
-0.3287760913,
-0.2373554409,
-0.122571528,
0.1428989023,
0.4307115078,
-0.5336274505,
0.1942442656,
0.186076045,
-0.0290214196,
0.0966061056,
-0.0230781697,
0.0003095008,
0.138022393,
-0.1793205738,
0.1278738528,
0.4110458493,
-0.5454347134,
-0.615943253,
0.3077107668,
-0.004989028,
0.1782057583,
-0.1437653899,
-0.021747116,
0.212734431,
-0.0530059189,
0.054437615,
0.0589729026,
0.053436242,
-0.0575243235,
-0.4947073758,
-0.332870543,
0.1166521013,
-0.0132596605,
-0.0556111299,
0.0919381231,
0.158182323,
-0.2094929069,
0.4844790399,
-0.0858413205,
-0.1812548041,
0.1170094311,
0.4515589774,
-0.0738896504,
0.0274725631,
-0.2316355705,
-0.550896883,
0.4312415421,
0.037728779,
-0.0222504009,
-0.0489410236,
0.0583771989,
-0.4379802048,
0.120342724,
-0.3182471097,
0.0465110913,
0.0106166974,
0.0783771574,
-0.0866949558,
-0.0088241994,
-0.1149404794,
0.1405700445,
-0.1519614458,
0.069858402,
0.0043590181,
0.3365994096,
-0.2037378848,
-0.2205162048,
0.1709298939,
-0.0127888508,
0.2898360193,
-0.2678136826,
-0.3201780617,
0.4959193468,
0.2282745093,
0.0215908065,
-0.0704144686,
-0.3370971382,
-0.0950708836,
-0.0260213017,
0.1928254515,
0.498344332,
0.0574059784,
0.0559967607,
-0.2572027445,
0.3138728738,
0.0657232702,
0.0568131171,
0.0700780302,
0.178189978,
0.2946605086,
-0.0244198143,
-0.0170398802,
-0.3440819979,
0.2174292803,
0.0188182555,
0.0102336109,
0.0753728151,
-0.1335324943,
0.1482356042,
0.2589489222,
0.0366389155,
0.1828768104,
0.0873259306,
0.0021233018,
-0.4102321267,
0.059199065,
0.3296465874,
0.6812977791,
-0.0120208357,
-0.0898990259,
-0.0542865917,
-0.0393868349,
0.039272517,
0.1494916081,
-0.0172951445,
0.2711473703,
0.1783985943,
0.1901723742,
0.0689663962,
-0.2123127729,
-0.1901509166,
-0.0073721819,
0.0510647073,
-0.3820839524,
0.1315281093,
-0.1379302442,
0.5604394674,
-0.2043239921,
-0.5258817077,
-0.0548610725,
-0.3896039426,
-0.1108687744,
0.3982455134,
-0.1051947922,
0.0420948192,
-0.5863331556,
0.0428648517,
-0.0554989353,
-0.3256072998,
-0.1113469452,
-0.1962000132,
-0.1263740063,
-0.1553940773,
0.1137430072,
0.1928960085,
0.2179134637,
-0.1094698459,
-0.1682272553,
-0.4347152114,
-0.333981514,
0.1541956067,
-0.1012643278,
0.0506949425,
0.1850076169,
-0.0659797788,
0.1797926128,
-0.0064855479,
0.0098093525,
-0.1555844694,
-0.3324506879,
0.1918929815,
0.2623597383,
-0.1795148402,
0.0405298397,
-0.4744684994,
-0.3170479238,
-0.3201009631,
0.2410695255,
-0.0716331154,
0.0295917485,
0.0510347299,
0.174956724,
0.1524554342,
0.0156617872,
0.1022226587,
-0.0204781443,
-0.1949145198,
0.117174983,
-0.0141775012,
-0.4500831962,
0.108824119,
0.0357695967,
0.1472646594,
0.2089919299,
-0.2778184116,
-0.1442974806,
0.0047043487,
0.4145676196,
-0.0329647809,
-0.2965222597,
0.4994243383,
0.3355879188,
0.0297878683,
-0.1571240276,
-0.0598423593,
0.1395884007,
0.099757269,
0.2127373815,
-0.3571594357,
0.4544911683,
-0.3967371881,
0.2623895407,
-0.056121476,
-0.1933415979,
0.2192242593,
0.135514006,
0.3633721173,
-0.4195737541,
-0.2501191795,
-0.0181207806,
-0.2273001671,
-0.1420901418,
0.0491863936,
-0.1898753643,
0.3078669906,
-0.0113014579,
-0.271341145,
-0.1212764978,
-0.3088130057,
-0.0883088261,
-0.6213794351,
0.2525455058,
0.1294983625,
0.2512168288,
-0.1520727873,
0.0570481457,
0.0548917279,
0.1056843251,
0.361989826,
-0.1298967004,
-0.6689376831,
0.4119168818,
-0.2728250325,
0.3531419337,
0.0170029067,
0.6950644255,
0.0251038671,
-0.1877916157,
-0.074011445,
-0.0956238061,
0.371663332,
0.1301260889,
0.0777467042,
0.187523216,
-0.1503261328,
-0.6920771599,
-0.1083947644,
0.0503960103,
0.3830851316,
0.1262313724,
0.362961024,
-0.0177811235,
-0.1991339922,
0.2198237926,
0.3881292045,
-0.1670644134,
-0.274376452,
-0.2853177786,
-0.13652426,
-0.1515446752,
-0.2810796201,
-0.0419631898,
0.2196073532,
-0.2597107291,
-0.062531203,
-0.5216524601,
-0.3158729672,
0.0641467422,
0.1999336481,
0.4470639229,
-0.3979618847,
0.2182784677,
0.250328064,
0.1697053909,
0.5388913751,
0.4505367279,
-0.0512385629,
-0.4795737267,
-0.0396613628,
-0.1913183928,
0.0461554267,
0.0478833914,
-0.0462602787,
-0.1848698258,
0.0630238429,
-0.2803146839,
-0.3086192012,
0.0911358297,
0.0995176956,
0.0440451503,
-0.3165178299,
-0.1771358252,
0.5262104273,
-0.0977218673,
-0.1301517636,
0.4414812028,
0.3330864012,
-0.2364698052,
0.5683751702,
-0.0350574143,
0.6247903109,
0.2005381286,
0.1264472902,
0.272700727,
-0.51545012,
0.0626659989,
0.5921404362,
0.0294376761,
-0.5868448019,
-0.1553601921,
0.0331247747,
-0.1253830194,
0.0326818116,
0.0368703604,
-0.3613359928,
0.0716337636,
0.0084464103,
-0.2822268903,
0.1183373705,
0.3593576849,
-0.2079015076,
0.1589394808,
-0.3033197224,
0.0912196264,
0.1137904376,
0.1030309945,
-0.0877369791,
-0.0660763383,
-0.1419513971,
-0.3079771698,
-0.1325314492,
0.2350483835,
-0.1199389994,
0.4439126253,
0.2897055149,
-0.4493186474,
0.2196411788,
0.2174479961,
0.4070448279,
-0.0582864508,
-0.1289930493,
-0.0443205871,
-0.2538414598,
-0.0569629073,
0.2750829458,
-0.0208604001,
0.2357588112,
0.0243198723,
-0.2413081974,
0.0149242105,
-0.2202431411,
-0.3488709927,
-0.2136552036,
-0.0252611786,
0.0917009264,
-0.4033419192,
-0.5704157948,
-0.3656396568,
-0.1338035613,
-0.3513587117,
0.0451619998,
0.1369812191,
0.0903128907,
0.1345511228,
-0.030370431,
-0.3727881312,
0.1286840141,
0.478513062,
-0.1395129412,
-0.2365069836,
0.5704622269,
-0.0664494932,
0.1163968071,
-0.2200825661,
0.1668680161,
0.2937475145,
-0.2160444856,
0.4291683137,
-0.2352194935,
-0.1053849906,
-0.0334324762,
0.5656456947,
0.1970901042,
-0.1196102351,
0.0568212122,
-0.2952888012,
-0.3237189353,
0.137645334,
-0.0380472466,
0.4634031355,
-0.0172832757,
-0.3075000048,
-0.2098487616,
0.1128284633,
-0.2028449774,
0.0374975279,
0.0160003006,
0.0449074432,
0.1605365872,
-0.046205394,
0.1810543984,
-0.3117863238,
0.097540766,
-0.1628715247,
0.0355672054,
-0.0206244849,
-0.2262710631,
0.1717493385,
0.1430511028,
0.2631167769,
-0.0958964378,
-0.1393289864,
0.0043115746,
-0.0736729652,
-0.0378091745,
0.3947648704,
-0.1223446801,
0.2778860927,
0.0895337313,
0.206466198,
-0.131205678,
0.2292110324,
0.0644207001,
0.3075909615,
-0.0757779106,
0.2196437269,
-0.079422161,
-0.0892367512,
-0.2326030433,
0.1826040149,
0.0293284673,
0.0955830514,
0.1823246926,
-0.1802756488,
-0.0411884189,
0.1104307175,
0.2567685246,
0.5237183571,
-0.1497170031,
-0.2371404767,
-0.0213251002,
0.1600281745,
-0.1601505876,
-0.2017438114,
0.300362289,
-0.0835292786,
-0.1162904873,
-0.0765227526,
-0.2054961026,
-0.1942749172,
-0.1985164732,
0.3335353732,
0.5401272178,
-0.0722699016,
0.2756745815,
0.1050366536,
-0.1331187636,
0.1698140204,
0.4339621067,
-0.0268715732,
0.2728075981,
0.296913892,
-0.01069941,
0.4752701521,
0.1081377417,
0.1763000935,
0.1444733143,
0.0295527354,
0.0501387157,
-0.2383727878,
0.0339758918,
0.0337765738,
0.0379044116,
0.2074877918,
-0.533828795,
-0.0095713809,
-0.0529129058,
-0.3925663829,
-0.0503621958,
-0.2166734189,
-0.2375061512,
-0.1166065037,
0.1916656494,
-0.0871482491,
-0.1870366633,
0.2569026351,
0.1854580343,
0.134134084,
-0.1262692064,
-0.1991170943,
0.2447040379,
0.1286830604,
-0.1152324229,
-0.2423140705,
0.1165310219,
0.0655260533,
-0.0270041004,
0.284368813,
0.3048305511,
0.5131986141,
0.4630438089,
-0.1235536784,
-0.0936735123,
-0.0676190257,
-0.0890744478,
0.1606598049,
0.1176436394,
-0.2288688123,
0.14198789,
0.3497954905,
0.1042522937,
0.0525656529,
0.3554263711,
0.182885319,
0.2552397847,
-0.0793644711,
0.8174859881,
0.0652652979,
-0.4018479586,
0.1853938997,
0.2061244547,
-0.0562278442,
-0.2423316836,
0.2547926903,
0.2379752249,
0.0354117341,
0.043099422,
0.0429511145,
-0.0761297494,
0.4061383009,
0.3945251703,
-0.0091296546,
-0.2530899942,
0.2011502534,
-0.5567246079,
0.1267213374,
0.1150674969,
-0.0242358148,
0.1735586524,
0.1886163354,
0.1791177988,
-0.0079983212,
0.1234041452,
0.3020166755,
-0.2655390799,
-0.073275812,
-0.2039493322,
-0.0483578295,
0.1700235605,
-0.038417004,
-0.0339167267,
-0.435308069,
0.2317861915,
-0.2152295858,
-0.0408022925,
-0.1203103364,
-0.1444329619,
-0.0316803418,
-0.0343609564,
0.4194561839,
0.1286737025,
0.4079838991,
0.0496628508,
-0.4076711237,
-0.2884939909,
-0.197359845,
-0.1579229236,
0.2628086507,
0.0948494077,
0.6385341883,
-0.0972696543,
0.0452130213,
-0.2792317271,
0.2594891191,
-0.1286930591,
-0.0773253441,
-0.2083820999,
0.1652531922,
0.1398074925,
0.0103357881,
0.2678921819,
0.1165605038,
-0.0676964968,
0.375880748,
-0.3817229569,
-0.2833262086,
0.4406761527,
0.0210839659,
-0.1905986071,
-0.0162197836,
0.300540179,
-0.0426338688,
-0.1816292703,
-0.7152318954,
0.0028659105,
0.415509522,
-0.0063178092,
-0.0824660584,
0.1022369638,
0.2898764014,
0.186523661,
-0.0089994743,
0.5413073301,
-0.0108731277,
0.0113002956,
-0.0968639255,
-0.0729475543
] |
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.1946799606,
0.1140984297,
-0.0127637908,
0.2849429548,
0.0645922571,
-0.0614171103,
0.132340163,
0.4565902054,
0.4422374368,
0.179229036,
0.2358962893,
0.38085109,
0.0545871705,
-0.0561686493,
-0.1504482627,
-0.062248785,
0.2574024796,
0.1362524033,
0.0472621247,
0.1269331276,
-0.1914966106,
0.2465310991,
-0.1496891379,
-0.0032422133,
-0.1895999908,
0.1437864304,
-0.2581938505,
0.2942797542,
-0.3553468585,
-0.6636258364,
0.2940474153,
0.4080142975,
0.3425832391,
0.5095258355,
-0.0001234102,
0.0544175655,
0.2841648161,
-0.2096640468,
-0.4484793842,
-0.464017868,
-0.1993892491,
0.0136942342,
0.247311458,
-0.1567812264,
0.1745912433,
-0.0732850656,
-0.0321103334,
-0.4220353365,
0.1694842428,
0.3417605758,
0.1407152563,
0.2266557813,
0.2764902413,
-0.2219138741,
-0.2547795773,
0.3302722871,
-0.0204172358,
0.4828839898,
-0.0186928958,
0.0731683671,
0.0414440706,
0.0742254406,
-0.0195428245,
-0.101779677,
0.0939250812,
-0.0247306079,
0.1620428264,
-0.0513428785,
0.2408138812,
0.1979950964,
0.6499522328,
-0.2013998181,
-0.5342012644,
0.035244748,
-0.0611303374,
0.1786231995,
0.3324408829,
-0.0698242933,
0.0839632601,
0.3244955242,
-0.0997815132,
-0.3653489947,
-0.2351393998,
-0.1203212887,
0.0710188448,
-0.2877637744,
-0.0193994213,
0.1131955758,
-0.03970927,
0.021446228,
0.4245888591,
-0.3535504341,
-0.3489904702,
-0.1019977108,
-0.0459272228,
-0.1144011319,
-0.0653344542,
-0.2706745267,
0.1133465692,
-0.0720997974,
0.251762718,
0.1316186935,
-0.0391714722,
0.0602459721,
0.2115244567,
0.2749887407,
0.4198957682,
0.2743372321,
0.035751611,
0.0714352429,
-0.2357527614,
0.0838929862,
-0.0404100642,
-0.1516599059,
0.2088323832,
-0.1358044893,
0.5703295469,
-0.4004872143,
-0.3274165392,
0.2602043748,
-0.2743057609,
-0.1729608327,
-0.1039799452,
0.2240312397,
0.093279168,
0.1972417831,
0.1087378711,
0.3317793012,
0.0468947962,
0.0277815871,
-0.1801335365,
0.0353043377,
0.0400687009,
0.0117865019,
0.0179785639,
-0.0999573618,
0.267460525,
0.0151784569,
-0.4577175379,
-0.1766546667,
-0.041361548,
-0.0473276749,
0.2514304519,
0.0383213982,
-0.2181575596,
-0.0566826537,
0.2363062948,
0.126300171,
-0.2239947617,
0.2120420933,
0.0718442202,
-0.15890643,
-0.1686421633,
0.1228037775,
-0.3944002092,
-0.260253638,
-0.2819333076,
-0.0493996628,
-0.0836640298,
-0.292011857,
-0.1123727486,
-0.3287760913,
-0.2373554409,
-0.122571528,
0.1428989023,
0.4307115078,
-0.5336274505,
0.1942442656,
0.186076045,
-0.0290214196,
0.0966061056,
-0.0230781697,
0.0003095008,
0.138022393,
-0.1793205738,
0.1278738528,
0.4110458493,
-0.5454347134,
-0.615943253,
0.3077107668,
-0.004989028,
0.1782057583,
-0.1437653899,
-0.021747116,
0.212734431,
-0.0530059189,
0.054437615,
0.0589729026,
0.053436242,
-0.0575243235,
-0.4947073758,
-0.332870543,
0.1166521013,
-0.0132596605,
-0.0556111299,
0.0919381231,
0.158182323,
-0.2094929069,
0.4844790399,
-0.0858413205,
-0.1812548041,
0.1170094311,
0.4515589774,
-0.0738896504,
0.0274725631,
-0.2316355705,
-0.550896883,
0.4312415421,
0.037728779,
-0.0222504009,
-0.0489410236,
0.0583771989,
-0.4379802048,
0.120342724,
-0.3182471097,
0.0465110913,
0.0106166974,
0.0783771574,
-0.0866949558,
-0.0088241994,
-0.1149404794,
0.1405700445,
-0.1519614458,
0.069858402,
0.0043590181,
0.3365994096,
-0.2037378848,
-0.2205162048,
0.1709298939,
-0.0127888508,
0.2898360193,
-0.2678136826,
-0.3201780617,
0.4959193468,
0.2282745093,
0.0215908065,
-0.0704144686,
-0.3370971382,
-0.0950708836,
-0.0260213017,
0.1928254515,
0.498344332,
0.0574059784,
0.0559967607,
-0.2572027445,
0.3138728738,
0.0657232702,
0.0568131171,
0.0700780302,
0.178189978,
0.2946605086,
-0.0244198143,
-0.0170398802,
-0.3440819979,
0.2174292803,
0.0188182555,
0.0102336109,
0.0753728151,
-0.1335324943,
0.1482356042,
0.2589489222,
0.0366389155,
0.1828768104,
0.0873259306,
0.0021233018,
-0.4102321267,
0.059199065,
0.3296465874,
0.6812977791,
-0.0120208357,
-0.0898990259,
-0.0542865917,
-0.0393868349,
0.039272517,
0.1494916081,
-0.0172951445,
0.2711473703,
0.1783985943,
0.1901723742,
0.0689663962,
-0.2123127729,
-0.1901509166,
-0.0073721819,
0.0510647073,
-0.3820839524,
0.1315281093,
-0.1379302442,
0.5604394674,
-0.2043239921,
-0.5258817077,
-0.0548610725,
-0.3896039426,
-0.1108687744,
0.3982455134,
-0.1051947922,
0.0420948192,
-0.5863331556,
0.0428648517,
-0.0554989353,
-0.3256072998,
-0.1113469452,
-0.1962000132,
-0.1263740063,
-0.1553940773,
0.1137430072,
0.1928960085,
0.2179134637,
-0.1094698459,
-0.1682272553,
-0.4347152114,
-0.333981514,
0.1541956067,
-0.1012643278,
0.0506949425,
0.1850076169,
-0.0659797788,
0.1797926128,
-0.0064855479,
0.0098093525,
-0.1555844694,
-0.3324506879,
0.1918929815,
0.2623597383,
-0.1795148402,
0.0405298397,
-0.4744684994,
-0.3170479238,
-0.3201009631,
0.2410695255,
-0.0716331154,
0.0295917485,
0.0510347299,
0.174956724,
0.1524554342,
0.0156617872,
0.1022226587,
-0.0204781443,
-0.1949145198,
0.117174983,
-0.0141775012,
-0.4500831962,
0.108824119,
0.0357695967,
0.1472646594,
0.2089919299,
-0.2778184116,
-0.1442974806,
0.0047043487,
0.4145676196,
-0.0329647809,
-0.2965222597,
0.4994243383,
0.3355879188,
0.0297878683,
-0.1571240276,
-0.0598423593,
0.1395884007,
0.099757269,
0.2127373815,
-0.3571594357,
0.4544911683,
-0.3967371881,
0.2623895407,
-0.056121476,
-0.1933415979,
0.2192242593,
0.135514006,
0.3633721173,
-0.4195737541,
-0.2501191795,
-0.0181207806,
-0.2273001671,
-0.1420901418,
0.0491863936,
-0.1898753643,
0.3078669906,
-0.0113014579,
-0.271341145,
-0.1212764978,
-0.3088130057,
-0.0883088261,
-0.6213794351,
0.2525455058,
0.1294983625,
0.2512168288,
-0.1520727873,
0.0570481457,
0.0548917279,
0.1056843251,
0.361989826,
-0.1298967004,
-0.6689376831,
0.4119168818,
-0.2728250325,
0.3531419337,
0.0170029067,
0.6950644255,
0.0251038671,
-0.1877916157,
-0.074011445,
-0.0956238061,
0.371663332,
0.1301260889,
0.0777467042,
0.187523216,
-0.1503261328,
-0.6920771599,
-0.1083947644,
0.0503960103,
0.3830851316,
0.1262313724,
0.362961024,
-0.0177811235,
-0.1991339922,
0.2198237926,
0.3881292045,
-0.1670644134,
-0.274376452,
-0.2853177786,
-0.13652426,
-0.1515446752,
-0.2810796201,
-0.0419631898,
0.2196073532,
-0.2597107291,
-0.062531203,
-0.5216524601,
-0.3158729672,
0.0641467422,
0.1999336481,
0.4470639229,
-0.3979618847,
0.2182784677,
0.250328064,
0.1697053909,
0.5388913751,
0.4505367279,
-0.0512385629,
-0.4795737267,
-0.0396613628,
-0.1913183928,
0.0461554267,
0.0478833914,
-0.0462602787,
-0.1848698258,
0.0630238429,
-0.2803146839,
-0.3086192012,
0.0911358297,
0.0995176956,
0.0440451503,
-0.3165178299,
-0.1771358252,
0.5262104273,
-0.0977218673,
-0.1301517636,
0.4414812028,
0.3330864012,
-0.2364698052,
0.5683751702,
-0.0350574143,
0.6247903109,
0.2005381286,
0.1264472902,
0.272700727,
-0.51545012,
0.0626659989,
0.5921404362,
0.0294376761,
-0.5868448019,
-0.1553601921,
0.0331247747,
-0.1253830194,
0.0326818116,
0.0368703604,
-0.3613359928,
0.0716337636,
0.0084464103,
-0.2822268903,
0.1183373705,
0.3593576849,
-0.2079015076,
0.1589394808,
-0.3033197224,
0.0912196264,
0.1137904376,
0.1030309945,
-0.0877369791,
-0.0660763383,
-0.1419513971,
-0.3079771698,
-0.1325314492,
0.2350483835,
-0.1199389994,
0.4439126253,
0.2897055149,
-0.4493186474,
0.2196411788,
0.2174479961,
0.4070448279,
-0.0582864508,
-0.1289930493,
-0.0443205871,
-0.2538414598,
-0.0569629073,
0.2750829458,
-0.0208604001,
0.2357588112,
0.0243198723,
-0.2413081974,
0.0149242105,
-0.2202431411,
-0.3488709927,
-0.2136552036,
-0.0252611786,
0.0917009264,
-0.4033419192,
-0.5704157948,
-0.3656396568,
-0.1338035613,
-0.3513587117,
0.0451619998,
0.1369812191,
0.0903128907,
0.1345511228,
-0.030370431,
-0.3727881312,
0.1286840141,
0.478513062,
-0.1395129412,
-0.2365069836,
0.5704622269,
-0.0664494932,
0.1163968071,
-0.2200825661,
0.1668680161,
0.2937475145,
-0.2160444856,
0.4291683137,
-0.2352194935,
-0.1053849906,
-0.0334324762,
0.5656456947,
0.1970901042,
-0.1196102351,
0.0568212122,
-0.2952888012,
-0.3237189353,
0.137645334,
-0.0380472466,
0.4634031355,
-0.0172832757,
-0.3075000048,
-0.2098487616,
0.1128284633,
-0.2028449774,
0.0374975279,
0.0160003006,
0.0449074432,
0.1605365872,
-0.046205394,
0.1810543984,
-0.3117863238,
0.097540766,
-0.1628715247,
0.0355672054,
-0.0206244849,
-0.2262710631,
0.1717493385,
0.1430511028,
0.2631167769,
-0.0958964378,
-0.1393289864,
0.0043115746,
-0.0736729652,
-0.0378091745,
0.3947648704,
-0.1223446801,
0.2778860927,
0.0895337313,
0.206466198,
-0.131205678,
0.2292110324,
0.0644207001,
0.3075909615,
-0.0757779106,
0.2196437269,
-0.079422161,
-0.0892367512,
-0.2326030433,
0.1826040149,
0.0293284673,
0.0955830514,
0.1823246926,
-0.1802756488,
-0.0411884189,
0.1104307175,
0.2567685246,
0.5237183571,
-0.1497170031,
-0.2371404767,
-0.0213251002,
0.1600281745,
-0.1601505876,
-0.2017438114,
0.300362289,
-0.0835292786,
-0.1162904873,
-0.0765227526,
-0.2054961026,
-0.1942749172,
-0.1985164732,
0.3335353732,
0.5401272178,
-0.0722699016,
0.2756745815,
0.1050366536,
-0.1331187636,
0.1698140204,
0.4339621067,
-0.0268715732,
0.2728075981,
0.296913892,
-0.01069941,
0.4752701521,
0.1081377417,
0.1763000935,
0.1444733143,
0.0295527354,
0.0501387157,
-0.2383727878,
0.0339758918,
0.0337765738,
0.0379044116,
0.2074877918,
-0.533828795,
-0.0095713809,
-0.0529129058,
-0.3925663829,
-0.0503621958,
-0.2166734189,
-0.2375061512,
-0.1166065037,
0.1916656494,
-0.0871482491,
-0.1870366633,
0.2569026351,
0.1854580343,
0.134134084,
-0.1262692064,
-0.1991170943,
0.2447040379,
0.1286830604,
-0.1152324229,
-0.2423140705,
0.1165310219,
0.0655260533,
-0.0270041004,
0.284368813,
0.3048305511,
0.5131986141,
0.4630438089,
-0.1235536784,
-0.0936735123,
-0.0676190257,
-0.0890744478,
0.1606598049,
0.1176436394,
-0.2288688123,
0.14198789,
0.3497954905,
0.1042522937,
0.0525656529,
0.3554263711,
0.182885319,
0.2552397847,
-0.0793644711,
0.8174859881,
0.0652652979,
-0.4018479586,
0.1853938997,
0.2061244547,
-0.0562278442,
-0.2423316836,
0.2547926903,
0.2379752249,
0.0354117341,
0.043099422,
0.0429511145,
-0.0761297494,
0.4061383009,
0.3945251703,
-0.0091296546,
-0.2530899942,
0.2011502534,
-0.5567246079,
0.1267213374,
0.1150674969,
-0.0242358148,
0.1735586524,
0.1886163354,
0.1791177988,
-0.0079983212,
0.1234041452,
0.3020166755,
-0.2655390799,
-0.073275812,
-0.2039493322,
-0.0483578295,
0.1700235605,
-0.038417004,
-0.0339167267,
-0.435308069,
0.2317861915,
-0.2152295858,
-0.0408022925,
-0.1203103364,
-0.1444329619,
-0.0316803418,
-0.0343609564,
0.4194561839,
0.1286737025,
0.4079838991,
0.0496628508,
-0.4076711237,
-0.2884939909,
-0.197359845,
-0.1579229236,
0.2628086507,
0.0948494077,
0.6385341883,
-0.0972696543,
0.0452130213,
-0.2792317271,
0.2594891191,
-0.1286930591,
-0.0773253441,
-0.2083820999,
0.1652531922,
0.1398074925,
0.0103357881,
0.2678921819,
0.1165605038,
-0.0676964968,
0.375880748,
-0.3817229569,
-0.2833262086,
0.4406761527,
0.0210839659,
-0.1905986071,
-0.0162197836,
0.300540179,
-0.0426338688,
-0.1816292703,
-0.7152318954,
0.0028659105,
0.415509522,
-0.0063178092,
-0.0824660584,
0.1022369638,
0.2898764014,
0.186523661,
-0.0089994743,
0.5413073301,
-0.0108731277,
0.0113002956,
-0.0968639255,
-0.0729475543
] |
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.1946799606,
0.1140984297,
-0.0127637908,
0.2849429548,
0.0645922571,
-0.0614171103,
0.132340163,
0.4565902054,
0.4422374368,
0.179229036,
0.2358962893,
0.38085109,
0.0545871705,
-0.0561686493,
-0.1504482627,
-0.062248785,
0.2574024796,
0.1362524033,
0.0472621247,
0.1269331276,
-0.1914966106,
0.2465310991,
-0.1496891379,
-0.0032422133,
-0.1895999908,
0.1437864304,
-0.2581938505,
0.2942797542,
-0.3553468585,
-0.6636258364,
0.2940474153,
0.4080142975,
0.3425832391,
0.5095258355,
-0.0001234102,
0.0544175655,
0.2841648161,
-0.2096640468,
-0.4484793842,
-0.464017868,
-0.1993892491,
0.0136942342,
0.247311458,
-0.1567812264,
0.1745912433,
-0.0732850656,
-0.0321103334,
-0.4220353365,
0.1694842428,
0.3417605758,
0.1407152563,
0.2266557813,
0.2764902413,
-0.2219138741,
-0.2547795773,
0.3302722871,
-0.0204172358,
0.4828839898,
-0.0186928958,
0.0731683671,
0.0414440706,
0.0742254406,
-0.0195428245,
-0.101779677,
0.0939250812,
-0.0247306079,
0.1620428264,
-0.0513428785,
0.2408138812,
0.1979950964,
0.6499522328,
-0.2013998181,
-0.5342012644,
0.035244748,
-0.0611303374,
0.1786231995,
0.3324408829,
-0.0698242933,
0.0839632601,
0.3244955242,
-0.0997815132,
-0.3653489947,
-0.2351393998,
-0.1203212887,
0.0710188448,
-0.2877637744,
-0.0193994213,
0.1131955758,
-0.03970927,
0.021446228,
0.4245888591,
-0.3535504341,
-0.3489904702,
-0.1019977108,
-0.0459272228,
-0.1144011319,
-0.0653344542,
-0.2706745267,
0.1133465692,
-0.0720997974,
0.251762718,
0.1316186935,
-0.0391714722,
0.0602459721,
0.2115244567,
0.2749887407,
0.4198957682,
0.2743372321,
0.035751611,
0.0714352429,
-0.2357527614,
0.0838929862,
-0.0404100642,
-0.1516599059,
0.2088323832,
-0.1358044893,
0.5703295469,
-0.4004872143,
-0.3274165392,
0.2602043748,
-0.2743057609,
-0.1729608327,
-0.1039799452,
0.2240312397,
0.093279168,
0.1972417831,
0.1087378711,
0.3317793012,
0.0468947962,
0.0277815871,
-0.1801335365,
0.0353043377,
0.0400687009,
0.0117865019,
0.0179785639,
-0.0999573618,
0.267460525,
0.0151784569,
-0.4577175379,
-0.1766546667,
-0.041361548,
-0.0473276749,
0.2514304519,
0.0383213982,
-0.2181575596,
-0.0566826537,
0.2363062948,
0.126300171,
-0.2239947617,
0.2120420933,
0.0718442202,
-0.15890643,
-0.1686421633,
0.1228037775,
-0.3944002092,
-0.260253638,
-0.2819333076,
-0.0493996628,
-0.0836640298,
-0.292011857,
-0.1123727486,
-0.3287760913,
-0.2373554409,
-0.122571528,
0.1428989023,
0.4307115078,
-0.5336274505,
0.1942442656,
0.186076045,
-0.0290214196,
0.0966061056,
-0.0230781697,
0.0003095008,
0.138022393,
-0.1793205738,
0.1278738528,
0.4110458493,
-0.5454347134,
-0.615943253,
0.3077107668,
-0.004989028,
0.1782057583,
-0.1437653899,
-0.021747116,
0.212734431,
-0.0530059189,
0.054437615,
0.0589729026,
0.053436242,
-0.0575243235,
-0.4947073758,
-0.332870543,
0.1166521013,
-0.0132596605,
-0.0556111299,
0.0919381231,
0.158182323,
-0.2094929069,
0.4844790399,
-0.0858413205,
-0.1812548041,
0.1170094311,
0.4515589774,
-0.0738896504,
0.0274725631,
-0.2316355705,
-0.550896883,
0.4312415421,
0.037728779,
-0.0222504009,
-0.0489410236,
0.0583771989,
-0.4379802048,
0.120342724,
-0.3182471097,
0.0465110913,
0.0106166974,
0.0783771574,
-0.0866949558,
-0.0088241994,
-0.1149404794,
0.1405700445,
-0.1519614458,
0.069858402,
0.0043590181,
0.3365994096,
-0.2037378848,
-0.2205162048,
0.1709298939,
-0.0127888508,
0.2898360193,
-0.2678136826,
-0.3201780617,
0.4959193468,
0.2282745093,
0.0215908065,
-0.0704144686,
-0.3370971382,
-0.0950708836,
-0.0260213017,
0.1928254515,
0.498344332,
0.0574059784,
0.0559967607,
-0.2572027445,
0.3138728738,
0.0657232702,
0.0568131171,
0.0700780302,
0.178189978,
0.2946605086,
-0.0244198143,
-0.0170398802,
-0.3440819979,
0.2174292803,
0.0188182555,
0.0102336109,
0.0753728151,
-0.1335324943,
0.1482356042,
0.2589489222,
0.0366389155,
0.1828768104,
0.0873259306,
0.0021233018,
-0.4102321267,
0.059199065,
0.3296465874,
0.6812977791,
-0.0120208357,
-0.0898990259,
-0.0542865917,
-0.0393868349,
0.039272517,
0.1494916081,
-0.0172951445,
0.2711473703,
0.1783985943,
0.1901723742,
0.0689663962,
-0.2123127729,
-0.1901509166,
-0.0073721819,
0.0510647073,
-0.3820839524,
0.1315281093,
-0.1379302442,
0.5604394674,
-0.2043239921,
-0.5258817077,
-0.0548610725,
-0.3896039426,
-0.1108687744,
0.3982455134,
-0.1051947922,
0.0420948192,
-0.5863331556,
0.0428648517,
-0.0554989353,
-0.3256072998,
-0.1113469452,
-0.1962000132,
-0.1263740063,
-0.1553940773,
0.1137430072,
0.1928960085,
0.2179134637,
-0.1094698459,
-0.1682272553,
-0.4347152114,
-0.333981514,
0.1541956067,
-0.1012643278,
0.0506949425,
0.1850076169,
-0.0659797788,
0.1797926128,
-0.0064855479,
0.0098093525,
-0.1555844694,
-0.3324506879,
0.1918929815,
0.2623597383,
-0.1795148402,
0.0405298397,
-0.4744684994,
-0.3170479238,
-0.3201009631,
0.2410695255,
-0.0716331154,
0.0295917485,
0.0510347299,
0.174956724,
0.1524554342,
0.0156617872,
0.1022226587,
-0.0204781443,
-0.1949145198,
0.117174983,
-0.0141775012,
-0.4500831962,
0.108824119,
0.0357695967,
0.1472646594,
0.2089919299,
-0.2778184116,
-0.1442974806,
0.0047043487,
0.4145676196,
-0.0329647809,
-0.2965222597,
0.4994243383,
0.3355879188,
0.0297878683,
-0.1571240276,
-0.0598423593,
0.1395884007,
0.099757269,
0.2127373815,
-0.3571594357,
0.4544911683,
-0.3967371881,
0.2623895407,
-0.056121476,
-0.1933415979,
0.2192242593,
0.135514006,
0.3633721173,
-0.4195737541,
-0.2501191795,
-0.0181207806,
-0.2273001671,
-0.1420901418,
0.0491863936,
-0.1898753643,
0.3078669906,
-0.0113014579,
-0.271341145,
-0.1212764978,
-0.3088130057,
-0.0883088261,
-0.6213794351,
0.2525455058,
0.1294983625,
0.2512168288,
-0.1520727873,
0.0570481457,
0.0548917279,
0.1056843251,
0.361989826,
-0.1298967004,
-0.6689376831,
0.4119168818,
-0.2728250325,
0.3531419337,
0.0170029067,
0.6950644255,
0.0251038671,
-0.1877916157,
-0.074011445,
-0.0956238061,
0.371663332,
0.1301260889,
0.0777467042,
0.187523216,
-0.1503261328,
-0.6920771599,
-0.1083947644,
0.0503960103,
0.3830851316,
0.1262313724,
0.362961024,
-0.0177811235,
-0.1991339922,
0.2198237926,
0.3881292045,
-0.1670644134,
-0.274376452,
-0.2853177786,
-0.13652426,
-0.1515446752,
-0.2810796201,
-0.0419631898,
0.2196073532,
-0.2597107291,
-0.062531203,
-0.5216524601,
-0.3158729672,
0.0641467422,
0.1999336481,
0.4470639229,
-0.3979618847,
0.2182784677,
0.250328064,
0.1697053909,
0.5388913751,
0.4505367279,
-0.0512385629,
-0.4795737267,
-0.0396613628,
-0.1913183928,
0.0461554267,
0.0478833914,
-0.0462602787,
-0.1848698258,
0.0630238429,
-0.2803146839,
-0.3086192012,
0.0911358297,
0.0995176956,
0.0440451503,
-0.3165178299,
-0.1771358252,
0.5262104273,
-0.0977218673,
-0.1301517636,
0.4414812028,
0.3330864012,
-0.2364698052,
0.5683751702,
-0.0350574143,
0.6247903109,
0.2005381286,
0.1264472902,
0.272700727,
-0.51545012,
0.0626659989,
0.5921404362,
0.0294376761,
-0.5868448019,
-0.1553601921,
0.0331247747,
-0.1253830194,
0.0326818116,
0.0368703604,
-0.3613359928,
0.0716337636,
0.0084464103,
-0.2822268903,
0.1183373705,
0.3593576849,
-0.2079015076,
0.1589394808,
-0.3033197224,
0.0912196264,
0.1137904376,
0.1030309945,
-0.0877369791,
-0.0660763383,
-0.1419513971,
-0.3079771698,
-0.1325314492,
0.2350483835,
-0.1199389994,
0.4439126253,
0.2897055149,
-0.4493186474,
0.2196411788,
0.2174479961,
0.4070448279,
-0.0582864508,
-0.1289930493,
-0.0443205871,
-0.2538414598,
-0.0569629073,
0.2750829458,
-0.0208604001,
0.2357588112,
0.0243198723,
-0.2413081974,
0.0149242105,
-0.2202431411,
-0.3488709927,
-0.2136552036,
-0.0252611786,
0.0917009264,
-0.4033419192,
-0.5704157948,
-0.3656396568,
-0.1338035613,
-0.3513587117,
0.0451619998,
0.1369812191,
0.0903128907,
0.1345511228,
-0.030370431,
-0.3727881312,
0.1286840141,
0.478513062,
-0.1395129412,
-0.2365069836,
0.5704622269,
-0.0664494932,
0.1163968071,
-0.2200825661,
0.1668680161,
0.2937475145,
-0.2160444856,
0.4291683137,
-0.2352194935,
-0.1053849906,
-0.0334324762,
0.5656456947,
0.1970901042,
-0.1196102351,
0.0568212122,
-0.2952888012,
-0.3237189353,
0.137645334,
-0.0380472466,
0.4634031355,
-0.0172832757,
-0.3075000048,
-0.2098487616,
0.1128284633,
-0.2028449774,
0.0374975279,
0.0160003006,
0.0449074432,
0.1605365872,
-0.046205394,
0.1810543984,
-0.3117863238,
0.097540766,
-0.1628715247,
0.0355672054,
-0.0206244849,
-0.2262710631,
0.1717493385,
0.1430511028,
0.2631167769,
-0.0958964378,
-0.1393289864,
0.0043115746,
-0.0736729652,
-0.0378091745,
0.3947648704,
-0.1223446801,
0.2778860927,
0.0895337313,
0.206466198,
-0.131205678,
0.2292110324,
0.0644207001,
0.3075909615,
-0.0757779106,
0.2196437269,
-0.079422161,
-0.0892367512,
-0.2326030433,
0.1826040149,
0.0293284673,
0.0955830514,
0.1823246926,
-0.1802756488,
-0.0411884189,
0.1104307175,
0.2567685246,
0.5237183571,
-0.1497170031,
-0.2371404767,
-0.0213251002,
0.1600281745,
-0.1601505876,
-0.2017438114,
0.300362289,
-0.0835292786,
-0.1162904873,
-0.0765227526,
-0.2054961026,
-0.1942749172,
-0.1985164732,
0.3335353732,
0.5401272178,
-0.0722699016,
0.2756745815,
0.1050366536,
-0.1331187636,
0.1698140204,
0.4339621067,
-0.0268715732,
0.2728075981,
0.296913892,
-0.01069941,
0.4752701521,
0.1081377417,
0.1763000935,
0.1444733143,
0.0295527354,
0.0501387157,
-0.2383727878,
0.0339758918,
0.0337765738,
0.0379044116,
0.2074877918,
-0.533828795,
-0.0095713809,
-0.0529129058,
-0.3925663829,
-0.0503621958,
-0.2166734189,
-0.2375061512,
-0.1166065037,
0.1916656494,
-0.0871482491,
-0.1870366633,
0.2569026351,
0.1854580343,
0.134134084,
-0.1262692064,
-0.1991170943,
0.2447040379,
0.1286830604,
-0.1152324229,
-0.2423140705,
0.1165310219,
0.0655260533,
-0.0270041004,
0.284368813,
0.3048305511,
0.5131986141,
0.4630438089,
-0.1235536784,
-0.0936735123,
-0.0676190257,
-0.0890744478,
0.1606598049,
0.1176436394,
-0.2288688123,
0.14198789,
0.3497954905,
0.1042522937,
0.0525656529,
0.3554263711,
0.182885319,
0.2552397847,
-0.0793644711,
0.8174859881,
0.0652652979,
-0.4018479586,
0.1853938997,
0.2061244547,
-0.0562278442,
-0.2423316836,
0.2547926903,
0.2379752249,
0.0354117341,
0.043099422,
0.0429511145,
-0.0761297494,
0.4061383009,
0.3945251703,
-0.0091296546,
-0.2530899942,
0.2011502534,
-0.5567246079,
0.1267213374,
0.1150674969,
-0.0242358148,
0.1735586524,
0.1886163354,
0.1791177988,
-0.0079983212,
0.1234041452,
0.3020166755,
-0.2655390799,
-0.073275812,
-0.2039493322,
-0.0483578295,
0.1700235605,
-0.038417004,
-0.0339167267,
-0.435308069,
0.2317861915,
-0.2152295858,
-0.0408022925,
-0.1203103364,
-0.1444329619,
-0.0316803418,
-0.0343609564,
0.4194561839,
0.1286737025,
0.4079838991,
0.0496628508,
-0.4076711237,
-0.2884939909,
-0.197359845,
-0.1579229236,
0.2628086507,
0.0948494077,
0.6385341883,
-0.0972696543,
0.0452130213,
-0.2792317271,
0.2594891191,
-0.1286930591,
-0.0773253441,
-0.2083820999,
0.1652531922,
0.1398074925,
0.0103357881,
0.2678921819,
0.1165605038,
-0.0676964968,
0.375880748,
-0.3817229569,
-0.2833262086,
0.4406761527,
0.0210839659,
-0.1905986071,
-0.0162197836,
0.300540179,
-0.0426338688,
-0.1816292703,
-0.7152318954,
0.0028659105,
0.415509522,
-0.0063178092,
-0.0824660584,
0.1022369638,
0.2898764014,
0.186523661,
-0.0089994743,
0.5413073301,
-0.0108731277,
0.0113002956,
-0.0968639255,
-0.0729475543
] |
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.1946799606,
0.1140984297,
-0.0127637908,
0.2849429548,
0.0645922571,
-0.0614171103,
0.132340163,
0.4565902054,
0.4422374368,
0.179229036,
0.2358962893,
0.38085109,
0.0545871705,
-0.0561686493,
-0.1504482627,
-0.062248785,
0.2574024796,
0.1362524033,
0.0472621247,
0.1269331276,
-0.1914966106,
0.2465310991,
-0.1496891379,
-0.0032422133,
-0.1895999908,
0.1437864304,
-0.2581938505,
0.2942797542,
-0.3553468585,
-0.6636258364,
0.2940474153,
0.4080142975,
0.3425832391,
0.5095258355,
-0.0001234102,
0.0544175655,
0.2841648161,
-0.2096640468,
-0.4484793842,
-0.464017868,
-0.1993892491,
0.0136942342,
0.247311458,
-0.1567812264,
0.1745912433,
-0.0732850656,
-0.0321103334,
-0.4220353365,
0.1694842428,
0.3417605758,
0.1407152563,
0.2266557813,
0.2764902413,
-0.2219138741,
-0.2547795773,
0.3302722871,
-0.0204172358,
0.4828839898,
-0.0186928958,
0.0731683671,
0.0414440706,
0.0742254406,
-0.0195428245,
-0.101779677,
0.0939250812,
-0.0247306079,
0.1620428264,
-0.0513428785,
0.2408138812,
0.1979950964,
0.6499522328,
-0.2013998181,
-0.5342012644,
0.035244748,
-0.0611303374,
0.1786231995,
0.3324408829,
-0.0698242933,
0.0839632601,
0.3244955242,
-0.0997815132,
-0.3653489947,
-0.2351393998,
-0.1203212887,
0.0710188448,
-0.2877637744,
-0.0193994213,
0.1131955758,
-0.03970927,
0.021446228,
0.4245888591,
-0.3535504341,
-0.3489904702,
-0.1019977108,
-0.0459272228,
-0.1144011319,
-0.0653344542,
-0.2706745267,
0.1133465692,
-0.0720997974,
0.251762718,
0.1316186935,
-0.0391714722,
0.0602459721,
0.2115244567,
0.2749887407,
0.4198957682,
0.2743372321,
0.035751611,
0.0714352429,
-0.2357527614,
0.0838929862,
-0.0404100642,
-0.1516599059,
0.2088323832,
-0.1358044893,
0.5703295469,
-0.4004872143,
-0.3274165392,
0.2602043748,
-0.2743057609,
-0.1729608327,
-0.1039799452,
0.2240312397,
0.093279168,
0.1972417831,
0.1087378711,
0.3317793012,
0.0468947962,
0.0277815871,
-0.1801335365,
0.0353043377,
0.0400687009,
0.0117865019,
0.0179785639,
-0.0999573618,
0.267460525,
0.0151784569,
-0.4577175379,
-0.1766546667,
-0.041361548,
-0.0473276749,
0.2514304519,
0.0383213982,
-0.2181575596,
-0.0566826537,
0.2363062948,
0.126300171,
-0.2239947617,
0.2120420933,
0.0718442202,
-0.15890643,
-0.1686421633,
0.1228037775,
-0.3944002092,
-0.260253638,
-0.2819333076,
-0.0493996628,
-0.0836640298,
-0.292011857,
-0.1123727486,
-0.3287760913,
-0.2373554409,
-0.122571528,
0.1428989023,
0.4307115078,
-0.5336274505,
0.1942442656,
0.186076045,
-0.0290214196,
0.0966061056,
-0.0230781697,
0.0003095008,
0.138022393,
-0.1793205738,
0.1278738528,
0.4110458493,
-0.5454347134,
-0.615943253,
0.3077107668,
-0.004989028,
0.1782057583,
-0.1437653899,
-0.021747116,
0.212734431,
-0.0530059189,
0.054437615,
0.0589729026,
0.053436242,
-0.0575243235,
-0.4947073758,
-0.332870543,
0.1166521013,
-0.0132596605,
-0.0556111299,
0.0919381231,
0.158182323,
-0.2094929069,
0.4844790399,
-0.0858413205,
-0.1812548041,
0.1170094311,
0.4515589774,
-0.0738896504,
0.0274725631,
-0.2316355705,
-0.550896883,
0.4312415421,
0.037728779,
-0.0222504009,
-0.0489410236,
0.0583771989,
-0.4379802048,
0.120342724,
-0.3182471097,
0.0465110913,
0.0106166974,
0.0783771574,
-0.0866949558,
-0.0088241994,
-0.1149404794,
0.1405700445,
-0.1519614458,
0.069858402,
0.0043590181,
0.3365994096,
-0.2037378848,
-0.2205162048,
0.1709298939,
-0.0127888508,
0.2898360193,
-0.2678136826,
-0.3201780617,
0.4959193468,
0.2282745093,
0.0215908065,
-0.0704144686,
-0.3370971382,
-0.0950708836,
-0.0260213017,
0.1928254515,
0.498344332,
0.0574059784,
0.0559967607,
-0.2572027445,
0.3138728738,
0.0657232702,
0.0568131171,
0.0700780302,
0.178189978,
0.2946605086,
-0.0244198143,
-0.0170398802,
-0.3440819979,
0.2174292803,
0.0188182555,
0.0102336109,
0.0753728151,
-0.1335324943,
0.1482356042,
0.2589489222,
0.0366389155,
0.1828768104,
0.0873259306,
0.0021233018,
-0.4102321267,
0.059199065,
0.3296465874,
0.6812977791,
-0.0120208357,
-0.0898990259,
-0.0542865917,
-0.0393868349,
0.039272517,
0.1494916081,
-0.0172951445,
0.2711473703,
0.1783985943,
0.1901723742,
0.0689663962,
-0.2123127729,
-0.1901509166,
-0.0073721819,
0.0510647073,
-0.3820839524,
0.1315281093,
-0.1379302442,
0.5604394674,
-0.2043239921,
-0.5258817077,
-0.0548610725,
-0.3896039426,
-0.1108687744,
0.3982455134,
-0.1051947922,
0.0420948192,
-0.5863331556,
0.0428648517,
-0.0554989353,
-0.3256072998,
-0.1113469452,
-0.1962000132,
-0.1263740063,
-0.1553940773,
0.1137430072,
0.1928960085,
0.2179134637,
-0.1094698459,
-0.1682272553,
-0.4347152114,
-0.333981514,
0.1541956067,
-0.1012643278,
0.0506949425,
0.1850076169,
-0.0659797788,
0.1797926128,
-0.0064855479,
0.0098093525,
-0.1555844694,
-0.3324506879,
0.1918929815,
0.2623597383,
-0.1795148402,
0.0405298397,
-0.4744684994,
-0.3170479238,
-0.3201009631,
0.2410695255,
-0.0716331154,
0.0295917485,
0.0510347299,
0.174956724,
0.1524554342,
0.0156617872,
0.1022226587,
-0.0204781443,
-0.1949145198,
0.117174983,
-0.0141775012,
-0.4500831962,
0.108824119,
0.0357695967,
0.1472646594,
0.2089919299,
-0.2778184116,
-0.1442974806,
0.0047043487,
0.4145676196,
-0.0329647809,
-0.2965222597,
0.4994243383,
0.3355879188,
0.0297878683,
-0.1571240276,
-0.0598423593,
0.1395884007,
0.099757269,
0.2127373815,
-0.3571594357,
0.4544911683,
-0.3967371881,
0.2623895407,
-0.056121476,
-0.1933415979,
0.2192242593,
0.135514006,
0.3633721173,
-0.4195737541,
-0.2501191795,
-0.0181207806,
-0.2273001671,
-0.1420901418,
0.0491863936,
-0.1898753643,
0.3078669906,
-0.0113014579,
-0.271341145,
-0.1212764978,
-0.3088130057,
-0.0883088261,
-0.6213794351,
0.2525455058,
0.1294983625,
0.2512168288,
-0.1520727873,
0.0570481457,
0.0548917279,
0.1056843251,
0.361989826,
-0.1298967004,
-0.6689376831,
0.4119168818,
-0.2728250325,
0.3531419337,
0.0170029067,
0.6950644255,
0.0251038671,
-0.1877916157,
-0.074011445,
-0.0956238061,
0.371663332,
0.1301260889,
0.0777467042,
0.187523216,
-0.1503261328,
-0.6920771599,
-0.1083947644,
0.0503960103,
0.3830851316,
0.1262313724,
0.362961024,
-0.0177811235,
-0.1991339922,
0.2198237926,
0.3881292045,
-0.1670644134,
-0.274376452,
-0.2853177786,
-0.13652426,
-0.1515446752,
-0.2810796201,
-0.0419631898,
0.2196073532,
-0.2597107291,
-0.062531203,
-0.5216524601,
-0.3158729672,
0.0641467422,
0.1999336481,
0.4470639229,
-0.3979618847,
0.2182784677,
0.250328064,
0.1697053909,
0.5388913751,
0.4505367279,
-0.0512385629,
-0.4795737267,
-0.0396613628,
-0.1913183928,
0.0461554267,
0.0478833914,
-0.0462602787,
-0.1848698258,
0.0630238429,
-0.2803146839,
-0.3086192012,
0.0911358297,
0.0995176956,
0.0440451503,
-0.3165178299,
-0.1771358252,
0.5262104273,
-0.0977218673,
-0.1301517636,
0.4414812028,
0.3330864012,
-0.2364698052,
0.5683751702,
-0.0350574143,
0.6247903109,
0.2005381286,
0.1264472902,
0.272700727,
-0.51545012,
0.0626659989,
0.5921404362,
0.0294376761,
-0.5868448019,
-0.1553601921,
0.0331247747,
-0.1253830194,
0.0326818116,
0.0368703604,
-0.3613359928,
0.0716337636,
0.0084464103,
-0.2822268903,
0.1183373705,
0.3593576849,
-0.2079015076,
0.1589394808,
-0.3033197224,
0.0912196264,
0.1137904376,
0.1030309945,
-0.0877369791,
-0.0660763383,
-0.1419513971,
-0.3079771698,
-0.1325314492,
0.2350483835,
-0.1199389994,
0.4439126253,
0.2897055149,
-0.4493186474,
0.2196411788,
0.2174479961,
0.4070448279,
-0.0582864508,
-0.1289930493,
-0.0443205871,
-0.2538414598,
-0.0569629073,
0.2750829458,
-0.0208604001,
0.2357588112,
0.0243198723,
-0.2413081974,
0.0149242105,
-0.2202431411,
-0.3488709927,
-0.2136552036,
-0.0252611786,
0.0917009264,
-0.4033419192,
-0.5704157948,
-0.3656396568,
-0.1338035613,
-0.3513587117,
0.0451619998,
0.1369812191,
0.0903128907,
0.1345511228,
-0.030370431,
-0.3727881312,
0.1286840141,
0.478513062,
-0.1395129412,
-0.2365069836,
0.5704622269,
-0.0664494932,
0.1163968071,
-0.2200825661,
0.1668680161,
0.2937475145,
-0.2160444856,
0.4291683137,
-0.2352194935,
-0.1053849906,
-0.0334324762,
0.5656456947,
0.1970901042,
-0.1196102351,
0.0568212122,
-0.2952888012,
-0.3237189353,
0.137645334,
-0.0380472466,
0.4634031355,
-0.0172832757,
-0.3075000048,
-0.2098487616,
0.1128284633,
-0.2028449774,
0.0374975279,
0.0160003006,
0.0449074432,
0.1605365872,
-0.046205394,
0.1810543984,
-0.3117863238,
0.097540766,
-0.1628715247,
0.0355672054,
-0.0206244849,
-0.2262710631,
0.1717493385,
0.1430511028,
0.2631167769,
-0.0958964378,
-0.1393289864,
0.0043115746,
-0.0736729652,
-0.0378091745,
0.3947648704,
-0.1223446801,
0.2778860927,
0.0895337313,
0.206466198,
-0.131205678,
0.2292110324,
0.0644207001,
0.3075909615,
-0.0757779106,
0.2196437269,
-0.079422161,
-0.0892367512,
-0.2326030433,
0.1826040149,
0.0293284673,
0.0955830514,
0.1823246926,
-0.1802756488,
-0.0411884189,
0.1104307175,
0.2567685246,
0.5237183571,
-0.1497170031,
-0.2371404767,
-0.0213251002,
0.1600281745,
-0.1601505876,
-0.2017438114,
0.300362289,
-0.0835292786,
-0.1162904873,
-0.0765227526,
-0.2054961026,
-0.1942749172,
-0.1985164732,
0.3335353732,
0.5401272178,
-0.0722699016,
0.2756745815,
0.1050366536,
-0.1331187636,
0.1698140204,
0.4339621067,
-0.0268715732,
0.2728075981,
0.296913892,
-0.01069941,
0.4752701521,
0.1081377417,
0.1763000935,
0.1444733143,
0.0295527354,
0.0501387157,
-0.2383727878,
0.0339758918,
0.0337765738,
0.0379044116,
0.2074877918,
-0.533828795,
-0.0095713809,
-0.0529129058,
-0.3925663829,
-0.0503621958,
-0.2166734189,
-0.2375061512,
-0.1166065037,
0.1916656494,
-0.0871482491,
-0.1870366633,
0.2569026351,
0.1854580343,
0.134134084,
-0.1262692064,
-0.1991170943,
0.2447040379,
0.1286830604,
-0.1152324229,
-0.2423140705,
0.1165310219,
0.0655260533,
-0.0270041004,
0.284368813,
0.3048305511,
0.5131986141,
0.4630438089,
-0.1235536784,
-0.0936735123,
-0.0676190257,
-0.0890744478,
0.1606598049,
0.1176436394,
-0.2288688123,
0.14198789,
0.3497954905,
0.1042522937,
0.0525656529,
0.3554263711,
0.182885319,
0.2552397847,
-0.0793644711,
0.8174859881,
0.0652652979,
-0.4018479586,
0.1853938997,
0.2061244547,
-0.0562278442,
-0.2423316836,
0.2547926903,
0.2379752249,
0.0354117341,
0.043099422,
0.0429511145,
-0.0761297494,
0.4061383009,
0.3945251703,
-0.0091296546,
-0.2530899942,
0.2011502534,
-0.5567246079,
0.1267213374,
0.1150674969,
-0.0242358148,
0.1735586524,
0.1886163354,
0.1791177988,
-0.0079983212,
0.1234041452,
0.3020166755,
-0.2655390799,
-0.073275812,
-0.2039493322,
-0.0483578295,
0.1700235605,
-0.038417004,
-0.0339167267,
-0.435308069,
0.2317861915,
-0.2152295858,
-0.0408022925,
-0.1203103364,
-0.1444329619,
-0.0316803418,
-0.0343609564,
0.4194561839,
0.1286737025,
0.4079838991,
0.0496628508,
-0.4076711237,
-0.2884939909,
-0.197359845,
-0.1579229236,
0.2628086507,
0.0948494077,
0.6385341883,
-0.0972696543,
0.0452130213,
-0.2792317271,
0.2594891191,
-0.1286930591,
-0.0773253441,
-0.2083820999,
0.1652531922,
0.1398074925,
0.0103357881,
0.2678921819,
0.1165605038,
-0.0676964968,
0.375880748,
-0.3817229569,
-0.2833262086,
0.4406761527,
0.0210839659,
-0.1905986071,
-0.0162197836,
0.300540179,
-0.0426338688,
-0.1816292703,
-0.7152318954,
0.0028659105,
0.415509522,
-0.0063178092,
-0.0824660584,
0.1022369638,
0.2898764014,
0.186523661,
-0.0089994743,
0.5413073301,
-0.0108731277,
0.0113002956,
-0.0968639255,
-0.0729475543
] |
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.1607162654,
0.2849108279,
-0.1269761026,
0.1755045354,
0.0859019607,
0.0402896479,
0.2562075555,
0.3658846021,
0.041933611,
0.3072820306,
0.0052474923,
0.0433718301,
0.0158909,
0.2191219777,
0.1775154471,
-0.1738475263,
-0.004024446,
0.0109900311,
-0.1373093873,
0.0521648303,
-0.1775493026,
0.0072263982,
-0.1995907873,
0.1583382934,
-0.037577711,
0.2100188136,
-0.2031050324,
0.0941607952,
-0.1932428628,
-0.6549802423,
0.3090726733,
0.1273382902,
0.0832723379,
0.2888223529,
-0.0001082165,
0.0894125849,
0.2988509536,
0.0091614127,
-0.3292866945,
-0.3701015413,
-0.3256568909,
-0.4836527705,
0.0113818981,
-0.386823535,
-0.1000624523,
-0.1852470189,
0.2667526603,
0.109197408,
0.2585921586,
0.6185497046,
0.217841357,
0.3603417575,
0.0827491283,
-0.0977323502,
0.1449720562,
0.072520867,
-0.1622267365,
0.1413548738,
-0.0237706266,
-0.1449211836,
0.0799242258,
0.1947092712,
0.0518146902,
0.1217469573,
-0.1871071756,
0.1651481837,
0.2658445537,
-0.2221500874,
-0.1103746593,
0.2396496683,
0.0484496094,
-0.2494377941,
-0.2226450741,
-0.0337352306,
-0.0844579488,
0.0159997717,
0.1275510937,
0.3240197301,
-0.2225626558,
0.1198313385,
-0.3047820926,
-0.0031715743,
-0.3851749301,
0.395362705,
-0.2153156996,
0.2162216902,
0.0354196653,
0.1695627421,
0.194806397,
-0.1787180901,
-0.1353118271,
-0.1662856638,
-0.1664293855,
0.1104923859,
0.0447671562,
-0.0354131944,
-0.0712506771,
-0.3175804317,
0.3023940921,
0.1509390175,
0.0641393363,
0.0615021847,
-0.0090624169,
0.0035715587,
0.1476140618,
-0.1303727478,
0.0290070903,
0.3485053182,
0.3061070442,
0.2977990806,
0.0741891637,
-0.058752358,
0.0372148603,
-0.0911936089,
0.1269007921,
-0.0198110621,
0.413921088,
-0.2075269669,
-0.1237589568,
0.241961062,
-0.003119573,
-0.129028663,
-0.0752903298,
0.4222077429,
0.0038070455,
0.0440093279,
0.0618456602,
0.3608466983,
-0.0351581722,
-0.0896931142,
-0.2308821678,
0.1472979486,
-0.3299788833,
0.1613566875,
0.6004886031,
0.0971656293,
0.2637768388,
-0.0439439714,
-0.1959439069,
-0.2917519808,
0.1034095213,
-0.2452871799,
0.5001852512,
0.1316229254,
0.262394011,
0.1821568906,
-0.0875077695,
0.3129859269,
0.0101264864,
0.0853116587,
-0.0186630711,
-0.3564784825,
0.2350667417,
0.2354106605,
-0.2452388555,
-0.0261492245,
0.0424878262,
0.0778635144,
-0.1504394561,
-0.376974225,
-0.0665061027,
-0.1449887902,
-0.2322541475,
-0.1142748296,
0.3140326738,
0.428776741,
-0.03913901,
-0.0388356298,
0.1627983004,
-0.032858219,
0.1943426728,
0.019633472,
-0.3911490142,
0.2049044967,
-0.1807558835,
0.0412886441,
0.5587883592,
-0.4500214159,
-0.7249730825,
0.2535998225,
-0.0212612525,
0.0530409887,
0.1778286844,
0.0625050515,
-0.0860294625,
-0.02789318,
-0.4274311364,
0.3901507258,
0.0546878651,
0.2225219011,
0.0165252611,
-0.1682701707,
0.3594577014,
0.2673203647,
0.0448145233,
-0.0441082753,
-0.0306843072,
0.4716742635,
0.6009883285,
0.0481060706,
0.009054184,
0.084278062,
-0.0217514504,
-0.1325217038,
-0.0750058442,
-0.0794650689,
-0.0566266626,
0.2953829169,
0.0179411769,
-0.0179588702,
-0.1477217674,
-0.0005189925,
-0.5050709248,
-0.0385371409,
-0.3645447791,
-0.2266289741,
0.2683859468,
0.3846641481,
0.3528345823,
0.3000056446,
-0.0302877724,
0.3504021466,
-0.330517143,
-0.0496247411,
-0.2497676611,
0.2820426524,
-0.2013541162,
0.0091113634,
-0.0227293149,
0.1534701586,
0.1481282711,
-0.0519122705,
-0.0547740236,
0.2898337841,
0.1164434999,
0.0854346901,
-0.0616065934,
0.06673114,
0.1511048228,
-0.5583307743,
0.2712528408,
0.3992887139,
0.1664092094,
-0.0469953381,
-0.2413635403,
0.2244085968,
-0.0297885481,
0.1660888493,
0.2944084406,
-0.082800366,
0.200649634,
-0.0955018997,
-0.2641211748,
-0.1278715879,
0.0308985077,
-0.0712231994,
-0.0856451839,
-0.0873884857,
-0.0694777817,
-0.0240071453,
0.5533161163,
-0.0228690319,
-0.08599139,
-0.1422102302,
-0.1544728577,
-0.040173389,
-0.0457057767,
0.341798842,
0.339446187,
-0.0052408017,
0.1332753301,
0.2720525861,
0.0106296092,
-0.2517019808,
0.1117663085,
0.1259655356,
0.1259821653,
0.2157383263,
0.0531442985,
0.0178052746,
-0.102518633,
0.0333005264,
0.3690500557,
0.1830670536,
-0.2688637972,
-0.0197616257,
-0.2633474767,
-0.5984287858,
-0.2817603052,
-0.161825031,
0.0276544504,
-0.4178621173,
-0.0583138615,
0.2076060474,
0.0333637893,
-0.1740947962,
-0.3731130064,
-0.0507753342,
0.0232868195,
-0.1845422387,
-0.0677580908,
-0.1110171527,
-0.2914595902,
0.088127777,
0.0988049284,
0.2324980497,
0.1851994991,
-0.3372071981,
-0.1936273277,
-0.4294441342,
-0.0837891921,
0.2052212954,
0.0387757756,
0.3248253167,
-0.0089295059,
0.4082074463,
0.1277258098,
0.0729605854,
0.2689098418,
-0.2258544117,
-0.2140462697,
0.3920097947,
0.0003067888,
-0.0243675318,
-0.0420404039,
-0.8750802875,
-0.3868276775,
-0.2710676491,
-0.0702919438,
-0.1641081274,
0.1371510327,
0.4277604818,
0.0564922355,
0.1112263873,
-0.0629071295,
0.1891740412,
-0.2624028325,
0.1213419884,
0.1968316883,
-0.4101999104,
-0.6001106501,
-0.0918638259,
0.1056962013,
0.1412737966,
0.0692280233,
-0.4383094609,
-0.0994462296,
-0.2035562545,
0.2111939043,
0.0655181706,
-0.1395417601,
0.09861812,
-0.1876588911,
0.0152322613,
-0.0599374622,
0.0633012503,
0.1874915361,
0.0681974366,
0.2779686451,
0.1245735213,
0.4347030818,
0.1053013951,
0.533926785,
0.2907461822,
-0.0869293809,
0.4084814787,
-0.4260178804,
0.0973078758,
0.0522853099,
-0.3037232161,
0.1839879751,
0.0349421203,
0.1958123446,
0.0272644386,
-0.2361386567,
-0.0680469871,
-0.2292047739,
0.0158426538,
-0.2501102984,
-0.2746539414,
0.1084881201,
0.1041520461,
0.2464462966,
0.2721260786,
0.297067225,
-0.0250744224,
-0.2863847613,
-0.083108142,
0.1753789037,
0.0077818893,
0.1302405596,
-0.1485901773,
-0.3568098545,
-0.5432786942,
0.0498158783,
0.1777339578,
0.6533558369,
-0.0952224508,
-0.2328330725,
0.0570932403,
-0.0656632781,
0.2139717937,
-0.2622177601,
0.2860746384,
0.0941681117,
-0.1925500631,
-0.461423099,
-0.1490031779,
-0.5367031693,
0.2200159729,
0.0458812118,
0.0783029944,
-0.3128926158,
-0.0865689814,
0.4102013111,
0.0667633116,
-0.089586705,
-0.1199111938,
-0.0781770125,
-0.2306934148,
-0.1983646601,
-0.0634456277,
-0.0272969641,
0.1544399112,
-0.4726418555,
0.0435138494,
0.1438608766,
0.1500722915,
0.0452245325,
0.4804132581,
0.1437708288,
0.115213275,
0.1626636982,
0.1206896901,
0.0033896687,
0.0483857691,
0.4401526153,
0.3329813778,
-0.0884325355,
0.2296990454,
-0.2514723837,
0.2321724594,
0.4090431631,
-0.0843230784,
-0.0802555084,
0.0124579221,
-0.4772045612,
-0.1453660578,
0.1055896431,
0.4880535901,
-0.1975772381,
-0.1639467627,
-0.3932228684,
0.2943483293,
0.1879695356,
-0.0693174079,
-0.1881124377,
-0.3113545179,
-0.0901660845,
0.1993939579,
-0.3372786045,
0.7343437672,
0.2030814886,
0.106078282,
0.3501306176,
0.0492578,
0.1445158273,
-0.2173545212,
0.1401651949,
-0.289386183,
-0.1896616071,
0.0507209003,
-0.1337523758,
-0.0575896278,
0.0699675679,
-0.1388362646,
0.1918224394,
0.0765192658,
0.0465893261,
-0.0903610587,
0.4218007326,
-0.1952954829,
0.2279957533,
-0.3704459369,
0.1807516515,
0.0409519225,
0.194923684,
-0.1249005795,
-0.1258854419,
-0.2114581913,
-0.0805523694,
-0.2322452068,
0.3438410163,
-0.1014804095,
-0.0080387257,
-0.1548867822,
-0.0715998262,
-0.2092356235,
0.3940392137,
0.1898006946,
0.145555228,
-0.2332071811,
-0.0151823098,
-0.1218618676,
-0.0989135727,
0.1702074409,
0.0720781237,
0.2749037147,
-0.237500146,
-0.5205229521,
0.2717048526,
0.0122125894,
0.0115173012,
-0.301099956,
-0.0515829101,
0.2221488357,
-0.4237347245,
-0.2757751346,
-0.1270694733,
-0.2994161844,
-0.0844059661,
0.1799010187,
-0.1724433452,
-0.3016172945,
0.0538749546,
0.1061511338,
-0.3442394137,
0.0102176536,
0.2672341466,
-0.049855195,
0.2570136189,
0.5883646011,
0.1426811516,
0.0978079289,
-0.2515437305,
-0.1344155967,
0.3967266381,
-0.4480822384,
-0.2421752512,
-0.0587318689,
0.2318978012,
0.4225234091,
0.4979729056,
-0.0524656922,
-0.2359658778,
-0.064788796,
-0.4515604377,
-0.1405132711,
0.0455112606,
0.08130496,
0.2086683512,
0.1423360258,
0.0296595208,
-0.009255603,
-0.1055459604,
-0.3727012277,
-0.1019631252,
-0.2531989813,
0.1466192603,
-0.0672553033,
0.0076768254,
0.1220959723,
0.004565198,
0.1222153157,
0.105317302,
-0.1673086584,
-0.2406251132,
-0.0903888941,
0.1120864004,
0.2074941099,
-0.0463493057,
-0.3955717683,
-0.2170503289,
-0.1175269783,
-0.0634542555,
0.1516934037,
-0.1089369133,
0.0791212022,
0.487229079,
0.1247825176,
0.191143468,
0.0628993958,
0.1000807583,
-0.2500256598,
0.3012391329,
-0.0008739457,
0.3668180704,
-0.0504576527,
-0.0284645408,
-0.3968817294,
-0.1286951005,
0.3236762285,
0.1369550079,
0.2293803841,
-0.2778627872,
0.171888262,
-0.228536129,
0.3552607894,
0.4184898138,
-0.3320915997,
0.0760074407,
0.030481264,
0.2555725574,
-0.159284085,
0.0507188365,
0.1791629791,
-0.003162194,
0.1429829895,
0.2469054163,
0.3377939761,
-0.0695367455,
0.2741986811,
0.0299772359,
0.273721993,
-0.1217310429,
0.0021440722,
0.3989958465,
-0.1240554303,
-0.045470126,
0.0245482828,
0.0185876265,
0.0841744617,
0.1809132695,
0.0145676713,
0.6019998193,
0.3479763865,
0.101026468,
0.1548649967,
-0.0158830658,
-0.1489732265,
0.0707308725,
-0.2232424617,
0.2216876596,
-0.1234164238,
0.3565530181,
-0.1334573179,
0.0958146229,
-0.5014275312,
0.1163445115,
-0.0066388464,
-0.0972701609,
-0.3805086613,
-0.2218049914,
-0.2661808729,
-0.126968354,
-0.0713466629,
-0.1114911288,
0.3025794923,
0.1585449874,
-0.3330278099,
-0.3868170381,
0.0582638979,
0.1791596115,
0.1049533933,
-0.2697231174,
0.3325801492,
-0.0474268161,
-0.069036223,
0.311089009,
0.5155497193,
0.3372053504,
0.1309101135,
0.074845776,
0.0987793505,
0.0350757986,
-0.1985812038,
0.0018600039,
0.4188432395,
0.2598071694,
-0.0176604912,
0.3898781836,
0.2189409733,
-0.0906142145,
-0.2487781495,
0.2301791161,
0.0657977909,
-0.2974549532,
0.1374527216,
-0.2030490637,
0.0537780672,
-0.3047030568,
-0.1069196463,
-0.5738536119,
-0.2494072914,
0.2485086322,
0.12775442,
0.3732636869,
-0.2122017443,
0.106716305,
-0.0765889734,
0.4998399913,
0.2393322587,
0.2802226841,
-0.2526631057,
-0.2962818146,
-0.6371307373,
0.2800092101,
-0.0336491577,
-0.3757675886,
0.0180937909,
0.0966578647,
-0.1841700226,
0.0458852798,
0.0163000338,
-0.0502735227,
-0.092142418,
0.4529128373,
-0.441861093,
-0.3507740498,
-0.0523805879,
0.1537089646,
-0.256706953,
-0.1359140128,
0.1069623679,
-0.1130834222,
0.047898449,
0.01035529,
-0.2944966853,
0.0620654523,
0.4316856265,
0.406311959,
0.1964342147,
0.605933249,
-0.2052844912,
-0.030618649,
-0.4789451063,
-0.0330999866,
-0.0587769225,
0.0631799102,
-0.0728441849,
0.1951273978,
0.11726439,
0.1936029792,
-0.0026944131,
-0.0902226418,
-0.0918909833,
-0.4591360092,
-0.0700071752,
-0.167890951,
-0.107634984,
0.023488868,
0.0123996399,
0.1525816917,
-0.0149434805,
0.0027832985,
-0.0432889685,
-0.2013232559,
0.3291138113,
-0.1706299782,
-0.2205206454,
-0.0012828447,
0.0587946884,
-0.4319298267,
0.137366727,
-0.6566746831,
0.1435064375,
0.1344796568,
0.0965305865,
-0.0786259025,
0.1540099084,
-0.0446559973,
0.2452212423,
-0.0960329473,
0.4119133353,
0.0631087273,
-0.2670819461,
-0.0691989362,
0.0340404063
] |
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.0754547417,
-0.3018319309,
-0.0413844883,
0.351421982,
0.2028204352,
0.0986171439,
0.0996905267,
0.2842757106,
0.2723554373,
0.2235055417,
0.1852621436,
0.4316784739,
-0.1457954198,
-0.0435099266,
-0.0000911281,
0.1481423378,
0.2869780064,
0.014850866,
0.1028157026,
0.0590184331,
-0.4523687959,
0.0157495122,
-0.3991191387,
-0.2898885906,
-0.1479181051,
0.1475243568,
-0.0865113959,
0.3391438127,
0.2111928016,
-0.5017673969,
0.1326696873,
-0.0852005184,
0.1664267927,
0.2540664077,
-0.0001137038,
-0.1059103757,
0.1337448657,
0.1001985595,
-0.1821789294,
0.1486946046,
-0.312330395,
-0.3803419769,
-0.0605342016,
-0.3717796206,
0.0739793479,
0.1645598561,
-0.0146034788,
-0.669824481,
0.218204394,
0.3299289644,
0.1970497221,
-0.1352156699,
-0.1267960966,
0.1426885724,
0.2613804936,
0.2144851685,
-0.0019845366,
-0.2373130023,
0.3164672554,
0.1026869416,
0.0636080578,
0.4374418557,
-0.2772947252,
-0.0314575881,
-0.0467968136,
0.1114467233,
0.3358646631,
-0.2466216981,
0.3791424036,
-0.1982062608,
0.1761234701,
-0.3240181208,
0.1939210147,
-0.136756137,
-0.2850831747,
-0.4452187121,
0.2263069451,
0.0385252014,
-0.1923345774,
0.1316101849,
-0.0203823801,
-0.0772099644,
0.2251273245,
-0.0430460982,
-0.0519030616,
0.1416195929,
0.0057184398,
0.1725652665,
0.2679633498,
-0.1135376245,
-0.2476187348,
-0.0225860942,
-0.0346720554,
0.1145175248,
-0.3829448223,
-0.1603152156,
0.0903517306,
-0.1762021035,
0.0510156453,
-0.3032524884,
0.1050655991,
0.1592099965,
0.2167822272,
0.1538217962,
0.3814411461,
0.0126949586,
0.0362281278,
0.3134065866,
0.2402252853,
-0.1346109957,
0.2550567985,
0.05765054,
0.1715007424,
-0.2757337391,
0.3283060789,
-0.0324560218,
0.2573714256,
-0.1818680763,
-0.274556607,
0.270796746,
-0.0707864761,
0.256249994,
0.0107705072,
0.2392870784,
0.2339681685,
0.4569325149,
-0.1290821433,
-0.1677615643,
-0.2951613665,
-0.1780385673,
-0.1612373143,
-0.0624385364,
-0.4973855615,
0.0127897114,
0.2001051456,
-0.0157727748,
-0.0672495365,
0.0855230242,
-0.1004471928,
-0.319869101,
0.0025580078,
-0.1037025899,
0.2624627352,
0.2540854812,
-0.2491624653,
0.4018825591,
-0.1385015696,
-0.0014936477,
-0.3082488179,
0.47174564,
-0.3724943399,
-0.2667647302,
-0.1029590666,
0.0955401883,
0.1612254977,
0.2892303467,
-0.2312067151,
0.2438077182,
0.4335412383,
0.0352733508,
-0.0686665922,
-0.1108096913,
-0.6351306438,
-0.2619720697,
-0.0059177876,
0.443110913,
-0.32488814,
0.2043527067,
0.0911754817,
0.0615708306,
0.5199882984,
0.3121886849,
0.0134992078,
-0.2704665661,
0.0342346132,
0.1604542732,
0.2634508312,
-0.3385002911,
-0.82337749,
0.4366504848,
-0.2258640379,
-0.0950901732,
0.1500331163,
0.2552033067,
0.396585077,
-0.170677498,
0.0508167744,
0.2231233567,
0.0575616732,
0.6018770933,
-0.4744094908,
-0.2935758829,
0.043966651,
-0.024186749,
-0.1145752668,
-0.1487892866,
0.0661746189,
0.1963353455,
0.4563104808,
-0.0463558584,
0.2246578336,
0.1608532518,
-0.1028404906,
-0.0563541539,
0.1254665554,
-0.2527487278,
-0.4038699269,
0.1220961064,
0.0962011665,
-0.1537615061,
-0.0750262439,
-0.1954279393,
0.0505764484,
0.0149784535,
0.1189680025,
-0.3708426058,
0.051817324,
-0.0682424605,
0.0159425959,
-0.2603599429,
0.0931863934,
0.290276885,
0.1489878893,
-0.0118339732,
-0.2216129601,
0.0043832064,
-0.0359769091,
-0.1321121603,
-0.1899856627,
0.1120569259,
0.1009916514,
0.0459345952,
-0.1223834902,
0.2798473239,
0.2700842917,
-0.0917514265,
-0.1688495129,
0.0286819562,
0.3951384127,
-0.2478906959,
0.3301882148,
0.150343284,
0.2383358777,
-0.1706947684,
-0.1315208673,
-0.0679997802,
0.1871342361,
0.2635290921,
-0.3016976714,
0.1257997751,
0.2288259417,
0.0110694617,
0.2334269285,
-0.3601567745,
0.0444170199,
0.2666496038,
0.0942661464,
0.1847884804,
0.0502935052,
0.2274677455,
0.3800430298,
0.007157892,
-0.0674417093,
0.2289533317,
-0.420514524,
-0.2080096602,
0.1267895103,
-0.1767051816,
0.4225723445,
0.1683560014,
0.0327096172,
-0.0163710508,
-0.0035292394,
-0.0506972373,
0.1758863032,
0.0871118754,
-0.0744864196,
-0.3462856412,
0.2362720221,
-0.1357605606,
-0.0663327202,
-0.1010182798,
0.071000047,
0.3797436953,
-0.3099096417,
0.020358339,
-0.1911897361,
0.3776617944,
0.0741064996,
0.103666909,
0.1740545183,
-0.1810130179,
-0.0455525964,
0.0940026194,
0.0109129176,
0.0489133298,
0.0440297425,
0.1330715567,
0.0573312491,
0.046141915,
-0.1617721617,
-0.2432822734,
-0.2543353438,
-0.0349644423,
0.2633142173,
0.0199795328,
0.3575659692,
0.0410645008,
-0.1443333179,
-0.0342576653,
-0.1015556231,
-0.0204921383,
0.1299987137,
-0.0371870734,
-0.1992775053,
-0.0763361454,
-0.0712468997,
0.1608317494,
-0.0548369437,
-0.2768734396,
-0.1413897872,
0.3183428943,
0.0626070946,
-0.0981757045,
-0.2886626124,
-0.218827337,
-0.1263392121,
-0.1334590912,
0.1696949452,
0.1252619326,
0.4080449939,
-0.2814246416,
0.2976651788,
0.0794598311,
0.1217887104,
-0.0141464435,
-0.3536335528,
-0.0541280434,
0.0513543226,
-0.0443672352,
-0.1495988965,
0.033932291,
0.1202746928,
-0.1339851916,
0.1744811088,
-0.4615813494,
0.1104638129,
-0.4668391943,
0.1116040945,
0.0113620944,
0.0800105184,
0.5854113102,
0.3444523811,
-0.1051354483,
0.048348248,
-0.2294131368,
0.0313921943,
-0.0876300111,
0.0033827089,
0.2333285511,
0.4563248754,
0.2585020661,
0.1466430724,
0.5971662402,
-0.1571906507,
0.0591794886,
0.0931066498,
-0.1019988582,
-0.006808646,
-0.2207561135,
0.1000622064,
-0.1552474201,
-0.1417076141,
0.4348694086,
0.1866175979,
-0.5755250454,
0.0369556099,
0.0787444338,
-0.0339540839,
-0.2688442469,
0.3238789439,
-0.2240193486,
0.1153781265,
0.0575223789,
0.0397320166,
-0.4204182029,
-0.4140305519,
-0.1729494184,
-0.2100839615,
-0.1254703999,
-0.2111761719,
-0.2528620958,
-0.0087270178,
-0.920953691,
0.4346579313,
0.0423065946,
0.2663877904,
0.0291174501,
-0.1270752102,
0.2269104123,
-0.0960791409,
0.5157930851,
-0.0552826747,
0.0635638982,
-0.0331189707,
0.0716398507,
-0.3244415522,
0.1178440154,
-0.3702856302,
0.2683571279,
0.1121727973,
0.4310156107,
-0.0707379356,
-0.2245577276,
0.3284596503,
-0.0398595296,
-0.1784521043,
-0.1064337566,
-0.2224119455,
-0.4364829957,
-0.300670743,
0.1323168874,
0.1993529499,
-0.0298144668,
0.0594167411,
-0.2182414681,
-0.0568515509,
-0.1921622902,
0.3076767623,
-0.0633952618,
0.2152738869,
0.1270606518,
0.093627505,
0.1779289246,
0.1557343453,
0.2029779255,
0.305621922,
-0.0692678764,
0.0772814155,
0.1778836399,
-0.0201268122,
0.2897515893,
0.3837614954,
-0.0966141075,
-0.1651208401,
-0.4494535029,
0.4448654652,
-0.5467808843,
-0.0021803975,
0.3576765358,
0.1874077916,
-0.3642299473,
-0.468197912,
0.3083801568,
0.4301118851,
-0.2308662385,
0.3238498867,
-0.3715762496,
-0.34393996,
0.4432553649,
0.2462607622,
1.0496561527,
-0.4170784354,
0.1567761451,
-0.1183275729,
-0.1092587411,
0.2459250689,
-0.247551918,
0.2015377283,
-0.1053603888,
-0.1511638165,
0.0992517993,
-0.0712986216,
0.2511321008,
0.2892045975,
-0.3414060771,
0.1495850086,
0.0113061368,
0.1863742918,
-0.0279172771,
0.0384019166,
0.2189950198,
-0.3954831064,
-0.0976108685,
0.1587070823,
0.0917467922,
-0.2410400659,
0.0605533421,
0.1979289055,
0.0437088907,
-0.406268388,
-0.2723633945,
-0.0460996255,
-0.2185845822,
0.4199740291,
-0.3964384794,
-0.0363085195,
0.1137495711,
0.2932000458,
0.0169056207,
0.3196719289,
0.0498150289,
-0.2268608809,
0.3166851401,
0.3254151344,
0.2444179952,
-0.0298818145,
0.0344423279,
0.1223584116,
-0.3180615902,
0.163526684,
0.0399917811,
-0.170268327,
-0.2749533057,
0.2188424319,
0.1691803187,
-0.0348456353,
0.0755606443,
0.1349302083,
-0.2710989118,
-0.2085315883,
0.1263071448,
0.0586602092,
-0.1913862824,
0.6787996888,
-0.1512291282,
-0.5358079672,
-0.0390401296,
0.4033439457,
0.399818927,
-0.0419903137,
0.2359112203,
-0.052959159,
-0.2472299039,
-0.2729048133,
0.0615731031,
-0.1938863844,
-0.2133276761,
0.1621176004,
-0.2020888627,
-0.1738425344,
-0.16148673,
-0.1788173616,
-0.1046940535,
0.0417484269,
0.0245125294,
-0.1625879705,
-0.5511969924,
-0.0844383463,
-0.0048967181,
0.3056385219,
0.0284458771,
0.1492987573,
-0.4053394198,
0.2631622851,
-0.2854909301,
0.1681711674,
0.031189017,
0.2942488194,
0.1396812499,
0.1356908977,
0.048588302,
-0.1166591495,
0.1171830297,
0.431351006,
-0.0945002288,
-0.2407009304,
0.1281099021,
0.1215903312,
-0.2400655746,
-0.4046660662,
-0.0769407749,
-0.1059112549,
-0.1060750112,
-0.366653055,
0.3326638341,
0.2881289124,
0.0065844096,
0.0331727639,
0.3520740271,
0.0294057056,
0.3683871925,
0.4676436186,
-0.3181142509,
0.4390546083,
-0.1310404092,
0.4889283776,
-0.0095690712,
-0.1177619621,
-0.0541596226,
0.1230430156,
0.1878216714,
0.2196972221,
0.0221039746,
-0.2346366495,
-0.0886605456,
0.3871625662,
0.0116695985,
0.1940532029,
-0.2117687166,
-0.0995645747,
0.2190716267,
0.1965898126,
-0.0653882176,
-0.1499189138,
0.3283311725,
0.1024899036,
0.0533679873,
0.3175069094,
0.1553061157,
-0.1566398144,
-0.2167558521,
0.0569214411,
0.186465323,
-0.2504199743,
0.0444999039,
0.4319387674,
0.1219547689,
-0.0511192456,
0.13287431,
0.006082559,
0.3391923904,
0.7737320662,
0.0299079325,
0.4731144607,
0.253051877,
0.3822730482,
-0.2586416006,
-0.2549133599,
0.0199650601,
0.5909482241,
-0.5202932358,
0.3448863924,
0.1492222548,
0.1271321923,
-0.1794498861,
-0.0138023663,
-0.2726605535,
0.2004188299,
-0.2477803379,
-0.3404520452,
0.2359283268,
-0.0598832518,
-0.2130357027,
0.1699007899,
-0.1578848511,
-0.1862816215,
0.7662408352,
0.1137117743,
-0.2051292211,
-0.0337391049,
-0.0958882421,
0.0757594407,
0.2537487745,
-0.4055741429,
0.044793658,
-0.112805292,
0.1331863254,
-0.0065244911,
-0.0909326524,
0.3416793942,
0.4272848964,
-0.3083943725,
0.0091655143,
0.0735296309,
-0.0213935487,
-0.2865780294,
0.2351251841,
-0.1621111333,
0.1921806633,
-0.0053284429,
0.0277607776,
-0.1431486458,
-0.3150231838,
0.3541502357,
0.2710658908,
0.0317659229,
0.2356159091,
0.0002753576,
-0.2144947946,
0.0864685923,
-0.1226089448,
-0.2344951779,
-0.4195283353,
0.440440923,
-0.4686650038,
0.4340607822,
-0.1359064281,
0.0892814174,
-0.0249708463,
0.3473842144,
-0.2726141214,
-0.3021366298,
-0.3087099195,
-0.1953901052,
-0.2418972999,
0.0147780143,
-0.2225597948,
0.0134642944,
-0.118745327,
0.2008839995,
-0.2130826414,
0.2623044848,
0.0436943099,
0.024049256,
0.0742782503,
0.3759107292,
-0.2080887109,
0.1624815464,
-0.0778408945,
0.0834020525,
0.2171086669,
-0.7093387842,
0.3202185631,
-0.0587177686,
0.0275210813,
-0.4466193318,
0.1894744784,
-0.0185403787,
0.2479850054,
0.5835254192,
0.3166787028,
0.1492123604,
-0.090725787,
-0.2716040611,
-0.2430967689,
0.1842844337,
-0.1386265159,
-0.1415857971,
-0.0156176463,
-0.079265438,
-0.3890058696,
-0.0809700191,
-0.0648030713,
-0.1123299897,
0.0023692697,
0.0472187772,
-0.3245969713,
-0.0081047155,
0.059438467,
0.2595489621,
-0.2023598105,
0.2692155838,
0.0353790373,
0.007394053,
-0.0858303979,
-0.4433559477,
0.2853235006,
-0.1633036584,
-0.3462833762,
-0.1708752215,
0.4053234458,
-0.2097500265,
-0.1706219614,
-0.237123251,
-0.0235589221,
0.160202831,
-0.0396215096,
-0.4610652328,
0.2239734232,
-0.1126031429,
-0.2044068277,
-0.0654524863,
0.2856174707,
0.0071124546,
0.0262756795,
0.2255576551,
-0.5136157274
] |
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.0729513019,
-0.2929825187,
-0.0424275734,
0.3707073033,
0.2069275081,
0.0879342407,
0.0891323462,
0.2784177959,
0.262588203,
0.2296096087,
0.1797680855,
0.4309554398,
-0.1489770412,
-0.0277887881,
-0.0165794957,
0.1438742429,
0.2830028832,
0.0198418498,
0.0992943048,
0.071644038,
-0.4489110112,
0.0283551645,
-0.4113303423,
-0.2822185755,
-0.1598484069,
0.148911342,
-0.0890548155,
0.3382926881,
0.2094045877,
-0.5164698362,
0.1316249371,
-0.0899928361,
0.1736141592,
0.2649434805,
-0.0001142843,
-0.1016196311,
0.1252174377,
0.0971599296,
-0.1957458258,
0.1276342571,
-0.314661324,
-0.3634472191,
-0.0303170029,
-0.3590404093,
0.0726522356,
0.1657170504,
-0.0194390528,
-0.6739724874,
0.217099458,
0.3392876983,
0.1941735595,
-0.1366488785,
-0.119686693,
0.1301042289,
0.2364716828,
0.2139767706,
0.0010635853,
-0.2308267355,
0.3229638934,
0.1149242669,
0.0747511536,
0.4133729935,
-0.2654496431,
-0.0384333096,
-0.0535106175,
0.0997085944,
0.352130115,
-0.2720300257,
0.3823863864,
-0.1950072497,
0.1814178079,
-0.3327332139,
0.1823685467,
-0.134874627,
-0.2793181539,
-0.451078862,
0.2298987657,
0.0367098302,
-0.1882490963,
0.136642471,
-0.0380602628,
-0.0894392803,
0.226784721,
-0.0533735454,
-0.0368238762,
0.1144272313,
0.0036474131,
0.1740721762,
0.2728738487,
-0.1116074994,
-0.2295515537,
-0.0282949805,
-0.0394033156,
0.1216240078,
-0.3987646997,
-0.1579461843,
0.0689611509,
-0.1813661903,
0.0463563427,
-0.3080102801,
0.1184399053,
0.1578161716,
0.2054124027,
0.1522977203,
0.3860757351,
0.0093934424,
0.0597696081,
0.3085867763,
0.2237630039,
-0.1464233994,
0.2582478523,
0.0417792536,
0.1672826558,
-0.2809307575,
0.3191927075,
-0.0285181366,
0.2365669012,
-0.1937863231,
-0.2665590048,
0.2586753964,
-0.0610515177,
0.2611828148,
0.0222863443,
0.2262550294,
0.2448637784,
0.4470610321,
-0.1463555992,
-0.1609273553,
-0.2841984928,
-0.1833254546,
-0.1512223333,
-0.0574942157,
-0.5046682954,
0.0224804357,
0.2060200572,
-0.0283942353,
-0.0664362982,
0.0933882743,
-0.1053040624,
-0.3432495594,
0.012175478,
-0.1125844494,
0.2572804689,
0.2620687485,
-0.239893645,
0.3993424773,
-0.1505592465,
0.0162435099,
-0.3013103604,
0.4810841978,
-0.370754689,
-0.2709360123,
-0.0990085229,
0.0852087587,
0.1575823277,
0.294764936,
-0.2420877814,
0.2445340604,
0.4286445677,
0.0269884318,
-0.0889526308,
-0.1213417575,
-0.6368368268,
-0.2681866288,
0.003034614,
0.4324846566,
-0.3264064789,
0.2170570642,
0.0809329748,
0.034449093,
0.5263160467,
0.3109473586,
0.0118522644,
-0.2675109506,
0.0316988677,
0.1533012837,
0.2658890486,
-0.3270070553,
-0.8171921968,
0.437191397,
-0.2157792747,
-0.1095284671,
0.1383830905,
0.2508606613,
0.4046898782,
-0.1663726568,
0.0347511396,
0.2282751203,
0.0608967468,
0.5903038383,
-0.4691991508,
-0.3038937449,
0.0413281918,
-0.0195753835,
-0.1173685789,
-0.1451270729,
0.0748493299,
0.1778636724,
0.4535482526,
-0.0585434437,
0.2303677946,
0.177459687,
-0.1110147983,
-0.0563487485,
0.1232415289,
-0.2524735332,
-0.4027753472,
0.1339413226,
0.0832432508,
-0.1526620984,
-0.0804286227,
-0.1751128435,
0.0650853366,
0.0063809529,
0.1269775033,
-0.369594872,
0.0472452156,
-0.0781126916,
0.0223033652,
-0.2606380284,
0.0992855877,
0.2954147756,
0.1608094275,
-0.0029196031,
-0.211958304,
0.006900385,
-0.025623709,
-0.1433462799,
-0.1732810438,
0.1090763062,
0.1120463908,
0.0333948433,
-0.1382000297,
0.2837572992,
0.28422001,
-0.0985990614,
-0.1563300639,
0.0272797495,
0.402482003,
-0.2332776338,
0.3270908594,
0.1425995678,
0.2420418113,
-0.1731169522,
-0.1279879361,
-0.0569078699,
0.1828204393,
0.2651679814,
-0.295845449,
0.12332616,
0.2298760563,
0.0121202469,
0.2454756796,
-0.3611180782,
0.0471439697,
0.2871870697,
0.0982580781,
0.1909160465,
0.0465371832,
0.2114554346,
0.3700149953,
0.0057401285,
-0.0826596618,
0.2261687666,
-0.4248208106,
-0.21125184,
0.1328225285,
-0.1818520874,
0.4213222861,
0.1641582251,
0.0243874192,
-0.0241141971,
0.0120312832,
-0.0545139797,
0.1692526042,
0.0867376477,
-0.0513383709,
-0.3676340878,
0.2332721651,
-0.140382275,
-0.065390721,
-0.1040041372,
0.0889225528,
0.3924358189,
-0.2967655659,
0.0110158473,
-0.193551302,
0.4005855322,
0.0906689018,
0.1055028364,
0.1667191833,
-0.1814550161,
-0.0567366295,
0.0982362479,
0.0294010565,
0.0516113564,
0.0656299144,
0.113294214,
0.0556620881,
0.0510637984,
-0.1494138688,
-0.2518105507,
-0.2523030937,
-0.0411087088,
0.2673364282,
0.0278149545,
0.3511579633,
0.050458841,
-0.1552988291,
-0.0317019187,
-0.0926318094,
-0.0218252409,
0.1374751627,
-0.0347245783,
-0.225771457,
-0.0832700431,
-0.0728775561,
0.1783145964,
-0.0700539276,
-0.2762168646,
-0.1268473268,
0.3321936429,
0.0612366721,
-0.11370188,
-0.2935320139,
-0.2158632278,
-0.1409102529,
-0.119353354,
0.1708791107,
0.1151362211,
0.4196766317,
-0.2845651507,
0.3068882823,
0.0737348497,
0.1142019629,
-0.0205501653,
-0.3569996655,
-0.0585362129,
0.0571642295,
-0.0496483929,
-0.1584663838,
0.0290772617,
0.1449579,
-0.122037746,
0.1793142855,
-0.4542495608,
0.1180748791,
-0.4690531194,
0.1137290224,
0.0141398981,
0.062865302,
0.5845879316,
0.3504352868,
-0.0964850485,
0.0529159307,
-0.2306267619,
0.0342686027,
-0.0814835876,
-0.000593707,
0.2426688075,
0.453247577,
0.2545184493,
0.1341665387,
0.604947567,
-0.1597820669,
0.0588249825,
0.0959705338,
-0.1034304723,
-0.0146368593,
-0.2227413356,
0.0980295986,
-0.160787046,
-0.1319239438,
0.4267861843,
0.1794436723,
-0.5726999044,
0.0305255651,
0.0714423507,
-0.0304648876,
-0.2655982375,
0.3138511181,
-0.2360403836,
0.1396572143,
0.052965343,
0.0380795971,
-0.4211666286,
-0.4224819541,
-0.189761281,
-0.2102631629,
-0.114862293,
-0.204551667,
-0.255040139,
0.0069440342,
-0.9173229933,
0.4260070622,
0.0354429968,
0.2873561382,
0.0209310651,
-0.0870490819,
0.237459451,
-0.0823642984,
0.5041686893,
-0.0462330244,
0.0520479158,
-0.0369975418,
0.0529945046,
-0.332100302,
0.1269350201,
-0.3692097366,
0.2951184213,
0.1372308731,
0.4450315833,
-0.0686329827,
-0.2359065115,
0.3105685413,
-0.0280557759,
-0.179898262,
-0.1254394948,
-0.2167562395,
-0.4200910926,
-0.3174935579,
0.1215161532,
0.2025135607,
-0.0256984644,
0.0626201779,
-0.2181416601,
-0.0525459945,
-0.1870115101,
0.3138549924,
-0.0666478798,
0.2187059522,
0.1215392202,
0.1070262641,
0.1821807772,
0.1268317699,
0.2172588706,
0.2916453183,
-0.0685903355,
0.0877601132,
0.1812861562,
-0.0198488906,
0.2986556292,
0.3787655234,
-0.0977904126,
-0.1653564274,
-0.4598184526,
0.4437203705,
-0.5339169502,
-0.005692184,
0.3493116498,
0.1893454641,
-0.3774061799,
-0.468043983,
0.3122804761,
0.4378610551,
-0.2264335155,
0.3244336247,
-0.3689556718,
-0.3400513232,
0.4310781658,
0.2459563762,
1.0425149202,
-0.4180924296,
0.1474301368,
-0.1219953597,
-0.1226690263,
0.233407408,
-0.223524794,
0.2028814554,
-0.120493181,
-0.1521510929,
0.0998855159,
-0.0788350403,
0.2469510138,
0.3027501106,
-0.3435834348,
0.1628808826,
0.0121392161,
0.1544174254,
-0.0279076248,
0.0670082197,
0.2419486791,
-0.3951827884,
-0.0779891014,
0.155891791,
0.0974491835,
-0.2486915141,
0.0699927062,
0.1840824932,
0.0488280281,
-0.3842259049,
-0.2763752639,
-0.0557901599,
-0.2391084582,
0.4249266088,
-0.3855212629,
-0.0357600227,
0.138472423,
0.2917605937,
0.0209085681,
0.3187535703,
0.0544689074,
-0.2226588726,
0.3064106405,
0.3159708381,
0.2370695174,
-0.0073575228,
0.024091186,
0.1245166361,
-0.3129649162,
0.1590853781,
0.0319007151,
-0.1547681987,
-0.2773495317,
0.201564312,
0.1497802585,
-0.0377496891,
0.0626069531,
0.126682207,
-0.2779561579,
-0.2009114623,
0.1245698333,
0.0692266524,
-0.1845235825,
0.6873887181,
-0.1515240967,
-0.5412963629,
-0.0418948233,
0.3999685645,
0.3928991556,
-0.0489328355,
0.2371805161,
-0.0453167669,
-0.2420302778,
-0.2633188963,
0.0626353696,
-0.1891955733,
-0.2120864093,
0.1704224944,
-0.1979535073,
-0.1644149721,
-0.1494857073,
-0.1847037077,
-0.1102132723,
0.0472382791,
0.0317661166,
-0.1628389955,
-0.5576217175,
-0.0959421769,
-0.0174774956,
0.3096829653,
0.0278618485,
0.1491668373,
-0.3958246708,
0.2738783658,
-0.2793940306,
0.1749606431,
0.0430203378,
0.2951634526,
0.1685284823,
0.1238416284,
0.0481741764,
-0.1176059842,
0.1080879271,
0.4275875092,
-0.0902689695,
-0.2311124206,
0.135623306,
0.1214945763,
-0.2221675515,
-0.4117948413,
-0.1003168523,
-0.110296011,
-0.1172307953,
-0.3700532913,
0.3181644678,
0.2941941619,
-0.0046399795,
0.0415021814,
0.34466663,
0.0228507165,
0.3782467842,
0.4740268588,
-0.3175376356,
0.4398245811,
-0.1240399629,
0.5029128194,
-0.0006965734,
-0.1194651648,
-0.0664821714,
0.1135384887,
0.1893251389,
0.2019133121,
0.0142617133,
-0.2180066109,
-0.0792211592,
0.3881902993,
0.0022825524,
0.1882447451,
-0.2010737658,
-0.1041810885,
0.2134893537,
0.1874679774,
-0.0533840433,
-0.1512507796,
0.3261017203,
0.1152947843,
0.0401344895,
0.3144667745,
0.161216408,
-0.1535584033,
-0.2242771238,
0.0629227385,
0.1983854175,
-0.2453488708,
0.0340039134,
0.4191626012,
0.1287708879,
-0.0589253604,
0.1465149522,
0.0083793048,
0.3284142017,
0.7951183319,
0.014645407,
0.4674241543,
0.2519780397,
0.3775938749,
-0.2475754172,
-0.2453172952,
-0.0037000799,
0.5978003144,
-0.5198105574,
0.3401632309,
0.137522161,
0.1434898227,
-0.1845972538,
-0.0176326744,
-0.2620610893,
0.221281141,
-0.2488324046,
-0.335947156,
0.2347175926,
-0.0679702312,
-0.2230430394,
0.181435138,
-0.1633817255,
-0.1857768893,
0.7715324163,
0.1256974936,
-0.2111798972,
-0.0299299732,
-0.1057045758,
0.1067801416,
0.2385018021,
-0.4037962854,
0.0527578518,
-0.1270993054,
0.1256875992,
-0.0163103454,
-0.0895854235,
0.347972393,
0.4311935008,
-0.3091957569,
0.00669102,
0.0831449181,
-0.0184263811,
-0.2655337453,
0.232706368,
-0.1633505821,
0.2119306326,
-0.0132776536,
0.0194178671,
-0.1292650104,
-0.3239423931,
0.3484844267,
0.2820703685,
0.0261903517,
0.2455248237,
0.014050968,
-0.2189699709,
0.0910013989,
-0.1264252067,
-0.2209578305,
-0.4252363145,
0.4463095367,
-0.4778804481,
0.429202944,
-0.1338778138,
0.0863557979,
-0.0299514104,
0.3474975228,
-0.2645899951,
-0.3152247965,
-0.3324304223,
-0.2019026428,
-0.2512767315,
-0.007247515,
-0.2229036242,
0.0300767124,
-0.1103315502,
0.1783269644,
-0.2234193236,
0.2558409274,
0.0423541628,
0.0398418792,
0.0681417435,
0.3679828942,
-0.2168523073,
0.1783963442,
-0.0945818573,
0.0818411708,
0.2187577039,
-0.6929850578,
0.3271977305,
-0.0742615983,
0.0175318792,
-0.4543448389,
0.1899348795,
-0.0266179591,
0.2580187321,
0.5818483233,
0.3229671419,
0.1431879103,
-0.0801821202,
-0.2579419017,
-0.2280541658,
0.1943676472,
-0.134755224,
-0.1406229734,
-0.0131772906,
-0.0856252685,
-0.3904080987,
-0.0767765939,
-0.0737421885,
-0.1178448647,
-0.0169842765,
0.049050115,
-0.3196551204,
-0.0116919801,
0.0686314404,
0.2735210359,
-0.192598477,
0.2733895779,
0.0418229103,
0.0107282028,
-0.0904775858,
-0.4277678132,
0.2736372352,
-0.1582602412,
-0.3398911655,
-0.1713922173,
0.3896193504,
-0.1916776896,
-0.1781104654,
-0.2426635921,
-0.0195112154,
0.160162881,
-0.043817997,
-0.463844955,
0.2188515067,
-0.1155031994,
-0.199562192,
-0.0619688928,
0.2797384262,
0.0230919123,
0.0117793754,
0.2181987762,
-0.4928126037
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.4040596187,
0.2139614224,
-0.1343097836,
0.1632939577,
0.2269005477,
-0.180889219,
0.2195486277,
0.4007898867,
0.1186832264,
-0.0092015862,
-0.309453398,
0.0660656914,
0.1796628237,
0.1480767429,
-0.1164039075,
0.1400312632,
0.0100119635,
0.0462009422,
-0.1018282324,
-0.0599145852,
0.0717083663,
-0.1256887913,
0.0162408352,
-0.2149131149,
-0.3218290508,
-0.0351730362,
0.2733654976,
0.0361013934,
-0.2680940628,
-0.1831431687,
0.204599604,
0.241950959,
0.0882457644,
0.3962604702,
-0.0001050314,
-0.0951046273,
0.3049379587,
0.0726466626,
-0.2473203838,
0.1302322149,
0.0542526543,
-0.3366993666,
-0.1207265779,
0.1083626747,
-0.0350145027,
0.1210586131,
-0.227734983,
-0.0067850426,
0.355899632,
0.1554212868,
0.2586393356,
0.0054167956,
-0.2216914594,
-0.3251926601,
0.15560247,
0.2288567126,
-0.2061294913,
0.316334933,
0.4986958206,
-0.1909870356,
-0.5347764492,
0.0420749635,
-0.0375932083,
0.1030170023,
-0.2523976564,
-0.0648472384,
0.1814326197,
-0.0184340794,
0.2288665473,
0.2305989861,
0.5177356005,
0.2850897312,
-0.3112405837,
-0.2834502161,
-0.3231844604,
-0.3884500265,
0.2092756778,
-0.0874324366,
-0.0877031982,
0.035512615,
-0.2518313825,
-0.2028426528,
0.0418957025,
-0.0694678724,
-0.378108561,
-0.12019407,
-0.0730067343,
-0.0856002122,
0.1283763349,
-0.2761496007,
0.2117173672,
-0.0886533037,
0.1636078358,
0.1016130596,
-0.5672923923,
-0.0537962839,
0.351371944,
0.0552260503,
0.1529624462,
0.2054211944,
0.1399327219,
0.2763738036,
0.0849816129,
-0.2167821825,
0.3756538332,
0.2172034085,
-0.20706743,
-0.0734168738,
0.4972683489,
0.1715171486,
-0.2257164121,
0.0879861861,
-0.14563182,
-0.080497548,
0.069287315,
-0.2820037603,
-0.1707883477,
-0.3726625144,
-0.3188100159,
0.2520972192,
0.1120122075,
0.0482921451,
0.1105853319,
0.3219353557,
-0.0813054293,
0.4326561391,
0.0139109045,
-0.1857732534,
-0.1517118514,
-0.2132652402,
-0.2128109634,
-0.2773059905,
-0.4498106241,
0.1449789256,
0.4436470866,
0.0247754641,
0.0010009222,
0.2090334892,
0.1273997873,
-0.0103910714,
-0.2007550895,
-0.3551881015,
-0.244688943,
0.1974931955,
-0.1794243455,
0.3334897161,
-0.1749728322,
0.1509912461,
-0.1955756992,
0.1619167328,
-0.3553525805,
-0.2452232838,
0.3079731762,
0.3025396466,
-0.1045792997,
-0.0446105748,
-0.412905246,
0.2642709017,
-0.11009451,
0.0590914786,
-0.1334378272,
-0.0237632338,
-0.1063726842,
-0.0018750317,
0.0808163881,
0.2770813107,
-0.3943966031,
0.1528885812,
-0.2211907655,
0.1494282037,
0.1306663156,
0.397742182,
-0.3263543844,
0.0876104459,
-0.1106214672,
0.0166787356,
0.1702516675,
-0.3009161949,
-0.5397735834,
0.3998310566,
-0.2098791301,
0.1034380496,
0.1209402457,
-0.0182540957,
0.3900320828,
-0.2471286058,
0.2662605345,
0.5497128963,
0.0612694845,
0.1136703491,
-0.3252186775,
-0.1047571674,
-0.033708699,
0.5643472075,
0.1143966019,
-0.1104969084,
0.136120826,
0.0966815427,
0.1597174257,
0.0527681522,
-0.075020507,
0.1345389038,
0.1969802231,
-0.0893596411,
-0.0232278239,
0.1839110404,
-0.4957304895,
0.4001033306,
-0.0450959876,
-0.2439484149,
0.370695442,
0.0798821449,
-0.105179444,
-0.1792068779,
-0.1787629277,
0.1509503722,
0.1051254421,
-0.1905718297,
-0.0538967438,
0.190286696,
0.1383857727,
0.3167600334,
-0.3021216393,
-0.0019233488,
0.0116817839,
0.1035132632,
0.1402073801,
-0.0813199207,
0.1752837598,
-0.0305483975,
0.0584350228,
-0.0661689937,
-0.0891323686,
0.089565888,
0.1268128157,
0.3413229287,
-0.0124413017,
0.2423081845,
0.1456024945,
0.3362046182,
0.1086201072,
-0.0293663312,
0.0543256365,
-0.3189199567,
-0.2518002987,
0.4823025465,
-0.0920581818,
0.1507885456,
0.1164515167,
-0.3269927204,
0.4123487473,
-0.1484994143,
0.2559317648,
0.2874783874,
0.553678751,
0.0951027274,
0.4025274217,
0.2306760103,
-0.2004443109,
0.2244458348,
0.2324171364,
-0.0279094279,
-0.3425456882,
0.1649184227,
-0.0515675582,
-0.2804045677,
0.0083010979,
0.0587807447,
0.5520929098,
0.1125909165,
0.0406087674,
-0.1931914687,
0.4311434627,
-0.3056516349,
0.2764782906,
-0.0137506872,
0.0817662627,
0.4084936976,
0.4574063718,
-0.2098319381,
-0.4086068869,
-0.1135860607,
0.3819160163,
0.1469848454,
-0.0728042722,
-0.1258428693,
-0.2039957345,
-0.0578329191,
-0.0548911728,
-0.1194074154,
-0.2367257774,
-0.2680535316,
0.0132278539,
0.3044428527,
-0.0600872636,
0.0084871259,
-0.2665055394,
0.5148742199,
0.0486835614,
-0.0543116182,
-0.4178191721,
-0.0225869846,
-0.2159593999,
0.1583644152,
0.1625202745,
-0.2993915081,
0.2113571167,
0.1774641573,
-0.0072439238,
-0.0192258731,
-0.3806325197,
0.0831743181,
0.247445941,
0.0479112342,
-0.2346098423,
0.0143206716,
0.1991362423,
0.0063421316,
0.0695413798,
-0.3881137073,
-0.1075758189,
0.0090650655,
-0.0538931563,
0.1783516705,
0.0542122349,
-0.2898906171,
-0.1657840163,
-0.4625600576,
0.2143463194,
-0.1899102479,
0.0008024722,
0.2282609493,
-0.1258066446,
0.0544251911,
0.0254092552,
-0.1182289124,
-0.2713724971,
-0.5140331388,
0.3919062018,
-0.0605121404,
-0.3088650107,
-0.2225771546,
0.1292106956,
-0.0127303749,
0.2743844092,
-0.4091222882,
0.1720886528,
-0.2697909176,
0.1982391626,
0.0265610684,
-0.0886875466,
0.0365651399,
-0.2912842631,
-0.2206212431,
-0.0252422802,
-0.0509681478,
0.1468975544,
0.2361962944,
0.3168796003,
-0.2697793245,
0.3415641785,
0.1393637657,
0.4849933088,
0.0297212601,
-0.0464571156,
0.3064986765,
0.3087261617,
0.1859565228,
-0.216608867,
-0.1917749643,
0.0240006968,
-0.2419843823,
-0.1816827059,
0.3324068785,
-0.0094316415,
-0.4836247265,
-0.0519544818,
-0.0279165991,
0.2211064696,
-0.1555523872,
0.2269755453,
-0.1468745619,
0.0044934973,
0.1748710871,
0.0506792068,
-0.2485348582,
-0.2570218742,
0.0509835482,
-0.2897286415,
0.1129225791,
-0.2460881174,
-0.1308769882,
0.3246513605,
-0.665496707,
0.0506281555,
-0.126772061,
0.3393505812,
0.1319967359,
-0.0208720155,
0.2086360306,
0.0468041971,
0.5165273547,
0.0898200721,
0.139301762,
0.0003714934,
-0.4541064203,
0.0226786882,
-0.21417135,
-0.051446341,
0.0486919731,
0.3995548487,
0.3858709335,
-0.382771343,
-0.1480105966,
-0.0237375945,
-0.0528075062,
-0.222607851,
-0.2605671585,
-0.0055548549,
0.1305888295,
0.1284989417,
0.2395781279,
0.1507949382,
0.1218815893,
-0.2085510194,
-0.0549900532,
-0.0681530386,
0.1829020679,
0.2443774492,
-0.1095462367,
0.1049960479,
0.034653075,
0.5330206156,
0.2021950334,
0.162039876,
0.3916486204,
0.5336760879,
-0.0214429088,
-0.0590333194,
0.1207183748,
0.0848847628,
0.1329707652,
0.5663326979,
0.1114224941,
0.0659486204,
-0.318154633,
0.0906943828,
-0.1745761633,
0.1184814721,
0.1554068327,
-0.1474260241,
-0.309409529,
-0.159117192,
0.510748446,
0.0106083155,
0.0419921279,
0.1951282918,
-0.2514153123,
-0.0468581803,
0.0357323438,
-0.132093966,
0.8368294835,
-0.0260927901,
0.1040350348,
-0.0680803508,
-0.0040176734,
0.252350688,
-0.3498373926,
-0.0505502038,
-0.2066835761,
-0.1628439128,
0.2075825632,
-0.0653008595,
-0.039213568,
0.216012001,
0.1681977063,
0.1074097008,
-0.0210482702,
0.376625061,
-0.1330874562,
0.2871603668,
0.1428230554,
-0.1990967691,
-0.1988933086,
0.217318356,
-0.1519213319,
-0.0115482472,
-0.0593674444,
-0.0738367736,
-0.0321619362,
0.0265143141,
-0.082303986,
0.0418743715,
-0.1302344799,
0.3452497423,
-0.0467487499,
-0.3350996375,
0.1721287668,
-0.2237443626,
-0.4176701605,
-0.0647131577,
-0.2056359798,
0.3521540761,
-0.1278087497,
0.3836576045,
0.3575840294,
-0.2768970132,
0.2228883803,
-0.073464632,
0.0860967934,
-0.127602905,
-0.020073384,
-0.2176634073,
-0.2408342659,
0.0453494899,
0.1819566339,
-0.2663728297,
-0.1333114207,
0.0646924004,
0.1159256399,
-0.1442126632,
0.2071657926,
0.1312046051,
0.1609457731,
0.3172069788,
0.0431221165,
-0.177399233,
-0.2193927169,
0.6642943025,
-0.0262712389,
-0.2106988132,
0.3752239048,
0.1622523665,
-0.3655774891,
-0.1216233894,
0.0316352621,
0.3744306266,
-0.45612818,
0.3150389791,
-0.2884169519,
-0.07857088,
0.2572206557,
0.0436802953,
-0.0155683327,
-0.4285443425,
0.0068618208,
-0.2145425677,
-0.2761790156,
0.0276387557,
-0.0778128356,
0.101888977,
-0.3613103628,
-0.1052531004,
-0.1253165752,
0.3255429864,
-0.3826213777,
0.2146106958,
0.067927435,
0.1204811484,
-0.1848232001,
-0.4223629832,
-0.01130151,
-0.0841144845,
0.1070701033,
0.1057985947,
-0.1574968696,
-0.3501001,
-0.0694133341,
0.112511754,
-0.0117708733,
-0.0029525533,
0.1273092031,
-0.3357500434,
-0.029435046,
-0.1573073268,
0.0086404607,
0.1867412031,
0.0523037165,
-0.3707134128,
0.230056718,
0.078484118,
-0.0203802288,
0.3685419559,
0.0107490122,
0.1475580782,
0.1166393459,
0.1964164227,
-0.1105825603,
-0.2409083992,
-0.1624658108,
-0.118479073,
0.2805276215,
-0.0467042103,
0.321559906,
-0.3202124834,
-0.0950986296,
0.2012292296,
0.361281991,
0.5668721795,
-0.0242241342,
-0.3804126978,
0.07325463,
0.2727665901,
-0.1539492607,
-0.1301031262,
0.0856585503,
0.0380624682,
-0.1332577467,
0.0265710354,
0.3532828391,
-0.1669160873,
0.1675895005,
0.1402466446,
0.4464416206,
0.0974351987,
-0.0348317623,
0.106555149,
0.1278481185,
0.0280678812,
0.5872796178,
0.259762615,
0.065020591,
0.4543122053,
0.026957579,
0.3439674377,
0.0912302285,
0.1599008441,
0.0254587028,
-0.4160403907,
-0.109056212,
0.3545895517,
-0.3630831838,
0.0509818047,
-0.0628618374,
0.11601381,
0.0191871934,
0.0246345922,
-0.3914384246,
0.04973571,
-0.2921127379,
-0.0543964356,
0.1644138843,
-0.1611651629,
-0.082983993,
0.2432958037,
-0.2323414385,
0.0507889315,
0.4543322921,
0.2904662192,
-0.0613239519,
-0.4144059718,
-0.254457593,
-0.1119510084,
0.1596448421,
-0.2450051308,
0.1634242833,
-0.0468113497,
-0.1688563526,
0.104856655,
0.2044879347,
0.183454752,
0.3097060621,
0.1034322679,
-0.0217748135,
0.0743552297,
-0.0863784179,
-0.13775599,
0.517518878,
-0.009070415,
0.106791839,
0.1602637917,
0.1014398336,
-0.3488076031,
-0.2175480872,
-0.0757733285,
-0.1216346622,
-0.206687063,
0.1268772036,
0.2536279559,
-0.1020720676,
-0.3327091634,
-0.203864947,
0.0937746316,
-0.2198896706,
0.2739775181,
-0.2362273633,
0.065908432,
-0.1743783951,
0.1296193451,
-0.3521490097,
0.5997636318,
0.0962920934,
0.006336635,
-0.4889295101,
-0.0470263883,
-0.4901947081,
0.1136226133,
-0.2887199819,
0.3211908937,
0.1183495373,
0.5177027583,
-0.0065305009,
0.0363758877,
-0.0883131623,
0.1146807373,
0.0202271082,
0.0085200854,
-0.4558710456,
0.2321361899,
-0.0280462354,
0.0410674885,
-0.1092436016,
-0.489546597,
0.3563457429,
-0.0153235123,
0.08288645,
-0.2241467834,
-0.1388384253,
0.1841080338,
0.4946779609,
0.3996111453,
0.0950392857,
0.2468270659,
0.1787796468,
-0.152498275,
-0.3793301284,
-0.2371507883,
-0.033309117,
-0.1625071764,
0.0524967276,
-0.0921577662,
0.071034804,
-0.0117717646,
0.0052399635,
0.1160591841,
-0.2415509224,
-0.0463599302,
-0.1688952744,
-0.3302363753,
0.0503660887,
0.3088818789,
0.0663311929,
0.3367394209,
-0.1124828607,
0.0192806423,
-0.4977087975,
-0.3860774338,
0.3325392008,
-0.3619929254,
-0.1143824458,
-0.2368953526,
0.4293966591,
0.3034189045,
0.226449579,
-0.2960946262,
-0.0187426135,
0.179389134,
-0.1053811759,
-0.0332276076,
0.4777285457,
-0.0485654436,
0.0319638252,
-0.0503285788,
0.2442062646,
0.058308173,
-0.2495266646,
-0.1617683321,
-0.0234538503
] |
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.2187605202,
-0.166741997,
0.0313901082,
0.4202872813,
0.4102849364,
0.2086267471,
0.3599505126,
0.332182616,
0.0959173888,
-0.0865042806,
0.1432958543,
0.1121852919,
-0.3130259514,
0.1154062748,
0.2711091638,
-0.1855064929,
-0.0543440767,
0.1169157922,
0.0061772037,
-0.0527790673,
-0.0572856069,
0.212070629,
-0.0856258199,
0.0367862545,
-0.5357347727,
-0.1124622077,
-0.0895915926,
0.533177197,
-0.1113564298,
-0.4210806191,
0.2054497302,
-0.2190001607,
0.5652353168,
0.3786011934,
-0.0001178408,
0.1366186142,
0.0195876434,
-0.3046216965,
-0.2785407007,
-0.3674177527,
-0.047392983,
-0.1517329812,
0.3131979704,
-0.2982818484,
-0.2849582434,
-0.2986625731,
0.1183679327,
-0.4172200859,
0.5750333667,
0.5418709517,
0.1464993656,
-0.1126832664,
-0.1135132089,
0.1661650091,
0.1643294692,
0.1989791095,
0.0532441363,
0.45635885,
0.2359479219,
-0.1866138577,
0.1223261282,
0.0028426945,
-0.0856465921,
0.2835537791,
0.4207869768,
0.2291144133,
0.2676958442,
-0.3368065953,
-0.0659591481,
0.4293656945,
0.5069271326,
-0.4630823433,
-0.1613178253,
-0.2148655057,
0.0965309516,
-0.5334345102,
0.1466607153,
0.1705651581,
-0.1693035811,
0.1613126546,
-0.0401137993,
-0.1284483671,
-0.2960372567,
0.3532930315,
0.1373363733,
-0.0046972185,
-0.2373587638,
0.1342297196,
-0.0491267368,
0.2122364342,
0.1465491354,
-0.1308976412,
0.1160606444,
0.3526327312,
-0.2304417044,
0.0151428133,
-0.3056647182,
-0.2286915183,
-0.1049201041,
-0.221810773,
0.0616085008,
-0.1123375371,
0.0158280246,
0.1886264533,
-0.034982767,
0.1783738434,
-0.0147658661,
0.2518508434,
0.1695749313,
-0.0863321424,
-0.227728948,
-0.1104217991,
-0.436483413,
-0.3626223207,
-0.1716033816,
0.1861089915,
-0.0098629519,
-0.2603826523,
-0.1868663132,
-0.0135935079,
-0.4629864097,
-0.1196216568,
0.0501889065,
0.4206338823,
0.0471914448,
-0.2701143026,
0.1909435391,
0.3114244938,
-0.298220396,
-0.0205372348,
-0.1354183704,
0.2676131129,
-0.166753903,
0.0067309886,
0.2710704207,
-0.0559692346,
0.5489364266,
-0.1468862295,
0.0182242915,
-0.1580577195,
0.2986269891,
-0.3071925044,
0.1116291881,
0.3208245933,
-0.136329338,
-0.1147710979,
0.2910400629,
-0.0443103798,
-0.1029341593,
0.1777274907,
-0.3631932139,
-0.3632005155,
0.0566774383,
0.0550088212,
-0.0763358548,
0.0673879534,
-0.0280145109,
0.1393103749,
0.3043963313,
0.0021817088,
-0.124805063,
-0.4227060974,
-0.2112959027,
-0.163384065,
0.3459708989,
0.500891149,
-0.3272346854,
0.1389872432,
-0.0614095032,
0.0824356675,
0.1293084174,
0.179176107,
-0.4740314484,
0.5258907676,
-0.3562895656,
0.2602772713,
0.3359385729,
-0.3661048412,
0.2029669136,
0.4296664,
-0.0621656217,
-0.0405628905,
0.1338303387,
-0.0786807314,
-0.1721274853,
-0.0613217205,
0.1770076901,
0.2244347334,
-0.1008405015,
0.0733384416,
-0.1971498728,
-0.2577084899,
-0.0527974144,
0.1942563951,
-0.0366873853,
0.0767977983,
0.1875151247,
-0.0004554205,
0.1252679229,
-0.2678145766,
0.1207693443,
0.3422432542,
0.0662676841,
0.1107206196,
0.0467291027,
0.1225750297,
-0.3514126837,
0.1639358401,
-0.0799138844,
-0.0736310109,
-0.1430326402,
-0.0644589812,
-0.1137371585,
-0.2062305063,
-0.3944913149,
-0.2405233085,
0.026596047,
0.0217938442,
0.0545741767,
0.0177387968,
-0.3444506526,
0.1442456841,
-0.4874130487,
-0.0421784818,
-0.0992308706,
0.2021944225,
0.016421482,
0.0035267174,
0.0593576357,
0.0558217317,
0.0060583227,
-0.3265493512,
-0.1184615195,
0.3234589994,
0.0528179295,
0.0771331191,
-0.1485345513,
0.2100296915,
0.1040449664,
-0.0613659024,
0.1945240796,
0.0633509383,
0.3194554746,
-0.1345398128,
-0.1995001286,
0.3969225883,
0.0695654154,
0.0165771991,
0.1155703366,
-0.2274146676,
0.1046558991,
-0.0991498828,
-0.0072399341,
-0.1597730815,
0.2439167947,
0.0610595308,
0.1981467903,
-0.1272441447,
-0.3091565967,
-0.2142787725,
0.3216104805,
0.254540801,
0.037385717,
0.0955028608,
-0.1733589768,
0.0505983159,
0.0459097847,
0.2077757716,
0.497913003,
0.0192746446,
-0.2003571093,
0.3725383878,
0.0216429196,
-0.2439143062,
0.1191152185,
-0.0843782648,
0.3388145566,
0.4956532717,
-0.2445805371,
-0.0676741749,
-0.2141523361,
-0.0274475329,
0.3034136891,
0.4202143848,
-0.5494008064,
0.2633036673,
-0.3707829416,
-0.1403631568,
-0.4049874246,
0.1483590007,
-0.0332336016,
0.1332536489,
-0.3153635263,
0.1717953533,
0.2486154437,
0.0067793056,
-0.1144893095,
-0.0167526603,
0.0440500155,
-0.3137130141,
0.094830811,
-0.1302254945,
-0.2783362865,
-0.0179275181,
0.5486418009,
0.1192938313,
0.0776708573,
-0.1489706039,
-0.3432919383,
0.0173714831,
-0.0160408616,
0.1359621733,
0.0386183932,
0.394720614,
-0.0001716278,
0.3190339804,
-0.2006281614,
-0.0312068202,
0.1276064217,
0.1451544166,
-0.1676793694,
-0.162607789,
0.0045526512,
-0.2500948906,
-0.1370777041,
-0.6858377457,
-0.5413182378,
-0.1693505943,
0.075347662,
0.2003326267,
0.1947262883,
0.1813875735,
0.1762081534,
0.245031476,
0.056147851,
0.1711570621,
-0.0381062403,
-0.446524322,
0.2264536321,
-0.2394656837,
-0.2247732431,
0.3580352962,
-0.0442436188,
0.0215441901,
0.1005166098,
-0.5381850004,
-0.1136736423,
0.2504936755,
-0.0290172473,
-0.0123385079,
-0.0333240815,
0.284833163,
-0.0811642408,
0.1176243275,
-0.0744212791,
-0.0750231221,
0.3046922088,
0.1528558731,
0.2563611567,
0.3320653737,
0.5313268304,
-0.0368126072,
0.7044882178,
0.2361268103,
-0.2257723957,
0.3754787445,
-0.3037631214,
0.1068049744,
-0.1427257359,
-0.113576591,
0.2218451202,
0.083533816,
-0.2613658607,
0.1790175736,
0.0471938401,
0.0657036006,
-0.2824084461,
0.3268259764,
-0.0857605487,
-0.1656235158,
0.2103680819,
-0.157673955,
0.4189040065,
0.0357236415,
0.1311352551,
0.1456912011,
-0.2054312974,
-0.0827773288,
0.5667656064,
0.1291616112,
0.2777432799,
-0.5577231646,
-0.3043444157,
-0.3477808237,
0.1395134926,
0.1647332311,
0.487090528,
-0.1520961523,
-0.0405337103,
0.3218387961,
0.0231594704,
0.4743598104,
-0.2974196374,
-0.013939904,
0.3608808815,
-0.0608360991,
0.0712912306,
-0.1211799681,
0.1311720461,
0.5619030595,
-0.0362301096,
0.4016290009,
-0.1029695645,
-0.2938932776,
0.0835926086,
0.2028922439,
-0.1985015273,
-0.2078434229,
-0.1692016721,
-0.1432555765,
-0.2997450829,
-0.2505711019,
0.0571177155,
0.1843991727,
-0.0075567737,
0.2715386748,
-0.0176872704,
0.1675961018,
0.2338579744,
0.0625929683,
0.295753777,
0.120759517,
0.1210651696,
0.2668471932,
0.3667301238,
0.4993267655,
0.5277525783,
-0.4694200158,
-0.1614111662,
0.1477746069,
-0.177769199,
0.3248335421,
0.2907815278,
-0.2040282041,
-0.0262714587,
0.2625288665,
-0.2953738868,
-0.0472019203,
0.2233003676,
0.2479668856,
-0.0097969249,
-0.0658063591,
-0.5862114429,
0.2136281878,
0.0521747097,
0.1908981204,
0.1354256719,
-0.6723157763,
-0.446292311,
0.2254081517,
-0.0128194466,
0.7663849592,
-0.2099231482,
0.4583091438,
0.1677958965,
0.2719206214,
-0.0255541224,
-0.4253873825,
0.2740533352,
-0.4830496311,
0.0642506778,
-0.1064787284,
-0.1500701308,
0.2763528526,
0.1562800109,
0.0164979696,
0.1594831049,
0.0549421608,
0.1809709668,
-0.0730056614,
0.3219027817,
0.2434391379,
-0.1929607689,
-0.2359693944,
0.0102940202,
-0.1801215261,
0.2100582272,
-0.1129737794,
-0.1887555867,
-0.1296454072,
0.0862197429,
0.0653890073,
-0.0907203853,
-0.6141548753,
0.1236638278,
-0.157600075,
-0.3965592682,
0.2871083617,
0.3647824228,
0.1706041396,
-0.0710478574,
-0.2954194844,
0.1321606934,
0.1122570187,
-0.184217751,
-0.0329518579,
-0.0516685098,
0.2976563275,
-0.0925221816,
0.041370675,
0.2050379813,
-0.3047451973,
-0.3144061565,
-0.0661676824,
-0.2993867993,
0.5104282498,
-0.1897248626,
-0.4631552696,
0.0700425282,
0.0860522091,
0.06211707,
0.0842691958,
0.1648377031,
-0.2388741225,
0.1868065,
-0.0325410143,
-0.4317286015,
0.02771727,
0.5185138583,
-0.0289324243,
0.0790058821,
0.5657848716,
0.3568655252,
-0.0299053304,
-0.2044343352,
0.3942807317,
0.0715576708,
-0.0699863583,
0.1138027236,
0.4307900965,
0.2418816537,
0.0622122549,
0.2950505614,
0.2360559553,
-0.1236713231,
0.205052346,
-0.4611516297,
-0.5064796209,
-0.1016917303,
-0.0835035145,
0.2456611097,
0.1716579199,
0.1761139333,
0.0406586602,
-0.2078080028,
-0.2155595571,
0.2344579101,
-0.0199172013,
0.1433347464,
0.2096404582,
0.0812584534,
0.3789622784,
0.0672318935,
0.0618055463,
-0.0272168145,
-0.3651143312,
-0.1301806867,
-0.0792098194,
0.1824757457,
0.0090725906,
-0.3380414248,
-0.0017499328,
-0.5721234083,
-0.2706253827,
-0.022080237,
0.01680509,
0.08303909,
-0.085904032,
0.0943689048,
-0.1830236316,
-0.0719616711,
-0.1091135815,
-0.053800609,
-0.1991330683,
0.0114909075,
0.0659250468,
0.1101860553,
-0.0955987275,
0.0075459704,
-0.0074561909,
-0.0916935727,
-0.2438066453,
0.1240448058,
0.2328040004,
-0.4102421999,
0.1899004579,
-0.2137143463,
0.2356960475,
0.4120394588,
-0.4174545109,
0.2346375287,
0.5493929982,
0.0715426654,
-0.119113043,
0.1600178331,
0.3307397366,
-0.0316046178,
-0.1106169745,
0.1972022355,
0.3799903989,
-0.0352501795,
-0.192901358,
0.0609400943,
0.3784879744,
-0.1502981484,
0.064060092,
0.2975319028,
-0.160360992,
0.1333840191,
0.2091663033,
0.3601655364,
0.1545427293,
0.5240300298,
-0.0822411776,
-0.0931552425,
0.059737049,
0.0534923151,
-0.3930669427,
-0.601475358,
0.1731498092,
0.2167732418,
-0.128347218,
0.1240105033,
-0.1549286246,
0.496799022,
-0.0010904521,
-0.2926054597,
0.014284797,
0.0785397738,
-0.2275685966,
-0.133901,
-0.4213932753,
-0.1551742703,
0.0502549261,
0.0063849539,
-0.1967865825,
-0.1983108819,
-0.1814770997,
0.2520407438,
-0.1487798095,
-0.1792176366,
0.0926290676,
0.0937753618,
-0.1402392685,
-0.2473493665,
0.3038436174,
-0.1089144051,
-0.0788342208,
0.199571088,
-0.1509106755,
0.2978537381,
0.3143268526,
-0.1724802852,
-0.2189146876,
0.0805379301,
0.0941956565,
0.2014831603,
0.0283288918,
0.1573804468,
0.1723035574,
0.3426738977,
-0.0058864877,
0.0086850338,
0.3166166842,
0.0011794697,
-0.0813737661,
-0.0921972096,
-0.0589744039,
0.2395667136,
-0.0096713156,
-0.0538718738,
0.1466580331,
-0.3901591897,
0.0225809589,
0.7142034769,
-0.0171019398,
0.3614578247,
-0.0683399141,
0.032517124,
-0.116421096,
0.3474163711,
0.1298305839,
-0.0834639817,
-0.4065194428,
-0.0060040057,
-0.6180539727,
-0.0460273027,
-0.1617493033,
-0.1863464713,
-0.1596551239,
0.0043890774,
0.1381010711,
-0.0324807316,
-0.1281867027,
-0.0901291594,
0.1696692258,
0.3214868903,
-0.0856050253,
-0.2258808911,
-0.1679627448,
0.3584053218,
-0.0031590015,
-0.3093915284,
-0.089394711,
-0.1936804354,
-0.0117187947,
-0.2749816775,
0.0232634768,
0.107402496,
0.2027431428,
0.2969764471,
-0.2101578861,
0.4309171736,
0.0065388605,
0.1876881123,
-0.1705281734,
0.0723379776,
-0.0811831653,
0.1116086692,
0.049619481,
0.4050959647,
-0.5295052528,
-0.1173660085,
-0.5370404124,
-0.0946168602,
0.0156081244,
-0.2459226102,
-0.1738646626,
0.0654882938,
-0.1364305764,
0.2675385475,
0.2362120301,
0.3413186073,
-0.0979720578,
-0.0337586403,
-0.3247717619,
-0.0526788644,
0.5630756021,
-0.4386031926,
0.0079312772,
0.1063508242,
0.0169811845,
0.1237155944,
0.1071062908,
-0.3041402102,
0.0648379326,
0.4830065966,
-0.1889514774,
-0.2679224908,
0.3511605263,
-0.0312895551,
0.0399591625,
0.0237284154,
0.0085910782,
-0.0142719503,
-0.3185525239,
-0.3784614205,
-0.4073458612
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | Hi @villmow, thanks for reporting.
Could you please try with the Datasets version 1.6? We released it yesterday and it fixes some issues about the processing speed. You can see the fix implemented by @lhoestq here: #2122.
Once you update Datasets, please confirm if the problem persists. | ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 47 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
Hi @villmow, thanks for reporting.
Could you please try with the Datasets version 1.6? We released it yesterday and it fixes some issues about the processing speed. You can see the fix implemented by @lhoestq here: #2122.
Once you update Datasets, please confirm if the problem persists. | [
-0.3536397219,
-0.4107637405,
-0.0976411179,
0.2570493817,
-0.0076193181,
0.1119759828,
0.1884653121,
0.3910496831,
0.4355858862,
-0.0132386833,
0.2567102015,
0.3540889323,
0.0090387687,
-0.1517522335,
-0.1746495366,
0.0698190555,
0.1166413724,
-0.1431867331,
-0.0087068044,
-0.1623785645,
-0.3209811449,
-0.087763086,
-0.2003732026,
0.0438098274,
-0.186058104,
-0.2596024573,
0.0139483064,
0.0891774744,
-0.0040698498,
-0.3334618509,
-0.0190601684,
-0.01494643,
-0.1927878708,
0.9497956634,
-0.0001168566,
-0.0805332512,
0.2479246557,
0.2797507048,
0.1089456528,
0.0850167722,
-0.2313874662,
-0.3576023579,
0.0878632069,
-0.2359789163,
0.2497988194,
-0.0235376768,
-0.0029938612,
-0.5800057054,
0.2692068815,
-0.0939940959,
0.1403291523,
0.094810158,
-0.3863697648,
-0.0908238739,
0.0266345944,
0.0057136379,
0.0010934249,
0.1683354676,
0.5363388658,
-0.2120461166,
-0.1499990076,
0.1861922741,
-0.4690407813,
0.3006964922,
0.093111217,
0.0692809969,
0.5572907925,
-0.5610747933,
0.2869143188,
0.1746809185,
0.0806174129,
0.0566016994,
-0.0443649702,
-0.4018822908,
-0.4251189828,
0.0211949572,
0.0630750209,
0.1158905625,
-0.1820195317,
-0.2456145436,
-0.4943922162,
0.0168850832,
0.2267080843,
0.0516581908,
0.0052900538,
0.0966011882,
0.1384706348,
0.2925825417,
0.3433324397,
0.1091779917,
0.0677276552,
-0.3050727248,
0.0327481963,
0.3052341044,
-0.452499032,
0.087482661,
0.4808759391,
0.0541623905,
0.0520274937,
-0.3966453373,
-0.1429782808,
0.0278271995,
0.0229985081,
0.1050669625,
0.3621990681,
-0.0063085444,
-0.0987885371,
0.217739135,
0.4536742568,
-0.2545011044,
-0.3706455529,
0.2139306813,
0.0409921966,
-0.576433599,
0.1754997373,
0.0035550948,
0.0092061535,
-0.0291018933,
-0.0612539873,
-0.075459674,
-0.1532064974,
-0.1927640289,
0.1660399884,
0.3424509466,
-0.1398621351,
0.2019236088,
-0.1730197966,
-0.1404955387,
-0.2200603485,
0.2372359931,
-0.1123882234,
-0.354346633,
-0.3067359328,
0.1507668793,
0.1014042348,
-0.2737496495,
0.0847364813,
0.3837850094,
-0.3222764432,
-0.1553740054,
0.1739757657,
-0.3959164917,
0.0064275675,
0.0230212063,
0.0425843596,
0.6243895292,
0.0900541395,
0.2955991626,
-0.2339510024,
0.3710041046,
-0.5977980494,
-0.159391135,
0.2099528462,
0.0487274714,
-0.019168824,
0.2650370598,
-0.2873980999,
0.0804850608,
0.2995227277,
-0.1752046347,
-0.2621100545,
-0.1640053242,
-0.3243801594,
-0.3097820878,
-0.1098136231,
0.376803875,
-0.0898603573,
0.0984197184,
-0.2508914173,
0.1711790413,
0.4721503258,
0.5991897583,
-0.2346329987,
0.4373856187,
-0.2421698421,
-0.0288159922,
0.0183666497,
0.0336229429,
-0.2913626134,
0.7230956554,
-0.3079107404,
0.0267544836,
-0.0977235436,
0.2283007503,
0.3933738768,
-0.2332685441,
0.2699778676,
0.3129473925,
-0.0474727526,
0.403568387,
-0.3195689619,
-0.1058709547,
0.1694393158,
-0.034153834,
0.0220101699,
0.0716378614,
0.1143116057,
-0.3669933677,
0.359244734,
-0.0605862476,
0.0328281075,
0.2090795487,
0.0447492637,
-0.055357039,
-0.0184040517,
0.0925917774,
-0.0947196633,
0.2243775129,
-0.0192844272,
-0.3248770833,
0.0324212462,
0.0841889605,
-0.051072821,
0.0634695292,
-0.1481120735,
0.0944969505,
-0.063868925,
0.1023333222,
0.0228004828,
-0.0569534376,
0.2669195235,
0.1030330881,
0.1032135487,
-0.2411194742,
-0.0628767759,
0.0730085522,
0.0916983932,
-0.0767957717,
-0.0768885911,
-0.2617318034,
0.33394292,
-0.0912026167,
-0.1781995296,
0.1648810655,
0.0898473263,
0.3029916286,
-0.0419128463,
0.1013588309,
0.1004369333,
0.2621609569,
0.1643082052,
0.048055049,
0.2535100281,
-0.3618003428,
-0.0108607691,
0.1457662284,
-0.0321850255,
0.4392971098,
-0.1151999086,
-0.0318249315,
-0.0059308037,
-0.0788996145,
0.2529889941,
0.1770587862,
0.283572793,
-0.0793613046,
0.4447602034,
0.2781110406,
-0.0302261934,
0.0132176653,
0.4852696359,
-0.0271276981,
-0.1436028332,
0.1334328353,
-0.1315698922,
-0.0328651108,
-0.0420112647,
0.1701159924,
0.47687006,
0.0805022418,
0.0264229327,
-0.1826558113,
0.1206795871,
-0.0661400557,
0.1008416414,
0.148235321,
0.4915498793,
-0.0456181429,
0.3280080557,
-0.0262983441,
0.0204267949,
-0.1683085263,
0.2249909341,
0.2838004231,
-0.1066473797,
0.1500244439,
-0.0864217654,
0.1899552047,
-0.3173111081,
-0.0530076176,
0.0569251105,
-0.2011279166,
-0.1721757054,
0.2013167441,
0.0083300024,
0.1018987298,
0.1917135417,
-0.2170326859,
-0.04242092,
-0.1056348979,
-0.0220116824,
-0.3020040393,
-0.0366275236,
-0.024575932,
0.3743672371,
-0.0097525083,
0.2599731684,
0.1229069605,
-0.4351427555,
-0.0318546519,
0.014643535,
-0.134052977,
-0.1755057126,
0.0385619551,
-0.2328605652,
0.2902824283,
-0.0713519752,
-0.1962251961,
0.2703505456,
-0.6561151743,
0.0064778402,
-0.0568645746,
-0.1580043286,
-0.3678790033,
-0.0483246408,
-0.1501355469,
-0.1791182905,
-0.1662816405,
0.3194874525,
-0.1182534993,
0.3504867554,
-0.0193892326,
0.1067478657,
0.0565146804,
0.1134431213,
-0.1843943,
-0.1836293042,
-0.265165031,
0.1830535382,
0.0533221364,
-0.0865589827,
-0.231034711,
-0.0336547755,
-0.1035645008,
0.2471541464,
-0.3913209438,
0.1752496958,
-0.5987238884,
0.2207240164,
0.0769205317,
0.2120439112,
0.3499596715,
-0.117820546,
-0.0693310797,
-0.1490347683,
-0.2949301898,
-0.0052092336,
0.2313659638,
-0.0322889164,
0.1110153347,
0.5043967962,
-0.0653441697,
0.6194156408,
0.4053155184,
-0.060056176,
0.0572076887,
0.0808382332,
-0.1393212229,
-0.2665073276,
-0.3724049032,
0.0360682756,
-0.3106935918,
-0.3482809663,
0.2595493495,
-0.0779709145,
-0.4955923259,
0.0378736556,
0.0569977611,
-0.2354691029,
-0.0812703967,
0.1077038422,
-0.0398103483,
0.2836269438,
0.0451276079,
0.0951739401,
-0.4651483893,
-0.0807365775,
0.0391065069,
-0.3701031208,
0.3640818298,
-0.2868103683,
-0.1681774259,
0.1631642282,
-0.5535621047,
0.2083932459,
0.075410068,
0.1869858652,
0.0137674659,
0.1490964293,
0.3038130701,
0.1498131752,
0.7473868728,
-0.0480227247,
0.1053794101,
-0.0072197765,
-0.1870791316,
-0.5962154269,
-0.0259596929,
-0.0231607556,
0.4650933146,
0.6051083803,
0.3453220129,
-0.1446371526,
-0.0277193245,
-0.1587142497,
0.2446788549,
0.0206056088,
-0.2795673013,
-0.0973888189,
-0.1563319415,
-0.1371876597,
0.1207818985,
-0.1132946685,
-0.0592594258,
0.0447902083,
-0.2501922846,
0.1766342968,
0.2251393497,
0.1085800976,
0.1332271844,
0.2369522601,
0.0792283341,
0.5708373785,
0.2187571675,
0.1466369182,
-0.004640542,
0.3554342091,
-0.1292730272,
0.2139160037,
0.1814133674,
-0.0028036274,
0.2090528011,
0.4299542606,
-0.0406554975,
0.0522602797,
-0.1365889013,
0.2162790596,
-0.25670591,
-0.1218846738,
0.5087296963,
0.2650705874,
-0.4859511852,
-0.5629431009,
0.2916389108,
0.2924591303,
-0.3801583648,
0.6399798989,
-0.8032795191,
-0.0330472551,
0.4559307694,
-0.0678520352,
0.694691062,
-0.2801561058,
-0.1290729046,
-0.1350942403,
0.1064754426,
-0.1222084016,
0.2674113214,
0.2052536458,
-0.2929271758,
-0.1009620801,
0.2086087167,
-0.2684563994,
0.0551343635,
0.1981161982,
-0.0062498897,
0.0606067814,
-0.0408777818,
0.0415204391,
-0.2543275058,
0.0650403649,
0.4701129794,
-0.3301799595,
-0.1192819253,
0.0843546987,
0.1271934956,
0.2608574331,
0.0197538584,
-0.0918402225,
-0.218922168,
-0.1566542387,
-0.1526547968,
0.0026955828,
-0.3488568068,
0.3472242951,
-0.0512616597,
0.1078180075,
0.1518941969,
0.140282467,
-0.179260537,
0.1257934272,
-0.0836189762,
0.1662443578,
0.2662294507,
0.382593751,
0.2885942757,
-0.2326245755,
-0.172050789,
0.0450584143,
-0.0883710682,
-0.1523731053,
-0.1140354872,
-0.1603782773,
-0.4679455161,
0.5018334985,
0.0943721682,
0.1071598232,
-0.4344458878,
0.2077494115,
-0.0158789605,
-0.1838548183,
0.0703701079,
0.1551680714,
0.1048137695,
0.7553777695,
-0.4236605763,
-0.3901268244,
-0.0019803722,
0.2198664248,
0.2952710986,
0.1123986617,
0.3343271017,
0.1712132543,
-0.2222265601,
-0.0866999105,
0.1048382074,
-0.0797601268,
-0.2804400027,
0.205612421,
-0.2834072113,
0.0297715366,
0.2937420905,
-0.0060891863,
-0.1874645799,
0.0622981526,
-0.1230188608,
-0.1706308573,
-0.2203830928,
-0.1845602989,
-0.0944474414,
-0.0320840441,
-0.1417268813,
0.1171072125,
0.0346491411,
0.5534897447,
-0.2105934024,
0.0860456079,
0.1453556418,
0.2014833242,
0.0312297232,
-0.0578448921,
0.1517127454,
-0.1721324474,
0.0156975687,
0.1662781686,
-0.0927255079,
-0.1589341611,
0.0091947913,
0.1761618406,
-0.2031958699,
-0.3424268961,
0.2239151895,
-0.3177877665,
0.0368953682,
-0.4057894051,
0.2086408287,
0.3461664915,
-0.0236159489,
-0.4323785603,
0.3018779159,
-0.0884990841,
0.1120629385,
0.29770872,
-0.4248300791,
-0.0268875845,
0.0234793238,
0.0996795893,
0.3500133455,
-0.1138400063,
0.0087381527,
-0.1823055595,
0.2913305461,
0.2199275792,
0.3804683983,
-0.2574821711,
0.0662403405,
0.4824461341,
0.252422303,
0.2404264808,
-0.0137447175,
-0.0694173425,
0.1133240312,
0.1185626686,
-0.0860992447,
-0.1395347714,
0.6526373625,
0.083264187,
0.0199284405,
0.032032527,
0.1843597293,
0.0023586005,
-0.4783993661,
0.0849459618,
0.1564912945,
-0.2350759208,
0.110549897,
0.3106341064,
0.1898124367,
-0.1293053329,
0.2571065724,
-0.0139382454,
0.0622464828,
0.3669966161,
0.2216986418,
0.2367873937,
0.2245046645,
0.1035285518,
0.0251098312,
-0.3650442064,
0.0451270156,
0.2423910648,
-0.3808349371,
0.1161128581,
0.1658347547,
0.2006105483,
-0.3007855713,
-0.2111154646,
-0.2413770705,
0.2320922613,
-0.2003002912,
-0.1753615886,
0.1362299025,
-0.0020118505,
0.1566540599,
0.1407227367,
-0.1213389412,
0.0112223346,
0.5113049746,
0.1351647675,
-0.0666335076,
-0.1406535655,
-0.4248695374,
-0.0930648148,
0.2990778983,
-0.3026791513,
0.0119952559,
-0.3216852844,
-0.1741576344,
-0.2700112164,
0.2303571701,
0.4243111312,
0.578343153,
-0.0638670176,
0.0594044551,
0.0387762785,
0.0586831793,
-0.1515972912,
0.3526742756,
-0.153097108,
0.1793701053,
0.0488222949,
-0.0188498534,
-0.1761786491,
-0.0927367657,
-0.0101100709,
0.2458302081,
0.1629162133,
0.1476049572,
-0.2401452959,
-0.2276580334,
-0.0430456921,
0.0435931534,
-0.1089702696,
-0.1449198574,
0.4527200162,
-0.4046345353,
0.1082329005,
-0.1527309269,
0.0367451236,
-0.3230802417,
0.442197293,
0.1769666374,
0.2170799971,
-0.4274474978,
-0.1645278335,
-0.4656024575,
0.0945196077,
-0.6270415187,
0.3479114771,
0.0184437186,
0.1136776432,
-0.0441152267,
0.0181594323,
0.193802923,
-0.0754054859,
-0.1670512855,
0.2149125189,
-0.2346523106,
0.0765886754,
-0.3533768654,
-0.1058027893,
0.1517271996,
-0.4540385604,
0.3884382844,
-0.3258297741,
0.0470737144,
-0.1807990074,
0.1086729243,
0.130068332,
0.1781800091,
0.5276604891,
0.4160920382,
0.2875407338,
-0.1532479525,
-0.0357658677,
-0.2049761713,
-0.2076934576,
-0.0986897796,
0.1539011002,
0.1099423468,
0.1592296064,
-0.2325556278,
-0.0640314966,
-0.2706334293,
0.0089949593,
-0.116637364,
0.1578445137,
0.0779859945,
-0.2959675789,
-0.1835753471,
0.2445852011,
0.0585401542,
0.2674298286,
0.0500096455,
0.0709705874,
-0.1508755833,
-0.1668471992,
0.3609441519,
-0.5754392743,
-0.3871361613,
-0.3030740023,
0.2370182425,
-0.0861411691,
0.1355553269,
-0.0060563534,
-0.1824790239,
0.275709331,
0.0892306566,
-0.2111134827,
0.0828525126,
-0.2617930472,
-0.0277417749,
0.0513777137,
0.0487924032,
0.0564328432,
-0.5505634546,
0.2456962168,
-0.117831625
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | Hi @albertvillanova, thanks for the reply. I just tried the new version and the problem still persists.
Do I need to rebuild the saved dataset (which I load from disk) with the 1.6.0 version of datasets? My script loads this dataset and creates new datasets from it. I tried it without rebuilding.
See this short video of what happens. It does not create all processes at the same time:
https://user-images.githubusercontent.com/2743060/115720139-0da3a500-a37d-11eb-833a-9bbacc70868d.mp4
| ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 70 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
Hi @albertvillanova, thanks for the reply. I just tried the new version and the problem still persists.
Do I need to rebuild the saved dataset (which I load from disk) with the 1.6.0 version of datasets? My script loads this dataset and creates new datasets from it. I tried it without rebuilding.
See this short video of what happens. It does not create all processes at the same time:
https://user-images.githubusercontent.com/2743060/115720139-0da3a500-a37d-11eb-833a-9bbacc70868d.mp4
| [
-0.363014698,
-0.3355692029,
-0.0869321972,
0.2914977372,
0.0048043523,
0.0850248337,
0.2076527923,
0.398006022,
0.4348945618,
-0.0089638233,
0.2125945985,
0.2832150459,
-0.0250468366,
-0.2042585164,
-0.1974657774,
0.1578705311,
0.1223636717,
-0.0891838744,
-0.0129013918,
-0.1942549944,
-0.3704571426,
-0.061124146,
-0.1589696407,
-0.0333989449,
-0.2035573423,
-0.2246248573,
0.0031420141,
0.167317912,
-0.0278625265,
-0.3802030981,
-0.0222850516,
0.0346784666,
-0.2173193842,
0.9670500755,
-0.0001179558,
-0.0346965119,
0.2712253332,
0.2329893708,
0.077672258,
0.0469265953,
-0.1714719832,
-0.3223570585,
0.1062247381,
-0.1920933127,
0.2716533542,
-0.0017312504,
0.0206624661,
-0.6094631553,
0.2712436914,
-0.0779176801,
0.1323136538,
0.1193440706,
-0.4176819921,
-0.1101854593,
0.0098892674,
0.0443690456,
-0.0237345099,
0.221157521,
0.4696218669,
-0.131419003,
-0.1615546048,
0.1670178324,
-0.4216374755,
0.2660016119,
0.0706349164,
0.0413722694,
0.4938412905,
-0.5665131807,
0.3148688972,
0.1981597096,
0.0256937426,
0.0241917446,
-0.0996280834,
-0.3593220711,
-0.3677808642,
0.0037669092,
0.0352484733,
0.1015738323,
-0.1780721843,
-0.2604910731,
-0.510027051,
-0.0142804086,
0.2391903251,
0.0101408772,
0.0762998015,
0.0058424026,
0.1450755894,
0.2875227034,
0.3523477912,
0.1838090271,
0.1186250299,
-0.304667592,
0.0057905316,
0.2401407361,
-0.415576309,
0.1519879103,
0.4824931324,
0.0279346425,
0.0871172249,
-0.4267274439,
-0.0899113193,
0.0575836636,
0.1102225855,
0.038542062,
0.33328861,
-0.0898996741,
-0.0239038058,
0.1651180089,
0.4020155668,
-0.2371516526,
-0.3967392743,
0.1732117385,
0.0284356959,
-0.5089075565,
0.173109889,
0.0160157867,
0.0584514439,
-0.0073789433,
-0.0503873266,
-0.0698949844,
-0.1287704557,
-0.2418866605,
0.1157800257,
0.3481164277,
-0.0990553722,
0.284419179,
-0.1221456304,
-0.1511018127,
-0.3075756729,
0.2642689347,
-0.1004591212,
-0.3427420557,
-0.3130770922,
0.1872937679,
0.1027255505,
-0.3253941834,
0.1008890867,
0.3663767576,
-0.3238578141,
-0.1405410022,
0.164070785,
-0.3921979964,
0.0371148996,
0.036259573,
0.1015312225,
0.5760558844,
0.0617111884,
0.3559788167,
-0.2052506208,
0.3554870784,
-0.5027272701,
-0.1576425284,
0.1760055572,
0.0561754778,
-0.0610033348,
0.2625416815,
-0.2306445241,
0.0771028548,
0.3370042145,
-0.2698495388,
-0.3164977729,
-0.1621471941,
-0.2763828039,
-0.3266085982,
-0.1250042319,
0.4855926037,
-0.0969207957,
0.0926422328,
-0.2499943823,
0.1078095883,
0.4460747838,
0.5792753696,
-0.2000683844,
0.3872777224,
-0.2233352959,
-0.0858245045,
0.1105752289,
0.1091428697,
-0.371158421,
0.6279049516,
-0.210708186,
0.0252087563,
-0.0302221552,
0.2141829729,
0.4351966381,
-0.2300633937,
0.1898132861,
0.2136390954,
-0.0715665221,
0.3919415474,
-0.3567686081,
-0.1234346628,
0.1199620217,
-0.0686186105,
0.0712118745,
0.1128555387,
0.146665588,
-0.374890238,
0.3419590294,
-0.0813909993,
0.0750170052,
0.2327740937,
0.0045925691,
-0.0640244335,
0.0254022516,
0.0408824235,
-0.190389812,
0.1950108558,
-0.0402652845,
-0.2926427722,
0.0948732942,
0.0526048243,
-0.0963649452,
0.0147375762,
-0.1551770568,
0.093511343,
-0.0817369819,
0.2289908081,
0.0444578007,
-0.0817890987,
0.1954095364,
0.0643507093,
0.1163242236,
-0.2580953836,
-0.1073691696,
0.1122937426,
0.0365024433,
-0.1578091085,
-0.0445041433,
-0.2471501678,
0.2896201313,
-0.0899438709,
-0.125768289,
0.1543935239,
0.0985815898,
0.3515721262,
-0.0858733207,
0.0658477172,
0.0880121738,
0.3965594769,
0.1759846956,
0.0508557893,
0.2638602853,
-0.3270394802,
0.0296378788,
0.1832250953,
0.041475337,
0.4627258778,
-0.0223166198,
-0.0116065592,
-0.0076329261,
-0.0596298873,
0.2356952429,
0.1006034911,
0.2856350541,
0.0174682178,
0.465130806,
0.2683878839,
-0.0083424747,
0.0978522673,
0.5448831916,
-0.0384722203,
-0.1450646222,
0.1689181328,
-0.0935996324,
-0.0727548972,
-0.113898851,
0.1575488001,
0.4817341864,
0.0790672451,
0.0289870463,
-0.1687619835,
0.1559607387,
-0.0580058135,
0.0718887001,
0.1646236032,
0.6082309484,
0.0435823277,
0.3211417794,
-0.031171428,
-0.0458852351,
-0.1859901547,
0.2890871167,
0.2805097103,
-0.1294351965,
0.1533899605,
-0.0461235121,
0.274151355,
-0.2902227044,
-0.0880481452,
0.0753921196,
-0.2380781025,
-0.1974065751,
0.228422299,
-0.0029085353,
0.1274892092,
0.1828677207,
-0.1537573338,
-0.0923855677,
-0.0000268556,
-0.0489277802,
-0.3085846901,
-0.0368406475,
-0.0362475663,
0.3555815518,
-0.05315236,
0.2529759407,
0.1141382232,
-0.4489089847,
-0.0389907509,
-0.0068284422,
-0.0905418471,
-0.1739001274,
-0.0252906326,
-0.1881172806,
0.2716782093,
-0.029089164,
-0.2099587023,
0.2656792998,
-0.6992892623,
-0.0694221631,
-0.0357696265,
-0.185372144,
-0.3714571595,
-0.062102858,
-0.2339764982,
-0.1610839367,
-0.2183561623,
0.2947668731,
-0.0674245954,
0.3748463392,
-0.1149968877,
0.0959239975,
0.0573426783,
0.1013473868,
-0.1709908843,
-0.1748350412,
-0.2321127802,
0.1582452506,
-0.043994315,
-0.1131772548,
-0.2476489097,
-0.1134030372,
-0.0751528293,
0.3227633834,
-0.3404299319,
0.1396197081,
-0.5815429091,
0.1723696291,
0.052916687,
0.2146683186,
0.4270580709,
-0.0608472936,
-0.0778911933,
-0.1548992395,
-0.3055674136,
-0.007853996,
0.2052788883,
-0.0036147684,
0.067441687,
0.5427396894,
-0.0926431641,
0.669580102,
0.4467201233,
-0.0754953027,
0.04116676,
0.0264879484,
-0.0547483191,
-0.3249760866,
-0.3788349032,
0.0915603191,
-0.2707594633,
-0.2935109735,
0.2437550575,
-0.1172546148,
-0.4212987125,
0.0439125597,
0.0312341526,
-0.2758796811,
-0.1213841289,
0.1162856072,
-0.0970583558,
0.3035880625,
0.0317239016,
0.1417814642,
-0.4291803837,
-0.0093304217,
0.0107620545,
-0.3043085635,
0.4023873806,
-0.2962890267,
-0.1551971287,
0.3099077046,
-0.6096820235,
0.2347207069,
0.0806421041,
0.1860007644,
0.0709651411,
0.1070905775,
0.2777568996,
0.105955556,
0.7209101915,
-0.0790828466,
0.0211901907,
0.041226536,
-0.2007649541,
-0.669883132,
-0.0049528405,
-0.0127180442,
0.4702883661,
0.6730172038,
0.3351783156,
-0.1638123691,
-0.0326175094,
-0.1395624876,
0.2700152695,
-0.0145031437,
-0.2499065995,
-0.1622546017,
-0.209379524,
-0.1968884617,
0.028748773,
-0.1429501772,
-0.0143245347,
0.0607073233,
-0.2408838719,
0.0920094475,
0.1469636559,
0.1134053618,
0.1214266866,
0.2578723431,
0.0983290821,
0.5815173388,
0.1797895581,
0.0700599253,
0.0515779033,
0.4057937264,
-0.1279025376,
0.1545753032,
0.2507948577,
-0.0008215308,
0.2090463489,
0.4520724714,
0.0144894049,
-0.0029070228,
-0.0988429487,
0.1922037154,
-0.194030121,
-0.1173432618,
0.4256080687,
0.171086818,
-0.472623378,
-0.5922849178,
0.2535349131,
0.2536031604,
-0.3607657254,
0.6391518712,
-0.7487564683,
-0.0183293261,
0.4669686556,
0.002820462,
0.7358860373,
-0.2567671239,
-0.041837126,
-0.1000897735,
0.0824594498,
-0.1197911203,
0.4190859199,
0.2596228123,
-0.3722595274,
-0.0804279521,
0.2213824093,
-0.251046598,
0.0735093132,
0.1787224263,
0.0123321041,
0.080836907,
-0.0396681428,
-0.0299991332,
-0.2865655124,
0.1244355142,
0.3993241787,
-0.3570459187,
-0.0643466264,
0.0637206361,
0.1233831197,
0.2416672707,
0.0296140537,
-0.085524559,
-0.1752415448,
-0.134915635,
-0.1914407909,
-0.0151509047,
-0.388459295,
0.3374821842,
-0.0356904566,
-0.0010973215,
0.1039381325,
0.1001683325,
-0.1867360771,
0.1002776176,
-0.0499245301,
0.1501242816,
0.2366525978,
0.336930126,
0.2823452055,
-0.2218931317,
-0.1344580501,
0.0304936767,
-0.0960117057,
-0.2380338013,
-0.1103522554,
-0.1936846077,
-0.4630658925,
0.4645526111,
0.0995132253,
0.0769587085,
-0.4267883003,
0.2048386931,
-0.1343345791,
-0.1900671721,
0.0477785915,
0.1404867023,
0.1448502541,
0.7204335928,
-0.4495210946,
-0.3675930202,
-0.0362619013,
0.2923368812,
0.3315468729,
0.0463179722,
0.3831966817,
0.1238117814,
-0.1957347244,
-0.1185151115,
0.099844262,
-0.0271353144,
-0.2387664616,
0.2741430998,
-0.2905700505,
-0.0018504709,
0.3436768949,
0.0155299325,
-0.2062704861,
0.1224308759,
-0.1491794735,
-0.1516999602,
-0.2442890406,
-0.1842518151,
-0.0479681045,
0.0064311717,
-0.1502272785,
0.0969575644,
0.0614565983,
0.4971456826,
-0.2089676559,
0.0648504123,
0.1968675256,
0.1899015754,
0.0246663503,
-0.1359562576,
0.1353496313,
-0.188512221,
0.0163046345,
0.1631887406,
-0.090997085,
-0.1194695234,
0.010755524,
0.18425183,
-0.2022353411,
-0.2798932791,
0.1841636747,
-0.2515422702,
-0.0125241224,
-0.404335916,
0.2153509408,
0.3910015821,
-0.0911777467,
-0.4116528034,
0.2231801599,
-0.1214097738,
0.1379811615,
0.2327388674,
-0.4405064583,
0.0219242945,
0.0274145007,
0.1154975742,
0.4032119513,
-0.1132009402,
0.0035114549,
-0.149500072,
0.2916151285,
0.2376497686,
0.4089947343,
-0.214809522,
0.0811432377,
0.4790183008,
0.2529846728,
0.3715296388,
-0.0216072723,
-0.0751501173,
0.0790518224,
0.1053317115,
-0.0986377373,
-0.1180402189,
0.5559913516,
0.0172610804,
0.0223235264,
0.0815005004,
0.110900104,
-0.0734094605,
-0.4644205272,
0.1309804618,
0.1541841924,
-0.3087999225,
0.1640722007,
0.2352604419,
0.2134705633,
-0.1326986104,
0.3234117329,
-0.0104673188,
0.0613097288,
0.300228864,
0.1901673377,
0.2820371389,
0.1583476216,
0.1097845137,
0.0129355639,
-0.3917324543,
0.077855438,
0.1975889504,
-0.3711402118,
0.1210038811,
0.1877916157,
0.1419267952,
-0.3178576827,
-0.2040489763,
-0.261098057,
0.2047231048,
-0.2230824828,
-0.1804421246,
0.0873604268,
-0.0069226474,
0.1763298213,
0.160948351,
-0.1104951352,
0.0136727598,
0.5182117224,
0.141936183,
-0.0955721959,
-0.1300572306,
-0.3889625371,
-0.1098822355,
0.3121517599,
-0.3008529544,
0.0523628294,
-0.2596469522,
-0.1228784695,
-0.2750814557,
0.3463408053,
0.4599645436,
0.6527571678,
-0.0124109425,
0.0608469285,
0.0710592866,
0.0507835373,
-0.167967841,
0.3546046019,
-0.0640360564,
0.2595690787,
0.0531156324,
-0.0321903825,
-0.1525259465,
-0.0521172583,
-0.023850549,
0.2068839371,
0.1658695638,
0.268273592,
-0.2395358682,
-0.2659414411,
-0.0172295496,
0.1227830797,
-0.1800326407,
-0.2328294516,
0.4231387079,
-0.4261638522,
0.1212928742,
-0.2007842362,
0.0358422324,
-0.268494904,
0.4545710981,
0.1397160143,
0.148804456,
-0.4117127061,
-0.0982579663,
-0.4501779675,
0.0493732616,
-0.586238265,
0.381485343,
-0.0346179456,
0.1783494353,
-0.0473567024,
-0.0081327669,
0.1628371179,
-0.044374913,
-0.2253890783,
0.1940117478,
-0.2575012445,
0.0605098344,
-0.3014994562,
-0.1696665734,
0.1718637198,
-0.4466184974,
0.3505328298,
-0.3587100804,
0.0564389229,
-0.1126200631,
0.0889165401,
0.1375101507,
0.1427406818,
0.5240485668,
0.4821204245,
0.24633573,
-0.2212333977,
-0.1244493872,
-0.297388196,
-0.2201159298,
-0.133146584,
0.1974970549,
0.1863687932,
0.1875918657,
-0.2295735776,
-0.0875500813,
-0.2807494998,
-0.0312832221,
-0.1266409457,
0.2273058295,
0.1401261985,
-0.2672668099,
-0.1147848517,
0.2475761622,
0.0845566988,
0.3016546369,
0.0440082662,
0.078603752,
-0.2230159342,
-0.1386025846,
0.3557646275,
-0.4948847294,
-0.3726126254,
-0.3232243061,
0.3176662624,
-0.0697517395,
0.1108843982,
-0.0645010695,
-0.1400406659,
0.2673560977,
0.0445396937,
-0.2483783066,
0.109524399,
-0.2917215228,
-0.0558239892,
0.0421829149,
0.0037170351,
0.079539746,
-0.6037825346,
0.2104654908,
-0.1166230142
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | There can be a bit of delay between the creations of the processes but this delay should be the same for both your `map` calls. We should look into this.
Also if you hav some code that reproduces this issue on google colab that'd be really useful !
Regarding the speed differences:
This looks like a similar issue as https://github.com/huggingface/datasets/issues/1992 who is experiencing the same speed differences between processes.
This is a known bug that we are investigating. As of now I've never managed to reproduce it on my machine so it's pretty hard for me to find where this issue comes from.
| ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 103 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
There can be a bit of delay between the creations of the processes but this delay should be the same for both your `map` calls. We should look into this.
Also if you hav some code that reproduces this issue on google colab that'd be really useful !
Regarding the speed differences:
This looks like a similar issue as https://github.com/huggingface/datasets/issues/1992 who is experiencing the same speed differences between processes.
This is a known bug that we are investigating. As of now I've never managed to reproduce it on my machine so it's pretty hard for me to find where this issue comes from.
| [
-0.3194854856,
-0.4774056077,
-0.0747578889,
0.3302208781,
-0.0672015101,
0.0412483215,
0.2097330242,
0.3263497949,
0.4367240667,
0.0293656997,
0.2416934073,
0.3490330577,
0.0190938301,
-0.0388510637,
-0.1365026832,
0.0055768313,
0.1733694673,
-0.1191432998,
0.0165225305,
-0.1376283467,
-0.2373452187,
0.004325686,
-0.1967937648,
-0.0159254149,
-0.1699439138,
-0.2258181274,
-0.0241217613,
0.0833453834,
0.0180470087,
-0.3501836061,
0.0165380612,
0.0091590453,
-0.1990934163,
0.9538548589,
-0.0001199121,
-0.0984314829,
0.2415299714,
0.3196496964,
0.08687599,
0.0823289007,
-0.2088344991,
-0.3429729342,
0.1231217384,
-0.2194910198,
0.1817763746,
0.0489583164,
-0.0054672956,
-0.4784772992,
0.2912493646,
-0.1400743127,
0.1226794645,
0.1224084124,
-0.4304054081,
-0.117006503,
0.0643726662,
0.013684731,
-0.0449958667,
0.2221287489,
0.548874855,
-0.1446346939,
-0.1135174334,
0.1787204295,
-0.4208793044,
0.3248120546,
0.1550359726,
0.1488945782,
0.4124365151,
-0.5443947315,
0.2542960048,
0.2439430058,
0.0642346218,
0.0644447803,
-0.0699724555,
-0.4524816275,
-0.4557459652,
-0.0505253226,
0.1526225656,
0.1117549017,
-0.2006651461,
-0.2737900019,
-0.5146395564,
0.0925395191,
0.248654291,
0.0496208444,
-0.0354445353,
0.0554915965,
0.0845623612,
0.2981019914,
0.3523455262,
0.1011009812,
0.0175358281,
-0.3595080972,
0.05855323,
0.3016782403,
-0.4295679927,
0.0651177317,
0.4697282612,
0.0874670148,
0.0563356876,
-0.3640021086,
-0.1127560958,
-0.0258336104,
-0.063713856,
0.1232844591,
0.3699848056,
0.0635845214,
-0.0990265533,
0.1580912918,
0.4498120844,
-0.2064527571,
-0.3955388069,
0.2026742697,
0.0994902253,
-0.5509955287,
0.1231859922,
0.0072415434,
-0.0061325282,
-0.1270745844,
-0.0732414499,
-0.0996090919,
-0.1479615867,
-0.2157741785,
0.1760330051,
0.3118011355,
-0.1720110178,
0.1390255094,
-0.1780224741,
-0.1064363867,
-0.2601940036,
0.2096255869,
-0.1099580452,
-0.3654554188,
-0.3169781268,
0.229767561,
0.091924265,
-0.2789961994,
0.0632556155,
0.4462325573,
-0.2974612713,
-0.1287810951,
0.192067951,
-0.4455225468,
0.0192832928,
0.0177789368,
0.0631104559,
0.5827060342,
0.0641357228,
0.291084528,
-0.2870439291,
0.3529482186,
-0.5255613327,
-0.1047503129,
0.2470074743,
0.0056428295,
-0.0970229656,
0.2554521561,
-0.3724859059,
0.1563410163,
0.2468485832,
-0.2550654411,
-0.2419194877,
-0.1594788283,
-0.3996354043,
-0.3362621963,
-0.1038316861,
0.4296417832,
-0.1361073554,
0.0145070925,
-0.2160128057,
0.1814292222,
0.4497036636,
0.6606144309,
-0.2419028282,
0.4056592882,
-0.2201424837,
-0.0463528484,
-0.0111750737,
0.0401424766,
-0.2736548781,
0.7009413242,
-0.280613333,
0.0992984027,
-0.0818607137,
0.2187544852,
0.3799467385,
-0.2457378805,
0.299166739,
0.3218561411,
-0.0316918343,
0.4197545946,
-0.3054515719,
-0.1577080488,
0.1585369557,
-0.0863014013,
-0.0191198308,
0.124716267,
0.1028202474,
-0.4522358477,
0.3015806675,
-0.075842455,
0.0183353797,
0.2189251482,
0.1022760123,
-0.0690940171,
-0.0285860859,
0.0735594332,
-0.1101506054,
0.2620703578,
-0.0402675308,
-0.230219245,
0.0483771302,
0.0963157341,
-0.0515504479,
0.0079335198,
-0.1040670425,
0.093493253,
-0.0941339731,
0.1083739847,
0.0511481017,
-0.0304979682,
0.2722039223,
0.1673208773,
0.1698078811,
-0.2406479567,
-0.0940885693,
0.1516320258,
0.1160436869,
-0.1340618581,
-0.0750783384,
-0.2594905794,
0.3234908581,
-0.1187676936,
-0.1830590814,
0.1087517589,
0.0736618564,
0.3307230771,
0.0041520945,
0.1491952538,
0.1749661565,
0.283064574,
0.2505120933,
-0.023162948,
0.2347993702,
-0.3815717697,
-0.054816667,
0.2052122951,
-0.0218354333,
0.4643537104,
-0.0836467594,
-0.0821952894,
-0.0320652872,
-0.0591447093,
0.2360590696,
0.1716520488,
0.2913887501,
-0.0511247143,
0.4382727742,
0.2802740932,
-0.0629540831,
0.094098039,
0.5195209384,
0.0014680251,
-0.1753923744,
0.1385178566,
-0.1514692903,
-0.0686138198,
-0.0401513726,
0.1637531817,
0.5669997931,
0.0724177584,
0.0455682278,
-0.1423937082,
0.1140159667,
-0.046519395,
0.0907402635,
0.123015888,
0.4285609126,
-0.0751511008,
0.3441387415,
0.0090243146,
0.032726109,
-0.1939032078,
0.2061121464,
0.2143488228,
-0.0936267972,
0.1492775828,
-0.0833013058,
0.1406975389,
-0.377210021,
-0.0402719043,
-0.0436659381,
-0.190757364,
-0.2173603624,
0.2685177326,
0.0243422017,
0.0539169461,
0.2391969264,
-0.1273531616,
-0.1300681829,
-0.1006077379,
-0.0242540389,
-0.3237658739,
-0.0682418048,
-0.0410738662,
0.3971995413,
0.0234959833,
0.2353717536,
0.067801021,
-0.4454364181,
0.0030338913,
-0.0445872471,
-0.071580261,
-0.1857949793,
0.125424847,
-0.2303633094,
0.3192315102,
-0.109009929,
-0.1898679882,
0.3258906901,
-0.6125133038,
-0.0445981622,
-0.155223757,
-0.1521814466,
-0.3659999669,
-0.0362099931,
-0.1075745597,
-0.163315624,
-0.1247294247,
0.378395915,
-0.1027494073,
0.3412996829,
0.0129916482,
0.0697471797,
0.035846442,
0.1879733503,
-0.0981814712,
-0.2270577252,
-0.2855247855,
0.0979162455,
-0.0202620085,
-0.107278876,
-0.2148886621,
-0.0279015414,
-0.1364363283,
0.2490725666,
-0.4367381334,
0.0953365415,
-0.6324816942,
0.2248194665,
0.1122120321,
0.1835854948,
0.3638404012,
-0.124383837,
-0.0433151983,
-0.1775206774,
-0.4602481127,
-0.0299753621,
0.2892395854,
0.0194631331,
0.1156246439,
0.4566770196,
-0.1499717534,
0.6942932606,
0.3712832928,
-0.074549824,
0.0624875128,
0.0717329085,
-0.1261376739,
-0.3553826809,
-0.334867239,
0.097492218,
-0.2912040055,
-0.3932515979,
0.3314825594,
-0.0566934273,
-0.4954521954,
-0.0110010356,
0.0534544587,
-0.2503327429,
-0.133239463,
0.0763657093,
0.0955019891,
0.2047001868,
0.0583504736,
0.0604516417,
-0.5040947199,
-0.0661609471,
-0.004187651,
-0.2755479217,
0.325591892,
-0.3012373149,
-0.1762017757,
0.0937421024,
-0.5581950545,
0.2284719348,
0.0903512985,
0.115276292,
-0.0442059673,
0.1032496989,
0.3380587101,
0.1329395622,
0.7330363393,
-0.0418952741,
0.0436713099,
-0.0261799954,
-0.2548163533,
-0.5318102241,
-0.0710280836,
-0.0235805213,
0.4319602549,
0.5820277929,
0.3616738915,
-0.1606952697,
-0.0542594269,
-0.0987228528,
0.3022758365,
0.0390294343,
-0.2510148287,
-0.1459539831,
-0.1491785049,
-0.0676601976,
0.0988165736,
-0.1765548289,
-0.0331347249,
-0.0086117461,
-0.2094710767,
0.1804422289,
0.2442983985,
0.113888897,
0.1692845374,
0.2778654993,
0.0919655859,
0.5838768482,
0.2333569527,
0.1503581703,
-0.0255130213,
0.3816789389,
-0.1456772238,
0.2088950127,
0.2213502675,
0.0017618909,
0.1407619119,
0.5219018459,
0.0168232322,
0.0616736226,
-0.0942671672,
0.1803189069,
-0.2476207316,
-0.1468981355,
0.4836445451,
0.3026022911,
-0.4802186787,
-0.5349169374,
0.3012940288,
0.3897212744,
-0.4364249706,
0.642595768,
-0.8030802608,
-0.0348711982,
0.4852523506,
-0.1162199229,
0.7910175323,
-0.2726528645,
-0.0640688837,
-0.0942942053,
0.1040661409,
-0.0798160136,
0.324275434,
0.2351135015,
-0.3184452355,
-0.168456763,
0.1873155236,
-0.3006888628,
0.0404379666,
0.1464461535,
-0.0381774195,
0.0571546331,
-0.03382615,
0.0669827387,
-0.2781298757,
-0.0156272054,
0.4708387256,
-0.2859354019,
-0.1470906138,
0.0611566678,
0.1181220934,
0.3203133345,
0.0010162778,
-0.0786051676,
-0.2998784184,
-0.1230904162,
-0.2078883946,
0.0150031522,
-0.3579514027,
0.2997005582,
-0.0144963767,
0.0686288178,
0.1134929508,
0.1601998359,
-0.0663903132,
0.0720738024,
-0.1098363698,
0.1361833513,
0.2847070098,
0.4006172419,
0.2626699805,
-0.2824154794,
-0.1337512583,
0.0433793515,
-0.0740466192,
-0.2143929303,
-0.120518595,
-0.1313809007,
-0.4387506843,
0.5310997367,
0.001071455,
0.0806285292,
-0.4185939431,
0.2369562238,
0.0427129641,
-0.1557960361,
0.0442955829,
0.1502562314,
0.1130943596,
0.7382256985,
-0.4055372775,
-0.4140588045,
-0.0183123797,
0.2062741518,
0.3746131063,
0.0772301406,
0.3092648387,
0.1556943655,
-0.1866632551,
-0.0473579131,
0.0582415462,
-0.1584669799,
-0.2826385796,
0.2330800742,
-0.2658881843,
0.0336038917,
0.2847355902,
0.0910617858,
-0.170876354,
0.1311800182,
-0.0772815421,
-0.1855890751,
-0.1639416516,
-0.1798878163,
-0.0723745897,
-0.0252359919,
-0.1616577953,
0.1054513976,
0.040008992,
0.4681867063,
-0.1916242093,
0.0961509869,
0.1173212454,
0.1907104254,
0.0411053114,
-0.0549228713,
0.2053997517,
-0.186454162,
-0.02310941,
0.1262720525,
-0.1104047,
-0.1304396987,
0.0198098868,
0.1985341907,
-0.1801180393,
-0.3488304913,
0.1406389177,
-0.2483154535,
0.1380701065,
-0.4525109828,
0.2766250372,
0.3829395175,
-0.0181527548,
-0.4886367917,
0.3218187988,
-0.0284848511,
0.0680273473,
0.3769413233,
-0.3603977263,
0.0083349757,
0.0633943975,
0.0989831835,
0.2995772362,
-0.0980073363,
0.0845319331,
-0.1769236326,
0.223220095,
0.2317643315,
0.3134752512,
-0.2220515907,
0.0455841646,
0.4461661577,
0.2535210252,
0.2841162086,
0.03147313,
-0.0645189136,
0.0951096117,
0.0759102628,
-0.0357559472,
-0.1070596725,
0.6998187304,
0.0796732903,
0.0061071813,
0.0736857876,
0.2419076413,
0.085319072,
-0.4488469064,
0.0580466129,
0.1969969571,
-0.1601165384,
0.1415554881,
0.2287376374,
0.2382544875,
-0.0594729818,
0.2625471652,
-0.0134178586,
0.0154397115,
0.2349782586,
0.1971013397,
0.1415428072,
0.1980164051,
0.0884740949,
0.0863741189,
-0.4029284716,
0.0977753177,
0.2925220132,
-0.3569515646,
0.0906480253,
0.1319441795,
0.2310850918,
-0.377020061,
-0.2672022581,
-0.239811793,
0.2937871814,
-0.1931101382,
-0.1836692691,
0.13287431,
-0.0047693774,
0.1510376036,
0.1858951896,
-0.1211306751,
0.026982002,
0.5510709286,
0.1247076616,
-0.029057283,
-0.1535296142,
-0.4880037904,
-0.0987170786,
0.3059152663,
-0.2534529269,
0.059257701,
-0.3243092597,
-0.1986313313,
-0.2053003907,
0.2730237246,
0.4457674325,
0.5597250462,
-0.065272212,
0.0134485252,
0.0529807508,
0.0990434214,
-0.1248609573,
0.2919397354,
-0.1225786805,
0.1639743745,
0.0535073355,
-0.0336244479,
-0.1490588486,
-0.0538462102,
-0.0791354701,
0.2418648303,
0.1019077823,
0.1280566603,
-0.3148499727,
-0.1739652753,
-0.0542592183,
0.0480025597,
-0.1228199303,
-0.1263459772,
0.3955928385,
-0.3989728987,
0.1068117768,
-0.0944728702,
0.0192603543,
-0.2891870141,
0.4734735191,
0.2145933807,
0.2468394488,
-0.3985390365,
-0.1295460761,
-0.4535675645,
0.0570496097,
-0.6260558367,
0.3307381868,
-0.0605842955,
0.1703844965,
-0.063016519,
0.0069905724,
0.1890663803,
-0.069313556,
-0.168794632,
0.2257017195,
-0.2695316672,
0.066350922,
-0.3263702393,
-0.1768906564,
0.1285072863,
-0.4083439112,
0.3732222915,
-0.2949459255,
-0.0018863752,
-0.1522427052,
0.1093185991,
0.0873929113,
0.1328692883,
0.5245750546,
0.4406278133,
0.3837635219,
-0.1255711615,
-0.1049544215,
-0.13820903,
-0.2574091256,
-0.0852333158,
0.1945769936,
0.0846087709,
0.1691828072,
-0.2388862073,
-0.0160216987,
-0.2639772296,
0.0940710008,
-0.0943161473,
0.1136816069,
0.0826008543,
-0.3479434252,
-0.2195757926,
0.2355391979,
0.0721243024,
0.3229886591,
0.0230130404,
0.1062775403,
-0.1316960305,
-0.1287913024,
0.3937508464,
-0.6275827885,
-0.3203856945,
-0.3296594024,
0.2324420512,
-0.0886578262,
0.0667531788,
-0.0019405484,
-0.2021512985,
0.2370859385,
0.0712478608,
-0.1932219118,
0.1157783121,
-0.2717180848,
-0.0457118526,
0.032885164,
0.0542980544,
0.039729692,
-0.5831239223,
0.2457560003,
-0.1001560986
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | Upgrade to 1.6.1 solved my problem somehow. I did not change any of my code, but now it starts all processes around the same time. | ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 25 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
Upgrade to 1.6.1 solved my problem somehow. I did not change any of my code, but now it starts all processes around the same time. | [
-0.3285197616,
-0.4251144528,
-0.0902183056,
0.3159683347,
0.0170648918,
0.0901564658,
0.2094431669,
0.4447200596,
0.4825794995,
0.0649627745,
0.251042068,
0.3160928786,
-0.0560899936,
-0.3143905401,
-0.2324119359,
0.1299517453,
0.1601343602,
-0.1192274466,
-0.0551296249,
-0.2028855979,
-0.304877162,
-0.0078665391,
-0.1871991009,
0.0967332721,
-0.14044635,
-0.1534428298,
-0.0539783165,
0.1025864556,
0.0483308882,
-0.3943070173,
0.021105282,
0.059185762,
-0.1813184619,
0.8799495697,
-0.000122085,
0.0114947036,
0.2477272153,
0.2849185765,
0.1633937359,
-0.0141196027,
-0.1903143525,
-0.2765855193,
0.2130437642,
-0.1274122298,
0.2456356585,
0.0258936621,
0.0164518412,
-0.6402498484,
0.1821404248,
-0.0321406946,
0.1067631841,
0.0738540292,
-0.3857871592,
-0.0927314758,
0.0135708917,
-0.0621792004,
0.0181280375,
0.2360906601,
0.5089982152,
-0.1530716717,
-0.1674806774,
0.1986733079,
-0.38818115,
0.3281823099,
0.0525346883,
0.0307638869,
0.6446441412,
-0.5962139368,
0.2733969986,
0.1532075852,
-0.0808097571,
0.0810293257,
-0.0253478754,
-0.3553410172,
-0.3839283586,
0.0868262127,
0.0888893902,
0.1113565415,
-0.1912721694,
-0.1945640296,
-0.4781164825,
0.0707945377,
0.2309862077,
0.0300619788,
0.1173126996,
0.1442994177,
0.2024502158,
0.3093340099,
0.4033640325,
0.2462477386,
0.2411020249,
-0.233206138,
0.0064066024,
0.2732771039,
-0.4459075928,
0.1241490394,
0.5200047493,
0.0867764354,
0.0475484952,
-0.5806799531,
-0.0912428424,
0.0393420383,
0.1242069751,
0.0633936077,
0.347709626,
-0.090464592,
-0.0357495472,
0.2498850971,
0.3441909552,
-0.2958386838,
-0.4390596151,
0.2486189753,
-0.016091194,
-0.50935781,
0.1471348405,
0.0583609156,
0.0214544088,
-0.0482898317,
0.0136081353,
-0.1149351746,
-0.1971806288,
-0.2436130643,
0.1031603366,
0.3249606192,
-0.1104527563,
0.2394445986,
-0.1344809532,
-0.1778878868,
-0.2257104516,
0.289319098,
-0.1174993217,
-0.2958427668,
-0.3196437955,
0.1387148499,
0.0025331751,
-0.373771131,
0.0355568156,
0.4177809358,
-0.3017958105,
-0.1876009405,
0.1808342636,
-0.3083863854,
0.0056098811,
0.0124670547,
0.0029919222,
0.5556013584,
0.1374043673,
0.5318367481,
-0.2708052397,
0.3144211769,
-0.5807902217,
-0.14584741,
0.1188042536,
0.0506160408,
-0.0251626894,
0.2462058365,
-0.1311658025,
0.0963203609,
0.2827988863,
-0.3295597136,
-0.2998918593,
-0.1696281284,
-0.2879664004,
-0.2514472604,
-0.1645832658,
0.37032938,
0.0015980154,
0.0699283481,
-0.2103019357,
0.0787311494,
0.4495998621,
0.4156292975,
-0.207585454,
0.3538429737,
-0.2240493894,
-0.0623300299,
0.1321050227,
0.0309719816,
-0.4005418122,
0.6677233577,
-0.2599670291,
-0.0095556676,
-0.0634247214,
0.2496447116,
0.4455075562,
-0.155686751,
0.2820450962,
0.2627094686,
-0.0572413951,
0.4519644976,
-0.41226843,
-0.148100093,
0.0155626461,
-0.0891286135,
0.0221557934,
0.1694603264,
0.1445702463,
-0.4743442535,
0.3899276555,
-0.0761155635,
0.0357599482,
0.1839101762,
-0.0694311634,
-0.0629470199,
0.0335049778,
0.0339338779,
-0.1193144619,
0.203258425,
-0.0432066843,
-0.2309648395,
0.1026157513,
0.0101114586,
-0.0872517526,
-0.0492901206,
-0.1813872904,
0.0792017132,
-0.0921607986,
0.2140888125,
-0.0339443684,
-0.0652820766,
0.1847364902,
0.0358005017,
0.1898388267,
-0.2237682939,
0.0226210169,
0.0642826408,
0.0673078969,
-0.1615781039,
-0.0262199938,
-0.2895720303,
0.3231553137,
-0.1598037183,
-0.2133891732,
0.1712712049,
0.0485898368,
0.4096703529,
-0.0624730252,
-0.0313413441,
0.0597196892,
0.393076241,
0.148202613,
0.0926676914,
0.1199306548,
-0.3102619946,
0.0450547189,
0.215851739,
0.0695550144,
0.4617220461,
-0.0773710012,
0.0262375623,
0.0060175285,
-0.0828285292,
0.2806044221,
0.0949627012,
0.3291274607,
0.0061602108,
0.4355297089,
0.3036998808,
0.0188758969,
0.0724015459,
0.5454025865,
-0.0023867711,
-0.2093971968,
0.1821487546,
-0.0453133434,
-0.0745839253,
-0.0186943226,
0.1450096518,
0.4704557955,
0.0592016019,
0.0415217951,
-0.1976518333,
0.1342902929,
-0.0113457516,
0.0264967792,
0.1439187527,
0.5454497337,
-0.0772549808,
0.3817724884,
0.0127205811,
-0.0481062196,
-0.2288664579,
0.187030822,
0.2764609456,
-0.0724954158,
0.2033234835,
-0.0034864172,
0.3172152042,
-0.2773837745,
-0.2160997689,
0.0942142308,
-0.1857624948,
-0.2104177922,
0.1738045365,
0.0202495903,
0.136221081,
0.1513074487,
-0.0940553993,
-0.0637963936,
0.0024560746,
0.0040110052,
-0.3196434975,
-0.0449066572,
-0.0813284516,
0.2629681826,
-0.0491463542,
0.2252516299,
0.1506467164,
-0.4977278113,
0.0932104215,
-0.0467609987,
-0.0155133009,
-0.153810069,
-0.105864577,
-0.2013931572,
0.1916433722,
-0.0757521689,
-0.217384249,
0.213200137,
-0.6309049726,
-0.078137368,
-0.0248468816,
-0.1241869926,
-0.2718277276,
-0.1186769754,
-0.1993278563,
-0.2023316622,
-0.1979482323,
0.2467662394,
-0.1272894442,
0.3811453879,
-0.2140101939,
0.1172324717,
0.0577186421,
0.0452683121,
-0.125361532,
-0.1413498521,
-0.3023560047,
0.1250574291,
0.0086257905,
-0.0639723688,
-0.3012587726,
-0.1058024317,
-0.0266058072,
0.3626346588,
-0.384419024,
0.106960386,
-0.5251044035,
0.1232717037,
0.0808829665,
0.122125499,
0.4194756746,
0.002560474,
-0.0889195353,
-0.1034302786,
-0.2259452343,
0.0017523319,
0.1917862147,
-0.0445032828,
0.0387105718,
0.5795578957,
-0.1471133679,
0.6572436094,
0.3843572736,
-0.0609934963,
-0.0111355968,
-0.0183651578,
-0.1962142587,
-0.2524474263,
-0.3930987716,
0.0927754566,
-0.2513142824,
-0.3111336231,
0.2499522567,
-0.0659020692,
-0.4047551751,
0.0030449554,
0.0311715528,
-0.2351687253,
-0.1224617809,
0.0686496273,
-0.1459802091,
0.3705109954,
-0.0389427058,
0.1677024961,
-0.4189140499,
-0.0635773465,
0.0560183004,
-0.2856542766,
0.3517284095,
-0.3162990212,
-0.0535674281,
0.3908148408,
-0.5518409014,
0.2534334064,
0.0308438987,
0.1092308611,
0.0284962207,
0.1204986796,
0.364979744,
0.1873165518,
0.645570457,
0.0569412634,
0.0430917144,
0.0095907301,
-0.2508567572,
-0.6014400125,
-0.0165801942,
0.01750727,
0.4738492072,
0.8081656694,
0.4271786511,
-0.1105487198,
-0.0770256147,
-0.0832904056,
0.1911307871,
0.023374483,
-0.2846401334,
-0.1913906932,
-0.128520906,
-0.1593601108,
0.1185396537,
-0.1695537269,
-0.0058775246,
0.0338458344,
-0.3186744452,
0.114263393,
0.0943035483,
0.1052591056,
0.1232987642,
0.2086752951,
0.0323737264,
0.5327061415,
0.2790551186,
0.0622502193,
-0.0157387033,
0.3771706522,
-0.1509031802,
0.0702418014,
0.1748030335,
-0.0256217569,
0.1866865903,
0.403595835,
-0.0072399452,
0.0265933182,
-0.0991005152,
0.223651737,
-0.1720788777,
-0.0332784727,
0.4676235616,
0.1350875646,
-0.4751649201,
-0.5731219053,
0.2930728197,
0.2454826832,
-0.4326728582,
0.7999383211,
-0.7203832865,
-0.0233214255,
0.4647379816,
-0.0582020655,
0.7366479039,
-0.2252165377,
-0.0468832254,
-0.1134913713,
0.0016393512,
-0.0966489464,
0.5450134873,
0.2873941064,
-0.3282623589,
-0.0226929132,
0.1914457381,
-0.2536578178,
-0.0644035041,
0.1602869332,
-0.0610745549,
0.0084822588,
-0.0516014099,
-0.0880755335,
-0.3143179715,
0.0132994279,
0.4626289606,
-0.2825490534,
-0.0696027577,
0.0295954645,
0.0774161369,
0.3475756943,
0.0496007986,
-0.1678536087,
-0.1329223514,
-0.1412422955,
-0.110695228,
-0.0064308271,
-0.345826149,
0.3355685771,
-0.0181876943,
0.0017520636,
0.0954994708,
0.0754742324,
-0.153145805,
0.0275324993,
-0.0100448364,
0.1465115547,
0.3092437088,
0.3101767898,
0.259778142,
-0.1874197721,
-0.2010071576,
0.0728464052,
-0.0879889652,
-0.2149645388,
-0.1053131223,
-0.2370029986,
-0.5140310526,
0.4933771193,
0.0763709173,
0.1374210715,
-0.4340173602,
0.1306512654,
-0.1092270315,
-0.1804885864,
0.0389336869,
0.1331739426,
0.1753907651,
0.6333759427,
-0.3870878518,
-0.4785048962,
-0.0471132584,
0.2769549787,
0.2634620965,
-0.087609686,
0.2662310898,
0.0843804479,
-0.1896449029,
-0.0717234164,
0.0679040253,
-0.0488684252,
-0.2146087587,
0.3136091232,
-0.3062499464,
-0.0101049095,
0.3257443905,
0.0531307608,
-0.1956657022,
0.1932852715,
-0.1045655161,
-0.1416772902,
-0.3051639199,
-0.2252978981,
-0.1771924198,
0.0403806567,
-0.2287750542,
0.1018022001,
0.0249871388,
0.53308779,
-0.1708766222,
0.0492290854,
0.2193305194,
0.1439283639,
0.0015924834,
-0.0504940413,
0.1143139154,
-0.1421090811,
-0.010251902,
0.1347475797,
-0.0709127486,
-0.0711638331,
-0.0145393386,
0.2056803852,
-0.2066224813,
-0.2353154123,
0.1806330234,
-0.2686138749,
0.037946634,
-0.3392084837,
0.2073043287,
0.3485956192,
-0.07939367,
-0.3916226029,
0.2095498443,
-0.0793949217,
0.2350163907,
0.1846558154,
-0.4053305089,
-0.0395527445,
0.0769044235,
0.0990410671,
0.3507366776,
-0.105411917,
0.0943305716,
-0.1459418237,
0.3196317554,
0.1992686689,
0.3192611933,
-0.1064086631,
0.0653422028,
0.5074796677,
0.1796131283,
0.3057314754,
-0.0781085119,
-0.0388443545,
-0.0058614239,
0.09305235,
-0.019485563,
-0.1145025939,
0.5450171828,
0.0727391094,
-0.0282818675,
0.0170117952,
0.0484888256,
-0.0953810811,
-0.5180800557,
0.1688509583,
0.2100943178,
-0.2860737145,
0.1390007734,
0.2218402028,
0.1580218673,
-0.0890188292,
0.3816066086,
-0.0422556251,
0.0520955734,
0.3182893991,
0.1820548475,
0.2886219323,
0.1145867407,
0.1258771271,
0.0638243407,
-0.3519519269,
0.0876095593,
0.2372220159,
-0.366294235,
0.0794912949,
0.2309834361,
0.1598939002,
-0.4054524004,
-0.1986220032,
-0.2021133453,
0.1854859889,
-0.1995560974,
-0.1512770802,
0.1649575233,
0.0245288908,
0.1848350465,
0.1754572242,
-0.0838198811,
0.1255088598,
0.5904154181,
0.169211939,
-0.050448779,
-0.0849398226,
-0.4554617107,
-0.0362175852,
0.3164297342,
-0.2982967496,
0.0353240445,
-0.3432679772,
-0.0946319476,
-0.2026022375,
0.2515506148,
0.4208087921,
0.7341745496,
-0.0967565775,
-0.0124224965,
-0.0009806287,
0.078595452,
-0.1711172312,
0.3257127702,
-0.0512993075,
0.3729541302,
-0.0278774127,
-0.058572337,
-0.1342334747,
0.054413341,
-0.036559578,
0.1706397533,
0.149172321,
0.3705938458,
-0.2488202006,
-0.2748384178,
0.0195745267,
0.068791002,
-0.1372282803,
-0.230723992,
0.3676396012,
-0.3615263104,
0.0863073021,
-0.1536700279,
0.0120410509,
-0.2386638373,
0.3800440729,
0.1147634536,
0.2215903848,
-0.4694235325,
-0.1976957917,
-0.4501784742,
0.1214568615,
-0.538236022,
0.4328243136,
-0.0062181018,
0.1362379789,
-0.0949915722,
-0.0379762277,
0.1784357131,
-0.0368307382,
-0.2325475812,
0.1282736659,
-0.2308739573,
0.1267986,
-0.3797701895,
-0.1577131599,
0.2243397087,
-0.3874178231,
0.3878501356,
-0.3890950084,
0.0122345984,
-0.1171745732,
0.0684705749,
0.162969023,
0.1270406693,
0.5165667534,
0.4254450202,
0.2855577469,
-0.2117873579,
-0.0606585667,
-0.2839681506,
-0.2531269193,
-0.1093200669,
0.1243836731,
0.1298404932,
0.1171877533,
-0.2266767025,
-0.2070803046,
-0.3209626973,
-0.0149784014,
-0.073258698,
0.2023956627,
0.1799793541,
-0.2647534311,
-0.0994758606,
0.269844085,
0.0632699504,
0.2581604421,
0.120881699,
0.0523909032,
-0.2121665776,
-0.1658543944,
0.3300719857,
-0.4964948595,
-0.3814643621,
-0.3555073738,
0.3037727475,
-0.0845848471,
0.1005763113,
-0.1509471536,
-0.1820099205,
0.3137877285,
0.0191488042,
-0.2466625124,
0.0723778009,
-0.1470409632,
0.0328960419,
0.0417607501,
-0.0022276416,
0.1815617085,
-0.5332589149,
0.2090575844,
-0.1272593439
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | Nice ! I'm glad this works now.
Closing for now, but feel free to re-open if you experience this issue again. | ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 21 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
Nice ! I'm glad this works now.
Closing for now, but feel free to re-open if you experience this issue again. | [
-0.3070743978,
-0.4695041776,
-0.0922935531,
0.2605441809,
0.0237791501,
0.0816689134,
0.2060968429,
0.3872795701,
0.4719322324,
0.0207353346,
0.2926182747,
0.356866926,
0.0152328536,
-0.1723434925,
-0.1459615082,
0.0627291426,
0.1288417578,
-0.1695839614,
0.0138115324,
-0.1798468828,
-0.2991747856,
-0.0734266117,
-0.1795146465,
0.0421458371,
-0.1804156303,
-0.2228626609,
-0.0007138476,
0.1077166349,
0.0487653539,
-0.2912757397,
-0.0189661235,
-0.0574139208,
-0.2175568491,
0.954675436,
-0.000117609,
-0.087642923,
0.2521359324,
0.2681462765,
0.1472974867,
0.0785760581,
-0.209313184,
-0.3373840451,
0.1125775427,
-0.2512631118,
0.2299136072,
0.0075567067,
0.0000875723,
-0.5254429579,
0.278719008,
-0.10381639,
0.1410560757,
0.0903239846,
-0.3887791336,
-0.0974322557,
0.0356709845,
-0.0157804526,
-0.0041978359,
0.193646282,
0.5403663516,
-0.2044116557,
-0.1470501125,
0.1656309664,
-0.4782431126,
0.2883208096,
0.1425646693,
0.1045713946,
0.5796031952,
-0.5662630796,
0.2586005926,
0.1645042598,
0.0364157595,
0.0676729083,
0.0002427809,
-0.4046183825,
-0.44853881,
0.0004348159,
0.0631367117,
0.1191910729,
-0.2013659477,
-0.2541601658,
-0.4854080379,
0.0604435578,
0.2294801325,
0.0657122284,
-0.0226834789,
0.1426103413,
0.1721698195,
0.2969886065,
0.3728100359,
0.1315264255,
-0.0061090142,
-0.2827490866,
0.0329691842,
0.280826062,
-0.4053994119,
0.0805037767,
0.5078934431,
0.0328573138,
0.0499738529,
-0.354185909,
-0.1188244373,
-0.0054995241,
0.0185323022,
0.1302483678,
0.3539405465,
0.0411518887,
-0.1375971437,
0.1864664853,
0.4516461492,
-0.262992382,
-0.3996082544,
0.1982379407,
0.0668717921,
-0.5660601854,
0.1680463403,
0.0080164149,
0.0050521344,
-0.040571399,
-0.0489655212,
-0.0865612179,
-0.1470601261,
-0.1776748151,
0.1613954455,
0.35046345,
-0.1179772168,
0.1744433641,
-0.1617617309,
-0.0972028226,
-0.2360580266,
0.2652748227,
-0.1058576778,
-0.360802561,
-0.3060231507,
0.1375763565,
0.0916166008,
-0.2235601842,
0.1049926206,
0.3826285005,
-0.3034340441,
-0.1787344813,
0.1791314483,
-0.3981316984,
0.0234951284,
0.0205250476,
0.0504821986,
0.5985866785,
0.1087480187,
0.2657260895,
-0.2467353642,
0.3976507187,
-0.577734828,
-0.1601953059,
0.2145018727,
0.0432267189,
0.0021723732,
0.2794610262,
-0.2627557814,
0.0550752021,
0.3159912229,
-0.1885829568,
-0.2529246509,
-0.1632301509,
-0.2909043133,
-0.3229499161,
-0.1161959097,
0.3648351431,
-0.055535946,
0.0846192613,
-0.2270488739,
0.1989284754,
0.4607827067,
0.6413199902,
-0.246452108,
0.4451716542,
-0.2116089761,
-0.0282693729,
0.0078555644,
0.0238371193,
-0.2697032094,
0.7397879362,
-0.3511784077,
0.0437001139,
-0.0849283189,
0.2499575913,
0.3816207349,
-0.2272114158,
0.2943174541,
0.3158893883,
-0.0448893979,
0.4030997455,
-0.3237966299,
-0.0970083624,
0.1848304123,
-0.066478245,
0.0195168406,
0.0924737453,
0.1116134077,
-0.3846985102,
0.3901069164,
-0.0824223906,
0.0202759132,
0.2032288611,
0.0583019219,
-0.0374694169,
-0.0450531431,
0.1467668563,
-0.0363044553,
0.2148038894,
-0.0297570415,
-0.3130532503,
0.02807278,
0.0901296288,
-0.0566685311,
0.0405775905,
-0.1481072307,
0.0768139362,
-0.0696092397,
0.1082082689,
0.0066253841,
-0.053108938,
0.2858843803,
0.0768038407,
0.1393088698,
-0.2579503953,
-0.0606351756,
0.0649239048,
0.0832971111,
-0.089580223,
-0.1150141284,
-0.2478452325,
0.3522394896,
-0.0770130455,
-0.1728482395,
0.1359661222,
0.0681288838,
0.2770185769,
-0.081712842,
0.1085996553,
0.0848037377,
0.2572035491,
0.1620966941,
0.0714401528,
0.2367131263,
-0.3935841322,
0.0078218132,
0.1139742956,
-0.01271924,
0.4513717294,
-0.1187488139,
-0.0240846202,
-0.0157214925,
-0.106711708,
0.2500289083,
0.1847307831,
0.2829658091,
-0.1002830863,
0.418723464,
0.2549996078,
-0.0326466262,
0.0118972249,
0.4661343396,
-0.0203536116,
-0.1252837926,
0.1260022521,
-0.1191270649,
-0.0074433088,
-0.0529822409,
0.1171949059,
0.4750804901,
0.091532208,
0.0083648227,
-0.1771561652,
0.1136807874,
-0.0731729865,
0.0799665079,
0.1351901889,
0.4936059117,
-0.0609043427,
0.340074122,
-0.0251336955,
0.022674866,
-0.169953078,
0.2145280689,
0.2423357815,
-0.0909220353,
0.1643044353,
-0.0658704042,
0.1948197782,
-0.3574422896,
-0.0718452334,
0.0449447073,
-0.1869827807,
-0.1754425317,
0.2317226976,
-0.0079137459,
0.0853912234,
0.2350052297,
-0.2120742947,
-0.0586861037,
-0.1217839047,
0.0293066204,
-0.3171485066,
-0.0466822423,
-0.0308324415,
0.3746776879,
-0.0422522798,
0.2445873022,
0.1350601912,
-0.4562498331,
-0.0100962315,
0.0141649619,
-0.1387723237,
-0.1915167421,
0.0532078445,
-0.2786859274,
0.2900400162,
-0.0724834129,
-0.2245515883,
0.2720656991,
-0.656588912,
0.0079914257,
-0.0480763093,
-0.1245821714,
-0.3801761568,
-0.0833954066,
-0.1291447878,
-0.1720809639,
-0.1641669571,
0.3399762809,
-0.099063836,
0.3345187008,
-0.0075922348,
0.0989270806,
0.0189515129,
0.1534698755,
-0.1666978151,
-0.1813575923,
-0.2220367044,
0.1597072333,
0.0227443315,
-0.0923014656,
-0.2212072313,
-0.0145055689,
-0.1139126718,
0.2172623873,
-0.4146237373,
0.1890675575,
-0.5987950563,
0.2085665762,
0.0747193992,
0.1890527904,
0.3789048195,
-0.1311909407,
-0.0708763376,
-0.1619343162,
-0.3247303367,
0.0190554801,
0.2639816999,
-0.0260155015,
0.1003704667,
0.4866033196,
-0.0761097595,
0.6302144527,
0.3575814068,
-0.033317551,
0.0737166703,
0.0584786907,
-0.1835184246,
-0.2872957289,
-0.3533495963,
0.0379479453,
-0.3034135103,
-0.3304223716,
0.2818644643,
-0.060094703,
-0.5309894681,
0.0297308937,
0.0659345835,
-0.266189903,
-0.0936014056,
0.1138192713,
-0.0231470317,
0.2349764407,
0.0273405537,
0.1085841432,
-0.4608960152,
-0.0767427757,
0.033472091,
-0.3773455322,
0.368830204,
-0.2808014154,
-0.1387195289,
0.1179229021,
-0.5799157023,
0.1996641159,
0.0383368768,
0.136610195,
0.0005052164,
0.1017593294,
0.3043721616,
0.1429288089,
0.7509539723,
-0.0038137101,
0.1073139459,
0.0068132356,
-0.2112998664,
-0.594512105,
-0.031858515,
-0.0196370259,
0.4358693659,
0.6071039438,
0.3249935508,
-0.154962644,
0.0118082054,
-0.1762375236,
0.2500935197,
0.0162842944,
-0.2643996775,
-0.1277375072,
-0.1821652055,
-0.1377598643,
0.1234615669,
-0.1214195639,
-0.0392845161,
0.0229098797,
-0.2260066122,
0.2043335587,
0.233688131,
0.090889141,
0.1068895161,
0.2693604827,
0.06114465,
0.5416283607,
0.2114553005,
0.1885900199,
-0.0642718524,
0.3505928516,
-0.1188224256,
0.2857780457,
0.197326839,
-0.0285967253,
0.2222445011,
0.4491463304,
-0.0043715276,
0.0523668975,
-0.1520206779,
0.2184004188,
-0.2671608031,
-0.1502927095,
0.5050216913,
0.2374795377,
-0.4541155696,
-0.5346491337,
0.2677074075,
0.2974103391,
-0.3881896734,
0.6406940818,
-0.8524454832,
-0.0524790138,
0.4936689138,
-0.0822669566,
0.7306087017,
-0.2935541272,
-0.0979338586,
-0.1213341355,
0.1403481662,
-0.156069234,
0.254021883,
0.2495049387,
-0.3049434125,
-0.117362693,
0.2125660181,
-0.2820888758,
0.0246988833,
0.1619685143,
-0.0326857939,
0.0415705591,
-0.080270417,
0.0633881241,
-0.2816935778,
0.0205938295,
0.4830935299,
-0.3060741127,
-0.1351396441,
0.0746343955,
0.1742424667,
0.2771478593,
-0.0018764064,
-0.0944878757,
-0.2551517785,
-0.1927967668,
-0.1149892956,
0.0111131445,
-0.3075270951,
0.3527852893,
-0.0638321415,
0.1049788743,
0.1013515145,
0.1593171209,
-0.1946600974,
0.1353969127,
-0.097800158,
0.1479279995,
0.318836242,
0.4060475826,
0.2802496254,
-0.2338896692,
-0.1790453792,
0.0335419029,
-0.0941353068,
-0.1612546146,
-0.1206195727,
-0.1833855808,
-0.5209073424,
0.5433424115,
0.0646672398,
0.1150693893,
-0.4308283329,
0.2202362716,
-0.0204854272,
-0.1794326901,
0.0661323443,
0.1343453079,
0.0650717467,
0.7289729714,
-0.4065174758,
-0.3923727274,
-0.0028012288,
0.2055419981,
0.3045362532,
0.1434855461,
0.3214294612,
0.1601704061,
-0.1942386627,
-0.0825454146,
0.0780683532,
-0.0789750963,
-0.2984721363,
0.1853134036,
-0.287736088,
0.0244951248,
0.298497051,
0.0183138978,
-0.1707784534,
0.0987779498,
-0.1191507429,
-0.1615103185,
-0.2252184898,
-0.1782318354,
-0.0896641463,
-0.0534119979,
-0.1646289527,
0.1401909441,
0.0422302559,
0.5476226211,
-0.2087201327,
0.0895350203,
0.1256805956,
0.2231357992,
0.0012668632,
-0.0650873929,
0.1448469013,
-0.1340656281,
0.0154734254,
0.1855994016,
-0.0939446986,
-0.1516582668,
0.0192498714,
0.1828033775,
-0.2072361708,
-0.3256990612,
0.1942343116,
-0.3056369424,
0.074630037,
-0.4164160192,
0.2432857454,
0.3443968892,
-0.0149538815,
-0.4733920693,
0.3334654272,
-0.0491183996,
0.1026408374,
0.3028346002,
-0.4161446095,
-0.0191369206,
0.037250232,
0.0622453019,
0.3463116586,
-0.0950257629,
0.0308495797,
-0.1575402915,
0.2799504399,
0.2421238124,
0.3736255765,
-0.2309812605,
0.0847021788,
0.454359293,
0.2566925287,
0.1965307891,
-0.0343705751,
-0.0319286212,
0.0931533128,
0.1203755736,
-0.07105124,
-0.1435082257,
0.6602481008,
0.0670212507,
0.005421862,
0.0550537594,
0.213403061,
-0.0290265009,
-0.4931351244,
0.0877278149,
0.1397033185,
-0.1958749741,
0.0922126397,
0.2872325778,
0.1633992195,
-0.1455359459,
0.232607469,
-0.0387280732,
0.0547102466,
0.3058009148,
0.2399387658,
0.2004843056,
0.2051240057,
0.0565315671,
0.0162161123,
-0.3659252524,
0.0470151231,
0.2293113768,
-0.3461772501,
0.1094782427,
0.1486750692,
0.1915071905,
-0.3070203662,
-0.2250910401,
-0.2419806719,
0.2735803723,
-0.2309370637,
-0.1511181593,
0.1628221273,
-0.0024767593,
0.1675641686,
0.1298669875,
-0.0982036218,
0.0116579067,
0.5087922812,
0.1298428774,
-0.0827077627,
-0.1088691354,
-0.4329904914,
-0.0931460112,
0.2954479456,
-0.327583611,
0.0223980229,
-0.2966712117,
-0.1493006647,
-0.2413933128,
0.1802438945,
0.4253825545,
0.6085178256,
-0.0797767639,
0.0685902461,
0.0358744524,
0.0571243763,
-0.1609906256,
0.338827014,
-0.1143614501,
0.2052509785,
0.0680828691,
-0.0217145346,
-0.1720151454,
-0.0640566647,
0.0177935045,
0.2640706301,
0.171068579,
0.1635032892,
-0.242228955,
-0.2544051707,
-0.0535016954,
0.030305326,
-0.1356641501,
-0.1287202537,
0.3978263736,
-0.3950272501,
0.1284876168,
-0.1210021228,
0.0311057828,
-0.3333322406,
0.421970576,
0.1288329959,
0.2286453396,
-0.4557029605,
-0.1695997119,
-0.4521672726,
0.1259707808,
-0.6484366655,
0.3481283486,
0.0013071373,
0.119032748,
-0.0279905573,
-0.0126903094,
0.1784443557,
-0.0967018977,
-0.1622725427,
0.1998984814,
-0.2243279666,
0.0600521266,
-0.335903734,
-0.1105846092,
0.1413986832,
-0.4349131882,
0.37829566,
-0.3385886252,
0.060001269,
-0.1619615853,
0.0991830826,
0.1155297756,
0.2375807464,
0.5331745744,
0.4315796494,
0.3331643045,
-0.1517586112,
-0.0499521345,
-0.1837182641,
-0.2088990808,
-0.0783284307,
0.1293915808,
0.1191173494,
0.1649012864,
-0.2282636464,
-0.0550475307,
-0.2991813421,
0.0292449929,
-0.0940078422,
0.1457360983,
0.0831629112,
-0.313682884,
-0.2114540339,
0.2175403088,
0.0734678358,
0.2862502038,
0.0508435592,
0.0616764724,
-0.1026219279,
-0.1564362943,
0.3905709684,
-0.5741915107,
-0.3926386237,
-0.3124675453,
0.2573977113,
-0.1148564219,
0.1415224969,
0.0306549668,
-0.1947880983,
0.2509528697,
0.1184681356,
-0.2298498452,
0.0855277106,
-0.2733572721,
-0.0549979024,
0.0728235096,
0.0326524377,
0.0702574626,
-0.5396552682,
0.2391206324,
-0.1208746806
] |
https://github.com/huggingface/datasets/issues/2239 | Error loading wikihow dataset | Hi @odellus, thanks for reporting.
The `wikihow` dataset has 2 versions:
- `all`: Consisting of the concatenation of all paragraphs as the articles and the bold lines as the reference summaries.
- `sep`: Consisting of each paragraph and its summary.
Therefore, in order to load it, you have to specify which version you would like, for example:
```python
dataset = load_dataset('wikihow', 'all')
```
Please, tell me if this solves your problem. | ## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
``` | 71 | Error loading wikihow dataset
## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
```
Hi @odellus, thanks for reporting.
The `wikihow` dataset has 2 versions:
- `all`: Consisting of the concatenation of all paragraphs as the articles and the bold lines as the reference summaries.
- `sep`: Consisting of each paragraph and its summary.
Therefore, in order to load it, you have to specify which version you would like, for example:
```python
dataset = load_dataset('wikihow', 'all')
```
Please, tell me if this solves your problem. | [
-0.227499947,
0.3702227771,
0.0238095224,
0.3987953961,
0.2537098229,
0.2747787237,
0.4276537299,
0.4391774833,
0.2458437085,
0.0935081095,
0.2162851691,
0.3853774965,
-0.012894569,
0.1863867939,
0.1205023378,
-0.2686140835,
0.0110664442,
0.1045247912,
0.2237098068,
0.1890230626,
-0.3448887467,
0.0065285973,
-0.2329775989,
0.1040150002,
-0.3400688767,
0.0130664501,
-0.0981441885,
0.1813100725,
-0.053303618,
-0.5415442586,
0.4757559597,
-0.1185785607,
0.2518150806,
0.4039179683,
-0.0001126044,
0.1877029687,
0.5060685873,
0.0342031196,
-0.4421666265,
-0.09445934,
-0.3161360919,
-0.1228390187,
0.2420687377,
-0.1337204874,
-0.0326554291,
-0.0258761644,
0.0040857606,
0.035858959,
0.2355372161,
0.2652966678,
0.1653250009,
-0.1196188033,
0.3745588958,
-0.1360631585,
0.1942488849,
-0.0933303684,
-0.0869168341,
0.1622463465,
0.0739811212,
-0.2382172197,
0.1115441769,
0.2055729926,
-0.1832125783,
0.063482888,
0.5792306662,
-0.0081012286,
0.2564975321,
-0.3329903185,
0.2632297575,
0.3839665651,
0.8194906712,
-0.2249972671,
-0.2384387255,
-0.2182328105,
0.1727716178,
0.16447258,
0.3875035942,
0.306102097,
-0.3748463392,
0.0360187143,
-0.0377139933,
-0.2557302117,
-0.0580875836,
0.2808242738,
-0.2946683466,
0.4108180702,
-0.077823773,
0.1745570004,
-0.2258380651,
-0.0642696768,
0.2035182416,
-0.3248113692,
-0.2376297265,
0.3015759885,
-0.1384115517,
0.0768694729,
0.1585354656,
0.192825973,
0.0994421393,
-0.0371335447,
-0.1008379608,
-0.1908225864,
0.1564055085,
0.138483569,
0.4442619383,
0.2339714617,
-0.0133315995,
0.2062767744,
0.1207498312,
0.304885149,
-0.198493883,
-0.1141338795,
-0.201289922,
-0.2741611004,
0.1328354031,
-0.2296912819,
0.3544210494,
-0.0338295102,
-0.2546573877,
0.2001611292,
0.0116372332,
0.0730375499,
0.0347945876,
0.415957123,
-0.2064811438,
0.1446117908,
0.2597591281,
0.292766273,
0.10251569,
0.1234884709,
-0.1005087718,
0.090760082,
-0.0558773018,
-0.0318385102,
0.1500620246,
-0.1930603683,
0.2553025782,
0.1958254427,
0.1250930279,
-0.2846935987,
-0.0093550608,
0.2284624875,
-0.2356489599,
0.3494036496,
0.0726296157,
0.1431748271,
0.1701947451,
-0.6475991011,
-0.1152564585,
0.1633384526,
-0.3941991925,
-0.3855848312,
-0.2756711543,
0.2184658647,
-0.0403428003,
0.0450251587,
-0.419618398,
-0.178589344,
0.2975125313,
-0.2910596132,
-0.2390633076,
-0.0699157342,
0.1259680688,
-0.1256433576,
0.3569156528,
0.4782390594,
-0.3908683956,
-0.0335086212,
-0.0930062681,
0.0438777879,
-0.0572245792,
-0.310146004,
-0.3554071784,
0.4971385002,
-0.2884573638,
-0.2874656916,
0.2937495112,
-0.4576177001,
-0.2892732024,
0.2900746167,
0.0192081183,
0.3332003951,
-0.0229106955,
-0.1692106724,
-0.1682197899,
-0.0836993903,
0.2327568233,
0.222187832,
-0.0055906195,
0.0550970435,
-0.1940856576,
-0.2364347577,
0.1046095043,
0.1864863187,
0.0511643887,
0.1748684347,
0.0437123962,
0.0242449157,
0.1256706417,
-0.1626351625,
-0.0451245792,
0.1203384846,
-0.02816955,
-0.0047447458,
0.0483277068,
0.0023427159,
-0.4610755444,
0.3484281898,
0.0433676541,
0.1083411276,
-0.1505927145,
-0.0570081845,
-0.2748943865,
0.1563288569,
-0.5284994245,
-0.177239731,
0.1664672792,
0.0618428066,
-0.1497650743,
-0.0185124874,
-0.1240175292,
0.0431064963,
-0.3334241211,
0.1222896129,
-0.2070947587,
0.1706792116,
-0.1306973398,
-0.0565900877,
-0.0111800954,
0.14893502,
0.034669511,
0.0848748088,
-0.2042346597,
0.3257359862,
0.0568367541,
0.1124036014,
-0.0444701836,
-0.068886131,
-0.0373890027,
-0.1064237952,
0.0548357293,
0.2269091606,
0.2477426529,
-0.086158514,
-0.0920167416,
0.2309026718,
0.0540098064,
0.3870118856,
0.0292327851,
0.2674030364,
0.2057378888,
-0.0143851265,
-0.0240438618,
0.0058025643,
0.1215945184,
0.2089030147,
0.0798319876,
-0.0836234763,
-0.1614170372,
-0.1593148708,
0.0981500745,
0.0621437952,
0.0763311982,
0.0264558494,
-0.2656010389,
0.0542389676,
0.0102330279,
0.2679123282,
0.2297854424,
0.0542744435,
-0.282302469,
0.029404724,
-0.0894652605,
-0.022446841,
0.361769706,
0.1321124583,
0.1846679002,
0.3180978,
-0.1216698661,
0.1428944021,
-0.0601889417,
-0.2058873475,
-0.1090198755,
0.2014215291,
-0.4196124077,
0.0011621863,
0.0554265231,
-0.1287319958,
-0.0488141142,
-0.2332875878,
-0.2695048451,
-0.4261548817,
-0.0986411199,
0.0017244969,
-0.148157388,
0.1272243261,
-0.1493610442,
0.102741912,
0.0276106,
-0.2686440349,
-0.2308505774,
-0.3650171757,
-0.3169381618,
-0.0109106228,
0.4290108979,
0.0145762376,
0.1516437829,
-0.3627823293,
-0.0418422967,
-0.0665277615,
-0.1820355356,
0.1500555128,
0.0805360973,
0.7029448152,
0.1669664681,
0.455009222,
0.069072254,
-0.402181536,
0.3672318757,
0.0559910163,
0.1430449784,
0.2535710335,
-0.0262752157,
-0.2338367552,
0.0019270405,
-0.3262282908,
-0.1746631861,
-0.2757627368,
-0.2295168787,
0.3282873034,
0.0036658067,
0.5006688237,
0.2981621325,
0.1741967052,
0.0721940398,
0.293499589,
-0.0413390696,
-0.6339868307,
0.3558410108,
-0.1906139255,
-0.2751673758,
0.2133963704,
-0.132106185,
0.2231926024,
-0.086927563,
-0.5945400596,
-0.0181755275,
-0.0856766626,
0.2774366736,
-0.0212453362,
0.1746532768,
0.0803520158,
0.1810374111,
0.0438929051,
-0.1677718908,
0.0480527952,
-0.1401134133,
-0.1015581191,
0.1961409003,
0.1260029674,
0.1382963508,
-0.316975981,
0.65406394,
0.0909557045,
0.13369748,
0.2820767462,
-0.2309669405,
0.2372693717,
-0.2938369215,
-0.3660793304,
0.1428664774,
-0.1669013202,
-0.1178770065,
0.216829583,
0.0458054356,
-0.2475856841,
-0.3451887667,
0.0167479143,
-0.0648538768,
-0.3360708058,
0.0050020255,
-0.0207581297,
0.1135322303,
0.1858858466,
0.1822644621,
-0.2703819871,
-0.2345915735,
0.1548734307,
0.4231767952,
0.0087487102,
-0.1173150092,
0.0347408578,
-0.1464675814,
-0.2632380128,
0.067362532,
0.1435099691,
0.0301824696,
0.0692542791,
0.1601379216,
-0.075366959,
-0.043373812,
0.4331783354,
-0.2390739769,
0.2342213243,
0.2200018466,
0.2694019377,
-0.3107824326,
-0.1034182683,
-0.0251531377,
0.062920168,
0.0118523855,
0.1688245535,
-0.0887499601,
-0.0934560597,
0.1311553121,
0.4144932926,
-0.2235659361,
-0.2698955536,
-0.248776108,
-0.0687511861,
-0.4285555184,
-0.202369079,
-0.0320568122,
0.4673662782,
-0.0326748304,
-0.0647638515,
-0.2586669922,
0.2108553499,
-0.0509943068,
0.1131496727,
0.340618372,
0.0321990959,
0.1324108243,
0.1004280075,
0.1380320787,
0.1158995926,
0.5343761444,
0.2168560326,
-0.2238839865,
-0.2228386998,
-0.0851796418,
0.0313071199,
0.1784213483,
-0.2225722522,
-0.4367464483,
-0.152959764,
0.0778845251,
-0.285615027,
0.0102686137,
0.1609382033,
-0.009693902,
-0.2836461365,
-0.5890884399,
0.6666557193,
-0.037763577,
-0.0160098374,
0.3778904378,
0.2793264091,
-0.4682313502,
0.291544944,
0.0237020422,
0.7756491899,
0.1787301004,
0.1894198209,
0.385335505,
0.2011992335,
0.0771397203,
-0.3319948018,
-0.0282288678,
-0.2672971487,
-0.1985026151,
-0.0653541908,
-0.0603927746,
0.224436447,
0.0444640629,
-0.3415676355,
0.1563431621,
-0.2356466949,
0.1824592054,
0.1031996831,
0.1254786402,
-0.2654339373,
-0.2216456532,
-0.329525888,
0.1036978066,
-0.0262821205,
0.1340883672,
-0.1326713264,
0.0420878306,
0.0319510549,
-0.200995326,
-0.2762564719,
0.2567480206,
-0.1589355767,
0.1236918122,
0.0484218933,
-0.1378914565,
0.2281669378,
0.5829569101,
-0.1593590379,
0.2440935373,
-0.3477095366,
0.3507629335,
-0.1915882826,
-0.059512578,
-0.0050649792,
0.1182998419,
0.3890741765,
-0.0086639822,
-0.1870107651,
0.0776971579,
-0.386788249,
-0.0793539286,
-0.0003726035,
-0.0602897182,
0.2495678216,
-0.3778281808,
-0.322905153,
-0.1403660178,
0.1496346593,
-0.2204141915,
0.1755173355,
0.0848176181,
-0.3581290543,
0.0449243374,
0.0820433795,
-0.2780803442,
0.0613803715,
0.1504954249,
-0.1318150461,
0.1769616902,
0.6715328097,
0.1515839994,
-0.0835841447,
-0.1752032042,
0.3402460217,
0.2391412556,
-0.3221227825,
0.0764363557,
0.1584529132,
0.1720088124,
-0.1837606579,
0.505767107,
0.011120596,
-0.0361345671,
0.1237044483,
-0.6112130284,
-0.1800485551,
0.1154957861,
0.0847896487,
0.2263807803,
-0.0776376799,
-0.0945738703,
0.12795344,
-0.058870554,
-0.2863121629,
-0.0587994456,
-0.2254427522,
0.1243875623,
0.1843926311,
0.3527342677,
-0.0772993639,
-0.103443034,
0.1885669976,
-0.2939724624,
0.0775589198,
-0.2647899389,
-0.1814709306,
0.1575972736,
0.1562159508,
-0.0526109301,
0.1496884823,
-0.1911637187,
-0.1454007775,
-0.3024874628,
0.2301183939,
-0.1878862828,
-0.1893224269,
0.1273605525,
0.0039845714,
0.2513929605,
-0.2547197342,
0.2307421565,
-0.1212225854,
0.3786000013,
-0.0694141313,
0.0638327748,
0.0754181594,
0.0700532198,
0.0636798814,
0.1784887463,
-0.4604460001,
0.2478847653,
0.4021210968,
-0.5224170685,
0.3102973998,
0.2887886465,
0.0420289859,
0.4635984004,
-0.4118159413,
0.2062279433,
0.2217870206,
0.2036855668,
-0.2438904643,
-0.0228030998,
0.3716576099,
0.0349620581,
-0.0560298339,
-0.0056385025,
-0.0307276174,
-0.3672403991,
-0.3781549037,
0.0917169601,
0.2237691879,
-0.30464378,
0.3425472677,
0.657530427,
0.0451316983,
0.1759260893,
-0.1087863892,
0.200927794,
-0.1053791419,
0.6286647916,
-0.2232085466,
0.0522451624,
0.0775189847,
0.0544746816,
0.0215490777,
-0.3388663232,
0.4037073553,
0.2471380234,
-0.2143836915,
0.0779275447,
-0.0526233986,
0.0070789922,
-0.1041944623,
0.1115574017,
-0.2287220806,
-0.0595840402,
-0.1917318404,
-0.1866235733,
-0.3219811916,
-0.2954736054,
0.1318514794,
0.2057692409,
0.0225875061,
-0.2227570564,
-0.0292869583,
0.1319860667,
-0.1630314142,
-0.4736095965,
0.3834291995,
0.1882407963,
0.0313390195,
-0.2784056067,
0.0510507151,
0.1162588596,
0.0456840619,
0.1139038801,
0.2092193514,
0.6908433437,
0.4375931919,
-0.2205272019,
0.1245526075,
0.0927393958,
-0.237375468,
-0.1092979759,
0.0666441917,
0.0102186184,
0.1698523909,
0.3279936016,
0.1993828416,
-0.1710318774,
-0.131065309,
0.1197897494,
0.1861193478,
-0.3883248866,
0.2811676562,
-0.1893189847,
-0.1461221725,
-0.1223476976,
0.0990123302,
-0.2563286126,
0.0708753616,
0.4077410698,
0.2742970288,
0.072574228,
-0.1249826103,
0.06506975,
-0.1079399586,
0.4987426996,
0.3013650775,
0.1351225525,
-0.3123223782,
-0.068378441,
-0.5570700169,
0.0616612434,
0.0642265677,
-0.2956345081,
0.1404156983,
-0.0501559451,
-0.1312006712,
0.1987141222,
0.0020382106,
-0.2134056687,
0.2585372925,
0.2531548738,
-0.113930203,
-0.5248922706,
0.1135270596,
0.2256423533,
-0.1041883677,
-0.3573678732,
-0.094613865,
-0.3640029132,
0.0264801905,
0.0779689476,
0.0237676352,
0.2049642354,
-0.1838621497,
0.3086175025,
-0.0612026528,
0.5150405169,
-0.0827324241,
-0.0476549864,
-0.3289958835,
-0.2852356434,
-0.2313293815,
0.2595260739,
-0.031862177,
0.3192121983,
-0.2210428417,
0.0657727867,
-0.271879971,
-0.0785160512,
0.0239785612,
0.3921010196,
-0.3312182426,
-0.0785402656,
-0.0629317537,
0.1922965795,
0.2366022468,
0.0647772104,
-0.1289998889,
0.2295152843,
-0.0741893575,
-0.3985046744,
0.3420301974,
-0.538634479,
-0.4959171414,
-0.0198905319,
-0.0243965983,
-0.4006346464,
-0.0844035149,
-0.5008684993,
0.1480119228,
0.3623291552,
-0.0370377004,
-0.2316137552,
-0.0645411462,
0.0931227654,
0.1666582227,
-0.0898159519,
0.1690058708,
-0.0272075199,
-0.1126219034,
-0.1106051952,
-0.2542306185
] |
https://github.com/huggingface/datasets/issues/2239 | Error loading wikihow dataset | Good call out. I did try that and that's when it told me to download the
dataset. Don't believe I have tried it with local files. Will try first
thing in the morning and get back to you.
On Mon, Apr 19, 2021, 11:17 PM Albert Villanova del Moral <
***@***.***> wrote:
> Hi @odellus <https://github.com/odellus>, thanks for reporting.
>
> The wikihow dataset has 2 versions:
>
> - all: Consisting of the concatenation of all paragraphs as the
> articles and the bold lines as the reference summaries.
> - sep: Consisting of each paragraph and its summary.
>
> Therefore, in order to load it, you have to specify which version you
> would like, for example:
>
> dataset = load_dataset('wikihow', 'all')
>
> Please, tell me if this solves your problem.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2239#issuecomment-823004146>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDYI3HVRTBI2QT3BOG262DTJUL57ANCNFSM43GV5BZQ>
> .
>
| ## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
``` | 168 | Error loading wikihow dataset
## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
```
Good call out. I did try that and that's when it told me to download the
dataset. Don't believe I have tried it with local files. Will try first
thing in the morning and get back to you.
On Mon, Apr 19, 2021, 11:17 PM Albert Villanova del Moral <
***@***.***> wrote:
> Hi @odellus <https://github.com/odellus>, thanks for reporting.
>
> The wikihow dataset has 2 versions:
>
> - all: Consisting of the concatenation of all paragraphs as the
> articles and the bold lines as the reference summaries.
> - sep: Consisting of each paragraph and its summary.
>
> Therefore, in order to load it, you have to specify which version you
> would like, for example:
>
> dataset = load_dataset('wikihow', 'all')
>
> Please, tell me if this solves your problem.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2239#issuecomment-823004146>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDYI3HVRTBI2QT3BOG262DTJUL57ANCNFSM43GV5BZQ>
> .
>
| [
-0.227499947,
0.3702227771,
0.0238095224,
0.3987953961,
0.2537098229,
0.2747787237,
0.4276537299,
0.4391774833,
0.2458437085,
0.0935081095,
0.2162851691,
0.3853774965,
-0.012894569,
0.1863867939,
0.1205023378,
-0.2686140835,
0.0110664442,
0.1045247912,
0.2237098068,
0.1890230626,
-0.3448887467,
0.0065285973,
-0.2329775989,
0.1040150002,
-0.3400688767,
0.0130664501,
-0.0981441885,
0.1813100725,
-0.053303618,
-0.5415442586,
0.4757559597,
-0.1185785607,
0.2518150806,
0.4039179683,
-0.0001126044,
0.1877029687,
0.5060685873,
0.0342031196,
-0.4421666265,
-0.09445934,
-0.3161360919,
-0.1228390187,
0.2420687377,
-0.1337204874,
-0.0326554291,
-0.0258761644,
0.0040857606,
0.035858959,
0.2355372161,
0.2652966678,
0.1653250009,
-0.1196188033,
0.3745588958,
-0.1360631585,
0.1942488849,
-0.0933303684,
-0.0869168341,
0.1622463465,
0.0739811212,
-0.2382172197,
0.1115441769,
0.2055729926,
-0.1832125783,
0.063482888,
0.5792306662,
-0.0081012286,
0.2564975321,
-0.3329903185,
0.2632297575,
0.3839665651,
0.8194906712,
-0.2249972671,
-0.2384387255,
-0.2182328105,
0.1727716178,
0.16447258,
0.3875035942,
0.306102097,
-0.3748463392,
0.0360187143,
-0.0377139933,
-0.2557302117,
-0.0580875836,
0.2808242738,
-0.2946683466,
0.4108180702,
-0.077823773,
0.1745570004,
-0.2258380651,
-0.0642696768,
0.2035182416,
-0.3248113692,
-0.2376297265,
0.3015759885,
-0.1384115517,
0.0768694729,
0.1585354656,
0.192825973,
0.0994421393,
-0.0371335447,
-0.1008379608,
-0.1908225864,
0.1564055085,
0.138483569,
0.4442619383,
0.2339714617,
-0.0133315995,
0.2062767744,
0.1207498312,
0.304885149,
-0.198493883,
-0.1141338795,
-0.201289922,
-0.2741611004,
0.1328354031,
-0.2296912819,
0.3544210494,
-0.0338295102,
-0.2546573877,
0.2001611292,
0.0116372332,
0.0730375499,
0.0347945876,
0.415957123,
-0.2064811438,
0.1446117908,
0.2597591281,
0.292766273,
0.10251569,
0.1234884709,
-0.1005087718,
0.090760082,
-0.0558773018,
-0.0318385102,
0.1500620246,
-0.1930603683,
0.2553025782,
0.1958254427,
0.1250930279,
-0.2846935987,
-0.0093550608,
0.2284624875,
-0.2356489599,
0.3494036496,
0.0726296157,
0.1431748271,
0.1701947451,
-0.6475991011,
-0.1152564585,
0.1633384526,
-0.3941991925,
-0.3855848312,
-0.2756711543,
0.2184658647,
-0.0403428003,
0.0450251587,
-0.419618398,
-0.178589344,
0.2975125313,
-0.2910596132,
-0.2390633076,
-0.0699157342,
0.1259680688,
-0.1256433576,
0.3569156528,
0.4782390594,
-0.3908683956,
-0.0335086212,
-0.0930062681,
0.0438777879,
-0.0572245792,
-0.310146004,
-0.3554071784,
0.4971385002,
-0.2884573638,
-0.2874656916,
0.2937495112,
-0.4576177001,
-0.2892732024,
0.2900746167,
0.0192081183,
0.3332003951,
-0.0229106955,
-0.1692106724,
-0.1682197899,
-0.0836993903,
0.2327568233,
0.222187832,
-0.0055906195,
0.0550970435,
-0.1940856576,
-0.2364347577,
0.1046095043,
0.1864863187,
0.0511643887,
0.1748684347,
0.0437123962,
0.0242449157,
0.1256706417,
-0.1626351625,
-0.0451245792,
0.1203384846,
-0.02816955,
-0.0047447458,
0.0483277068,
0.0023427159,
-0.4610755444,
0.3484281898,
0.0433676541,
0.1083411276,
-0.1505927145,
-0.0570081845,
-0.2748943865,
0.1563288569,
-0.5284994245,
-0.177239731,
0.1664672792,
0.0618428066,
-0.1497650743,
-0.0185124874,
-0.1240175292,
0.0431064963,
-0.3334241211,
0.1222896129,
-0.2070947587,
0.1706792116,
-0.1306973398,
-0.0565900877,
-0.0111800954,
0.14893502,
0.034669511,
0.0848748088,
-0.2042346597,
0.3257359862,
0.0568367541,
0.1124036014,
-0.0444701836,
-0.068886131,
-0.0373890027,
-0.1064237952,
0.0548357293,
0.2269091606,
0.2477426529,
-0.086158514,
-0.0920167416,
0.2309026718,
0.0540098064,
0.3870118856,
0.0292327851,
0.2674030364,
0.2057378888,
-0.0143851265,
-0.0240438618,
0.0058025643,
0.1215945184,
0.2089030147,
0.0798319876,
-0.0836234763,
-0.1614170372,
-0.1593148708,
0.0981500745,
0.0621437952,
0.0763311982,
0.0264558494,
-0.2656010389,
0.0542389676,
0.0102330279,
0.2679123282,
0.2297854424,
0.0542744435,
-0.282302469,
0.029404724,
-0.0894652605,
-0.022446841,
0.361769706,
0.1321124583,
0.1846679002,
0.3180978,
-0.1216698661,
0.1428944021,
-0.0601889417,
-0.2058873475,
-0.1090198755,
0.2014215291,
-0.4196124077,
0.0011621863,
0.0554265231,
-0.1287319958,
-0.0488141142,
-0.2332875878,
-0.2695048451,
-0.4261548817,
-0.0986411199,
0.0017244969,
-0.148157388,
0.1272243261,
-0.1493610442,
0.102741912,
0.0276106,
-0.2686440349,
-0.2308505774,
-0.3650171757,
-0.3169381618,
-0.0109106228,
0.4290108979,
0.0145762376,
0.1516437829,
-0.3627823293,
-0.0418422967,
-0.0665277615,
-0.1820355356,
0.1500555128,
0.0805360973,
0.7029448152,
0.1669664681,
0.455009222,
0.069072254,
-0.402181536,
0.3672318757,
0.0559910163,
0.1430449784,
0.2535710335,
-0.0262752157,
-0.2338367552,
0.0019270405,
-0.3262282908,
-0.1746631861,
-0.2757627368,
-0.2295168787,
0.3282873034,
0.0036658067,
0.5006688237,
0.2981621325,
0.1741967052,
0.0721940398,
0.293499589,
-0.0413390696,
-0.6339868307,
0.3558410108,
-0.1906139255,
-0.2751673758,
0.2133963704,
-0.132106185,
0.2231926024,
-0.086927563,
-0.5945400596,
-0.0181755275,
-0.0856766626,
0.2774366736,
-0.0212453362,
0.1746532768,
0.0803520158,
0.1810374111,
0.0438929051,
-0.1677718908,
0.0480527952,
-0.1401134133,
-0.1015581191,
0.1961409003,
0.1260029674,
0.1382963508,
-0.316975981,
0.65406394,
0.0909557045,
0.13369748,
0.2820767462,
-0.2309669405,
0.2372693717,
-0.2938369215,
-0.3660793304,
0.1428664774,
-0.1669013202,
-0.1178770065,
0.216829583,
0.0458054356,
-0.2475856841,
-0.3451887667,
0.0167479143,
-0.0648538768,
-0.3360708058,
0.0050020255,
-0.0207581297,
0.1135322303,
0.1858858466,
0.1822644621,
-0.2703819871,
-0.2345915735,
0.1548734307,
0.4231767952,
0.0087487102,
-0.1173150092,
0.0347408578,
-0.1464675814,
-0.2632380128,
0.067362532,
0.1435099691,
0.0301824696,
0.0692542791,
0.1601379216,
-0.075366959,
-0.043373812,
0.4331783354,
-0.2390739769,
0.2342213243,
0.2200018466,
0.2694019377,
-0.3107824326,
-0.1034182683,
-0.0251531377,
0.062920168,
0.0118523855,
0.1688245535,
-0.0887499601,
-0.0934560597,
0.1311553121,
0.4144932926,
-0.2235659361,
-0.2698955536,
-0.248776108,
-0.0687511861,
-0.4285555184,
-0.202369079,
-0.0320568122,
0.4673662782,
-0.0326748304,
-0.0647638515,
-0.2586669922,
0.2108553499,
-0.0509943068,
0.1131496727,
0.340618372,
0.0321990959,
0.1324108243,
0.1004280075,
0.1380320787,
0.1158995926,
0.5343761444,
0.2168560326,
-0.2238839865,
-0.2228386998,
-0.0851796418,
0.0313071199,
0.1784213483,
-0.2225722522,
-0.4367464483,
-0.152959764,
0.0778845251,
-0.285615027,
0.0102686137,
0.1609382033,
-0.009693902,
-0.2836461365,
-0.5890884399,
0.6666557193,
-0.037763577,
-0.0160098374,
0.3778904378,
0.2793264091,
-0.4682313502,
0.291544944,
0.0237020422,
0.7756491899,
0.1787301004,
0.1894198209,
0.385335505,
0.2011992335,
0.0771397203,
-0.3319948018,
-0.0282288678,
-0.2672971487,
-0.1985026151,
-0.0653541908,
-0.0603927746,
0.224436447,
0.0444640629,
-0.3415676355,
0.1563431621,
-0.2356466949,
0.1824592054,
0.1031996831,
0.1254786402,
-0.2654339373,
-0.2216456532,
-0.329525888,
0.1036978066,
-0.0262821205,
0.1340883672,
-0.1326713264,
0.0420878306,
0.0319510549,
-0.200995326,
-0.2762564719,
0.2567480206,
-0.1589355767,
0.1236918122,
0.0484218933,
-0.1378914565,
0.2281669378,
0.5829569101,
-0.1593590379,
0.2440935373,
-0.3477095366,
0.3507629335,
-0.1915882826,
-0.059512578,
-0.0050649792,
0.1182998419,
0.3890741765,
-0.0086639822,
-0.1870107651,
0.0776971579,
-0.386788249,
-0.0793539286,
-0.0003726035,
-0.0602897182,
0.2495678216,
-0.3778281808,
-0.322905153,
-0.1403660178,
0.1496346593,
-0.2204141915,
0.1755173355,
0.0848176181,
-0.3581290543,
0.0449243374,
0.0820433795,
-0.2780803442,
0.0613803715,
0.1504954249,
-0.1318150461,
0.1769616902,
0.6715328097,
0.1515839994,
-0.0835841447,
-0.1752032042,
0.3402460217,
0.2391412556,
-0.3221227825,
0.0764363557,
0.1584529132,
0.1720088124,
-0.1837606579,
0.505767107,
0.011120596,
-0.0361345671,
0.1237044483,
-0.6112130284,
-0.1800485551,
0.1154957861,
0.0847896487,
0.2263807803,
-0.0776376799,
-0.0945738703,
0.12795344,
-0.058870554,
-0.2863121629,
-0.0587994456,
-0.2254427522,
0.1243875623,
0.1843926311,
0.3527342677,
-0.0772993639,
-0.103443034,
0.1885669976,
-0.2939724624,
0.0775589198,
-0.2647899389,
-0.1814709306,
0.1575972736,
0.1562159508,
-0.0526109301,
0.1496884823,
-0.1911637187,
-0.1454007775,
-0.3024874628,
0.2301183939,
-0.1878862828,
-0.1893224269,
0.1273605525,
0.0039845714,
0.2513929605,
-0.2547197342,
0.2307421565,
-0.1212225854,
0.3786000013,
-0.0694141313,
0.0638327748,
0.0754181594,
0.0700532198,
0.0636798814,
0.1784887463,
-0.4604460001,
0.2478847653,
0.4021210968,
-0.5224170685,
0.3102973998,
0.2887886465,
0.0420289859,
0.4635984004,
-0.4118159413,
0.2062279433,
0.2217870206,
0.2036855668,
-0.2438904643,
-0.0228030998,
0.3716576099,
0.0349620581,
-0.0560298339,
-0.0056385025,
-0.0307276174,
-0.3672403991,
-0.3781549037,
0.0917169601,
0.2237691879,
-0.30464378,
0.3425472677,
0.657530427,
0.0451316983,
0.1759260893,
-0.1087863892,
0.200927794,
-0.1053791419,
0.6286647916,
-0.2232085466,
0.0522451624,
0.0775189847,
0.0544746816,
0.0215490777,
-0.3388663232,
0.4037073553,
0.2471380234,
-0.2143836915,
0.0779275447,
-0.0526233986,
0.0070789922,
-0.1041944623,
0.1115574017,
-0.2287220806,
-0.0595840402,
-0.1917318404,
-0.1866235733,
-0.3219811916,
-0.2954736054,
0.1318514794,
0.2057692409,
0.0225875061,
-0.2227570564,
-0.0292869583,
0.1319860667,
-0.1630314142,
-0.4736095965,
0.3834291995,
0.1882407963,
0.0313390195,
-0.2784056067,
0.0510507151,
0.1162588596,
0.0456840619,
0.1139038801,
0.2092193514,
0.6908433437,
0.4375931919,
-0.2205272019,
0.1245526075,
0.0927393958,
-0.237375468,
-0.1092979759,
0.0666441917,
0.0102186184,
0.1698523909,
0.3279936016,
0.1993828416,
-0.1710318774,
-0.131065309,
0.1197897494,
0.1861193478,
-0.3883248866,
0.2811676562,
-0.1893189847,
-0.1461221725,
-0.1223476976,
0.0990123302,
-0.2563286126,
0.0708753616,
0.4077410698,
0.2742970288,
0.072574228,
-0.1249826103,
0.06506975,
-0.1079399586,
0.4987426996,
0.3013650775,
0.1351225525,
-0.3123223782,
-0.068378441,
-0.5570700169,
0.0616612434,
0.0642265677,
-0.2956345081,
0.1404156983,
-0.0501559451,
-0.1312006712,
0.1987141222,
0.0020382106,
-0.2134056687,
0.2585372925,
0.2531548738,
-0.113930203,
-0.5248922706,
0.1135270596,
0.2256423533,
-0.1041883677,
-0.3573678732,
-0.094613865,
-0.3640029132,
0.0264801905,
0.0779689476,
0.0237676352,
0.2049642354,
-0.1838621497,
0.3086175025,
-0.0612026528,
0.5150405169,
-0.0827324241,
-0.0476549864,
-0.3289958835,
-0.2852356434,
-0.2313293815,
0.2595260739,
-0.031862177,
0.3192121983,
-0.2210428417,
0.0657727867,
-0.271879971,
-0.0785160512,
0.0239785612,
0.3921010196,
-0.3312182426,
-0.0785402656,
-0.0629317537,
0.1922965795,
0.2366022468,
0.0647772104,
-0.1289998889,
0.2295152843,
-0.0741893575,
-0.3985046744,
0.3420301974,
-0.538634479,
-0.4959171414,
-0.0198905319,
-0.0243965983,
-0.4006346464,
-0.0844035149,
-0.5008684993,
0.1480119228,
0.3623291552,
-0.0370377004,
-0.2316137552,
-0.0645411462,
0.0931227654,
0.1666582227,
-0.0898159519,
0.1690058708,
-0.0272075199,
-0.1126219034,
-0.1106051952,
-0.2542306185
] |
https://github.com/huggingface/datasets/issues/2239 | Error loading wikihow dataset | Hi @odellus, yes you are right.
Due to the server where the `wikihow` dataset is hosted, the dataset can't be downloaded automatically by `huggingface` and you have to download it manually as you did.
Nevertheless, you have to specify which dataset version you would like to load anyway:
```python
dataset = load_dataset('wikihow', 'all', data_dir='./wikihow')
```
or
```python
dataset = load_dataset('wikihow', 'sep', data_dir='./wikihow')
```
I find that the instructions given by `huggingface` are not clear enough: I am going to fix this.
Please tell me if this eventually works for you. | ## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
``` | 90 | Error loading wikihow dataset
## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
```
Hi @odellus, yes you are right.
Due to the server where the `wikihow` dataset is hosted, the dataset can't be downloaded automatically by `huggingface` and you have to download it manually as you did.
Nevertheless, you have to specify which dataset version you would like to load anyway:
```python
dataset = load_dataset('wikihow', 'all', data_dir='./wikihow')
```
or
```python
dataset = load_dataset('wikihow', 'sep', data_dir='./wikihow')
```
I find that the instructions given by `huggingface` are not clear enough: I am going to fix this.
Please tell me if this eventually works for you. | [
-0.227499947,
0.3702227771,
0.0238095224,
0.3987953961,
0.2537098229,
0.2747787237,
0.4276537299,
0.4391774833,
0.2458437085,
0.0935081095,
0.2162851691,
0.3853774965,
-0.012894569,
0.1863867939,
0.1205023378,
-0.2686140835,
0.0110664442,
0.1045247912,
0.2237098068,
0.1890230626,
-0.3448887467,
0.0065285973,
-0.2329775989,
0.1040150002,
-0.3400688767,
0.0130664501,
-0.0981441885,
0.1813100725,
-0.053303618,
-0.5415442586,
0.4757559597,
-0.1185785607,
0.2518150806,
0.4039179683,
-0.0001126044,
0.1877029687,
0.5060685873,
0.0342031196,
-0.4421666265,
-0.09445934,
-0.3161360919,
-0.1228390187,
0.2420687377,
-0.1337204874,
-0.0326554291,
-0.0258761644,
0.0040857606,
0.035858959,
0.2355372161,
0.2652966678,
0.1653250009,
-0.1196188033,
0.3745588958,
-0.1360631585,
0.1942488849,
-0.0933303684,
-0.0869168341,
0.1622463465,
0.0739811212,
-0.2382172197,
0.1115441769,
0.2055729926,
-0.1832125783,
0.063482888,
0.5792306662,
-0.0081012286,
0.2564975321,
-0.3329903185,
0.2632297575,
0.3839665651,
0.8194906712,
-0.2249972671,
-0.2384387255,
-0.2182328105,
0.1727716178,
0.16447258,
0.3875035942,
0.306102097,
-0.3748463392,
0.0360187143,
-0.0377139933,
-0.2557302117,
-0.0580875836,
0.2808242738,
-0.2946683466,
0.4108180702,
-0.077823773,
0.1745570004,
-0.2258380651,
-0.0642696768,
0.2035182416,
-0.3248113692,
-0.2376297265,
0.3015759885,
-0.1384115517,
0.0768694729,
0.1585354656,
0.192825973,
0.0994421393,
-0.0371335447,
-0.1008379608,
-0.1908225864,
0.1564055085,
0.138483569,
0.4442619383,
0.2339714617,
-0.0133315995,
0.2062767744,
0.1207498312,
0.304885149,
-0.198493883,
-0.1141338795,
-0.201289922,
-0.2741611004,
0.1328354031,
-0.2296912819,
0.3544210494,
-0.0338295102,
-0.2546573877,
0.2001611292,
0.0116372332,
0.0730375499,
0.0347945876,
0.415957123,
-0.2064811438,
0.1446117908,
0.2597591281,
0.292766273,
0.10251569,
0.1234884709,
-0.1005087718,
0.090760082,
-0.0558773018,
-0.0318385102,
0.1500620246,
-0.1930603683,
0.2553025782,
0.1958254427,
0.1250930279,
-0.2846935987,
-0.0093550608,
0.2284624875,
-0.2356489599,
0.3494036496,
0.0726296157,
0.1431748271,
0.1701947451,
-0.6475991011,
-0.1152564585,
0.1633384526,
-0.3941991925,
-0.3855848312,
-0.2756711543,
0.2184658647,
-0.0403428003,
0.0450251587,
-0.419618398,
-0.178589344,
0.2975125313,
-0.2910596132,
-0.2390633076,
-0.0699157342,
0.1259680688,
-0.1256433576,
0.3569156528,
0.4782390594,
-0.3908683956,
-0.0335086212,
-0.0930062681,
0.0438777879,
-0.0572245792,
-0.310146004,
-0.3554071784,
0.4971385002,
-0.2884573638,
-0.2874656916,
0.2937495112,
-0.4576177001,
-0.2892732024,
0.2900746167,
0.0192081183,
0.3332003951,
-0.0229106955,
-0.1692106724,
-0.1682197899,
-0.0836993903,
0.2327568233,
0.222187832,
-0.0055906195,
0.0550970435,
-0.1940856576,
-0.2364347577,
0.1046095043,
0.1864863187,
0.0511643887,
0.1748684347,
0.0437123962,
0.0242449157,
0.1256706417,
-0.1626351625,
-0.0451245792,
0.1203384846,
-0.02816955,
-0.0047447458,
0.0483277068,
0.0023427159,
-0.4610755444,
0.3484281898,
0.0433676541,
0.1083411276,
-0.1505927145,
-0.0570081845,
-0.2748943865,
0.1563288569,
-0.5284994245,
-0.177239731,
0.1664672792,
0.0618428066,
-0.1497650743,
-0.0185124874,
-0.1240175292,
0.0431064963,
-0.3334241211,
0.1222896129,
-0.2070947587,
0.1706792116,
-0.1306973398,
-0.0565900877,
-0.0111800954,
0.14893502,
0.034669511,
0.0848748088,
-0.2042346597,
0.3257359862,
0.0568367541,
0.1124036014,
-0.0444701836,
-0.068886131,
-0.0373890027,
-0.1064237952,
0.0548357293,
0.2269091606,
0.2477426529,
-0.086158514,
-0.0920167416,
0.2309026718,
0.0540098064,
0.3870118856,
0.0292327851,
0.2674030364,
0.2057378888,
-0.0143851265,
-0.0240438618,
0.0058025643,
0.1215945184,
0.2089030147,
0.0798319876,
-0.0836234763,
-0.1614170372,
-0.1593148708,
0.0981500745,
0.0621437952,
0.0763311982,
0.0264558494,
-0.2656010389,
0.0542389676,
0.0102330279,
0.2679123282,
0.2297854424,
0.0542744435,
-0.282302469,
0.029404724,
-0.0894652605,
-0.022446841,
0.361769706,
0.1321124583,
0.1846679002,
0.3180978,
-0.1216698661,
0.1428944021,
-0.0601889417,
-0.2058873475,
-0.1090198755,
0.2014215291,
-0.4196124077,
0.0011621863,
0.0554265231,
-0.1287319958,
-0.0488141142,
-0.2332875878,
-0.2695048451,
-0.4261548817,
-0.0986411199,
0.0017244969,
-0.148157388,
0.1272243261,
-0.1493610442,
0.102741912,
0.0276106,
-0.2686440349,
-0.2308505774,
-0.3650171757,
-0.3169381618,
-0.0109106228,
0.4290108979,
0.0145762376,
0.1516437829,
-0.3627823293,
-0.0418422967,
-0.0665277615,
-0.1820355356,
0.1500555128,
0.0805360973,
0.7029448152,
0.1669664681,
0.455009222,
0.069072254,
-0.402181536,
0.3672318757,
0.0559910163,
0.1430449784,
0.2535710335,
-0.0262752157,
-0.2338367552,
0.0019270405,
-0.3262282908,
-0.1746631861,
-0.2757627368,
-0.2295168787,
0.3282873034,
0.0036658067,
0.5006688237,
0.2981621325,
0.1741967052,
0.0721940398,
0.293499589,
-0.0413390696,
-0.6339868307,
0.3558410108,
-0.1906139255,
-0.2751673758,
0.2133963704,
-0.132106185,
0.2231926024,
-0.086927563,
-0.5945400596,
-0.0181755275,
-0.0856766626,
0.2774366736,
-0.0212453362,
0.1746532768,
0.0803520158,
0.1810374111,
0.0438929051,
-0.1677718908,
0.0480527952,
-0.1401134133,
-0.1015581191,
0.1961409003,
0.1260029674,
0.1382963508,
-0.316975981,
0.65406394,
0.0909557045,
0.13369748,
0.2820767462,
-0.2309669405,
0.2372693717,
-0.2938369215,
-0.3660793304,
0.1428664774,
-0.1669013202,
-0.1178770065,
0.216829583,
0.0458054356,
-0.2475856841,
-0.3451887667,
0.0167479143,
-0.0648538768,
-0.3360708058,
0.0050020255,
-0.0207581297,
0.1135322303,
0.1858858466,
0.1822644621,
-0.2703819871,
-0.2345915735,
0.1548734307,
0.4231767952,
0.0087487102,
-0.1173150092,
0.0347408578,
-0.1464675814,
-0.2632380128,
0.067362532,
0.1435099691,
0.0301824696,
0.0692542791,
0.1601379216,
-0.075366959,
-0.043373812,
0.4331783354,
-0.2390739769,
0.2342213243,
0.2200018466,
0.2694019377,
-0.3107824326,
-0.1034182683,
-0.0251531377,
0.062920168,
0.0118523855,
0.1688245535,
-0.0887499601,
-0.0934560597,
0.1311553121,
0.4144932926,
-0.2235659361,
-0.2698955536,
-0.248776108,
-0.0687511861,
-0.4285555184,
-0.202369079,
-0.0320568122,
0.4673662782,
-0.0326748304,
-0.0647638515,
-0.2586669922,
0.2108553499,
-0.0509943068,
0.1131496727,
0.340618372,
0.0321990959,
0.1324108243,
0.1004280075,
0.1380320787,
0.1158995926,
0.5343761444,
0.2168560326,
-0.2238839865,
-0.2228386998,
-0.0851796418,
0.0313071199,
0.1784213483,
-0.2225722522,
-0.4367464483,
-0.152959764,
0.0778845251,
-0.285615027,
0.0102686137,
0.1609382033,
-0.009693902,
-0.2836461365,
-0.5890884399,
0.6666557193,
-0.037763577,
-0.0160098374,
0.3778904378,
0.2793264091,
-0.4682313502,
0.291544944,
0.0237020422,
0.7756491899,
0.1787301004,
0.1894198209,
0.385335505,
0.2011992335,
0.0771397203,
-0.3319948018,
-0.0282288678,
-0.2672971487,
-0.1985026151,
-0.0653541908,
-0.0603927746,
0.224436447,
0.0444640629,
-0.3415676355,
0.1563431621,
-0.2356466949,
0.1824592054,
0.1031996831,
0.1254786402,
-0.2654339373,
-0.2216456532,
-0.329525888,
0.1036978066,
-0.0262821205,
0.1340883672,
-0.1326713264,
0.0420878306,
0.0319510549,
-0.200995326,
-0.2762564719,
0.2567480206,
-0.1589355767,
0.1236918122,
0.0484218933,
-0.1378914565,
0.2281669378,
0.5829569101,
-0.1593590379,
0.2440935373,
-0.3477095366,
0.3507629335,
-0.1915882826,
-0.059512578,
-0.0050649792,
0.1182998419,
0.3890741765,
-0.0086639822,
-0.1870107651,
0.0776971579,
-0.386788249,
-0.0793539286,
-0.0003726035,
-0.0602897182,
0.2495678216,
-0.3778281808,
-0.322905153,
-0.1403660178,
0.1496346593,
-0.2204141915,
0.1755173355,
0.0848176181,
-0.3581290543,
0.0449243374,
0.0820433795,
-0.2780803442,
0.0613803715,
0.1504954249,
-0.1318150461,
0.1769616902,
0.6715328097,
0.1515839994,
-0.0835841447,
-0.1752032042,
0.3402460217,
0.2391412556,
-0.3221227825,
0.0764363557,
0.1584529132,
0.1720088124,
-0.1837606579,
0.505767107,
0.011120596,
-0.0361345671,
0.1237044483,
-0.6112130284,
-0.1800485551,
0.1154957861,
0.0847896487,
0.2263807803,
-0.0776376799,
-0.0945738703,
0.12795344,
-0.058870554,
-0.2863121629,
-0.0587994456,
-0.2254427522,
0.1243875623,
0.1843926311,
0.3527342677,
-0.0772993639,
-0.103443034,
0.1885669976,
-0.2939724624,
0.0775589198,
-0.2647899389,
-0.1814709306,
0.1575972736,
0.1562159508,
-0.0526109301,
0.1496884823,
-0.1911637187,
-0.1454007775,
-0.3024874628,
0.2301183939,
-0.1878862828,
-0.1893224269,
0.1273605525,
0.0039845714,
0.2513929605,
-0.2547197342,
0.2307421565,
-0.1212225854,
0.3786000013,
-0.0694141313,
0.0638327748,
0.0754181594,
0.0700532198,
0.0636798814,
0.1784887463,
-0.4604460001,
0.2478847653,
0.4021210968,
-0.5224170685,
0.3102973998,
0.2887886465,
0.0420289859,
0.4635984004,
-0.4118159413,
0.2062279433,
0.2217870206,
0.2036855668,
-0.2438904643,
-0.0228030998,
0.3716576099,
0.0349620581,
-0.0560298339,
-0.0056385025,
-0.0307276174,
-0.3672403991,
-0.3781549037,
0.0917169601,
0.2237691879,
-0.30464378,
0.3425472677,
0.657530427,
0.0451316983,
0.1759260893,
-0.1087863892,
0.200927794,
-0.1053791419,
0.6286647916,
-0.2232085466,
0.0522451624,
0.0775189847,
0.0544746816,
0.0215490777,
-0.3388663232,
0.4037073553,
0.2471380234,
-0.2143836915,
0.0779275447,
-0.0526233986,
0.0070789922,
-0.1041944623,
0.1115574017,
-0.2287220806,
-0.0595840402,
-0.1917318404,
-0.1866235733,
-0.3219811916,
-0.2954736054,
0.1318514794,
0.2057692409,
0.0225875061,
-0.2227570564,
-0.0292869583,
0.1319860667,
-0.1630314142,
-0.4736095965,
0.3834291995,
0.1882407963,
0.0313390195,
-0.2784056067,
0.0510507151,
0.1162588596,
0.0456840619,
0.1139038801,
0.2092193514,
0.6908433437,
0.4375931919,
-0.2205272019,
0.1245526075,
0.0927393958,
-0.237375468,
-0.1092979759,
0.0666441917,
0.0102186184,
0.1698523909,
0.3279936016,
0.1993828416,
-0.1710318774,
-0.131065309,
0.1197897494,
0.1861193478,
-0.3883248866,
0.2811676562,
-0.1893189847,
-0.1461221725,
-0.1223476976,
0.0990123302,
-0.2563286126,
0.0708753616,
0.4077410698,
0.2742970288,
0.072574228,
-0.1249826103,
0.06506975,
-0.1079399586,
0.4987426996,
0.3013650775,
0.1351225525,
-0.3123223782,
-0.068378441,
-0.5570700169,
0.0616612434,
0.0642265677,
-0.2956345081,
0.1404156983,
-0.0501559451,
-0.1312006712,
0.1987141222,
0.0020382106,
-0.2134056687,
0.2585372925,
0.2531548738,
-0.113930203,
-0.5248922706,
0.1135270596,
0.2256423533,
-0.1041883677,
-0.3573678732,
-0.094613865,
-0.3640029132,
0.0264801905,
0.0779689476,
0.0237676352,
0.2049642354,
-0.1838621497,
0.3086175025,
-0.0612026528,
0.5150405169,
-0.0827324241,
-0.0476549864,
-0.3289958835,
-0.2852356434,
-0.2313293815,
0.2595260739,
-0.031862177,
0.3192121983,
-0.2210428417,
0.0657727867,
-0.271879971,
-0.0785160512,
0.0239785612,
0.3921010196,
-0.3312182426,
-0.0785402656,
-0.0629317537,
0.1922965795,
0.2366022468,
0.0647772104,
-0.1289998889,
0.2295152843,
-0.0741893575,
-0.3985046744,
0.3420301974,
-0.538634479,
-0.4959171414,
-0.0198905319,
-0.0243965983,
-0.4006346464,
-0.0844035149,
-0.5008684993,
0.1480119228,
0.3623291552,
-0.0370377004,
-0.2316137552,
-0.0645411462,
0.0931227654,
0.1666582227,
-0.0898159519,
0.1690058708,
-0.0272075199,
-0.1126219034,
-0.1106051952,
-0.2542306185
] |
https://github.com/huggingface/datasets/issues/2237 | Update Dataset.dataset_size after transformed with map | @albertvillanova I would like to take this up. It would be great if you could point me as to how the dataset size is calculated in HF. Thanks! | After loading a dataset, if we transform it by using `.map` its `dataset_size` attirbute is not updated. | 28 | Update Dataset.dataset_size after transformed with map
After loading a dataset, if we transform it by using `.map` its `dataset_size` attirbute is not updated.
@albertvillanova I would like to take this up. It would be great if you could point me as to how the dataset size is calculated in HF. Thanks! | [
-0.2140057683,
-0.3152701259,
-0.1228158474,
0.1519187987,
0.0606086217,
0.0196822137,
0.2813273072,
-0.1209013462,
0.1866593063,
0.117190294,
-0.1872753203,
0.0038692653,
0.3808464706,
0.1846314073,
0.271148622,
0.0805764645,
0.2649389207,
0.128343001,
-0.554933846,
-0.0820951909,
-0.2858288884,
-0.0547996908,
-0.3831389248,
-0.3393274546,
0.0922735557,
0.0161276516,
-0.3735989034,
0.0223029777,
-0.0533075631,
-0.194979161,
0.0718326643,
0.1569412947,
0.2523395121,
0.3328720331,
-0.000118608,
0.0030875504,
0.0607761517,
-0.2326350212,
0.0674876794,
0.0612015426,
-0.3378656209,
-0.1122006923,
-0.3726664186,
-0.1310825497,
0.0208221078,
-0.1059123129,
-0.2514367998,
-0.1718563437,
-0.0952341557,
0.001906693,
0.1268692762,
0.0038474351,
0.1123808026,
-0.0862618163,
0.0469182469,
0.431981802,
0.3182980418,
0.1597343236,
-0.1253376007,
0.0477171317,
-0.1166615933,
0.421964407,
0.3868219852,
-0.1872308552,
0.6096596122,
-0.2739831209,
0.0580318607,
-0.275918901,
0.2585313916,
-0.0472460389,
0.6375643611,
-0.0424681269,
-0.1704121232,
0.2470779419,
-0.0291202813,
0.227943331,
0.0077343751,
-0.1512333453,
0.2990825176,
-0.0861106664,
-0.4554167986,
-0.4315141737,
0.1040450186,
-0.0273133926,
-0.2427794635,
0.1446978748,
-0.1112795472,
0.2554886341,
-0.2085963339,
-0.1983201802,
-0.0714240745,
-0.1080983803,
-0.1298045516,
0.2719274163,
-0.1660077274,
-0.2704580426,
0.024324134,
0.1149550378,
0.2199003845,
-0.5036531687,
-0.3162201941,
-0.1402003765,
-0.2914327681,
0.0798047855,
0.1231800839,
0.2272793502,
-0.0206622481,
0.1592143625,
-0.1066529155,
-0.1457858682,
-0.1415427029,
-0.1551552713,
0.0363506712,
-0.1320213377,
0.141397357,
-0.3502235413,
-0.1277058125,
-0.2908428013,
0.0824376121,
-0.1878944784,
0.0590820611,
-0.1257807314,
-0.0484556332,
0.423869133,
-0.0765653849,
0.2112362832,
0.0476728678,
-0.0705929026,
0.0623573437,
-0.3581078649,
-0.158299014,
-0.2173956931,
-0.0436137989,
-0.040028818,
-0.288895607,
-0.0153966341,
0.1921588778,
-0.0682716742,
-0.010062445,
0.0613146573,
-0.2472412437,
-0.3080357313,
0.5430862904,
0.372597754,
-0.0346397199,
-0.1020848453,
-0.2056688964,
0.0348296836,
-0.2220867127,
0.5323477387,
-0.4249654412,
-0.0220029727,
-0.0164285079,
0.1099159047,
0.3707469702,
-0.1429189742,
-0.3712679446,
0.4043622017,
0.443975687,
-0.2333313525,
0.1766773462,
-0.1445431262,
-0.3452300727,
-0.1946548969,
-0.0265194103,
0.2341804057,
-0.4227819145,
-0.0769668072,
0.1293613315,
-0.0949332863,
-0.0758659691,
0.186947152,
-0.2029878199,
0.2052721977,
-0.2751538157,
-0.0264797285,
0.4559624791,
0.1534686834,
-0.4716666043,
0.2193998396,
0.1093274206,
-0.4222335219,
-0.1315320879,
0.1797707677,
0.3205760419,
-0.1876439154,
-0.1563880742,
0.2847703099,
-0.1518968195,
-0.0051314831,
-0.218338117,
-0.0154410973,
0.2294495851,
-0.2723498046,
0.3975716233,
0.2733163536,
0.4171893001,
0.1851177812,
0.2256757766,
0.0936024114,
0.2195406258,
0.4888664782,
-0.1095971018,
0.0856008232,
0.3812715411,
0.1324254423,
-0.1740550697,
-0.0752758533,
-0.3204293847,
-0.3319666088,
0.6687425375,
-0.0966063663,
-0.3359659612,
-0.0507553592,
0.1969645321,
-0.066656597,
-0.0605127066,
0.179988727,
0.0005362704,
-0.4350316226,
-0.021131143,
0.3384567797,
-0.1690151095,
-0.0516395867,
-0.1935634315,
0.4136391878,
0.0334194303,
0.1814787984,
-0.2950868607,
-0.2474319041,
0.1697004735,
-0.1296276152,
-0.5138611197,
0.5568605661,
0.02318931,
0.1645975113,
0.3235612214,
-0.0610961467,
0.0794883668,
-0.1397188455,
0.4504624009,
-0.211896196,
0.2293569744,
-0.0954312012,
-0.0957637727,
-0.0936717987,
-0.025137689,
0.0632643849,
0.0550186634,
-0.2214379758,
0.0508437529,
0.046370402,
0.005312115,
-0.1154000834,
-0.4647923112,
0.0697128028,
0.1271221191,
0.0914867818,
0.2996520102,
0.0864422172,
0.5922945738,
-0.1145483032,
-0.2592752576,
0.4422221482,
-0.6018930078,
-0.3079836369,
0.0779071376,
0.0987896323,
0.473757714,
0.1595907509,
0.3140646815,
-0.0679321364,
0.1276167333,
0.115165025,
0.1253501624,
-0.2597395182,
0.2894564271,
0.0159951374,
0.3577781618,
0.0495108441,
-0.1046201512,
0.1467949152,
0.1935364008,
0.0009601936,
-0.2141057104,
0.0306785703,
0.0610925108,
-0.1605758369,
-0.1327031106,
-0.077621758,
-0.436152637,
-0.139006272,
-0.2273798138,
-0.1222074181,
0.2565587163,
-0.0839828998,
0.1252579689,
-0.0597151369,
0.1393933743,
-0.0056538433,
0.1181036606,
0.0697115958,
-0.2667843997,
0.0406389758,
-0.18278341,
-0.2520089447,
0.3343187869,
-0.1925522089,
0.0872485414,
-0.2872766554,
-0.5419435501,
0.0671587586,
0.072697714,
-0.1776107103,
-0.0480505601,
0.0545803644,
-0.2404442281,
0.5561315417,
-0.0330326483,
-0.2603104711,
-0.1486042738,
-0.0934141204,
-0.2691333294,
0.1325571239,
0.0069174618,
-0.166376397,
-0.128446728,
-0.006093286,
-0.1103029847,
-0.0678272396,
0.0013865773,
-0.0018110313,
0.1627291441,
-0.1070980057,
0.0917875171,
-0.2905720472,
-0.4420058131,
-0.3465590477,
0.2333112508,
-0.1668549776,
-0.2456224859,
0.1360713542,
-0.0397342965,
0.0531752594,
0.2855844498,
-0.4390059114,
0.0019077845,
-0.256993413,
0.1336508989,
-0.3816580772,
0.4650991857,
0.4649780095,
-0.1931081712,
-0.0217307396,
-0.1601400673,
-0.3421410322,
0.0221874788,
0.5710697174,
0.4459758997,
0.1922606975,
0.489653796,
0.0326426253,
0.3656322062,
0.0359150395,
-0.2391733527,
0.3064499497,
-0.0182021298,
0.2634076476,
-0.3918580711,
0.1460927725,
0.1333954185,
0.058898326,
0.0146397576,
0.2835103869,
0.1154618934,
-0.1875751615,
0.18679896,
-0.6332859993,
-0.0856009424,
0.1739154458,
0.205745995,
-0.2999029756,
0.5226066113,
0.2023054063,
-0.1186946332,
-0.3370680213,
-0.1614810228,
0.0884568095,
0.2191428691,
0.3309371769,
0.0755063742,
-0.1272507608,
0.178354457,
-0.0374498479,
0.4621967375,
0.126532197,
0.1225275621,
0.1360726357,
-0.0558733828,
0.0783821046,
0.0126252808,
0.5038232803,
0.0572215095,
-0.0133886086,
-0.0276392922,
-0.2663751841,
-0.1733079255,
-0.0302933902,
-0.1200953722,
-0.0064267702,
-0.0297499374,
0.5657555461,
0.1122532785,
-0.2860833704,
0.1884267032,
0.1513285339,
-0.2347455025,
-0.1128132343,
-0.0953421667,
-0.0633941367,
-0.2387756407,
0.0356187299,
-0.2177068591,
-0.2891507149,
-0.0141801015,
-0.0635061935,
-0.2371362001,
-0.0348991863,
-0.2310148478,
0.246176675,
0.3423181176,
0.3496637046,
0.0119778439,
0.1120424271,
0.1592476964,
0.33828035,
0.3827722073,
-0.1593351811,
-0.0139453709,
-0.0429120846,
0.1522671133,
0.4659045339,
0.0274835452,
0.0271216072,
-0.077300638,
0.1354236752,
0.2730988562,
-0.3703926802,
0.1427560151,
0.2864741683,
-0.0103279203,
-0.3279104531,
-0.3974003196,
0.4388550222,
-0.0843487084,
-0.0292804018,
0.1944140792,
0.2325004488,
-0.3296415508,
0.4847523272,
0.257383436,
0.8518749475,
-0.1079275161,
-0.2634680569,
-0.0353159942,
-0.2792357802,
-0.3146862388,
-0.4570844769,
0.0338803902,
-0.3315181434,
-0.2903359234,
-0.0247496739,
0.0222284123,
0.1811500043,
0.355135709,
-0.4075717032,
0.1832202971,
0.1703095138,
0.307115376,
-0.1503184438,
0.0610582903,
0.0182478037,
-0.1289484203,
0.0756901503,
0.1380480975,
0.0011314601,
0.1588470787,
-0.1131138876,
0.1153471768,
0.1345826685,
-0.1179265529,
0.0256782919,
-0.2325982898,
-0.3113341033,
0.0803495198,
-0.0858614072,
0.2042096257,
0.2555888295,
0.2275426239,
-0.0294652246,
0.2428285182,
0.201103434,
0.2134094834,
0.2661735713,
0.4326905012,
0.0473840982,
0.3145413697,
0.132596001,
-0.0504242294,
-0.3777056336,
-0.1642895937,
-0.1882668585,
-0.3265551627,
-0.364897728,
-0.1243491992,
0.2862339616,
-0.4843811691,
0.0331742987,
0.1309976727,
0.0992184728,
0.1860063076,
0.0607795268,
-0.0608311072,
-0.0425183624,
0.5782652497,
0.3905584812,
-0.3896172047,
-0.2133712322,
0.4047327638,
0.0968292281,
0.1713433862,
0.3150086105,
-0.276640892,
-0.140354678,
-0.0606273711,
0.2169502378,
0.0243307799,
-0.1240530536,
-0.0700630248,
0.0081480742,
0.1974969804,
-0.1024969965,
-0.0588435903,
0.0068694493,
0.1679722369,
-0.3675274551,
-0.3850825131,
-0.5609772205,
0.0693349317,
-0.1425029337,
0.0989471078,
0.2754641771,
-0.1074578464,
0.211594671,
0.6015930772,
-0.266220212,
-0.0550228767,
0.3377178907,
0.422611326,
0.0877095461,
0.312435776,
-0.0761974081,
-0.0099371374,
-0.0009493083,
-0.1354356706,
-0.1441881806,
-0.1140036657,
-0.073398903,
0.1309790313,
-0.1095950082,
0.1733467579,
-0.2824150026,
-0.5237737298,
-0.0834711865,
-0.2588953972,
0.0914596766,
-0.1052842811,
-0.0736051947,
0.3677439988,
0.4271840453,
-0.1542943716,
0.1063290089,
0.2279393673,
0.3831104934,
0.1607556343,
-0.3790394068,
0.2424960881,
-0.0449331701,
-0.1546949446,
-0.497456044,
0.1371771693,
0.4143354297,
-0.2048914284,
0.1745212376,
-0.0415025391,
0.5330855846,
-0.1215083376,
0.1827474982,
0.039959155,
0.2078928351,
-0.1102112308,
0.037565697,
0.1143462285,
-0.2187922001,
0.1581636518,
0.0632976741,
0.1472353041,
-0.0786528587,
0.2484925091,
0.2706508636,
0.4704919457,
-0.0549887307,
0.1468246728,
-0.0151104778,
-0.0116154458,
-0.236306712,
0.7342292666,
-0.1024148464,
0.2639228404,
0.2599751949,
0.2073659003,
-0.0222288743,
0.543454051,
0.4413158298,
0.3745325208,
0.012965655,
0.2651264071,
0.3152926862,
-0.4952999055,
0.1709746569,
0.31935215,
0.0870405063,
0.0204002336,
0.3167511821,
-0.1871095449,
0.4784356654,
-0.5166828632,
-0.0488768034,
0.3402388692,
-0.0470015444,
-0.1142579988,
0.1654684246,
-0.0926524922,
-0.254362464,
0.0713710189,
-0.0918416828,
-0.0569909625,
0.5444130898,
0.0117146503,
0.0043228306,
0.0162326898,
-0.0063120569,
0.0247219242,
0.0959702134,
-0.1606915295,
0.4082081914,
-0.0393901318,
0.2547601461,
0.4199391901,
0.3694166839,
-0.0672289804,
0.1705740839,
0.0450079925,
0.3584495485,
0.2182999998,
-0.2190247476,
0.0465469435,
-0.1061873287,
-0.1234613955,
-0.2593734562,
-0.0262957476,
0.0656527579,
-0.1066657156,
0.1110752374,
-0.2047575116,
0.2226381898,
-0.2474739552,
0.5339397788,
0.145045951,
-0.1986013651,
-0.2610895932,
-0.2012496442,
-0.2419426143,
-0.1441998631,
0.4378478229,
-0.2818747163,
0.1111839116,
-0.0101881176,
0.0446585193,
0.0988994688,
0.4319504201,
0.2890985012,
-0.2808114886,
-0.1705264449,
-0.415445447,
-0.3810479939,
-0.054429628,
0.1726614386,
-0.0116674677,
0.0804958791,
0.14265728,
0.0874044448,
-0.1501588076,
0.6539114714,
-0.5256931782,
0.075252749,
0.5172640085,
0.0599825531,
-0.251414299,
-0.6457120776,
0.1792387366,
0.1014219448,
-0.1655286849,
0.1507627815,
0.2050514072,
-0.026851248,
-0.2309288681,
0.1188352555,
0.2486528158,
-0.1183634475,
0.4065018892,
0.0029661246,
0.1948696971,
-0.304128319,
0.2305038571,
0.2251957804,
-0.0709350482,
-0.3524969816,
0.3481678367,
-0.1475659311,
0.1479865909,
-0.0994006991,
-0.4449293017,
0.105152078,
-0.1708311588,
-0.1205769777,
-0.1426893473,
-0.2406898439,
-0.0736692846,
-0.1960358471,
-0.0846512094,
0.3271545172,
0.3446578681,
0.2208224088,
0.0302761346,
-0.302290082,
-0.0665535107,
0.2736280859,
-0.2532921135,
-0.3596786857,
-0.12065956,
-0.0495741963,
-0.2490155995,
-0.5401290655,
-0.3720548749,
0.0165629685,
0.5108925104,
0.000899829,
0.334538728,
0.2416673899,
0.131881848,
0.3801807463,
-0.2322731912,
0.4988077879,
-0.1960778236,
-0.0948146731,
-0.4374317825,
-0.0765361339
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Hi ! Indeed there's no verification on the uniqueness nor the types of the keys.
Do you already have some ideas of what you would like to implement and how ? | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 31 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Hi ! Indeed there's no verification on the uniqueness nor the types of the keys.
Do you already have some ideas of what you would like to implement and how ? | [
0.0275367573,
-0.2159305364,
0.0291702896,
0.4762759805,
0.0684194565,
-0.2363621742,
0.4168981612,
0.0804125518,
0.4312435091,
0.1339117885,
0.1672191322,
0.3502570093,
-0.0206804257,
0.206516102,
-0.0032006167,
0.4027806818,
0.0770775974,
0.0507337637,
-0.3874770999,
-0.1746382117,
-0.5882228017,
0.0452297106,
-0.1532146335,
-0.0614638589,
-0.1678527296,
0.1618545502,
-0.0681425184,
-0.0138255209,
-0.1972760558,
-0.4447281659,
0.2861762643,
0.3954279125,
-0.1313848197,
0.3610022962,
-0.0001243995,
-0.0313455164,
0.0754738376,
-0.1916625053,
-0.5255250335,
0.026202634,
-0.1937692165,
0.09500245,
-0.0176382903,
-0.5688119531,
-0.0537752733,
-0.1629761457,
-0.0972570851,
-0.4674585462,
0.2114742696,
0.2158978432,
0.0896027088,
0.4042153358,
0.3006412983,
0.204203099,
0.2016511112,
0.6070532203,
-0.2093219757,
-0.3547793031,
0.0443221107,
0.3141502738,
0.0819109678,
0.177616477,
0.060621798,
-0.1701101959,
0.2006858885,
0.1464149207,
-0.2246277481,
-0.323405087,
-0.0920047909,
0.3267405331,
0.3529067636,
-0.1715485305,
-0.3823952377,
-0.3127988577,
-0.031310115,
0.1885318607,
0.4732133448,
0.1420392096,
-0.3297614455,
0.004291296,
-0.2719512284,
0.3002656102,
-0.0179661363,
-0.0041727591,
0.258790344,
0.1244734898,
-0.0329473801,
0.0638201535,
0.2017904073,
-0.1953787059,
-0.1708808243,
-0.4019608498,
0.0959564894,
0.3071313202,
-0.1999059767,
-0.2576292753,
0.2660216689,
0.1940440983,
0.4387062788,
0.0169974007,
-0.0074184779,
0.0199900232,
-0.1039314717,
-0.1370510608,
-0.052976761,
0.2784973383,
0.1445690989,
0.0533139445,
0.4216778576,
-0.0334115028,
-0.1720717847,
0.0693689361,
-0.0535319448,
0.0950192511,
0.4306458533,
0.2696842849,
0.3355063498,
0.0252514184,
-0.1482147872,
0.0974797681,
-0.1257558763,
-0.2656872272,
0.2667301893,
0.3143822253,
-0.0797204226,
0.09894339,
-0.1258906126,
0.0694412291,
-0.3220944405,
-0.0343440585,
-0.085337922,
-0.149642095,
-0.0802806243,
-0.0657496005,
0.3642802238,
-0.3379720747,
0.0242794603,
0.2694472671,
-0.2059152275,
-0.2884233594,
-0.1518756896,
-0.0767865777,
0.5315925479,
0.2941077948,
-0.1158167347,
0.0240071565,
0.0686461404,
-0.4160591066,
-0.3097438514,
0.3407131732,
-0.2412343174,
-0.1555794924,
0.2009788752,
0.0987635702,
-0.3604650795,
-0.1261387467,
-0.130660668,
-0.0645980015,
0.3372377753,
0.2071814984,
0.0784949139,
-0.1708254516,
0.1355779767,
-0.4528720081,
0.2073255628,
0.891407907,
-0.1023141891,
-0.0063827261,
-0.152642101,
-0.0278965347,
0.1243740916,
0.3553084731,
-0.0161852501,
0.3325899243,
-0.3431202173,
0.0928568393,
0.171664387,
-0.1076283157,
-0.2139099389,
0.012115512,
0.1867587715,
0.0967979208,
0.5034435391,
0.2218378782,
0.268566668,
-0.0544426367,
-0.2298943847,
0.0698376223,
0.0156063978,
0.060203366,
-0.2132327408,
-0.1308510602,
0.0318854861,
0.0194858983,
-0.0369517766,
0.2195640653,
0.1360975057,
-0.2552813292,
0.0255508348,
-0.2306272388,
0.0509530455,
-0.0563533045,
0.16233325,
0.0917919874,
0.0456482396,
0.4361871779,
-0.4905917346,
0.223052457,
-0.0022499934,
0.1985981762,
-0.4391953647,
-0.2743708491,
-0.0583683662,
0.233192578,
-0.3910269141,
0.1591252089,
0.0221544504,
0.3127869666,
0.313372016,
0.2550626993,
-0.0731581599,
0.0802614465,
-0.0975415185,
0.1954382658,
-0.3723433018,
0.0034483448,
-0.0711762607,
0.0683824942,
-0.0470243767,
0.2644086182,
0.1033376008,
-0.1461704075,
-0.0429863036,
0.2023592442,
0.2752099335,
-0.0221164487,
0.0455039106,
0.3107892573,
0.2325394154,
-0.0491348989,
-0.0383990295,
0.1895339936,
0.1686584949,
0.0750721097,
-0.2943840623,
0.8053556681,
-0.2581630349,
0.0285354182,
-0.002302289,
-0.0071977302,
0.0217749849,
-0.1347506642,
-0.136598289,
-0.188443929,
-0.0732934624,
-0.0163169429,
0.1072861999,
0.4089408219,
-0.2961964011,
0.1576383859,
0.7058495879,
0.0941349566,
0.2832790017,
-0.032123372,
0.1921659559,
-0.0808991343,
-0.2282803506,
0.3368209302,
0.1522256136,
0.1965064853,
0.118586123,
-0.3717748523,
-0.0730495229,
-0.1460592151,
0.0427721776,
-0.1891167164,
-0.3544771075,
0.3523737788,
-0.3063009679,
-0.1038097441,
-0.5338435769,
0.2326878011,
0.1194282621,
0.251612246,
-0.5340342522,
-0.2392491996,
-0.1169462949,
-0.0837990195,
-0.228394866,
-0.1795801818,
-0.0798715651,
-0.3404611349,
0.1645959318,
0.0483223759,
-0.0415060148,
0.2251761556,
-0.0276002549,
0.1776853949,
0.0363353416,
-0.5385169387,
-0.4368277192,
0.0511805899,
-0.1454135925,
-0.0151515678,
0.248191148,
-0.1409252137,
0.3679049015,
-0.3222298622,
0.2253864557,
-0.2745194137,
-0.301422447,
0.0428631417,
-0.15850842,
0.119652167,
-0.0956907272,
-0.0779616684,
-0.0854471251,
-0.0822698623,
0.2423252016,
-0.2479200512,
-0.5795608759,
0.2682211995,
0.0698500276,
-0.1878862381,
-0.2038373947,
-0.5165555477,
-0.0041084085,
0.0617714971,
0.1320421696,
-0.0713652372,
0.1752529442,
0.046107702,
0.1794478595,
-0.1891894639,
0.0000352226,
-0.0443068668,
-0.2693848014,
-0.3226260543,
0.6126976013,
-0.0839338303,
-0.2482607961,
-0.0997936875,
-0.1879332811,
-0.2220842838,
0.1487161368,
-0.3126060069,
0.1589481682,
-0.5614319444,
0.6340061426,
0.2777656615,
0.2941865027,
0.4636283815,
0.0964576975,
0.015165031,
-0.2317610234,
0.0259327069,
0.3365900517,
-0.014384686,
0.2851171792,
0.1721882373,
0.2982103825,
-0.2947058678,
0.4157006443,
0.3359111249,
-0.1027194113,
0.3535642624,
-0.152692154,
0.3624250591,
0.0208123643,
-0.3244894743,
-0.0466853306,
0.1976602674,
0.1448144168,
0.1876152158,
0.0363311246,
0.3886360526,
-0.1072059348,
0.4754825234,
-0.7206187248,
-0.3073938787,
0.0303061698,
-0.1915811747,
0.239602983,
0.0085609332,
0.3000762463,
-0.1423637718,
-0.240300104,
-0.2210788876,
0.3997721672,
0.4897814691,
-0.0650008023,
-0.4595609009,
-0.0350507498,
-0.5776281953,
0.0720781535,
-0.034360677,
0.2558517158,
0.0583172217,
-0.2912877202,
0.1583035588,
-0.1152782515,
0.4106993973,
-0.2006324977,
0.0915496573,
-0.1241661608,
0.1059208661,
-0.1465411484,
0.074377358,
-0.1692646444,
-0.1423260421,
-0.1802764088,
0.5174466372,
-0.5598745346,
-0.1423892677,
0.0348060727,
-0.0109510385,
-0.160813719,
-0.4294214249,
-0.4368859529,
-0.1710218191,
-0.1745036989,
0.1889981478,
-0.0279019177,
0.1397202611,
-0.5259868503,
-0.0763651505,
-0.200700745,
0.1436227709,
0.3456245661,
0.1947357506,
0.3810789883,
0.1793130934,
0.2992998958,
0.1381075531,
0.0127520356,
0.1077307239,
0.6457731128,
-0.0209300071,
-0.1307186484,
-0.1229431331,
-0.3637977242,
-0.234893769,
0.0491309874,
-0.3108318448,
0.1380217969,
0.0838790759,
0.0392891727,
-0.4141132236,
-0.2273482531,
0.2334342152,
-0.0790463313,
-0.3273979425,
-0.4119488001,
0.2217232138,
-0.0523257628,
-0.1161642894,
0.0675452352,
0.380084157,
-0.1981735229,
0.17885378,
0.4224417508,
0.679212749,
-0.358956933,
0.0781863481,
0.1326884031,
0.0002007335,
0.3454468548,
0.1435301751,
0.1005205512,
-0.6070395708,
0.0357896239,
-0.0309855454,
-0.177086249,
-0.1437163353,
-0.0286892466,
-0.3284614086,
-0.2210588008,
0.0313082784,
0.2751148939,
-0.2847682834,
0.4140977263,
-0.1807778031,
-0.2084251344,
0.1361829042,
0.0359392986,
0.127897799,
0.6129821539,
0.1220614687,
0.0329463296,
-0.2541006207,
-0.3859805465,
-0.1389320195,
0.096148029,
-0.1959286779,
0.101078555,
0.1399154067,
-0.1529215276,
0.0752091706,
0.5738861561,
0.6691457033,
0.1494530439,
0.1169736013,
-0.1957572401,
0.2974544764,
0.1938554943,
-0.0434504561,
-0.0402524322,
0.0629057959,
0.2413101494,
-0.2347972691,
-0.239189297,
0.1737241149,
-0.2943580151,
-0.4648042023,
-0.2237488627,
-0.2652674615,
-0.3984828591,
0.4013696015,
-0.1159313396,
-0.2875410914,
-0.1351929009,
0.0114427228,
0.1781584173,
0.1493755877,
0.6839718223,
-0.2366018295,
-0.2745063305,
-0.0755616277,
0.2371228188,
0.1613748819,
0.185430333,
0.3100965619,
0.0506318212,
-0.1598341316,
-0.2896625996,
0.4080943167,
0.1270557046,
-0.6538041234,
0.1584935188,
0.0069573335,
0.1260240078,
0.1320848167,
0.4580088258,
0.0831546485,
0.304546684,
0.0452786162,
-0.4174902737,
-0.3791797161,
0.14218539,
0.1229513586,
0.1663134396,
-0.2781091928,
-0.1295074522,
0.237192452,
-0.0970914513,
-0.2319466472,
-0.2686060667,
-0.0118640512,
-0.0829753876,
0.2023101151,
-0.0000618941,
0.246958971,
0.0123416372,
0.119607687,
-0.3138860166,
-0.2301679999,
-0.046829395,
-0.0646982789,
0.1968929768,
-0.0667048395,
0.2460970879,
-0.3984274268,
-0.2937810123,
-0.0716150701,
-0.2857214212,
0.1225819141,
0.2313950509,
-0.1323326379,
0.3597551882,
0.0998113006,
0.1995749176,
-0.1428153664,
0.1152757555,
-0.1334346235,
-0.0616847314,
0.1036157086,
0.1160410345,
-0.0581946708,
-0.0126063973,
-0.3222412467,
0.2602236569,
0.1303786635,
-0.0295771547,
0.0631704777,
-0.3162483871,
0.1304636449,
0.1253680289,
0.2124866247,
0.4128774107,
0.0213230103,
-0.1599719524,
0.1262921542,
0.1095458791,
-0.0524811484,
-0.0774539709,
-0.1057519913,
0.4045767784,
0.1539438367,
0.5210469365,
-0.0272810534,
-0.0759403855,
-0.0039812475,
-0.1401821375,
0.0401140228,
-0.05535556,
0.0370167792,
0.7215253115,
0.0033209473,
0.023680076,
0.5608685017,
0.0468488298,
-0.3103268445,
0.3334859908,
0.0794758275,
0.2596439421,
-0.0594841391,
0.3316032588,
0.0038182661,
-0.240346238,
0.2577208877,
0.0598206073,
-0.318066299,
0.0827418566,
0.2135328948,
0.2427786887,
-0.0996309891,
0.0139415823,
-0.6906054616,
-0.0261761267,
-0.274320066,
-0.2494877279,
-0.3948240578,
-0.4349915385,
-0.1296161115,
-0.0516814999,
0.0653565153,
0.0837118849,
0.1000912338,
0.1421044171,
-0.0959615707,
-0.3503395021,
0.1130846143,
0.1265849024,
0.3152232468,
-0.2974817157,
0.1314499229,
0.2653689384,
0.1533066928,
0.0023726625,
0.3071098328,
0.2919716537,
0.3392053843,
0.0291712321,
0.2081514448,
-0.1007880419,
-0.1049738079,
-0.1104121357,
0.5324910879,
0.0612864047,
0.0125475284,
0.2630119622,
0.0473060682,
-0.0439804792,
-0.1078522801,
0.0949220881,
0.0566300675,
0.2469433099,
0.3780519664,
0.0062832814,
-0.2240938842,
0.1664493382,
0.2008965164,
-0.1284397542,
-0.2256352305,
0.0752759054,
0.2674503624,
0.0800942481,
-0.4431451261,
0.0444708206,
0.0107637905,
0.3973337412,
0.3050804734,
-0.2235716879,
-0.2529635131,
-0.1469859034,
-0.7591508031,
-0.0828499794,
-0.0884774178,
-0.1693407893,
-0.0722598881,
0.3721688986,
-0.003554333,
0.0900174677,
-0.0112860575,
-0.168304652,
-0.0287198499,
0.454161793,
-0.1920493841,
-0.1011465117,
-0.0437024273,
-0.0857815668,
-0.2175277919,
-0.4019392729,
0.2391231805,
-0.1568983495,
-0.0509432703,
0.0202916004,
0.4017065465,
0.166745469,
-0.1145084947,
0.1857395768,
0.4368844032,
0.5208126307,
0.0604052097,
0.0136407316,
-0.1431028545,
0.0854350626,
-0.0707808882,
0.2464942783,
0.1811535358,
0.3095547259,
0.0287800804,
0.0299922675,
-0.3235033453,
-0.0564060584,
0.2536708117,
-0.1377626956,
-0.0269035362,
0.1137025431,
-0.0217052922,
-0.317278564,
0.1229668632,
0.2679323554,
0.0417125821,
0.116805315,
-0.1234359592,
-0.228472203,
0.0967697501,
-0.2478918582,
0.0329243615,
-0.3760193586,
0.2189299017,
0.1571736932,
-0.0918696523,
-0.2250888646,
0.3122610152,
0.3311513662,
-0.1604463309,
0.0366788134,
0.1225565821,
-0.0565134361,
0.25550282,
-0.0898033828,
0.1513250917,
0.0428156853,
-0.0526724681,
0.3032370806,
-0.1087276787
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Hey @lhoestq, thank you so much for the opportunity.
Although I haven't had much experience with the HF Datasets code, after a careful look at how the `ArrowWriter` functions, I think we can implement this as follows:
1. First, we would have to update the `ArrowWriter.write()` function here:
https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L296
so that it accepts an additional argument `key` which would be appended along with the example here after hashing.
2. Then, we would need to create a `Hasher` class which will take the key as its input and return a hash for it (We might need to use some hash salt which can be passed to the ArrowWriter.writer() with value equal to the `split_name` for differentiating between same keys of different splits)
We can use the `hashlib.md5` function for hashing which will conert each key to its byte code before hashing (depending on the data type of the key) **Thus, the `key` type will be verified here**.
3. Now, we would have to edit this
https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L257
so that it iterates over each `(hash, example)` pair (sorted according to hash). We can then simply **check whether each hash is different from the previous hash** (since they will be sorted)
However, since I'm not very familiar with how the data is being written on disk in the form of a table, I might need some guidance for Step 3.
Please let me know your thought on this. Thanks! | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 235 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Hey @lhoestq, thank you so much for the opportunity.
Although I haven't had much experience with the HF Datasets code, after a careful look at how the `ArrowWriter` functions, I think we can implement this as follows:
1. First, we would have to update the `ArrowWriter.write()` function here:
https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L296
so that it accepts an additional argument `key` which would be appended along with the example here after hashing.
2. Then, we would need to create a `Hasher` class which will take the key as its input and return a hash for it (We might need to use some hash salt which can be passed to the ArrowWriter.writer() with value equal to the `split_name` for differentiating between same keys of different splits)
We can use the `hashlib.md5` function for hashing which will conert each key to its byte code before hashing (depending on the data type of the key) **Thus, the `key` type will be verified here**.
3. Now, we would have to edit this
https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L257
so that it iterates over each `(hash, example)` pair (sorted according to hash). We can then simply **check whether each hash is different from the previous hash** (since they will be sorted)
However, since I'm not very familiar with how the data is being written on disk in the form of a table, I might need some guidance for Step 3.
Please let me know your thought on this. Thanks! | [
0.0275367573,
-0.2159305364,
0.0291702896,
0.4762759805,
0.0684194565,
-0.2363621742,
0.4168981612,
0.0804125518,
0.4312435091,
0.1339117885,
0.1672191322,
0.3502570093,
-0.0206804257,
0.206516102,
-0.0032006167,
0.4027806818,
0.0770775974,
0.0507337637,
-0.3874770999,
-0.1746382117,
-0.5882228017,
0.0452297106,
-0.1532146335,
-0.0614638589,
-0.1678527296,
0.1618545502,
-0.0681425184,
-0.0138255209,
-0.1972760558,
-0.4447281659,
0.2861762643,
0.3954279125,
-0.1313848197,
0.3610022962,
-0.0001243995,
-0.0313455164,
0.0754738376,
-0.1916625053,
-0.5255250335,
0.026202634,
-0.1937692165,
0.09500245,
-0.0176382903,
-0.5688119531,
-0.0537752733,
-0.1629761457,
-0.0972570851,
-0.4674585462,
0.2114742696,
0.2158978432,
0.0896027088,
0.4042153358,
0.3006412983,
0.204203099,
0.2016511112,
0.6070532203,
-0.2093219757,
-0.3547793031,
0.0443221107,
0.3141502738,
0.0819109678,
0.177616477,
0.060621798,
-0.1701101959,
0.2006858885,
0.1464149207,
-0.2246277481,
-0.323405087,
-0.0920047909,
0.3267405331,
0.3529067636,
-0.1715485305,
-0.3823952377,
-0.3127988577,
-0.031310115,
0.1885318607,
0.4732133448,
0.1420392096,
-0.3297614455,
0.004291296,
-0.2719512284,
0.3002656102,
-0.0179661363,
-0.0041727591,
0.258790344,
0.1244734898,
-0.0329473801,
0.0638201535,
0.2017904073,
-0.1953787059,
-0.1708808243,
-0.4019608498,
0.0959564894,
0.3071313202,
-0.1999059767,
-0.2576292753,
0.2660216689,
0.1940440983,
0.4387062788,
0.0169974007,
-0.0074184779,
0.0199900232,
-0.1039314717,
-0.1370510608,
-0.052976761,
0.2784973383,
0.1445690989,
0.0533139445,
0.4216778576,
-0.0334115028,
-0.1720717847,
0.0693689361,
-0.0535319448,
0.0950192511,
0.4306458533,
0.2696842849,
0.3355063498,
0.0252514184,
-0.1482147872,
0.0974797681,
-0.1257558763,
-0.2656872272,
0.2667301893,
0.3143822253,
-0.0797204226,
0.09894339,
-0.1258906126,
0.0694412291,
-0.3220944405,
-0.0343440585,
-0.085337922,
-0.149642095,
-0.0802806243,
-0.0657496005,
0.3642802238,
-0.3379720747,
0.0242794603,
0.2694472671,
-0.2059152275,
-0.2884233594,
-0.1518756896,
-0.0767865777,
0.5315925479,
0.2941077948,
-0.1158167347,
0.0240071565,
0.0686461404,
-0.4160591066,
-0.3097438514,
0.3407131732,
-0.2412343174,
-0.1555794924,
0.2009788752,
0.0987635702,
-0.3604650795,
-0.1261387467,
-0.130660668,
-0.0645980015,
0.3372377753,
0.2071814984,
0.0784949139,
-0.1708254516,
0.1355779767,
-0.4528720081,
0.2073255628,
0.891407907,
-0.1023141891,
-0.0063827261,
-0.152642101,
-0.0278965347,
0.1243740916,
0.3553084731,
-0.0161852501,
0.3325899243,
-0.3431202173,
0.0928568393,
0.171664387,
-0.1076283157,
-0.2139099389,
0.012115512,
0.1867587715,
0.0967979208,
0.5034435391,
0.2218378782,
0.268566668,
-0.0544426367,
-0.2298943847,
0.0698376223,
0.0156063978,
0.060203366,
-0.2132327408,
-0.1308510602,
0.0318854861,
0.0194858983,
-0.0369517766,
0.2195640653,
0.1360975057,
-0.2552813292,
0.0255508348,
-0.2306272388,
0.0509530455,
-0.0563533045,
0.16233325,
0.0917919874,
0.0456482396,
0.4361871779,
-0.4905917346,
0.223052457,
-0.0022499934,
0.1985981762,
-0.4391953647,
-0.2743708491,
-0.0583683662,
0.233192578,
-0.3910269141,
0.1591252089,
0.0221544504,
0.3127869666,
0.313372016,
0.2550626993,
-0.0731581599,
0.0802614465,
-0.0975415185,
0.1954382658,
-0.3723433018,
0.0034483448,
-0.0711762607,
0.0683824942,
-0.0470243767,
0.2644086182,
0.1033376008,
-0.1461704075,
-0.0429863036,
0.2023592442,
0.2752099335,
-0.0221164487,
0.0455039106,
0.3107892573,
0.2325394154,
-0.0491348989,
-0.0383990295,
0.1895339936,
0.1686584949,
0.0750721097,
-0.2943840623,
0.8053556681,
-0.2581630349,
0.0285354182,
-0.002302289,
-0.0071977302,
0.0217749849,
-0.1347506642,
-0.136598289,
-0.188443929,
-0.0732934624,
-0.0163169429,
0.1072861999,
0.4089408219,
-0.2961964011,
0.1576383859,
0.7058495879,
0.0941349566,
0.2832790017,
-0.032123372,
0.1921659559,
-0.0808991343,
-0.2282803506,
0.3368209302,
0.1522256136,
0.1965064853,
0.118586123,
-0.3717748523,
-0.0730495229,
-0.1460592151,
0.0427721776,
-0.1891167164,
-0.3544771075,
0.3523737788,
-0.3063009679,
-0.1038097441,
-0.5338435769,
0.2326878011,
0.1194282621,
0.251612246,
-0.5340342522,
-0.2392491996,
-0.1169462949,
-0.0837990195,
-0.228394866,
-0.1795801818,
-0.0798715651,
-0.3404611349,
0.1645959318,
0.0483223759,
-0.0415060148,
0.2251761556,
-0.0276002549,
0.1776853949,
0.0363353416,
-0.5385169387,
-0.4368277192,
0.0511805899,
-0.1454135925,
-0.0151515678,
0.248191148,
-0.1409252137,
0.3679049015,
-0.3222298622,
0.2253864557,
-0.2745194137,
-0.301422447,
0.0428631417,
-0.15850842,
0.119652167,
-0.0956907272,
-0.0779616684,
-0.0854471251,
-0.0822698623,
0.2423252016,
-0.2479200512,
-0.5795608759,
0.2682211995,
0.0698500276,
-0.1878862381,
-0.2038373947,
-0.5165555477,
-0.0041084085,
0.0617714971,
0.1320421696,
-0.0713652372,
0.1752529442,
0.046107702,
0.1794478595,
-0.1891894639,
0.0000352226,
-0.0443068668,
-0.2693848014,
-0.3226260543,
0.6126976013,
-0.0839338303,
-0.2482607961,
-0.0997936875,
-0.1879332811,
-0.2220842838,
0.1487161368,
-0.3126060069,
0.1589481682,
-0.5614319444,
0.6340061426,
0.2777656615,
0.2941865027,
0.4636283815,
0.0964576975,
0.015165031,
-0.2317610234,
0.0259327069,
0.3365900517,
-0.014384686,
0.2851171792,
0.1721882373,
0.2982103825,
-0.2947058678,
0.4157006443,
0.3359111249,
-0.1027194113,
0.3535642624,
-0.152692154,
0.3624250591,
0.0208123643,
-0.3244894743,
-0.0466853306,
0.1976602674,
0.1448144168,
0.1876152158,
0.0363311246,
0.3886360526,
-0.1072059348,
0.4754825234,
-0.7206187248,
-0.3073938787,
0.0303061698,
-0.1915811747,
0.239602983,
0.0085609332,
0.3000762463,
-0.1423637718,
-0.240300104,
-0.2210788876,
0.3997721672,
0.4897814691,
-0.0650008023,
-0.4595609009,
-0.0350507498,
-0.5776281953,
0.0720781535,
-0.034360677,
0.2558517158,
0.0583172217,
-0.2912877202,
0.1583035588,
-0.1152782515,
0.4106993973,
-0.2006324977,
0.0915496573,
-0.1241661608,
0.1059208661,
-0.1465411484,
0.074377358,
-0.1692646444,
-0.1423260421,
-0.1802764088,
0.5174466372,
-0.5598745346,
-0.1423892677,
0.0348060727,
-0.0109510385,
-0.160813719,
-0.4294214249,
-0.4368859529,
-0.1710218191,
-0.1745036989,
0.1889981478,
-0.0279019177,
0.1397202611,
-0.5259868503,
-0.0763651505,
-0.200700745,
0.1436227709,
0.3456245661,
0.1947357506,
0.3810789883,
0.1793130934,
0.2992998958,
0.1381075531,
0.0127520356,
0.1077307239,
0.6457731128,
-0.0209300071,
-0.1307186484,
-0.1229431331,
-0.3637977242,
-0.234893769,
0.0491309874,
-0.3108318448,
0.1380217969,
0.0838790759,
0.0392891727,
-0.4141132236,
-0.2273482531,
0.2334342152,
-0.0790463313,
-0.3273979425,
-0.4119488001,
0.2217232138,
-0.0523257628,
-0.1161642894,
0.0675452352,
0.380084157,
-0.1981735229,
0.17885378,
0.4224417508,
0.679212749,
-0.358956933,
0.0781863481,
0.1326884031,
0.0002007335,
0.3454468548,
0.1435301751,
0.1005205512,
-0.6070395708,
0.0357896239,
-0.0309855454,
-0.177086249,
-0.1437163353,
-0.0286892466,
-0.3284614086,
-0.2210588008,
0.0313082784,
0.2751148939,
-0.2847682834,
0.4140977263,
-0.1807778031,
-0.2084251344,
0.1361829042,
0.0359392986,
0.127897799,
0.6129821539,
0.1220614687,
0.0329463296,
-0.2541006207,
-0.3859805465,
-0.1389320195,
0.096148029,
-0.1959286779,
0.101078555,
0.1399154067,
-0.1529215276,
0.0752091706,
0.5738861561,
0.6691457033,
0.1494530439,
0.1169736013,
-0.1957572401,
0.2974544764,
0.1938554943,
-0.0434504561,
-0.0402524322,
0.0629057959,
0.2413101494,
-0.2347972691,
-0.239189297,
0.1737241149,
-0.2943580151,
-0.4648042023,
-0.2237488627,
-0.2652674615,
-0.3984828591,
0.4013696015,
-0.1159313396,
-0.2875410914,
-0.1351929009,
0.0114427228,
0.1781584173,
0.1493755877,
0.6839718223,
-0.2366018295,
-0.2745063305,
-0.0755616277,
0.2371228188,
0.1613748819,
0.185430333,
0.3100965619,
0.0506318212,
-0.1598341316,
-0.2896625996,
0.4080943167,
0.1270557046,
-0.6538041234,
0.1584935188,
0.0069573335,
0.1260240078,
0.1320848167,
0.4580088258,
0.0831546485,
0.304546684,
0.0452786162,
-0.4174902737,
-0.3791797161,
0.14218539,
0.1229513586,
0.1663134396,
-0.2781091928,
-0.1295074522,
0.237192452,
-0.0970914513,
-0.2319466472,
-0.2686060667,
-0.0118640512,
-0.0829753876,
0.2023101151,
-0.0000618941,
0.246958971,
0.0123416372,
0.119607687,
-0.3138860166,
-0.2301679999,
-0.046829395,
-0.0646982789,
0.1968929768,
-0.0667048395,
0.2460970879,
-0.3984274268,
-0.2937810123,
-0.0716150701,
-0.2857214212,
0.1225819141,
0.2313950509,
-0.1323326379,
0.3597551882,
0.0998113006,
0.1995749176,
-0.1428153664,
0.1152757555,
-0.1334346235,
-0.0616847314,
0.1036157086,
0.1160410345,
-0.0581946708,
-0.0126063973,
-0.3222412467,
0.2602236569,
0.1303786635,
-0.0295771547,
0.0631704777,
-0.3162483871,
0.1304636449,
0.1253680289,
0.2124866247,
0.4128774107,
0.0213230103,
-0.1599719524,
0.1262921542,
0.1095458791,
-0.0524811484,
-0.0774539709,
-0.1057519913,
0.4045767784,
0.1539438367,
0.5210469365,
-0.0272810534,
-0.0759403855,
-0.0039812475,
-0.1401821375,
0.0401140228,
-0.05535556,
0.0370167792,
0.7215253115,
0.0033209473,
0.023680076,
0.5608685017,
0.0468488298,
-0.3103268445,
0.3334859908,
0.0794758275,
0.2596439421,
-0.0594841391,
0.3316032588,
0.0038182661,
-0.240346238,
0.2577208877,
0.0598206073,
-0.318066299,
0.0827418566,
0.2135328948,
0.2427786887,
-0.0996309891,
0.0139415823,
-0.6906054616,
-0.0261761267,
-0.274320066,
-0.2494877279,
-0.3948240578,
-0.4349915385,
-0.1296161115,
-0.0516814999,
0.0653565153,
0.0837118849,
0.1000912338,
0.1421044171,
-0.0959615707,
-0.3503395021,
0.1130846143,
0.1265849024,
0.3152232468,
-0.2974817157,
0.1314499229,
0.2653689384,
0.1533066928,
0.0023726625,
0.3071098328,
0.2919716537,
0.3392053843,
0.0291712321,
0.2081514448,
-0.1007880419,
-0.1049738079,
-0.1104121357,
0.5324910879,
0.0612864047,
0.0125475284,
0.2630119622,
0.0473060682,
-0.0439804792,
-0.1078522801,
0.0949220881,
0.0566300675,
0.2469433099,
0.3780519664,
0.0062832814,
-0.2240938842,
0.1664493382,
0.2008965164,
-0.1284397542,
-0.2256352305,
0.0752759054,
0.2674503624,
0.0800942481,
-0.4431451261,
0.0444708206,
0.0107637905,
0.3973337412,
0.3050804734,
-0.2235716879,
-0.2529635131,
-0.1469859034,
-0.7591508031,
-0.0828499794,
-0.0884774178,
-0.1693407893,
-0.0722598881,
0.3721688986,
-0.003554333,
0.0900174677,
-0.0112860575,
-0.168304652,
-0.0287198499,
0.454161793,
-0.1920493841,
-0.1011465117,
-0.0437024273,
-0.0857815668,
-0.2175277919,
-0.4019392729,
0.2391231805,
-0.1568983495,
-0.0509432703,
0.0202916004,
0.4017065465,
0.166745469,
-0.1145084947,
0.1857395768,
0.4368844032,
0.5208126307,
0.0604052097,
0.0136407316,
-0.1431028545,
0.0854350626,
-0.0707808882,
0.2464942783,
0.1811535358,
0.3095547259,
0.0287800804,
0.0299922675,
-0.3235033453,
-0.0564060584,
0.2536708117,
-0.1377626956,
-0.0269035362,
0.1137025431,
-0.0217052922,
-0.317278564,
0.1229668632,
0.2679323554,
0.0417125821,
0.116805315,
-0.1234359592,
-0.228472203,
0.0967697501,
-0.2478918582,
0.0329243615,
-0.3760193586,
0.2189299017,
0.1571736932,
-0.0918696523,
-0.2250888646,
0.3122610152,
0.3311513662,
-0.1604463309,
0.0366788134,
0.1225565821,
-0.0565134361,
0.25550282,
-0.0898033828,
0.1513250917,
0.0428156853,
-0.0526724681,
0.3032370806,
-0.1087276787
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Interesting !
We keep the dataset sorted in the order examples are generated by the builder (we expect the dataset builders to generate examples in deterministic order). Therefore I don't think we should shuffle the examples with the hashing. Let me know what you think.
Other that that, I really like the idea of checking for keys duplicates in `write_examples_on_file` :)
This looks like a great plan ! Feel free to open a PR and ping me if you have questions or if I can help
| The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 86 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Interesting !
We keep the dataset sorted in the order examples are generated by the builder (we expect the dataset builders to generate examples in deterministic order). Therefore I don't think we should shuffle the examples with the hashing. Let me know what you think.
Other that that, I really like the idea of checking for keys duplicates in `write_examples_on_file` :)
This looks like a great plan ! Feel free to open a PR and ping me if you have questions or if I can help
| [
0.0275367573,
-0.2159305364,
0.0291702896,
0.4762759805,
0.0684194565,
-0.2363621742,
0.4168981612,
0.0804125518,
0.4312435091,
0.1339117885,
0.1672191322,
0.3502570093,
-0.0206804257,
0.206516102,
-0.0032006167,
0.4027806818,
0.0770775974,
0.0507337637,
-0.3874770999,
-0.1746382117,
-0.5882228017,
0.0452297106,
-0.1532146335,
-0.0614638589,
-0.1678527296,
0.1618545502,
-0.0681425184,
-0.0138255209,
-0.1972760558,
-0.4447281659,
0.2861762643,
0.3954279125,
-0.1313848197,
0.3610022962,
-0.0001243995,
-0.0313455164,
0.0754738376,
-0.1916625053,
-0.5255250335,
0.026202634,
-0.1937692165,
0.09500245,
-0.0176382903,
-0.5688119531,
-0.0537752733,
-0.1629761457,
-0.0972570851,
-0.4674585462,
0.2114742696,
0.2158978432,
0.0896027088,
0.4042153358,
0.3006412983,
0.204203099,
0.2016511112,
0.6070532203,
-0.2093219757,
-0.3547793031,
0.0443221107,
0.3141502738,
0.0819109678,
0.177616477,
0.060621798,
-0.1701101959,
0.2006858885,
0.1464149207,
-0.2246277481,
-0.323405087,
-0.0920047909,
0.3267405331,
0.3529067636,
-0.1715485305,
-0.3823952377,
-0.3127988577,
-0.031310115,
0.1885318607,
0.4732133448,
0.1420392096,
-0.3297614455,
0.004291296,
-0.2719512284,
0.3002656102,
-0.0179661363,
-0.0041727591,
0.258790344,
0.1244734898,
-0.0329473801,
0.0638201535,
0.2017904073,
-0.1953787059,
-0.1708808243,
-0.4019608498,
0.0959564894,
0.3071313202,
-0.1999059767,
-0.2576292753,
0.2660216689,
0.1940440983,
0.4387062788,
0.0169974007,
-0.0074184779,
0.0199900232,
-0.1039314717,
-0.1370510608,
-0.052976761,
0.2784973383,
0.1445690989,
0.0533139445,
0.4216778576,
-0.0334115028,
-0.1720717847,
0.0693689361,
-0.0535319448,
0.0950192511,
0.4306458533,
0.2696842849,
0.3355063498,
0.0252514184,
-0.1482147872,
0.0974797681,
-0.1257558763,
-0.2656872272,
0.2667301893,
0.3143822253,
-0.0797204226,
0.09894339,
-0.1258906126,
0.0694412291,
-0.3220944405,
-0.0343440585,
-0.085337922,
-0.149642095,
-0.0802806243,
-0.0657496005,
0.3642802238,
-0.3379720747,
0.0242794603,
0.2694472671,
-0.2059152275,
-0.2884233594,
-0.1518756896,
-0.0767865777,
0.5315925479,
0.2941077948,
-0.1158167347,
0.0240071565,
0.0686461404,
-0.4160591066,
-0.3097438514,
0.3407131732,
-0.2412343174,
-0.1555794924,
0.2009788752,
0.0987635702,
-0.3604650795,
-0.1261387467,
-0.130660668,
-0.0645980015,
0.3372377753,
0.2071814984,
0.0784949139,
-0.1708254516,
0.1355779767,
-0.4528720081,
0.2073255628,
0.891407907,
-0.1023141891,
-0.0063827261,
-0.152642101,
-0.0278965347,
0.1243740916,
0.3553084731,
-0.0161852501,
0.3325899243,
-0.3431202173,
0.0928568393,
0.171664387,
-0.1076283157,
-0.2139099389,
0.012115512,
0.1867587715,
0.0967979208,
0.5034435391,
0.2218378782,
0.268566668,
-0.0544426367,
-0.2298943847,
0.0698376223,
0.0156063978,
0.060203366,
-0.2132327408,
-0.1308510602,
0.0318854861,
0.0194858983,
-0.0369517766,
0.2195640653,
0.1360975057,
-0.2552813292,
0.0255508348,
-0.2306272388,
0.0509530455,
-0.0563533045,
0.16233325,
0.0917919874,
0.0456482396,
0.4361871779,
-0.4905917346,
0.223052457,
-0.0022499934,
0.1985981762,
-0.4391953647,
-0.2743708491,
-0.0583683662,
0.233192578,
-0.3910269141,
0.1591252089,
0.0221544504,
0.3127869666,
0.313372016,
0.2550626993,
-0.0731581599,
0.0802614465,
-0.0975415185,
0.1954382658,
-0.3723433018,
0.0034483448,
-0.0711762607,
0.0683824942,
-0.0470243767,
0.2644086182,
0.1033376008,
-0.1461704075,
-0.0429863036,
0.2023592442,
0.2752099335,
-0.0221164487,
0.0455039106,
0.3107892573,
0.2325394154,
-0.0491348989,
-0.0383990295,
0.1895339936,
0.1686584949,
0.0750721097,
-0.2943840623,
0.8053556681,
-0.2581630349,
0.0285354182,
-0.002302289,
-0.0071977302,
0.0217749849,
-0.1347506642,
-0.136598289,
-0.188443929,
-0.0732934624,
-0.0163169429,
0.1072861999,
0.4089408219,
-0.2961964011,
0.1576383859,
0.7058495879,
0.0941349566,
0.2832790017,
-0.032123372,
0.1921659559,
-0.0808991343,
-0.2282803506,
0.3368209302,
0.1522256136,
0.1965064853,
0.118586123,
-0.3717748523,
-0.0730495229,
-0.1460592151,
0.0427721776,
-0.1891167164,
-0.3544771075,
0.3523737788,
-0.3063009679,
-0.1038097441,
-0.5338435769,
0.2326878011,
0.1194282621,
0.251612246,
-0.5340342522,
-0.2392491996,
-0.1169462949,
-0.0837990195,
-0.228394866,
-0.1795801818,
-0.0798715651,
-0.3404611349,
0.1645959318,
0.0483223759,
-0.0415060148,
0.2251761556,
-0.0276002549,
0.1776853949,
0.0363353416,
-0.5385169387,
-0.4368277192,
0.0511805899,
-0.1454135925,
-0.0151515678,
0.248191148,
-0.1409252137,
0.3679049015,
-0.3222298622,
0.2253864557,
-0.2745194137,
-0.301422447,
0.0428631417,
-0.15850842,
0.119652167,
-0.0956907272,
-0.0779616684,
-0.0854471251,
-0.0822698623,
0.2423252016,
-0.2479200512,
-0.5795608759,
0.2682211995,
0.0698500276,
-0.1878862381,
-0.2038373947,
-0.5165555477,
-0.0041084085,
0.0617714971,
0.1320421696,
-0.0713652372,
0.1752529442,
0.046107702,
0.1794478595,
-0.1891894639,
0.0000352226,
-0.0443068668,
-0.2693848014,
-0.3226260543,
0.6126976013,
-0.0839338303,
-0.2482607961,
-0.0997936875,
-0.1879332811,
-0.2220842838,
0.1487161368,
-0.3126060069,
0.1589481682,
-0.5614319444,
0.6340061426,
0.2777656615,
0.2941865027,
0.4636283815,
0.0964576975,
0.015165031,
-0.2317610234,
0.0259327069,
0.3365900517,
-0.014384686,
0.2851171792,
0.1721882373,
0.2982103825,
-0.2947058678,
0.4157006443,
0.3359111249,
-0.1027194113,
0.3535642624,
-0.152692154,
0.3624250591,
0.0208123643,
-0.3244894743,
-0.0466853306,
0.1976602674,
0.1448144168,
0.1876152158,
0.0363311246,
0.3886360526,
-0.1072059348,
0.4754825234,
-0.7206187248,
-0.3073938787,
0.0303061698,
-0.1915811747,
0.239602983,
0.0085609332,
0.3000762463,
-0.1423637718,
-0.240300104,
-0.2210788876,
0.3997721672,
0.4897814691,
-0.0650008023,
-0.4595609009,
-0.0350507498,
-0.5776281953,
0.0720781535,
-0.034360677,
0.2558517158,
0.0583172217,
-0.2912877202,
0.1583035588,
-0.1152782515,
0.4106993973,
-0.2006324977,
0.0915496573,
-0.1241661608,
0.1059208661,
-0.1465411484,
0.074377358,
-0.1692646444,
-0.1423260421,
-0.1802764088,
0.5174466372,
-0.5598745346,
-0.1423892677,
0.0348060727,
-0.0109510385,
-0.160813719,
-0.4294214249,
-0.4368859529,
-0.1710218191,
-0.1745036989,
0.1889981478,
-0.0279019177,
0.1397202611,
-0.5259868503,
-0.0763651505,
-0.200700745,
0.1436227709,
0.3456245661,
0.1947357506,
0.3810789883,
0.1793130934,
0.2992998958,
0.1381075531,
0.0127520356,
0.1077307239,
0.6457731128,
-0.0209300071,
-0.1307186484,
-0.1229431331,
-0.3637977242,
-0.234893769,
0.0491309874,
-0.3108318448,
0.1380217969,
0.0838790759,
0.0392891727,
-0.4141132236,
-0.2273482531,
0.2334342152,
-0.0790463313,
-0.3273979425,
-0.4119488001,
0.2217232138,
-0.0523257628,
-0.1161642894,
0.0675452352,
0.380084157,
-0.1981735229,
0.17885378,
0.4224417508,
0.679212749,
-0.358956933,
0.0781863481,
0.1326884031,
0.0002007335,
0.3454468548,
0.1435301751,
0.1005205512,
-0.6070395708,
0.0357896239,
-0.0309855454,
-0.177086249,
-0.1437163353,
-0.0286892466,
-0.3284614086,
-0.2210588008,
0.0313082784,
0.2751148939,
-0.2847682834,
0.4140977263,
-0.1807778031,
-0.2084251344,
0.1361829042,
0.0359392986,
0.127897799,
0.6129821539,
0.1220614687,
0.0329463296,
-0.2541006207,
-0.3859805465,
-0.1389320195,
0.096148029,
-0.1959286779,
0.101078555,
0.1399154067,
-0.1529215276,
0.0752091706,
0.5738861561,
0.6691457033,
0.1494530439,
0.1169736013,
-0.1957572401,
0.2974544764,
0.1938554943,
-0.0434504561,
-0.0402524322,
0.0629057959,
0.2413101494,
-0.2347972691,
-0.239189297,
0.1737241149,
-0.2943580151,
-0.4648042023,
-0.2237488627,
-0.2652674615,
-0.3984828591,
0.4013696015,
-0.1159313396,
-0.2875410914,
-0.1351929009,
0.0114427228,
0.1781584173,
0.1493755877,
0.6839718223,
-0.2366018295,
-0.2745063305,
-0.0755616277,
0.2371228188,
0.1613748819,
0.185430333,
0.3100965619,
0.0506318212,
-0.1598341316,
-0.2896625996,
0.4080943167,
0.1270557046,
-0.6538041234,
0.1584935188,
0.0069573335,
0.1260240078,
0.1320848167,
0.4580088258,
0.0831546485,
0.304546684,
0.0452786162,
-0.4174902737,
-0.3791797161,
0.14218539,
0.1229513586,
0.1663134396,
-0.2781091928,
-0.1295074522,
0.237192452,
-0.0970914513,
-0.2319466472,
-0.2686060667,
-0.0118640512,
-0.0829753876,
0.2023101151,
-0.0000618941,
0.246958971,
0.0123416372,
0.119607687,
-0.3138860166,
-0.2301679999,
-0.046829395,
-0.0646982789,
0.1968929768,
-0.0667048395,
0.2460970879,
-0.3984274268,
-0.2937810123,
-0.0716150701,
-0.2857214212,
0.1225819141,
0.2313950509,
-0.1323326379,
0.3597551882,
0.0998113006,
0.1995749176,
-0.1428153664,
0.1152757555,
-0.1334346235,
-0.0616847314,
0.1036157086,
0.1160410345,
-0.0581946708,
-0.0126063973,
-0.3222412467,
0.2602236569,
0.1303786635,
-0.0295771547,
0.0631704777,
-0.3162483871,
0.1304636449,
0.1253680289,
0.2124866247,
0.4128774107,
0.0213230103,
-0.1599719524,
0.1262921542,
0.1095458791,
-0.0524811484,
-0.0774539709,
-0.1057519913,
0.4045767784,
0.1539438367,
0.5210469365,
-0.0272810534,
-0.0759403855,
-0.0039812475,
-0.1401821375,
0.0401140228,
-0.05535556,
0.0370167792,
0.7215253115,
0.0033209473,
0.023680076,
0.5608685017,
0.0468488298,
-0.3103268445,
0.3334859908,
0.0794758275,
0.2596439421,
-0.0594841391,
0.3316032588,
0.0038182661,
-0.240346238,
0.2577208877,
0.0598206073,
-0.318066299,
0.0827418566,
0.2135328948,
0.2427786887,
-0.0996309891,
0.0139415823,
-0.6906054616,
-0.0261761267,
-0.274320066,
-0.2494877279,
-0.3948240578,
-0.4349915385,
-0.1296161115,
-0.0516814999,
0.0653565153,
0.0837118849,
0.1000912338,
0.1421044171,
-0.0959615707,
-0.3503395021,
0.1130846143,
0.1265849024,
0.3152232468,
-0.2974817157,
0.1314499229,
0.2653689384,
0.1533066928,
0.0023726625,
0.3071098328,
0.2919716537,
0.3392053843,
0.0291712321,
0.2081514448,
-0.1007880419,
-0.1049738079,
-0.1104121357,
0.5324910879,
0.0612864047,
0.0125475284,
0.2630119622,
0.0473060682,
-0.0439804792,
-0.1078522801,
0.0949220881,
0.0566300675,
0.2469433099,
0.3780519664,
0.0062832814,
-0.2240938842,
0.1664493382,
0.2008965164,
-0.1284397542,
-0.2256352305,
0.0752759054,
0.2674503624,
0.0800942481,
-0.4431451261,
0.0444708206,
0.0107637905,
0.3973337412,
0.3050804734,
-0.2235716879,
-0.2529635131,
-0.1469859034,
-0.7591508031,
-0.0828499794,
-0.0884774178,
-0.1693407893,
-0.0722598881,
0.3721688986,
-0.003554333,
0.0900174677,
-0.0112860575,
-0.168304652,
-0.0287198499,
0.454161793,
-0.1920493841,
-0.1011465117,
-0.0437024273,
-0.0857815668,
-0.2175277919,
-0.4019392729,
0.2391231805,
-0.1568983495,
-0.0509432703,
0.0202916004,
0.4017065465,
0.166745469,
-0.1145084947,
0.1857395768,
0.4368844032,
0.5208126307,
0.0604052097,
0.0136407316,
-0.1431028545,
0.0854350626,
-0.0707808882,
0.2464942783,
0.1811535358,
0.3095547259,
0.0287800804,
0.0299922675,
-0.3235033453,
-0.0564060584,
0.2536708117,
-0.1377626956,
-0.0269035362,
0.1137025431,
-0.0217052922,
-0.317278564,
0.1229668632,
0.2679323554,
0.0417125821,
0.116805315,
-0.1234359592,
-0.228472203,
0.0967697501,
-0.2478918582,
0.0329243615,
-0.3760193586,
0.2189299017,
0.1571736932,
-0.0918696523,
-0.2250888646,
0.3122610152,
0.3311513662,
-0.1604463309,
0.0366788134,
0.1225565821,
-0.0565134361,
0.25550282,
-0.0898033828,
0.1513250917,
0.0428156853,
-0.0526724681,
0.3032370806,
-0.1087276787
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | @lhoestq I'm glad you liked the idea!
I think that since the keys will be unique and deterministic in the nature themselves, so even if we shuffle the examples according to the hash, a deterministic order would still be maintained (as the keys will always have the same hash, whenever the dataset is generated).
And since, we are not dealing with time series data (which would require the data to be in original order), I don't think the order of examples would matter much, as long as the order is deterministic and constant for all users.
I think that this is also what was originally envisioned as mentioned in the documentation here:
https://github.com/huggingface/datasets/blob/6775661b19d2ec339784f3d84553a3996a1d86c3/src/datasets/builder.py#L973
Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples.
Let me know your thoughts in it! I would be opening a PR soon :) | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 171 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
@lhoestq I'm glad you liked the idea!
I think that since the keys will be unique and deterministic in the nature themselves, so even if we shuffle the examples according to the hash, a deterministic order would still be maintained (as the keys will always have the same hash, whenever the dataset is generated).
And since, we are not dealing with time series data (which would require the data to be in original order), I don't think the order of examples would matter much, as long as the order is deterministic and constant for all users.
I think that this is also what was originally envisioned as mentioned in the documentation here:
https://github.com/huggingface/datasets/blob/6775661b19d2ec339784f3d84553a3996a1d86c3/src/datasets/builder.py#L973
Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples.
Let me know your thoughts in it! I would be opening a PR soon :) | [
0.0275367573,
-0.2159305364,
0.0291702896,
0.4762759805,
0.0684194565,
-0.2363621742,
0.4168981612,
0.0804125518,
0.4312435091,
0.1339117885,
0.1672191322,
0.3502570093,
-0.0206804257,
0.206516102,
-0.0032006167,
0.4027806818,
0.0770775974,
0.0507337637,
-0.3874770999,
-0.1746382117,
-0.5882228017,
0.0452297106,
-0.1532146335,
-0.0614638589,
-0.1678527296,
0.1618545502,
-0.0681425184,
-0.0138255209,
-0.1972760558,
-0.4447281659,
0.2861762643,
0.3954279125,
-0.1313848197,
0.3610022962,
-0.0001243995,
-0.0313455164,
0.0754738376,
-0.1916625053,
-0.5255250335,
0.026202634,
-0.1937692165,
0.09500245,
-0.0176382903,
-0.5688119531,
-0.0537752733,
-0.1629761457,
-0.0972570851,
-0.4674585462,
0.2114742696,
0.2158978432,
0.0896027088,
0.4042153358,
0.3006412983,
0.204203099,
0.2016511112,
0.6070532203,
-0.2093219757,
-0.3547793031,
0.0443221107,
0.3141502738,
0.0819109678,
0.177616477,
0.060621798,
-0.1701101959,
0.2006858885,
0.1464149207,
-0.2246277481,
-0.323405087,
-0.0920047909,
0.3267405331,
0.3529067636,
-0.1715485305,
-0.3823952377,
-0.3127988577,
-0.031310115,
0.1885318607,
0.4732133448,
0.1420392096,
-0.3297614455,
0.004291296,
-0.2719512284,
0.3002656102,
-0.0179661363,
-0.0041727591,
0.258790344,
0.1244734898,
-0.0329473801,
0.0638201535,
0.2017904073,
-0.1953787059,
-0.1708808243,
-0.4019608498,
0.0959564894,
0.3071313202,
-0.1999059767,
-0.2576292753,
0.2660216689,
0.1940440983,
0.4387062788,
0.0169974007,
-0.0074184779,
0.0199900232,
-0.1039314717,
-0.1370510608,
-0.052976761,
0.2784973383,
0.1445690989,
0.0533139445,
0.4216778576,
-0.0334115028,
-0.1720717847,
0.0693689361,
-0.0535319448,
0.0950192511,
0.4306458533,
0.2696842849,
0.3355063498,
0.0252514184,
-0.1482147872,
0.0974797681,
-0.1257558763,
-0.2656872272,
0.2667301893,
0.3143822253,
-0.0797204226,
0.09894339,
-0.1258906126,
0.0694412291,
-0.3220944405,
-0.0343440585,
-0.085337922,
-0.149642095,
-0.0802806243,
-0.0657496005,
0.3642802238,
-0.3379720747,
0.0242794603,
0.2694472671,
-0.2059152275,
-0.2884233594,
-0.1518756896,
-0.0767865777,
0.5315925479,
0.2941077948,
-0.1158167347,
0.0240071565,
0.0686461404,
-0.4160591066,
-0.3097438514,
0.3407131732,
-0.2412343174,
-0.1555794924,
0.2009788752,
0.0987635702,
-0.3604650795,
-0.1261387467,
-0.130660668,
-0.0645980015,
0.3372377753,
0.2071814984,
0.0784949139,
-0.1708254516,
0.1355779767,
-0.4528720081,
0.2073255628,
0.891407907,
-0.1023141891,
-0.0063827261,
-0.152642101,
-0.0278965347,
0.1243740916,
0.3553084731,
-0.0161852501,
0.3325899243,
-0.3431202173,
0.0928568393,
0.171664387,
-0.1076283157,
-0.2139099389,
0.012115512,
0.1867587715,
0.0967979208,
0.5034435391,
0.2218378782,
0.268566668,
-0.0544426367,
-0.2298943847,
0.0698376223,
0.0156063978,
0.060203366,
-0.2132327408,
-0.1308510602,
0.0318854861,
0.0194858983,
-0.0369517766,
0.2195640653,
0.1360975057,
-0.2552813292,
0.0255508348,
-0.2306272388,
0.0509530455,
-0.0563533045,
0.16233325,
0.0917919874,
0.0456482396,
0.4361871779,
-0.4905917346,
0.223052457,
-0.0022499934,
0.1985981762,
-0.4391953647,
-0.2743708491,
-0.0583683662,
0.233192578,
-0.3910269141,
0.1591252089,
0.0221544504,
0.3127869666,
0.313372016,
0.2550626993,
-0.0731581599,
0.0802614465,
-0.0975415185,
0.1954382658,
-0.3723433018,
0.0034483448,
-0.0711762607,
0.0683824942,
-0.0470243767,
0.2644086182,
0.1033376008,
-0.1461704075,
-0.0429863036,
0.2023592442,
0.2752099335,
-0.0221164487,
0.0455039106,
0.3107892573,
0.2325394154,
-0.0491348989,
-0.0383990295,
0.1895339936,
0.1686584949,
0.0750721097,
-0.2943840623,
0.8053556681,
-0.2581630349,
0.0285354182,
-0.002302289,
-0.0071977302,
0.0217749849,
-0.1347506642,
-0.136598289,
-0.188443929,
-0.0732934624,
-0.0163169429,
0.1072861999,
0.4089408219,
-0.2961964011,
0.1576383859,
0.7058495879,
0.0941349566,
0.2832790017,
-0.032123372,
0.1921659559,
-0.0808991343,
-0.2282803506,
0.3368209302,
0.1522256136,
0.1965064853,
0.118586123,
-0.3717748523,
-0.0730495229,
-0.1460592151,
0.0427721776,
-0.1891167164,
-0.3544771075,
0.3523737788,
-0.3063009679,
-0.1038097441,
-0.5338435769,
0.2326878011,
0.1194282621,
0.251612246,
-0.5340342522,
-0.2392491996,
-0.1169462949,
-0.0837990195,
-0.228394866,
-0.1795801818,
-0.0798715651,
-0.3404611349,
0.1645959318,
0.0483223759,
-0.0415060148,
0.2251761556,
-0.0276002549,
0.1776853949,
0.0363353416,
-0.5385169387,
-0.4368277192,
0.0511805899,
-0.1454135925,
-0.0151515678,
0.248191148,
-0.1409252137,
0.3679049015,
-0.3222298622,
0.2253864557,
-0.2745194137,
-0.301422447,
0.0428631417,
-0.15850842,
0.119652167,
-0.0956907272,
-0.0779616684,
-0.0854471251,
-0.0822698623,
0.2423252016,
-0.2479200512,
-0.5795608759,
0.2682211995,
0.0698500276,
-0.1878862381,
-0.2038373947,
-0.5165555477,
-0.0041084085,
0.0617714971,
0.1320421696,
-0.0713652372,
0.1752529442,
0.046107702,
0.1794478595,
-0.1891894639,
0.0000352226,
-0.0443068668,
-0.2693848014,
-0.3226260543,
0.6126976013,
-0.0839338303,
-0.2482607961,
-0.0997936875,
-0.1879332811,
-0.2220842838,
0.1487161368,
-0.3126060069,
0.1589481682,
-0.5614319444,
0.6340061426,
0.2777656615,
0.2941865027,
0.4636283815,
0.0964576975,
0.015165031,
-0.2317610234,
0.0259327069,
0.3365900517,
-0.014384686,
0.2851171792,
0.1721882373,
0.2982103825,
-0.2947058678,
0.4157006443,
0.3359111249,
-0.1027194113,
0.3535642624,
-0.152692154,
0.3624250591,
0.0208123643,
-0.3244894743,
-0.0466853306,
0.1976602674,
0.1448144168,
0.1876152158,
0.0363311246,
0.3886360526,
-0.1072059348,
0.4754825234,
-0.7206187248,
-0.3073938787,
0.0303061698,
-0.1915811747,
0.239602983,
0.0085609332,
0.3000762463,
-0.1423637718,
-0.240300104,
-0.2210788876,
0.3997721672,
0.4897814691,
-0.0650008023,
-0.4595609009,
-0.0350507498,
-0.5776281953,
0.0720781535,
-0.034360677,
0.2558517158,
0.0583172217,
-0.2912877202,
0.1583035588,
-0.1152782515,
0.4106993973,
-0.2006324977,
0.0915496573,
-0.1241661608,
0.1059208661,
-0.1465411484,
0.074377358,
-0.1692646444,
-0.1423260421,
-0.1802764088,
0.5174466372,
-0.5598745346,
-0.1423892677,
0.0348060727,
-0.0109510385,
-0.160813719,
-0.4294214249,
-0.4368859529,
-0.1710218191,
-0.1745036989,
0.1889981478,
-0.0279019177,
0.1397202611,
-0.5259868503,
-0.0763651505,
-0.200700745,
0.1436227709,
0.3456245661,
0.1947357506,
0.3810789883,
0.1793130934,
0.2992998958,
0.1381075531,
0.0127520356,
0.1077307239,
0.6457731128,
-0.0209300071,
-0.1307186484,
-0.1229431331,
-0.3637977242,
-0.234893769,
0.0491309874,
-0.3108318448,
0.1380217969,
0.0838790759,
0.0392891727,
-0.4141132236,
-0.2273482531,
0.2334342152,
-0.0790463313,
-0.3273979425,
-0.4119488001,
0.2217232138,
-0.0523257628,
-0.1161642894,
0.0675452352,
0.380084157,
-0.1981735229,
0.17885378,
0.4224417508,
0.679212749,
-0.358956933,
0.0781863481,
0.1326884031,
0.0002007335,
0.3454468548,
0.1435301751,
0.1005205512,
-0.6070395708,
0.0357896239,
-0.0309855454,
-0.177086249,
-0.1437163353,
-0.0286892466,
-0.3284614086,
-0.2210588008,
0.0313082784,
0.2751148939,
-0.2847682834,
0.4140977263,
-0.1807778031,
-0.2084251344,
0.1361829042,
0.0359392986,
0.127897799,
0.6129821539,
0.1220614687,
0.0329463296,
-0.2541006207,
-0.3859805465,
-0.1389320195,
0.096148029,
-0.1959286779,
0.101078555,
0.1399154067,
-0.1529215276,
0.0752091706,
0.5738861561,
0.6691457033,
0.1494530439,
0.1169736013,
-0.1957572401,
0.2974544764,
0.1938554943,
-0.0434504561,
-0.0402524322,
0.0629057959,
0.2413101494,
-0.2347972691,
-0.239189297,
0.1737241149,
-0.2943580151,
-0.4648042023,
-0.2237488627,
-0.2652674615,
-0.3984828591,
0.4013696015,
-0.1159313396,
-0.2875410914,
-0.1351929009,
0.0114427228,
0.1781584173,
0.1493755877,
0.6839718223,
-0.2366018295,
-0.2745063305,
-0.0755616277,
0.2371228188,
0.1613748819,
0.185430333,
0.3100965619,
0.0506318212,
-0.1598341316,
-0.2896625996,
0.4080943167,
0.1270557046,
-0.6538041234,
0.1584935188,
0.0069573335,
0.1260240078,
0.1320848167,
0.4580088258,
0.0831546485,
0.304546684,
0.0452786162,
-0.4174902737,
-0.3791797161,
0.14218539,
0.1229513586,
0.1663134396,
-0.2781091928,
-0.1295074522,
0.237192452,
-0.0970914513,
-0.2319466472,
-0.2686060667,
-0.0118640512,
-0.0829753876,
0.2023101151,
-0.0000618941,
0.246958971,
0.0123416372,
0.119607687,
-0.3138860166,
-0.2301679999,
-0.046829395,
-0.0646982789,
0.1968929768,
-0.0667048395,
0.2460970879,
-0.3984274268,
-0.2937810123,
-0.0716150701,
-0.2857214212,
0.1225819141,
0.2313950509,
-0.1323326379,
0.3597551882,
0.0998113006,
0.1995749176,
-0.1428153664,
0.1152757555,
-0.1334346235,
-0.0616847314,
0.1036157086,
0.1160410345,
-0.0581946708,
-0.0126063973,
-0.3222412467,
0.2602236569,
0.1303786635,
-0.0295771547,
0.0631704777,
-0.3162483871,
0.1304636449,
0.1253680289,
0.2124866247,
0.4128774107,
0.0213230103,
-0.1599719524,
0.1262921542,
0.1095458791,
-0.0524811484,
-0.0774539709,
-0.1057519913,
0.4045767784,
0.1539438367,
0.5210469365,
-0.0272810534,
-0.0759403855,
-0.0039812475,
-0.1401821375,
0.0401140228,
-0.05535556,
0.0370167792,
0.7215253115,
0.0033209473,
0.023680076,
0.5608685017,
0.0468488298,
-0.3103268445,
0.3334859908,
0.0794758275,
0.2596439421,
-0.0594841391,
0.3316032588,
0.0038182661,
-0.240346238,
0.2577208877,
0.0598206073,
-0.318066299,
0.0827418566,
0.2135328948,
0.2427786887,
-0.0996309891,
0.0139415823,
-0.6906054616,
-0.0261761267,
-0.274320066,
-0.2494877279,
-0.3948240578,
-0.4349915385,
-0.1296161115,
-0.0516814999,
0.0653565153,
0.0837118849,
0.1000912338,
0.1421044171,
-0.0959615707,
-0.3503395021,
0.1130846143,
0.1265849024,
0.3152232468,
-0.2974817157,
0.1314499229,
0.2653689384,
0.1533066928,
0.0023726625,
0.3071098328,
0.2919716537,
0.3392053843,
0.0291712321,
0.2081514448,
-0.1007880419,
-0.1049738079,
-0.1104121357,
0.5324910879,
0.0612864047,
0.0125475284,
0.2630119622,
0.0473060682,
-0.0439804792,
-0.1078522801,
0.0949220881,
0.0566300675,
0.2469433099,
0.3780519664,
0.0062832814,
-0.2240938842,
0.1664493382,
0.2008965164,
-0.1284397542,
-0.2256352305,
0.0752759054,
0.2674503624,
0.0800942481,
-0.4431451261,
0.0444708206,
0.0107637905,
0.3973337412,
0.3050804734,
-0.2235716879,
-0.2529635131,
-0.1469859034,
-0.7591508031,
-0.0828499794,
-0.0884774178,
-0.1693407893,
-0.0722598881,
0.3721688986,
-0.003554333,
0.0900174677,
-0.0112860575,
-0.168304652,
-0.0287198499,
0.454161793,
-0.1920493841,
-0.1011465117,
-0.0437024273,
-0.0857815668,
-0.2175277919,
-0.4019392729,
0.2391231805,
-0.1568983495,
-0.0509432703,
0.0202916004,
0.4017065465,
0.166745469,
-0.1145084947,
0.1857395768,
0.4368844032,
0.5208126307,
0.0604052097,
0.0136407316,
-0.1431028545,
0.0854350626,
-0.0707808882,
0.2464942783,
0.1811535358,
0.3095547259,
0.0287800804,
0.0299922675,
-0.3235033453,
-0.0564060584,
0.2536708117,
-0.1377626956,
-0.0269035362,
0.1137025431,
-0.0217052922,
-0.317278564,
0.1229668632,
0.2679323554,
0.0417125821,
0.116805315,
-0.1234359592,
-0.228472203,
0.0967697501,
-0.2478918582,
0.0329243615,
-0.3760193586,
0.2189299017,
0.1571736932,
-0.0918696523,
-0.2250888646,
0.3122610152,
0.3311513662,
-0.1604463309,
0.0366788134,
0.1225565821,
-0.0565134361,
0.25550282,
-0.0898033828,
0.1513250917,
0.0428156853,
-0.0526724681,
0.3032370806,
-0.1087276787
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | When users load their own data, they expect the order to stay the same. I think that shuffling the data can make things inconvenient.
> I think that this is also what was originally envisioned as mentioned in the documentation here:
This part was originally developed by tensorflow datasets, and tensorflow datasets indeed does the shuffling. However in this library this is probably not what we want in the general case. But if @albertvillanova and @thomwolf you have opinions on this please let us know.
> Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples.
Maybe we cam simply keep track of the hashes of of each batch being written ? The size of the batch when the data are save in arrow is 10 000 examples. This would only ensure that we don't have duplicates in each batch, but there might still be duplicates across batches. For 10 000 examples the hashes can just be stored as a python `set`.
Otherwise if we want full deduplication, we need an extra tool that allows to temporarily save and query hashes that may need to use disk space rather than memory. | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 224 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
When users load their own data, they expect the order to stay the same. I think that shuffling the data can make things inconvenient.
> I think that this is also what was originally envisioned as mentioned in the documentation here:
This part was originally developed by tensorflow datasets, and tensorflow datasets indeed does the shuffling. However in this library this is probably not what we want in the general case. But if @albertvillanova and @thomwolf you have opinions on this please let us know.
> Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples.
Maybe we cam simply keep track of the hashes of of each batch being written ? The size of the batch when the data are save in arrow is 10 000 examples. This would only ensure that we don't have duplicates in each batch, but there might still be duplicates across batches. For 10 000 examples the hashes can just be stored as a python `set`.
Otherwise if we want full deduplication, we need an extra tool that allows to temporarily save and query hashes that may need to use disk space rather than memory. | [
0.0275367573,
-0.2159305364,
0.0291702896,
0.4762759805,
0.0684194565,
-0.2363621742,
0.4168981612,
0.0804125518,
0.4312435091,
0.1339117885,
0.1672191322,
0.3502570093,
-0.0206804257,
0.206516102,
-0.0032006167,
0.4027806818,
0.0770775974,
0.0507337637,
-0.3874770999,
-0.1746382117,
-0.5882228017,
0.0452297106,
-0.1532146335,
-0.0614638589,
-0.1678527296,
0.1618545502,
-0.0681425184,
-0.0138255209,
-0.1972760558,
-0.4447281659,
0.2861762643,
0.3954279125,
-0.1313848197,
0.3610022962,
-0.0001243995,
-0.0313455164,
0.0754738376,
-0.1916625053,
-0.5255250335,
0.026202634,
-0.1937692165,
0.09500245,
-0.0176382903,
-0.5688119531,
-0.0537752733,
-0.1629761457,
-0.0972570851,
-0.4674585462,
0.2114742696,
0.2158978432,
0.0896027088,
0.4042153358,
0.3006412983,
0.204203099,
0.2016511112,
0.6070532203,
-0.2093219757,
-0.3547793031,
0.0443221107,
0.3141502738,
0.0819109678,
0.177616477,
0.060621798,
-0.1701101959,
0.2006858885,
0.1464149207,
-0.2246277481,
-0.323405087,
-0.0920047909,
0.3267405331,
0.3529067636,
-0.1715485305,
-0.3823952377,
-0.3127988577,
-0.031310115,
0.1885318607,
0.4732133448,
0.1420392096,
-0.3297614455,
0.004291296,
-0.2719512284,
0.3002656102,
-0.0179661363,
-0.0041727591,
0.258790344,
0.1244734898,
-0.0329473801,
0.0638201535,
0.2017904073,
-0.1953787059,
-0.1708808243,
-0.4019608498,
0.0959564894,
0.3071313202,
-0.1999059767,
-0.2576292753,
0.2660216689,
0.1940440983,
0.4387062788,
0.0169974007,
-0.0074184779,
0.0199900232,
-0.1039314717,
-0.1370510608,
-0.052976761,
0.2784973383,
0.1445690989,
0.0533139445,
0.4216778576,
-0.0334115028,
-0.1720717847,
0.0693689361,
-0.0535319448,
0.0950192511,
0.4306458533,
0.2696842849,
0.3355063498,
0.0252514184,
-0.1482147872,
0.0974797681,
-0.1257558763,
-0.2656872272,
0.2667301893,
0.3143822253,
-0.0797204226,
0.09894339,
-0.1258906126,
0.0694412291,
-0.3220944405,
-0.0343440585,
-0.085337922,
-0.149642095,
-0.0802806243,
-0.0657496005,
0.3642802238,
-0.3379720747,
0.0242794603,
0.2694472671,
-0.2059152275,
-0.2884233594,
-0.1518756896,
-0.0767865777,
0.5315925479,
0.2941077948,
-0.1158167347,
0.0240071565,
0.0686461404,
-0.4160591066,
-0.3097438514,
0.3407131732,
-0.2412343174,
-0.1555794924,
0.2009788752,
0.0987635702,
-0.3604650795,
-0.1261387467,
-0.130660668,
-0.0645980015,
0.3372377753,
0.2071814984,
0.0784949139,
-0.1708254516,
0.1355779767,
-0.4528720081,
0.2073255628,
0.891407907,
-0.1023141891,
-0.0063827261,
-0.152642101,
-0.0278965347,
0.1243740916,
0.3553084731,
-0.0161852501,
0.3325899243,
-0.3431202173,
0.0928568393,
0.171664387,
-0.1076283157,
-0.2139099389,
0.012115512,
0.1867587715,
0.0967979208,
0.5034435391,
0.2218378782,
0.268566668,
-0.0544426367,
-0.2298943847,
0.0698376223,
0.0156063978,
0.060203366,
-0.2132327408,
-0.1308510602,
0.0318854861,
0.0194858983,
-0.0369517766,
0.2195640653,
0.1360975057,
-0.2552813292,
0.0255508348,
-0.2306272388,
0.0509530455,
-0.0563533045,
0.16233325,
0.0917919874,
0.0456482396,
0.4361871779,
-0.4905917346,
0.223052457,
-0.0022499934,
0.1985981762,
-0.4391953647,
-0.2743708491,
-0.0583683662,
0.233192578,
-0.3910269141,
0.1591252089,
0.0221544504,
0.3127869666,
0.313372016,
0.2550626993,
-0.0731581599,
0.0802614465,
-0.0975415185,
0.1954382658,
-0.3723433018,
0.0034483448,
-0.0711762607,
0.0683824942,
-0.0470243767,
0.2644086182,
0.1033376008,
-0.1461704075,
-0.0429863036,
0.2023592442,
0.2752099335,
-0.0221164487,
0.0455039106,
0.3107892573,
0.2325394154,
-0.0491348989,
-0.0383990295,
0.1895339936,
0.1686584949,
0.0750721097,
-0.2943840623,
0.8053556681,
-0.2581630349,
0.0285354182,
-0.002302289,
-0.0071977302,
0.0217749849,
-0.1347506642,
-0.136598289,
-0.188443929,
-0.0732934624,
-0.0163169429,
0.1072861999,
0.4089408219,
-0.2961964011,
0.1576383859,
0.7058495879,
0.0941349566,
0.2832790017,
-0.032123372,
0.1921659559,
-0.0808991343,
-0.2282803506,
0.3368209302,
0.1522256136,
0.1965064853,
0.118586123,
-0.3717748523,
-0.0730495229,
-0.1460592151,
0.0427721776,
-0.1891167164,
-0.3544771075,
0.3523737788,
-0.3063009679,
-0.1038097441,
-0.5338435769,
0.2326878011,
0.1194282621,
0.251612246,
-0.5340342522,
-0.2392491996,
-0.1169462949,
-0.0837990195,
-0.228394866,
-0.1795801818,
-0.0798715651,
-0.3404611349,
0.1645959318,
0.0483223759,
-0.0415060148,
0.2251761556,
-0.0276002549,
0.1776853949,
0.0363353416,
-0.5385169387,
-0.4368277192,
0.0511805899,
-0.1454135925,
-0.0151515678,
0.248191148,
-0.1409252137,
0.3679049015,
-0.3222298622,
0.2253864557,
-0.2745194137,
-0.301422447,
0.0428631417,
-0.15850842,
0.119652167,
-0.0956907272,
-0.0779616684,
-0.0854471251,
-0.0822698623,
0.2423252016,
-0.2479200512,
-0.5795608759,
0.2682211995,
0.0698500276,
-0.1878862381,
-0.2038373947,
-0.5165555477,
-0.0041084085,
0.0617714971,
0.1320421696,
-0.0713652372,
0.1752529442,
0.046107702,
0.1794478595,
-0.1891894639,
0.0000352226,
-0.0443068668,
-0.2693848014,
-0.3226260543,
0.6126976013,
-0.0839338303,
-0.2482607961,
-0.0997936875,
-0.1879332811,
-0.2220842838,
0.1487161368,
-0.3126060069,
0.1589481682,
-0.5614319444,
0.6340061426,
0.2777656615,
0.2941865027,
0.4636283815,
0.0964576975,
0.015165031,
-0.2317610234,
0.0259327069,
0.3365900517,
-0.014384686,
0.2851171792,
0.1721882373,
0.2982103825,
-0.2947058678,
0.4157006443,
0.3359111249,
-0.1027194113,
0.3535642624,
-0.152692154,
0.3624250591,
0.0208123643,
-0.3244894743,
-0.0466853306,
0.1976602674,
0.1448144168,
0.1876152158,
0.0363311246,
0.3886360526,
-0.1072059348,
0.4754825234,
-0.7206187248,
-0.3073938787,
0.0303061698,
-0.1915811747,
0.239602983,
0.0085609332,
0.3000762463,
-0.1423637718,
-0.240300104,
-0.2210788876,
0.3997721672,
0.4897814691,
-0.0650008023,
-0.4595609009,
-0.0350507498,
-0.5776281953,
0.0720781535,
-0.034360677,
0.2558517158,
0.0583172217,
-0.2912877202,
0.1583035588,
-0.1152782515,
0.4106993973,
-0.2006324977,
0.0915496573,
-0.1241661608,
0.1059208661,
-0.1465411484,
0.074377358,
-0.1692646444,
-0.1423260421,
-0.1802764088,
0.5174466372,
-0.5598745346,
-0.1423892677,
0.0348060727,
-0.0109510385,
-0.160813719,
-0.4294214249,
-0.4368859529,
-0.1710218191,
-0.1745036989,
0.1889981478,
-0.0279019177,
0.1397202611,
-0.5259868503,
-0.0763651505,
-0.200700745,
0.1436227709,
0.3456245661,
0.1947357506,
0.3810789883,
0.1793130934,
0.2992998958,
0.1381075531,
0.0127520356,
0.1077307239,
0.6457731128,
-0.0209300071,
-0.1307186484,
-0.1229431331,
-0.3637977242,
-0.234893769,
0.0491309874,
-0.3108318448,
0.1380217969,
0.0838790759,
0.0392891727,
-0.4141132236,
-0.2273482531,
0.2334342152,
-0.0790463313,
-0.3273979425,
-0.4119488001,
0.2217232138,
-0.0523257628,
-0.1161642894,
0.0675452352,
0.380084157,
-0.1981735229,
0.17885378,
0.4224417508,
0.679212749,
-0.358956933,
0.0781863481,
0.1326884031,
0.0002007335,
0.3454468548,
0.1435301751,
0.1005205512,
-0.6070395708,
0.0357896239,
-0.0309855454,
-0.177086249,
-0.1437163353,
-0.0286892466,
-0.3284614086,
-0.2210588008,
0.0313082784,
0.2751148939,
-0.2847682834,
0.4140977263,
-0.1807778031,
-0.2084251344,
0.1361829042,
0.0359392986,
0.127897799,
0.6129821539,
0.1220614687,
0.0329463296,
-0.2541006207,
-0.3859805465,
-0.1389320195,
0.096148029,
-0.1959286779,
0.101078555,
0.1399154067,
-0.1529215276,
0.0752091706,
0.5738861561,
0.6691457033,
0.1494530439,
0.1169736013,
-0.1957572401,
0.2974544764,
0.1938554943,
-0.0434504561,
-0.0402524322,
0.0629057959,
0.2413101494,
-0.2347972691,
-0.239189297,
0.1737241149,
-0.2943580151,
-0.4648042023,
-0.2237488627,
-0.2652674615,
-0.3984828591,
0.4013696015,
-0.1159313396,
-0.2875410914,
-0.1351929009,
0.0114427228,
0.1781584173,
0.1493755877,
0.6839718223,
-0.2366018295,
-0.2745063305,
-0.0755616277,
0.2371228188,
0.1613748819,
0.185430333,
0.3100965619,
0.0506318212,
-0.1598341316,
-0.2896625996,
0.4080943167,
0.1270557046,
-0.6538041234,
0.1584935188,
0.0069573335,
0.1260240078,
0.1320848167,
0.4580088258,
0.0831546485,
0.304546684,
0.0452786162,
-0.4174902737,
-0.3791797161,
0.14218539,
0.1229513586,
0.1663134396,
-0.2781091928,
-0.1295074522,
0.237192452,
-0.0970914513,
-0.2319466472,
-0.2686060667,
-0.0118640512,
-0.0829753876,
0.2023101151,
-0.0000618941,
0.246958971,
0.0123416372,
0.119607687,
-0.3138860166,
-0.2301679999,
-0.046829395,
-0.0646982789,
0.1968929768,
-0.0667048395,
0.2460970879,
-0.3984274268,
-0.2937810123,
-0.0716150701,
-0.2857214212,
0.1225819141,
0.2313950509,
-0.1323326379,
0.3597551882,
0.0998113006,
0.1995749176,
-0.1428153664,
0.1152757555,
-0.1334346235,
-0.0616847314,
0.1036157086,
0.1160410345,
-0.0581946708,
-0.0126063973,
-0.3222412467,
0.2602236569,
0.1303786635,
-0.0295771547,
0.0631704777,
-0.3162483871,
0.1304636449,
0.1253680289,
0.2124866247,
0.4128774107,
0.0213230103,
-0.1599719524,
0.1262921542,
0.1095458791,
-0.0524811484,
-0.0774539709,
-0.1057519913,
0.4045767784,
0.1539438367,
0.5210469365,
-0.0272810534,
-0.0759403855,
-0.0039812475,
-0.1401821375,
0.0401140228,
-0.05535556,
0.0370167792,
0.7215253115,
0.0033209473,
0.023680076,
0.5608685017,
0.0468488298,
-0.3103268445,
0.3334859908,
0.0794758275,
0.2596439421,
-0.0594841391,
0.3316032588,
0.0038182661,
-0.240346238,
0.2577208877,
0.0598206073,
-0.318066299,
0.0827418566,
0.2135328948,
0.2427786887,
-0.0996309891,
0.0139415823,
-0.6906054616,
-0.0261761267,
-0.274320066,
-0.2494877279,
-0.3948240578,
-0.4349915385,
-0.1296161115,
-0.0516814999,
0.0653565153,
0.0837118849,
0.1000912338,
0.1421044171,
-0.0959615707,
-0.3503395021,
0.1130846143,
0.1265849024,
0.3152232468,
-0.2974817157,
0.1314499229,
0.2653689384,
0.1533066928,
0.0023726625,
0.3071098328,
0.2919716537,
0.3392053843,
0.0291712321,
0.2081514448,
-0.1007880419,
-0.1049738079,
-0.1104121357,
0.5324910879,
0.0612864047,
0.0125475284,
0.2630119622,
0.0473060682,
-0.0439804792,
-0.1078522801,
0.0949220881,
0.0566300675,
0.2469433099,
0.3780519664,
0.0062832814,
-0.2240938842,
0.1664493382,
0.2008965164,
-0.1284397542,
-0.2256352305,
0.0752759054,
0.2674503624,
0.0800942481,
-0.4431451261,
0.0444708206,
0.0107637905,
0.3973337412,
0.3050804734,
-0.2235716879,
-0.2529635131,
-0.1469859034,
-0.7591508031,
-0.0828499794,
-0.0884774178,
-0.1693407893,
-0.0722598881,
0.3721688986,
-0.003554333,
0.0900174677,
-0.0112860575,
-0.168304652,
-0.0287198499,
0.454161793,
-0.1920493841,
-0.1011465117,
-0.0437024273,
-0.0857815668,
-0.2175277919,
-0.4019392729,
0.2391231805,
-0.1568983495,
-0.0509432703,
0.0202916004,
0.4017065465,
0.166745469,
-0.1145084947,
0.1857395768,
0.4368844032,
0.5208126307,
0.0604052097,
0.0136407316,
-0.1431028545,
0.0854350626,
-0.0707808882,
0.2464942783,
0.1811535358,
0.3095547259,
0.0287800804,
0.0299922675,
-0.3235033453,
-0.0564060584,
0.2536708117,
-0.1377626956,
-0.0269035362,
0.1137025431,
-0.0217052922,
-0.317278564,
0.1229668632,
0.2679323554,
0.0417125821,
0.116805315,
-0.1234359592,
-0.228472203,
0.0967697501,
-0.2478918582,
0.0329243615,
-0.3760193586,
0.2189299017,
0.1571736932,
-0.0918696523,
-0.2250888646,
0.3122610152,
0.3311513662,
-0.1604463309,
0.0366788134,
0.1225565821,
-0.0565134361,
0.25550282,
-0.0898033828,
0.1513250917,
0.0428156853,
-0.0526724681,
0.3032370806,
-0.1087276787
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Yes I think we want to keep the original order by default and only shuffle when the user ask for it (for instance by calling `dataset.shuffle()`). That’s how I had it in mind originally. | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 34 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Yes I think we want to keep the original order by default and only shuffle when the user ask for it (for instance by calling `dataset.shuffle()`). That’s how I had it in mind originally. | [
0.0275367573,
-0.2159305364,
0.0291702896,
0.4762759805,
0.0684194565,
-0.2363621742,
0.4168981612,
0.0804125518,
0.4312435091,
0.1339117885,
0.1672191322,
0.3502570093,
-0.0206804257,
0.206516102,
-0.0032006167,
0.4027806818,
0.0770775974,
0.0507337637,
-0.3874770999,
-0.1746382117,
-0.5882228017,
0.0452297106,
-0.1532146335,
-0.0614638589,
-0.1678527296,
0.1618545502,
-0.0681425184,
-0.0138255209,
-0.1972760558,
-0.4447281659,
0.2861762643,
0.3954279125,
-0.1313848197,
0.3610022962,
-0.0001243995,
-0.0313455164,
0.0754738376,
-0.1916625053,
-0.5255250335,
0.026202634,
-0.1937692165,
0.09500245,
-0.0176382903,
-0.5688119531,
-0.0537752733,
-0.1629761457,
-0.0972570851,
-0.4674585462,
0.2114742696,
0.2158978432,
0.0896027088,
0.4042153358,
0.3006412983,
0.204203099,
0.2016511112,
0.6070532203,
-0.2093219757,
-0.3547793031,
0.0443221107,
0.3141502738,
0.0819109678,
0.177616477,
0.060621798,
-0.1701101959,
0.2006858885,
0.1464149207,
-0.2246277481,
-0.323405087,
-0.0920047909,
0.3267405331,
0.3529067636,
-0.1715485305,
-0.3823952377,
-0.3127988577,
-0.031310115,
0.1885318607,
0.4732133448,
0.1420392096,
-0.3297614455,
0.004291296,
-0.2719512284,
0.3002656102,
-0.0179661363,
-0.0041727591,
0.258790344,
0.1244734898,
-0.0329473801,
0.0638201535,
0.2017904073,
-0.1953787059,
-0.1708808243,
-0.4019608498,
0.0959564894,
0.3071313202,
-0.1999059767,
-0.2576292753,
0.2660216689,
0.1940440983,
0.4387062788,
0.0169974007,
-0.0074184779,
0.0199900232,
-0.1039314717,
-0.1370510608,
-0.052976761,
0.2784973383,
0.1445690989,
0.0533139445,
0.4216778576,
-0.0334115028,
-0.1720717847,
0.0693689361,
-0.0535319448,
0.0950192511,
0.4306458533,
0.2696842849,
0.3355063498,
0.0252514184,
-0.1482147872,
0.0974797681,
-0.1257558763,
-0.2656872272,
0.2667301893,
0.3143822253,
-0.0797204226,
0.09894339,
-0.1258906126,
0.0694412291,
-0.3220944405,
-0.0343440585,
-0.085337922,
-0.149642095,
-0.0802806243,
-0.0657496005,
0.3642802238,
-0.3379720747,
0.0242794603,
0.2694472671,
-0.2059152275,
-0.2884233594,
-0.1518756896,
-0.0767865777,
0.5315925479,
0.2941077948,
-0.1158167347,
0.0240071565,
0.0686461404,
-0.4160591066,
-0.3097438514,
0.3407131732,
-0.2412343174,
-0.1555794924,
0.2009788752,
0.0987635702,
-0.3604650795,
-0.1261387467,
-0.130660668,
-0.0645980015,
0.3372377753,
0.2071814984,
0.0784949139,
-0.1708254516,
0.1355779767,
-0.4528720081,
0.2073255628,
0.891407907,
-0.1023141891,
-0.0063827261,
-0.152642101,
-0.0278965347,
0.1243740916,
0.3553084731,
-0.0161852501,
0.3325899243,
-0.3431202173,
0.0928568393,
0.171664387,
-0.1076283157,
-0.2139099389,
0.012115512,
0.1867587715,
0.0967979208,
0.5034435391,
0.2218378782,
0.268566668,
-0.0544426367,
-0.2298943847,
0.0698376223,
0.0156063978,
0.060203366,
-0.2132327408,
-0.1308510602,
0.0318854861,
0.0194858983,
-0.0369517766,
0.2195640653,
0.1360975057,
-0.2552813292,
0.0255508348,
-0.2306272388,
0.0509530455,
-0.0563533045,
0.16233325,
0.0917919874,
0.0456482396,
0.4361871779,
-0.4905917346,
0.223052457,
-0.0022499934,
0.1985981762,
-0.4391953647,
-0.2743708491,
-0.0583683662,
0.233192578,
-0.3910269141,
0.1591252089,
0.0221544504,
0.3127869666,
0.313372016,
0.2550626993,
-0.0731581599,
0.0802614465,
-0.0975415185,
0.1954382658,
-0.3723433018,
0.0034483448,
-0.0711762607,
0.0683824942,
-0.0470243767,
0.2644086182,
0.1033376008,
-0.1461704075,
-0.0429863036,
0.2023592442,
0.2752099335,
-0.0221164487,
0.0455039106,
0.3107892573,
0.2325394154,
-0.0491348989,
-0.0383990295,
0.1895339936,
0.1686584949,
0.0750721097,
-0.2943840623,
0.8053556681,
-0.2581630349,
0.0285354182,
-0.002302289,
-0.0071977302,
0.0217749849,
-0.1347506642,
-0.136598289,
-0.188443929,
-0.0732934624,
-0.0163169429,
0.1072861999,
0.4089408219,
-0.2961964011,
0.1576383859,
0.7058495879,
0.0941349566,
0.2832790017,
-0.032123372,
0.1921659559,
-0.0808991343,
-0.2282803506,
0.3368209302,
0.1522256136,
0.1965064853,
0.118586123,
-0.3717748523,
-0.0730495229,
-0.1460592151,
0.0427721776,
-0.1891167164,
-0.3544771075,
0.3523737788,
-0.3063009679,
-0.1038097441,
-0.5338435769,
0.2326878011,
0.1194282621,
0.251612246,
-0.5340342522,
-0.2392491996,
-0.1169462949,
-0.0837990195,
-0.228394866,
-0.1795801818,
-0.0798715651,
-0.3404611349,
0.1645959318,
0.0483223759,
-0.0415060148,
0.2251761556,
-0.0276002549,
0.1776853949,
0.0363353416,
-0.5385169387,
-0.4368277192,
0.0511805899,
-0.1454135925,
-0.0151515678,
0.248191148,
-0.1409252137,
0.3679049015,
-0.3222298622,
0.2253864557,
-0.2745194137,
-0.301422447,
0.0428631417,
-0.15850842,
0.119652167,
-0.0956907272,
-0.0779616684,
-0.0854471251,
-0.0822698623,
0.2423252016,
-0.2479200512,
-0.5795608759,
0.2682211995,
0.0698500276,
-0.1878862381,
-0.2038373947,
-0.5165555477,
-0.0041084085,
0.0617714971,
0.1320421696,
-0.0713652372,
0.1752529442,
0.046107702,
0.1794478595,
-0.1891894639,
0.0000352226,
-0.0443068668,
-0.2693848014,
-0.3226260543,
0.6126976013,
-0.0839338303,
-0.2482607961,
-0.0997936875,
-0.1879332811,
-0.2220842838,
0.1487161368,
-0.3126060069,
0.1589481682,
-0.5614319444,
0.6340061426,
0.2777656615,
0.2941865027,
0.4636283815,
0.0964576975,
0.015165031,
-0.2317610234,
0.0259327069,
0.3365900517,
-0.014384686,
0.2851171792,
0.1721882373,
0.2982103825,
-0.2947058678,
0.4157006443,
0.3359111249,
-0.1027194113,
0.3535642624,
-0.152692154,
0.3624250591,
0.0208123643,
-0.3244894743,
-0.0466853306,
0.1976602674,
0.1448144168,
0.1876152158,
0.0363311246,
0.3886360526,
-0.1072059348,
0.4754825234,
-0.7206187248,
-0.3073938787,
0.0303061698,
-0.1915811747,
0.239602983,
0.0085609332,
0.3000762463,
-0.1423637718,
-0.240300104,
-0.2210788876,
0.3997721672,
0.4897814691,
-0.0650008023,
-0.4595609009,
-0.0350507498,
-0.5776281953,
0.0720781535,
-0.034360677,
0.2558517158,
0.0583172217,
-0.2912877202,
0.1583035588,
-0.1152782515,
0.4106993973,
-0.2006324977,
0.0915496573,
-0.1241661608,
0.1059208661,
-0.1465411484,
0.074377358,
-0.1692646444,
-0.1423260421,
-0.1802764088,
0.5174466372,
-0.5598745346,
-0.1423892677,
0.0348060727,
-0.0109510385,
-0.160813719,
-0.4294214249,
-0.4368859529,
-0.1710218191,
-0.1745036989,
0.1889981478,
-0.0279019177,
0.1397202611,
-0.5259868503,
-0.0763651505,
-0.200700745,
0.1436227709,
0.3456245661,
0.1947357506,
0.3810789883,
0.1793130934,
0.2992998958,
0.1381075531,
0.0127520356,
0.1077307239,
0.6457731128,
-0.0209300071,
-0.1307186484,
-0.1229431331,
-0.3637977242,
-0.234893769,
0.0491309874,
-0.3108318448,
0.1380217969,
0.0838790759,
0.0392891727,
-0.4141132236,
-0.2273482531,
0.2334342152,
-0.0790463313,
-0.3273979425,
-0.4119488001,
0.2217232138,
-0.0523257628,
-0.1161642894,
0.0675452352,
0.380084157,
-0.1981735229,
0.17885378,
0.4224417508,
0.679212749,
-0.358956933,
0.0781863481,
0.1326884031,
0.0002007335,
0.3454468548,
0.1435301751,
0.1005205512,
-0.6070395708,
0.0357896239,
-0.0309855454,
-0.177086249,
-0.1437163353,
-0.0286892466,
-0.3284614086,
-0.2210588008,
0.0313082784,
0.2751148939,
-0.2847682834,
0.4140977263,
-0.1807778031,
-0.2084251344,
0.1361829042,
0.0359392986,
0.127897799,
0.6129821539,
0.1220614687,
0.0329463296,
-0.2541006207,
-0.3859805465,
-0.1389320195,
0.096148029,
-0.1959286779,
0.101078555,
0.1399154067,
-0.1529215276,
0.0752091706,
0.5738861561,
0.6691457033,
0.1494530439,
0.1169736013,
-0.1957572401,
0.2974544764,
0.1938554943,
-0.0434504561,
-0.0402524322,
0.0629057959,
0.2413101494,
-0.2347972691,
-0.239189297,
0.1737241149,
-0.2943580151,
-0.4648042023,
-0.2237488627,
-0.2652674615,
-0.3984828591,
0.4013696015,
-0.1159313396,
-0.2875410914,
-0.1351929009,
0.0114427228,
0.1781584173,
0.1493755877,
0.6839718223,
-0.2366018295,
-0.2745063305,
-0.0755616277,
0.2371228188,
0.1613748819,
0.185430333,
0.3100965619,
0.0506318212,
-0.1598341316,
-0.2896625996,
0.4080943167,
0.1270557046,
-0.6538041234,
0.1584935188,
0.0069573335,
0.1260240078,
0.1320848167,
0.4580088258,
0.0831546485,
0.304546684,
0.0452786162,
-0.4174902737,
-0.3791797161,
0.14218539,
0.1229513586,
0.1663134396,
-0.2781091928,
-0.1295074522,
0.237192452,
-0.0970914513,
-0.2319466472,
-0.2686060667,
-0.0118640512,
-0.0829753876,
0.2023101151,
-0.0000618941,
0.246958971,
0.0123416372,
0.119607687,
-0.3138860166,
-0.2301679999,
-0.046829395,
-0.0646982789,
0.1968929768,
-0.0667048395,
0.2460970879,
-0.3984274268,
-0.2937810123,
-0.0716150701,
-0.2857214212,
0.1225819141,
0.2313950509,
-0.1323326379,
0.3597551882,
0.0998113006,
0.1995749176,
-0.1428153664,
0.1152757555,
-0.1334346235,
-0.0616847314,
0.1036157086,
0.1160410345,
-0.0581946708,
-0.0126063973,
-0.3222412467,
0.2602236569,
0.1303786635,
-0.0295771547,
0.0631704777,
-0.3162483871,
0.1304636449,
0.1253680289,
0.2124866247,
0.4128774107,
0.0213230103,
-0.1599719524,
0.1262921542,
0.1095458791,
-0.0524811484,
-0.0774539709,
-0.1057519913,
0.4045767784,
0.1539438367,
0.5210469365,
-0.0272810534,
-0.0759403855,
-0.0039812475,
-0.1401821375,
0.0401140228,
-0.05535556,
0.0370167792,
0.7215253115,
0.0033209473,
0.023680076,
0.5608685017,
0.0468488298,
-0.3103268445,
0.3334859908,
0.0794758275,
0.2596439421,
-0.0594841391,
0.3316032588,
0.0038182661,
-0.240346238,
0.2577208877,
0.0598206073,
-0.318066299,
0.0827418566,
0.2135328948,
0.2427786887,
-0.0996309891,
0.0139415823,
-0.6906054616,
-0.0261761267,
-0.274320066,
-0.2494877279,
-0.3948240578,
-0.4349915385,
-0.1296161115,
-0.0516814999,
0.0653565153,
0.0837118849,
0.1000912338,
0.1421044171,
-0.0959615707,
-0.3503395021,
0.1130846143,
0.1265849024,
0.3152232468,
-0.2974817157,
0.1314499229,
0.2653689384,
0.1533066928,
0.0023726625,
0.3071098328,
0.2919716537,
0.3392053843,
0.0291712321,
0.2081514448,
-0.1007880419,
-0.1049738079,
-0.1104121357,
0.5324910879,
0.0612864047,
0.0125475284,
0.2630119622,
0.0473060682,
-0.0439804792,
-0.1078522801,
0.0949220881,
0.0566300675,
0.2469433099,
0.3780519664,
0.0062832814,
-0.2240938842,
0.1664493382,
0.2008965164,
-0.1284397542,
-0.2256352305,
0.0752759054,
0.2674503624,
0.0800942481,
-0.4431451261,
0.0444708206,
0.0107637905,
0.3973337412,
0.3050804734,
-0.2235716879,
-0.2529635131,
-0.1469859034,
-0.7591508031,
-0.0828499794,
-0.0884774178,
-0.1693407893,
-0.0722598881,
0.3721688986,
-0.003554333,
0.0900174677,
-0.0112860575,
-0.168304652,
-0.0287198499,
0.454161793,
-0.1920493841,
-0.1011465117,
-0.0437024273,
-0.0857815668,
-0.2175277919,
-0.4019392729,
0.2391231805,
-0.1568983495,
-0.0509432703,
0.0202916004,
0.4017065465,
0.166745469,
-0.1145084947,
0.1857395768,
0.4368844032,
0.5208126307,
0.0604052097,
0.0136407316,
-0.1431028545,
0.0854350626,
-0.0707808882,
0.2464942783,
0.1811535358,
0.3095547259,
0.0287800804,
0.0299922675,
-0.3235033453,
-0.0564060584,
0.2536708117,
-0.1377626956,
-0.0269035362,
0.1137025431,
-0.0217052922,
-0.317278564,
0.1229668632,
0.2679323554,
0.0417125821,
0.116805315,
-0.1234359592,
-0.228472203,
0.0967697501,
-0.2478918582,
0.0329243615,
-0.3760193586,
0.2189299017,
0.1571736932,
-0.0918696523,
-0.2250888646,
0.3122610152,
0.3311513662,
-0.1604463309,
0.0366788134,
0.1225565821,
-0.0565134361,
0.25550282,
-0.0898033828,
0.1513250917,
0.0428156853,
-0.0526724681,
0.3032370806,
-0.1087276787
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Hey @lhoestq, I just had a more in-depth look at the original TFDS code about why the keys and hash were used in the first place.
In my opinion, the only use that the `hash(key)` serves is that it allows us to shuffle the examples in a deterministic order (as each example will always yield the same key and thus, the same hash on every system) so that the same dataset is generated for each user, irrespective of the order the examples are yielded by the dataset builder on different user systems.
Otherwise, if we are not shuffling, then while yielding and writing the data, after getting the key and hashing it for an example, I can't quite see the use of the hash or the key. The hash will simply be generated for each example but not actually used anywhere?
@lhoestq @thomwolf It would be great if you could explain a bit more about the usage of keys. Thanks!
| The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 160 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Hey @lhoestq, I just had a more in-depth look at the original TFDS code about why the keys and hash were used in the first place.
In my opinion, the only use that the `hash(key)` serves is that it allows us to shuffle the examples in a deterministic order (as each example will always yield the same key and thus, the same hash on every system) so that the same dataset is generated for each user, irrespective of the order the examples are yielded by the dataset builder on different user systems.
Otherwise, if we are not shuffling, then while yielding and writing the data, after getting the key and hashing it for an example, I can't quite see the use of the hash or the key. The hash will simply be generated for each example but not actually used anywhere?
@lhoestq @thomwolf It would be great if you could explain a bit more about the usage of keys. Thanks!
| [
0.0275367573,
-0.2159305364,
0.0291702896,
0.4762759805,
0.0684194565,
-0.2363621742,
0.4168981612,
0.0804125518,
0.4312435091,
0.1339117885,
0.1672191322,
0.3502570093,
-0.0206804257,
0.206516102,
-0.0032006167,
0.4027806818,
0.0770775974,
0.0507337637,
-0.3874770999,
-0.1746382117,
-0.5882228017,
0.0452297106,
-0.1532146335,
-0.0614638589,
-0.1678527296,
0.1618545502,
-0.0681425184,
-0.0138255209,
-0.1972760558,
-0.4447281659,
0.2861762643,
0.3954279125,
-0.1313848197,
0.3610022962,
-0.0001243995,
-0.0313455164,
0.0754738376,
-0.1916625053,
-0.5255250335,
0.026202634,
-0.1937692165,
0.09500245,
-0.0176382903,
-0.5688119531,
-0.0537752733,
-0.1629761457,
-0.0972570851,
-0.4674585462,
0.2114742696,
0.2158978432,
0.0896027088,
0.4042153358,
0.3006412983,
0.204203099,
0.2016511112,
0.6070532203,
-0.2093219757,
-0.3547793031,
0.0443221107,
0.3141502738,
0.0819109678,
0.177616477,
0.060621798,
-0.1701101959,
0.2006858885,
0.1464149207,
-0.2246277481,
-0.323405087,
-0.0920047909,
0.3267405331,
0.3529067636,
-0.1715485305,
-0.3823952377,
-0.3127988577,
-0.031310115,
0.1885318607,
0.4732133448,
0.1420392096,
-0.3297614455,
0.004291296,
-0.2719512284,
0.3002656102,
-0.0179661363,
-0.0041727591,
0.258790344,
0.1244734898,
-0.0329473801,
0.0638201535,
0.2017904073,
-0.1953787059,
-0.1708808243,
-0.4019608498,
0.0959564894,
0.3071313202,
-0.1999059767,
-0.2576292753,
0.2660216689,
0.1940440983,
0.4387062788,
0.0169974007,
-0.0074184779,
0.0199900232,
-0.1039314717,
-0.1370510608,
-0.052976761,
0.2784973383,
0.1445690989,
0.0533139445,
0.4216778576,
-0.0334115028,
-0.1720717847,
0.0693689361,
-0.0535319448,
0.0950192511,
0.4306458533,
0.2696842849,
0.3355063498,
0.0252514184,
-0.1482147872,
0.0974797681,
-0.1257558763,
-0.2656872272,
0.2667301893,
0.3143822253,
-0.0797204226,
0.09894339,
-0.1258906126,
0.0694412291,
-0.3220944405,
-0.0343440585,
-0.085337922,
-0.149642095,
-0.0802806243,
-0.0657496005,
0.3642802238,
-0.3379720747,
0.0242794603,
0.2694472671,
-0.2059152275,
-0.2884233594,
-0.1518756896,
-0.0767865777,
0.5315925479,
0.2941077948,
-0.1158167347,
0.0240071565,
0.0686461404,
-0.4160591066,
-0.3097438514,
0.3407131732,
-0.2412343174,
-0.1555794924,
0.2009788752,
0.0987635702,
-0.3604650795,
-0.1261387467,
-0.130660668,
-0.0645980015,
0.3372377753,
0.2071814984,
0.0784949139,
-0.1708254516,
0.1355779767,
-0.4528720081,
0.2073255628,
0.891407907,
-0.1023141891,
-0.0063827261,
-0.152642101,
-0.0278965347,
0.1243740916,
0.3553084731,
-0.0161852501,
0.3325899243,
-0.3431202173,
0.0928568393,
0.171664387,
-0.1076283157,
-0.2139099389,
0.012115512,
0.1867587715,
0.0967979208,
0.5034435391,
0.2218378782,
0.268566668,
-0.0544426367,
-0.2298943847,
0.0698376223,
0.0156063978,
0.060203366,
-0.2132327408,
-0.1308510602,
0.0318854861,
0.0194858983,
-0.0369517766,
0.2195640653,
0.1360975057,
-0.2552813292,
0.0255508348,
-0.2306272388,
0.0509530455,
-0.0563533045,
0.16233325,
0.0917919874,
0.0456482396,
0.4361871779,
-0.4905917346,
0.223052457,
-0.0022499934,
0.1985981762,
-0.4391953647,
-0.2743708491,
-0.0583683662,
0.233192578,
-0.3910269141,
0.1591252089,
0.0221544504,
0.3127869666,
0.313372016,
0.2550626993,
-0.0731581599,
0.0802614465,
-0.0975415185,
0.1954382658,
-0.3723433018,
0.0034483448,
-0.0711762607,
0.0683824942,
-0.0470243767,
0.2644086182,
0.1033376008,
-0.1461704075,
-0.0429863036,
0.2023592442,
0.2752099335,
-0.0221164487,
0.0455039106,
0.3107892573,
0.2325394154,
-0.0491348989,
-0.0383990295,
0.1895339936,
0.1686584949,
0.0750721097,
-0.2943840623,
0.8053556681,
-0.2581630349,
0.0285354182,
-0.002302289,
-0.0071977302,
0.0217749849,
-0.1347506642,
-0.136598289,
-0.188443929,
-0.0732934624,
-0.0163169429,
0.1072861999,
0.4089408219,
-0.2961964011,
0.1576383859,
0.7058495879,
0.0941349566,
0.2832790017,
-0.032123372,
0.1921659559,
-0.0808991343,
-0.2282803506,
0.3368209302,
0.1522256136,
0.1965064853,
0.118586123,
-0.3717748523,
-0.0730495229,
-0.1460592151,
0.0427721776,
-0.1891167164,
-0.3544771075,
0.3523737788,
-0.3063009679,
-0.1038097441,
-0.5338435769,
0.2326878011,
0.1194282621,
0.251612246,
-0.5340342522,
-0.2392491996,
-0.1169462949,
-0.0837990195,
-0.228394866,
-0.1795801818,
-0.0798715651,
-0.3404611349,
0.1645959318,
0.0483223759,
-0.0415060148,
0.2251761556,
-0.0276002549,
0.1776853949,
0.0363353416,
-0.5385169387,
-0.4368277192,
0.0511805899,
-0.1454135925,
-0.0151515678,
0.248191148,
-0.1409252137,
0.3679049015,
-0.3222298622,
0.2253864557,
-0.2745194137,
-0.301422447,
0.0428631417,
-0.15850842,
0.119652167,
-0.0956907272,
-0.0779616684,
-0.0854471251,
-0.0822698623,
0.2423252016,
-0.2479200512,
-0.5795608759,
0.2682211995,
0.0698500276,
-0.1878862381,
-0.2038373947,
-0.5165555477,
-0.0041084085,
0.0617714971,
0.1320421696,
-0.0713652372,
0.1752529442,
0.046107702,
0.1794478595,
-0.1891894639,
0.0000352226,
-0.0443068668,
-0.2693848014,
-0.3226260543,
0.6126976013,
-0.0839338303,
-0.2482607961,
-0.0997936875,
-0.1879332811,
-0.2220842838,
0.1487161368,
-0.3126060069,
0.1589481682,
-0.5614319444,
0.6340061426,
0.2777656615,
0.2941865027,
0.4636283815,
0.0964576975,
0.015165031,
-0.2317610234,
0.0259327069,
0.3365900517,
-0.014384686,
0.2851171792,
0.1721882373,
0.2982103825,
-0.2947058678,
0.4157006443,
0.3359111249,
-0.1027194113,
0.3535642624,
-0.152692154,
0.3624250591,
0.0208123643,
-0.3244894743,
-0.0466853306,
0.1976602674,
0.1448144168,
0.1876152158,
0.0363311246,
0.3886360526,
-0.1072059348,
0.4754825234,
-0.7206187248,
-0.3073938787,
0.0303061698,
-0.1915811747,
0.239602983,
0.0085609332,
0.3000762463,
-0.1423637718,
-0.240300104,
-0.2210788876,
0.3997721672,
0.4897814691,
-0.0650008023,
-0.4595609009,
-0.0350507498,
-0.5776281953,
0.0720781535,
-0.034360677,
0.2558517158,
0.0583172217,
-0.2912877202,
0.1583035588,
-0.1152782515,
0.4106993973,
-0.2006324977,
0.0915496573,
-0.1241661608,
0.1059208661,
-0.1465411484,
0.074377358,
-0.1692646444,
-0.1423260421,
-0.1802764088,
0.5174466372,
-0.5598745346,
-0.1423892677,
0.0348060727,
-0.0109510385,
-0.160813719,
-0.4294214249,
-0.4368859529,
-0.1710218191,
-0.1745036989,
0.1889981478,
-0.0279019177,
0.1397202611,
-0.5259868503,
-0.0763651505,
-0.200700745,
0.1436227709,
0.3456245661,
0.1947357506,
0.3810789883,
0.1793130934,
0.2992998958,
0.1381075531,
0.0127520356,
0.1077307239,
0.6457731128,
-0.0209300071,
-0.1307186484,
-0.1229431331,
-0.3637977242,
-0.234893769,
0.0491309874,
-0.3108318448,
0.1380217969,
0.0838790759,
0.0392891727,
-0.4141132236,
-0.2273482531,
0.2334342152,
-0.0790463313,
-0.3273979425,
-0.4119488001,
0.2217232138,
-0.0523257628,
-0.1161642894,
0.0675452352,
0.380084157,
-0.1981735229,
0.17885378,
0.4224417508,
0.679212749,
-0.358956933,
0.0781863481,
0.1326884031,
0.0002007335,
0.3454468548,
0.1435301751,
0.1005205512,
-0.6070395708,
0.0357896239,
-0.0309855454,
-0.177086249,
-0.1437163353,
-0.0286892466,
-0.3284614086,
-0.2210588008,
0.0313082784,
0.2751148939,
-0.2847682834,
0.4140977263,
-0.1807778031,
-0.2084251344,
0.1361829042,
0.0359392986,
0.127897799,
0.6129821539,
0.1220614687,
0.0329463296,
-0.2541006207,
-0.3859805465,
-0.1389320195,
0.096148029,
-0.1959286779,
0.101078555,
0.1399154067,
-0.1529215276,
0.0752091706,
0.5738861561,
0.6691457033,
0.1494530439,
0.1169736013,
-0.1957572401,
0.2974544764,
0.1938554943,
-0.0434504561,
-0.0402524322,
0.0629057959,
0.2413101494,
-0.2347972691,
-0.239189297,
0.1737241149,
-0.2943580151,
-0.4648042023,
-0.2237488627,
-0.2652674615,
-0.3984828591,
0.4013696015,
-0.1159313396,
-0.2875410914,
-0.1351929009,
0.0114427228,
0.1781584173,
0.1493755877,
0.6839718223,
-0.2366018295,
-0.2745063305,
-0.0755616277,
0.2371228188,
0.1613748819,
0.185430333,
0.3100965619,
0.0506318212,
-0.1598341316,
-0.2896625996,
0.4080943167,
0.1270557046,
-0.6538041234,
0.1584935188,
0.0069573335,
0.1260240078,
0.1320848167,
0.4580088258,
0.0831546485,
0.304546684,
0.0452786162,
-0.4174902737,
-0.3791797161,
0.14218539,
0.1229513586,
0.1663134396,
-0.2781091928,
-0.1295074522,
0.237192452,
-0.0970914513,
-0.2319466472,
-0.2686060667,
-0.0118640512,
-0.0829753876,
0.2023101151,
-0.0000618941,
0.246958971,
0.0123416372,
0.119607687,
-0.3138860166,
-0.2301679999,
-0.046829395,
-0.0646982789,
0.1968929768,
-0.0667048395,
0.2460970879,
-0.3984274268,
-0.2937810123,
-0.0716150701,
-0.2857214212,
0.1225819141,
0.2313950509,
-0.1323326379,
0.3597551882,
0.0998113006,
0.1995749176,
-0.1428153664,
0.1152757555,
-0.1334346235,
-0.0616847314,
0.1036157086,
0.1160410345,
-0.0581946708,
-0.0126063973,
-0.3222412467,
0.2602236569,
0.1303786635,
-0.0295771547,
0.0631704777,
-0.3162483871,
0.1304636449,
0.1253680289,
0.2124866247,
0.4128774107,
0.0213230103,
-0.1599719524,
0.1262921542,
0.1095458791,
-0.0524811484,
-0.0774539709,
-0.1057519913,
0.4045767784,
0.1539438367,
0.5210469365,
-0.0272810534,
-0.0759403855,
-0.0039812475,
-0.1401821375,
0.0401140228,
-0.05535556,
0.0370167792,
0.7215253115,
0.0033209473,
0.023680076,
0.5608685017,
0.0468488298,
-0.3103268445,
0.3334859908,
0.0794758275,
0.2596439421,
-0.0594841391,
0.3316032588,
0.0038182661,
-0.240346238,
0.2577208877,
0.0598206073,
-0.318066299,
0.0827418566,
0.2135328948,
0.2427786887,
-0.0996309891,
0.0139415823,
-0.6906054616,
-0.0261761267,
-0.274320066,
-0.2494877279,
-0.3948240578,
-0.4349915385,
-0.1296161115,
-0.0516814999,
0.0653565153,
0.0837118849,
0.1000912338,
0.1421044171,
-0.0959615707,
-0.3503395021,
0.1130846143,
0.1265849024,
0.3152232468,
-0.2974817157,
0.1314499229,
0.2653689384,
0.1533066928,
0.0023726625,
0.3071098328,
0.2919716537,
0.3392053843,
0.0291712321,
0.2081514448,
-0.1007880419,
-0.1049738079,
-0.1104121357,
0.5324910879,
0.0612864047,
0.0125475284,
0.2630119622,
0.0473060682,
-0.0439804792,
-0.1078522801,
0.0949220881,
0.0566300675,
0.2469433099,
0.3780519664,
0.0062832814,
-0.2240938842,
0.1664493382,
0.2008965164,
-0.1284397542,
-0.2256352305,
0.0752759054,
0.2674503624,
0.0800942481,
-0.4431451261,
0.0444708206,
0.0107637905,
0.3973337412,
0.3050804734,
-0.2235716879,
-0.2529635131,
-0.1469859034,
-0.7591508031,
-0.0828499794,
-0.0884774178,
-0.1693407893,
-0.0722598881,
0.3721688986,
-0.003554333,
0.0900174677,
-0.0112860575,
-0.168304652,
-0.0287198499,
0.454161793,
-0.1920493841,
-0.1011465117,
-0.0437024273,
-0.0857815668,
-0.2175277919,
-0.4019392729,
0.2391231805,
-0.1568983495,
-0.0509432703,
0.0202916004,
0.4017065465,
0.166745469,
-0.1145084947,
0.1857395768,
0.4368844032,
0.5208126307,
0.0604052097,
0.0136407316,
-0.1431028545,
0.0854350626,
-0.0707808882,
0.2464942783,
0.1811535358,
0.3095547259,
0.0287800804,
0.0299922675,
-0.3235033453,
-0.0564060584,
0.2536708117,
-0.1377626956,
-0.0269035362,
0.1137025431,
-0.0217052922,
-0.317278564,
0.1229668632,
0.2679323554,
0.0417125821,
0.116805315,
-0.1234359592,
-0.228472203,
0.0967697501,
-0.2478918582,
0.0329243615,
-0.3760193586,
0.2189299017,
0.1571736932,
-0.0918696523,
-0.2250888646,
0.3122610152,
0.3311513662,
-0.1604463309,
0.0366788134,
0.1225565821,
-0.0565134361,
0.25550282,
-0.0898033828,
0.1513250917,
0.0428156853,
-0.0526724681,
0.3032370806,
-0.1087276787
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | In `datasets` the keys are currently ignored.
For shuffling we don't use the keys. Instead we shuffle an array of indices. Since both the original order of the dataset and the indices shuffling are deterministic, then `dataset.shuffle` is deterministic as well.
We can use it to:
1. detect duplicates
2. verify that the generation order is indeed deterministic
3. maybe more ? | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 62 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
In `datasets` the keys are currently ignored.
For shuffling we don't use the keys. Instead we shuffle an array of indices. Since both the original order of the dataset and the indices shuffling are deterministic, then `dataset.shuffle` is deterministic as well.
We can use it to:
1. detect duplicates
2. verify that the generation order is indeed deterministic
3. maybe more ? | [
0.0275367573,
-0.2159305364,
0.0291702896,
0.4762759805,
0.0684194565,
-0.2363621742,
0.4168981612,
0.0804125518,
0.4312435091,
0.1339117885,
0.1672191322,
0.3502570093,
-0.0206804257,
0.206516102,
-0.0032006167,
0.4027806818,
0.0770775974,
0.0507337637,
-0.3874770999,
-0.1746382117,
-0.5882228017,
0.0452297106,
-0.1532146335,
-0.0614638589,
-0.1678527296,
0.1618545502,
-0.0681425184,
-0.0138255209,
-0.1972760558,
-0.4447281659,
0.2861762643,
0.3954279125,
-0.1313848197,
0.3610022962,
-0.0001243995,
-0.0313455164,
0.0754738376,
-0.1916625053,
-0.5255250335,
0.026202634,
-0.1937692165,
0.09500245,
-0.0176382903,
-0.5688119531,
-0.0537752733,
-0.1629761457,
-0.0972570851,
-0.4674585462,
0.2114742696,
0.2158978432,
0.0896027088,
0.4042153358,
0.3006412983,
0.204203099,
0.2016511112,
0.6070532203,
-0.2093219757,
-0.3547793031,
0.0443221107,
0.3141502738,
0.0819109678,
0.177616477,
0.060621798,
-0.1701101959,
0.2006858885,
0.1464149207,
-0.2246277481,
-0.323405087,
-0.0920047909,
0.3267405331,
0.3529067636,
-0.1715485305,
-0.3823952377,
-0.3127988577,
-0.031310115,
0.1885318607,
0.4732133448,
0.1420392096,
-0.3297614455,
0.004291296,
-0.2719512284,
0.3002656102,
-0.0179661363,
-0.0041727591,
0.258790344,
0.1244734898,
-0.0329473801,
0.0638201535,
0.2017904073,
-0.1953787059,
-0.1708808243,
-0.4019608498,
0.0959564894,
0.3071313202,
-0.1999059767,
-0.2576292753,
0.2660216689,
0.1940440983,
0.4387062788,
0.0169974007,
-0.0074184779,
0.0199900232,
-0.1039314717,
-0.1370510608,
-0.052976761,
0.2784973383,
0.1445690989,
0.0533139445,
0.4216778576,
-0.0334115028,
-0.1720717847,
0.0693689361,
-0.0535319448,
0.0950192511,
0.4306458533,
0.2696842849,
0.3355063498,
0.0252514184,
-0.1482147872,
0.0974797681,
-0.1257558763,
-0.2656872272,
0.2667301893,
0.3143822253,
-0.0797204226,
0.09894339,
-0.1258906126,
0.0694412291,
-0.3220944405,
-0.0343440585,
-0.085337922,
-0.149642095,
-0.0802806243,
-0.0657496005,
0.3642802238,
-0.3379720747,
0.0242794603,
0.2694472671,
-0.2059152275,
-0.2884233594,
-0.1518756896,
-0.0767865777,
0.5315925479,
0.2941077948,
-0.1158167347,
0.0240071565,
0.0686461404,
-0.4160591066,
-0.3097438514,
0.3407131732,
-0.2412343174,
-0.1555794924,
0.2009788752,
0.0987635702,
-0.3604650795,
-0.1261387467,
-0.130660668,
-0.0645980015,
0.3372377753,
0.2071814984,
0.0784949139,
-0.1708254516,
0.1355779767,
-0.4528720081,
0.2073255628,
0.891407907,
-0.1023141891,
-0.0063827261,
-0.152642101,
-0.0278965347,
0.1243740916,
0.3553084731,
-0.0161852501,
0.3325899243,
-0.3431202173,
0.0928568393,
0.171664387,
-0.1076283157,
-0.2139099389,
0.012115512,
0.1867587715,
0.0967979208,
0.5034435391,
0.2218378782,
0.268566668,
-0.0544426367,
-0.2298943847,
0.0698376223,
0.0156063978,
0.060203366,
-0.2132327408,
-0.1308510602,
0.0318854861,
0.0194858983,
-0.0369517766,
0.2195640653,
0.1360975057,
-0.2552813292,
0.0255508348,
-0.2306272388,
0.0509530455,
-0.0563533045,
0.16233325,
0.0917919874,
0.0456482396,
0.4361871779,
-0.4905917346,
0.223052457,
-0.0022499934,
0.1985981762,
-0.4391953647,
-0.2743708491,
-0.0583683662,
0.233192578,
-0.3910269141,
0.1591252089,
0.0221544504,
0.3127869666,
0.313372016,
0.2550626993,
-0.0731581599,
0.0802614465,
-0.0975415185,
0.1954382658,
-0.3723433018,
0.0034483448,
-0.0711762607,
0.0683824942,
-0.0470243767,
0.2644086182,
0.1033376008,
-0.1461704075,
-0.0429863036,
0.2023592442,
0.2752099335,
-0.0221164487,
0.0455039106,
0.3107892573,
0.2325394154,
-0.0491348989,
-0.0383990295,
0.1895339936,
0.1686584949,
0.0750721097,
-0.2943840623,
0.8053556681,
-0.2581630349,
0.0285354182,
-0.002302289,
-0.0071977302,
0.0217749849,
-0.1347506642,
-0.136598289,
-0.188443929,
-0.0732934624,
-0.0163169429,
0.1072861999,
0.4089408219,
-0.2961964011,
0.1576383859,
0.7058495879,
0.0941349566,
0.2832790017,
-0.032123372,
0.1921659559,
-0.0808991343,
-0.2282803506,
0.3368209302,
0.1522256136,
0.1965064853,
0.118586123,
-0.3717748523,
-0.0730495229,
-0.1460592151,
0.0427721776,
-0.1891167164,
-0.3544771075,
0.3523737788,
-0.3063009679,
-0.1038097441,
-0.5338435769,
0.2326878011,
0.1194282621,
0.251612246,
-0.5340342522,
-0.2392491996,
-0.1169462949,
-0.0837990195,
-0.228394866,
-0.1795801818,
-0.0798715651,
-0.3404611349,
0.1645959318,
0.0483223759,
-0.0415060148,
0.2251761556,
-0.0276002549,
0.1776853949,
0.0363353416,
-0.5385169387,
-0.4368277192,
0.0511805899,
-0.1454135925,
-0.0151515678,
0.248191148,
-0.1409252137,
0.3679049015,
-0.3222298622,
0.2253864557,
-0.2745194137,
-0.301422447,
0.0428631417,
-0.15850842,
0.119652167,
-0.0956907272,
-0.0779616684,
-0.0854471251,
-0.0822698623,
0.2423252016,
-0.2479200512,
-0.5795608759,
0.2682211995,
0.0698500276,
-0.1878862381,
-0.2038373947,
-0.5165555477,
-0.0041084085,
0.0617714971,
0.1320421696,
-0.0713652372,
0.1752529442,
0.046107702,
0.1794478595,
-0.1891894639,
0.0000352226,
-0.0443068668,
-0.2693848014,
-0.3226260543,
0.6126976013,
-0.0839338303,
-0.2482607961,
-0.0997936875,
-0.1879332811,
-0.2220842838,
0.1487161368,
-0.3126060069,
0.1589481682,
-0.5614319444,
0.6340061426,
0.2777656615,
0.2941865027,
0.4636283815,
0.0964576975,
0.015165031,
-0.2317610234,
0.0259327069,
0.3365900517,
-0.014384686,
0.2851171792,
0.1721882373,
0.2982103825,
-0.2947058678,
0.4157006443,
0.3359111249,
-0.1027194113,
0.3535642624,
-0.152692154,
0.3624250591,
0.0208123643,
-0.3244894743,
-0.0466853306,
0.1976602674,
0.1448144168,
0.1876152158,
0.0363311246,
0.3886360526,
-0.1072059348,
0.4754825234,
-0.7206187248,
-0.3073938787,
0.0303061698,
-0.1915811747,
0.239602983,
0.0085609332,
0.3000762463,
-0.1423637718,
-0.240300104,
-0.2210788876,
0.3997721672,
0.4897814691,
-0.0650008023,
-0.4595609009,
-0.0350507498,
-0.5776281953,
0.0720781535,
-0.034360677,
0.2558517158,
0.0583172217,
-0.2912877202,
0.1583035588,
-0.1152782515,
0.4106993973,
-0.2006324977,
0.0915496573,
-0.1241661608,
0.1059208661,
-0.1465411484,
0.074377358,
-0.1692646444,
-0.1423260421,
-0.1802764088,
0.5174466372,
-0.5598745346,
-0.1423892677,
0.0348060727,
-0.0109510385,
-0.160813719,
-0.4294214249,
-0.4368859529,
-0.1710218191,
-0.1745036989,
0.1889981478,
-0.0279019177,
0.1397202611,
-0.5259868503,
-0.0763651505,
-0.200700745,
0.1436227709,
0.3456245661,
0.1947357506,
0.3810789883,
0.1793130934,
0.2992998958,
0.1381075531,
0.0127520356,
0.1077307239,
0.6457731128,
-0.0209300071,
-0.1307186484,
-0.1229431331,
-0.3637977242,
-0.234893769,
0.0491309874,
-0.3108318448,
0.1380217969,
0.0838790759,
0.0392891727,
-0.4141132236,
-0.2273482531,
0.2334342152,
-0.0790463313,
-0.3273979425,
-0.4119488001,
0.2217232138,
-0.0523257628,
-0.1161642894,
0.0675452352,
0.380084157,
-0.1981735229,
0.17885378,
0.4224417508,
0.679212749,
-0.358956933,
0.0781863481,
0.1326884031,
0.0002007335,
0.3454468548,
0.1435301751,
0.1005205512,
-0.6070395708,
0.0357896239,
-0.0309855454,
-0.177086249,
-0.1437163353,
-0.0286892466,
-0.3284614086,
-0.2210588008,
0.0313082784,
0.2751148939,
-0.2847682834,
0.4140977263,
-0.1807778031,
-0.2084251344,
0.1361829042,
0.0359392986,
0.127897799,
0.6129821539,
0.1220614687,
0.0329463296,
-0.2541006207,
-0.3859805465,
-0.1389320195,
0.096148029,
-0.1959286779,
0.101078555,
0.1399154067,
-0.1529215276,
0.0752091706,
0.5738861561,
0.6691457033,
0.1494530439,
0.1169736013,
-0.1957572401,
0.2974544764,
0.1938554943,
-0.0434504561,
-0.0402524322,
0.0629057959,
0.2413101494,
-0.2347972691,
-0.239189297,
0.1737241149,
-0.2943580151,
-0.4648042023,
-0.2237488627,
-0.2652674615,
-0.3984828591,
0.4013696015,
-0.1159313396,
-0.2875410914,
-0.1351929009,
0.0114427228,
0.1781584173,
0.1493755877,
0.6839718223,
-0.2366018295,
-0.2745063305,
-0.0755616277,
0.2371228188,
0.1613748819,
0.185430333,
0.3100965619,
0.0506318212,
-0.1598341316,
-0.2896625996,
0.4080943167,
0.1270557046,
-0.6538041234,
0.1584935188,
0.0069573335,
0.1260240078,
0.1320848167,
0.4580088258,
0.0831546485,
0.304546684,
0.0452786162,
-0.4174902737,
-0.3791797161,
0.14218539,
0.1229513586,
0.1663134396,
-0.2781091928,
-0.1295074522,
0.237192452,
-0.0970914513,
-0.2319466472,
-0.2686060667,
-0.0118640512,
-0.0829753876,
0.2023101151,
-0.0000618941,
0.246958971,
0.0123416372,
0.119607687,
-0.3138860166,
-0.2301679999,
-0.046829395,
-0.0646982789,
0.1968929768,
-0.0667048395,
0.2460970879,
-0.3984274268,
-0.2937810123,
-0.0716150701,
-0.2857214212,
0.1225819141,
0.2313950509,
-0.1323326379,
0.3597551882,
0.0998113006,
0.1995749176,
-0.1428153664,
0.1152757555,
-0.1334346235,
-0.0616847314,
0.1036157086,
0.1160410345,
-0.0581946708,
-0.0126063973,
-0.3222412467,
0.2602236569,
0.1303786635,
-0.0295771547,
0.0631704777,
-0.3162483871,
0.1304636449,
0.1253680289,
0.2124866247,
0.4128774107,
0.0213230103,
-0.1599719524,
0.1262921542,
0.1095458791,
-0.0524811484,
-0.0774539709,
-0.1057519913,
0.4045767784,
0.1539438367,
0.5210469365,
-0.0272810534,
-0.0759403855,
-0.0039812475,
-0.1401821375,
0.0401140228,
-0.05535556,
0.0370167792,
0.7215253115,
0.0033209473,
0.023680076,
0.5608685017,
0.0468488298,
-0.3103268445,
0.3334859908,
0.0794758275,
0.2596439421,
-0.0594841391,
0.3316032588,
0.0038182661,
-0.240346238,
0.2577208877,
0.0598206073,
-0.318066299,
0.0827418566,
0.2135328948,
0.2427786887,
-0.0996309891,
0.0139415823,
-0.6906054616,
-0.0261761267,
-0.274320066,
-0.2494877279,
-0.3948240578,
-0.4349915385,
-0.1296161115,
-0.0516814999,
0.0653565153,
0.0837118849,
0.1000912338,
0.1421044171,
-0.0959615707,
-0.3503395021,
0.1130846143,
0.1265849024,
0.3152232468,
-0.2974817157,
0.1314499229,
0.2653689384,
0.1533066928,
0.0023726625,
0.3071098328,
0.2919716537,
0.3392053843,
0.0291712321,
0.2081514448,
-0.1007880419,
-0.1049738079,
-0.1104121357,
0.5324910879,
0.0612864047,
0.0125475284,
0.2630119622,
0.0473060682,
-0.0439804792,
-0.1078522801,
0.0949220881,
0.0566300675,
0.2469433099,
0.3780519664,
0.0062832814,
-0.2240938842,
0.1664493382,
0.2008965164,
-0.1284397542,
-0.2256352305,
0.0752759054,
0.2674503624,
0.0800942481,
-0.4431451261,
0.0444708206,
0.0107637905,
0.3973337412,
0.3050804734,
-0.2235716879,
-0.2529635131,
-0.1469859034,
-0.7591508031,
-0.0828499794,
-0.0884774178,
-0.1693407893,
-0.0722598881,
0.3721688986,
-0.003554333,
0.0900174677,
-0.0112860575,
-0.168304652,
-0.0287198499,
0.454161793,
-0.1920493841,
-0.1011465117,
-0.0437024273,
-0.0857815668,
-0.2175277919,
-0.4019392729,
0.2391231805,
-0.1568983495,
-0.0509432703,
0.0202916004,
0.4017065465,
0.166745469,
-0.1145084947,
0.1857395768,
0.4368844032,
0.5208126307,
0.0604052097,
0.0136407316,
-0.1431028545,
0.0854350626,
-0.0707808882,
0.2464942783,
0.1811535358,
0.3095547259,
0.0287800804,
0.0299922675,
-0.3235033453,
-0.0564060584,
0.2536708117,
-0.1377626956,
-0.0269035362,
0.1137025431,
-0.0217052922,
-0.317278564,
0.1229668632,
0.2679323554,
0.0417125821,
0.116805315,
-0.1234359592,
-0.228472203,
0.0967697501,
-0.2478918582,
0.0329243615,
-0.3760193586,
0.2189299017,
0.1571736932,
-0.0918696523,
-0.2250888646,
0.3122610152,
0.3311513662,
-0.1604463309,
0.0366788134,
0.1225565821,
-0.0565134361,
0.25550282,
-0.0898033828,
0.1513250917,
0.0428156853,
-0.0526724681,
0.3032370806,
-0.1087276787
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Thanks a lot @lhoestq. I think I understand what we need to do now. The keys can indeed be used for detecting duplicates in generated examples as well as ensuring the order.
> Maybe we cam simply keep track of the hashes of of each batch being written ? The size of the batch when the data are save in arrow is 10 000 examples. This would only ensure that we don't have duplicates in each batch,
I think that checking for duplicates in every batch independently would be sufficient as the probability of collisions using something like `MD5` is very low. I would be opening a draft PR soon. It would be great to have your guidance. Thanks! | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 119 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Thanks a lot @lhoestq. I think I understand what we need to do now. The keys can indeed be used for detecting duplicates in generated examples as well as ensuring the order.
> Maybe we cam simply keep track of the hashes of of each batch being written ? The size of the batch when the data are save in arrow is 10 000 examples. This would only ensure that we don't have duplicates in each batch,
I think that checking for duplicates in every batch independently would be sufficient as the probability of collisions using something like `MD5` is very low. I would be opening a draft PR soon. It would be great to have your guidance. Thanks! | [
0.0275367573,
-0.2159305364,
0.0291702896,
0.4762759805,
0.0684194565,
-0.2363621742,
0.4168981612,
0.0804125518,
0.4312435091,
0.1339117885,
0.1672191322,
0.3502570093,
-0.0206804257,
0.206516102,
-0.0032006167,
0.4027806818,
0.0770775974,
0.0507337637,
-0.3874770999,
-0.1746382117,
-0.5882228017,
0.0452297106,
-0.1532146335,
-0.0614638589,
-0.1678527296,
0.1618545502,
-0.0681425184,
-0.0138255209,
-0.1972760558,
-0.4447281659,
0.2861762643,
0.3954279125,
-0.1313848197,
0.3610022962,
-0.0001243995,
-0.0313455164,
0.0754738376,
-0.1916625053,
-0.5255250335,
0.026202634,
-0.1937692165,
0.09500245,
-0.0176382903,
-0.5688119531,
-0.0537752733,
-0.1629761457,
-0.0972570851,
-0.4674585462,
0.2114742696,
0.2158978432,
0.0896027088,
0.4042153358,
0.3006412983,
0.204203099,
0.2016511112,
0.6070532203,
-0.2093219757,
-0.3547793031,
0.0443221107,
0.3141502738,
0.0819109678,
0.177616477,
0.060621798,
-0.1701101959,
0.2006858885,
0.1464149207,
-0.2246277481,
-0.323405087,
-0.0920047909,
0.3267405331,
0.3529067636,
-0.1715485305,
-0.3823952377,
-0.3127988577,
-0.031310115,
0.1885318607,
0.4732133448,
0.1420392096,
-0.3297614455,
0.004291296,
-0.2719512284,
0.3002656102,
-0.0179661363,
-0.0041727591,
0.258790344,
0.1244734898,
-0.0329473801,
0.0638201535,
0.2017904073,
-0.1953787059,
-0.1708808243,
-0.4019608498,
0.0959564894,
0.3071313202,
-0.1999059767,
-0.2576292753,
0.2660216689,
0.1940440983,
0.4387062788,
0.0169974007,
-0.0074184779,
0.0199900232,
-0.1039314717,
-0.1370510608,
-0.052976761,
0.2784973383,
0.1445690989,
0.0533139445,
0.4216778576,
-0.0334115028,
-0.1720717847,
0.0693689361,
-0.0535319448,
0.0950192511,
0.4306458533,
0.2696842849,
0.3355063498,
0.0252514184,
-0.1482147872,
0.0974797681,
-0.1257558763,
-0.2656872272,
0.2667301893,
0.3143822253,
-0.0797204226,
0.09894339,
-0.1258906126,
0.0694412291,
-0.3220944405,
-0.0343440585,
-0.085337922,
-0.149642095,
-0.0802806243,
-0.0657496005,
0.3642802238,
-0.3379720747,
0.0242794603,
0.2694472671,
-0.2059152275,
-0.2884233594,
-0.1518756896,
-0.0767865777,
0.5315925479,
0.2941077948,
-0.1158167347,
0.0240071565,
0.0686461404,
-0.4160591066,
-0.3097438514,
0.3407131732,
-0.2412343174,
-0.1555794924,
0.2009788752,
0.0987635702,
-0.3604650795,
-0.1261387467,
-0.130660668,
-0.0645980015,
0.3372377753,
0.2071814984,
0.0784949139,
-0.1708254516,
0.1355779767,
-0.4528720081,
0.2073255628,
0.891407907,
-0.1023141891,
-0.0063827261,
-0.152642101,
-0.0278965347,
0.1243740916,
0.3553084731,
-0.0161852501,
0.3325899243,
-0.3431202173,
0.0928568393,
0.171664387,
-0.1076283157,
-0.2139099389,
0.012115512,
0.1867587715,
0.0967979208,
0.5034435391,
0.2218378782,
0.268566668,
-0.0544426367,
-0.2298943847,
0.0698376223,
0.0156063978,
0.060203366,
-0.2132327408,
-0.1308510602,
0.0318854861,
0.0194858983,
-0.0369517766,
0.2195640653,
0.1360975057,
-0.2552813292,
0.0255508348,
-0.2306272388,
0.0509530455,
-0.0563533045,
0.16233325,
0.0917919874,
0.0456482396,
0.4361871779,
-0.4905917346,
0.223052457,
-0.0022499934,
0.1985981762,
-0.4391953647,
-0.2743708491,
-0.0583683662,
0.233192578,
-0.3910269141,
0.1591252089,
0.0221544504,
0.3127869666,
0.313372016,
0.2550626993,
-0.0731581599,
0.0802614465,
-0.0975415185,
0.1954382658,
-0.3723433018,
0.0034483448,
-0.0711762607,
0.0683824942,
-0.0470243767,
0.2644086182,
0.1033376008,
-0.1461704075,
-0.0429863036,
0.2023592442,
0.2752099335,
-0.0221164487,
0.0455039106,
0.3107892573,
0.2325394154,
-0.0491348989,
-0.0383990295,
0.1895339936,
0.1686584949,
0.0750721097,
-0.2943840623,
0.8053556681,
-0.2581630349,
0.0285354182,
-0.002302289,
-0.0071977302,
0.0217749849,
-0.1347506642,
-0.136598289,
-0.188443929,
-0.0732934624,
-0.0163169429,
0.1072861999,
0.4089408219,
-0.2961964011,
0.1576383859,
0.7058495879,
0.0941349566,
0.2832790017,
-0.032123372,
0.1921659559,
-0.0808991343,
-0.2282803506,
0.3368209302,
0.1522256136,
0.1965064853,
0.118586123,
-0.3717748523,
-0.0730495229,
-0.1460592151,
0.0427721776,
-0.1891167164,
-0.3544771075,
0.3523737788,
-0.3063009679,
-0.1038097441,
-0.5338435769,
0.2326878011,
0.1194282621,
0.251612246,
-0.5340342522,
-0.2392491996,
-0.1169462949,
-0.0837990195,
-0.228394866,
-0.1795801818,
-0.0798715651,
-0.3404611349,
0.1645959318,
0.0483223759,
-0.0415060148,
0.2251761556,
-0.0276002549,
0.1776853949,
0.0363353416,
-0.5385169387,
-0.4368277192,
0.0511805899,
-0.1454135925,
-0.0151515678,
0.248191148,
-0.1409252137,
0.3679049015,
-0.3222298622,
0.2253864557,
-0.2745194137,
-0.301422447,
0.0428631417,
-0.15850842,
0.119652167,
-0.0956907272,
-0.0779616684,
-0.0854471251,
-0.0822698623,
0.2423252016,
-0.2479200512,
-0.5795608759,
0.2682211995,
0.0698500276,
-0.1878862381,
-0.2038373947,
-0.5165555477,
-0.0041084085,
0.0617714971,
0.1320421696,
-0.0713652372,
0.1752529442,
0.046107702,
0.1794478595,
-0.1891894639,
0.0000352226,
-0.0443068668,
-0.2693848014,
-0.3226260543,
0.6126976013,
-0.0839338303,
-0.2482607961,
-0.0997936875,
-0.1879332811,
-0.2220842838,
0.1487161368,
-0.3126060069,
0.1589481682,
-0.5614319444,
0.6340061426,
0.2777656615,
0.2941865027,
0.4636283815,
0.0964576975,
0.015165031,
-0.2317610234,
0.0259327069,
0.3365900517,
-0.014384686,
0.2851171792,
0.1721882373,
0.2982103825,
-0.2947058678,
0.4157006443,
0.3359111249,
-0.1027194113,
0.3535642624,
-0.152692154,
0.3624250591,
0.0208123643,
-0.3244894743,
-0.0466853306,
0.1976602674,
0.1448144168,
0.1876152158,
0.0363311246,
0.3886360526,
-0.1072059348,
0.4754825234,
-0.7206187248,
-0.3073938787,
0.0303061698,
-0.1915811747,
0.239602983,
0.0085609332,
0.3000762463,
-0.1423637718,
-0.240300104,
-0.2210788876,
0.3997721672,
0.4897814691,
-0.0650008023,
-0.4595609009,
-0.0350507498,
-0.5776281953,
0.0720781535,
-0.034360677,
0.2558517158,
0.0583172217,
-0.2912877202,
0.1583035588,
-0.1152782515,
0.4106993973,
-0.2006324977,
0.0915496573,
-0.1241661608,
0.1059208661,
-0.1465411484,
0.074377358,
-0.1692646444,
-0.1423260421,
-0.1802764088,
0.5174466372,
-0.5598745346,
-0.1423892677,
0.0348060727,
-0.0109510385,
-0.160813719,
-0.4294214249,
-0.4368859529,
-0.1710218191,
-0.1745036989,
0.1889981478,
-0.0279019177,
0.1397202611,
-0.5259868503,
-0.0763651505,
-0.200700745,
0.1436227709,
0.3456245661,
0.1947357506,
0.3810789883,
0.1793130934,
0.2992998958,
0.1381075531,
0.0127520356,
0.1077307239,
0.6457731128,
-0.0209300071,
-0.1307186484,
-0.1229431331,
-0.3637977242,
-0.234893769,
0.0491309874,
-0.3108318448,
0.1380217969,
0.0838790759,
0.0392891727,
-0.4141132236,
-0.2273482531,
0.2334342152,
-0.0790463313,
-0.3273979425,
-0.4119488001,
0.2217232138,
-0.0523257628,
-0.1161642894,
0.0675452352,
0.380084157,
-0.1981735229,
0.17885378,
0.4224417508,
0.679212749,
-0.358956933,
0.0781863481,
0.1326884031,
0.0002007335,
0.3454468548,
0.1435301751,
0.1005205512,
-0.6070395708,
0.0357896239,
-0.0309855454,
-0.177086249,
-0.1437163353,
-0.0286892466,
-0.3284614086,
-0.2210588008,
0.0313082784,
0.2751148939,
-0.2847682834,
0.4140977263,
-0.1807778031,
-0.2084251344,
0.1361829042,
0.0359392986,
0.127897799,
0.6129821539,
0.1220614687,
0.0329463296,
-0.2541006207,
-0.3859805465,
-0.1389320195,
0.096148029,
-0.1959286779,
0.101078555,
0.1399154067,
-0.1529215276,
0.0752091706,
0.5738861561,
0.6691457033,
0.1494530439,
0.1169736013,
-0.1957572401,
0.2974544764,
0.1938554943,
-0.0434504561,
-0.0402524322,
0.0629057959,
0.2413101494,
-0.2347972691,
-0.239189297,
0.1737241149,
-0.2943580151,
-0.4648042023,
-0.2237488627,
-0.2652674615,
-0.3984828591,
0.4013696015,
-0.1159313396,
-0.2875410914,
-0.1351929009,
0.0114427228,
0.1781584173,
0.1493755877,
0.6839718223,
-0.2366018295,
-0.2745063305,
-0.0755616277,
0.2371228188,
0.1613748819,
0.185430333,
0.3100965619,
0.0506318212,
-0.1598341316,
-0.2896625996,
0.4080943167,
0.1270557046,
-0.6538041234,
0.1584935188,
0.0069573335,
0.1260240078,
0.1320848167,
0.4580088258,
0.0831546485,
0.304546684,
0.0452786162,
-0.4174902737,
-0.3791797161,
0.14218539,
0.1229513586,
0.1663134396,
-0.2781091928,
-0.1295074522,
0.237192452,
-0.0970914513,
-0.2319466472,
-0.2686060667,
-0.0118640512,
-0.0829753876,
0.2023101151,
-0.0000618941,
0.246958971,
0.0123416372,
0.119607687,
-0.3138860166,
-0.2301679999,
-0.046829395,
-0.0646982789,
0.1968929768,
-0.0667048395,
0.2460970879,
-0.3984274268,
-0.2937810123,
-0.0716150701,
-0.2857214212,
0.1225819141,
0.2313950509,
-0.1323326379,
0.3597551882,
0.0998113006,
0.1995749176,
-0.1428153664,
0.1152757555,
-0.1334346235,
-0.0616847314,
0.1036157086,
0.1160410345,
-0.0581946708,
-0.0126063973,
-0.3222412467,
0.2602236569,
0.1303786635,
-0.0295771547,
0.0631704777,
-0.3162483871,
0.1304636449,
0.1253680289,
0.2124866247,
0.4128774107,
0.0213230103,
-0.1599719524,
0.1262921542,
0.1095458791,
-0.0524811484,
-0.0774539709,
-0.1057519913,
0.4045767784,
0.1539438367,
0.5210469365,
-0.0272810534,
-0.0759403855,
-0.0039812475,
-0.1401821375,
0.0401140228,
-0.05535556,
0.0370167792,
0.7215253115,
0.0033209473,
0.023680076,
0.5608685017,
0.0468488298,
-0.3103268445,
0.3334859908,
0.0794758275,
0.2596439421,
-0.0594841391,
0.3316032588,
0.0038182661,
-0.240346238,
0.2577208877,
0.0598206073,
-0.318066299,
0.0827418566,
0.2135328948,
0.2427786887,
-0.0996309891,
0.0139415823,
-0.6906054616,
-0.0261761267,
-0.274320066,
-0.2494877279,
-0.3948240578,
-0.4349915385,
-0.1296161115,
-0.0516814999,
0.0653565153,
0.0837118849,
0.1000912338,
0.1421044171,
-0.0959615707,
-0.3503395021,
0.1130846143,
0.1265849024,
0.3152232468,
-0.2974817157,
0.1314499229,
0.2653689384,
0.1533066928,
0.0023726625,
0.3071098328,
0.2919716537,
0.3392053843,
0.0291712321,
0.2081514448,
-0.1007880419,
-0.1049738079,
-0.1104121357,
0.5324910879,
0.0612864047,
0.0125475284,
0.2630119622,
0.0473060682,
-0.0439804792,
-0.1078522801,
0.0949220881,
0.0566300675,
0.2469433099,
0.3780519664,
0.0062832814,
-0.2240938842,
0.1664493382,
0.2008965164,
-0.1284397542,
-0.2256352305,
0.0752759054,
0.2674503624,
0.0800942481,
-0.4431451261,
0.0444708206,
0.0107637905,
0.3973337412,
0.3050804734,
-0.2235716879,
-0.2529635131,
-0.1469859034,
-0.7591508031,
-0.0828499794,
-0.0884774178,
-0.1693407893,
-0.0722598881,
0.3721688986,
-0.003554333,
0.0900174677,
-0.0112860575,
-0.168304652,
-0.0287198499,
0.454161793,
-0.1920493841,
-0.1011465117,
-0.0437024273,
-0.0857815668,
-0.2175277919,
-0.4019392729,
0.2391231805,
-0.1568983495,
-0.0509432703,
0.0202916004,
0.4017065465,
0.166745469,
-0.1145084947,
0.1857395768,
0.4368844032,
0.5208126307,
0.0604052097,
0.0136407316,
-0.1431028545,
0.0854350626,
-0.0707808882,
0.2464942783,
0.1811535358,
0.3095547259,
0.0287800804,
0.0299922675,
-0.3235033453,
-0.0564060584,
0.2536708117,
-0.1377626956,
-0.0269035362,
0.1137025431,
-0.0217052922,
-0.317278564,
0.1229668632,
0.2679323554,
0.0417125821,
0.116805315,
-0.1234359592,
-0.228472203,
0.0967697501,
-0.2478918582,
0.0329243615,
-0.3760193586,
0.2189299017,
0.1571736932,
-0.0918696523,
-0.2250888646,
0.3122610152,
0.3311513662,
-0.1604463309,
0.0366788134,
0.1225565821,
-0.0565134361,
0.25550282,
-0.0898033828,
0.1513250917,
0.0428156853,
-0.0526724681,
0.3032370806,
-0.1087276787
] |
https://github.com/huggingface/datasets/issues/2229 | `xnli` dataset creating a tuple key while yielding instead of `str` or `int` | Hi ! Sure sounds good. Also if you find other datasets that use tuples instead of str/int, you can also fix them !
thanks :) | When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset.
I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple. | 25 | `xnli` dataset creating a tuple key while yielding instead of `str` or `int`
When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset.
I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple.
Hi ! Sure sounds good. Also if you find other datasets that use tuples instead of str/int, you can also fix them !
thanks :) | [
-0.053938739,
0.0509746969,
0.0451682881,
0.1262667626,
0.2513768673,
0.0173006803,
0.4449457824,
0.2987630069,
0.6008678675,
0.2404716611,
0.1092352867,
0.4075712562,
0.0195066892,
0.2159906179,
-0.0843308344,
-0.0561309606,
-0.0785400271,
0.2352073938,
-0.2244514227,
-0.1137272045,
-0.5031871796,
0.1210043952,
0.0294014215,
0.2606830001,
-0.2010565102,
0.0400425196,
0.1937445253,
0.1910861433,
-0.084092997,
-0.252540946,
0.4881780148,
0.0085605793,
0.0756865144,
0.1829352975,
-0.0001135974,
0.0208704174,
0.2497083992,
-0.0734921545,
-0.468265444,
-0.262937367,
-0.21676144,
0.2286738753,
-0.0234125964,
-0.2467122674,
-0.0012095496,
-0.0569350719,
-0.0672999173,
-0.2611904144,
0.2860366106,
0.1601759791,
0.1450575292,
0.4815441668,
0.0250983462,
-0.1382390708,
0.3516053855,
0.2497400492,
-0.1786915958,
0.1878615618,
0.1838111877,
-0.2809712291,
-0.0479889661,
0.2159284949,
0.2066445053,
0.1380616277,
0.3269075751,
0.2719634175,
0.0823418945,
-0.2623182535,
-0.0093001835,
0.361978054,
0.1439970583,
-0.1113363206,
-0.1411520988,
0.0992558002,
0.1987171918,
-0.2580661178,
0.1839318871,
0.0912620649,
-0.449113965,
-0.0272619016,
0.1974134445,
-0.1070304587,
-0.2575806081,
0.2337971777,
0.0154426321,
0.0173182636,
0.0591295026,
0.1151012853,
0.0064527546,
-0.3979429901,
-0.1829754561,
0.089443624,
0.2683077753,
0.1556874216,
-0.3238299489,
-0.0310985819,
0.119939208,
-0.3682417572,
0.3530476093,
-0.0212665666,
0.1273285449,
0.0893296674,
-0.3878019452,
0.1040476859,
-0.0136975544,
0.0737681165,
0.0256562456,
0.0063197054,
0.3310308754,
-0.138809815,
-0.0538217425,
0.0349735506,
-0.0082265325,
0.0409489237,
-0.0041415244,
-0.1950258315,
0.4094111919,
0.0185403302,
-0.3756033778,
0.2039088756,
0.0801993757,
-0.009229403,
-0.0260077491,
0.3675014079,
0.2517862916,
0.1281283498,
-0.0320258252,
0.1792397797,
-0.2550675869,
-0.4093572795,
-0.2063459158,
-0.0526215769,
-0.0127910227,
0.0976487473,
0.2107612342,
-0.3897714913,
0.0392958447,
0.3133700192,
0.2581051588,
-0.0556730218,
-0.0147762708,
0.0536787994,
-0.0691239387,
0.2281851768,
0.1762596518,
0.1292708814,
0.2934641838,
-0.6828522086,
-0.0041344762,
0.169910863,
-0.5129551291,
-0.3525080979,
-0.2636783421,
0.1806252152,
0.1077659354,
-0.0586752482,
-0.3332092166,
-0.0793849379,
0.0376670659,
0.2584781945,
-0.0324631706,
-0.3713120818,
-0.0931687951,
-0.3605384231,
0.143199116,
0.3623302579,
-0.2543596029,
-0.0424473658,
0.0729088038,
-0.0691700727,
0.1776706576,
0.6391191483,
-0.1121899709,
0.1469336748,
-0.2595927715,
0.2790826857,
0.4829975367,
-0.2314788997,
-0.4842324555,
0.4521033168,
-0.1890468597,
-0.075372979,
0.0764774382,
0.3655756712,
-0.0417427123,
0.0079900287,
0.2896287739,
0.2973433733,
-0.0450820141,
0.0502688959,
-0.3076670766,
-0.2173963487,
0.1462386549,
0.2962855101,
-0.00781783,
0.2304445654,
-0.0029742308,
0.1335353404,
0.2222632319,
-0.3926813602,
0.1300967336,
-0.0981253833,
0.4231388569,
0.1318520755,
0.0693472102,
0.1597892046,
-0.5406088829,
0.2111239284,
-0.0602563098,
0.1853382587,
-0.1759153903,
-0.2527042329,
-0.2737975717,
0.1418506801,
-0.3421967924,
0.2631457746,
0.0014371015,
-0.1117820591,
-0.0338204615,
-0.0560011342,
-0.153044641,
0.1724900603,
-0.3591037989,
0.1286536753,
-0.4930762351,
0.370005995,
-0.0432018787,
-0.019913055,
-0.0034728572,
0.1393669546,
-0.0881555974,
-0.1522150338,
-0.1518665403,
0.2224432081,
0.0088391192,
0.069653213,
0.0315625481,
0.134872511,
0.2902285159,
-0.237673983,
0.0486090034,
0.4267163277,
0.0796890408,
-0.1021375731,
-0.2944550216,
0.6457003355,
-0.2812164426,
0.1006656513,
0.0680833012,
0.1324639469,
0.1876254082,
-0.0304539576,
-0.1810987592,
-0.4469129741,
0.1374974549,
-0.0984273106,
0.133373335,
-0.0339751989,
-0.5189492702,
0.1274168044,
0.4750377536,
0.0838380754,
0.1823891699,
0.3433339894,
-0.0326618887,
0.0029705018,
-0.284430027,
0.3413447142,
0.3974468708,
0.059439484,
-0.1956835091,
-0.0011275932,
-0.3301286995,
-0.2890698016,
0.0736717582,
-0.3107877374,
-0.0680117682,
0.1784966141,
0.073775962,
-0.00210643,
-0.3311928511,
-0.0381829813,
0.0670965761,
0.3988738358,
-0.4998734891,
-0.2168364823,
-0.2133774757,
-0.6131715775,
-0.2112472802,
0.0100627579,
0.115596205,
-0.3808224499,
0.0488856621,
0.1438610256,
-0.0783906952,
-0.0846129954,
0.0677929595,
0.307942301,
0.1276204884,
-0.1672046334,
-0.0977193192,
-0.1523033828,
-0.1734207273,
0.0324888378,
0.1174713522,
-0.0184827372,
0.3863340914,
-0.0920158774,
0.0982085168,
-0.4978986681,
-0.393363446,
0.0216766372,
-0.1079631448,
0.1131493077,
0.2016665488,
0.4266103208,
-0.1588403583,
-0.3726123273,
0.4755392373,
-0.0774611458,
-0.309905529,
0.2457007319,
-0.1300874949,
-0.0226198528,
-0.2289123833,
-0.548178196,
0.0909845605,
-0.3140560091,
0.1613309383,
0.0778834224,
0.2737429142,
0.1724703014,
0.0965673029,
0.0370361395,
0.451077193,
-0.4143406749,
-0.4166815579,
-0.1695426106,
0.3733316362,
-0.3391224742,
-0.49737221,
-0.1566302031,
-0.0388001055,
0.1970476657,
0.1855378002,
-0.3948681951,
0.0366136879,
-0.1812385023,
0.5950683355,
-0.0583580919,
0.0350837708,
0.0124824978,
-0.0552737266,
-0.0447311588,
-0.0964672193,
0.1253857464,
0.3055224121,
0.1056365073,
0.1117877662,
0.4784659147,
0.4796530902,
-0.0443112403,
0.6656318307,
0.3739883304,
-0.1023453176,
0.4134170711,
-0.2668381929,
-0.0025655134,
-0.2134558558,
-0.1091486663,
-0.0565787554,
0.0691796392,
0.2225811779,
0.0634511709,
-0.0777251422,
0.1510552764,
0.0654858723,
0.3232290745,
0.072220251,
-0.3624206185,
0.2906652391,
-0.224456355,
0.0627597794,
-0.0329025052,
-0.0834367722,
-0.1726050824,
-0.1863565743,
0.1566853076,
0.2086079717,
0.2589939833,
0.136447385,
-0.240387395,
-0.0165748782,
-0.503044486,
0.1778529584,
-0.0188090615,
0.4084618092,
-0.1785596907,
-0.0530695319,
0.1145970374,
0.1555854678,
0.4162326455,
-0.2936869562,
0.0790835023,
-0.0931698903,
0.0630031675,
-0.3420487344,
-0.0460145883,
-0.166264832,
-0.2294151783,
-0.0832544118,
0.8664245009,
-0.1325514466,
-0.1677977741,
0.0213309005,
-0.0565344729,
-0.3647376001,
-0.2877302766,
-0.1746886969,
-0.2655871511,
-0.3925247192,
-0.1595255733,
-0.0759655088,
0.0552916229,
-0.0399297029,
0.0405511856,
-0.2076729834,
0.138095513,
0.2477150261,
0.0824547857,
0.1984300017,
0.2575536966,
0.2018100172,
-0.1347910017,
0.0796285644,
0.1580952853,
0.4207831621,
-0.0389666855,
-0.3720775545,
-0.0269156918,
-0.328648448,
0.0262585133,
0.1238001883,
-0.0286089461,
0.2414383888,
-0.1652684212,
0.1863648146,
-0.4104511738,
0.0624073297,
0.3004695475,
-0.132595256,
-0.2000101209,
-0.3252112567,
0.5260789394,
-0.0417511836,
-0.0446025282,
0.3378832936,
0.3154120743,
-0.133225739,
0.6148616076,
0.1929964572,
0.7376443148,
-0.2670451701,
0.1003569588,
0.4510693252,
0.0471984521,
0.6227916479,
-0.0247871503,
-0.1593762934,
-0.3689329028,
-0.3104621172,
-0.0982005447,
-0.1037100703,
-0.1837732643,
0.210372746,
-0.1627422571,
0.1780959666,
-0.122784555,
-0.0312057752,
0.0015534386,
0.4075973332,
-0.0931715965,
-0.3137898445,
-0.0394694507,
0.1043876335,
-0.0838222206,
0.4041212499,
0.0119636692,
-0.0912308693,
-0.0310475156,
-0.2687155008,
-0.2670807242,
0.1149843037,
-0.0249716006,
0.2723200917,
0.1781944931,
-0.3479053974,
0.1799743176,
0.2616091371,
0.5482523441,
-0.1015655547,
-0.0035118368,
-0.0186357033,
0.0723797381,
0.1811475605,
-0.0954221934,
0.0240166001,
0.4749386013,
0.0008447617,
-0.0845987424,
-0.0245379135,
0.1507391185,
-0.17884399,
-0.4634501934,
-0.1758332551,
-0.4185680747,
-0.1969425231,
-0.1440831721,
-0.1827928424,
-0.1211713254,
0.0190528333,
0.0539086871,
-0.0202352665,
0.1569412947,
0.001828678,
0.1977657378,
-0.3082788289,
0.0764581114,
0.116061084,
0.1974800527,
-0.0349116474,
0.5787044168,
0.0987790823,
0.0342709273,
-0.1857765466,
-0.0222373232,
0.496124357,
-0.4041719139,
-0.0059907958,
-0.1479431987,
0.1436948627,
0.139391467,
0.211880073,
0.2655130029,
0.1956615597,
0.0390240923,
-0.4466373622,
-0.4397515655,
0.1911922246,
-0.1775909364,
0.099499315,
-0.2370753586,
0.1441641301,
0.0405682027,
0.0892711952,
-0.2811641991,
0.0547880083,
-0.0115699843,
-0.0834741071,
0.4311932027,
0.2089472413,
-0.0237143282,
0.1546164751,
0.0894481391,
0.042537231,
-0.2589316368,
-0.1430258006,
-0.3218594491,
0.1314430386,
-0.0175118465,
0.0800637081,
0.0103842095,
-0.1721909493,
0.0177124888,
-0.0119694956,
0.3084236383,
0.0717865527,
-0.2504443824,
0.4252162576,
-0.1632288694,
0.2524293661,
-0.0664052069,
0.1118715927,
0.0872989744,
0.4252060652,
0.0118786506,
0.085632652,
-0.0836329535,
-0.0515936017,
-0.7974537015,
0.1531334817,
0.0613585338,
-0.1603003144,
0.074203521,
-0.3296673298,
0.0964332074,
-0.1546337456,
0.0025848001,
0.1083007902,
-0.3812050819,
0.011372149,
0.1066749468,
0.2220422775,
-0.1231630594,
-0.2336770743,
-0.1267966181,
0.082757391,
-0.0241377652,
0.2546178997,
0.1124987155,
0.0503085107,
-0.2499807477,
-0.211912632,
0.1896773279,
-0.6406247616,
-0.0183206592,
0.5483759046,
-0.1121440828,
-0.0709949359,
-0.0248100124,
0.155755654,
-0.084954679,
0.5093197227,
-0.1139647737,
0.1051708981,
0.0673353374,
0.2445562333,
0.2413163334,
-0.1795830131,
-0.0790852159,
0.5982228518,
-0.4374118447,
0.1913984865,
0.3534733653,
0.5119329095,
-0.039730642,
-0.1067261994,
-0.2132661343,
-0.0657822043,
-0.2211238146,
-0.2181429863,
-0.4431684315,
-0.1813255847,
-0.4223667383,
0.1216450334,
-0.1381994337,
0.1312884986,
0.0607584342,
0.2641530633,
-0.0350224115,
-0.3320475221,
0.0163125303,
0.245254159,
0.0997766852,
-0.286154747,
0.1145688072,
0.1956954449,
-0.1253988147,
0.2547962964,
0.1425402611,
0.4778698087,
0.465595603,
0.1104238331,
0.3127037287,
-0.0918579772,
-0.1138937771,
0.0040378645,
0.0501491055,
0.2707979083,
-0.1446052492,
0.3734245002,
0.0871921405,
-0.0824729204,
-0.0947781876,
0.1243963093,
0.2726528347,
-0.1429154724,
0.3773799539,
-0.1605287343,
-0.1043975502,
0.0695941821,
0.0593551472,
-0.2156262994,
0.069035545,
0.3900228739,
0.3381557763,
0.2874899209,
-0.1088163406,
0.0806248784,
-0.1326262206,
0.5759509802,
0.2976175845,
-0.0099776741,
-0.2852283418,
-0.3854355216,
-0.7895965576,
0.1584084481,
-0.0122162756,
-0.0574751236,
0.1738660187,
0.3346883059,
0.1757185161,
0.1005635262,
-0.1425146908,
-0.3924264908,
-0.0489997789,
0.4883736372,
-0.2203852981,
-0.0647056177,
0.1261444688,
-0.0484352484,
-0.1326725483,
-0.41883865,
0.1404300481,
0.204295963,
-0.0421488881,
-0.3748369217,
0.462634325,
0.1275420189,
0.1240854338,
0.1936291307,
0.2329985648,
0.3457583487,
0.0560122952,
-0.1624627709,
-0.1033502668,
-0.2894285321,
-0.3063621521,
0.197995156,
0.1222501919,
0.2882356048,
0.1899715066,
-0.2254142612,
-0.4239665866,
0.0442340933,
0.104109019,
-0.4373057485,
-0.3394858539,
0.1927914321,
-0.1426907629,
-0.1098595485,
0.177723974,
0.3548059464,
0.1743450612,
0.1130028963,
-0.0001795441,
-0.4871050119,
0.2116996944,
-0.2991287112,
-0.2027867138,
-0.0066584647,
0.2682010829,
-0.16676265,
0.0059398618,
-0.3672612309,
0.1299050152,
0.1774537712,
-0.2218389511,
-0.3701562285,
0.1563971043,
0.1018589586,
0.2022552043,
-0.2157155126,
0.3182601929,
0.1456279755,
-0.2757137418,
0.173557356,
-0.2715714872
] |
https://github.com/huggingface/datasets/issues/2229 | `xnli` dataset creating a tuple key while yielding instead of `str` or `int` | @lhoestq I have sent a PR for fixing the issue. Would be great if you could have a look! Thanks! | When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset.
I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple. | 20 | `xnli` dataset creating a tuple key while yielding instead of `str` or `int`
When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset.
I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple.
@lhoestq I have sent a PR for fixing the issue. Would be great if you could have a look! Thanks! | [
-0.0702305585,
0.0961903632,
0.0778555572,
0.1273571104,
0.1900972724,
0.0126102418,
0.4497656822,
0.2994564474,
0.6488565207,
0.1779722124,
0.0878629833,
0.4414200187,
0.0609021559,
0.2075344622,
-0.0426085405,
-0.0038825916,
-0.0590647347,
0.24754408,
-0.2700884938,
-0.1440698951,
-0.4942209721,
0.1290111244,
0.0590815097,
0.2485805899,
-0.1913190782,
0.0619562417,
0.2353728414,
0.2271416485,
-0.0578647107,
-0.2314567119,
0.5725952983,
0.0114077535,
0.0351133123,
0.2210239619,
-0.0001182187,
0.0057878345,
0.2359661907,
-0.0812726021,
-0.4586207867,
-0.2777381539,
-0.1937725395,
0.2858181596,
-0.0185021088,
-0.1956776381,
-0.0241910778,
-0.0318659022,
-0.0890227258,
-0.2912677526,
0.304546535,
0.1411118507,
0.1012163609,
0.5076855421,
-0.0015597939,
-0.1039696932,
0.2827210724,
0.3210790455,
-0.1544618309,
0.2094181031,
0.1812247485,
-0.2964423299,
-0.070719026,
0.2409771979,
0.2307789177,
0.1223840117,
0.3430537283,
0.2623576522,
0.0293434691,
-0.2340621948,
0.0456490554,
0.3561387658,
0.1528030634,
-0.1587790102,
-0.0808356851,
0.1110712513,
0.1855401099,
-0.1912932545,
0.2102701217,
0.0850920454,
-0.4934517145,
-0.0450512804,
0.1714369208,
-0.1658016145,
-0.2685094476,
0.2046646476,
0.0310246646,
0.0256577022,
0.0522599332,
0.1541385055,
-0.0537843667,
-0.3798467219,
-0.1809506565,
0.0566225834,
0.2785690725,
0.1867061257,
-0.3462031782,
-0.0397398137,
0.1426015794,
-0.3174468279,
0.4102701247,
0.0238235034,
0.0719211847,
0.0656377822,
-0.443795234,
0.0565210469,
0.0189708024,
0.0064285994,
0.0634887815,
0.0258462019,
0.3252578676,
-0.1443239748,
-0.0521679856,
0.0622097664,
0.0331529528,
0.0548975095,
-0.0047638938,
-0.2382574081,
0.4292408526,
-0.0054675415,
-0.345338285,
0.2238118052,
0.1361612231,
-0.0346968062,
-0.0265233368,
0.3213920593,
0.2820679843,
0.1355555505,
-0.0640504509,
0.2014311552,
-0.2725862563,
-0.4351238608,
-0.1945150048,
-0.0652185529,
-0.0201774538,
0.1389549971,
0.2019286454,
-0.4108029902,
0.0255993158,
0.3576527238,
0.2412359267,
-0.0624576248,
-0.0854442418,
0.0695407316,
-0.0439072214,
0.2065783292,
0.152837351,
0.1327438354,
0.2927932441,
-0.6724523306,
-0.026455991,
0.148830384,
-0.4627383947,
-0.3408792615,
-0.2876136601,
0.130414933,
0.1075053588,
-0.0338144824,
-0.3273068368,
-0.0331973843,
0.0768313706,
0.3027571738,
-0.0145913586,
-0.3540086448,
-0.1421952695,
-0.3390741348,
0.1374308169,
0.4490888119,
-0.3026033044,
-0.034136489,
0.1084002256,
-0.0395771526,
0.145376876,
0.6637607813,
-0.1132187471,
0.155754149,
-0.2688515186,
0.2169885039,
0.4657372236,
-0.2953679562,
-0.4891301394,
0.5142921209,
-0.24474141,
-0.0906946808,
0.0965172648,
0.3413773477,
-0.0515391454,
0.0072902404,
0.280374825,
0.2847387195,
-0.0704721287,
0.0136054531,
-0.2741327286,
-0.2110414207,
0.1374820471,
0.2579408288,
0.0063832956,
0.2574507594,
-0.0397426262,
0.1318578124,
0.2551367283,
-0.3740133643,
0.1646962166,
-0.1387716681,
0.4423973858,
0.133719027,
0.0754652768,
0.1614756435,
-0.5667371154,
0.2011479884,
-0.0271509774,
0.1870725751,
-0.2295343727,
-0.2263765782,
-0.3379980326,
0.1709309816,
-0.3567270041,
0.2806506455,
-0.0644998103,
-0.1205383837,
-0.0141852126,
-0.0527511984,
-0.1195795015,
0.2179866135,
-0.3730080128,
0.1698508412,
-0.5135228634,
0.3820359111,
0.015153965,
-0.003349185,
-0.0094869211,
0.1608086079,
-0.0974757224,
-0.1528727114,
-0.1390007287,
0.2045147121,
-0.0318152085,
0.0998230129,
0.0785865486,
0.1124181151,
0.3131998777,
-0.2474360764,
0.0973869041,
0.420460999,
0.1018085629,
-0.1078216285,
-0.2806727886,
0.641320467,
-0.26553756,
0.1465581208,
0.0233769864,
0.0997144803,
0.1449087262,
-0.0183357373,
-0.1565015614,
-0.4564205706,
0.0755415782,
-0.0865964144,
0.1723824739,
-0.0415021405,
-0.5107374787,
0.1601004004,
0.4665777087,
0.097800836,
0.1503414959,
0.3520167172,
-0.0461254194,
-0.0372995883,
-0.2707844079,
0.3472123742,
0.4186728001,
0.0066456236,
-0.2218785584,
0.0232525747,
-0.3446955979,
-0.2819948792,
0.0617920421,
-0.3365484476,
-0.0801934376,
0.2138851434,
0.0640868098,
-0.0274222437,
-0.3360662162,
-0.0535807908,
0.0640419424,
0.3513755798,
-0.5140115619,
-0.1834728867,
-0.1738097519,
-0.6247996688,
-0.2197038084,
0.0682753921,
0.1395659,
-0.3413123488,
0.0422629863,
0.1681328863,
-0.027262222,
-0.1199103594,
0.0574181825,
0.3083281815,
0.1335736811,
-0.1832102835,
-0.0579217486,
-0.1691830158,
-0.1520420313,
-0.0155690163,
0.1158931106,
-0.0518908463,
0.3363797069,
-0.091773048,
0.0576456264,
-0.5386186838,
-0.3667122722,
0.0629968047,
-0.132915929,
0.0966962501,
0.1896069944,
0.4263231754,
-0.1497289389,
-0.3702141941,
0.4545183182,
-0.1328842044,
-0.2982058227,
0.2108934373,
-0.1885069907,
0.0058832839,
-0.1925972104,
-0.5648373961,
0.1293584704,
-0.2554284334,
0.1841125637,
0.1010497734,
0.2554555833,
0.1573612988,
0.0598345399,
-0.0213590693,
0.4327560067,
-0.4605202973,
-0.4601736665,
-0.1789411902,
0.3468566537,
-0.3206700087,
-0.4748050272,
-0.1672706455,
-0.0536936596,
0.244861424,
0.1639294028,
-0.372616291,
0.0362476483,
-0.1461518407,
0.6259239912,
-0.0784582496,
0.0563876033,
0.0033463277,
-0.0454085022,
-0.006914001,
-0.103895396,
0.1286155879,
0.3307229877,
0.1364136636,
0.1208574772,
0.5113127232,
0.4578034878,
-0.0726826638,
0.7307403088,
0.3878903985,
-0.0939109921,
0.3839213848,
-0.2607840598,
0.0283579733,
-0.1875330508,
-0.0771838725,
-0.0698274672,
0.0893511772,
0.2247117609,
0.0753250644,
-0.0563581884,
0.2010134608,
0.1043951884,
0.3235480189,
0.084104307,
-0.3629881144,
0.2535821497,
-0.2235084772,
0.034705475,
-0.002383478,
-0.0588001087,
-0.1934447587,
-0.1966072619,
0.1551622748,
0.2092350721,
0.266413331,
0.1493081748,
-0.2545772195,
0.0415281504,
-0.5325754881,
0.14235425,
-0.0342226885,
0.4112563729,
-0.1906431615,
0.0005643368,
0.1026362479,
0.1655979753,
0.4364419878,
-0.2808635235,
0.1209338307,
-0.1033122092,
0.0926187336,
-0.338801384,
-0.0176090896,
-0.1397709697,
-0.2068333477,
-0.1103485599,
0.8588704467,
-0.1347865015,
-0.1666597724,
0.0238161832,
-0.0798941031,
-0.3452744484,
-0.3179734945,
-0.1265579015,
-0.2647452652,
-0.3410580754,
-0.1245570779,
-0.074284181,
0.0384418145,
-0.0410094969,
0.0526352897,
-0.1289286911,
0.131209746,
0.2488938272,
0.0797344744,
0.1856547147,
0.2549164295,
0.2163954824,
-0.1367271692,
0.0458277948,
0.1889097542,
0.4144462943,
-0.007674817,
-0.3783010542,
-0.0580682196,
-0.2949810326,
0.0499799885,
0.1743707806,
-0.0649336576,
0.2576625943,
-0.1459151655,
0.1320276111,
-0.3990786672,
0.0040976219,
0.2709629238,
-0.1203639284,
-0.1829956472,
-0.3075175881,
0.5558340549,
-0.0454289466,
-0.0611484721,
0.3498485982,
0.3161209822,
-0.1454129219,
0.6077870727,
0.1557310075,
0.7579231858,
-0.2664361,
0.0856710076,
0.4314401448,
0.0131018236,
0.6889244318,
-0.0332962237,
-0.2075316459,
-0.3804613054,
-0.2582826614,
-0.1141497344,
-0.0892561451,
-0.1735268384,
0.2237883657,
-0.1204526573,
0.2171320319,
-0.1698040366,
0.0164466947,
0.0066384263,
0.4152496457,
-0.1245248392,
-0.3207077086,
-0.0214952193,
0.0565511137,
-0.047884915,
0.4819025397,
-0.0044264421,
-0.075551644,
-0.0619835779,
-0.265984863,
-0.3030016422,
0.1360495836,
-0.0069831088,
0.2537110746,
0.2293513119,
-0.3981375396,
0.258336544,
0.2784714401,
0.611749053,
-0.1454026848,
-0.041295208,
0.0058249254,
0.1002019495,
0.1814714968,
-0.0793803036,
0.016511362,
0.4528209865,
0.0360204428,
-0.1176941991,
-0.0992384404,
0.1585682929,
-0.176035136,
-0.4426095486,
-0.1919259429,
-0.3512177467,
-0.2392008603,
-0.1000859514,
-0.1758450121,
-0.0948928669,
0.0353995711,
0.0091582686,
-0.0081353914,
0.1550483406,
-0.034356311,
0.1885125488,
-0.2985705137,
0.0654941499,
0.0980416536,
0.2255681753,
-0.0593978837,
0.564396739,
0.1239503473,
0.0638020784,
-0.1736727655,
-0.0883430466,
0.5117588639,
-0.435198009,
-0.0157870129,
-0.1168154329,
0.1396977156,
0.1275134683,
0.2093442678,
0.2713355124,
0.2161750644,
0.0168286189,
-0.4226858914,
-0.423139751,
0.1834540665,
-0.2383050025,
0.0536583476,
-0.2194318622,
0.1762333512,
0.0467203483,
0.1317574084,
-0.2271303087,
0.0118759088,
0.0329937413,
-0.0884260908,
0.4423233867,
0.1974609941,
-0.0189123359,
0.1438002586,
0.0411593653,
0.029259596,
-0.2791414857,
-0.092680715,
-0.2972365618,
0.1576783359,
0.0006594602,
0.0654929504,
0.0041942373,
-0.1479567885,
-0.0172114577,
-0.0138336513,
0.3544196188,
0.0950810611,
-0.2435283661,
0.3452407718,
-0.1411782503,
0.2481028736,
-0.106143266,
0.1093549877,
0.0990748852,
0.4570878446,
-0.0064908713,
0.0978494883,
-0.0868632942,
-0.0579255447,
-0.8441794515,
0.1883460283,
0.0923513025,
-0.1496961415,
0.0531361401,
-0.3454816937,
0.058144778,
-0.1585339308,
0.0026864409,
0.1437488794,
-0.347371459,
-0.0282752849,
0.0961242616,
0.1619207114,
-0.0917382613,
-0.2351214141,
-0.1227780581,
0.0681867152,
-0.0477735177,
0.28565979,
0.1895250082,
0.0495387465,
-0.2613170743,
-0.2105498612,
0.2116842866,
-0.6142408252,
0.0084578022,
0.5428478122,
-0.1165467054,
-0.0191938579,
0.0088781267,
0.1817709804,
-0.1159738153,
0.4868442416,
-0.0580277592,
0.0777163655,
0.0864653736,
0.2649025321,
0.2574900985,
-0.1879972517,
-0.0466610119,
0.5726470947,
-0.4538517296,
0.1783534735,
0.3731359839,
0.5612055659,
-0.0177513584,
-0.1054080427,
-0.2318198085,
-0.0712556988,
-0.2318297476,
-0.2709775865,
-0.4251092672,
-0.1855173707,
-0.3763929605,
0.1644724607,
-0.1437493563,
0.0870298073,
0.0379903167,
0.2201381624,
-0.0508418344,
-0.3381509781,
0.0129772797,
0.2290825844,
0.0797227174,
-0.2487996817,
0.1437989324,
0.1467211992,
-0.116453141,
0.2759447694,
0.1296410114,
0.4179949164,
0.4494102597,
0.1495426446,
0.2901522517,
-0.0621724129,
-0.0972076803,
0.0316518769,
0.0411576889,
0.2337775081,
-0.20438613,
0.3510062695,
0.0440292135,
-0.0471318923,
-0.1450904608,
0.1875877976,
0.2525775135,
-0.1295835674,
0.3547743857,
-0.2098317891,
-0.1167023852,
0.0316070318,
0.0820187852,
-0.167160511,
0.0567478277,
0.3998740613,
0.3546755612,
0.277197659,
-0.1219092757,
0.051608175,
-0.1529569924,
0.5715517402,
0.276827693,
-0.0432032235,
-0.2789272666,
-0.4268169701,
-0.754087925,
0.1668043286,
-0.0210881699,
-0.1192839444,
0.1551037878,
0.3425885737,
0.1806434989,
0.0964583755,
-0.1303141266,
-0.415445298,
-0.0724782348,
0.4477214813,
-0.1774749309,
-0.0388858169,
0.075835526,
-0.0611816719,
-0.1408299506,
-0.4151670933,
0.1325244606,
0.2436688244,
-0.0892501846,
-0.36855492,
0.4689705372,
0.119331263,
0.0884080976,
0.1792709529,
0.2448939979,
0.3682720959,
0.0684038028,
-0.2043872476,
-0.1018877178,
-0.2690261602,
-0.3508323133,
0.2523497641,
0.1051634029,
0.2737440765,
0.1665946245,
-0.217768684,
-0.3813337088,
0.0766943842,
0.157096222,
-0.4420635998,
-0.3601763844,
0.169743076,
-0.1750984639,
-0.1018460542,
0.1536197364,
0.3485891521,
0.1436231136,
0.1322570145,
0.0354238153,
-0.5088874102,
0.1832258701,
-0.3091127872,
-0.2431330979,
-0.0341391973,
0.2914810181,
-0.1942308545,
-0.0635182783,
-0.3391120434,
0.1603286266,
0.1409395486,
-0.2260428965,
-0.3101965189,
0.1264633685,
0.0668040439,
0.2259737998,
-0.2413260937,
0.3000391126,
0.1377904862,
-0.2491008788,
0.1746738404,
-0.2720996141
] |
https://github.com/huggingface/datasets/issues/2226 | Batched map fails when removing all columns | I found the problem. I called `set_format` on some columns before. This makes it crash. Here is a complete example to reproduce:
```python
from datasets import load_dataset
sst = load_dataset("sst")
sst.set_format("torch", columns=["label"], output_all_columns=True)
ds = sst["train"]
# crashes
ds.map(
lambda x: {"a": list(range(20))},
remove_columns=ds.column_names,
load_from_cache_file=False,
num_proc=1,
batched=True,
)
``` | Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_ | 49 | Batched map fails when removing all columns
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_
I found the problem. I called `set_format` on some columns before. This makes it crash. Here is a complete example to reproduce:
```python
from datasets import load_dataset
sst = load_dataset("sst")
sst.set_format("torch", columns=["label"], output_all_columns=True)
ds = sst["train"]
# crashes
ds.map(
lambda x: {"a": list(range(20))},
remove_columns=ds.column_names,
load_from_cache_file=False,
num_proc=1,
batched=True,
)
``` | [
-0.1897989213,
0.1186696589,
0.0169568062,
0.0345562175,
0.2957544625,
0.1997558624,
0.7953291535,
0.3469543457,
0.2681218982,
0.5083373785,
0.1278547943,
0.3986320794,
-0.2221598327,
-0.1497608572,
-0.2561760545,
-0.225854218,
0.1803152263,
0.1939367801,
-0.1543452293,
0.1138283163,
-0.3259885907,
-0.0743559226,
-0.5531978607,
0.1137052923,
0.0998652726,
-0.2811598778,
-0.2459138632,
-0.2607478201,
0.0405269787,
-0.3617533147,
0.0900468975,
-0.250287801,
0.112810865,
0.4839789271,
-0.0001168795,
0.0218305737,
0.1716711223,
-0.0334696732,
-0.1326154917,
0.0640766546,
-0.168795988,
-0.1176633015,
-0.0496757068,
-0.3645477593,
0.5358588696,
-0.2108840495,
-0.3315512538,
-0.3811751008,
-0.0405724458,
0.1007555574,
0.1694880128,
0.1469651908,
-0.0236558393,
0.124383606,
0.1997410059,
-0.0343383662,
-0.1041170731,
-0.0082930643,
0.4995138049,
-0.4657591283,
-0.0907839984,
0.2961732745,
-0.2830582559,
-0.0230159163,
0.1004074812,
-0.0464137755,
0.2637536824,
-0.409045279,
0.1707248688,
0.1164801568,
-0.0180446245,
-0.3284001648,
-0.0548058301,
-0.1845107377,
-0.1374211311,
-0.5785287619,
-0.1803821325,
0.071912311,
-0.2919110954,
-0.1150880158,
-0.4573724568,
0.1599918902,
0.0326214656,
0.1772421449,
-0.0578021482,
0.3028842211,
0.1510881931,
0.5388097763,
0.013868208,
-0.060308665,
-0.0003703535,
-0.0276931711,
0.0329863727,
0.367708981,
-0.4931851327,
-0.1327268481,
-0.0320846401,
-0.1082746387,
0.2840711772,
-0.2979655862,
0.0948095992,
-0.029226806,
0.5917071104,
0.1859063059,
0.4440809488,
0.2730582952,
0.0211041439,
0.132219702,
0.092779845,
-0.0532038659,
0.060841918,
-0.0009544119,
0.2914584279,
-0.0819944516,
0.5020080209,
0.2725431919,
0.0259537622,
-0.007219255,
-0.0752069578,
-0.1586162448,
-0.3384183645,
0.2046278715,
-0.0911612958,
0.0677755326,
0.2737888396,
0.0878866911,
-0.3580185473,
0.1353776604,
-0.0966757089,
-0.1938138753,
-0.1133243591,
0.1158344448,
-0.3451524079,
-0.1509788632,
0.3529440761,
0.1030585021,
0.1164730415,
-0.0047298893,
-0.0107485652,
-0.1193326488,
-0.2432301641,
-0.1289957315,
0.2258377969,
0.0289391279,
0.1047092676,
0.1680702865,
0.2093175054,
0.033626169,
-0.0138566792,
0.2573042214,
-0.0536133945,
-0.3020161688,
-0.134309426,
0.1198308542,
0.0918060392,
0.204054445,
-0.343860954,
0.0384183079,
0.4002184272,
0.0612394512,
0.0008472167,
-0.2906818986,
0.2206572294,
-0.2849721313,
-0.1069673896,
0.258852154,
-0.5109863877,
0.1587153375,
0.0789559707,
0.0771709979,
0.2378592193,
0.2749261558,
-0.2287094593,
0.1179105192,
-0.1785370708,
0.2879098654,
0.1158811077,
-0.1219069064,
-0.1291877925,
0.2582710087,
-0.1710105538,
0.0061791167,
-0.2403121591,
-0.1835014224,
0.6115528941,
-0.2941824198,
0.1319782585,
-0.0414868183,
-0.3053475022,
0.177993089,
-0.1582280397,
-0.2711120844,
-0.047170423,
-0.0894278362,
0.1199705303,
-0.0169770457,
0.3023904562,
-0.4513084888,
0.2286179364,
-0.3265034556,
0.3392169774,
0.4150711894,
0.0918068588,
-0.0351932868,
0.1663979292,
-0.1615534127,
-0.7281158566,
0.1981071979,
0.1456977278,
-0.0879977047,
-0.3534244597,
-0.2648591101,
0.0765318945,
0.1501422524,
0.0226835851,
0.1255520582,
0.0711955503,
-0.2024618536,
0.0510787666,
-0.3482041657,
-0.2364072204,
-0.2209418267,
-0.1390868723,
0.1733430028,
-0.1894965023,
-0.3441659212,
-0.02797544,
-0.3571985662,
-0.0204040855,
0.1966485977,
0.2393563092,
-0.1307831556,
-0.0186507069,
0.4590830505,
-0.1979589909,
-0.0776888877,
-0.4247605503,
-0.0810872763,
-0.0454146042,
-0.0406254977,
-0.0342592746,
-0.1599498689,
0.1424511224,
-0.1447393149,
-0.301145494,
0.0029286444,
-0.2381205261,
0.5006265044,
-0.1498276442,
-0.0373832472,
-0.0561356731,
0.0231336281,
-0.0771552026,
-0.1531375647,
-0.109675929,
-0.0489472747,
-0.2542675734,
-0.0305233654,
0.0260867104,
-0.1773487628,
0.2219045162,
-0.041984126,
0.0335538164,
-0.0073626144,
-0.2589178085,
0.002791591,
0.339519769,
-0.0899919197,
0.4603511691,
0.1365824491,
0.0819974691,
-0.0418758094,
0.1916160882,
0.0838155001,
0.1106003895,
0.2706132233,
0.0925673544,
0.075621672,
0.3986672759,
0.0161472559,
-0.2661883235,
-0.3510771096,
0.175314635,
0.4957441986,
-0.2044827938,
-0.0438004211,
-0.0830237046,
0.0995051041,
0.2236657441,
-0.1830219328,
0.0713534057,
-0.4394609034,
-0.1476134807,
0.1156399474,
-0.1264732033,
0.2542536557,
-0.1595221162,
-0.060821712,
0.1876653135,
-0.0264902562,
-0.1460788995,
-0.1495200992,
-0.1710769385,
0.0146623477,
-0.0350827947,
-0.1445780545,
0.0407586992,
0.4789996147,
-0.3435451388,
-0.2255328,
-0.0635435134,
-0.0063209441,
-0.5026287436,
-0.0688746795,
0.3389750123,
0.2059356868,
-0.303593576,
-0.1560990065,
0.0831781924,
-0.1239540875,
0.0785740018,
0.2210019827,
0.1313581169,
-0.104757145,
-0.2336307317,
0.1117872223,
0.0731344223,
-0.2843957841,
0.1609166414,
-0.120042488,
0.2389972508,
-0.2521991134,
0.2278799415,
-0.2472717464,
-0.0553630441,
-0.4037475586,
0.0974971652,
-0.0106983408,
0.1542844325,
0.1120021045,
-0.0112327449,
0.045194909,
-0.0525669791,
0.0329917707,
0.3330427408,
-0.3355278373,
0.0463393666,
-0.102691628,
0.1352233142,
-0.003296219,
0.2326378077,
0.3257706463,
0.2052080333,
0.0374390595,
-0.0169253424,
-0.1642135978,
0.0817854255,
-0.0682315156,
-0.0038804971,
0.0999060348,
0.4984066486,
0.2369373143,
0.5979440212,
0.2042804509,
-0.0856825039,
0.0948240757,
-0.1327354163,
0.0399420485,
-0.1180511862,
-0.3469353914,
0.0949326903,
-0.3334670663,
-0.0153745003,
0.0916314721,
-0.1429186761,
-0.5661894083,
0.0262779295,
0.3182718158,
0.0356093049,
-0.2705045342,
0.2294886857,
-0.2429614663,
0.2372478843,
0.1168125421,
0.019995667,
-0.2669149637,
-0.1107122526,
0.2998272181,
-0.3833628297,
0.1725096107,
-0.2118996233,
-0.3650293052,
-0.0065126456,
-0.7440905571,
0.4507889748,
0.0828429833,
0.3523314297,
0.1741856039,
-0.0121686012,
0.0209384765,
0.1607971787,
0.4166470468,
-0.2360413224,
-0.1881225854,
0.1594665349,
0.1826754063,
-0.4863574505,
-0.0572044775,
-0.3145471513,
0.1810837984,
0.2628194094,
0.8223781586,
-0.3449786901,
-0.0785234571,
0.3561528325,
0.1908118874,
0.0819738805,
-0.1069039851,
-0.1756307632,
-0.2924112678,
-0.11214149,
0.1398424357,
0.3096799254,
0.1881920993,
0.1740520597,
-0.2482348531,
0.0171872135,
-0.1449329257,
0.1038186997,
0.020053938,
-0.0551288649,
-0.1025981009,
0.0748114586,
-0.1875822842,
0.0197032019,
0.098522678,
0.1518203169,
-0.2780479789,
-0.118398279,
0.0980389938,
-0.1654562354,
0.5431215763,
0.2424984872,
0.0117666125,
0.1635086238,
-0.3425571918,
0.3598183692,
0.1224118024,
-0.4356709421,
0.3494389057,
0.036477942,
-0.3460502923,
0.1196428835,
0.2144175917,
0.2063299119,
-0.0323675275,
0.7606868148,
0.0132845305,
-0.2412762642,
0.7118184566,
0.1966299564,
0.6759188175,
-0.1432673335,
-0.0712215677,
0.2902080715,
0.3608820736,
0.2842658758,
0.1126969755,
0.381162107,
-0.3241282701,
-0.0603735484,
0.003322877,
-0.0351571031,
0.1903506368,
0.4072135687,
0.0292366073,
0.3826388121,
-0.1521285474,
0.4469074905,
-0.0252744891,
-0.1773910075,
0.1236898229,
-0.3599651158,
0.0880283788,
0.0208681934,
0.0461227037,
-0.12137869,
-0.0826370269,
0.0984833017,
0.0594395772,
-0.3395922482,
-0.1458569169,
-0.0059601888,
-0.2831455469,
0.2795832157,
-0.0178862885,
-0.0235915929,
-0.0276549719,
0.1857580394,
-0.1375503838,
0.0231043156,
0.2528838217,
-0.0234126262,
0.5783455372,
0.1532381177,
0.0718973801,
0.0801610872,
-0.3442003429,
0.0582825541,
-0.0581077635,
0.1441700161,
-0.2681711316,
-0.291772306,
-0.3978099227,
0.302023083,
0.2278289795,
-0.4201091528,
-0.1749860793,
-0.181971401,
-0.0289868861,
-0.249311775,
0.0179119557,
-0.1120728403,
-0.1037061512,
0.7665063739,
-0.1971291155,
-0.2018837333,
0.0001164554,
0.0542827509,
-0.010372499,
-0.007302098,
0.5093957186,
0.1933066696,
-0.1906852126,
-0.144767046,
-0.1147608683,
0.2298500836,
-0.4227206409,
0.1481420547,
-0.3345043063,
0.3107252717,
0.1378766596,
0.3870109916,
-0.056154985,
0.1035896391,
-0.058728911,
-0.1376464665,
-0.3454746604,
0.2268031389,
0.2731827796,
0.2479774356,
0.0099826455,
0.0238750651,
-0.2870253921,
0.1395941079,
-0.2310720682,
0.1292948127,
0.0296755508,
0.4705126584,
0.2248269022,
0.1841875613,
-0.0637199879,
0.1222632825,
0.1711613536,
0.3236604035,
0.228215754,
-0.1890605986,
0.0871446431,
0.0845168978,
0.041425433,
-0.0440469123,
0.0407925956,
-0.1662179232,
-0.2258952111,
-0.2493456006,
0.2834928632,
0.2077131271,
-0.1348534673,
-0.0511006825,
0.2674015462,
0.0906684548,
-0.0091013461,
0.116596207,
-0.2273989171,
-0.0828393996,
0.1396967024,
0.3365558684,
0.1446776837,
-0.0922281593,
0.0380745009,
0.079216972,
-0.1854951382,
0.1861374825,
0.274154067,
-0.3076931834,
-0.0741832405,
-0.0205285512,
0.3571770191,
0.1077170074,
-0.2655856013,
-0.1578712463,
0.0943284929,
0.1932019144,
-0.0930129886,
0.0147832185,
0.3097126484,
0.3044719398,
0.240304485,
0.4139224291,
0.0311293155,
-0.4228914678,
-0.1355921775,
-0.0868847817,
0.5410782099,
-0.1324591339,
-0.292445749,
0.6839468479,
-0.1482611597,
-0.0108298622,
0.2884372473,
0.1919951439,
0.3235798776,
0.5047323108,
-0.0714928657,
0.085369505,
0.3333713114,
0.10423439,
-0.2822677195,
-0.4482126832,
0.208596319,
0.2342998832,
0.0912758335,
0.1438352019,
0.178340435,
0.0890336782,
-0.0002727583,
-0.2167527974,
0.2180000544,
0.2582805157,
-0.3013063073,
-0.0257251821,
-0.364698261,
-0.0765606016,
0.192611441,
-0.0516906977,
-0.1579219401,
-0.1624597311,
0.5937283039,
0.0620206669,
-0.0564190373,
-0.3340181112,
-0.1528504044,
-0.0166741349,
0.3545718789,
-0.1517576128,
0.1551137418,
0.0096702315,
0.0895558894,
-0.2272721678,
0.087920621,
0.4263057709,
0.3567661941,
0.0829302073,
0.0477262512,
-0.1091135144,
-0.1831457019,
-0.030031953,
0.1075924337,
0.216402173,
0.3985658884,
0.3411515951,
0.0027499683,
-0.067481935,
-0.0332265943,
0.3050501943,
0.1356131732,
-0.0164145045,
-0.0335910954,
0.0403950028,
-0.496153295,
-0.1215940788,
-0.2080628127,
-0.0198327303,
-0.2020415366,
0.398504585,
-0.1470505446,
0.238756299,
0.0221790299,
0.058873035,
-0.0984588265,
0.0365583822,
0.4919876754,
-0.3134091198,
-0.549947083,
-0.2050668746,
-0.3719428778,
-0.0011595413,
-0.7319380045,
-0.0049585849,
0.2208575457,
0.1944054216,
0.1252503991,
0.0747247338,
0.0763460323,
0.1676182598,
-0.2411888838,
0.867572248,
-0.3371378779,
0.0864994377,
-0.0816277713,
0.0118992086,
0.0936869979,
-0.5087841749,
0.4204277694,
0.2190041393,
0.0183360726,
-0.1565003544,
-0.0141720697,
0.1934941709,
-0.1132708937,
0.3862442672,
0.0413534343,
0.0781788379,
0.1850651503,
-0.3118220568,
-0.3471717238,
0.0969080478,
-0.1761686504,
0.1207803637,
0.2130405605,
0.1897469759,
-0.0584037453,
0.0200456996,
-0.0797781795,
0.0548648275,
-0.0549626276,
0.0551301241,
-0.153667897,
0.1488112062,
0.0846774653,
0.1772117168,
0.0675943643,
0.0562536754,
0.1116032749,
0.2221061289,
-0.3874031901,
-0.3115009665,
0.4752248228,
-0.7607834935,
-0.6713261604,
-0.0875398368,
0.0665980652,
0.0903245807,
-0.156989634,
-0.3100398779,
-0.0200974643,
0.2628045678,
-0.193192631,
-0.1906291246,
-0.0052618217,
-0.3285935819,
0.0072533339,
-0.0165185928,
0.0777006447,
0.0896189809,
-0.1323934793,
-0.0028245375,
-0.3992701471
] |
https://github.com/huggingface/datasets/issues/2226 | Batched map fails when removing all columns | Thanks for reporting and for providing this code to reproduce the issue, this is really helpful ! | Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_ | 17 | Batched map fails when removing all columns
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_
Thanks for reporting and for providing this code to reproduce the issue, this is really helpful ! | [
-0.1897989213,
0.1186696589,
0.0169568062,
0.0345562175,
0.2957544625,
0.1997558624,
0.7953291535,
0.3469543457,
0.2681218982,
0.5083373785,
0.1278547943,
0.3986320794,
-0.2221598327,
-0.1497608572,
-0.2561760545,
-0.225854218,
0.1803152263,
0.1939367801,
-0.1543452293,
0.1138283163,
-0.3259885907,
-0.0743559226,
-0.5531978607,
0.1137052923,
0.0998652726,
-0.2811598778,
-0.2459138632,
-0.2607478201,
0.0405269787,
-0.3617533147,
0.0900468975,
-0.250287801,
0.112810865,
0.4839789271,
-0.0001168795,
0.0218305737,
0.1716711223,
-0.0334696732,
-0.1326154917,
0.0640766546,
-0.168795988,
-0.1176633015,
-0.0496757068,
-0.3645477593,
0.5358588696,
-0.2108840495,
-0.3315512538,
-0.3811751008,
-0.0405724458,
0.1007555574,
0.1694880128,
0.1469651908,
-0.0236558393,
0.124383606,
0.1997410059,
-0.0343383662,
-0.1041170731,
-0.0082930643,
0.4995138049,
-0.4657591283,
-0.0907839984,
0.2961732745,
-0.2830582559,
-0.0230159163,
0.1004074812,
-0.0464137755,
0.2637536824,
-0.409045279,
0.1707248688,
0.1164801568,
-0.0180446245,
-0.3284001648,
-0.0548058301,
-0.1845107377,
-0.1374211311,
-0.5785287619,
-0.1803821325,
0.071912311,
-0.2919110954,
-0.1150880158,
-0.4573724568,
0.1599918902,
0.0326214656,
0.1772421449,
-0.0578021482,
0.3028842211,
0.1510881931,
0.5388097763,
0.013868208,
-0.060308665,
-0.0003703535,
-0.0276931711,
0.0329863727,
0.367708981,
-0.4931851327,
-0.1327268481,
-0.0320846401,
-0.1082746387,
0.2840711772,
-0.2979655862,
0.0948095992,
-0.029226806,
0.5917071104,
0.1859063059,
0.4440809488,
0.2730582952,
0.0211041439,
0.132219702,
0.092779845,
-0.0532038659,
0.060841918,
-0.0009544119,
0.2914584279,
-0.0819944516,
0.5020080209,
0.2725431919,
0.0259537622,
-0.007219255,
-0.0752069578,
-0.1586162448,
-0.3384183645,
0.2046278715,
-0.0911612958,
0.0677755326,
0.2737888396,
0.0878866911,
-0.3580185473,
0.1353776604,
-0.0966757089,
-0.1938138753,
-0.1133243591,
0.1158344448,
-0.3451524079,
-0.1509788632,
0.3529440761,
0.1030585021,
0.1164730415,
-0.0047298893,
-0.0107485652,
-0.1193326488,
-0.2432301641,
-0.1289957315,
0.2258377969,
0.0289391279,
0.1047092676,
0.1680702865,
0.2093175054,
0.033626169,
-0.0138566792,
0.2573042214,
-0.0536133945,
-0.3020161688,
-0.134309426,
0.1198308542,
0.0918060392,
0.204054445,
-0.343860954,
0.0384183079,
0.4002184272,
0.0612394512,
0.0008472167,
-0.2906818986,
0.2206572294,
-0.2849721313,
-0.1069673896,
0.258852154,
-0.5109863877,
0.1587153375,
0.0789559707,
0.0771709979,
0.2378592193,
0.2749261558,
-0.2287094593,
0.1179105192,
-0.1785370708,
0.2879098654,
0.1158811077,
-0.1219069064,
-0.1291877925,
0.2582710087,
-0.1710105538,
0.0061791167,
-0.2403121591,
-0.1835014224,
0.6115528941,
-0.2941824198,
0.1319782585,
-0.0414868183,
-0.3053475022,
0.177993089,
-0.1582280397,
-0.2711120844,
-0.047170423,
-0.0894278362,
0.1199705303,
-0.0169770457,
0.3023904562,
-0.4513084888,
0.2286179364,
-0.3265034556,
0.3392169774,
0.4150711894,
0.0918068588,
-0.0351932868,
0.1663979292,
-0.1615534127,
-0.7281158566,
0.1981071979,
0.1456977278,
-0.0879977047,
-0.3534244597,
-0.2648591101,
0.0765318945,
0.1501422524,
0.0226835851,
0.1255520582,
0.0711955503,
-0.2024618536,
0.0510787666,
-0.3482041657,
-0.2364072204,
-0.2209418267,
-0.1390868723,
0.1733430028,
-0.1894965023,
-0.3441659212,
-0.02797544,
-0.3571985662,
-0.0204040855,
0.1966485977,
0.2393563092,
-0.1307831556,
-0.0186507069,
0.4590830505,
-0.1979589909,
-0.0776888877,
-0.4247605503,
-0.0810872763,
-0.0454146042,
-0.0406254977,
-0.0342592746,
-0.1599498689,
0.1424511224,
-0.1447393149,
-0.301145494,
0.0029286444,
-0.2381205261,
0.5006265044,
-0.1498276442,
-0.0373832472,
-0.0561356731,
0.0231336281,
-0.0771552026,
-0.1531375647,
-0.109675929,
-0.0489472747,
-0.2542675734,
-0.0305233654,
0.0260867104,
-0.1773487628,
0.2219045162,
-0.041984126,
0.0335538164,
-0.0073626144,
-0.2589178085,
0.002791591,
0.339519769,
-0.0899919197,
0.4603511691,
0.1365824491,
0.0819974691,
-0.0418758094,
0.1916160882,
0.0838155001,
0.1106003895,
0.2706132233,
0.0925673544,
0.075621672,
0.3986672759,
0.0161472559,
-0.2661883235,
-0.3510771096,
0.175314635,
0.4957441986,
-0.2044827938,
-0.0438004211,
-0.0830237046,
0.0995051041,
0.2236657441,
-0.1830219328,
0.0713534057,
-0.4394609034,
-0.1476134807,
0.1156399474,
-0.1264732033,
0.2542536557,
-0.1595221162,
-0.060821712,
0.1876653135,
-0.0264902562,
-0.1460788995,
-0.1495200992,
-0.1710769385,
0.0146623477,
-0.0350827947,
-0.1445780545,
0.0407586992,
0.4789996147,
-0.3435451388,
-0.2255328,
-0.0635435134,
-0.0063209441,
-0.5026287436,
-0.0688746795,
0.3389750123,
0.2059356868,
-0.303593576,
-0.1560990065,
0.0831781924,
-0.1239540875,
0.0785740018,
0.2210019827,
0.1313581169,
-0.104757145,
-0.2336307317,
0.1117872223,
0.0731344223,
-0.2843957841,
0.1609166414,
-0.120042488,
0.2389972508,
-0.2521991134,
0.2278799415,
-0.2472717464,
-0.0553630441,
-0.4037475586,
0.0974971652,
-0.0106983408,
0.1542844325,
0.1120021045,
-0.0112327449,
0.045194909,
-0.0525669791,
0.0329917707,
0.3330427408,
-0.3355278373,
0.0463393666,
-0.102691628,
0.1352233142,
-0.003296219,
0.2326378077,
0.3257706463,
0.2052080333,
0.0374390595,
-0.0169253424,
-0.1642135978,
0.0817854255,
-0.0682315156,
-0.0038804971,
0.0999060348,
0.4984066486,
0.2369373143,
0.5979440212,
0.2042804509,
-0.0856825039,
0.0948240757,
-0.1327354163,
0.0399420485,
-0.1180511862,
-0.3469353914,
0.0949326903,
-0.3334670663,
-0.0153745003,
0.0916314721,
-0.1429186761,
-0.5661894083,
0.0262779295,
0.3182718158,
0.0356093049,
-0.2705045342,
0.2294886857,
-0.2429614663,
0.2372478843,
0.1168125421,
0.019995667,
-0.2669149637,
-0.1107122526,
0.2998272181,
-0.3833628297,
0.1725096107,
-0.2118996233,
-0.3650293052,
-0.0065126456,
-0.7440905571,
0.4507889748,
0.0828429833,
0.3523314297,
0.1741856039,
-0.0121686012,
0.0209384765,
0.1607971787,
0.4166470468,
-0.2360413224,
-0.1881225854,
0.1594665349,
0.1826754063,
-0.4863574505,
-0.0572044775,
-0.3145471513,
0.1810837984,
0.2628194094,
0.8223781586,
-0.3449786901,
-0.0785234571,
0.3561528325,
0.1908118874,
0.0819738805,
-0.1069039851,
-0.1756307632,
-0.2924112678,
-0.11214149,
0.1398424357,
0.3096799254,
0.1881920993,
0.1740520597,
-0.2482348531,
0.0171872135,
-0.1449329257,
0.1038186997,
0.020053938,
-0.0551288649,
-0.1025981009,
0.0748114586,
-0.1875822842,
0.0197032019,
0.098522678,
0.1518203169,
-0.2780479789,
-0.118398279,
0.0980389938,
-0.1654562354,
0.5431215763,
0.2424984872,
0.0117666125,
0.1635086238,
-0.3425571918,
0.3598183692,
0.1224118024,
-0.4356709421,
0.3494389057,
0.036477942,
-0.3460502923,
0.1196428835,
0.2144175917,
0.2063299119,
-0.0323675275,
0.7606868148,
0.0132845305,
-0.2412762642,
0.7118184566,
0.1966299564,
0.6759188175,
-0.1432673335,
-0.0712215677,
0.2902080715,
0.3608820736,
0.2842658758,
0.1126969755,
0.381162107,
-0.3241282701,
-0.0603735484,
0.003322877,
-0.0351571031,
0.1903506368,
0.4072135687,
0.0292366073,
0.3826388121,
-0.1521285474,
0.4469074905,
-0.0252744891,
-0.1773910075,
0.1236898229,
-0.3599651158,
0.0880283788,
0.0208681934,
0.0461227037,
-0.12137869,
-0.0826370269,
0.0984833017,
0.0594395772,
-0.3395922482,
-0.1458569169,
-0.0059601888,
-0.2831455469,
0.2795832157,
-0.0178862885,
-0.0235915929,
-0.0276549719,
0.1857580394,
-0.1375503838,
0.0231043156,
0.2528838217,
-0.0234126262,
0.5783455372,
0.1532381177,
0.0718973801,
0.0801610872,
-0.3442003429,
0.0582825541,
-0.0581077635,
0.1441700161,
-0.2681711316,
-0.291772306,
-0.3978099227,
0.302023083,
0.2278289795,
-0.4201091528,
-0.1749860793,
-0.181971401,
-0.0289868861,
-0.249311775,
0.0179119557,
-0.1120728403,
-0.1037061512,
0.7665063739,
-0.1971291155,
-0.2018837333,
0.0001164554,
0.0542827509,
-0.010372499,
-0.007302098,
0.5093957186,
0.1933066696,
-0.1906852126,
-0.144767046,
-0.1147608683,
0.2298500836,
-0.4227206409,
0.1481420547,
-0.3345043063,
0.3107252717,
0.1378766596,
0.3870109916,
-0.056154985,
0.1035896391,
-0.058728911,
-0.1376464665,
-0.3454746604,
0.2268031389,
0.2731827796,
0.2479774356,
0.0099826455,
0.0238750651,
-0.2870253921,
0.1395941079,
-0.2310720682,
0.1292948127,
0.0296755508,
0.4705126584,
0.2248269022,
0.1841875613,
-0.0637199879,
0.1222632825,
0.1711613536,
0.3236604035,
0.228215754,
-0.1890605986,
0.0871446431,
0.0845168978,
0.041425433,
-0.0440469123,
0.0407925956,
-0.1662179232,
-0.2258952111,
-0.2493456006,
0.2834928632,
0.2077131271,
-0.1348534673,
-0.0511006825,
0.2674015462,
0.0906684548,
-0.0091013461,
0.116596207,
-0.2273989171,
-0.0828393996,
0.1396967024,
0.3365558684,
0.1446776837,
-0.0922281593,
0.0380745009,
0.079216972,
-0.1854951382,
0.1861374825,
0.274154067,
-0.3076931834,
-0.0741832405,
-0.0205285512,
0.3571770191,
0.1077170074,
-0.2655856013,
-0.1578712463,
0.0943284929,
0.1932019144,
-0.0930129886,
0.0147832185,
0.3097126484,
0.3044719398,
0.240304485,
0.4139224291,
0.0311293155,
-0.4228914678,
-0.1355921775,
-0.0868847817,
0.5410782099,
-0.1324591339,
-0.292445749,
0.6839468479,
-0.1482611597,
-0.0108298622,
0.2884372473,
0.1919951439,
0.3235798776,
0.5047323108,
-0.0714928657,
0.085369505,
0.3333713114,
0.10423439,
-0.2822677195,
-0.4482126832,
0.208596319,
0.2342998832,
0.0912758335,
0.1438352019,
0.178340435,
0.0890336782,
-0.0002727583,
-0.2167527974,
0.2180000544,
0.2582805157,
-0.3013063073,
-0.0257251821,
-0.364698261,
-0.0765606016,
0.192611441,
-0.0516906977,
-0.1579219401,
-0.1624597311,
0.5937283039,
0.0620206669,
-0.0564190373,
-0.3340181112,
-0.1528504044,
-0.0166741349,
0.3545718789,
-0.1517576128,
0.1551137418,
0.0096702315,
0.0895558894,
-0.2272721678,
0.087920621,
0.4263057709,
0.3567661941,
0.0829302073,
0.0477262512,
-0.1091135144,
-0.1831457019,
-0.030031953,
0.1075924337,
0.216402173,
0.3985658884,
0.3411515951,
0.0027499683,
-0.067481935,
-0.0332265943,
0.3050501943,
0.1356131732,
-0.0164145045,
-0.0335910954,
0.0403950028,
-0.496153295,
-0.1215940788,
-0.2080628127,
-0.0198327303,
-0.2020415366,
0.398504585,
-0.1470505446,
0.238756299,
0.0221790299,
0.058873035,
-0.0984588265,
0.0365583822,
0.4919876754,
-0.3134091198,
-0.549947083,
-0.2050668746,
-0.3719428778,
-0.0011595413,
-0.7319380045,
-0.0049585849,
0.2208575457,
0.1944054216,
0.1252503991,
0.0747247338,
0.0763460323,
0.1676182598,
-0.2411888838,
0.867572248,
-0.3371378779,
0.0864994377,
-0.0816277713,
0.0118992086,
0.0936869979,
-0.5087841749,
0.4204277694,
0.2190041393,
0.0183360726,
-0.1565003544,
-0.0141720697,
0.1934941709,
-0.1132708937,
0.3862442672,
0.0413534343,
0.0781788379,
0.1850651503,
-0.3118220568,
-0.3471717238,
0.0969080478,
-0.1761686504,
0.1207803637,
0.2130405605,
0.1897469759,
-0.0584037453,
0.0200456996,
-0.0797781795,
0.0548648275,
-0.0549626276,
0.0551301241,
-0.153667897,
0.1488112062,
0.0846774653,
0.1772117168,
0.0675943643,
0.0562536754,
0.1116032749,
0.2221061289,
-0.3874031901,
-0.3115009665,
0.4752248228,
-0.7607834935,
-0.6713261604,
-0.0875398368,
0.0665980652,
0.0903245807,
-0.156989634,
-0.3100398779,
-0.0200974643,
0.2628045678,
-0.193192631,
-0.1906291246,
-0.0052618217,
-0.3285935819,
0.0072533339,
-0.0165185928,
0.0777006447,
0.0896189809,
-0.1323934793,
-0.0028245375,
-0.3992701471
] |
https://github.com/huggingface/datasets/issues/2226 | Batched map fails when removing all columns | I merged a fix, it should work on `master` now :)
We'll do a new release soon ! | Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_ | 18 | Batched map fails when removing all columns
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_
I merged a fix, it should work on `master` now :)
We'll do a new release soon ! | [
-0.1897989213,
0.1186696589,
0.0169568062,
0.0345562175,
0.2957544625,
0.1997558624,
0.7953291535,
0.3469543457,
0.2681218982,
0.5083373785,
0.1278547943,
0.3986320794,
-0.2221598327,
-0.1497608572,
-0.2561760545,
-0.225854218,
0.1803152263,
0.1939367801,
-0.1543452293,
0.1138283163,
-0.3259885907,
-0.0743559226,
-0.5531978607,
0.1137052923,
0.0998652726,
-0.2811598778,
-0.2459138632,
-0.2607478201,
0.0405269787,
-0.3617533147,
0.0900468975,
-0.250287801,
0.112810865,
0.4839789271,
-0.0001168795,
0.0218305737,
0.1716711223,
-0.0334696732,
-0.1326154917,
0.0640766546,
-0.168795988,
-0.1176633015,
-0.0496757068,
-0.3645477593,
0.5358588696,
-0.2108840495,
-0.3315512538,
-0.3811751008,
-0.0405724458,
0.1007555574,
0.1694880128,
0.1469651908,
-0.0236558393,
0.124383606,
0.1997410059,
-0.0343383662,
-0.1041170731,
-0.0082930643,
0.4995138049,
-0.4657591283,
-0.0907839984,
0.2961732745,
-0.2830582559,
-0.0230159163,
0.1004074812,
-0.0464137755,
0.2637536824,
-0.409045279,
0.1707248688,
0.1164801568,
-0.0180446245,
-0.3284001648,
-0.0548058301,
-0.1845107377,
-0.1374211311,
-0.5785287619,
-0.1803821325,
0.071912311,
-0.2919110954,
-0.1150880158,
-0.4573724568,
0.1599918902,
0.0326214656,
0.1772421449,
-0.0578021482,
0.3028842211,
0.1510881931,
0.5388097763,
0.013868208,
-0.060308665,
-0.0003703535,
-0.0276931711,
0.0329863727,
0.367708981,
-0.4931851327,
-0.1327268481,
-0.0320846401,
-0.1082746387,
0.2840711772,
-0.2979655862,
0.0948095992,
-0.029226806,
0.5917071104,
0.1859063059,
0.4440809488,
0.2730582952,
0.0211041439,
0.132219702,
0.092779845,
-0.0532038659,
0.060841918,
-0.0009544119,
0.2914584279,
-0.0819944516,
0.5020080209,
0.2725431919,
0.0259537622,
-0.007219255,
-0.0752069578,
-0.1586162448,
-0.3384183645,
0.2046278715,
-0.0911612958,
0.0677755326,
0.2737888396,
0.0878866911,
-0.3580185473,
0.1353776604,
-0.0966757089,
-0.1938138753,
-0.1133243591,
0.1158344448,
-0.3451524079,
-0.1509788632,
0.3529440761,
0.1030585021,
0.1164730415,
-0.0047298893,
-0.0107485652,
-0.1193326488,
-0.2432301641,
-0.1289957315,
0.2258377969,
0.0289391279,
0.1047092676,
0.1680702865,
0.2093175054,
0.033626169,
-0.0138566792,
0.2573042214,
-0.0536133945,
-0.3020161688,
-0.134309426,
0.1198308542,
0.0918060392,
0.204054445,
-0.343860954,
0.0384183079,
0.4002184272,
0.0612394512,
0.0008472167,
-0.2906818986,
0.2206572294,
-0.2849721313,
-0.1069673896,
0.258852154,
-0.5109863877,
0.1587153375,
0.0789559707,
0.0771709979,
0.2378592193,
0.2749261558,
-0.2287094593,
0.1179105192,
-0.1785370708,
0.2879098654,
0.1158811077,
-0.1219069064,
-0.1291877925,
0.2582710087,
-0.1710105538,
0.0061791167,
-0.2403121591,
-0.1835014224,
0.6115528941,
-0.2941824198,
0.1319782585,
-0.0414868183,
-0.3053475022,
0.177993089,
-0.1582280397,
-0.2711120844,
-0.047170423,
-0.0894278362,
0.1199705303,
-0.0169770457,
0.3023904562,
-0.4513084888,
0.2286179364,
-0.3265034556,
0.3392169774,
0.4150711894,
0.0918068588,
-0.0351932868,
0.1663979292,
-0.1615534127,
-0.7281158566,
0.1981071979,
0.1456977278,
-0.0879977047,
-0.3534244597,
-0.2648591101,
0.0765318945,
0.1501422524,
0.0226835851,
0.1255520582,
0.0711955503,
-0.2024618536,
0.0510787666,
-0.3482041657,
-0.2364072204,
-0.2209418267,
-0.1390868723,
0.1733430028,
-0.1894965023,
-0.3441659212,
-0.02797544,
-0.3571985662,
-0.0204040855,
0.1966485977,
0.2393563092,
-0.1307831556,
-0.0186507069,
0.4590830505,
-0.1979589909,
-0.0776888877,
-0.4247605503,
-0.0810872763,
-0.0454146042,
-0.0406254977,
-0.0342592746,
-0.1599498689,
0.1424511224,
-0.1447393149,
-0.301145494,
0.0029286444,
-0.2381205261,
0.5006265044,
-0.1498276442,
-0.0373832472,
-0.0561356731,
0.0231336281,
-0.0771552026,
-0.1531375647,
-0.109675929,
-0.0489472747,
-0.2542675734,
-0.0305233654,
0.0260867104,
-0.1773487628,
0.2219045162,
-0.041984126,
0.0335538164,
-0.0073626144,
-0.2589178085,
0.002791591,
0.339519769,
-0.0899919197,
0.4603511691,
0.1365824491,
0.0819974691,
-0.0418758094,
0.1916160882,
0.0838155001,
0.1106003895,
0.2706132233,
0.0925673544,
0.075621672,
0.3986672759,
0.0161472559,
-0.2661883235,
-0.3510771096,
0.175314635,
0.4957441986,
-0.2044827938,
-0.0438004211,
-0.0830237046,
0.0995051041,
0.2236657441,
-0.1830219328,
0.0713534057,
-0.4394609034,
-0.1476134807,
0.1156399474,
-0.1264732033,
0.2542536557,
-0.1595221162,
-0.060821712,
0.1876653135,
-0.0264902562,
-0.1460788995,
-0.1495200992,
-0.1710769385,
0.0146623477,
-0.0350827947,
-0.1445780545,
0.0407586992,
0.4789996147,
-0.3435451388,
-0.2255328,
-0.0635435134,
-0.0063209441,
-0.5026287436,
-0.0688746795,
0.3389750123,
0.2059356868,
-0.303593576,
-0.1560990065,
0.0831781924,
-0.1239540875,
0.0785740018,
0.2210019827,
0.1313581169,
-0.104757145,
-0.2336307317,
0.1117872223,
0.0731344223,
-0.2843957841,
0.1609166414,
-0.120042488,
0.2389972508,
-0.2521991134,
0.2278799415,
-0.2472717464,
-0.0553630441,
-0.4037475586,
0.0974971652,
-0.0106983408,
0.1542844325,
0.1120021045,
-0.0112327449,
0.045194909,
-0.0525669791,
0.0329917707,
0.3330427408,
-0.3355278373,
0.0463393666,
-0.102691628,
0.1352233142,
-0.003296219,
0.2326378077,
0.3257706463,
0.2052080333,
0.0374390595,
-0.0169253424,
-0.1642135978,
0.0817854255,
-0.0682315156,
-0.0038804971,
0.0999060348,
0.4984066486,
0.2369373143,
0.5979440212,
0.2042804509,
-0.0856825039,
0.0948240757,
-0.1327354163,
0.0399420485,
-0.1180511862,
-0.3469353914,
0.0949326903,
-0.3334670663,
-0.0153745003,
0.0916314721,
-0.1429186761,
-0.5661894083,
0.0262779295,
0.3182718158,
0.0356093049,
-0.2705045342,
0.2294886857,
-0.2429614663,
0.2372478843,
0.1168125421,
0.019995667,
-0.2669149637,
-0.1107122526,
0.2998272181,
-0.3833628297,
0.1725096107,
-0.2118996233,
-0.3650293052,
-0.0065126456,
-0.7440905571,
0.4507889748,
0.0828429833,
0.3523314297,
0.1741856039,
-0.0121686012,
0.0209384765,
0.1607971787,
0.4166470468,
-0.2360413224,
-0.1881225854,
0.1594665349,
0.1826754063,
-0.4863574505,
-0.0572044775,
-0.3145471513,
0.1810837984,
0.2628194094,
0.8223781586,
-0.3449786901,
-0.0785234571,
0.3561528325,
0.1908118874,
0.0819738805,
-0.1069039851,
-0.1756307632,
-0.2924112678,
-0.11214149,
0.1398424357,
0.3096799254,
0.1881920993,
0.1740520597,
-0.2482348531,
0.0171872135,
-0.1449329257,
0.1038186997,
0.020053938,
-0.0551288649,
-0.1025981009,
0.0748114586,
-0.1875822842,
0.0197032019,
0.098522678,
0.1518203169,
-0.2780479789,
-0.118398279,
0.0980389938,
-0.1654562354,
0.5431215763,
0.2424984872,
0.0117666125,
0.1635086238,
-0.3425571918,
0.3598183692,
0.1224118024,
-0.4356709421,
0.3494389057,
0.036477942,
-0.3460502923,
0.1196428835,
0.2144175917,
0.2063299119,
-0.0323675275,
0.7606868148,
0.0132845305,
-0.2412762642,
0.7118184566,
0.1966299564,
0.6759188175,
-0.1432673335,
-0.0712215677,
0.2902080715,
0.3608820736,
0.2842658758,
0.1126969755,
0.381162107,
-0.3241282701,
-0.0603735484,
0.003322877,
-0.0351571031,
0.1903506368,
0.4072135687,
0.0292366073,
0.3826388121,
-0.1521285474,
0.4469074905,
-0.0252744891,
-0.1773910075,
0.1236898229,
-0.3599651158,
0.0880283788,
0.0208681934,
0.0461227037,
-0.12137869,
-0.0826370269,
0.0984833017,
0.0594395772,
-0.3395922482,
-0.1458569169,
-0.0059601888,
-0.2831455469,
0.2795832157,
-0.0178862885,
-0.0235915929,
-0.0276549719,
0.1857580394,
-0.1375503838,
0.0231043156,
0.2528838217,
-0.0234126262,
0.5783455372,
0.1532381177,
0.0718973801,
0.0801610872,
-0.3442003429,
0.0582825541,
-0.0581077635,
0.1441700161,
-0.2681711316,
-0.291772306,
-0.3978099227,
0.302023083,
0.2278289795,
-0.4201091528,
-0.1749860793,
-0.181971401,
-0.0289868861,
-0.249311775,
0.0179119557,
-0.1120728403,
-0.1037061512,
0.7665063739,
-0.1971291155,
-0.2018837333,
0.0001164554,
0.0542827509,
-0.010372499,
-0.007302098,
0.5093957186,
0.1933066696,
-0.1906852126,
-0.144767046,
-0.1147608683,
0.2298500836,
-0.4227206409,
0.1481420547,
-0.3345043063,
0.3107252717,
0.1378766596,
0.3870109916,
-0.056154985,
0.1035896391,
-0.058728911,
-0.1376464665,
-0.3454746604,
0.2268031389,
0.2731827796,
0.2479774356,
0.0099826455,
0.0238750651,
-0.2870253921,
0.1395941079,
-0.2310720682,
0.1292948127,
0.0296755508,
0.4705126584,
0.2248269022,
0.1841875613,
-0.0637199879,
0.1222632825,
0.1711613536,
0.3236604035,
0.228215754,
-0.1890605986,
0.0871446431,
0.0845168978,
0.041425433,
-0.0440469123,
0.0407925956,
-0.1662179232,
-0.2258952111,
-0.2493456006,
0.2834928632,
0.2077131271,
-0.1348534673,
-0.0511006825,
0.2674015462,
0.0906684548,
-0.0091013461,
0.116596207,
-0.2273989171,
-0.0828393996,
0.1396967024,
0.3365558684,
0.1446776837,
-0.0922281593,
0.0380745009,
0.079216972,
-0.1854951382,
0.1861374825,
0.274154067,
-0.3076931834,
-0.0741832405,
-0.0205285512,
0.3571770191,
0.1077170074,
-0.2655856013,
-0.1578712463,
0.0943284929,
0.1932019144,
-0.0930129886,
0.0147832185,
0.3097126484,
0.3044719398,
0.240304485,
0.4139224291,
0.0311293155,
-0.4228914678,
-0.1355921775,
-0.0868847817,
0.5410782099,
-0.1324591339,
-0.292445749,
0.6839468479,
-0.1482611597,
-0.0108298622,
0.2884372473,
0.1919951439,
0.3235798776,
0.5047323108,
-0.0714928657,
0.085369505,
0.3333713114,
0.10423439,
-0.2822677195,
-0.4482126832,
0.208596319,
0.2342998832,
0.0912758335,
0.1438352019,
0.178340435,
0.0890336782,
-0.0002727583,
-0.2167527974,
0.2180000544,
0.2582805157,
-0.3013063073,
-0.0257251821,
-0.364698261,
-0.0765606016,
0.192611441,
-0.0516906977,
-0.1579219401,
-0.1624597311,
0.5937283039,
0.0620206669,
-0.0564190373,
-0.3340181112,
-0.1528504044,
-0.0166741349,
0.3545718789,
-0.1517576128,
0.1551137418,
0.0096702315,
0.0895558894,
-0.2272721678,
0.087920621,
0.4263057709,
0.3567661941,
0.0829302073,
0.0477262512,
-0.1091135144,
-0.1831457019,
-0.030031953,
0.1075924337,
0.216402173,
0.3985658884,
0.3411515951,
0.0027499683,
-0.067481935,
-0.0332265943,
0.3050501943,
0.1356131732,
-0.0164145045,
-0.0335910954,
0.0403950028,
-0.496153295,
-0.1215940788,
-0.2080628127,
-0.0198327303,
-0.2020415366,
0.398504585,
-0.1470505446,
0.238756299,
0.0221790299,
0.058873035,
-0.0984588265,
0.0365583822,
0.4919876754,
-0.3134091198,
-0.549947083,
-0.2050668746,
-0.3719428778,
-0.0011595413,
-0.7319380045,
-0.0049585849,
0.2208575457,
0.1944054216,
0.1252503991,
0.0747247338,
0.0763460323,
0.1676182598,
-0.2411888838,
0.867572248,
-0.3371378779,
0.0864994377,
-0.0816277713,
0.0118992086,
0.0936869979,
-0.5087841749,
0.4204277694,
0.2190041393,
0.0183360726,
-0.1565003544,
-0.0141720697,
0.1934941709,
-0.1132708937,
0.3862442672,
0.0413534343,
0.0781788379,
0.1850651503,
-0.3118220568,
-0.3471717238,
0.0969080478,
-0.1761686504,
0.1207803637,
0.2130405605,
0.1897469759,
-0.0584037453,
0.0200456996,
-0.0797781795,
0.0548648275,
-0.0549626276,
0.0551301241,
-0.153667897,
0.1488112062,
0.0846774653,
0.1772117168,
0.0675943643,
0.0562536754,
0.1116032749,
0.2221061289,
-0.3874031901,
-0.3115009665,
0.4752248228,
-0.7607834935,
-0.6713261604,
-0.0875398368,
0.0665980652,
0.0903245807,
-0.156989634,
-0.3100398779,
-0.0200974643,
0.2628045678,
-0.193192631,
-0.1906291246,
-0.0052618217,
-0.3285935819,
0.0072533339,
-0.0165185928,
0.0777006447,
0.0896189809,
-0.1323934793,
-0.0028245375,
-0.3992701471
] |
https://github.com/huggingface/datasets/issues/2218 | Duplicates in the LAMA dataset | Hi,
currently the datasets API doesn't have a dedicated function to remove duplicate rows, but since the LAMA dataset is not too big (it fits in RAM), we can leverage pandas to help us remove duplicates:
```python
>>> from datasets import load_dataset, Dataset
>>> dataset = load_dataset('lama', split='train')
>>> dataset = Dataset.from_pandas(dataset.to_pandas().drop_duplicates(subset=...)) # specify a subset of the columns to consider in a list or use all of the columns if None
```
Note that the same can be achieved with the `Dataset.filter` method but this would requrie some extra work (filter function, speed?). | I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA? | 94 | Duplicates in the LAMA dataset
I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA?
Hi,
currently the datasets API doesn't have a dedicated function to remove duplicate rows, but since the LAMA dataset is not too big (it fits in RAM), we can leverage pandas to help us remove duplicates:
```python
>>> from datasets import load_dataset, Dataset
>>> dataset = load_dataset('lama', split='train')
>>> dataset = Dataset.from_pandas(dataset.to_pandas().drop_duplicates(subset=...)) # specify a subset of the columns to consider in a list or use all of the columns if None
```
Note that the same can be achieved with the `Dataset.filter` method but this would requrie some extra work (filter function, speed?). | [
0.2615724802,
-0.321171701,
-0.0303781517,
0.6542944312,
0.3174538016,
-0.1388739049,
0.3127517104,
0.3269730508,
-0.5472847223,
0.3365438581,
-0.345426321,
0.3600649536,
0.0819623619,
-0.2813014984,
0.1604103744,
-0.1338148415,
0.0254944265,
-0.1661693454,
-0.2045625299,
-0.2063404471,
-0.1825975478,
0.3395482004,
0.0372469872,
0.0838605314,
-0.1408671141,
0.1054255664,
-0.1408224851,
0.2696477771,
0.02112188,
-0.2721820474,
0.1359850466,
0.1195656359,
-0.0423956811,
0.4986014962,
-0.0001062553,
0.0266555101,
-0.1191424653,
-0.0516992621,
-0.1489320397,
-0.030792132,
-0.028101176,
-0.0206729919,
-0.0044795908,
-0.2624209523,
-0.3085128069,
-0.0679863244,
-0.0779155642,
-0.1103772447,
0.4661052227,
0.2096014172,
0.2672528625,
0.3489763141,
-0.2831968963,
-0.1589339674,
0.2227592617,
-0.1836936176,
-0.0866324231,
0.4994789064,
0.1833480895,
0.6046416163,
-0.0669346899,
0.5685860515,
0.0555700213,
-0.0770117044,
-0.2806723416,
-0.3192395866,
0.3182045817,
-0.1115747988,
0.3222732842,
0.3282351494,
-0.0091445222,
-0.2400609553,
-0.1954752803,
-0.1231131777,
-0.0279285088,
-0.1791886091,
0.0652220994,
0.1354203671,
0.0618836842,
0.1455415934,
0.1373831332,
0.0252610222,
0.232178092,
-0.1204139441,
-0.146145612,
-0.1684124172,
-0.0200734995,
0.1156066209,
0.1672807932,
-0.1583192647,
0.2028745711,
-0.1564390659,
-0.1728951037,
0.0493901111,
-0.2232093811,
-0.1347194314,
0.0018673111,
-0.1056639627,
0.116055578,
0.5150145292,
0.2339854538,
0.3465537429,
-0.1307942867,
0.0239980593,
0.1542148739,
0.0706345141,
-0.0500433706,
0.064581424,
-0.175925836,
0.0218920484,
-0.31654194,
0.0213838946,
-0.34171772,
-0.1691870093,
0.0773044378,
-0.0114145949,
0.0543420911,
-0.1062711924,
-0.0838248134,
-0.230751276,
-0.4037020206,
-0.1084923074,
0.0605471693,
0.1502103806,
0.1372215003,
0.210877195,
-0.3826013207,
0.0159681514,
-0.203060329,
-0.1918773651,
-0.3366512656,
0.1416358352,
-0.1806384474,
0.0794324726,
-0.0046103075,
-0.7226566076,
0.4088578224,
0.0900722072,
-0.1415321529,
-0.2692626119,
0.4366319478,
-0.2164306343,
0.1583116204,
0.0111387549,
-0.1688192785,
0.1273403466,
-0.0186237097,
-0.0218231529,
-0.1080177352,
0.0238683596,
-0.140532732,
-0.0906963125,
-0.1264303476,
0.2938246429,
0.1999357343,
0.2575149536,
0.3168151677,
0.3918616772,
-0.0317622274,
0.0356455818,
0.093077153,
0.0182365607,
-0.3235778213,
-0.1311047822,
0.0814260393,
0.2557792068,
-0.0844864696,
-0.03427241,
0.0129468739,
0.0059577972,
0.2059481442,
0.5270094872,
-0.1314261854,
0.2728062272,
-0.3161910474,
0.306845963,
0.1753149927,
-0.4883659482,
-0.0050708614,
-0.1671351641,
0.0342873633,
0.1037546694,
0.2280558944,
0.0257392637,
0.2874675691,
-0.1020957604,
0.220664382,
-0.118950516,
0.2129844725,
-0.1990241408,
-0.2243697196,
-0.0217816532,
-0.0441006944,
-0.1115866452,
-0.1224104762,
-0.240757823,
0.0232190825,
-0.0264476966,
0.1633727998,
-0.0874786824,
-0.1633481085,
-0.0287169628,
0.0382602215,
-0.0036899094,
0.0643827021,
0.0341984704,
-0.1461327374,
0.2015022337,
-0.1772348881,
0.326967001,
0.0302658677,
-0.1839377582,
-0.2615671754,
-0.0959580094,
-0.2973308265,
-0.1768952757,
0.2863488495,
0.2737017572,
0.0176794082,
0.1425696015,
0.0079258084,
0.1106469035,
-0.0368707888,
0.1908318698,
-0.5088584423,
0.0802479759,
-0.1847525239,
0.060399916,
0.1334295571,
0.2846052051,
0.1789465845,
0.0156147406,
0.2225700021,
0.0092979204,
0.312587291,
0.0275248848,
0.2928508222,
-0.1491541713,
0.0233944822,
-0.1707876921,
-0.0926240906,
0.0833111107,
0.18655397,
-0.0546856262,
-0.037960954,
0.4738604426,
0.5330001116,
-0.2722344697,
0.1020212248,
-0.1302971244,
0.2794709802,
-0.135797888,
-0.0729423091,
-0.4929494262,
0.0669530779,
0.5568973422,
0.2402731478,
0.4626099169,
-0.2420150042,
0.0891899318,
0.1307507604,
-0.1754648685,
0.028032722,
-0.189013809,
-0.2137300372,
-0.1118451878,
0.1290922165,
0.3554100394,
0.0149279162,
0.2737827897,
0.5646853447,
0.1218462735,
-0.152469188,
-0.2303453982,
0.1902776361,
-0.0628229231,
-0.1223018765,
0.1247756183,
0.108912915,
-0.0174059551,
-0.7163105011,
0.109149538,
0.0674969405,
0.1782830805,
-0.1040222496,
0.0458262041,
-0.5186647177,
-0.2792088687,
-0.3423459828,
0.1161627322,
-0.2141041756,
-0.2102278918,
0.2235584557,
0.0833828747,
-0.0791669339,
0.221653074,
-0.0587281212,
0.4643625915,
-0.1414307356,
0.1901517957,
-0.2832052112,
0.0621859394,
-0.2202774882,
0.2213906497,
0.1573349237,
-0.0116417184,
0.3668320477,
-0.1453350633,
-0.0091759674,
-0.4053193331,
-0.5439636111,
0.1548528969,
0.1620248258,
0.1663460135,
-0.0150463656,
-0.2284674197,
-0.0598771274,
-0.228774026,
-0.0926365703,
0.2382826209,
-0.4187107682,
-0.0588347465,
-0.160943836,
0.3222584724,
-0.1647998989,
-0.3569101393,
0.1333420277,
-0.1296956688,
0.1131874025,
0.0948971808,
0.2506996095,
0.1955592334,
-0.0962622017,
0.1708019972,
-0.4386242032,
0.0114031807,
-0.5250062943,
-0.334762156,
0.1283044666,
-0.1221258342,
-0.0773986876,
-0.1265256703,
-0.4503445625,
0.5347154737,
-0.2043714821,
-0.3808067441,
-0.1040005758,
0.0391997695,
0.0052051023,
0.3159892261,
-0.0729474649,
-0.052400995,
0.2954609692,
-0.3133577704,
-0.0572946742,
0.0053231567,
0.0534762889,
0.0567471683,
0.1919593066,
-0.3597277701,
-0.0272062626,
0.1268523186,
0.1769525707,
0.4423538446,
-0.0578040108,
0.271130383,
0.101645425,
0.4149210751,
-0.035089165,
-0.0963193476,
-0.1374598593,
-0.1580800116,
0.1463185251,
0.5981576443,
0.1985944659,
0.0928999782,
-0.0192280039,
0.0230378285,
-0.1344580799,
-0.3823530078,
-0.2087147683,
-0.2636794448,
-0.0069356207,
0.2116353661,
-0.1811708808,
0.1093774587,
0.1607609987,
0.1593931615,
0.0727888122,
-0.1498091668,
-0.0968030989,
-0.0381271839,
0.516720295,
-0.6166173816,
0.1802099347,
0.0624594837,
-0.0113827772,
0.046152778,
-0.0188278034,
0.1572401077,
-0.0100982133,
0.4922402501,
-0.3488265574,
0.0443121269,
0.0332382023,
-0.1674067974,
-0.3114116192,
0.1224630177,
-0.2982157469,
-0.1219374835,
0.17314592,
0.5565639138,
-0.251090616,
-0.0345065743,
0.2294425368,
0.1539776772,
-0.2126264572,
0.0874856412,
-0.2398450524,
-0.4762764871,
-0.1906114817,
-0.0675288662,
-0.0483934097,
0.0847019106,
0.1393900514,
-0.3079849482,
-0.1403476447,
0.0805950612,
0.3862343132,
0.1830415726,
0.0926793367,
0.2992740273,
0.2168320715,
0.0538577028,
0.2178731263,
0.0334339067,
0.7148376107,
-0.3341756463,
-0.2698462903,
-0.2647652626,
-0.0753837675,
0.021223817,
0.3166490197,
0.0391311571,
0.4542928934,
-0.0619202852,
-0.0403193645,
0.011750102,
0.110681206,
0.4621831775,
0.0956038535,
-0.2127038389,
-0.364109844,
0.0299234912,
-0.0071277805,
-0.2579859495,
0.3333189785,
-0.1612224877,
-0.0604873598,
0.0208553746,
0.0301933289,
1.0644152164,
-0.2760586739,
0.0928508192,
0.3648729026,
-0.2055188417,
0.2576836348,
0.1336090565,
-0.088897422,
-0.157639578,
0.2409190536,
0.0959123895,
0.1458932608,
0.0026947064,
0.2030569464,
-0.2064413577,
0.066246599,
0.1770913005,
-0.169754222,
-0.0332998857,
0.0339080691,
0.0557185113,
0.178826794,
0.1361744702,
0.2064749748,
0.1101294309,
-0.0273519568,
0.0567530952,
-0.0005142987,
0.1192089543,
-0.1942101121,
0.0687479228,
0.0199437737,
-0.1854945719,
0.2835594714,
-0.1523348987,
-0.4586694241,
-0.1404190063,
-0.2169040143,
0.192853108,
-0.090867728,
0.0777016282,
0.1705891192,
0.3158831298,
0.1821531206,
-0.1296542734,
-0.0478681102,
0.3358630538,
-0.0105483159,
-0.2502413988,
0.0827580839,
0.2837595642,
0.0486861318,
0.0348306298,
0.280177027,
-0.3211698532,
-0.0737147033,
0.0834076032,
0.2097002715,
-0.2965659201,
-0.4031595588,
0.2004607767,
-0.1632796228,
-0.2333469689,
-0.1487855613,
0.0982618853,
-0.282905817,
-0.0062639327,
0.191360563,
0.4226552546,
-0.0867736563,
0.1324682832,
0.0786747262,
-0.089137964,
-0.2560742497,
0.1318187118,
0.1467037648,
-0.5616839528,
0.1952316165,
-0.1307239532,
0.019607991,
0.1153242812,
0.1314592957,
-0.0170004182,
-0.2400066257,
-0.2057886124,
0.0706406981,
-0.3164940476,
0.0977498442,
-0.0716599375,
0.3519403636,
-0.1970598847,
0.0227942616,
-0.1280142516,
0.2551704049,
-0.4023962915,
0.3481817544,
-0.2751217782,
0.2651209533,
-0.2275215685,
-0.0737769678,
-0.1020166576,
0.3335078061,
0.2248565257,
-0.096714966,
-0.400473237,
-0.3237602711,
-0.2450775951,
0.0638764873,
-0.1113530844,
-0.0443420447,
-0.0186429024,
0.1241746694,
0.2122279257,
-0.1670003384,
0.1350724399,
0.151306361,
0.2527487874,
0.145154953,
0.1004986018,
-0.0807349905,
-0.2317057699,
-0.096202068,
0.1128522083,
0.0605734736,
0.3657429516,
-0.2195558548,
-0.2831243277,
-0.2371462286,
-0.0200084243,
0.0086325426,
0.1730712354,
-0.1621913463,
-0.0964882374,
0.1578145325,
-0.268270582,
-0.0104038715,
0.248647213,
-0.0059929583,
-0.2193803787,
-0.2179912925,
0.1154687852,
0.2430664748,
-0.5087180138,
-0.1043304801,
0.002925545,
-0.309163928,
0.2455792278,
0.1804057658,
0.0081359819,
-0.0319935456,
0.0910802633,
-0.2570299804,
0.0060191415,
-0.1729641706,
0.3735984266,
0.354226172,
0.0548059642,
-0.1256594509,
0.5434416533,
0.0092391632,
0.225767225,
0.4770340323,
-0.0859540999,
0.5685112476,
-0.3942368627,
0.1600410491,
0.2826444507,
-0.045967754,
0.159390837,
0.2637464404,
-0.0594221726,
0.0169203263,
0.0836919472,
0.1143941134,
0.2495166212,
0.0125525035,
-0.2026273012,
0.177924037,
-0.1874751598,
-0.3193874359,
0.1066906899,
-0.2320486307,
-0.0901399404,
0.1481955647,
0.041320648,
-0.0848243535,
0.0190775339,
0.2085651159,
-0.0676681772,
0.0382266492,
-0.3484534621,
-0.1815467775,
0.1049732566,
-0.1133372337,
0.3851994574,
0.4369289279,
-0.0377188213,
-0.0744032189,
0.3042878807,
0.3492515981,
-0.3513213098,
0.1408328116,
-0.0486054644,
-0.3223830163,
0.0016420856,
-0.1893452704,
0.1748964936,
0.0700880587,
-0.0769210756,
0.2669954002,
0.1355819702,
-0.2319870591,
-0.2327670455,
0.425272733,
-0.0695292726,
-0.4111590981,
0.4312680364,
-0.3308847249,
-0.0459828861,
-0.0697188228,
0.2132514268,
-0.4768787622,
0.3899278343,
0.4216946661,
-0.1598173529,
0.0607749969,
-0.0812870562,
0.1262682378,
0.014322564,
0.5851632953,
0.1267196387,
0.0722899586,
-0.2126636952,
-0.3589541316,
-0.5591654778,
0.3465291262,
-0.380258292,
0.0131843388,
0.0126304962,
0.0681148916,
0.0360697694,
0.1930888742,
-0.0475784987,
0.1963952482,
0.1265953779,
-0.2434820235,
-0.4807628989,
-0.0214085318,
0.0113789113,
-0.1753041148,
0.0147314519,
-0.282592237,
0.0951527655,
-0.4127328992,
0.0645714179,
0.1924359947,
-0.1241100281,
0.2314431965,
0.256478399,
0.2895268798,
0.1387013942,
0.2878735065,
0.0106290653,
0.0304808989,
0.0776630044,
-0.1701427698,
0.1227281541,
0.2852529585,
0.1638189107,
-0.0594855398,
0.0061943904,
-0.2301671207,
0.1879748404,
0.3709398806,
0.2256376147,
0.1016521901,
-0.0982465073,
0.1454762965,
0.174274236,
-0.1492630243,
-0.0882015228,
0.3099319339,
0.0910009593,
-0.0464996994,
-0.2668632269,
-0.5187710524,
0.5504891872,
-0.3391299844,
-0.0577014796,
-0.3835507333,
0.2319303751,
-0.1272618324,
0.0766810402,
-0.7147966623,
0.2014077306,
0.3444116712,
0.0844139308,
-0.2033613175,
0.2627136409,
-0.2223799527,
0.0071990415,
0.0059526712,
0.0117044337,
0.2193949372,
-0.0540830642,
0.1059643701,
-0.2452142239
] |
https://github.com/huggingface/datasets/issues/2218 | Duplicates in the LAMA dataset | Oh, seems like my question wasn't specified well. I'm _not_ asking how to remove duplicates, but whether duplicates should be removed if I want to do the evaluation on the LAMA dataset as it was proposed in the original paper/repository? In other words, will I get the same result if evaluate on the de-duplicated dataset loaded from HF's `datasets` as the results I'd get if I use the original data format and data processing script in https://github.com/facebookresearch/LAMA? | I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA? | 77 | Duplicates in the LAMA dataset
I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA?
Oh, seems like my question wasn't specified well. I'm _not_ asking how to remove duplicates, but whether duplicates should be removed if I want to do the evaluation on the LAMA dataset as it was proposed in the original paper/repository? In other words, will I get the same result if evaluate on the de-duplicated dataset loaded from HF's `datasets` as the results I'd get if I use the original data format and data processing script in https://github.com/facebookresearch/LAMA? | [
0.2615724802,
-0.321171701,
-0.0303781517,
0.6542944312,
0.3174538016,
-0.1388739049,
0.3127517104,
0.3269730508,
-0.5472847223,
0.3365438581,
-0.345426321,
0.3600649536,
0.0819623619,
-0.2813014984,
0.1604103744,
-0.1338148415,
0.0254944265,
-0.1661693454,
-0.2045625299,
-0.2063404471,
-0.1825975478,
0.3395482004,
0.0372469872,
0.0838605314,
-0.1408671141,
0.1054255664,
-0.1408224851,
0.2696477771,
0.02112188,
-0.2721820474,
0.1359850466,
0.1195656359,
-0.0423956811,
0.4986014962,
-0.0001062553,
0.0266555101,
-0.1191424653,
-0.0516992621,
-0.1489320397,
-0.030792132,
-0.028101176,
-0.0206729919,
-0.0044795908,
-0.2624209523,
-0.3085128069,
-0.0679863244,
-0.0779155642,
-0.1103772447,
0.4661052227,
0.2096014172,
0.2672528625,
0.3489763141,
-0.2831968963,
-0.1589339674,
0.2227592617,
-0.1836936176,
-0.0866324231,
0.4994789064,
0.1833480895,
0.6046416163,
-0.0669346899,
0.5685860515,
0.0555700213,
-0.0770117044,
-0.2806723416,
-0.3192395866,
0.3182045817,
-0.1115747988,
0.3222732842,
0.3282351494,
-0.0091445222,
-0.2400609553,
-0.1954752803,
-0.1231131777,
-0.0279285088,
-0.1791886091,
0.0652220994,
0.1354203671,
0.0618836842,
0.1455415934,
0.1373831332,
0.0252610222,
0.232178092,
-0.1204139441,
-0.146145612,
-0.1684124172,
-0.0200734995,
0.1156066209,
0.1672807932,
-0.1583192647,
0.2028745711,
-0.1564390659,
-0.1728951037,
0.0493901111,
-0.2232093811,
-0.1347194314,
0.0018673111,
-0.1056639627,
0.116055578,
0.5150145292,
0.2339854538,
0.3465537429,
-0.1307942867,
0.0239980593,
0.1542148739,
0.0706345141,
-0.0500433706,
0.064581424,
-0.175925836,
0.0218920484,
-0.31654194,
0.0213838946,
-0.34171772,
-0.1691870093,
0.0773044378,
-0.0114145949,
0.0543420911,
-0.1062711924,
-0.0838248134,
-0.230751276,
-0.4037020206,
-0.1084923074,
0.0605471693,
0.1502103806,
0.1372215003,
0.210877195,
-0.3826013207,
0.0159681514,
-0.203060329,
-0.1918773651,
-0.3366512656,
0.1416358352,
-0.1806384474,
0.0794324726,
-0.0046103075,
-0.7226566076,
0.4088578224,
0.0900722072,
-0.1415321529,
-0.2692626119,
0.4366319478,
-0.2164306343,
0.1583116204,
0.0111387549,
-0.1688192785,
0.1273403466,
-0.0186237097,
-0.0218231529,
-0.1080177352,
0.0238683596,
-0.140532732,
-0.0906963125,
-0.1264303476,
0.2938246429,
0.1999357343,
0.2575149536,
0.3168151677,
0.3918616772,
-0.0317622274,
0.0356455818,
0.093077153,
0.0182365607,
-0.3235778213,
-0.1311047822,
0.0814260393,
0.2557792068,
-0.0844864696,
-0.03427241,
0.0129468739,
0.0059577972,
0.2059481442,
0.5270094872,
-0.1314261854,
0.2728062272,
-0.3161910474,
0.306845963,
0.1753149927,
-0.4883659482,
-0.0050708614,
-0.1671351641,
0.0342873633,
0.1037546694,
0.2280558944,
0.0257392637,
0.2874675691,
-0.1020957604,
0.220664382,
-0.118950516,
0.2129844725,
-0.1990241408,
-0.2243697196,
-0.0217816532,
-0.0441006944,
-0.1115866452,
-0.1224104762,
-0.240757823,
0.0232190825,
-0.0264476966,
0.1633727998,
-0.0874786824,
-0.1633481085,
-0.0287169628,
0.0382602215,
-0.0036899094,
0.0643827021,
0.0341984704,
-0.1461327374,
0.2015022337,
-0.1772348881,
0.326967001,
0.0302658677,
-0.1839377582,
-0.2615671754,
-0.0959580094,
-0.2973308265,
-0.1768952757,
0.2863488495,
0.2737017572,
0.0176794082,
0.1425696015,
0.0079258084,
0.1106469035,
-0.0368707888,
0.1908318698,
-0.5088584423,
0.0802479759,
-0.1847525239,
0.060399916,
0.1334295571,
0.2846052051,
0.1789465845,
0.0156147406,
0.2225700021,
0.0092979204,
0.312587291,
0.0275248848,
0.2928508222,
-0.1491541713,
0.0233944822,
-0.1707876921,
-0.0926240906,
0.0833111107,
0.18655397,
-0.0546856262,
-0.037960954,
0.4738604426,
0.5330001116,
-0.2722344697,
0.1020212248,
-0.1302971244,
0.2794709802,
-0.135797888,
-0.0729423091,
-0.4929494262,
0.0669530779,
0.5568973422,
0.2402731478,
0.4626099169,
-0.2420150042,
0.0891899318,
0.1307507604,
-0.1754648685,
0.028032722,
-0.189013809,
-0.2137300372,
-0.1118451878,
0.1290922165,
0.3554100394,
0.0149279162,
0.2737827897,
0.5646853447,
0.1218462735,
-0.152469188,
-0.2303453982,
0.1902776361,
-0.0628229231,
-0.1223018765,
0.1247756183,
0.108912915,
-0.0174059551,
-0.7163105011,
0.109149538,
0.0674969405,
0.1782830805,
-0.1040222496,
0.0458262041,
-0.5186647177,
-0.2792088687,
-0.3423459828,
0.1161627322,
-0.2141041756,
-0.2102278918,
0.2235584557,
0.0833828747,
-0.0791669339,
0.221653074,
-0.0587281212,
0.4643625915,
-0.1414307356,
0.1901517957,
-0.2832052112,
0.0621859394,
-0.2202774882,
0.2213906497,
0.1573349237,
-0.0116417184,
0.3668320477,
-0.1453350633,
-0.0091759674,
-0.4053193331,
-0.5439636111,
0.1548528969,
0.1620248258,
0.1663460135,
-0.0150463656,
-0.2284674197,
-0.0598771274,
-0.228774026,
-0.0926365703,
0.2382826209,
-0.4187107682,
-0.0588347465,
-0.160943836,
0.3222584724,
-0.1647998989,
-0.3569101393,
0.1333420277,
-0.1296956688,
0.1131874025,
0.0948971808,
0.2506996095,
0.1955592334,
-0.0962622017,
0.1708019972,
-0.4386242032,
0.0114031807,
-0.5250062943,
-0.334762156,
0.1283044666,
-0.1221258342,
-0.0773986876,
-0.1265256703,
-0.4503445625,
0.5347154737,
-0.2043714821,
-0.3808067441,
-0.1040005758,
0.0391997695,
0.0052051023,
0.3159892261,
-0.0729474649,
-0.052400995,
0.2954609692,
-0.3133577704,
-0.0572946742,
0.0053231567,
0.0534762889,
0.0567471683,
0.1919593066,
-0.3597277701,
-0.0272062626,
0.1268523186,
0.1769525707,
0.4423538446,
-0.0578040108,
0.271130383,
0.101645425,
0.4149210751,
-0.035089165,
-0.0963193476,
-0.1374598593,
-0.1580800116,
0.1463185251,
0.5981576443,
0.1985944659,
0.0928999782,
-0.0192280039,
0.0230378285,
-0.1344580799,
-0.3823530078,
-0.2087147683,
-0.2636794448,
-0.0069356207,
0.2116353661,
-0.1811708808,
0.1093774587,
0.1607609987,
0.1593931615,
0.0727888122,
-0.1498091668,
-0.0968030989,
-0.0381271839,
0.516720295,
-0.6166173816,
0.1802099347,
0.0624594837,
-0.0113827772,
0.046152778,
-0.0188278034,
0.1572401077,
-0.0100982133,
0.4922402501,
-0.3488265574,
0.0443121269,
0.0332382023,
-0.1674067974,
-0.3114116192,
0.1224630177,
-0.2982157469,
-0.1219374835,
0.17314592,
0.5565639138,
-0.251090616,
-0.0345065743,
0.2294425368,
0.1539776772,
-0.2126264572,
0.0874856412,
-0.2398450524,
-0.4762764871,
-0.1906114817,
-0.0675288662,
-0.0483934097,
0.0847019106,
0.1393900514,
-0.3079849482,
-0.1403476447,
0.0805950612,
0.3862343132,
0.1830415726,
0.0926793367,
0.2992740273,
0.2168320715,
0.0538577028,
0.2178731263,
0.0334339067,
0.7148376107,
-0.3341756463,
-0.2698462903,
-0.2647652626,
-0.0753837675,
0.021223817,
0.3166490197,
0.0391311571,
0.4542928934,
-0.0619202852,
-0.0403193645,
0.011750102,
0.110681206,
0.4621831775,
0.0956038535,
-0.2127038389,
-0.364109844,
0.0299234912,
-0.0071277805,
-0.2579859495,
0.3333189785,
-0.1612224877,
-0.0604873598,
0.0208553746,
0.0301933289,
1.0644152164,
-0.2760586739,
0.0928508192,
0.3648729026,
-0.2055188417,
0.2576836348,
0.1336090565,
-0.088897422,
-0.157639578,
0.2409190536,
0.0959123895,
0.1458932608,
0.0026947064,
0.2030569464,
-0.2064413577,
0.066246599,
0.1770913005,
-0.169754222,
-0.0332998857,
0.0339080691,
0.0557185113,
0.178826794,
0.1361744702,
0.2064749748,
0.1101294309,
-0.0273519568,
0.0567530952,
-0.0005142987,
0.1192089543,
-0.1942101121,
0.0687479228,
0.0199437737,
-0.1854945719,
0.2835594714,
-0.1523348987,
-0.4586694241,
-0.1404190063,
-0.2169040143,
0.192853108,
-0.090867728,
0.0777016282,
0.1705891192,
0.3158831298,
0.1821531206,
-0.1296542734,
-0.0478681102,
0.3358630538,
-0.0105483159,
-0.2502413988,
0.0827580839,
0.2837595642,
0.0486861318,
0.0348306298,
0.280177027,
-0.3211698532,
-0.0737147033,
0.0834076032,
0.2097002715,
-0.2965659201,
-0.4031595588,
0.2004607767,
-0.1632796228,
-0.2333469689,
-0.1487855613,
0.0982618853,
-0.282905817,
-0.0062639327,
0.191360563,
0.4226552546,
-0.0867736563,
0.1324682832,
0.0786747262,
-0.089137964,
-0.2560742497,
0.1318187118,
0.1467037648,
-0.5616839528,
0.1952316165,
-0.1307239532,
0.019607991,
0.1153242812,
0.1314592957,
-0.0170004182,
-0.2400066257,
-0.2057886124,
0.0706406981,
-0.3164940476,
0.0977498442,
-0.0716599375,
0.3519403636,
-0.1970598847,
0.0227942616,
-0.1280142516,
0.2551704049,
-0.4023962915,
0.3481817544,
-0.2751217782,
0.2651209533,
-0.2275215685,
-0.0737769678,
-0.1020166576,
0.3335078061,
0.2248565257,
-0.096714966,
-0.400473237,
-0.3237602711,
-0.2450775951,
0.0638764873,
-0.1113530844,
-0.0443420447,
-0.0186429024,
0.1241746694,
0.2122279257,
-0.1670003384,
0.1350724399,
0.151306361,
0.2527487874,
0.145154953,
0.1004986018,
-0.0807349905,
-0.2317057699,
-0.096202068,
0.1128522083,
0.0605734736,
0.3657429516,
-0.2195558548,
-0.2831243277,
-0.2371462286,
-0.0200084243,
0.0086325426,
0.1730712354,
-0.1621913463,
-0.0964882374,
0.1578145325,
-0.268270582,
-0.0104038715,
0.248647213,
-0.0059929583,
-0.2193803787,
-0.2179912925,
0.1154687852,
0.2430664748,
-0.5087180138,
-0.1043304801,
0.002925545,
-0.309163928,
0.2455792278,
0.1804057658,
0.0081359819,
-0.0319935456,
0.0910802633,
-0.2570299804,
0.0060191415,
-0.1729641706,
0.3735984266,
0.354226172,
0.0548059642,
-0.1256594509,
0.5434416533,
0.0092391632,
0.225767225,
0.4770340323,
-0.0859540999,
0.5685112476,
-0.3942368627,
0.1600410491,
0.2826444507,
-0.045967754,
0.159390837,
0.2637464404,
-0.0594221726,
0.0169203263,
0.0836919472,
0.1143941134,
0.2495166212,
0.0125525035,
-0.2026273012,
0.177924037,
-0.1874751598,
-0.3193874359,
0.1066906899,
-0.2320486307,
-0.0901399404,
0.1481955647,
0.041320648,
-0.0848243535,
0.0190775339,
0.2085651159,
-0.0676681772,
0.0382266492,
-0.3484534621,
-0.1815467775,
0.1049732566,
-0.1133372337,
0.3851994574,
0.4369289279,
-0.0377188213,
-0.0744032189,
0.3042878807,
0.3492515981,
-0.3513213098,
0.1408328116,
-0.0486054644,
-0.3223830163,
0.0016420856,
-0.1893452704,
0.1748964936,
0.0700880587,
-0.0769210756,
0.2669954002,
0.1355819702,
-0.2319870591,
-0.2327670455,
0.425272733,
-0.0695292726,
-0.4111590981,
0.4312680364,
-0.3308847249,
-0.0459828861,
-0.0697188228,
0.2132514268,
-0.4768787622,
0.3899278343,
0.4216946661,
-0.1598173529,
0.0607749969,
-0.0812870562,
0.1262682378,
0.014322564,
0.5851632953,
0.1267196387,
0.0722899586,
-0.2126636952,
-0.3589541316,
-0.5591654778,
0.3465291262,
-0.380258292,
0.0131843388,
0.0126304962,
0.0681148916,
0.0360697694,
0.1930888742,
-0.0475784987,
0.1963952482,
0.1265953779,
-0.2434820235,
-0.4807628989,
-0.0214085318,
0.0113789113,
-0.1753041148,
0.0147314519,
-0.282592237,
0.0951527655,
-0.4127328992,
0.0645714179,
0.1924359947,
-0.1241100281,
0.2314431965,
0.256478399,
0.2895268798,
0.1387013942,
0.2878735065,
0.0106290653,
0.0304808989,
0.0776630044,
-0.1701427698,
0.1227281541,
0.2852529585,
0.1638189107,
-0.0594855398,
0.0061943904,
-0.2301671207,
0.1879748404,
0.3709398806,
0.2256376147,
0.1016521901,
-0.0982465073,
0.1454762965,
0.174274236,
-0.1492630243,
-0.0882015228,
0.3099319339,
0.0910009593,
-0.0464996994,
-0.2668632269,
-0.5187710524,
0.5504891872,
-0.3391299844,
-0.0577014796,
-0.3835507333,
0.2319303751,
-0.1272618324,
0.0766810402,
-0.7147966623,
0.2014077306,
0.3444116712,
0.0844139308,
-0.2033613175,
0.2627136409,
-0.2223799527,
0.0071990415,
0.0059526712,
0.0117044337,
0.2193949372,
-0.0540830642,
0.1059643701,
-0.2452142239
] |
https://github.com/huggingface/datasets/issues/2218 | Duplicates in the LAMA dataset | So it looks like the person who added LAMA to the library chose to have one item per piece of evidence rather than one per relation - and in this case, there are duplicate pieces of evidence for the target relation
If I understand correctly, to reproduce reported results, you would have to aggregate predictions for the several pieces of evidence provided for each relation (each unique `uuid`), but the original authors will know better
cc @fabiopetroni | I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA? | 77 | Duplicates in the LAMA dataset
I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA?
So it looks like the person who added LAMA to the library chose to have one item per piece of evidence rather than one per relation - and in this case, there are duplicate pieces of evidence for the target relation
If I understand correctly, to reproduce reported results, you would have to aggregate predictions for the several pieces of evidence provided for each relation (each unique `uuid`), but the original authors will know better
cc @fabiopetroni | [
0.2615724802,
-0.321171701,
-0.0303781517,
0.6542944312,
0.3174538016,
-0.1388739049,
0.3127517104,
0.3269730508,
-0.5472847223,
0.3365438581,
-0.345426321,
0.3600649536,
0.0819623619,
-0.2813014984,
0.1604103744,
-0.1338148415,
0.0254944265,
-0.1661693454,
-0.2045625299,
-0.2063404471,
-0.1825975478,
0.3395482004,
0.0372469872,
0.0838605314,
-0.1408671141,
0.1054255664,
-0.1408224851,
0.2696477771,
0.02112188,
-0.2721820474,
0.1359850466,
0.1195656359,
-0.0423956811,
0.4986014962,
-0.0001062553,
0.0266555101,
-0.1191424653,
-0.0516992621,
-0.1489320397,
-0.030792132,
-0.028101176,
-0.0206729919,
-0.0044795908,
-0.2624209523,
-0.3085128069,
-0.0679863244,
-0.0779155642,
-0.1103772447,
0.4661052227,
0.2096014172,
0.2672528625,
0.3489763141,
-0.2831968963,
-0.1589339674,
0.2227592617,
-0.1836936176,
-0.0866324231,
0.4994789064,
0.1833480895,
0.6046416163,
-0.0669346899,
0.5685860515,
0.0555700213,
-0.0770117044,
-0.2806723416,
-0.3192395866,
0.3182045817,
-0.1115747988,
0.3222732842,
0.3282351494,
-0.0091445222,
-0.2400609553,
-0.1954752803,
-0.1231131777,
-0.0279285088,
-0.1791886091,
0.0652220994,
0.1354203671,
0.0618836842,
0.1455415934,
0.1373831332,
0.0252610222,
0.232178092,
-0.1204139441,
-0.146145612,
-0.1684124172,
-0.0200734995,
0.1156066209,
0.1672807932,
-0.1583192647,
0.2028745711,
-0.1564390659,
-0.1728951037,
0.0493901111,
-0.2232093811,
-0.1347194314,
0.0018673111,
-0.1056639627,
0.116055578,
0.5150145292,
0.2339854538,
0.3465537429,
-0.1307942867,
0.0239980593,
0.1542148739,
0.0706345141,
-0.0500433706,
0.064581424,
-0.175925836,
0.0218920484,
-0.31654194,
0.0213838946,
-0.34171772,
-0.1691870093,
0.0773044378,
-0.0114145949,
0.0543420911,
-0.1062711924,
-0.0838248134,
-0.230751276,
-0.4037020206,
-0.1084923074,
0.0605471693,
0.1502103806,
0.1372215003,
0.210877195,
-0.3826013207,
0.0159681514,
-0.203060329,
-0.1918773651,
-0.3366512656,
0.1416358352,
-0.1806384474,
0.0794324726,
-0.0046103075,
-0.7226566076,
0.4088578224,
0.0900722072,
-0.1415321529,
-0.2692626119,
0.4366319478,
-0.2164306343,
0.1583116204,
0.0111387549,
-0.1688192785,
0.1273403466,
-0.0186237097,
-0.0218231529,
-0.1080177352,
0.0238683596,
-0.140532732,
-0.0906963125,
-0.1264303476,
0.2938246429,
0.1999357343,
0.2575149536,
0.3168151677,
0.3918616772,
-0.0317622274,
0.0356455818,
0.093077153,
0.0182365607,
-0.3235778213,
-0.1311047822,
0.0814260393,
0.2557792068,
-0.0844864696,
-0.03427241,
0.0129468739,
0.0059577972,
0.2059481442,
0.5270094872,
-0.1314261854,
0.2728062272,
-0.3161910474,
0.306845963,
0.1753149927,
-0.4883659482,
-0.0050708614,
-0.1671351641,
0.0342873633,
0.1037546694,
0.2280558944,
0.0257392637,
0.2874675691,
-0.1020957604,
0.220664382,
-0.118950516,
0.2129844725,
-0.1990241408,
-0.2243697196,
-0.0217816532,
-0.0441006944,
-0.1115866452,
-0.1224104762,
-0.240757823,
0.0232190825,
-0.0264476966,
0.1633727998,
-0.0874786824,
-0.1633481085,
-0.0287169628,
0.0382602215,
-0.0036899094,
0.0643827021,
0.0341984704,
-0.1461327374,
0.2015022337,
-0.1772348881,
0.326967001,
0.0302658677,
-0.1839377582,
-0.2615671754,
-0.0959580094,
-0.2973308265,
-0.1768952757,
0.2863488495,
0.2737017572,
0.0176794082,
0.1425696015,
0.0079258084,
0.1106469035,
-0.0368707888,
0.1908318698,
-0.5088584423,
0.0802479759,
-0.1847525239,
0.060399916,
0.1334295571,
0.2846052051,
0.1789465845,
0.0156147406,
0.2225700021,
0.0092979204,
0.312587291,
0.0275248848,
0.2928508222,
-0.1491541713,
0.0233944822,
-0.1707876921,
-0.0926240906,
0.0833111107,
0.18655397,
-0.0546856262,
-0.037960954,
0.4738604426,
0.5330001116,
-0.2722344697,
0.1020212248,
-0.1302971244,
0.2794709802,
-0.135797888,
-0.0729423091,
-0.4929494262,
0.0669530779,
0.5568973422,
0.2402731478,
0.4626099169,
-0.2420150042,
0.0891899318,
0.1307507604,
-0.1754648685,
0.028032722,
-0.189013809,
-0.2137300372,
-0.1118451878,
0.1290922165,
0.3554100394,
0.0149279162,
0.2737827897,
0.5646853447,
0.1218462735,
-0.152469188,
-0.2303453982,
0.1902776361,
-0.0628229231,
-0.1223018765,
0.1247756183,
0.108912915,
-0.0174059551,
-0.7163105011,
0.109149538,
0.0674969405,
0.1782830805,
-0.1040222496,
0.0458262041,
-0.5186647177,
-0.2792088687,
-0.3423459828,
0.1161627322,
-0.2141041756,
-0.2102278918,
0.2235584557,
0.0833828747,
-0.0791669339,
0.221653074,
-0.0587281212,
0.4643625915,
-0.1414307356,
0.1901517957,
-0.2832052112,
0.0621859394,
-0.2202774882,
0.2213906497,
0.1573349237,
-0.0116417184,
0.3668320477,
-0.1453350633,
-0.0091759674,
-0.4053193331,
-0.5439636111,
0.1548528969,
0.1620248258,
0.1663460135,
-0.0150463656,
-0.2284674197,
-0.0598771274,
-0.228774026,
-0.0926365703,
0.2382826209,
-0.4187107682,
-0.0588347465,
-0.160943836,
0.3222584724,
-0.1647998989,
-0.3569101393,
0.1333420277,
-0.1296956688,
0.1131874025,
0.0948971808,
0.2506996095,
0.1955592334,
-0.0962622017,
0.1708019972,
-0.4386242032,
0.0114031807,
-0.5250062943,
-0.334762156,
0.1283044666,
-0.1221258342,
-0.0773986876,
-0.1265256703,
-0.4503445625,
0.5347154737,
-0.2043714821,
-0.3808067441,
-0.1040005758,
0.0391997695,
0.0052051023,
0.3159892261,
-0.0729474649,
-0.052400995,
0.2954609692,
-0.3133577704,
-0.0572946742,
0.0053231567,
0.0534762889,
0.0567471683,
0.1919593066,
-0.3597277701,
-0.0272062626,
0.1268523186,
0.1769525707,
0.4423538446,
-0.0578040108,
0.271130383,
0.101645425,
0.4149210751,
-0.035089165,
-0.0963193476,
-0.1374598593,
-0.1580800116,
0.1463185251,
0.5981576443,
0.1985944659,
0.0928999782,
-0.0192280039,
0.0230378285,
-0.1344580799,
-0.3823530078,
-0.2087147683,
-0.2636794448,
-0.0069356207,
0.2116353661,
-0.1811708808,
0.1093774587,
0.1607609987,
0.1593931615,
0.0727888122,
-0.1498091668,
-0.0968030989,
-0.0381271839,
0.516720295,
-0.6166173816,
0.1802099347,
0.0624594837,
-0.0113827772,
0.046152778,
-0.0188278034,
0.1572401077,
-0.0100982133,
0.4922402501,
-0.3488265574,
0.0443121269,
0.0332382023,
-0.1674067974,
-0.3114116192,
0.1224630177,
-0.2982157469,
-0.1219374835,
0.17314592,
0.5565639138,
-0.251090616,
-0.0345065743,
0.2294425368,
0.1539776772,
-0.2126264572,
0.0874856412,
-0.2398450524,
-0.4762764871,
-0.1906114817,
-0.0675288662,
-0.0483934097,
0.0847019106,
0.1393900514,
-0.3079849482,
-0.1403476447,
0.0805950612,
0.3862343132,
0.1830415726,
0.0926793367,
0.2992740273,
0.2168320715,
0.0538577028,
0.2178731263,
0.0334339067,
0.7148376107,
-0.3341756463,
-0.2698462903,
-0.2647652626,
-0.0753837675,
0.021223817,
0.3166490197,
0.0391311571,
0.4542928934,
-0.0619202852,
-0.0403193645,
0.011750102,
0.110681206,
0.4621831775,
0.0956038535,
-0.2127038389,
-0.364109844,
0.0299234912,
-0.0071277805,
-0.2579859495,
0.3333189785,
-0.1612224877,
-0.0604873598,
0.0208553746,
0.0301933289,
1.0644152164,
-0.2760586739,
0.0928508192,
0.3648729026,
-0.2055188417,
0.2576836348,
0.1336090565,
-0.088897422,
-0.157639578,
0.2409190536,
0.0959123895,
0.1458932608,
0.0026947064,
0.2030569464,
-0.2064413577,
0.066246599,
0.1770913005,
-0.169754222,
-0.0332998857,
0.0339080691,
0.0557185113,
0.178826794,
0.1361744702,
0.2064749748,
0.1101294309,
-0.0273519568,
0.0567530952,
-0.0005142987,
0.1192089543,
-0.1942101121,
0.0687479228,
0.0199437737,
-0.1854945719,
0.2835594714,
-0.1523348987,
-0.4586694241,
-0.1404190063,
-0.2169040143,
0.192853108,
-0.090867728,
0.0777016282,
0.1705891192,
0.3158831298,
0.1821531206,
-0.1296542734,
-0.0478681102,
0.3358630538,
-0.0105483159,
-0.2502413988,
0.0827580839,
0.2837595642,
0.0486861318,
0.0348306298,
0.280177027,
-0.3211698532,
-0.0737147033,
0.0834076032,
0.2097002715,
-0.2965659201,
-0.4031595588,
0.2004607767,
-0.1632796228,
-0.2333469689,
-0.1487855613,
0.0982618853,
-0.282905817,
-0.0062639327,
0.191360563,
0.4226552546,
-0.0867736563,
0.1324682832,
0.0786747262,
-0.089137964,
-0.2560742497,
0.1318187118,
0.1467037648,
-0.5616839528,
0.1952316165,
-0.1307239532,
0.019607991,
0.1153242812,
0.1314592957,
-0.0170004182,
-0.2400066257,
-0.2057886124,
0.0706406981,
-0.3164940476,
0.0977498442,
-0.0716599375,
0.3519403636,
-0.1970598847,
0.0227942616,
-0.1280142516,
0.2551704049,
-0.4023962915,
0.3481817544,
-0.2751217782,
0.2651209533,
-0.2275215685,
-0.0737769678,
-0.1020166576,
0.3335078061,
0.2248565257,
-0.096714966,
-0.400473237,
-0.3237602711,
-0.2450775951,
0.0638764873,
-0.1113530844,
-0.0443420447,
-0.0186429024,
0.1241746694,
0.2122279257,
-0.1670003384,
0.1350724399,
0.151306361,
0.2527487874,
0.145154953,
0.1004986018,
-0.0807349905,
-0.2317057699,
-0.096202068,
0.1128522083,
0.0605734736,
0.3657429516,
-0.2195558548,
-0.2831243277,
-0.2371462286,
-0.0200084243,
0.0086325426,
0.1730712354,
-0.1621913463,
-0.0964882374,
0.1578145325,
-0.268270582,
-0.0104038715,
0.248647213,
-0.0059929583,
-0.2193803787,
-0.2179912925,
0.1154687852,
0.2430664748,
-0.5087180138,
-0.1043304801,
0.002925545,
-0.309163928,
0.2455792278,
0.1804057658,
0.0081359819,
-0.0319935456,
0.0910802633,
-0.2570299804,
0.0060191415,
-0.1729641706,
0.3735984266,
0.354226172,
0.0548059642,
-0.1256594509,
0.5434416533,
0.0092391632,
0.225767225,
0.4770340323,
-0.0859540999,
0.5685112476,
-0.3942368627,
0.1600410491,
0.2826444507,
-0.045967754,
0.159390837,
0.2637464404,
-0.0594221726,
0.0169203263,
0.0836919472,
0.1143941134,
0.2495166212,
0.0125525035,
-0.2026273012,
0.177924037,
-0.1874751598,
-0.3193874359,
0.1066906899,
-0.2320486307,
-0.0901399404,
0.1481955647,
0.041320648,
-0.0848243535,
0.0190775339,
0.2085651159,
-0.0676681772,
0.0382266492,
-0.3484534621,
-0.1815467775,
0.1049732566,
-0.1133372337,
0.3851994574,
0.4369289279,
-0.0377188213,
-0.0744032189,
0.3042878807,
0.3492515981,
-0.3513213098,
0.1408328116,
-0.0486054644,
-0.3223830163,
0.0016420856,
-0.1893452704,
0.1748964936,
0.0700880587,
-0.0769210756,
0.2669954002,
0.1355819702,
-0.2319870591,
-0.2327670455,
0.425272733,
-0.0695292726,
-0.4111590981,
0.4312680364,
-0.3308847249,
-0.0459828861,
-0.0697188228,
0.2132514268,
-0.4768787622,
0.3899278343,
0.4216946661,
-0.1598173529,
0.0607749969,
-0.0812870562,
0.1262682378,
0.014322564,
0.5851632953,
0.1267196387,
0.0722899586,
-0.2126636952,
-0.3589541316,
-0.5591654778,
0.3465291262,
-0.380258292,
0.0131843388,
0.0126304962,
0.0681148916,
0.0360697694,
0.1930888742,
-0.0475784987,
0.1963952482,
0.1265953779,
-0.2434820235,
-0.4807628989,
-0.0214085318,
0.0113789113,
-0.1753041148,
0.0147314519,
-0.282592237,
0.0951527655,
-0.4127328992,
0.0645714179,
0.1924359947,
-0.1241100281,
0.2314431965,
0.256478399,
0.2895268798,
0.1387013942,
0.2878735065,
0.0106290653,
0.0304808989,
0.0776630044,
-0.1701427698,
0.1227281541,
0.2852529585,
0.1638189107,
-0.0594855398,
0.0061943904,
-0.2301671207,
0.1879748404,
0.3709398806,
0.2256376147,
0.1016521901,
-0.0982465073,
0.1454762965,
0.174274236,
-0.1492630243,
-0.0882015228,
0.3099319339,
0.0910009593,
-0.0464996994,
-0.2668632269,
-0.5187710524,
0.5504891872,
-0.3391299844,
-0.0577014796,
-0.3835507333,
0.2319303751,
-0.1272618324,
0.0766810402,
-0.7147966623,
0.2014077306,
0.3444116712,
0.0844139308,
-0.2033613175,
0.2627136409,
-0.2223799527,
0.0071990415,
0.0059526712,
0.0117044337,
0.2193949372,
-0.0540830642,
0.1059643701,
-0.2452142239
] |
https://github.com/huggingface/datasets/issues/2214 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings' | Hi @nsaphra, thanks for reporting.
This issue was fixed in `datasets` version 1.3.0. Could you please update `datasets` and tell me if the problem persists?
```shell
pip install -U datasets
``` | I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
``` | 31 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
Hi @nsaphra, thanks for reporting.
This issue was fixed in `datasets` version 1.3.0. Could you please update `datasets` and tell me if the problem persists?
```shell
pip install -U datasets
``` | [
-0.2723237276,
-0.2135578841,
0.0193222016,
0.1852922738,
0.4195097387,
0.0630553216,
0.2729538977,
0.1801060289,
0.0756963268,
-0.0524458438,
-0.1940379292,
0.1545960009,
-0.0744483992,
0.297414422,
0.0652142391,
-0.0471374765,
-0.031500645,
0.0150832348,
-0.2626024485,
0.0296813995,
-0.3187801242,
0.2936376631,
-0.167272836,
-0.1764031798,
-0.4021223783,
-0.0105558727,
0.043747291,
0.2441150695,
-0.2862704694,
-0.5002135038,
0.205599919,
0.046203699,
0.296343565,
0.3439412713,
-0.0001162612,
-0.0840861052,
0.2146514952,
-0.0279944651,
-0.5544193983,
-0.1524076164,
0.0528011769,
-0.2994415462,
0.2512986064,
-0.105396226,
-0.0264722854,
-0.1421280801,
-0.0965211093,
-0.2981287837,
0.3209560513,
0.2984566092,
0.2062049508,
0.6519038677,
0.1126082838,
-0.3246345222,
0.0756544918,
-0.1170938537,
-0.1389449835,
0.5830131769,
0.2155661136,
-0.2970147431,
0.00555709,
0.1997517645,
-0.0833814964,
0.296037674,
0.5132629275,
0.0072546378,
0.0939973742,
-0.0558892637,
0.1015873998,
0.0599486344,
0.4848247766,
-0.3377354145,
-0.3453688323,
-0.2876416743,
0.1571337581,
-0.3172515035,
0.2258809358,
-0.1266945153,
0.0611912906,
0.1738775373,
-0.1425375342,
-0.2746183276,
0.0273852348,
0.2549824119,
-0.0566364229,
-0.1325747818,
-0.3288049698,
-0.0292667001,
0.3993551135,
0.0067994483,
0.0061148405,
0.1106409058,
0.0018887417,
0.2454483807,
-0.2312645763,
0.1604048312,
0.2210603505,
0.0638861656,
0.1995058358,
0.1169552952,
0.1385354847,
-0.1091202497,
0.2827872634,
0.1445123404,
0.045115035,
0.4553064108,
0.4384200573,
0.050126072,
0.2727785707,
0.3831757009,
0.2283394039,
-0.1032072753,
-0.0001544729,
-0.4193745553,
-0.1396084577,
-0.1696380377,
0.3145554066,
-0.0437626094,
-0.3397496045,
0.2789830267,
0.2250331044,
-0.1100322157,
0.0559781455,
0.1666688472,
0.038957119,
0.0680726618,
0.3797697127,
0.1804559231,
-0.2567596436,
0.0695362389,
-0.2539496422,
0.0192096867,
-0.2204783708,
0.2743338943,
0.2387656569,
-0.1765835583,
0.2692466378,
0.1394807845,
0.0810189322,
0.0131128505,
-0.1423485577,
0.1412218511,
-0.2486165464,
0.2955055237,
0.0133453384,
0.1941343397,
0.3053652644,
-0.3389751315,
-0.0738553256,
-0.248393029,
-0.2457935065,
-0.0913327858,
-0.2465759665,
0.1607254893,
-0.3777994812,
0.1018846408,
-0.1548735797,
0.0269371904,
0.1158765554,
0.095525831,
-0.0533687063,
-0.0219100509,
-0.4126269221,
-0.0537652373,
0.3398079872,
0.4070770741,
-0.2471121848,
-0.4057829976,
0.1503965706,
-0.1388978064,
-0.2114148736,
0.0392380916,
0.0853885859,
0.2430646122,
-0.2263121009,
0.0026323944,
0.1370444298,
-0.5137927532,
-0.4204656482,
0.139676854,
-0.1487747431,
0.0827299803,
0.0750860721,
-0.1714536101,
0.1146220192,
0.1830541342,
0.4504913092,
0.0914153904,
0.1167477071,
-0.1548795998,
-0.2908252478,
-0.1838074028,
-0.2629747987,
0.254432112,
0.1082778871,
0.0519851111,
0.1758349985,
0.1697669923,
0.0678902715,
-0.0798932016,
0.0112946965,
0.493267417,
0.1543735862,
-0.0364747718,
0.1711864024,
-0.2008412182,
-0.5201351643,
0.2156840414,
-0.0183967203,
0.0993434638,
-0.0899930596,
-0.066885829,
-0.3745588958,
-0.0463789403,
-0.0753309429,
-0.1765414774,
0.0452710576,
-0.0109367184,
-0.1645413339,
0.3287500143,
-0.142002821,
0.2980307341,
-0.3087517619,
0.3473670185,
-0.3626066744,
0.2142395973,
0.0971090123,
-0.1683485508,
0.174861297,
0.1577346474,
0.1103115082,
-0.1772713214,
-0.0718012229,
0.4855266809,
0.1505095661,
0.0629775375,
-0.0285115745,
0.2165286243,
0.1915653497,
-0.1421235949,
-0.1667534411,
-0.0733657703,
0.0350699052,
-0.0022642314,
-0.0186239351,
0.1603875756,
-0.1758858413,
0.0595270544,
0.112399295,
0.1688022912,
0.0488790572,
-0.0778959095,
-0.1880658716,
-0.3839530349,
0.4798425436,
-0.0180928707,
0.3275280297,
-0.0315786377,
0.173725754,
-0.1127126887,
0.3555786312,
0.0096923336,
0.0877414569,
0.1162706763,
-0.3088012636,
0.1370430887,
-0.0036528464,
0.0116576701,
0.4693245292,
0.2006489933,
-0.0045759398,
0.2940475643,
0.0089874677,
-0.0964114964,
0.1286132485,
0.0178794283,
-0.1744786799,
0.290194869,
-0.0639037192,
-0.0595523417,
-0.3733411133,
0.1549216658,
-0.0791443437,
0.2749667764,
-0.5363029242,
-0.175765276,
-0.1411076784,
0.0296395123,
0.0277284682,
-0.0767669231,
-0.2003962696,
-0.2440668344,
-0.029248897,
0.3258096278,
0.1955313832,
0.3660385013,
0.2152753472,
0.4211016595,
-0.0384673588,
0.0846681073,
-0.1243118942,
-0.2874587774,
-0.0785379857,
0.0081651025,
0.1657316387,
-0.0335030779,
0.1387256831,
-0.6127304435,
0.0644364655,
-0.2362845242,
-0.368850708,
0.0849089175,
-0.0047378452,
0.6359254122,
0.32058236,
0.149453029,
-0.0961013287,
0.0279979184,
0.3684043288,
0.0242662206,
-0.2071205974,
0.0681152642,
-0.0857635438,
-0.2336563766,
-0.3043377399,
-0.1047393903,
0.0186323766,
-0.5030639172,
0.38760975,
0.0402851701,
-0.2336948067,
0.3373193443,
0.0795236975,
0.2915136218,
0.0523022413,
0.2416900694,
-0.2613459826,
-0.3416881859,
0.2696040571,
-0.234615922,
-0.4145873189,
-0.0377657935,
0.1373153776,
0.1808703542,
-0.0452898405,
-0.462761879,
-0.4108829498,
-0.1143375039,
0.1598947942,
-0.1194811016,
0.3886235654,
0.1906864196,
0.0357466899,
0.0353720784,
-0.3328504562,
-0.1745150238,
0.0547358543,
-0.1960034519,
0.016750142,
-0.2609969974,
0.1186320186,
0.0603460222,
0.3715051115,
0.2424536794,
-0.0580783561,
0.2844277918,
-0.1521651894,
0.6900767684,
-0.1171554551,
-0.5205394626,
0.0709483176,
0.0032523945,
0.2066449821,
0.2943496704,
0.0683959424,
0.3357645571,
-0.2086579353,
0.0799773932,
-0.1074492484,
-0.1985200644,
-0.1780727953,
0.0575306118,
0.2056673318,
0.0434776098,
0.2509674132,
-0.1185468286,
0.0546497256,
0.1190924868,
0.4457847178,
-0.058225356,
0.0248066597,
-0.396876812,
0.1530400962,
-0.4186137319,
0.3114284873,
-0.0233408269,
0.2591665983,
-0.2117100507,
-0.1854935884,
0.0008124411,
0.0003986917,
0.4743222892,
-0.023287911,
-0.1957426965,
0.2003181428,
-0.0690097809,
-0.6852129698,
-0.0052713603,
-0.0417399518,
-0.078985557,
0.1828623563,
0.7977377772,
-0.2625103295,
-0.301401794,
0.1301297098,
0.1023929715,
-0.0043753758,
-0.0999476165,
-0.3193714917,
-0.3368155956,
-0.1378114372,
-0.0916926563,
-0.0276016407,
0.2983661592,
0.1582413614,
0.2091057748,
-0.1144395024,
-0.2217679024,
0.1712338477,
0.1866388321,
0.1943308711,
-0.0234471187,
0.3947012424,
0.3202785552,
-0.076360181,
0.4250128567,
0.4037998021,
-0.430989176,
-0.6466450691,
0.1787408143,
-0.0535437912,
0.1202298254,
0.1575004458,
-0.2035826743,
0.0360498838,
-0.0532165542,
0.2204990536,
-0.4408123493,
0.265289247,
0.4414026141,
0.1872788221,
-0.0870295539,
-0.1726748645,
0.3064505458,
0.0870730579,
0.009992972,
0.4308447838,
0.0634559244,
-0.2938774228,
-0.0701914728,
-0.2305244505,
0.5940445662,
0.0290087909,
0.1729604602,
0.2764143646,
-0.1854176819,
0.4218056798,
-0.0393422581,
-0.0951732695,
-0.2183061838,
-0.4836226702,
0.0405451581,
-0.0413950942,
0.2808118165,
-0.2143424898,
-0.1116682887,
0.0950956792,
-0.2373243719,
0.070435822,
-0.0563034192,
0.2277138084,
-0.2661422491,
-0.1809368134,
-0.2217794955,
0.122425139,
-0.1408928186,
0.2309866548,
-0.1256344914,
0.1210688055,
-0.0697817355,
-0.221268937,
-0.1227324456,
-0.1291439086,
-0.2800858617,
0.1442725062,
0.2374104857,
-0.1632550657,
-0.0273619629,
0.3203986585,
0.4834207892,
0.0730525553,
-0.3700914085,
0.2075030655,
-0.3207895756,
-0.0973202586,
-0.0424921438,
0.071560964,
0.2013946623,
0.0530961454,
0.0595654398,
-0.1689050198,
0.0645230785,
0.2031840086,
0.0174666792,
-0.0456065685,
-0.0876969397,
-0.491941452,
-0.1246386021,
-0.0510225073,
0.2836450338,
-0.3275455832,
0.0981151611,
0.0562658124,
0.0147646852,
0.1047226936,
-0.0331802964,
-0.2428843379,
-0.0733277649,
0.6832268238,
-0.3613942564,
-0.1414558887,
0.1263993979,
0.1018076986,
-0.3189934194,
-0.1406425983,
0.2113711238,
0.2389924377,
-0.3433932662,
0.2778009176,
0.5266759992,
0.0435030311,
-0.0637035966,
0.4369814992,
0.2357451618,
-0.3535467386,
0.1269494295,
-0.2212592363,
-0.3677402735,
0.2803767323,
-0.166106835,
0.1610450745,
0.0869790986,
0.1942925602,
-0.105055429,
-0.0148055749,
-0.2793800533,
0.2116765678,
-0.0993371159,
-0.1408016682,
0.600242734,
-0.2447776049,
0.2816811204,
-0.1756052077,
0.0771708041,
0.0156535693,
-0.3317779899,
-0.1820969582,
-0.4139861465,
0.1064252183,
-0.0538476594,
-0.1300275326,
0.2956241667,
0.0028882995,
-0.0922225788,
-0.2934280336,
0.1935119331,
0.4534092546,
-0.0462223776,
0.2377130389,
-0.1227491945,
0.2323916554,
0.1859099269,
0.1401137114,
-0.100802131,
0.0997578427,
-0.0606915243,
0.0412761793,
-0.1847330034,
0.2028344274,
0.0222671628,
0.2372682393,
0.1615042537,
-0.1148736477,
0.1546189338,
-0.1380565614,
0.0113243908,
-0.0168449506,
0.3367971182,
0.294595778,
-0.2881361842,
-0.0667467415,
0.1050199643,
0.187394768,
-0.2524312139,
-0.2942764461,
0.0593589172,
0.0206503086,
0.1127659231,
0.1540551186,
0.1536149532,
-0.1455434412,
0.0944111869,
0.0923186466,
0.3824129701,
0.1105606928,
0.1702654809,
0.1636682153,
0.1364788711,
-0.0244052149,
0.3797616065,
0.0976051092,
0.222942248,
0.0688982159,
-0.4428271949,
0.0882380977,
-0.2641710341,
0.3839266896,
-0.2432177812,
-0.4694576561,
0.0781103,
0.0745860785,
-0.0688808113,
-0.0325671248,
-0.3320102096,
0.7181390524,
-0.3015742898,
-0.0596847758,
-0.0467804931,
0.0559418574,
-0.1177832037,
-0.1937916577,
-0.0985111818,
-0.1023546904,
-0.0581145659,
-0.0594297349,
-0.0467673019,
-0.1459453106,
0.3599123955,
-0.1085799858,
-0.0336294696,
-0.3310736418,
-0.3075086176,
0.2592686415,
-0.1198570877,
-0.1322976649,
0.2339995056,
-0.1117592826,
0.2395398766,
0.0096041579,
0.6236205697,
0.4861672819,
0.0578342974,
0.164226383,
-0.1270776689,
-0.1182661802,
0.0369489193,
-0.0820899159,
0.4027971327,
0.0168093611,
0.14492926,
0.1828604788,
0.1365625113,
-0.2118964791,
0.152908802,
-0.2281760871,
-0.3224209845,
-0.3317997456,
0.0626962334,
-0.2673918903,
-0.0225483552,
-0.1309146583,
0.1140618101,
-0.3242832422,
0.1154517233,
0.4083707035,
0.1985115409,
0.0875708461,
-0.1523372978,
0.0868727267,
-0.0534984469,
0.1909269691,
0.4000778496,
0.0367472582,
-0.2721702456,
-0.2734408677,
-0.6236270666,
0.0099142976,
0.121677123,
-0.0570753962,
0.1204301715,
-0.0348659121,
0.0610776395,
-0.0391000807,
0.1405402124,
0.102717191,
-0.0041312203,
-0.2952066958,
-0.4408200383,
0.0197269451,
-0.2038558871,
-0.1017733514,
0.0670962632,
-0.2293941379,
-0.0436049551,
-0.1830173731,
-0.0207561292,
-0.1345574111,
0.2511404157,
0.0660698116,
0.0035565263,
0.4722619355,
-0.0868722126,
0.3599009514,
-0.0522920862,
-0.0728002116,
-0.1637542546,
-0.456664741,
-0.0161273107,
0.1952703893,
-0.0664699674,
0.2887930274,
-0.4623140693,
-0.3876188695,
-0.2914839387,
0.5101402998,
0.2518330216,
-0.0921490267,
-0.2270251811,
0.3375522792,
-0.1708120704,
0.0662503988,
0.1981479526,
0.3309062123,
-0.1810206324,
0.3260760903,
-0.1189143807,
-0.5026896,
0.6233594418,
-0.3565813899,
-0.0996358618,
0.22452721,
0.288562417,
0.3277511001,
-0.3560942411,
-0.6024031639,
-0.057727173,
0.3717494905,
0.028430786,
-0.5067503452,
0.5917935371,
-0.2716614008,
0.1035223603,
-0.0543051511,
0.1474553943,
0.2477992028,
-0.2005044073,
0.2222828865,
-0.242478475
] |
https://github.com/huggingface/datasets/issues/2214 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings' | There might be a bug in the conda version of `datasets` 1.2.1 where the datasets/metric scripts are downloaded from `master` instead of the `1.2.1` repo.
You can try setting the env var `HF_SCRIPTS_VERSION="1.2.1"` as a workaround. Let me know if that helps. | I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
``` | 42 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
There might be a bug in the conda version of `datasets` 1.2.1 where the datasets/metric scripts are downloaded from `master` instead of the `1.2.1` repo.
You can try setting the env var `HF_SCRIPTS_VERSION="1.2.1"` as a workaround. Let me know if that helps. | [
-0.2723237276,
-0.2135578841,
0.0193222016,
0.1852922738,
0.4195097387,
0.0630553216,
0.2729538977,
0.1801060289,
0.0756963268,
-0.0524458438,
-0.1940379292,
0.1545960009,
-0.0744483992,
0.297414422,
0.0652142391,
-0.0471374765,
-0.031500645,
0.0150832348,
-0.2626024485,
0.0296813995,
-0.3187801242,
0.2936376631,
-0.167272836,
-0.1764031798,
-0.4021223783,
-0.0105558727,
0.043747291,
0.2441150695,
-0.2862704694,
-0.5002135038,
0.205599919,
0.046203699,
0.296343565,
0.3439412713,
-0.0001162612,
-0.0840861052,
0.2146514952,
-0.0279944651,
-0.5544193983,
-0.1524076164,
0.0528011769,
-0.2994415462,
0.2512986064,
-0.105396226,
-0.0264722854,
-0.1421280801,
-0.0965211093,
-0.2981287837,
0.3209560513,
0.2984566092,
0.2062049508,
0.6519038677,
0.1126082838,
-0.3246345222,
0.0756544918,
-0.1170938537,
-0.1389449835,
0.5830131769,
0.2155661136,
-0.2970147431,
0.00555709,
0.1997517645,
-0.0833814964,
0.296037674,
0.5132629275,
0.0072546378,
0.0939973742,
-0.0558892637,
0.1015873998,
0.0599486344,
0.4848247766,
-0.3377354145,
-0.3453688323,
-0.2876416743,
0.1571337581,
-0.3172515035,
0.2258809358,
-0.1266945153,
0.0611912906,
0.1738775373,
-0.1425375342,
-0.2746183276,
0.0273852348,
0.2549824119,
-0.0566364229,
-0.1325747818,
-0.3288049698,
-0.0292667001,
0.3993551135,
0.0067994483,
0.0061148405,
0.1106409058,
0.0018887417,
0.2454483807,
-0.2312645763,
0.1604048312,
0.2210603505,
0.0638861656,
0.1995058358,
0.1169552952,
0.1385354847,
-0.1091202497,
0.2827872634,
0.1445123404,
0.045115035,
0.4553064108,
0.4384200573,
0.050126072,
0.2727785707,
0.3831757009,
0.2283394039,
-0.1032072753,
-0.0001544729,
-0.4193745553,
-0.1396084577,
-0.1696380377,
0.3145554066,
-0.0437626094,
-0.3397496045,
0.2789830267,
0.2250331044,
-0.1100322157,
0.0559781455,
0.1666688472,
0.038957119,
0.0680726618,
0.3797697127,
0.1804559231,
-0.2567596436,
0.0695362389,
-0.2539496422,
0.0192096867,
-0.2204783708,
0.2743338943,
0.2387656569,
-0.1765835583,
0.2692466378,
0.1394807845,
0.0810189322,
0.0131128505,
-0.1423485577,
0.1412218511,
-0.2486165464,
0.2955055237,
0.0133453384,
0.1941343397,
0.3053652644,
-0.3389751315,
-0.0738553256,
-0.248393029,
-0.2457935065,
-0.0913327858,
-0.2465759665,
0.1607254893,
-0.3777994812,
0.1018846408,
-0.1548735797,
0.0269371904,
0.1158765554,
0.095525831,
-0.0533687063,
-0.0219100509,
-0.4126269221,
-0.0537652373,
0.3398079872,
0.4070770741,
-0.2471121848,
-0.4057829976,
0.1503965706,
-0.1388978064,
-0.2114148736,
0.0392380916,
0.0853885859,
0.2430646122,
-0.2263121009,
0.0026323944,
0.1370444298,
-0.5137927532,
-0.4204656482,
0.139676854,
-0.1487747431,
0.0827299803,
0.0750860721,
-0.1714536101,
0.1146220192,
0.1830541342,
0.4504913092,
0.0914153904,
0.1167477071,
-0.1548795998,
-0.2908252478,
-0.1838074028,
-0.2629747987,
0.254432112,
0.1082778871,
0.0519851111,
0.1758349985,
0.1697669923,
0.0678902715,
-0.0798932016,
0.0112946965,
0.493267417,
0.1543735862,
-0.0364747718,
0.1711864024,
-0.2008412182,
-0.5201351643,
0.2156840414,
-0.0183967203,
0.0993434638,
-0.0899930596,
-0.066885829,
-0.3745588958,
-0.0463789403,
-0.0753309429,
-0.1765414774,
0.0452710576,
-0.0109367184,
-0.1645413339,
0.3287500143,
-0.142002821,
0.2980307341,
-0.3087517619,
0.3473670185,
-0.3626066744,
0.2142395973,
0.0971090123,
-0.1683485508,
0.174861297,
0.1577346474,
0.1103115082,
-0.1772713214,
-0.0718012229,
0.4855266809,
0.1505095661,
0.0629775375,
-0.0285115745,
0.2165286243,
0.1915653497,
-0.1421235949,
-0.1667534411,
-0.0733657703,
0.0350699052,
-0.0022642314,
-0.0186239351,
0.1603875756,
-0.1758858413,
0.0595270544,
0.112399295,
0.1688022912,
0.0488790572,
-0.0778959095,
-0.1880658716,
-0.3839530349,
0.4798425436,
-0.0180928707,
0.3275280297,
-0.0315786377,
0.173725754,
-0.1127126887,
0.3555786312,
0.0096923336,
0.0877414569,
0.1162706763,
-0.3088012636,
0.1370430887,
-0.0036528464,
0.0116576701,
0.4693245292,
0.2006489933,
-0.0045759398,
0.2940475643,
0.0089874677,
-0.0964114964,
0.1286132485,
0.0178794283,
-0.1744786799,
0.290194869,
-0.0639037192,
-0.0595523417,
-0.3733411133,
0.1549216658,
-0.0791443437,
0.2749667764,
-0.5363029242,
-0.175765276,
-0.1411076784,
0.0296395123,
0.0277284682,
-0.0767669231,
-0.2003962696,
-0.2440668344,
-0.029248897,
0.3258096278,
0.1955313832,
0.3660385013,
0.2152753472,
0.4211016595,
-0.0384673588,
0.0846681073,
-0.1243118942,
-0.2874587774,
-0.0785379857,
0.0081651025,
0.1657316387,
-0.0335030779,
0.1387256831,
-0.6127304435,
0.0644364655,
-0.2362845242,
-0.368850708,
0.0849089175,
-0.0047378452,
0.6359254122,
0.32058236,
0.149453029,
-0.0961013287,
0.0279979184,
0.3684043288,
0.0242662206,
-0.2071205974,
0.0681152642,
-0.0857635438,
-0.2336563766,
-0.3043377399,
-0.1047393903,
0.0186323766,
-0.5030639172,
0.38760975,
0.0402851701,
-0.2336948067,
0.3373193443,
0.0795236975,
0.2915136218,
0.0523022413,
0.2416900694,
-0.2613459826,
-0.3416881859,
0.2696040571,
-0.234615922,
-0.4145873189,
-0.0377657935,
0.1373153776,
0.1808703542,
-0.0452898405,
-0.462761879,
-0.4108829498,
-0.1143375039,
0.1598947942,
-0.1194811016,
0.3886235654,
0.1906864196,
0.0357466899,
0.0353720784,
-0.3328504562,
-0.1745150238,
0.0547358543,
-0.1960034519,
0.016750142,
-0.2609969974,
0.1186320186,
0.0603460222,
0.3715051115,
0.2424536794,
-0.0580783561,
0.2844277918,
-0.1521651894,
0.6900767684,
-0.1171554551,
-0.5205394626,
0.0709483176,
0.0032523945,
0.2066449821,
0.2943496704,
0.0683959424,
0.3357645571,
-0.2086579353,
0.0799773932,
-0.1074492484,
-0.1985200644,
-0.1780727953,
0.0575306118,
0.2056673318,
0.0434776098,
0.2509674132,
-0.1185468286,
0.0546497256,
0.1190924868,
0.4457847178,
-0.058225356,
0.0248066597,
-0.396876812,
0.1530400962,
-0.4186137319,
0.3114284873,
-0.0233408269,
0.2591665983,
-0.2117100507,
-0.1854935884,
0.0008124411,
0.0003986917,
0.4743222892,
-0.023287911,
-0.1957426965,
0.2003181428,
-0.0690097809,
-0.6852129698,
-0.0052713603,
-0.0417399518,
-0.078985557,
0.1828623563,
0.7977377772,
-0.2625103295,
-0.301401794,
0.1301297098,
0.1023929715,
-0.0043753758,
-0.0999476165,
-0.3193714917,
-0.3368155956,
-0.1378114372,
-0.0916926563,
-0.0276016407,
0.2983661592,
0.1582413614,
0.2091057748,
-0.1144395024,
-0.2217679024,
0.1712338477,
0.1866388321,
0.1943308711,
-0.0234471187,
0.3947012424,
0.3202785552,
-0.076360181,
0.4250128567,
0.4037998021,
-0.430989176,
-0.6466450691,
0.1787408143,
-0.0535437912,
0.1202298254,
0.1575004458,
-0.2035826743,
0.0360498838,
-0.0532165542,
0.2204990536,
-0.4408123493,
0.265289247,
0.4414026141,
0.1872788221,
-0.0870295539,
-0.1726748645,
0.3064505458,
0.0870730579,
0.009992972,
0.4308447838,
0.0634559244,
-0.2938774228,
-0.0701914728,
-0.2305244505,
0.5940445662,
0.0290087909,
0.1729604602,
0.2764143646,
-0.1854176819,
0.4218056798,
-0.0393422581,
-0.0951732695,
-0.2183061838,
-0.4836226702,
0.0405451581,
-0.0413950942,
0.2808118165,
-0.2143424898,
-0.1116682887,
0.0950956792,
-0.2373243719,
0.070435822,
-0.0563034192,
0.2277138084,
-0.2661422491,
-0.1809368134,
-0.2217794955,
0.122425139,
-0.1408928186,
0.2309866548,
-0.1256344914,
0.1210688055,
-0.0697817355,
-0.221268937,
-0.1227324456,
-0.1291439086,
-0.2800858617,
0.1442725062,
0.2374104857,
-0.1632550657,
-0.0273619629,
0.3203986585,
0.4834207892,
0.0730525553,
-0.3700914085,
0.2075030655,
-0.3207895756,
-0.0973202586,
-0.0424921438,
0.071560964,
0.2013946623,
0.0530961454,
0.0595654398,
-0.1689050198,
0.0645230785,
0.2031840086,
0.0174666792,
-0.0456065685,
-0.0876969397,
-0.491941452,
-0.1246386021,
-0.0510225073,
0.2836450338,
-0.3275455832,
0.0981151611,
0.0562658124,
0.0147646852,
0.1047226936,
-0.0331802964,
-0.2428843379,
-0.0733277649,
0.6832268238,
-0.3613942564,
-0.1414558887,
0.1263993979,
0.1018076986,
-0.3189934194,
-0.1406425983,
0.2113711238,
0.2389924377,
-0.3433932662,
0.2778009176,
0.5266759992,
0.0435030311,
-0.0637035966,
0.4369814992,
0.2357451618,
-0.3535467386,
0.1269494295,
-0.2212592363,
-0.3677402735,
0.2803767323,
-0.166106835,
0.1610450745,
0.0869790986,
0.1942925602,
-0.105055429,
-0.0148055749,
-0.2793800533,
0.2116765678,
-0.0993371159,
-0.1408016682,
0.600242734,
-0.2447776049,
0.2816811204,
-0.1756052077,
0.0771708041,
0.0156535693,
-0.3317779899,
-0.1820969582,
-0.4139861465,
0.1064252183,
-0.0538476594,
-0.1300275326,
0.2956241667,
0.0028882995,
-0.0922225788,
-0.2934280336,
0.1935119331,
0.4534092546,
-0.0462223776,
0.2377130389,
-0.1227491945,
0.2323916554,
0.1859099269,
0.1401137114,
-0.100802131,
0.0997578427,
-0.0606915243,
0.0412761793,
-0.1847330034,
0.2028344274,
0.0222671628,
0.2372682393,
0.1615042537,
-0.1148736477,
0.1546189338,
-0.1380565614,
0.0113243908,
-0.0168449506,
0.3367971182,
0.294595778,
-0.2881361842,
-0.0667467415,
0.1050199643,
0.187394768,
-0.2524312139,
-0.2942764461,
0.0593589172,
0.0206503086,
0.1127659231,
0.1540551186,
0.1536149532,
-0.1455434412,
0.0944111869,
0.0923186466,
0.3824129701,
0.1105606928,
0.1702654809,
0.1636682153,
0.1364788711,
-0.0244052149,
0.3797616065,
0.0976051092,
0.222942248,
0.0688982159,
-0.4428271949,
0.0882380977,
-0.2641710341,
0.3839266896,
-0.2432177812,
-0.4694576561,
0.0781103,
0.0745860785,
-0.0688808113,
-0.0325671248,
-0.3320102096,
0.7181390524,
-0.3015742898,
-0.0596847758,
-0.0467804931,
0.0559418574,
-0.1177832037,
-0.1937916577,
-0.0985111818,
-0.1023546904,
-0.0581145659,
-0.0594297349,
-0.0467673019,
-0.1459453106,
0.3599123955,
-0.1085799858,
-0.0336294696,
-0.3310736418,
-0.3075086176,
0.2592686415,
-0.1198570877,
-0.1322976649,
0.2339995056,
-0.1117592826,
0.2395398766,
0.0096041579,
0.6236205697,
0.4861672819,
0.0578342974,
0.164226383,
-0.1270776689,
-0.1182661802,
0.0369489193,
-0.0820899159,
0.4027971327,
0.0168093611,
0.14492926,
0.1828604788,
0.1365625113,
-0.2118964791,
0.152908802,
-0.2281760871,
-0.3224209845,
-0.3317997456,
0.0626962334,
-0.2673918903,
-0.0225483552,
-0.1309146583,
0.1140618101,
-0.3242832422,
0.1154517233,
0.4083707035,
0.1985115409,
0.0875708461,
-0.1523372978,
0.0868727267,
-0.0534984469,
0.1909269691,
0.4000778496,
0.0367472582,
-0.2721702456,
-0.2734408677,
-0.6236270666,
0.0099142976,
0.121677123,
-0.0570753962,
0.1204301715,
-0.0348659121,
0.0610776395,
-0.0391000807,
0.1405402124,
0.102717191,
-0.0041312203,
-0.2952066958,
-0.4408200383,
0.0197269451,
-0.2038558871,
-0.1017733514,
0.0670962632,
-0.2293941379,
-0.0436049551,
-0.1830173731,
-0.0207561292,
-0.1345574111,
0.2511404157,
0.0660698116,
0.0035565263,
0.4722619355,
-0.0868722126,
0.3599009514,
-0.0522920862,
-0.0728002116,
-0.1637542546,
-0.456664741,
-0.0161273107,
0.1952703893,
-0.0664699674,
0.2887930274,
-0.4623140693,
-0.3876188695,
-0.2914839387,
0.5101402998,
0.2518330216,
-0.0921490267,
-0.2270251811,
0.3375522792,
-0.1708120704,
0.0662503988,
0.1981479526,
0.3309062123,
-0.1810206324,
0.3260760903,
-0.1189143807,
-0.5026896,
0.6233594418,
-0.3565813899,
-0.0996358618,
0.22452721,
0.288562417,
0.3277511001,
-0.3560942411,
-0.6024031639,
-0.057727173,
0.3717494905,
0.028430786,
-0.5067503452,
0.5917935371,
-0.2716614008,
0.1035223603,
-0.0543051511,
0.1474553943,
0.2477992028,
-0.2005044073,
0.2222828865,
-0.242478475
] |
https://github.com/huggingface/datasets/issues/2214 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings' | I just faced the same issue. I was using 1.2.1 from conda and received the same AttributeError complaining about 'add_start_docstrings'. Uninstalling the conda installed datasets and then installing the latest datasets (version 1.5.0) using pip install solved the issue for me. I don't like mixing up conda and pip installs in the same environments but this will have to do for now, until 1.5.0 is made available through conda. | I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
``` | 69 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
I just faced the same issue. I was using 1.2.1 from conda and received the same AttributeError complaining about 'add_start_docstrings'. Uninstalling the conda installed datasets and then installing the latest datasets (version 1.5.0) using pip install solved the issue for me. I don't like mixing up conda and pip installs in the same environments but this will have to do for now, until 1.5.0 is made available through conda. | [
-0.2723237276,
-0.2135578841,
0.0193222016,
0.1852922738,
0.4195097387,
0.0630553216,
0.2729538977,
0.1801060289,
0.0756963268,
-0.0524458438,
-0.1940379292,
0.1545960009,
-0.0744483992,
0.297414422,
0.0652142391,
-0.0471374765,
-0.031500645,
0.0150832348,
-0.2626024485,
0.0296813995,
-0.3187801242,
0.2936376631,
-0.167272836,
-0.1764031798,
-0.4021223783,
-0.0105558727,
0.043747291,
0.2441150695,
-0.2862704694,
-0.5002135038,
0.205599919,
0.046203699,
0.296343565,
0.3439412713,
-0.0001162612,
-0.0840861052,
0.2146514952,
-0.0279944651,
-0.5544193983,
-0.1524076164,
0.0528011769,
-0.2994415462,
0.2512986064,
-0.105396226,
-0.0264722854,
-0.1421280801,
-0.0965211093,
-0.2981287837,
0.3209560513,
0.2984566092,
0.2062049508,
0.6519038677,
0.1126082838,
-0.3246345222,
0.0756544918,
-0.1170938537,
-0.1389449835,
0.5830131769,
0.2155661136,
-0.2970147431,
0.00555709,
0.1997517645,
-0.0833814964,
0.296037674,
0.5132629275,
0.0072546378,
0.0939973742,
-0.0558892637,
0.1015873998,
0.0599486344,
0.4848247766,
-0.3377354145,
-0.3453688323,
-0.2876416743,
0.1571337581,
-0.3172515035,
0.2258809358,
-0.1266945153,
0.0611912906,
0.1738775373,
-0.1425375342,
-0.2746183276,
0.0273852348,
0.2549824119,
-0.0566364229,
-0.1325747818,
-0.3288049698,
-0.0292667001,
0.3993551135,
0.0067994483,
0.0061148405,
0.1106409058,
0.0018887417,
0.2454483807,
-0.2312645763,
0.1604048312,
0.2210603505,
0.0638861656,
0.1995058358,
0.1169552952,
0.1385354847,
-0.1091202497,
0.2827872634,
0.1445123404,
0.045115035,
0.4553064108,
0.4384200573,
0.050126072,
0.2727785707,
0.3831757009,
0.2283394039,
-0.1032072753,
-0.0001544729,
-0.4193745553,
-0.1396084577,
-0.1696380377,
0.3145554066,
-0.0437626094,
-0.3397496045,
0.2789830267,
0.2250331044,
-0.1100322157,
0.0559781455,
0.1666688472,
0.038957119,
0.0680726618,
0.3797697127,
0.1804559231,
-0.2567596436,
0.0695362389,
-0.2539496422,
0.0192096867,
-0.2204783708,
0.2743338943,
0.2387656569,
-0.1765835583,
0.2692466378,
0.1394807845,
0.0810189322,
0.0131128505,
-0.1423485577,
0.1412218511,
-0.2486165464,
0.2955055237,
0.0133453384,
0.1941343397,
0.3053652644,
-0.3389751315,
-0.0738553256,
-0.248393029,
-0.2457935065,
-0.0913327858,
-0.2465759665,
0.1607254893,
-0.3777994812,
0.1018846408,
-0.1548735797,
0.0269371904,
0.1158765554,
0.095525831,
-0.0533687063,
-0.0219100509,
-0.4126269221,
-0.0537652373,
0.3398079872,
0.4070770741,
-0.2471121848,
-0.4057829976,
0.1503965706,
-0.1388978064,
-0.2114148736,
0.0392380916,
0.0853885859,
0.2430646122,
-0.2263121009,
0.0026323944,
0.1370444298,
-0.5137927532,
-0.4204656482,
0.139676854,
-0.1487747431,
0.0827299803,
0.0750860721,
-0.1714536101,
0.1146220192,
0.1830541342,
0.4504913092,
0.0914153904,
0.1167477071,
-0.1548795998,
-0.2908252478,
-0.1838074028,
-0.2629747987,
0.254432112,
0.1082778871,
0.0519851111,
0.1758349985,
0.1697669923,
0.0678902715,
-0.0798932016,
0.0112946965,
0.493267417,
0.1543735862,
-0.0364747718,
0.1711864024,
-0.2008412182,
-0.5201351643,
0.2156840414,
-0.0183967203,
0.0993434638,
-0.0899930596,
-0.066885829,
-0.3745588958,
-0.0463789403,
-0.0753309429,
-0.1765414774,
0.0452710576,
-0.0109367184,
-0.1645413339,
0.3287500143,
-0.142002821,
0.2980307341,
-0.3087517619,
0.3473670185,
-0.3626066744,
0.2142395973,
0.0971090123,
-0.1683485508,
0.174861297,
0.1577346474,
0.1103115082,
-0.1772713214,
-0.0718012229,
0.4855266809,
0.1505095661,
0.0629775375,
-0.0285115745,
0.2165286243,
0.1915653497,
-0.1421235949,
-0.1667534411,
-0.0733657703,
0.0350699052,
-0.0022642314,
-0.0186239351,
0.1603875756,
-0.1758858413,
0.0595270544,
0.112399295,
0.1688022912,
0.0488790572,
-0.0778959095,
-0.1880658716,
-0.3839530349,
0.4798425436,
-0.0180928707,
0.3275280297,
-0.0315786377,
0.173725754,
-0.1127126887,
0.3555786312,
0.0096923336,
0.0877414569,
0.1162706763,
-0.3088012636,
0.1370430887,
-0.0036528464,
0.0116576701,
0.4693245292,
0.2006489933,
-0.0045759398,
0.2940475643,
0.0089874677,
-0.0964114964,
0.1286132485,
0.0178794283,
-0.1744786799,
0.290194869,
-0.0639037192,
-0.0595523417,
-0.3733411133,
0.1549216658,
-0.0791443437,
0.2749667764,
-0.5363029242,
-0.175765276,
-0.1411076784,
0.0296395123,
0.0277284682,
-0.0767669231,
-0.2003962696,
-0.2440668344,
-0.029248897,
0.3258096278,
0.1955313832,
0.3660385013,
0.2152753472,
0.4211016595,
-0.0384673588,
0.0846681073,
-0.1243118942,
-0.2874587774,
-0.0785379857,
0.0081651025,
0.1657316387,
-0.0335030779,
0.1387256831,
-0.6127304435,
0.0644364655,
-0.2362845242,
-0.368850708,
0.0849089175,
-0.0047378452,
0.6359254122,
0.32058236,
0.149453029,
-0.0961013287,
0.0279979184,
0.3684043288,
0.0242662206,
-0.2071205974,
0.0681152642,
-0.0857635438,
-0.2336563766,
-0.3043377399,
-0.1047393903,
0.0186323766,
-0.5030639172,
0.38760975,
0.0402851701,
-0.2336948067,
0.3373193443,
0.0795236975,
0.2915136218,
0.0523022413,
0.2416900694,
-0.2613459826,
-0.3416881859,
0.2696040571,
-0.234615922,
-0.4145873189,
-0.0377657935,
0.1373153776,
0.1808703542,
-0.0452898405,
-0.462761879,
-0.4108829498,
-0.1143375039,
0.1598947942,
-0.1194811016,
0.3886235654,
0.1906864196,
0.0357466899,
0.0353720784,
-0.3328504562,
-0.1745150238,
0.0547358543,
-0.1960034519,
0.016750142,
-0.2609969974,
0.1186320186,
0.0603460222,
0.3715051115,
0.2424536794,
-0.0580783561,
0.2844277918,
-0.1521651894,
0.6900767684,
-0.1171554551,
-0.5205394626,
0.0709483176,
0.0032523945,
0.2066449821,
0.2943496704,
0.0683959424,
0.3357645571,
-0.2086579353,
0.0799773932,
-0.1074492484,
-0.1985200644,
-0.1780727953,
0.0575306118,
0.2056673318,
0.0434776098,
0.2509674132,
-0.1185468286,
0.0546497256,
0.1190924868,
0.4457847178,
-0.058225356,
0.0248066597,
-0.396876812,
0.1530400962,
-0.4186137319,
0.3114284873,
-0.0233408269,
0.2591665983,
-0.2117100507,
-0.1854935884,
0.0008124411,
0.0003986917,
0.4743222892,
-0.023287911,
-0.1957426965,
0.2003181428,
-0.0690097809,
-0.6852129698,
-0.0052713603,
-0.0417399518,
-0.078985557,
0.1828623563,
0.7977377772,
-0.2625103295,
-0.301401794,
0.1301297098,
0.1023929715,
-0.0043753758,
-0.0999476165,
-0.3193714917,
-0.3368155956,
-0.1378114372,
-0.0916926563,
-0.0276016407,
0.2983661592,
0.1582413614,
0.2091057748,
-0.1144395024,
-0.2217679024,
0.1712338477,
0.1866388321,
0.1943308711,
-0.0234471187,
0.3947012424,
0.3202785552,
-0.076360181,
0.4250128567,
0.4037998021,
-0.430989176,
-0.6466450691,
0.1787408143,
-0.0535437912,
0.1202298254,
0.1575004458,
-0.2035826743,
0.0360498838,
-0.0532165542,
0.2204990536,
-0.4408123493,
0.265289247,
0.4414026141,
0.1872788221,
-0.0870295539,
-0.1726748645,
0.3064505458,
0.0870730579,
0.009992972,
0.4308447838,
0.0634559244,
-0.2938774228,
-0.0701914728,
-0.2305244505,
0.5940445662,
0.0290087909,
0.1729604602,
0.2764143646,
-0.1854176819,
0.4218056798,
-0.0393422581,
-0.0951732695,
-0.2183061838,
-0.4836226702,
0.0405451581,
-0.0413950942,
0.2808118165,
-0.2143424898,
-0.1116682887,
0.0950956792,
-0.2373243719,
0.070435822,
-0.0563034192,
0.2277138084,
-0.2661422491,
-0.1809368134,
-0.2217794955,
0.122425139,
-0.1408928186,
0.2309866548,
-0.1256344914,
0.1210688055,
-0.0697817355,
-0.221268937,
-0.1227324456,
-0.1291439086,
-0.2800858617,
0.1442725062,
0.2374104857,
-0.1632550657,
-0.0273619629,
0.3203986585,
0.4834207892,
0.0730525553,
-0.3700914085,
0.2075030655,
-0.3207895756,
-0.0973202586,
-0.0424921438,
0.071560964,
0.2013946623,
0.0530961454,
0.0595654398,
-0.1689050198,
0.0645230785,
0.2031840086,
0.0174666792,
-0.0456065685,
-0.0876969397,
-0.491941452,
-0.1246386021,
-0.0510225073,
0.2836450338,
-0.3275455832,
0.0981151611,
0.0562658124,
0.0147646852,
0.1047226936,
-0.0331802964,
-0.2428843379,
-0.0733277649,
0.6832268238,
-0.3613942564,
-0.1414558887,
0.1263993979,
0.1018076986,
-0.3189934194,
-0.1406425983,
0.2113711238,
0.2389924377,
-0.3433932662,
0.2778009176,
0.5266759992,
0.0435030311,
-0.0637035966,
0.4369814992,
0.2357451618,
-0.3535467386,
0.1269494295,
-0.2212592363,
-0.3677402735,
0.2803767323,
-0.166106835,
0.1610450745,
0.0869790986,
0.1942925602,
-0.105055429,
-0.0148055749,
-0.2793800533,
0.2116765678,
-0.0993371159,
-0.1408016682,
0.600242734,
-0.2447776049,
0.2816811204,
-0.1756052077,
0.0771708041,
0.0156535693,
-0.3317779899,
-0.1820969582,
-0.4139861465,
0.1064252183,
-0.0538476594,
-0.1300275326,
0.2956241667,
0.0028882995,
-0.0922225788,
-0.2934280336,
0.1935119331,
0.4534092546,
-0.0462223776,
0.2377130389,
-0.1227491945,
0.2323916554,
0.1859099269,
0.1401137114,
-0.100802131,
0.0997578427,
-0.0606915243,
0.0412761793,
-0.1847330034,
0.2028344274,
0.0222671628,
0.2372682393,
0.1615042537,
-0.1148736477,
0.1546189338,
-0.1380565614,
0.0113243908,
-0.0168449506,
0.3367971182,
0.294595778,
-0.2881361842,
-0.0667467415,
0.1050199643,
0.187394768,
-0.2524312139,
-0.2942764461,
0.0593589172,
0.0206503086,
0.1127659231,
0.1540551186,
0.1536149532,
-0.1455434412,
0.0944111869,
0.0923186466,
0.3824129701,
0.1105606928,
0.1702654809,
0.1636682153,
0.1364788711,
-0.0244052149,
0.3797616065,
0.0976051092,
0.222942248,
0.0688982159,
-0.4428271949,
0.0882380977,
-0.2641710341,
0.3839266896,
-0.2432177812,
-0.4694576561,
0.0781103,
0.0745860785,
-0.0688808113,
-0.0325671248,
-0.3320102096,
0.7181390524,
-0.3015742898,
-0.0596847758,
-0.0467804931,
0.0559418574,
-0.1177832037,
-0.1937916577,
-0.0985111818,
-0.1023546904,
-0.0581145659,
-0.0594297349,
-0.0467673019,
-0.1459453106,
0.3599123955,
-0.1085799858,
-0.0336294696,
-0.3310736418,
-0.3075086176,
0.2592686415,
-0.1198570877,
-0.1322976649,
0.2339995056,
-0.1117592826,
0.2395398766,
0.0096041579,
0.6236205697,
0.4861672819,
0.0578342974,
0.164226383,
-0.1270776689,
-0.1182661802,
0.0369489193,
-0.0820899159,
0.4027971327,
0.0168093611,
0.14492926,
0.1828604788,
0.1365625113,
-0.2118964791,
0.152908802,
-0.2281760871,
-0.3224209845,
-0.3317997456,
0.0626962334,
-0.2673918903,
-0.0225483552,
-0.1309146583,
0.1140618101,
-0.3242832422,
0.1154517233,
0.4083707035,
0.1985115409,
0.0875708461,
-0.1523372978,
0.0868727267,
-0.0534984469,
0.1909269691,
0.4000778496,
0.0367472582,
-0.2721702456,
-0.2734408677,
-0.6236270666,
0.0099142976,
0.121677123,
-0.0570753962,
0.1204301715,
-0.0348659121,
0.0610776395,
-0.0391000807,
0.1405402124,
0.102717191,
-0.0041312203,
-0.2952066958,
-0.4408200383,
0.0197269451,
-0.2038558871,
-0.1017733514,
0.0670962632,
-0.2293941379,
-0.0436049551,
-0.1830173731,
-0.0207561292,
-0.1345574111,
0.2511404157,
0.0660698116,
0.0035565263,
0.4722619355,
-0.0868722126,
0.3599009514,
-0.0522920862,
-0.0728002116,
-0.1637542546,
-0.456664741,
-0.0161273107,
0.1952703893,
-0.0664699674,
0.2887930274,
-0.4623140693,
-0.3876188695,
-0.2914839387,
0.5101402998,
0.2518330216,
-0.0921490267,
-0.2270251811,
0.3375522792,
-0.1708120704,
0.0662503988,
0.1981479526,
0.3309062123,
-0.1810206324,
0.3260760903,
-0.1189143807,
-0.5026896,
0.6233594418,
-0.3565813899,
-0.0996358618,
0.22452721,
0.288562417,
0.3277511001,
-0.3560942411,
-0.6024031639,
-0.057727173,
0.3717494905,
0.028430786,
-0.5067503452,
0.5917935371,
-0.2716614008,
0.1035223603,
-0.0543051511,
0.1474553943,
0.2477992028,
-0.2005044073,
0.2222828865,
-0.242478475
] |
https://github.com/huggingface/datasets/issues/2214 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings' | Yep, seems to have fixed things! The conda package could really do with an update. Thanks! | I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
``` | 16 | load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
Yep, seems to have fixed things! The conda package could really do with an update. Thanks! | [
-0.2723237276,
-0.2135578841,
0.0193222016,
0.1852922738,
0.4195097387,
0.0630553216,
0.2729538977,
0.1801060289,
0.0756963268,
-0.0524458438,
-0.1940379292,
0.1545960009,
-0.0744483992,
0.297414422,
0.0652142391,
-0.0471374765,
-0.031500645,
0.0150832348,
-0.2626024485,
0.0296813995,
-0.3187801242,
0.2936376631,
-0.167272836,
-0.1764031798,
-0.4021223783,
-0.0105558727,
0.043747291,
0.2441150695,
-0.2862704694,
-0.5002135038,
0.205599919,
0.046203699,
0.296343565,
0.3439412713,
-0.0001162612,
-0.0840861052,
0.2146514952,
-0.0279944651,
-0.5544193983,
-0.1524076164,
0.0528011769,
-0.2994415462,
0.2512986064,
-0.105396226,
-0.0264722854,
-0.1421280801,
-0.0965211093,
-0.2981287837,
0.3209560513,
0.2984566092,
0.2062049508,
0.6519038677,
0.1126082838,
-0.3246345222,
0.0756544918,
-0.1170938537,
-0.1389449835,
0.5830131769,
0.2155661136,
-0.2970147431,
0.00555709,
0.1997517645,
-0.0833814964,
0.296037674,
0.5132629275,
0.0072546378,
0.0939973742,
-0.0558892637,
0.1015873998,
0.0599486344,
0.4848247766,
-0.3377354145,
-0.3453688323,
-0.2876416743,
0.1571337581,
-0.3172515035,
0.2258809358,
-0.1266945153,
0.0611912906,
0.1738775373,
-0.1425375342,
-0.2746183276,
0.0273852348,
0.2549824119,
-0.0566364229,
-0.1325747818,
-0.3288049698,
-0.0292667001,
0.3993551135,
0.0067994483,
0.0061148405,
0.1106409058,
0.0018887417,
0.2454483807,
-0.2312645763,
0.1604048312,
0.2210603505,
0.0638861656,
0.1995058358,
0.1169552952,
0.1385354847,
-0.1091202497,
0.2827872634,
0.1445123404,
0.045115035,
0.4553064108,
0.4384200573,
0.050126072,
0.2727785707,
0.3831757009,
0.2283394039,
-0.1032072753,
-0.0001544729,
-0.4193745553,
-0.1396084577,
-0.1696380377,
0.3145554066,
-0.0437626094,
-0.3397496045,
0.2789830267,
0.2250331044,
-0.1100322157,
0.0559781455,
0.1666688472,
0.038957119,
0.0680726618,
0.3797697127,
0.1804559231,
-0.2567596436,
0.0695362389,
-0.2539496422,
0.0192096867,
-0.2204783708,
0.2743338943,
0.2387656569,
-0.1765835583,
0.2692466378,
0.1394807845,
0.0810189322,
0.0131128505,
-0.1423485577,
0.1412218511,
-0.2486165464,
0.2955055237,
0.0133453384,
0.1941343397,
0.3053652644,
-0.3389751315,
-0.0738553256,
-0.248393029,
-0.2457935065,
-0.0913327858,
-0.2465759665,
0.1607254893,
-0.3777994812,
0.1018846408,
-0.1548735797,
0.0269371904,
0.1158765554,
0.095525831,
-0.0533687063,
-0.0219100509,
-0.4126269221,
-0.0537652373,
0.3398079872,
0.4070770741,
-0.2471121848,
-0.4057829976,
0.1503965706,
-0.1388978064,
-0.2114148736,
0.0392380916,
0.0853885859,
0.2430646122,
-0.2263121009,
0.0026323944,
0.1370444298,
-0.5137927532,
-0.4204656482,
0.139676854,
-0.1487747431,
0.0827299803,
0.0750860721,
-0.1714536101,
0.1146220192,
0.1830541342,
0.4504913092,
0.0914153904,
0.1167477071,
-0.1548795998,
-0.2908252478,
-0.1838074028,
-0.2629747987,
0.254432112,
0.1082778871,
0.0519851111,
0.1758349985,
0.1697669923,
0.0678902715,
-0.0798932016,
0.0112946965,
0.493267417,
0.1543735862,
-0.0364747718,
0.1711864024,
-0.2008412182,
-0.5201351643,
0.2156840414,
-0.0183967203,
0.0993434638,
-0.0899930596,
-0.066885829,
-0.3745588958,
-0.0463789403,
-0.0753309429,
-0.1765414774,
0.0452710576,
-0.0109367184,
-0.1645413339,
0.3287500143,
-0.142002821,
0.2980307341,
-0.3087517619,
0.3473670185,
-0.3626066744,
0.2142395973,
0.0971090123,
-0.1683485508,
0.174861297,
0.1577346474,
0.1103115082,
-0.1772713214,
-0.0718012229,
0.4855266809,
0.1505095661,
0.0629775375,
-0.0285115745,
0.2165286243,
0.1915653497,
-0.1421235949,
-0.1667534411,
-0.0733657703,
0.0350699052,
-0.0022642314,
-0.0186239351,
0.1603875756,
-0.1758858413,
0.0595270544,
0.112399295,
0.1688022912,
0.0488790572,
-0.0778959095,
-0.1880658716,
-0.3839530349,
0.4798425436,
-0.0180928707,
0.3275280297,
-0.0315786377,
0.173725754,
-0.1127126887,
0.3555786312,
0.0096923336,
0.0877414569,
0.1162706763,
-0.3088012636,
0.1370430887,
-0.0036528464,
0.0116576701,
0.4693245292,
0.2006489933,
-0.0045759398,
0.2940475643,
0.0089874677,
-0.0964114964,
0.1286132485,
0.0178794283,
-0.1744786799,
0.290194869,
-0.0639037192,
-0.0595523417,
-0.3733411133,
0.1549216658,
-0.0791443437,
0.2749667764,
-0.5363029242,
-0.175765276,
-0.1411076784,
0.0296395123,
0.0277284682,
-0.0767669231,
-0.2003962696,
-0.2440668344,
-0.029248897,
0.3258096278,
0.1955313832,
0.3660385013,
0.2152753472,
0.4211016595,
-0.0384673588,
0.0846681073,
-0.1243118942,
-0.2874587774,
-0.0785379857,
0.0081651025,
0.1657316387,
-0.0335030779,
0.1387256831,
-0.6127304435,
0.0644364655,
-0.2362845242,
-0.368850708,
0.0849089175,
-0.0047378452,
0.6359254122,
0.32058236,
0.149453029,
-0.0961013287,
0.0279979184,
0.3684043288,
0.0242662206,
-0.2071205974,
0.0681152642,
-0.0857635438,
-0.2336563766,
-0.3043377399,
-0.1047393903,
0.0186323766,
-0.5030639172,
0.38760975,
0.0402851701,
-0.2336948067,
0.3373193443,
0.0795236975,
0.2915136218,
0.0523022413,
0.2416900694,
-0.2613459826,
-0.3416881859,
0.2696040571,
-0.234615922,
-0.4145873189,
-0.0377657935,
0.1373153776,
0.1808703542,
-0.0452898405,
-0.462761879,
-0.4108829498,
-0.1143375039,
0.1598947942,
-0.1194811016,
0.3886235654,
0.1906864196,
0.0357466899,
0.0353720784,
-0.3328504562,
-0.1745150238,
0.0547358543,
-0.1960034519,
0.016750142,
-0.2609969974,
0.1186320186,
0.0603460222,
0.3715051115,
0.2424536794,
-0.0580783561,
0.2844277918,
-0.1521651894,
0.6900767684,
-0.1171554551,
-0.5205394626,
0.0709483176,
0.0032523945,
0.2066449821,
0.2943496704,
0.0683959424,
0.3357645571,
-0.2086579353,
0.0799773932,
-0.1074492484,
-0.1985200644,
-0.1780727953,
0.0575306118,
0.2056673318,
0.0434776098,
0.2509674132,
-0.1185468286,
0.0546497256,
0.1190924868,
0.4457847178,
-0.058225356,
0.0248066597,
-0.396876812,
0.1530400962,
-0.4186137319,
0.3114284873,
-0.0233408269,
0.2591665983,
-0.2117100507,
-0.1854935884,
0.0008124411,
0.0003986917,
0.4743222892,
-0.023287911,
-0.1957426965,
0.2003181428,
-0.0690097809,
-0.6852129698,
-0.0052713603,
-0.0417399518,
-0.078985557,
0.1828623563,
0.7977377772,
-0.2625103295,
-0.301401794,
0.1301297098,
0.1023929715,
-0.0043753758,
-0.0999476165,
-0.3193714917,
-0.3368155956,
-0.1378114372,
-0.0916926563,
-0.0276016407,
0.2983661592,
0.1582413614,
0.2091057748,
-0.1144395024,
-0.2217679024,
0.1712338477,
0.1866388321,
0.1943308711,
-0.0234471187,
0.3947012424,
0.3202785552,
-0.076360181,
0.4250128567,
0.4037998021,
-0.430989176,
-0.6466450691,
0.1787408143,
-0.0535437912,
0.1202298254,
0.1575004458,
-0.2035826743,
0.0360498838,
-0.0532165542,
0.2204990536,
-0.4408123493,
0.265289247,
0.4414026141,
0.1872788221,
-0.0870295539,
-0.1726748645,
0.3064505458,
0.0870730579,
0.009992972,
0.4308447838,
0.0634559244,
-0.2938774228,
-0.0701914728,
-0.2305244505,
0.5940445662,
0.0290087909,
0.1729604602,
0.2764143646,
-0.1854176819,
0.4218056798,
-0.0393422581,
-0.0951732695,
-0.2183061838,
-0.4836226702,
0.0405451581,
-0.0413950942,
0.2808118165,
-0.2143424898,
-0.1116682887,
0.0950956792,
-0.2373243719,
0.070435822,
-0.0563034192,
0.2277138084,
-0.2661422491,
-0.1809368134,
-0.2217794955,
0.122425139,
-0.1408928186,
0.2309866548,
-0.1256344914,
0.1210688055,
-0.0697817355,
-0.221268937,
-0.1227324456,
-0.1291439086,
-0.2800858617,
0.1442725062,
0.2374104857,
-0.1632550657,
-0.0273619629,
0.3203986585,
0.4834207892,
0.0730525553,
-0.3700914085,
0.2075030655,
-0.3207895756,
-0.0973202586,
-0.0424921438,
0.071560964,
0.2013946623,
0.0530961454,
0.0595654398,
-0.1689050198,
0.0645230785,
0.2031840086,
0.0174666792,
-0.0456065685,
-0.0876969397,
-0.491941452,
-0.1246386021,
-0.0510225073,
0.2836450338,
-0.3275455832,
0.0981151611,
0.0562658124,
0.0147646852,
0.1047226936,
-0.0331802964,
-0.2428843379,
-0.0733277649,
0.6832268238,
-0.3613942564,
-0.1414558887,
0.1263993979,
0.1018076986,
-0.3189934194,
-0.1406425983,
0.2113711238,
0.2389924377,
-0.3433932662,
0.2778009176,
0.5266759992,
0.0435030311,
-0.0637035966,
0.4369814992,
0.2357451618,
-0.3535467386,
0.1269494295,
-0.2212592363,
-0.3677402735,
0.2803767323,
-0.166106835,
0.1610450745,
0.0869790986,
0.1942925602,
-0.105055429,
-0.0148055749,
-0.2793800533,
0.2116765678,
-0.0993371159,
-0.1408016682,
0.600242734,
-0.2447776049,
0.2816811204,
-0.1756052077,
0.0771708041,
0.0156535693,
-0.3317779899,
-0.1820969582,
-0.4139861465,
0.1064252183,
-0.0538476594,
-0.1300275326,
0.2956241667,
0.0028882995,
-0.0922225788,
-0.2934280336,
0.1935119331,
0.4534092546,
-0.0462223776,
0.2377130389,
-0.1227491945,
0.2323916554,
0.1859099269,
0.1401137114,
-0.100802131,
0.0997578427,
-0.0606915243,
0.0412761793,
-0.1847330034,
0.2028344274,
0.0222671628,
0.2372682393,
0.1615042537,
-0.1148736477,
0.1546189338,
-0.1380565614,
0.0113243908,
-0.0168449506,
0.3367971182,
0.294595778,
-0.2881361842,
-0.0667467415,
0.1050199643,
0.187394768,
-0.2524312139,
-0.2942764461,
0.0593589172,
0.0206503086,
0.1127659231,
0.1540551186,
0.1536149532,
-0.1455434412,
0.0944111869,
0.0923186466,
0.3824129701,
0.1105606928,
0.1702654809,
0.1636682153,
0.1364788711,
-0.0244052149,
0.3797616065,
0.0976051092,
0.222942248,
0.0688982159,
-0.4428271949,
0.0882380977,
-0.2641710341,
0.3839266896,
-0.2432177812,
-0.4694576561,
0.0781103,
0.0745860785,
-0.0688808113,
-0.0325671248,
-0.3320102096,
0.7181390524,
-0.3015742898,
-0.0596847758,
-0.0467804931,
0.0559418574,
-0.1177832037,
-0.1937916577,
-0.0985111818,
-0.1023546904,
-0.0581145659,
-0.0594297349,
-0.0467673019,
-0.1459453106,
0.3599123955,
-0.1085799858,
-0.0336294696,
-0.3310736418,
-0.3075086176,
0.2592686415,
-0.1198570877,
-0.1322976649,
0.2339995056,
-0.1117592826,
0.2395398766,
0.0096041579,
0.6236205697,
0.4861672819,
0.0578342974,
0.164226383,
-0.1270776689,
-0.1182661802,
0.0369489193,
-0.0820899159,
0.4027971327,
0.0168093611,
0.14492926,
0.1828604788,
0.1365625113,
-0.2118964791,
0.152908802,
-0.2281760871,
-0.3224209845,
-0.3317997456,
0.0626962334,
-0.2673918903,
-0.0225483552,
-0.1309146583,
0.1140618101,
-0.3242832422,
0.1154517233,
0.4083707035,
0.1985115409,
0.0875708461,
-0.1523372978,
0.0868727267,
-0.0534984469,
0.1909269691,
0.4000778496,
0.0367472582,
-0.2721702456,
-0.2734408677,
-0.6236270666,
0.0099142976,
0.121677123,
-0.0570753962,
0.1204301715,
-0.0348659121,
0.0610776395,
-0.0391000807,
0.1405402124,
0.102717191,
-0.0041312203,
-0.2952066958,
-0.4408200383,
0.0197269451,
-0.2038558871,
-0.1017733514,
0.0670962632,
-0.2293941379,
-0.0436049551,
-0.1830173731,
-0.0207561292,
-0.1345574111,
0.2511404157,
0.0660698116,
0.0035565263,
0.4722619355,
-0.0868722126,
0.3599009514,
-0.0522920862,
-0.0728002116,
-0.1637542546,
-0.456664741,
-0.0161273107,
0.1952703893,
-0.0664699674,
0.2887930274,
-0.4623140693,
-0.3876188695,
-0.2914839387,
0.5101402998,
0.2518330216,
-0.0921490267,
-0.2270251811,
0.3375522792,
-0.1708120704,
0.0662503988,
0.1981479526,
0.3309062123,
-0.1810206324,
0.3260760903,
-0.1189143807,
-0.5026896,
0.6233594418,
-0.3565813899,
-0.0996358618,
0.22452721,
0.288562417,
0.3277511001,
-0.3560942411,
-0.6024031639,
-0.057727173,
0.3717494905,
0.028430786,
-0.5067503452,
0.5917935371,
-0.2716614008,
0.1035223603,
-0.0543051511,
0.1474553943,
0.2477992028,
-0.2005044073,
0.2222828865,
-0.242478475
] |
https://github.com/huggingface/datasets/issues/2212 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset | Hi ! Apparently the data are not available from this url anymore. We'll replace it with the new url when it's available | I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it? | 22 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
Hi ! Apparently the data are not available from this url anymore. We'll replace it with the new url when it's available | [
-0.3520760536,
0.1850520074,
-0.1066455767,
0.2455793768,
0.399815768,
0.0336071402,
0.3876354694,
0.2061040401,
0.3057495654,
0.1453928649,
-0.2683596015,
-0.1908084601,
0.2827516198,
0.0175514147,
0.0276066102,
0.0714484304,
-0.0717819557,
-0.0440938659,
-0.1596580297,
0.0708822012,
-0.354216814,
0.3704527617,
-0.1904582083,
0.1628843844,
-0.3339347839,
0.0633745864,
0.0055796653,
0.3590935767,
-0.3199555874,
-0.1079104245,
0.2862089276,
0.0416274443,
0.0041506663,
0.4852186739,
-0.0001157215,
0.1660647541,
0.3586291969,
-0.031764891,
-0.4298182428,
-0.5632387996,
-0.3045651913,
-0.0725704134,
0.215318054,
-0.2087869346,
-0.1616280675,
-0.0290347561,
0.1196176186,
-0.4198770225,
0.2603788972,
0.4918956757,
0.1842911541,
-0.047249943,
0.2975516021,
-0.180325985,
-0.0591366105,
-0.1362887025,
-0.0200076476,
0.6450530291,
-0.0140424185,
-0.2045282423,
-0.0508273356,
0.0286189988,
0.1182562113,
0.1726582795,
0.1585941017,
0.2011901438,
-0.3372358382,
-0.1506724656,
0.21183604,
0.0146888644,
0.5337826014,
-0.2849700451,
-0.4723347425,
-0.1233135983,
-0.0491204187,
-0.3767206371,
0.5024484992,
0.0925153717,
-0.2628646791,
0.1907123178,
-0.4664975405,
-0.250875026,
-0.1997160763,
0.3678171933,
-0.3860649168,
0.270129025,
-0.1864977032,
0.232551977,
0.2770292461,
-0.1557941139,
-0.2593965828,
0.1098564938,
0.1527529359,
0.318695724,
-0.3141095638,
0.1022978947,
-0.0440242551,
-0.283010006,
0.1964603215,
0.3815692067,
-0.0150780464,
0.0076378342,
-0.0969402492,
0.1645279825,
0.4020116329,
0.3189198077,
-0.1120545119,
0.2087809145,
0.1873424649,
0.6325329542,
-0.1311297566,
-0.1770189404,
-0.1378112286,
-0.0813718811,
-0.1658250093,
-0.1835141778,
0.1537754834,
-0.1985751539,
-0.1576271057,
0.1740345061,
-0.2624886632,
-0.0844818801,
0.0354960822,
0.3024872839,
-0.0897954702,
0.109186545,
0.0184982941,
0.2455939949,
-0.1006539464,
0.1638455391,
-0.1644032001,
0.2479629666,
-0.2182160318,
0.2315590382,
0.2416773885,
0.1246848851,
0.3092522621,
-0.3974609077,
0.0709445924,
-0.0954508409,
0.2211934775,
-0.245413959,
-0.1564024687,
0.3248184919,
0.1361618191,
-0.0193315037,
0.1892512143,
-0.0819873512,
-0.1203506067,
-0.0591270141,
-0.2380795479,
-0.2690153122,
-0.1610815823,
0.1693096608,
-0.1822193265,
0.0440682992,
-0.3180555403,
0.0211407635,
-0.1630145013,
-0.292923063,
-0.0264917687,
0.1383046508,
-0.1317388713,
-0.1248101816,
0.3689208031,
0.5510036945,
-0.2626016736,
-0.0661597848,
-0.2078199685,
-0.0995473415,
-0.0146748684,
0.4244318008,
-0.1743917167,
0.2035569549,
-0.4347253144,
0.2382111698,
0.4783931077,
-0.2472982258,
-0.8428891897,
0.4279749095,
-0.2450460643,
0.1419138461,
-0.0919319466,
0.0322814472,
-0.0358393565,
0.1951995045,
0.6311695576,
0.2926327884,
-0.0661306083,
-0.1279310882,
-0.0659749731,
-0.3087246418,
-0.0573890135,
0.2728066146,
-0.0072480338,
0.1732916236,
0.2028900683,
-0.1135585308,
0.2032043934,
0.1464846581,
-0.1294749826,
0.2984036803,
0.0654908046,
0.0501432493,
-0.1333139092,
-0.0529261082,
-0.6362524629,
0.2412666678,
-0.2172222883,
-0.0310091488,
-0.5615540147,
0.2495313436,
-0.4475071132,
0.0381119698,
-0.0719005764,
0.0171307921,
0.0995737612,
0.0793234855,
0.1675628722,
0.1997746229,
-0.2326555103,
0.3575583398,
0.0593538955,
0.2285769135,
-0.4177795053,
0.3038282096,
-0.0686030611,
-0.0128734484,
-0.0401701517,
0.0375095345,
0.0876058638,
-0.1907197535,
-0.1723520011,
0.3521072268,
-0.0981606767,
0.1596618593,
0.3979538977,
0.4166023433,
0.1592303663,
-0.0419743732,
0.0967003256,
-0.1133242697,
0.0562817305,
-0.0873885453,
-0.1806228012,
0.1824070215,
0.1226355582,
0.3023009896,
0.1402963698,
0.0336382166,
0.365693152,
0.118005693,
-0.0833133832,
-0.1543994546,
0.1541405618,
0.4664796293,
0.2170074731,
0.0557066128,
-0.1387760043,
-0.0494212285,
0.3819886446,
-0.2163209915,
0.0133877508,
0.2899906933,
0.0413502119,
-0.272326827,
0.1269239783,
0.0862025321,
0.4915736616,
0.0586337931,
0.1429884881,
0.1387394816,
-0.2469657063,
-0.16380696,
0.078477487,
0.0087315626,
0.0382012948,
0.0595249981,
0.1666515917,
-0.020693725,
-0.1088886708,
-0.3694199324,
0.0472554564,
0.1783641726,
-0.1222573742,
0.3422808349,
-0.1195474863,
-0.1523810327,
0.1046308056,
-0.3231036067,
-0.245598495,
-0.4834876359,
-0.1251461208,
0.2941144705,
0.0920700133,
0.0488246307,
-0.3312271833,
0.0984713733,
0.1856974065,
-0.519572854,
-0.1338462532,
-0.1513887942,
-0.1231957003,
0.056357123,
0.3074063957,
-0.2006789744,
0.249946475,
-0.2296646535,
-0.1008943617,
-0.4725246727,
-0.1700990796,
0.0898432136,
-0.0312449653,
0.4079280794,
0.2447231561,
0.3579795063,
-0.0674479976,
-0.0232892744,
0.4561802745,
0.0728965849,
-0.0803327262,
-0.0389703438,
-0.1058986634,
0.1410918236,
0.0546693504,
-0.2638033926,
-0.2067804784,
-0.3587549925,
0.4501704872,
0.0336140916,
0.0696528181,
0.1306529343,
0.1599377692,
0.2007168829,
0.160875082,
-0.1496060491,
-0.3580868244,
-0.5675963163,
0.4216380417,
-0.2252494395,
-0.0629608333,
0.0954556912,
0.1260265559,
0.4072686434,
0.3108046949,
-0.5964595675,
-0.4336863458,
-0.2441264838,
0.243868649,
-0.0759848729,
-0.284183085,
0.2059355825,
-0.2813444734,
-0.0455123819,
0.0795239359,
-0.343588531,
0.1072270125,
0.0380035229,
0.4218062758,
0.19053635,
0.5441437364,
-0.1006029248,
0.5965812206,
0.0506761074,
0.1118793935,
0.3819426,
-0.1311578602,
0.2393558174,
-0.4368831515,
-0.2892045975,
0.135488227,
-0.0735366344,
-0.3199813962,
-0.1010950059,
0.1610036045,
-0.066766046,
-0.2432232648,
0.2578685284,
-0.4428743124,
-0.2013873756,
0.0435504615,
-0.0229952149,
0.0392960645,
0.1748022735,
0.0631833524,
-0.1840068251,
-0.0513393804,
-0.0495903715,
0.1898232698,
0.0814527124,
0.1691629589,
-0.0057753026,
-0.3805064857,
-0.5242769122,
0.408683151,
0.0688266158,
0.3191049099,
-0.234349221,
0.090185076,
0.159983933,
-0.0714386106,
0.5216057301,
0.0438567847,
-0.0242689475,
0.2260751575,
-0.0639996529,
-0.2260829359,
0.040833652,
0.1604543179,
0.287671566,
0.278439194,
0.5854116678,
-0.435575515,
-0.0223596767,
0.2736796737,
0.0492441393,
-0.0857093185,
-0.051977288,
-0.19635804,
-0.492688179,
-0.3459271193,
-0.2309071124,
0.0583771467,
0.3225264251,
0.2719908059,
-0.1396184713,
0.1985047907,
-0.2339978814,
-0.1237920448,
0.0856428444,
0.2614713907,
-0.1848344505,
-0.0721977651,
0.446174711,
0.0551761426,
0.062596418,
0.9526380897,
0.2309770137,
-0.1918454617,
0.3530421853,
0.2041085958,
-0.0470771417,
0.2335589826,
-0.0544420965,
-0.2276648581,
0.0475470796,
0.3281216025,
-0.070125699,
0.3138430715,
0.301474452,
-0.0341499224,
-0.2183251977,
-0.3774333596,
0.5831079483,
-0.0610893257,
0.0716047287,
0.5631734133,
-0.0031044073,
-0.1457767338,
-0.0282863006,
-0.1113374829,
0.83223176,
-0.2192076743,
0.1396560371,
0.3237108588,
-0.2258147597,
0.2849931717,
-0.362631321,
0.1815254539,
-0.1902492046,
0.0559395067,
-0.1027312279,
-0.1027689576,
0.016931843,
0.2292082608,
0.1400344819,
0.4701395035,
-0.0622953027,
-0.041358307,
0.2022137642,
0.2214944363,
-0.1957223862,
-0.0350251831,
-0.4555770457,
0.1509606838,
-0.0635009632,
0.3048479557,
0.0043508559,
-0.0404347479,
-0.2007142305,
-0.1768924594,
-0.3790904284,
0.1039977968,
-0.4450157583,
0.3993927538,
0.0648718476,
-0.1194170415,
-0.3323348165,
0.1331064403,
-0.1718950272,
0.0374776348,
-0.377407223,
0.2002426535,
-0.2505825162,
-0.1914522797,
0.0667513311,
0.2090221047,
0.1672667712,
-0.0286223404,
-0.1082126647,
0.2219370008,
-0.1580395997,
-0.4935770631,
-0.086123459,
-0.027010303,
0.1342186481,
-0.1137050688,
-0.12502563,
-0.3386534154,
-0.2043164372,
-0.0527786426,
0.080849044,
0.0288587529,
0.2523483634,
-0.2069956958,
0.0026367477,
-0.2918313742,
-0.1399933249,
0.5058476329,
-0.2566269934,
-0.3374789357,
0.4631575644,
0.0977260098,
-0.0907069221,
-0.147487253,
-0.1863517612,
-0.0134128518,
-0.1456057578,
0.0908240378,
0.0119753592,
0.1186034977,
-0.2104354948,
-0.0244332626,
0.2548632622,
-0.1683793664,
0.04672499,
-0.511824429,
-0.4071712196,
0.2718000412,
-0.2288025767,
0.1913926601,
0.003455624,
-0.0871693045,
0.1730557829,
-0.2681247294,
-0.2592227459,
0.1471402049,
-0.4422643781,
-0.2400082499,
0.2411800623,
-0.1960831285,
0.4321492314,
0.0995830297,
0.1983938515,
-0.0372607447,
-0.229364872,
-0.1816976368,
0.0783658028,
0.1327115893,
0.103149429,
-0.4042627513,
0.0659460351,
-0.0905279368,
-0.1013426334,
-0.1443163753,
0.0145541653,
0.2522517443,
0.1482551694,
-0.2715091109,
0.1424652487,
0.0433753133,
-0.1513764858,
0.0312859602,
0.1540948451,
0.3858401775,
0.1071471721,
0.0385400765,
-0.0120026432,
0.0421501845,
-0.1947083175,
0.02884572,
0.0366722234,
0.1114399582,
0.5246018171,
-0.2630038261,
0.0688444376,
0.1733340621,
0.276620388,
0.3434123397,
-0.3933224976,
-0.0504624061,
0.086111784,
0.1886859983,
-0.1005257145,
-0.040939033,
0.1158133596,
-0.0200306866,
-0.0530433096,
0.0752637833,
0.0275849104,
0.0262588114,
0.1938834786,
0.0303884894,
0.403416574,
0.0132635087,
0.0182410963,
-0.0686372146,
-0.1445128918,
0.0048210053,
0.3360906839,
0.1343928277,
0.3272195756,
0.4190325141,
-0.145015642,
-0.0987359658,
-0.3855917752,
0.2788904011,
-0.2114679366,
-0.4335516691,
-0.2508145869,
0.2423273027,
-0.3047326505,
0.2247782052,
-0.2435575426,
0.2378091216,
-0.4140956402,
0.2134465277,
-0.250333637,
0.0139559563,
-0.0381373987,
-0.1202732474,
0.046085991,
-0.1928996444,
-0.1554574519,
0.0292257741,
-0.0773304179,
-0.1959444284,
0.1673083156,
-0.1012982279,
-0.1600544453,
-0.2908317149,
0.1489148438,
0.0585051924,
0.1058556736,
-0.2569085956,
0.5002359152,
0.1337185055,
-0.1236689314,
0.2592597306,
0.2547575831,
0.3921831548,
0.2354182601,
-0.0563619174,
0.1187811941,
-0.1520819217,
-0.158069849,
-0.1649383605,
0.2220056355,
0.2826271355,
-0.2399267852,
0.4083397985,
0.2201501131,
-0.1681928635,
0.3380621672,
-0.0190953221,
0.4372435212,
-0.2133318931,
0.3192177117,
-0.3780584931,
0.057531178,
-0.3101491034,
-0.083227843,
-0.5760591626,
-0.2530725002,
-0.1635166109,
-0.101671949,
0.1617383063,
-0.013818942,
0.0595092662,
0.0480282679,
0.377902478,
0.4761710763,
0.1966778189,
-0.2976573706,
-0.2617686689,
-0.5369641781,
0.084512271,
-0.0744424313,
0.0407860279,
-0.0126418415,
0.3252760768,
-0.1434867382,
0.1179322898,
0.1704970896,
0.1750703156,
-0.2017746568,
0.1189975739,
-0.275883913,
-0.416370213,
-0.0354897454,
0.1237286404,
-0.0925101191,
-0.1620141268,
0.1815116107,
-0.2884222865,
-0.0075485259,
0.0063046869,
0.1264899522,
0.0303845257,
-0.0279788487,
0.4688524306,
0.1719366461,
0.4205754995,
0.1091430634,
-0.2500297427,
-0.3299546242,
-0.1993983537,
-0.0289108865,
0.0117750308,
-0.0593901351,
0.456469655,
-0.0293868817,
0.0285883248,
-0.2617827654,
0.1135850772,
-0.0730579346,
-0.1677086055,
0.0184928328,
-0.1089661047,
0.0220414102,
0.1403101832,
-0.0012169853,
0.3501482606,
0.0503058881,
0.2221423537,
-0.0946955383,
-0.1574628055,
0.5106207132,
-0.0712283924,
-0.2704930604,
0.2154469192,
0.0052095577,
-0.0617785379,
-0.0020324476,
-0.3609398007,
0.2056364119,
0.4209409952,
0.0798653215,
-0.1565102935,
0.0797878057,
-0.1106189638,
-0.069127664,
-0.1145044789,
0.2245735377,
-0.1046053097,
-0.1141531467,
0.0521624088,
0.0729799047
] |
https://github.com/huggingface/datasets/issues/2212 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset | I saw this on their website when we request to download the dataset:
![image](https://user-images.githubusercontent.com/19718818/114879600-fa458680-9e1e-11eb-9e05-f0963d68ff0f.png)
Can we still request them link for the dataset and make a PR? @lhoestq @yjernite | I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it? | 29 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
I saw this on their website when we request to download the dataset:
![image](https://user-images.githubusercontent.com/19718818/114879600-fa458680-9e1e-11eb-9e05-f0963d68ff0f.png)
Can we still request them link for the dataset and make a PR? @lhoestq @yjernite | [
-0.3520760536,
0.1850520074,
-0.1066455767,
0.2455793768,
0.399815768,
0.0336071402,
0.3876354694,
0.2061040401,
0.3057495654,
0.1453928649,
-0.2683596015,
-0.1908084601,
0.2827516198,
0.0175514147,
0.0276066102,
0.0714484304,
-0.0717819557,
-0.0440938659,
-0.1596580297,
0.0708822012,
-0.354216814,
0.3704527617,
-0.1904582083,
0.1628843844,
-0.3339347839,
0.0633745864,
0.0055796653,
0.3590935767,
-0.3199555874,
-0.1079104245,
0.2862089276,
0.0416274443,
0.0041506663,
0.4852186739,
-0.0001157215,
0.1660647541,
0.3586291969,
-0.031764891,
-0.4298182428,
-0.5632387996,
-0.3045651913,
-0.0725704134,
0.215318054,
-0.2087869346,
-0.1616280675,
-0.0290347561,
0.1196176186,
-0.4198770225,
0.2603788972,
0.4918956757,
0.1842911541,
-0.047249943,
0.2975516021,
-0.180325985,
-0.0591366105,
-0.1362887025,
-0.0200076476,
0.6450530291,
-0.0140424185,
-0.2045282423,
-0.0508273356,
0.0286189988,
0.1182562113,
0.1726582795,
0.1585941017,
0.2011901438,
-0.3372358382,
-0.1506724656,
0.21183604,
0.0146888644,
0.5337826014,
-0.2849700451,
-0.4723347425,
-0.1233135983,
-0.0491204187,
-0.3767206371,
0.5024484992,
0.0925153717,
-0.2628646791,
0.1907123178,
-0.4664975405,
-0.250875026,
-0.1997160763,
0.3678171933,
-0.3860649168,
0.270129025,
-0.1864977032,
0.232551977,
0.2770292461,
-0.1557941139,
-0.2593965828,
0.1098564938,
0.1527529359,
0.318695724,
-0.3141095638,
0.1022978947,
-0.0440242551,
-0.283010006,
0.1964603215,
0.3815692067,
-0.0150780464,
0.0076378342,
-0.0969402492,
0.1645279825,
0.4020116329,
0.3189198077,
-0.1120545119,
0.2087809145,
0.1873424649,
0.6325329542,
-0.1311297566,
-0.1770189404,
-0.1378112286,
-0.0813718811,
-0.1658250093,
-0.1835141778,
0.1537754834,
-0.1985751539,
-0.1576271057,
0.1740345061,
-0.2624886632,
-0.0844818801,
0.0354960822,
0.3024872839,
-0.0897954702,
0.109186545,
0.0184982941,
0.2455939949,
-0.1006539464,
0.1638455391,
-0.1644032001,
0.2479629666,
-0.2182160318,
0.2315590382,
0.2416773885,
0.1246848851,
0.3092522621,
-0.3974609077,
0.0709445924,
-0.0954508409,
0.2211934775,
-0.245413959,
-0.1564024687,
0.3248184919,
0.1361618191,
-0.0193315037,
0.1892512143,
-0.0819873512,
-0.1203506067,
-0.0591270141,
-0.2380795479,
-0.2690153122,
-0.1610815823,
0.1693096608,
-0.1822193265,
0.0440682992,
-0.3180555403,
0.0211407635,
-0.1630145013,
-0.292923063,
-0.0264917687,
0.1383046508,
-0.1317388713,
-0.1248101816,
0.3689208031,
0.5510036945,
-0.2626016736,
-0.0661597848,
-0.2078199685,
-0.0995473415,
-0.0146748684,
0.4244318008,
-0.1743917167,
0.2035569549,
-0.4347253144,
0.2382111698,
0.4783931077,
-0.2472982258,
-0.8428891897,
0.4279749095,
-0.2450460643,
0.1419138461,
-0.0919319466,
0.0322814472,
-0.0358393565,
0.1951995045,
0.6311695576,
0.2926327884,
-0.0661306083,
-0.1279310882,
-0.0659749731,
-0.3087246418,
-0.0573890135,
0.2728066146,
-0.0072480338,
0.1732916236,
0.2028900683,
-0.1135585308,
0.2032043934,
0.1464846581,
-0.1294749826,
0.2984036803,
0.0654908046,
0.0501432493,
-0.1333139092,
-0.0529261082,
-0.6362524629,
0.2412666678,
-0.2172222883,
-0.0310091488,
-0.5615540147,
0.2495313436,
-0.4475071132,
0.0381119698,
-0.0719005764,
0.0171307921,
0.0995737612,
0.0793234855,
0.1675628722,
0.1997746229,
-0.2326555103,
0.3575583398,
0.0593538955,
0.2285769135,
-0.4177795053,
0.3038282096,
-0.0686030611,
-0.0128734484,
-0.0401701517,
0.0375095345,
0.0876058638,
-0.1907197535,
-0.1723520011,
0.3521072268,
-0.0981606767,
0.1596618593,
0.3979538977,
0.4166023433,
0.1592303663,
-0.0419743732,
0.0967003256,
-0.1133242697,
0.0562817305,
-0.0873885453,
-0.1806228012,
0.1824070215,
0.1226355582,
0.3023009896,
0.1402963698,
0.0336382166,
0.365693152,
0.118005693,
-0.0833133832,
-0.1543994546,
0.1541405618,
0.4664796293,
0.2170074731,
0.0557066128,
-0.1387760043,
-0.0494212285,
0.3819886446,
-0.2163209915,
0.0133877508,
0.2899906933,
0.0413502119,
-0.272326827,
0.1269239783,
0.0862025321,
0.4915736616,
0.0586337931,
0.1429884881,
0.1387394816,
-0.2469657063,
-0.16380696,
0.078477487,
0.0087315626,
0.0382012948,
0.0595249981,
0.1666515917,
-0.020693725,
-0.1088886708,
-0.3694199324,
0.0472554564,
0.1783641726,
-0.1222573742,
0.3422808349,
-0.1195474863,
-0.1523810327,
0.1046308056,
-0.3231036067,
-0.245598495,
-0.4834876359,
-0.1251461208,
0.2941144705,
0.0920700133,
0.0488246307,
-0.3312271833,
0.0984713733,
0.1856974065,
-0.519572854,
-0.1338462532,
-0.1513887942,
-0.1231957003,
0.056357123,
0.3074063957,
-0.2006789744,
0.249946475,
-0.2296646535,
-0.1008943617,
-0.4725246727,
-0.1700990796,
0.0898432136,
-0.0312449653,
0.4079280794,
0.2447231561,
0.3579795063,
-0.0674479976,
-0.0232892744,
0.4561802745,
0.0728965849,
-0.0803327262,
-0.0389703438,
-0.1058986634,
0.1410918236,
0.0546693504,
-0.2638033926,
-0.2067804784,
-0.3587549925,
0.4501704872,
0.0336140916,
0.0696528181,
0.1306529343,
0.1599377692,
0.2007168829,
0.160875082,
-0.1496060491,
-0.3580868244,
-0.5675963163,
0.4216380417,
-0.2252494395,
-0.0629608333,
0.0954556912,
0.1260265559,
0.4072686434,
0.3108046949,
-0.5964595675,
-0.4336863458,
-0.2441264838,
0.243868649,
-0.0759848729,
-0.284183085,
0.2059355825,
-0.2813444734,
-0.0455123819,
0.0795239359,
-0.343588531,
0.1072270125,
0.0380035229,
0.4218062758,
0.19053635,
0.5441437364,
-0.1006029248,
0.5965812206,
0.0506761074,
0.1118793935,
0.3819426,
-0.1311578602,
0.2393558174,
-0.4368831515,
-0.2892045975,
0.135488227,
-0.0735366344,
-0.3199813962,
-0.1010950059,
0.1610036045,
-0.066766046,
-0.2432232648,
0.2578685284,
-0.4428743124,
-0.2013873756,
0.0435504615,
-0.0229952149,
0.0392960645,
0.1748022735,
0.0631833524,
-0.1840068251,
-0.0513393804,
-0.0495903715,
0.1898232698,
0.0814527124,
0.1691629589,
-0.0057753026,
-0.3805064857,
-0.5242769122,
0.408683151,
0.0688266158,
0.3191049099,
-0.234349221,
0.090185076,
0.159983933,
-0.0714386106,
0.5216057301,
0.0438567847,
-0.0242689475,
0.2260751575,
-0.0639996529,
-0.2260829359,
0.040833652,
0.1604543179,
0.287671566,
0.278439194,
0.5854116678,
-0.435575515,
-0.0223596767,
0.2736796737,
0.0492441393,
-0.0857093185,
-0.051977288,
-0.19635804,
-0.492688179,
-0.3459271193,
-0.2309071124,
0.0583771467,
0.3225264251,
0.2719908059,
-0.1396184713,
0.1985047907,
-0.2339978814,
-0.1237920448,
0.0856428444,
0.2614713907,
-0.1848344505,
-0.0721977651,
0.446174711,
0.0551761426,
0.062596418,
0.9526380897,
0.2309770137,
-0.1918454617,
0.3530421853,
0.2041085958,
-0.0470771417,
0.2335589826,
-0.0544420965,
-0.2276648581,
0.0475470796,
0.3281216025,
-0.070125699,
0.3138430715,
0.301474452,
-0.0341499224,
-0.2183251977,
-0.3774333596,
0.5831079483,
-0.0610893257,
0.0716047287,
0.5631734133,
-0.0031044073,
-0.1457767338,
-0.0282863006,
-0.1113374829,
0.83223176,
-0.2192076743,
0.1396560371,
0.3237108588,
-0.2258147597,
0.2849931717,
-0.362631321,
0.1815254539,
-0.1902492046,
0.0559395067,
-0.1027312279,
-0.1027689576,
0.016931843,
0.2292082608,
0.1400344819,
0.4701395035,
-0.0622953027,
-0.041358307,
0.2022137642,
0.2214944363,
-0.1957223862,
-0.0350251831,
-0.4555770457,
0.1509606838,
-0.0635009632,
0.3048479557,
0.0043508559,
-0.0404347479,
-0.2007142305,
-0.1768924594,
-0.3790904284,
0.1039977968,
-0.4450157583,
0.3993927538,
0.0648718476,
-0.1194170415,
-0.3323348165,
0.1331064403,
-0.1718950272,
0.0374776348,
-0.377407223,
0.2002426535,
-0.2505825162,
-0.1914522797,
0.0667513311,
0.2090221047,
0.1672667712,
-0.0286223404,
-0.1082126647,
0.2219370008,
-0.1580395997,
-0.4935770631,
-0.086123459,
-0.027010303,
0.1342186481,
-0.1137050688,
-0.12502563,
-0.3386534154,
-0.2043164372,
-0.0527786426,
0.080849044,
0.0288587529,
0.2523483634,
-0.2069956958,
0.0026367477,
-0.2918313742,
-0.1399933249,
0.5058476329,
-0.2566269934,
-0.3374789357,
0.4631575644,
0.0977260098,
-0.0907069221,
-0.147487253,
-0.1863517612,
-0.0134128518,
-0.1456057578,
0.0908240378,
0.0119753592,
0.1186034977,
-0.2104354948,
-0.0244332626,
0.2548632622,
-0.1683793664,
0.04672499,
-0.511824429,
-0.4071712196,
0.2718000412,
-0.2288025767,
0.1913926601,
0.003455624,
-0.0871693045,
0.1730557829,
-0.2681247294,
-0.2592227459,
0.1471402049,
-0.4422643781,
-0.2400082499,
0.2411800623,
-0.1960831285,
0.4321492314,
0.0995830297,
0.1983938515,
-0.0372607447,
-0.229364872,
-0.1816976368,
0.0783658028,
0.1327115893,
0.103149429,
-0.4042627513,
0.0659460351,
-0.0905279368,
-0.1013426334,
-0.1443163753,
0.0145541653,
0.2522517443,
0.1482551694,
-0.2715091109,
0.1424652487,
0.0433753133,
-0.1513764858,
0.0312859602,
0.1540948451,
0.3858401775,
0.1071471721,
0.0385400765,
-0.0120026432,
0.0421501845,
-0.1947083175,
0.02884572,
0.0366722234,
0.1114399582,
0.5246018171,
-0.2630038261,
0.0688444376,
0.1733340621,
0.276620388,
0.3434123397,
-0.3933224976,
-0.0504624061,
0.086111784,
0.1886859983,
-0.1005257145,
-0.040939033,
0.1158133596,
-0.0200306866,
-0.0530433096,
0.0752637833,
0.0275849104,
0.0262588114,
0.1938834786,
0.0303884894,
0.403416574,
0.0132635087,
0.0182410963,
-0.0686372146,
-0.1445128918,
0.0048210053,
0.3360906839,
0.1343928277,
0.3272195756,
0.4190325141,
-0.145015642,
-0.0987359658,
-0.3855917752,
0.2788904011,
-0.2114679366,
-0.4335516691,
-0.2508145869,
0.2423273027,
-0.3047326505,
0.2247782052,
-0.2435575426,
0.2378091216,
-0.4140956402,
0.2134465277,
-0.250333637,
0.0139559563,
-0.0381373987,
-0.1202732474,
0.046085991,
-0.1928996444,
-0.1554574519,
0.0292257741,
-0.0773304179,
-0.1959444284,
0.1673083156,
-0.1012982279,
-0.1600544453,
-0.2908317149,
0.1489148438,
0.0585051924,
0.1058556736,
-0.2569085956,
0.5002359152,
0.1337185055,
-0.1236689314,
0.2592597306,
0.2547575831,
0.3921831548,
0.2354182601,
-0.0563619174,
0.1187811941,
-0.1520819217,
-0.158069849,
-0.1649383605,
0.2220056355,
0.2826271355,
-0.2399267852,
0.4083397985,
0.2201501131,
-0.1681928635,
0.3380621672,
-0.0190953221,
0.4372435212,
-0.2133318931,
0.3192177117,
-0.3780584931,
0.057531178,
-0.3101491034,
-0.083227843,
-0.5760591626,
-0.2530725002,
-0.1635166109,
-0.101671949,
0.1617383063,
-0.013818942,
0.0595092662,
0.0480282679,
0.377902478,
0.4761710763,
0.1966778189,
-0.2976573706,
-0.2617686689,
-0.5369641781,
0.084512271,
-0.0744424313,
0.0407860279,
-0.0126418415,
0.3252760768,
-0.1434867382,
0.1179322898,
0.1704970896,
0.1750703156,
-0.2017746568,
0.1189975739,
-0.275883913,
-0.416370213,
-0.0354897454,
0.1237286404,
-0.0925101191,
-0.1620141268,
0.1815116107,
-0.2884222865,
-0.0075485259,
0.0063046869,
0.1264899522,
0.0303845257,
-0.0279788487,
0.4688524306,
0.1719366461,
0.4205754995,
0.1091430634,
-0.2500297427,
-0.3299546242,
-0.1993983537,
-0.0289108865,
0.0117750308,
-0.0593901351,
0.456469655,
-0.0293868817,
0.0285883248,
-0.2617827654,
0.1135850772,
-0.0730579346,
-0.1677086055,
0.0184928328,
-0.1089661047,
0.0220414102,
0.1403101832,
-0.0012169853,
0.3501482606,
0.0503058881,
0.2221423537,
-0.0946955383,
-0.1574628055,
0.5106207132,
-0.0712283924,
-0.2704930604,
0.2154469192,
0.0052095577,
-0.0617785379,
-0.0020324476,
-0.3609398007,
0.2056364119,
0.4209409952,
0.0798653215,
-0.1565102935,
0.0797878057,
-0.1106189638,
-0.069127664,
-0.1145044789,
0.2245735377,
-0.1046053097,
-0.1141531467,
0.0521624088,
0.0729799047
] |
https://github.com/huggingface/datasets/issues/2212 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset | I've contacted Martin (first author of the fquad paper) regarding a possible new url. Hopefully we can get one soon ! | I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it? | 21 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
I've contacted Martin (first author of the fquad paper) regarding a possible new url. Hopefully we can get one soon ! | [
-0.3520760536,
0.1850520074,
-0.1066455767,
0.2455793768,
0.399815768,
0.0336071402,
0.3876354694,
0.2061040401,
0.3057495654,
0.1453928649,
-0.2683596015,
-0.1908084601,
0.2827516198,
0.0175514147,
0.0276066102,
0.0714484304,
-0.0717819557,
-0.0440938659,
-0.1596580297,
0.0708822012,
-0.354216814,
0.3704527617,
-0.1904582083,
0.1628843844,
-0.3339347839,
0.0633745864,
0.0055796653,
0.3590935767,
-0.3199555874,
-0.1079104245,
0.2862089276,
0.0416274443,
0.0041506663,
0.4852186739,
-0.0001157215,
0.1660647541,
0.3586291969,
-0.031764891,
-0.4298182428,
-0.5632387996,
-0.3045651913,
-0.0725704134,
0.215318054,
-0.2087869346,
-0.1616280675,
-0.0290347561,
0.1196176186,
-0.4198770225,
0.2603788972,
0.4918956757,
0.1842911541,
-0.047249943,
0.2975516021,
-0.180325985,
-0.0591366105,
-0.1362887025,
-0.0200076476,
0.6450530291,
-0.0140424185,
-0.2045282423,
-0.0508273356,
0.0286189988,
0.1182562113,
0.1726582795,
0.1585941017,
0.2011901438,
-0.3372358382,
-0.1506724656,
0.21183604,
0.0146888644,
0.5337826014,
-0.2849700451,
-0.4723347425,
-0.1233135983,
-0.0491204187,
-0.3767206371,
0.5024484992,
0.0925153717,
-0.2628646791,
0.1907123178,
-0.4664975405,
-0.250875026,
-0.1997160763,
0.3678171933,
-0.3860649168,
0.270129025,
-0.1864977032,
0.232551977,
0.2770292461,
-0.1557941139,
-0.2593965828,
0.1098564938,
0.1527529359,
0.318695724,
-0.3141095638,
0.1022978947,
-0.0440242551,
-0.283010006,
0.1964603215,
0.3815692067,
-0.0150780464,
0.0076378342,
-0.0969402492,
0.1645279825,
0.4020116329,
0.3189198077,
-0.1120545119,
0.2087809145,
0.1873424649,
0.6325329542,
-0.1311297566,
-0.1770189404,
-0.1378112286,
-0.0813718811,
-0.1658250093,
-0.1835141778,
0.1537754834,
-0.1985751539,
-0.1576271057,
0.1740345061,
-0.2624886632,
-0.0844818801,
0.0354960822,
0.3024872839,
-0.0897954702,
0.109186545,
0.0184982941,
0.2455939949,
-0.1006539464,
0.1638455391,
-0.1644032001,
0.2479629666,
-0.2182160318,
0.2315590382,
0.2416773885,
0.1246848851,
0.3092522621,
-0.3974609077,
0.0709445924,
-0.0954508409,
0.2211934775,
-0.245413959,
-0.1564024687,
0.3248184919,
0.1361618191,
-0.0193315037,
0.1892512143,
-0.0819873512,
-0.1203506067,
-0.0591270141,
-0.2380795479,
-0.2690153122,
-0.1610815823,
0.1693096608,
-0.1822193265,
0.0440682992,
-0.3180555403,
0.0211407635,
-0.1630145013,
-0.292923063,
-0.0264917687,
0.1383046508,
-0.1317388713,
-0.1248101816,
0.3689208031,
0.5510036945,
-0.2626016736,
-0.0661597848,
-0.2078199685,
-0.0995473415,
-0.0146748684,
0.4244318008,
-0.1743917167,
0.2035569549,
-0.4347253144,
0.2382111698,
0.4783931077,
-0.2472982258,
-0.8428891897,
0.4279749095,
-0.2450460643,
0.1419138461,
-0.0919319466,
0.0322814472,
-0.0358393565,
0.1951995045,
0.6311695576,
0.2926327884,
-0.0661306083,
-0.1279310882,
-0.0659749731,
-0.3087246418,
-0.0573890135,
0.2728066146,
-0.0072480338,
0.1732916236,
0.2028900683,
-0.1135585308,
0.2032043934,
0.1464846581,
-0.1294749826,
0.2984036803,
0.0654908046,
0.0501432493,
-0.1333139092,
-0.0529261082,
-0.6362524629,
0.2412666678,
-0.2172222883,
-0.0310091488,
-0.5615540147,
0.2495313436,
-0.4475071132,
0.0381119698,
-0.0719005764,
0.0171307921,
0.0995737612,
0.0793234855,
0.1675628722,
0.1997746229,
-0.2326555103,
0.3575583398,
0.0593538955,
0.2285769135,
-0.4177795053,
0.3038282096,
-0.0686030611,
-0.0128734484,
-0.0401701517,
0.0375095345,
0.0876058638,
-0.1907197535,
-0.1723520011,
0.3521072268,
-0.0981606767,
0.1596618593,
0.3979538977,
0.4166023433,
0.1592303663,
-0.0419743732,
0.0967003256,
-0.1133242697,
0.0562817305,
-0.0873885453,
-0.1806228012,
0.1824070215,
0.1226355582,
0.3023009896,
0.1402963698,
0.0336382166,
0.365693152,
0.118005693,
-0.0833133832,
-0.1543994546,
0.1541405618,
0.4664796293,
0.2170074731,
0.0557066128,
-0.1387760043,
-0.0494212285,
0.3819886446,
-0.2163209915,
0.0133877508,
0.2899906933,
0.0413502119,
-0.272326827,
0.1269239783,
0.0862025321,
0.4915736616,
0.0586337931,
0.1429884881,
0.1387394816,
-0.2469657063,
-0.16380696,
0.078477487,
0.0087315626,
0.0382012948,
0.0595249981,
0.1666515917,
-0.020693725,
-0.1088886708,
-0.3694199324,
0.0472554564,
0.1783641726,
-0.1222573742,
0.3422808349,
-0.1195474863,
-0.1523810327,
0.1046308056,
-0.3231036067,
-0.245598495,
-0.4834876359,
-0.1251461208,
0.2941144705,
0.0920700133,
0.0488246307,
-0.3312271833,
0.0984713733,
0.1856974065,
-0.519572854,
-0.1338462532,
-0.1513887942,
-0.1231957003,
0.056357123,
0.3074063957,
-0.2006789744,
0.249946475,
-0.2296646535,
-0.1008943617,
-0.4725246727,
-0.1700990796,
0.0898432136,
-0.0312449653,
0.4079280794,
0.2447231561,
0.3579795063,
-0.0674479976,
-0.0232892744,
0.4561802745,
0.0728965849,
-0.0803327262,
-0.0389703438,
-0.1058986634,
0.1410918236,
0.0546693504,
-0.2638033926,
-0.2067804784,
-0.3587549925,
0.4501704872,
0.0336140916,
0.0696528181,
0.1306529343,
0.1599377692,
0.2007168829,
0.160875082,
-0.1496060491,
-0.3580868244,
-0.5675963163,
0.4216380417,
-0.2252494395,
-0.0629608333,
0.0954556912,
0.1260265559,
0.4072686434,
0.3108046949,
-0.5964595675,
-0.4336863458,
-0.2441264838,
0.243868649,
-0.0759848729,
-0.284183085,
0.2059355825,
-0.2813444734,
-0.0455123819,
0.0795239359,
-0.343588531,
0.1072270125,
0.0380035229,
0.4218062758,
0.19053635,
0.5441437364,
-0.1006029248,
0.5965812206,
0.0506761074,
0.1118793935,
0.3819426,
-0.1311578602,
0.2393558174,
-0.4368831515,
-0.2892045975,
0.135488227,
-0.0735366344,
-0.3199813962,
-0.1010950059,
0.1610036045,
-0.066766046,
-0.2432232648,
0.2578685284,
-0.4428743124,
-0.2013873756,
0.0435504615,
-0.0229952149,
0.0392960645,
0.1748022735,
0.0631833524,
-0.1840068251,
-0.0513393804,
-0.0495903715,
0.1898232698,
0.0814527124,
0.1691629589,
-0.0057753026,
-0.3805064857,
-0.5242769122,
0.408683151,
0.0688266158,
0.3191049099,
-0.234349221,
0.090185076,
0.159983933,
-0.0714386106,
0.5216057301,
0.0438567847,
-0.0242689475,
0.2260751575,
-0.0639996529,
-0.2260829359,
0.040833652,
0.1604543179,
0.287671566,
0.278439194,
0.5854116678,
-0.435575515,
-0.0223596767,
0.2736796737,
0.0492441393,
-0.0857093185,
-0.051977288,
-0.19635804,
-0.492688179,
-0.3459271193,
-0.2309071124,
0.0583771467,
0.3225264251,
0.2719908059,
-0.1396184713,
0.1985047907,
-0.2339978814,
-0.1237920448,
0.0856428444,
0.2614713907,
-0.1848344505,
-0.0721977651,
0.446174711,
0.0551761426,
0.062596418,
0.9526380897,
0.2309770137,
-0.1918454617,
0.3530421853,
0.2041085958,
-0.0470771417,
0.2335589826,
-0.0544420965,
-0.2276648581,
0.0475470796,
0.3281216025,
-0.070125699,
0.3138430715,
0.301474452,
-0.0341499224,
-0.2183251977,
-0.3774333596,
0.5831079483,
-0.0610893257,
0.0716047287,
0.5631734133,
-0.0031044073,
-0.1457767338,
-0.0282863006,
-0.1113374829,
0.83223176,
-0.2192076743,
0.1396560371,
0.3237108588,
-0.2258147597,
0.2849931717,
-0.362631321,
0.1815254539,
-0.1902492046,
0.0559395067,
-0.1027312279,
-0.1027689576,
0.016931843,
0.2292082608,
0.1400344819,
0.4701395035,
-0.0622953027,
-0.041358307,
0.2022137642,
0.2214944363,
-0.1957223862,
-0.0350251831,
-0.4555770457,
0.1509606838,
-0.0635009632,
0.3048479557,
0.0043508559,
-0.0404347479,
-0.2007142305,
-0.1768924594,
-0.3790904284,
0.1039977968,
-0.4450157583,
0.3993927538,
0.0648718476,
-0.1194170415,
-0.3323348165,
0.1331064403,
-0.1718950272,
0.0374776348,
-0.377407223,
0.2002426535,
-0.2505825162,
-0.1914522797,
0.0667513311,
0.2090221047,
0.1672667712,
-0.0286223404,
-0.1082126647,
0.2219370008,
-0.1580395997,
-0.4935770631,
-0.086123459,
-0.027010303,
0.1342186481,
-0.1137050688,
-0.12502563,
-0.3386534154,
-0.2043164372,
-0.0527786426,
0.080849044,
0.0288587529,
0.2523483634,
-0.2069956958,
0.0026367477,
-0.2918313742,
-0.1399933249,
0.5058476329,
-0.2566269934,
-0.3374789357,
0.4631575644,
0.0977260098,
-0.0907069221,
-0.147487253,
-0.1863517612,
-0.0134128518,
-0.1456057578,
0.0908240378,
0.0119753592,
0.1186034977,
-0.2104354948,
-0.0244332626,
0.2548632622,
-0.1683793664,
0.04672499,
-0.511824429,
-0.4071712196,
0.2718000412,
-0.2288025767,
0.1913926601,
0.003455624,
-0.0871693045,
0.1730557829,
-0.2681247294,
-0.2592227459,
0.1471402049,
-0.4422643781,
-0.2400082499,
0.2411800623,
-0.1960831285,
0.4321492314,
0.0995830297,
0.1983938515,
-0.0372607447,
-0.229364872,
-0.1816976368,
0.0783658028,
0.1327115893,
0.103149429,
-0.4042627513,
0.0659460351,
-0.0905279368,
-0.1013426334,
-0.1443163753,
0.0145541653,
0.2522517443,
0.1482551694,
-0.2715091109,
0.1424652487,
0.0433753133,
-0.1513764858,
0.0312859602,
0.1540948451,
0.3858401775,
0.1071471721,
0.0385400765,
-0.0120026432,
0.0421501845,
-0.1947083175,
0.02884572,
0.0366722234,
0.1114399582,
0.5246018171,
-0.2630038261,
0.0688444376,
0.1733340621,
0.276620388,
0.3434123397,
-0.3933224976,
-0.0504624061,
0.086111784,
0.1886859983,
-0.1005257145,
-0.040939033,
0.1158133596,
-0.0200306866,
-0.0530433096,
0.0752637833,
0.0275849104,
0.0262588114,
0.1938834786,
0.0303884894,
0.403416574,
0.0132635087,
0.0182410963,
-0.0686372146,
-0.1445128918,
0.0048210053,
0.3360906839,
0.1343928277,
0.3272195756,
0.4190325141,
-0.145015642,
-0.0987359658,
-0.3855917752,
0.2788904011,
-0.2114679366,
-0.4335516691,
-0.2508145869,
0.2423273027,
-0.3047326505,
0.2247782052,
-0.2435575426,
0.2378091216,
-0.4140956402,
0.2134465277,
-0.250333637,
0.0139559563,
-0.0381373987,
-0.1202732474,
0.046085991,
-0.1928996444,
-0.1554574519,
0.0292257741,
-0.0773304179,
-0.1959444284,
0.1673083156,
-0.1012982279,
-0.1600544453,
-0.2908317149,
0.1489148438,
0.0585051924,
0.1058556736,
-0.2569085956,
0.5002359152,
0.1337185055,
-0.1236689314,
0.2592597306,
0.2547575831,
0.3921831548,
0.2354182601,
-0.0563619174,
0.1187811941,
-0.1520819217,
-0.158069849,
-0.1649383605,
0.2220056355,
0.2826271355,
-0.2399267852,
0.4083397985,
0.2201501131,
-0.1681928635,
0.3380621672,
-0.0190953221,
0.4372435212,
-0.2133318931,
0.3192177117,
-0.3780584931,
0.057531178,
-0.3101491034,
-0.083227843,
-0.5760591626,
-0.2530725002,
-0.1635166109,
-0.101671949,
0.1617383063,
-0.013818942,
0.0595092662,
0.0480282679,
0.377902478,
0.4761710763,
0.1966778189,
-0.2976573706,
-0.2617686689,
-0.5369641781,
0.084512271,
-0.0744424313,
0.0407860279,
-0.0126418415,
0.3252760768,
-0.1434867382,
0.1179322898,
0.1704970896,
0.1750703156,
-0.2017746568,
0.1189975739,
-0.275883913,
-0.416370213,
-0.0354897454,
0.1237286404,
-0.0925101191,
-0.1620141268,
0.1815116107,
-0.2884222865,
-0.0075485259,
0.0063046869,
0.1264899522,
0.0303845257,
-0.0279788487,
0.4688524306,
0.1719366461,
0.4205754995,
0.1091430634,
-0.2500297427,
-0.3299546242,
-0.1993983537,
-0.0289108865,
0.0117750308,
-0.0593901351,
0.456469655,
-0.0293868817,
0.0285883248,
-0.2617827654,
0.1135850772,
-0.0730579346,
-0.1677086055,
0.0184928328,
-0.1089661047,
0.0220414102,
0.1403101832,
-0.0012169853,
0.3501482606,
0.0503058881,
0.2221423537,
-0.0946955383,
-0.1574628055,
0.5106207132,
-0.0712283924,
-0.2704930604,
0.2154469192,
0.0052095577,
-0.0617785379,
-0.0020324476,
-0.3609398007,
0.2056364119,
0.4209409952,
0.0798653215,
-0.1565102935,
0.0797878057,
-0.1106189638,
-0.069127664,
-0.1145044789,
0.2245735377,
-0.1046053097,
-0.1141531467,
0.0521624088,
0.0729799047
] |
https://github.com/huggingface/datasets/issues/2212 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset | They now made a website to force people who want to use the dataset for commercial purposes to seek a commercial license from them ... | I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it? | 25 | Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
They now made a website to force people who want to use the dataset for commercial purposes to seek a commercial license from them ... | [
-0.3520760536,
0.1850520074,
-0.1066455767,
0.2455793768,
0.399815768,
0.0336071402,
0.3876354694,
0.2061040401,
0.3057495654,
0.1453928649,
-0.2683596015,
-0.1908084601,
0.2827516198,
0.0175514147,
0.0276066102,
0.0714484304,
-0.0717819557,
-0.0440938659,
-0.1596580297,
0.0708822012,
-0.354216814,
0.3704527617,
-0.1904582083,
0.1628843844,
-0.3339347839,
0.0633745864,
0.0055796653,
0.3590935767,
-0.3199555874,
-0.1079104245,
0.2862089276,
0.0416274443,
0.0041506663,
0.4852186739,
-0.0001157215,
0.1660647541,
0.3586291969,
-0.031764891,
-0.4298182428,
-0.5632387996,
-0.3045651913,
-0.0725704134,
0.215318054,
-0.2087869346,
-0.1616280675,
-0.0290347561,
0.1196176186,
-0.4198770225,
0.2603788972,
0.4918956757,
0.1842911541,
-0.047249943,
0.2975516021,
-0.180325985,
-0.0591366105,
-0.1362887025,
-0.0200076476,
0.6450530291,
-0.0140424185,
-0.2045282423,
-0.0508273356,
0.0286189988,
0.1182562113,
0.1726582795,
0.1585941017,
0.2011901438,
-0.3372358382,
-0.1506724656,
0.21183604,
0.0146888644,
0.5337826014,
-0.2849700451,
-0.4723347425,
-0.1233135983,
-0.0491204187,
-0.3767206371,
0.5024484992,
0.0925153717,
-0.2628646791,
0.1907123178,
-0.4664975405,
-0.250875026,
-0.1997160763,
0.3678171933,
-0.3860649168,
0.270129025,
-0.1864977032,
0.232551977,
0.2770292461,
-0.1557941139,
-0.2593965828,
0.1098564938,
0.1527529359,
0.318695724,
-0.3141095638,
0.1022978947,
-0.0440242551,
-0.283010006,
0.1964603215,
0.3815692067,
-0.0150780464,
0.0076378342,
-0.0969402492,
0.1645279825,
0.4020116329,
0.3189198077,
-0.1120545119,
0.2087809145,
0.1873424649,
0.6325329542,
-0.1311297566,
-0.1770189404,
-0.1378112286,
-0.0813718811,
-0.1658250093,
-0.1835141778,
0.1537754834,
-0.1985751539,
-0.1576271057,
0.1740345061,
-0.2624886632,
-0.0844818801,
0.0354960822,
0.3024872839,
-0.0897954702,
0.109186545,
0.0184982941,
0.2455939949,
-0.1006539464,
0.1638455391,
-0.1644032001,
0.2479629666,
-0.2182160318,
0.2315590382,
0.2416773885,
0.1246848851,
0.3092522621,
-0.3974609077,
0.0709445924,
-0.0954508409,
0.2211934775,
-0.245413959,
-0.1564024687,
0.3248184919,
0.1361618191,
-0.0193315037,
0.1892512143,
-0.0819873512,
-0.1203506067,
-0.0591270141,
-0.2380795479,
-0.2690153122,
-0.1610815823,
0.1693096608,
-0.1822193265,
0.0440682992,
-0.3180555403,
0.0211407635,
-0.1630145013,
-0.292923063,
-0.0264917687,
0.1383046508,
-0.1317388713,
-0.1248101816,
0.3689208031,
0.5510036945,
-0.2626016736,
-0.0661597848,
-0.2078199685,
-0.0995473415,
-0.0146748684,
0.4244318008,
-0.1743917167,
0.2035569549,
-0.4347253144,
0.2382111698,
0.4783931077,
-0.2472982258,
-0.8428891897,
0.4279749095,
-0.2450460643,
0.1419138461,
-0.0919319466,
0.0322814472,
-0.0358393565,
0.1951995045,
0.6311695576,
0.2926327884,
-0.0661306083,
-0.1279310882,
-0.0659749731,
-0.3087246418,
-0.0573890135,
0.2728066146,
-0.0072480338,
0.1732916236,
0.2028900683,
-0.1135585308,
0.2032043934,
0.1464846581,
-0.1294749826,
0.2984036803,
0.0654908046,
0.0501432493,
-0.1333139092,
-0.0529261082,
-0.6362524629,
0.2412666678,
-0.2172222883,
-0.0310091488,
-0.5615540147,
0.2495313436,
-0.4475071132,
0.0381119698,
-0.0719005764,
0.0171307921,
0.0995737612,
0.0793234855,
0.1675628722,
0.1997746229,
-0.2326555103,
0.3575583398,
0.0593538955,
0.2285769135,
-0.4177795053,
0.3038282096,
-0.0686030611,
-0.0128734484,
-0.0401701517,
0.0375095345,
0.0876058638,
-0.1907197535,
-0.1723520011,
0.3521072268,
-0.0981606767,
0.1596618593,
0.3979538977,
0.4166023433,
0.1592303663,
-0.0419743732,
0.0967003256,
-0.1133242697,
0.0562817305,
-0.0873885453,
-0.1806228012,
0.1824070215,
0.1226355582,
0.3023009896,
0.1402963698,
0.0336382166,
0.365693152,
0.118005693,
-0.0833133832,
-0.1543994546,
0.1541405618,
0.4664796293,
0.2170074731,
0.0557066128,
-0.1387760043,
-0.0494212285,
0.3819886446,
-0.2163209915,
0.0133877508,
0.2899906933,
0.0413502119,
-0.272326827,
0.1269239783,
0.0862025321,
0.4915736616,
0.0586337931,
0.1429884881,
0.1387394816,
-0.2469657063,
-0.16380696,
0.078477487,
0.0087315626,
0.0382012948,
0.0595249981,
0.1666515917,
-0.020693725,
-0.1088886708,
-0.3694199324,
0.0472554564,
0.1783641726,
-0.1222573742,
0.3422808349,
-0.1195474863,
-0.1523810327,
0.1046308056,
-0.3231036067,
-0.245598495,
-0.4834876359,
-0.1251461208,
0.2941144705,
0.0920700133,
0.0488246307,
-0.3312271833,
0.0984713733,
0.1856974065,
-0.519572854,
-0.1338462532,
-0.1513887942,
-0.1231957003,
0.056357123,
0.3074063957,
-0.2006789744,
0.249946475,
-0.2296646535,
-0.1008943617,
-0.4725246727,
-0.1700990796,
0.0898432136,
-0.0312449653,
0.4079280794,
0.2447231561,
0.3579795063,
-0.0674479976,
-0.0232892744,
0.4561802745,
0.0728965849,
-0.0803327262,
-0.0389703438,
-0.1058986634,
0.1410918236,
0.0546693504,
-0.2638033926,
-0.2067804784,
-0.3587549925,
0.4501704872,
0.0336140916,
0.0696528181,
0.1306529343,
0.1599377692,
0.2007168829,
0.160875082,
-0.1496060491,
-0.3580868244,
-0.5675963163,
0.4216380417,
-0.2252494395,
-0.0629608333,
0.0954556912,
0.1260265559,
0.4072686434,
0.3108046949,
-0.5964595675,
-0.4336863458,
-0.2441264838,
0.243868649,
-0.0759848729,
-0.284183085,
0.2059355825,
-0.2813444734,
-0.0455123819,
0.0795239359,
-0.343588531,
0.1072270125,
0.0380035229,
0.4218062758,
0.19053635,
0.5441437364,
-0.1006029248,
0.5965812206,
0.0506761074,
0.1118793935,
0.3819426,
-0.1311578602,
0.2393558174,
-0.4368831515,
-0.2892045975,
0.135488227,
-0.0735366344,
-0.3199813962,
-0.1010950059,
0.1610036045,
-0.066766046,
-0.2432232648,
0.2578685284,
-0.4428743124,
-0.2013873756,
0.0435504615,
-0.0229952149,
0.0392960645,
0.1748022735,
0.0631833524,
-0.1840068251,
-0.0513393804,
-0.0495903715,
0.1898232698,
0.0814527124,
0.1691629589,
-0.0057753026,
-0.3805064857,
-0.5242769122,
0.408683151,
0.0688266158,
0.3191049099,
-0.234349221,
0.090185076,
0.159983933,
-0.0714386106,
0.5216057301,
0.0438567847,
-0.0242689475,
0.2260751575,
-0.0639996529,
-0.2260829359,
0.040833652,
0.1604543179,
0.287671566,
0.278439194,
0.5854116678,
-0.435575515,
-0.0223596767,
0.2736796737,
0.0492441393,
-0.0857093185,
-0.051977288,
-0.19635804,
-0.492688179,
-0.3459271193,
-0.2309071124,
0.0583771467,
0.3225264251,
0.2719908059,
-0.1396184713,
0.1985047907,
-0.2339978814,
-0.1237920448,
0.0856428444,
0.2614713907,
-0.1848344505,
-0.0721977651,
0.446174711,
0.0551761426,
0.062596418,
0.9526380897,
0.2309770137,
-0.1918454617,
0.3530421853,
0.2041085958,
-0.0470771417,
0.2335589826,
-0.0544420965,
-0.2276648581,
0.0475470796,
0.3281216025,
-0.070125699,
0.3138430715,
0.301474452,
-0.0341499224,
-0.2183251977,
-0.3774333596,
0.5831079483,
-0.0610893257,
0.0716047287,
0.5631734133,
-0.0031044073,
-0.1457767338,
-0.0282863006,
-0.1113374829,
0.83223176,
-0.2192076743,
0.1396560371,
0.3237108588,
-0.2258147597,
0.2849931717,
-0.362631321,
0.1815254539,
-0.1902492046,
0.0559395067,
-0.1027312279,
-0.1027689576,
0.016931843,
0.2292082608,
0.1400344819,
0.4701395035,
-0.0622953027,
-0.041358307,
0.2022137642,
0.2214944363,
-0.1957223862,
-0.0350251831,
-0.4555770457,
0.1509606838,
-0.0635009632,
0.3048479557,
0.0043508559,
-0.0404347479,
-0.2007142305,
-0.1768924594,
-0.3790904284,
0.1039977968,
-0.4450157583,
0.3993927538,
0.0648718476,
-0.1194170415,
-0.3323348165,
0.1331064403,
-0.1718950272,
0.0374776348,
-0.377407223,
0.2002426535,
-0.2505825162,
-0.1914522797,
0.0667513311,
0.2090221047,
0.1672667712,
-0.0286223404,
-0.1082126647,
0.2219370008,
-0.1580395997,
-0.4935770631,
-0.086123459,
-0.027010303,
0.1342186481,
-0.1137050688,
-0.12502563,
-0.3386534154,
-0.2043164372,
-0.0527786426,
0.080849044,
0.0288587529,
0.2523483634,
-0.2069956958,
0.0026367477,
-0.2918313742,
-0.1399933249,
0.5058476329,
-0.2566269934,
-0.3374789357,
0.4631575644,
0.0977260098,
-0.0907069221,
-0.147487253,
-0.1863517612,
-0.0134128518,
-0.1456057578,
0.0908240378,
0.0119753592,
0.1186034977,
-0.2104354948,
-0.0244332626,
0.2548632622,
-0.1683793664,
0.04672499,
-0.511824429,
-0.4071712196,
0.2718000412,
-0.2288025767,
0.1913926601,
0.003455624,
-0.0871693045,
0.1730557829,
-0.2681247294,
-0.2592227459,
0.1471402049,
-0.4422643781,
-0.2400082499,
0.2411800623,
-0.1960831285,
0.4321492314,
0.0995830297,
0.1983938515,
-0.0372607447,
-0.229364872,
-0.1816976368,
0.0783658028,
0.1327115893,
0.103149429,
-0.4042627513,
0.0659460351,
-0.0905279368,
-0.1013426334,
-0.1443163753,
0.0145541653,
0.2522517443,
0.1482551694,
-0.2715091109,
0.1424652487,
0.0433753133,
-0.1513764858,
0.0312859602,
0.1540948451,
0.3858401775,
0.1071471721,
0.0385400765,
-0.0120026432,
0.0421501845,
-0.1947083175,
0.02884572,
0.0366722234,
0.1114399582,
0.5246018171,
-0.2630038261,
0.0688444376,
0.1733340621,
0.276620388,
0.3434123397,
-0.3933224976,
-0.0504624061,
0.086111784,
0.1886859983,
-0.1005257145,
-0.040939033,
0.1158133596,
-0.0200306866,
-0.0530433096,
0.0752637833,
0.0275849104,
0.0262588114,
0.1938834786,
0.0303884894,
0.403416574,
0.0132635087,
0.0182410963,
-0.0686372146,
-0.1445128918,
0.0048210053,
0.3360906839,
0.1343928277,
0.3272195756,
0.4190325141,
-0.145015642,
-0.0987359658,
-0.3855917752,
0.2788904011,
-0.2114679366,
-0.4335516691,
-0.2508145869,
0.2423273027,
-0.3047326505,
0.2247782052,
-0.2435575426,
0.2378091216,
-0.4140956402,
0.2134465277,
-0.250333637,
0.0139559563,
-0.0381373987,
-0.1202732474,
0.046085991,
-0.1928996444,
-0.1554574519,
0.0292257741,
-0.0773304179,
-0.1959444284,
0.1673083156,
-0.1012982279,
-0.1600544453,
-0.2908317149,
0.1489148438,
0.0585051924,
0.1058556736,
-0.2569085956,
0.5002359152,
0.1337185055,
-0.1236689314,
0.2592597306,
0.2547575831,
0.3921831548,
0.2354182601,
-0.0563619174,
0.1187811941,
-0.1520819217,
-0.158069849,
-0.1649383605,
0.2220056355,
0.2826271355,
-0.2399267852,
0.4083397985,
0.2201501131,
-0.1681928635,
0.3380621672,
-0.0190953221,
0.4372435212,
-0.2133318931,
0.3192177117,
-0.3780584931,
0.057531178,
-0.3101491034,
-0.083227843,
-0.5760591626,
-0.2530725002,
-0.1635166109,
-0.101671949,
0.1617383063,
-0.013818942,
0.0595092662,
0.0480282679,
0.377902478,
0.4761710763,
0.1966778189,
-0.2976573706,
-0.2617686689,
-0.5369641781,
0.084512271,
-0.0744424313,
0.0407860279,
-0.0126418415,
0.3252760768,
-0.1434867382,
0.1179322898,
0.1704970896,
0.1750703156,
-0.2017746568,
0.1189975739,
-0.275883913,
-0.416370213,
-0.0354897454,
0.1237286404,
-0.0925101191,
-0.1620141268,
0.1815116107,
-0.2884222865,
-0.0075485259,
0.0063046869,
0.1264899522,
0.0303845257,
-0.0279788487,
0.4688524306,
0.1719366461,
0.4205754995,
0.1091430634,
-0.2500297427,
-0.3299546242,
-0.1993983537,
-0.0289108865,
0.0117750308,
-0.0593901351,
0.456469655,
-0.0293868817,
0.0285883248,
-0.2617827654,
0.1135850772,
-0.0730579346,
-0.1677086055,
0.0184928328,
-0.1089661047,
0.0220414102,
0.1403101832,
-0.0012169853,
0.3501482606,
0.0503058881,
0.2221423537,
-0.0946955383,
-0.1574628055,
0.5106207132,
-0.0712283924,
-0.2704930604,
0.2154469192,
0.0052095577,
-0.0617785379,
-0.0020324476,
-0.3609398007,
0.2056364119,
0.4209409952,
0.0798653215,
-0.1565102935,
0.0797878057,
-0.1106189638,
-0.069127664,
-0.1145044789,
0.2245735377,
-0.1046053097,
-0.1141531467,
0.0521624088,
0.0729799047
] |
https://github.com/huggingface/datasets/issues/2211 | Getting checksum error when trying to load lc_quad dataset | Hi,
I've already opened a PR with the fix. If you are in a hurry, just build the project from source and run:
```bash
datasets-cli test datasets/lc_quad --save_infos --all_configs --ignore_verifications
```
| I'm having issues loading the [lc_quad](https://huggingface.co/datasets/fquad) dataset by running:
```Python
lc_quad = load_dataset("lc_quad")
```
which is giving me the following error:
```
Using custom data configuration default
Downloading and preparing dataset lc_quad/default (download: 3.69 MiB, generated: 19.77 MiB, post-processed: Unknown size, total: 23.46 MiB) to /root/.cache/huggingface/datasets/lc_quad/default/2.0.0/5a98fe174603f5dec6df07edf1c2b4d2317210d2ad61f5a393839bca4d64e5a7...
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-42-404ace83f73c> in <module>()
----> 1 lc_quad = load_dataset("lc_quad")
3 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
37 if len(bad_urls) > 0:
38 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls))
40 logger.info("All the checksums matched successfully" + for_verification_name)
41
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/AskNowQA/LC-QuAD2.0/archive/master.zip']
```
Does anyone know why this could be and how I fix it? | 31 | Getting checksum error when trying to load lc_quad dataset
I'm having issues loading the [lc_quad](https://huggingface.co/datasets/fquad) dataset by running:
```Python
lc_quad = load_dataset("lc_quad")
```
which is giving me the following error:
```
Using custom data configuration default
Downloading and preparing dataset lc_quad/default (download: 3.69 MiB, generated: 19.77 MiB, post-processed: Unknown size, total: 23.46 MiB) to /root/.cache/huggingface/datasets/lc_quad/default/2.0.0/5a98fe174603f5dec6df07edf1c2b4d2317210d2ad61f5a393839bca4d64e5a7...
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-42-404ace83f73c> in <module>()
----> 1 lc_quad = load_dataset("lc_quad")
3 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
37 if len(bad_urls) > 0:
38 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls))
40 logger.info("All the checksums matched successfully" + for_verification_name)
41
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/AskNowQA/LC-QuAD2.0/archive/master.zip']
```
Does anyone know why this could be and how I fix it?
Hi,
I've already opened a PR with the fix. If you are in a hurry, just build the project from source and run:
```bash
datasets-cli test datasets/lc_quad --save_infos --all_configs --ignore_verifications
```
| [
-0.1586480886,
0.0430789143,
-0.0340239108,
0.3563592434,
0.2677671015,
0.0147292167,
0.0714036822,
0.2469019741,
0.371091336,
-0.0422731787,
-0.1049164832,
0.067745097,
-0.037776161,
0.0753147677,
-0.2280278653,
0.2225681692,
0.0536351018,
0.0427623354,
-0.0752972215,
0.0635506064,
-0.2016301006,
0.2370712906,
-0.0842744187,
-0.2540153563,
-0.2298657149,
0.0226952937,
0.2053582966,
0.4523076117,
-0.2846856713,
-0.2342199385,
0.2958000302,
0.2990621924,
0.1777930558,
0.352306217,
-0.0001155879,
0.1017175764,
0.3779894114,
-0.1899461448,
-0.3943250477,
-0.0775865167,
-0.261636585,
-0.1055974811,
0.1051906049,
-0.175715372,
0.0675688088,
0.3183247149,
-0.175534755,
-0.1860812306,
0.1201473102,
0.031365782,
0.2525503635,
0.6949148178,
0.0769915953,
0.0821319669,
-0.0173104964,
-0.066588074,
0.0181370899,
0.6490381956,
0.2040344775,
-0.1024489403,
-0.0439260639,
0.1912634224,
-0.0535613298,
0.1119761914,
0.171668753,
-0.1965043843,
-0.0742648616,
-0.0029102066,
0.2049061954,
0.2949048579,
0.4116021991,
-0.35429582,
-0.4142789841,
-0.0578517914,
0.0658890158,
-0.1924102306,
0.3854559958,
0.2196366489,
-0.2024656832,
-0.1056817397,
-0.343588233,
0.0057750419,
0.1171862185,
0.1437589824,
0.0274927169,
0.0133230519,
0.0119924136,
0.0433482453,
0.1741918176,
-0.1444575489,
-0.1835760772,
-0.0199342351,
-0.2033455819,
0.2262376249,
-0.4441523552,
-0.0280743167,
-0.0538370088,
0.5078675747,
0.16149728,
0.5987930298,
0.1114633158,
0.2344516665,
-0.1141756922,
0.1311391294,
0.0641105324,
0.1764588058,
0.0813860074,
0.2512384653,
0.1025378853,
0.5696985126,
-0.1124662682,
-0.016184492,
-0.1434009671,
-0.0670082793,
0.0204586312,
0.0047430433,
0.1683292091,
-0.5566791892,
-0.2990565002,
0.4156855345,
0.1240059882,
-0.0489500575,
0.4083915353,
0.4536545575,
-0.1148812994,
0.0788541287,
0.0255793631,
0.0592118986,
-0.21221219,
0.0015806407,
-0.2094917744,
0.0950492322,
-0.109906815,
0.1747073978,
0.332421273,
-0.2124650478,
0.3945678174,
-0.1254247129,
0.5546686649,
-0.0824101046,
0.0168443546,
-0.0795149133,
-0.2176978141,
0.3631320596,
-0.1268156171,
0.0099506527,
0.4028933942,
-0.0756147951,
-0.2388126254,
-0.0873799846,
-0.1864017695,
-0.1896508932,
-0.247801438,
0.1476690918,
-0.4457599521,
-0.0073192301,
-0.100463897,
-0.4310810268,
0.3045099974,
-0.334205091,
0.0233890675,
-0.1273538172,
-0.1298721582,
-0.1921389252,
0.2523179054,
0.3476815224,
-0.2570976615,
-0.042105034,
0.0052072257,
-0.2823815346,
0.1914499104,
0.2836831212,
-0.0853366554,
0.0180475954,
-0.2128899992,
-0.1154887527,
0.0440890677,
-0.3135991096,
-0.6612858772,
0.1054849476,
0.2083635032,
0.2534270287,
-0.1629278362,
0.0760658607,
-0.1316619068,
-0.0755773038,
0.0276351608,
-0.0193059891,
0.0347142071,
0.0147752911,
-0.2605699301,
-0.171407491,
0.1294887662,
0.2703022063,
-0.0975580066,
-0.079664886,
0.0913570374,
0.0269035101,
0.1955729276,
-0.0815565139,
-0.1271459162,
0.1410220712,
0.4066480398,
0.0088427328,
0.0124132596,
-0.1226477623,
-0.5203514695,
0.4184087515,
-0.1758985817,
0.1054991558,
-0.30108428,
0.0123756528,
-0.3993282914,
-0.007707905,
-0.2525679767,
0.0424716994,
0.091232501,
0.1547877491,
0.1401319504,
-0.0184319578,
-0.2219920754,
0.1539933681,
-0.4026225805,
0.1927555799,
-0.4083476067,
0.4389024973,
0.1484151185,
-0.0811730176,
0.0649156123,
0.2987394631,
0.0440049767,
0.0688856617,
-0.1830137074,
0.395231843,
0.3292906284,
-0.0046897233,
0.1685601771,
0.2685256004,
-0.0258051138,
-0.1721272767,
-0.0555882379,
0.2175348848,
0.191280067,
-0.0338721722,
-0.0383775979,
0.4533184171,
-0.1471696496,
0.087558046,
-0.0493918136,
0.0198792219,
0.2120857388,
-0.0375483893,
-0.2479395866,
-0.2896395326,
0.3542728126,
0.3663360178,
0.2394928485,
0.0791929066,
-0.0366402045,
-0.2723242342,
-0.03872668,
0.0369357094,
-0.0535526387,
0.0033647495,
0.2176829726,
0.0531174988,
0.1653125882,
0.3118388057,
0.3474907279,
-0.009285925,
-0.0535391308,
0.2015188485,
-0.3057133853,
-0.0120725855,
-0.0608282685,
0.0010349937,
0.0891355947,
0.2957100272,
0.0235623792,
-0.0257526934,
-0.3373186588,
-0.1105122194,
0.0253477916,
0.3205065429,
-0.3456201553,
0.0741354451,
-0.316303283,
-0.1975533068,
-0.1722880304,
-0.2486700714,
-0.4937607348,
-0.4542941749,
-0.1639762819,
0.2879133523,
0.0259696171,
0.1399542093,
-0.5169959068,
0.1362464726,
0.0900544748,
-0.5120424628,
0.0927224681,
-0.172741279,
-0.0236468948,
0.0141025707,
0.5645960569,
0.0205634274,
0.4355000556,
-0.1627612412,
-0.0276109092,
-0.3428325057,
-0.1681949496,
-0.0328796841,
-0.1144415066,
0.2417948991,
0.2336490154,
0.2427728772,
-0.1269132048,
-0.2196348906,
0.3777886033,
0.1318973899,
-0.2311524749,
0.1286149621,
-0.1610603184,
-0.1313484907,
-0.0604948215,
0.2755802274,
-0.1098040417,
-0.3019472063,
-0.0892819762,
0.1758146882,
0.0926919878,
-0.0439412296,
-0.082956478,
0.1223537475,
-0.0465579741,
0.0810395852,
-0.3157860041,
-0.64499259,
0.3277231753,
-0.0472501777,
-0.3249155879,
0.0022673458,
-0.0587230586,
0.4990761876,
0.0536289923,
-0.4397415817,
-0.3454909921,
-0.1774224192,
0.2491060346,
0.0834848434,
-0.0003842507,
0.0818121582,
-0.1677067876,
0.0547438636,
-0.0944876075,
-0.2528229356,
-0.1147168279,
-0.0507772677,
0.5432268977,
-0.1026437879,
0.215242058,
-0.1030039489,
0.6116774678,
0.452065289,
-0.0781403929,
0.3794069588,
0.0450164229,
0.4519747496,
-0.1160534471,
-0.3357388973,
0.0971657634,
-0.161215961,
-0.0847994536,
0.0252151862,
0.0292712972,
0.0247338004,
-0.2515131235,
0.1519161165,
-0.2503834963,
-0.2537185848,
0.0410112888,
-0.1620971859,
0.1288381219,
-0.0400345102,
0.0869281143,
-0.0380052999,
-0.300114572,
0.0917972997,
0.4121658802,
-0.1028774008,
-0.1234617233,
-0.4588956833,
-0.2496639043,
-0.2685912251,
0.3270351291,
0.2161613703,
0.4495322108,
-0.0150479153,
-0.2056306899,
-0.0443210118,
-0.1235330105,
0.1489131153,
0.0390376896,
0.0833087713,
0.2485021949,
-0.1471059769,
-0.3670145571,
-0.1597015113,
0.0344156101,
0.1818721592,
0.1798867285,
0.3147474825,
-0.4724258184,
0.0675314516,
-0.0433376953,
0.2448163182,
-0.2145598084,
-0.3109268248,
-0.5248872042,
-0.2773876786,
-0.5080864429,
-0.0672974437,
-0.2400068343,
0.4325857162,
0.1074416861,
0.3124434352,
0.2348859459,
-0.1548343599,
0.3811732233,
0.2378399819,
0.3265142441,
0.1357019097,
0.174446404,
0.0411280505,
-0.0249343291,
0.0622664392,
0.9562075734,
-0.2117442042,
-0.2108050436,
-0.0352912918,
0.124834761,
-0.0898465067,
0.1483578086,
-0.0194942933,
-0.0160939358,
0.4172473252,
-0.0226287097,
-0.2142557204,
0.0240514353,
-0.1016138941,
-0.0430669673,
-0.321228683,
-0.1270314902,
0.1637928486,
-0.2481810749,
0.102081567,
0.5275675058,
0.127337113,
-0.0017745718,
0.0106440894,
0.195893243,
0.7999642491,
-0.0679679364,
0.0486912243,
0.4638358951,
-0.0942287222,
0.1278879791,
0.26727283,
-0.1625270545,
-0.3938176632,
-0.2919071615,
-0.0014131591,
-0.1252768636,
0.1884133667,
-0.1573890001,
0.0349526107,
0.2362198383,
-0.1836354136,
0.0361147635,
0.0520512611,
0.2275850177,
-0.270996362,
-0.2156785131,
-0.3438721895,
0.1822008342,
-0.1196336746,
0.2140203714,
-0.2056081444,
0.1336976141,
-0.0845826566,
-0.2432810366,
-0.4584512413,
0.0826704502,
-0.1393230557,
0.2479298711,
0.5432106256,
-0.0116501004,
-0.1105086207,
0.0510683656,
0.1397669315,
0.1708893031,
-0.3202243447,
0.1760000288,
0.2094752491,
-0.0265942905,
0.004473526,
-0.0108376183,
0.3899156153,
-0.1165588871,
-0.1128106564,
0.0313873589,
0.0539408475,
-0.4626776576,
0.1581407636,
-0.1413081139,
-0.1339840442,
-0.4125748277,
-0.3186386824,
-0.2078332454,
0.0848618001,
-0.1035225391,
0.1193910092,
0.4159373641,
-0.0739144459,
0.0533745438,
0.1596251428,
-0.2478346527,
-0.1074658185,
0.4095676541,
-0.2446777225,
-0.3135179579,
0.4543261826,
0.0723193586,
-0.1784507781,
-0.1679847538,
-0.0204062611,
-0.0449938625,
-0.373146534,
0.0616808012,
-0.0245230086,
-0.0404425114,
-0.1267802715,
0.3055091798,
0.4896067679,
-0.0096837468,
0.2847533524,
-0.7144515514,
-0.3556801975,
0.2366775274,
-0.054641027,
0.2952450514,
-0.2526113391,
0.1385344267,
-0.2104965746,
0.0593772754,
-0.2816972435,
0.0230789557,
-0.4564670324,
-0.0837878883,
0.1001631171,
-0.0127250664,
0.2614645362,
0.0349853821,
0.1742554456,
0.0547779351,
-0.3107984662,
-0.1835143268,
-0.2588793635,
0.1122422963,
0.1209283769,
-0.2806799114,
0.1347672045,
0.0320405737,
0.0065014418,
-0.1869192123,
-0.0410551354,
0.1059167385,
-0.1052685156,
0.2443252057,
0.2662101984,
-0.0443943292,
-0.2006893903,
0.1606378257,
-0.0766749382,
0.076169759,
0.2360351086,
-0.0732885301,
-0.1039149091,
0.0062035322,
0.0963166356,
0.1853498518,
0.0018752255,
-0.1533676386,
0.3341057599,
-0.1458843946,
0.0689526647,
0.2138650864,
0.3672224283,
0.2346563637,
-0.3093517721,
0.0030958131,
0.2768591344,
0.1573718935,
-0.2205290645,
0.0155064575,
0.2803595066,
0.2246060073,
0.022531487,
0.2279593498,
0.0356613621,
-0.2950282693,
0.3212124109,
-0.0722737834,
0.2576575577,
-0.1907857656,
0.1527572423,
-0.0063175317,
-0.0556531027,
-0.0287512392,
0.1048015207,
-0.1620072722,
-0.0459871441,
-0.0354432948,
-0.1378435493,
0.1757644117,
-0.2960184515,
0.176987648,
-0.1391241252,
-0.6813550591,
0.3512972891,
0.1452817619,
0.0003174394,
0.081715256,
-0.0337928385,
0.3823239207,
-0.2443014979,
0.1538818479,
-0.453653574,
0.1196980476,
-0.1372103393,
-0.1535895318,
-0.2521288991,
-0.2382498384,
0.1049427539,
0.1202085465,
-0.0151790865,
-0.104823485,
0.1012707502,
0.0977591053,
-0.192847088,
-0.4656088054,
-0.1910350323,
0.1723297238,
-0.0744974613,
-0.1790536642,
0.3651694059,
0.2501390278,
0.0551218688,
0.3380269706,
0.1576617956,
0.464658469,
0.3421229124,
0.1389376372,
-0.027325185,
-0.1392035037,
0.16978921,
-0.0492101461,
0.6106899381,
0.1171116233,
0.0790217519,
0.4796912074,
0.1567840874,
-0.1200563014,
-0.1497461796,
-0.2036271393,
0.0458741933,
-0.0536591001,
0.3299304843,
-0.1648483872,
0.2859271169,
-0.2320780605,
0.2832678556,
-0.4769473672,
-0.1319950223,
-0.0052828714,
0.136571303,
0.2171823829,
0.0867337286,
0.052695483,
-0.1251878887,
0.6108249426,
0.4797272086,
0.2195463777,
-0.2921740115,
-0.3415737152,
-0.8700942993,
0.3062993884,
0.0001155471,
-0.297301352,
0.1456141174,
0.1620198786,
0.0235687308,
0.2645161748,
0.2131075561,
-0.1798981726,
-0.0352092758,
-0.190117836,
-0.1012416258,
-0.1103342772,
-0.1084372103,
-0.2594900131,
-0.1512115598,
-0.2713241577,
0.064003177,
0.1597415209,
0.0773382634,
0.0511465147,
-0.3196363747,
-0.186568737,
0.2459577322,
0.0364961848,
0.1474299431,
0.7800116539,
0.0549714565,
-0.1918806136,
-0.1947786659,
-0.1534123123,
0.0571292304,
0.1269258857,
-0.1336617023,
0.5662146807,
0.1243903637,
0.1683941036,
-0.2983305454,
0.7553333044,
0.115505442,
-0.4614268243,
-0.2976114154,
0.1096067131,
-0.0259118006,
0.0050340928,
0.0148073211,
0.3162673414,
0.0250103474,
0.5059561133,
0.005406484,
-0.1460592747,
0.7090222836,
-0.3143616617,
-0.1443073601,
0.027750615,
0.1365529299,
-0.2922642827,
-0.1482905298,
-0.7186962366,
0.1236462593,
0.1957409978,
0.0238485485,
-0.1305853128,
0.2036419809,
-0.1852638423,
0.1725731194,
-0.0994897336,
0.1660659611,
-0.1630269736,
-0.1523593962,
0.0270935819,
-0.0499185398
] |
https://github.com/huggingface/datasets/issues/2210 | dataloading slow when using HUGE dataset | Hi ! Yes this is an issue with `datasets<=1.5.0`
This issue has been fixed by #2122 , we'll do a new release soon :)
For now you can test it on the `master` branch. | Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
| 34 | dataloading slow when using HUGE dataset
Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
Hi ! Yes this is an issue with `datasets<=1.5.0`
This issue has been fixed by #2122 , we'll do a new release soon :)
For now you can test it on the `master` branch. | [
-0.5256723166,
-0.2135468721,
-0.063111797,
0.2832504511,
0.1389209032,
-0.0277843401,
0.1501028985,
0.2327974886,
-0.1576923877,
-0.0921893865,
-0.1191496626,
0.1439049989,
-0.1486593485,
-0.1823077947,
-0.0239587761,
-0.190233767,
-0.0351155847,
0.0441078991,
-0.3937171698,
-0.0954215974,
0.1609995663,
-0.3550177217,
-0.0351878479,
-0.1941837966,
-0.5536119938,
-0.0915227011,
0.1496041268,
0.107893452,
-0.0339777693,
-0.1050069332,
0.2057134509,
0.0988980904,
0.2247542292,
0.5077371597,
-0.0001180999,
-0.024402447,
0.2768436372,
0.1152792498,
-0.3997966051,
0.3242511451,
-0.1600243747,
-0.4594138265,
-0.0535576753,
-0.0621668324,
0.0956809521,
-0.1884865165,
-0.1830474585,
-0.0993875712,
0.1756865531,
0.2129598558,
0.1189069375,
0.1577772796,
-0.5473750234,
-0.0984985754,
0.2143146694,
0.2566950917,
-0.0703741163,
0.4807889462,
0.5785632133,
-0.1316345632,
-0.487701118,
0.0276806988,
-0.1057128161,
0.2025337517,
0.1750492901,
-0.147950381,
-0.0157899149,
-0.0179224107,
0.3070147634,
0.3041427135,
0.574791491,
-0.0630353391,
-0.034161672,
-0.4913970232,
-0.185933277,
-0.1462962925,
-0.1616674662,
0.1183803305,
-0.2198843509,
-0.1053000763,
-0.5135318637,
-0.0290877447,
-0.1425196975,
-0.074397549,
-0.1110334694,
0.1562515497,
0.0846575424,
0.1382818222,
0.1856723726,
-0.082766518,
0.2695874572,
-0.2561669648,
0.1405550241,
0.0753811449,
-0.4388138652,
-0.0728774369,
0.0968032107,
-0.1686062515,
0.1457460672,
0.1857772022,
-0.0019718744,
0.1145247817,
0.3466458321,
-0.1527279615,
0.3864696026,
0.2220082134,
-0.282309413,
0.1429655254,
0.2121458203,
-0.111124143,
-0.0888323858,
0.1805134267,
-0.1373776793,
-0.0715580285,
0.2868853211,
-0.3479176164,
-0.2448838651,
-0.0368542746,
-0.1311722845,
-0.1438369453,
-0.0216162503,
-0.0731065646,
0.3328083754,
0.325009048,
-0.2769701779,
0.1984864324,
-0.3478927612,
-0.0923689455,
-0.1456360519,
-0.0397833064,
-0.2537197471,
-0.362111479,
-0.2269425541,
0.1369735003,
0.3024579287,
0.2183673978,
0.0834766477,
0.1128566861,
0.0392976031,
0.0382266492,
-0.0897475034,
-0.2322901189,
-0.1428289115,
0.189483121,
-0.2574865222,
0.1726706326,
-0.1284730881,
0.5436845422,
-0.1996116638,
0.4038346708,
-0.3958272636,
-0.5039067864,
-0.0904552788,
0.15117535,
-0.1105478182,
-0.097300142,
-0.43317011,
0.1526712179,
0.0872961581,
-0.1316266954,
-0.0676234066,
-0.3260263801,
-0.0606064983,
0.0065885112,
0.1086087376,
0.2436359525,
-0.1952822208,
-0.1147945672,
0.3166129589,
0.1327325404,
0.2860884964,
0.5053688288,
-0.5788229704,
0.3097110689,
-0.0662716553,
-0.4181601405,
0.3517038822,
-0.228695035,
-0.7667887807,
0.4073600173,
-0.292247504,
0.1128956825,
0.3479834795,
0.3371130228,
0.4691830873,
-0.1738815308,
0.3076791763,
0.632191658,
-0.0391156599,
0.2640081048,
-0.2744719684,
0.0676408708,
0.0770709589,
0.4343063831,
0.048543822,
-0.0526127107,
0.1456942409,
0.342117399,
0.3252028823,
-0.0484419912,
-0.1815527976,
0.2315494567,
-0.1892008483,
-0.0710433051,
0.0750141591,
0.0952451676,
-0.5350974202,
0.3407515883,
-0.1621407419,
-0.3661990166,
0.0473463312,
-0.0397823416,
0.0118513964,
-0.0142920204,
-0.2345993668,
-0.0129346736,
-0.0938502997,
0.0316640846,
0.3591994345,
-0.0247131214,
0.2586243749,
0.1560183018,
-0.3389983773,
0.0163941048,
-0.0187627412,
0.0116387904,
0.381945312,
0.0331692062,
-0.0902028531,
0.1316494495,
0.0178084709,
-0.1747744083,
-0.1438286602,
0.0120329801,
0.0568180308,
0.0211335719,
-0.0174810253,
0.2743739486,
0.1342591345,
0.1359636337,
0.3300759196,
-0.1267270893,
0.1150927693,
-0.3905345798,
-0.2507501543,
0.2684234083,
0.0505887456,
0.3714228868,
0.2174326479,
-0.4488626122,
0.1981158555,
0.036100775,
0.2560521066,
0.3012627959,
0.3356681764,
0.0393960923,
0.6574734449,
0.27513659,
-0.080187127,
-0.0228257626,
0.1576235145,
-0.403849721,
-0.1537793577,
0.1729961336,
-0.3585538864,
-0.3292836547,
0.0519679114,
0.0320586413,
0.47859025,
0.249470979,
0.2282230258,
-0.3006326556,
0.2224226892,
-0.2358570099,
0.1176822037,
0.1153728366,
0.1814306676,
0.1138053834,
0.3615718186,
-0.083115682,
-0.1852351725,
-0.1550077647,
0.2703311145,
0.2636871338,
0.0484493077,
0.3658836186,
-0.0708059967,
-0.1336397231,
-0.1987582743,
0.0870622545,
-0.0340272933,
-0.1547110826,
-0.0423092432,
0.29431656,
0.1146707535,
-0.0428334959,
0.057425335,
0.3087704778,
0.1741381288,
-0.5386882424,
-0.0388456956,
-0.2046869397,
-0.3223607242,
0.0653301999,
0.1915878654,
-0.3348330259,
0.3808291554,
0.2125110328,
0.0180719346,
-0.1169626936,
-0.1210705936,
0.0996207446,
0.1340200156,
-0.1610569358,
-0.3777607679,
-0.0139248036,
0.2444615662,
0.1310233772,
0.1397850066,
-0.2243210226,
0.0565046147,
0.1865109652,
-0.1861601323,
0.0061069764,
0.2705686092,
0.0201206785,
-0.2299533933,
-0.2449502647,
-0.0008151922,
-0.2585434318,
0.1199164093,
0.1637966633,
0.0298893601,
0.1776874512,
0.0702076554,
0.0482570454,
0.0167479329,
-0.2887303829,
0.176068157,
0.0177287832,
-0.2448204756,
-0.4982013106,
0.0225956291,
-0.1001204997,
0.5587284565,
-0.693610549,
-0.0073418207,
-0.4541685581,
0.2404500395,
-0.1954778731,
-0.0072444351,
0.0014594458,
-0.278513968,
-0.0301400032,
0.1731702089,
0.0741409957,
-0.1601119041,
0.0552854724,
0.3070278466,
-0.2037935853,
0.1371226907,
0.2046265304,
0.8623292446,
-0.0597998425,
-0.3136716783,
0.0234495047,
0.0580131784,
0.3383571804,
-0.1843933165,
-0.1994630694,
0.2740377784,
-0.1152108312,
-0.1137012169,
0.2909386158,
-0.0939479321,
-0.3744612336,
0.0598388985,
-0.1998439282,
0.3293919563,
-0.0931628197,
0.3659174442,
-0.2859894633,
-0.0506080911,
0.0342722684,
0.1668292284,
-0.1679095924,
-0.2601919174,
-0.0100642964,
-0.2233889401,
-0.025936652,
-0.0258862879,
0.0280830264,
0.1818680316,
-0.5656912327,
0.1588508785,
0.0670240223,
0.2626859248,
0.11212264,
-0.0408621579,
0.348341167,
0.1353435665,
0.6014816165,
0.2783258855,
0.2870134115,
-0.1728003472,
-0.4035540223,
-0.2081206441,
-0.0747038275,
-0.3570014536,
0.3095753193,
0.4312022626,
0.2041459382,
-0.1900151074,
-0.2005500048,
0.0862456709,
0.2199069262,
-0.1666176021,
-0.3529470563,
-0.1158731431,
-0.1915997416,
-0.0119944513,
0.346324861,
-0.0044016689,
0.1742774397,
-0.0511142984,
-0.0573318005,
-0.1515641659,
0.2218334973,
0.1605650485,
0.043629732,
-0.1091811433,
0.1068405956,
0.1961915642,
-0.0122196367,
0.3635069132,
0.4482749999,
0.3003786206,
0.0266799666,
-0.2349660397,
0.1634911895,
0.2717033625,
0.2000735998,
0.3689023256,
0.2222691178,
-0.0828678757,
-0.29621014,
0.2456640601,
-0.1849714816,
0.2391971201,
0.385158062,
-0.0200758129,
-0.6416813731,
-0.497569114,
0.5110852122,
0.0045209974,
0.0198008269,
0.2292897999,
-0.4414496422,
0.0129967108,
-0.0448415019,
0.0191730931,
0.6361572146,
-0.1764855683,
0.365283221,
-0.0125753693,
0.1191390008,
0.3268482089,
-0.0260469094,
0.0624023117,
-0.1856811047,
-0.0536910817,
0.2275847197,
-0.260628283,
-0.0678400397,
0.2028583139,
0.331707865,
0.188218236,
-0.1313769966,
0.180256784,
0.0128782578,
0.4488946497,
0.0871047005,
-0.2177279592,
-0.092299372,
0.146153003,
-0.3234038353,
0.0433329754,
-0.1008135229,
0.0351993032,
-0.0101292804,
0.0288977399,
-0.2235299945,
0.1035108268,
-0.2309997529,
0.4226004481,
-0.2515104711,
-0.5213245153,
-0.0270562395,
0.0712963045,
-0.5702285171,
-0.0277219899,
-0.0656160712,
0.3650145829,
-0.2758778036,
0.2803943753,
0.3480329514,
-0.2569479048,
0.2451662421,
0.0102143437,
0.1187237203,
0.0089515541,
-0.0229720064,
-0.339600563,
-0.0272118598,
0.3641217649,
0.2775537968,
-0.0798749551,
-0.2256365716,
0.0126861446,
0.0174239725,
-0.0971891731,
0.0363346338,
0.1916296184,
0.0123245791,
0.3834537566,
-0.0301073976,
-0.5099641681,
-0.0553480312,
0.3252411187,
0.2070977986,
-0.2156802863,
0.3971478343,
0.0324987769,
-0.1932038665,
-0.0374404453,
0.2477147132,
0.1495770514,
-0.354518801,
0.178743422,
-0.0600160956,
0.1370621622,
0.193985343,
-0.1866592169,
-0.0886495337,
-0.3123490512,
-0.2700838149,
-0.0955467075,
-0.3872537017,
-0.1503922492,
-0.0366972387,
0.0782169327,
0.0422226712,
-0.1261560023,
-0.0374244377,
0.4340884387,
-0.2102999389,
-0.0549223423,
0.2392008305,
0.0585313737,
-0.0265869889,
-0.2505363822,
0.213855654,
0.004571218,
-0.0561541505,
-0.0516312793,
0.0408311412,
-0.2512096763,
-0.0473775454,
0.1242966652,
-0.0042893616,
-0.120243229,
-0.2368973792,
-0.3456609845,
0.05481169,
-0.2050167024,
0.4311217368,
0.217581749,
0.0157250836,
-0.314042002,
0.3039713204,
0.0252250042,
-0.0269068144,
0.4463456571,
-0.1477808058,
0.2223431468,
0.1358643472,
0.0677682683,
0.287696749,
-0.2494031787,
-0.212869063,
0.0116764475,
0.5909910798,
-0.1453073323,
0.1489435434,
-0.307510823,
0.1673516035,
-0.0027909353,
0.0725505352,
0.3108545542,
0.0135285296,
-0.4140639007,
0.1785520613,
0.0868745744,
0.0393489227,
-0.3019304574,
-0.0945122167,
-0.037134964,
-0.0766191334,
0.133446902,
0.0568922833,
0.2192471623,
-0.130856812,
-0.1306969076,
0.269646436,
0.1258150339,
-0.0478359945,
0.3882276714,
0.2731563449,
-0.1047927588,
0.4876894951,
0.3903228343,
0.2716771662,
0.33557266,
0.10206227,
0.6923545599,
0.1055386513,
-0.0799941793,
0.0108042732,
-0.3727956712,
-0.1548219323,
0.2638239264,
-0.1666506231,
0.1343447566,
-0.1949350536,
0.0091243051,
-0.1912465394,
-0.0653573498,
-0.3557798266,
-0.0264230687,
-0.2079644054,
0.0053797103,
0.1997800767,
0.0551402867,
0.2186173201,
0.3261701167,
-0.3942029476,
-0.1147042587,
-0.0518026203,
0.0310508441,
-0.1218378469,
-0.0492099635,
-0.0098885596,
0.1416735649,
-0.0238094293,
-0.1151937991,
0.0647127032,
-0.0013868324,
-0.0761073381,
0.0374412797,
0.1494816542,
0.2420555949,
0.3533019423,
0.0589095764,
-0.0446694978,
0.1265296936,
-0.0062668882,
-0.1860654354,
0.5170599222,
0.0138471536,
-0.0091508729,
0.1525837481,
0.0038945191,
-0.2196481675,
-0.0569685809,
0.0233474597,
-0.2085931599,
0.0347213484,
0.18918176,
0.151620239,
-0.2049023807,
-0.2619211674,
0.1431288719,
-0.2022103518,
-0.2747009993,
0.3893351555,
-0.2530441284,
-0.0148342177,
-0.007804621,
0.0281694457,
-0.3048426509,
0.9071144462,
0.262347132,
0.3463220894,
-0.3564271927,
0.1867590845,
-0.4191628098,
0.023992639,
-0.5187038779,
0.2021192014,
0.1043008938,
0.2313706875,
-0.0152572989,
0.1377826184,
-0.1181804985,
0.0812143534,
0.0129070692,
-0.2207527161,
-0.2550098896,
-0.0874239728,
-0.1549426168,
0.075203523,
-0.0481374003,
-0.6022773385,
0.3446801901,
-0.0124613531,
-0.0150621682,
-0.2360091805,
0.040871501,
0.1365882009,
0.1809744835,
0.2468440235,
0.1607687175,
0.5449457169,
0.2268920094,
-0.0201756582,
-0.1396602541,
0.0306893364,
-0.1491610408,
0.0218759384,
0.0283088237,
-0.0148980431,
0.0355796888,
-0.0963339433,
0.1079291701,
0.458861351,
-0.0429328308,
-0.2395265102,
-0.0326686315,
-0.3271840811,
-0.0190351307,
0.2352482527,
0.2845639884,
0.2960161269,
-0.0742803216,
-0.1876189113,
-0.2534402013,
-0.1082600653,
0.391623199,
-0.4769769907,
-0.220524013,
-0.2020841092,
0.3011838794,
0.152376622,
0.1260051578,
-0.1114244312,
0.0943019688,
0.1843785346,
-0.0639624,
0.0038856491,
0.3781554997,
-0.2533890605,
0.1732245833,
-0.1296791732,
0.5012322068,
-0.1671090573,
-0.3956727684,
-0.0955532119,
-0.1395307779
] |
https://github.com/huggingface/datasets/issues/2210 | dataloading slow when using HUGE dataset | Hi, thank you for your answer. I did not realize that my issue stems from the same problem. | Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
| 18 | dataloading slow when using HUGE dataset
Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
Hi, thank you for your answer. I did not realize that my issue stems from the same problem. | [
-0.5256723166,
-0.2135468721,
-0.063111797,
0.2832504511,
0.1389209032,
-0.0277843401,
0.1501028985,
0.2327974886,
-0.1576923877,
-0.0921893865,
-0.1191496626,
0.1439049989,
-0.1486593485,
-0.1823077947,
-0.0239587761,
-0.190233767,
-0.0351155847,
0.0441078991,
-0.3937171698,
-0.0954215974,
0.1609995663,
-0.3550177217,
-0.0351878479,
-0.1941837966,
-0.5536119938,
-0.0915227011,
0.1496041268,
0.107893452,
-0.0339777693,
-0.1050069332,
0.2057134509,
0.0988980904,
0.2247542292,
0.5077371597,
-0.0001180999,
-0.024402447,
0.2768436372,
0.1152792498,
-0.3997966051,
0.3242511451,
-0.1600243747,
-0.4594138265,
-0.0535576753,
-0.0621668324,
0.0956809521,
-0.1884865165,
-0.1830474585,
-0.0993875712,
0.1756865531,
0.2129598558,
0.1189069375,
0.1577772796,
-0.5473750234,
-0.0984985754,
0.2143146694,
0.2566950917,
-0.0703741163,
0.4807889462,
0.5785632133,
-0.1316345632,
-0.487701118,
0.0276806988,
-0.1057128161,
0.2025337517,
0.1750492901,
-0.147950381,
-0.0157899149,
-0.0179224107,
0.3070147634,
0.3041427135,
0.574791491,
-0.0630353391,
-0.034161672,
-0.4913970232,
-0.185933277,
-0.1462962925,
-0.1616674662,
0.1183803305,
-0.2198843509,
-0.1053000763,
-0.5135318637,
-0.0290877447,
-0.1425196975,
-0.074397549,
-0.1110334694,
0.1562515497,
0.0846575424,
0.1382818222,
0.1856723726,
-0.082766518,
0.2695874572,
-0.2561669648,
0.1405550241,
0.0753811449,
-0.4388138652,
-0.0728774369,
0.0968032107,
-0.1686062515,
0.1457460672,
0.1857772022,
-0.0019718744,
0.1145247817,
0.3466458321,
-0.1527279615,
0.3864696026,
0.2220082134,
-0.282309413,
0.1429655254,
0.2121458203,
-0.111124143,
-0.0888323858,
0.1805134267,
-0.1373776793,
-0.0715580285,
0.2868853211,
-0.3479176164,
-0.2448838651,
-0.0368542746,
-0.1311722845,
-0.1438369453,
-0.0216162503,
-0.0731065646,
0.3328083754,
0.325009048,
-0.2769701779,
0.1984864324,
-0.3478927612,
-0.0923689455,
-0.1456360519,
-0.0397833064,
-0.2537197471,
-0.362111479,
-0.2269425541,
0.1369735003,
0.3024579287,
0.2183673978,
0.0834766477,
0.1128566861,
0.0392976031,
0.0382266492,
-0.0897475034,
-0.2322901189,
-0.1428289115,
0.189483121,
-0.2574865222,
0.1726706326,
-0.1284730881,
0.5436845422,
-0.1996116638,
0.4038346708,
-0.3958272636,
-0.5039067864,
-0.0904552788,
0.15117535,
-0.1105478182,
-0.097300142,
-0.43317011,
0.1526712179,
0.0872961581,
-0.1316266954,
-0.0676234066,
-0.3260263801,
-0.0606064983,
0.0065885112,
0.1086087376,
0.2436359525,
-0.1952822208,
-0.1147945672,
0.3166129589,
0.1327325404,
0.2860884964,
0.5053688288,
-0.5788229704,
0.3097110689,
-0.0662716553,
-0.4181601405,
0.3517038822,
-0.228695035,
-0.7667887807,
0.4073600173,
-0.292247504,
0.1128956825,
0.3479834795,
0.3371130228,
0.4691830873,
-0.1738815308,
0.3076791763,
0.632191658,
-0.0391156599,
0.2640081048,
-0.2744719684,
0.0676408708,
0.0770709589,
0.4343063831,
0.048543822,
-0.0526127107,
0.1456942409,
0.342117399,
0.3252028823,
-0.0484419912,
-0.1815527976,
0.2315494567,
-0.1892008483,
-0.0710433051,
0.0750141591,
0.0952451676,
-0.5350974202,
0.3407515883,
-0.1621407419,
-0.3661990166,
0.0473463312,
-0.0397823416,
0.0118513964,
-0.0142920204,
-0.2345993668,
-0.0129346736,
-0.0938502997,
0.0316640846,
0.3591994345,
-0.0247131214,
0.2586243749,
0.1560183018,
-0.3389983773,
0.0163941048,
-0.0187627412,
0.0116387904,
0.381945312,
0.0331692062,
-0.0902028531,
0.1316494495,
0.0178084709,
-0.1747744083,
-0.1438286602,
0.0120329801,
0.0568180308,
0.0211335719,
-0.0174810253,
0.2743739486,
0.1342591345,
0.1359636337,
0.3300759196,
-0.1267270893,
0.1150927693,
-0.3905345798,
-0.2507501543,
0.2684234083,
0.0505887456,
0.3714228868,
0.2174326479,
-0.4488626122,
0.1981158555,
0.036100775,
0.2560521066,
0.3012627959,
0.3356681764,
0.0393960923,
0.6574734449,
0.27513659,
-0.080187127,
-0.0228257626,
0.1576235145,
-0.403849721,
-0.1537793577,
0.1729961336,
-0.3585538864,
-0.3292836547,
0.0519679114,
0.0320586413,
0.47859025,
0.249470979,
0.2282230258,
-0.3006326556,
0.2224226892,
-0.2358570099,
0.1176822037,
0.1153728366,
0.1814306676,
0.1138053834,
0.3615718186,
-0.083115682,
-0.1852351725,
-0.1550077647,
0.2703311145,
0.2636871338,
0.0484493077,
0.3658836186,
-0.0708059967,
-0.1336397231,
-0.1987582743,
0.0870622545,
-0.0340272933,
-0.1547110826,
-0.0423092432,
0.29431656,
0.1146707535,
-0.0428334959,
0.057425335,
0.3087704778,
0.1741381288,
-0.5386882424,
-0.0388456956,
-0.2046869397,
-0.3223607242,
0.0653301999,
0.1915878654,
-0.3348330259,
0.3808291554,
0.2125110328,
0.0180719346,
-0.1169626936,
-0.1210705936,
0.0996207446,
0.1340200156,
-0.1610569358,
-0.3777607679,
-0.0139248036,
0.2444615662,
0.1310233772,
0.1397850066,
-0.2243210226,
0.0565046147,
0.1865109652,
-0.1861601323,
0.0061069764,
0.2705686092,
0.0201206785,
-0.2299533933,
-0.2449502647,
-0.0008151922,
-0.2585434318,
0.1199164093,
0.1637966633,
0.0298893601,
0.1776874512,
0.0702076554,
0.0482570454,
0.0167479329,
-0.2887303829,
0.176068157,
0.0177287832,
-0.2448204756,
-0.4982013106,
0.0225956291,
-0.1001204997,
0.5587284565,
-0.693610549,
-0.0073418207,
-0.4541685581,
0.2404500395,
-0.1954778731,
-0.0072444351,
0.0014594458,
-0.278513968,
-0.0301400032,
0.1731702089,
0.0741409957,
-0.1601119041,
0.0552854724,
0.3070278466,
-0.2037935853,
0.1371226907,
0.2046265304,
0.8623292446,
-0.0597998425,
-0.3136716783,
0.0234495047,
0.0580131784,
0.3383571804,
-0.1843933165,
-0.1994630694,
0.2740377784,
-0.1152108312,
-0.1137012169,
0.2909386158,
-0.0939479321,
-0.3744612336,
0.0598388985,
-0.1998439282,
0.3293919563,
-0.0931628197,
0.3659174442,
-0.2859894633,
-0.0506080911,
0.0342722684,
0.1668292284,
-0.1679095924,
-0.2601919174,
-0.0100642964,
-0.2233889401,
-0.025936652,
-0.0258862879,
0.0280830264,
0.1818680316,
-0.5656912327,
0.1588508785,
0.0670240223,
0.2626859248,
0.11212264,
-0.0408621579,
0.348341167,
0.1353435665,
0.6014816165,
0.2783258855,
0.2870134115,
-0.1728003472,
-0.4035540223,
-0.2081206441,
-0.0747038275,
-0.3570014536,
0.3095753193,
0.4312022626,
0.2041459382,
-0.1900151074,
-0.2005500048,
0.0862456709,
0.2199069262,
-0.1666176021,
-0.3529470563,
-0.1158731431,
-0.1915997416,
-0.0119944513,
0.346324861,
-0.0044016689,
0.1742774397,
-0.0511142984,
-0.0573318005,
-0.1515641659,
0.2218334973,
0.1605650485,
0.043629732,
-0.1091811433,
0.1068405956,
0.1961915642,
-0.0122196367,
0.3635069132,
0.4482749999,
0.3003786206,
0.0266799666,
-0.2349660397,
0.1634911895,
0.2717033625,
0.2000735998,
0.3689023256,
0.2222691178,
-0.0828678757,
-0.29621014,
0.2456640601,
-0.1849714816,
0.2391971201,
0.385158062,
-0.0200758129,
-0.6416813731,
-0.497569114,
0.5110852122,
0.0045209974,
0.0198008269,
0.2292897999,
-0.4414496422,
0.0129967108,
-0.0448415019,
0.0191730931,
0.6361572146,
-0.1764855683,
0.365283221,
-0.0125753693,
0.1191390008,
0.3268482089,
-0.0260469094,
0.0624023117,
-0.1856811047,
-0.0536910817,
0.2275847197,
-0.260628283,
-0.0678400397,
0.2028583139,
0.331707865,
0.188218236,
-0.1313769966,
0.180256784,
0.0128782578,
0.4488946497,
0.0871047005,
-0.2177279592,
-0.092299372,
0.146153003,
-0.3234038353,
0.0433329754,
-0.1008135229,
0.0351993032,
-0.0101292804,
0.0288977399,
-0.2235299945,
0.1035108268,
-0.2309997529,
0.4226004481,
-0.2515104711,
-0.5213245153,
-0.0270562395,
0.0712963045,
-0.5702285171,
-0.0277219899,
-0.0656160712,
0.3650145829,
-0.2758778036,
0.2803943753,
0.3480329514,
-0.2569479048,
0.2451662421,
0.0102143437,
0.1187237203,
0.0089515541,
-0.0229720064,
-0.339600563,
-0.0272118598,
0.3641217649,
0.2775537968,
-0.0798749551,
-0.2256365716,
0.0126861446,
0.0174239725,
-0.0971891731,
0.0363346338,
0.1916296184,
0.0123245791,
0.3834537566,
-0.0301073976,
-0.5099641681,
-0.0553480312,
0.3252411187,
0.2070977986,
-0.2156802863,
0.3971478343,
0.0324987769,
-0.1932038665,
-0.0374404453,
0.2477147132,
0.1495770514,
-0.354518801,
0.178743422,
-0.0600160956,
0.1370621622,
0.193985343,
-0.1866592169,
-0.0886495337,
-0.3123490512,
-0.2700838149,
-0.0955467075,
-0.3872537017,
-0.1503922492,
-0.0366972387,
0.0782169327,
0.0422226712,
-0.1261560023,
-0.0374244377,
0.4340884387,
-0.2102999389,
-0.0549223423,
0.2392008305,
0.0585313737,
-0.0265869889,
-0.2505363822,
0.213855654,
0.004571218,
-0.0561541505,
-0.0516312793,
0.0408311412,
-0.2512096763,
-0.0473775454,
0.1242966652,
-0.0042893616,
-0.120243229,
-0.2368973792,
-0.3456609845,
0.05481169,
-0.2050167024,
0.4311217368,
0.217581749,
0.0157250836,
-0.314042002,
0.3039713204,
0.0252250042,
-0.0269068144,
0.4463456571,
-0.1477808058,
0.2223431468,
0.1358643472,
0.0677682683,
0.287696749,
-0.2494031787,
-0.212869063,
0.0116764475,
0.5909910798,
-0.1453073323,
0.1489435434,
-0.307510823,
0.1673516035,
-0.0027909353,
0.0725505352,
0.3108545542,
0.0135285296,
-0.4140639007,
0.1785520613,
0.0868745744,
0.0393489227,
-0.3019304574,
-0.0945122167,
-0.037134964,
-0.0766191334,
0.133446902,
0.0568922833,
0.2192471623,
-0.130856812,
-0.1306969076,
0.269646436,
0.1258150339,
-0.0478359945,
0.3882276714,
0.2731563449,
-0.1047927588,
0.4876894951,
0.3903228343,
0.2716771662,
0.33557266,
0.10206227,
0.6923545599,
0.1055386513,
-0.0799941793,
0.0108042732,
-0.3727956712,
-0.1548219323,
0.2638239264,
-0.1666506231,
0.1343447566,
-0.1949350536,
0.0091243051,
-0.1912465394,
-0.0653573498,
-0.3557798266,
-0.0264230687,
-0.2079644054,
0.0053797103,
0.1997800767,
0.0551402867,
0.2186173201,
0.3261701167,
-0.3942029476,
-0.1147042587,
-0.0518026203,
0.0310508441,
-0.1218378469,
-0.0492099635,
-0.0098885596,
0.1416735649,
-0.0238094293,
-0.1151937991,
0.0647127032,
-0.0013868324,
-0.0761073381,
0.0374412797,
0.1494816542,
0.2420555949,
0.3533019423,
0.0589095764,
-0.0446694978,
0.1265296936,
-0.0062668882,
-0.1860654354,
0.5170599222,
0.0138471536,
-0.0091508729,
0.1525837481,
0.0038945191,
-0.2196481675,
-0.0569685809,
0.0233474597,
-0.2085931599,
0.0347213484,
0.18918176,
0.151620239,
-0.2049023807,
-0.2619211674,
0.1431288719,
-0.2022103518,
-0.2747009993,
0.3893351555,
-0.2530441284,
-0.0148342177,
-0.007804621,
0.0281694457,
-0.3048426509,
0.9071144462,
0.262347132,
0.3463220894,
-0.3564271927,
0.1867590845,
-0.4191628098,
0.023992639,
-0.5187038779,
0.2021192014,
0.1043008938,
0.2313706875,
-0.0152572989,
0.1377826184,
-0.1181804985,
0.0812143534,
0.0129070692,
-0.2207527161,
-0.2550098896,
-0.0874239728,
-0.1549426168,
0.075203523,
-0.0481374003,
-0.6022773385,
0.3446801901,
-0.0124613531,
-0.0150621682,
-0.2360091805,
0.040871501,
0.1365882009,
0.1809744835,
0.2468440235,
0.1607687175,
0.5449457169,
0.2268920094,
-0.0201756582,
-0.1396602541,
0.0306893364,
-0.1491610408,
0.0218759384,
0.0283088237,
-0.0148980431,
0.0355796888,
-0.0963339433,
0.1079291701,
0.458861351,
-0.0429328308,
-0.2395265102,
-0.0326686315,
-0.3271840811,
-0.0190351307,
0.2352482527,
0.2845639884,
0.2960161269,
-0.0742803216,
-0.1876189113,
-0.2534402013,
-0.1082600653,
0.391623199,
-0.4769769907,
-0.220524013,
-0.2020841092,
0.3011838794,
0.152376622,
0.1260051578,
-0.1114244312,
0.0943019688,
0.1843785346,
-0.0639624,
0.0038856491,
0.3781554997,
-0.2533890605,
0.1732245833,
-0.1296791732,
0.5012322068,
-0.1671090573,
-0.3956727684,
-0.0955532119,
-0.1395307779
] |
https://github.com/huggingface/datasets/issues/2207 | making labels consistent across the datasets | Hi ! The ClassLabel feature type encodes the labels as integers.
The integer corresponds to the index of the label name in the `names` list of the ClassLabel.
Here that means that the labels are 'entailment' (0), 'neutral' (1), 'contradiction' (2).
You can get the label names back by using `a.features['label'].int2str(i)`.
| Hi
For accessing the labels one can type
```
>>> a.features['label']
ClassLabel(num_classes=3, names=['entailment', 'neutral', 'contradiction'], names_file=None, id=None)
```
The labels however are not consistent with the actual labels sometimes, for instance in case of XNLI, the actual labels are 0,1,2, but if one try to access as above they are entailment, neutral,contradiction,
it would be great to have the labels consistent.
thanks
| 51 | making labels consistent across the datasets
Hi
For accessing the labels one can type
```
>>> a.features['label']
ClassLabel(num_classes=3, names=['entailment', 'neutral', 'contradiction'], names_file=None, id=None)
```
The labels however are not consistent with the actual labels sometimes, for instance in case of XNLI, the actual labels are 0,1,2, but if one try to access as above they are entailment, neutral,contradiction,
it would be great to have the labels consistent.
thanks
Hi ! The ClassLabel feature type encodes the labels as integers.
The integer corresponds to the index of the label name in the `names` list of the ClassLabel.
Here that means that the labels are 'entailment' (0), 'neutral' (1), 'contradiction' (2).
You can get the label names back by using `a.features['label'].int2str(i)`.
| [
0.0162606984,
-0.1287367046,
-0.0699901432,
0.4029695392,
0.38271299,
-0.1300279945,
0.4260282815,
0.0234169289,
0.0852747858,
0.2710854113,
-0.2305017412,
0.5326738358,
-0.0153418789,
0.4047868252,
-0.3078928292,
0.0154725965,
-0.1154663712,
0.1015717387,
0.1249584407,
-0.3230444789,
-0.2213252038,
-0.1315992326,
0.0152086914,
0.3348834515,
-0.4379477799,
-0.1416823715,
0.0278724208,
-0.1909615248,
0.0741543174,
-0.4989106059,
0.120887436,
0.3788155913,
0.0031807013,
0.1615451276,
-0.0000959714,
-0.2662476599,
0.1202936769,
0.0277737305,
-0.0765430778,
0.0507423803,
-0.2216127068,
-0.1730418205,
0.0833137706,
-0.4307700098,
-0.2084742486,
0.0238301158,
-0.1198958009,
-0.2397073656,
-0.1590720564,
-0.0710136294,
0.2925275266,
0.0040536821,
0.1289144009,
0.1718682498,
0.4010021091,
-0.0080782957,
0.0416163877,
0.1494406164,
0.3026366532,
0.1290182322,
0.051060386,
0.5405577421,
-0.0356163718,
-0.0622506961,
0.3284757137,
0.1424698532,
0.0399960391,
-0.3465792537,
0.0029802611,
0.4912867248,
0.5845715404,
-0.2494944036,
-0.4491057396,
-0.1393751949,
0.1123989895,
-0.2547761798,
-0.1436603218,
0.0708715916,
0.2149392366,
0.0421060435,
0.0539678149,
-0.0519854203,
-0.2780494094,
0.1498253793,
0.0187886059,
0.4695437551,
0.0171503574,
0.2028819323,
-0.0887358487,
-0.4577321708,
0.0376451947,
-0.0076662526,
0.0038776083,
0.2679309249,
-0.1903162897,
0.0004924387,
-0.1286007911,
0.003397977,
0.0820232853,
0.1513402462,
-0.2002420574,
0.1516587138,
-0.2954201698,
0.1294178367,
0.0067376792,
0.3571248651,
0.5226079226,
0.2573026419,
0.3497830033,
-0.0255382136,
-0.3429966569,
-0.0779769719,
-0.1289375722,
0.1174952835,
0.3556323647,
-0.0392702743,
0.0160166994,
-0.340092361,
-0.3314756751,
0.0508841798,
-0.1754245013,
-0.0531817786,
0.1985357702,
0.2774688303,
0.1758972108,
0.3547520638,
0.1141954511,
-0.0679106265,
-0.129161194,
-0.3238435388,
-0.2257990539,
-0.0322755724,
-0.0664252043,
-0.1721472442,
-0.0451964401,
0.205771625,
0.2654463351,
-0.1270954311,
0.0177975297,
-0.1221841872,
-0.0213276371,
-0.1247067302,
0.0130715929,
-0.1685444862,
-0.3194270134,
0.043833293,
0.0006258488,
-0.110830158,
-0.2505710423,
-0.2797503769,
-0.2588027716,
0.0304973647,
0.2304796576,
0.3659616709,
0.1701173633,
-0.108010754,
0.3435680866,
0.1185833961,
-0.1111152917,
-0.1016413495,
0.1304859519,
-0.3175900578,
0.1881763041,
-0.1673261225,
-0.06163802,
0.0561992638,
-0.3011077642,
-0.1929348558,
0.3234795928,
-0.1957868189,
-0.1605424285,
0.0398119614,
-0.0043440983,
-0.1616311818,
-0.0097830929,
0.0813340694,
0.4260672033,
-0.4890017807,
-0.3455291986,
-0.2151808292,
0.1158951521,
-0.1208520532,
0.2246495336,
0.4517966807,
0.092608735,
0.0097812228,
0.1628989726,
0.0739812329,
0.1442050785,
-0.0268068723,
-0.1295725852,
-0.0836473703,
0.0303372331,
0.1009498984,
-0.2006151825,
-0.2347718179,
0.1300801784,
-0.0363648012,
0.2824647129,
-0.4692777693,
0.0849545524,
0.109482117,
0.400246799,
0.2273933142,
-0.0841677636,
-0.2679442465,
-0.2897004783,
0.241454646,
-0.073749356,
0.25317505,
0.2952412367,
-0.417650044,
-0.0334188044,
-0.1140946597,
-0.2889355123,
-0.0800451338,
0.3252173066,
0.3039770126,
-0.1158040464,
-0.0696706995,
-0.1151362062,
-0.0504069999,
-0.180147633,
0.0385651886,
-0.1042991728,
-0.1267311275,
0.0450598672,
0.172813639,
-0.1324344873,
0.4198817015,
0.2545402348,
0.0150634609,
-0.0720478371,
0.2207141668,
0.2466809005,
-0.1987176239,
0.0628406405,
0.3595347404,
0.2418501526,
-0.2225043625,
0.0442401469,
0.101080209,
0.1455690563,
0.1002047807,
-0.1473450959,
0.5054873228,
-0.0140541568,
0.0740432739,
0.0558411032,
0.0776267871,
0.2117097378,
-0.0607621893,
-0.3135553896,
-0.1297811717,
0.0235369019,
-0.0802811459,
0.089164257,
0.1970623583,
-0.6030903459,
0.5452008247,
0.6344431639,
0.0285054669,
0.1303447485,
-0.2016640157,
-0.2598125637,
0.2631833851,
0.1378864795,
0.1743700206,
-0.0918093175,
0.3492026329,
0.0007842006,
-0.1269413531,
-0.2725158036,
-0.0351663753,
0.0328107588,
-0.1560474932,
0.123380363,
-0.066625461,
0.1052387431,
-0.1327949166,
0.0184838474,
-0.4001693726,
-0.1800197661,
-0.0406783819,
-0.3130125999,
0.1659744382,
-0.1016382575,
-0.2682480216,
-0.3333457112,
-0.4044160545,
-0.376696974,
-0.4287505448,
0.0814474449,
-0.0757481009,
-0.2525370121,
0.2243504673,
-0.0716919079,
0.2579427361,
0.0325992033,
-0.0418783575,
0.2593670487,
-0.4869864285,
-0.4448615015,
0.1094457582,
-0.0474652201,
0.0781193078,
0.2551840544,
-0.1009773836,
0.1930417269,
-0.0853100345,
-0.4455028176,
-0.0569376722,
-0.1742358059,
0.1128999889,
0.1211116612,
-0.0299217738,
0.0745405182,
0.0304518975,
0.1996333152,
-0.1402626038,
0.0097624734,
-0.0211203322,
-0.0075492337,
-0.3436496854,
-0.0661105439,
-0.6197525859,
-0.3925736248,
-0.2936832905,
0.0688279867,
-0.098079823,
0.0955123454,
0.0604061671,
-0.2549694479,
0.053675063,
0.0824274123,
0.5573019385,
-0.296551615,
-0.1041307226,
0.1520815492,
-0.1441335976,
-0.1998025924,
0.0779303759,
-0.0933243558,
0.1299969256,
-0.0859044269,
0.0182627887,
-0.3870120645,
-0.0960187539,
0.25078547,
0.1855876148,
0.2257486284,
0.0180492103,
0.2406853437,
-0.1593568772,
-0.1146707386,
-0.1340187192,
0.3696860373,
0.0592278838,
0.2220905274,
0.0443477184,
-0.1700185835,
-0.2130916715,
0.0299034752,
0.1449424624,
-0.130763188,
0.0554134324,
-0.0990674198,
0.1191021204,
0.2825279236,
-0.0518532284,
0.0531480536,
0.0907540396,
-0.0187694915,
0.1328072846,
-0.1242526323,
-0.1352365315,
-0.1660632938,
0.0671979189,
-0.1685390472,
-0.2314543575,
-0.0948909819,
0.1498995721,
0.0634467453,
-0.0005064756,
0.1474649906,
-0.1570694745,
-0.1121990755,
0.0188879855,
-0.0085744001,
-0.30101794,
0.0863817334,
-0.6687079072,
-0.370092541,
0.1302806288,
0.3246811032,
0.1557055414,
0.0092281811,
0.1074410975,
-0.1605981588,
0.0526585169,
0.1092471182,
0.3452025056,
-0.1231958047,
0.0597348101,
0.1564567536,
-0.0374143682,
-0.1318469197,
-0.0317305066,
-0.340736866,
-0.4124087095,
0.2561508119,
0.1757475585,
-0.4678800702,
-0.1738601327,
0.0322064869,
0.041783601,
-0.3526408672,
0.1511855423,
0.0165687203,
0.1702746004,
-0.106352672,
-0.1102938727,
-0.2012551129,
0.2618976235,
-0.3011192679,
0.1390097737,
-0.110060297,
0.1207370833,
0.3727039993,
0.5779052377,
0.4539881945,
-0.0533268787,
-0.1763791293,
0.1368281841,
0.372543633,
0.1078228503,
0.5516908765,
-0.3065677285,
-0.3936002553,
-0.1471505761,
-0.3717605472,
0.4085088372,
0.2649823427,
0.2347199023,
-0.0482177809,
-0.4544081688,
-0.0339653715,
-0.1824529618,
0.0902629718,
0.0834135339,
0.2831938565,
-0.1005500481,
-0.3547978699,
0.4368869066,
-0.0167229585,
-0.203084141,
-0.0688426644,
0.3948053122,
-0.3977598846,
0.2816140354,
0.3006324172,
0.8588835001,
0.1709464192,
0.2171096355,
0.1895437837,
-0.0330889225,
0.7430713177,
0.0384733826,
0.295150727,
-0.3186832666,
-0.1728601605,
0.0220725983,
0.1678132266,
-0.2842458189,
0.1117520779,
-0.0204856172,
0.5322529674,
-0.0484970286,
-0.0407955833,
-0.2019555271,
0.0385864526,
0.1554113775,
-0.0493459851,
-0.0613514073,
0.1877093464,
-0.2476739883,
0.0227984618,
-0.0917989612,
-0.1111849621,
-0.2335605919,
0.0792325959,
0.150527969,
-0.0150572881,
0.1452061981,
0.0287629552,
0.0681326836,
0.0846669078,
-0.2142508626,
-0.0143812653,
0.4202454984,
0.1051280871,
-0.122886233,
-0.0165365189,
0.2023113072,
0.3643655777,
-0.0171935335,
0.0700296164,
0.5418530703,
0.1744166613,
-0.3010489941,
0.1652932018,
0.1161206663,
0.0518670976,
-0.3705790937,
-0.2109764665,
-0.0270457231,
-0.1738398671,
0.1271543652,
0.1300361156,
-0.0139373317,
-0.1672595739,
0.2107219994,
-0.0289875604,
-0.221691072,
0.1587174237,
0.3067653179,
-0.1029678211,
-0.0033233766,
-0.0494809449,
0.0802807957,
0.2584993243,
0.1753509343,
-0.06182364,
-0.1246364564,
-0.1845169961,
0.0350930914,
0.3228170276,
-0.1774903238,
0.0141989663,
-0.0346613303,
-0.2759724855,
0.0370594524,
0.3660197854,
0.1767404526,
0.4073539376,
-0.1362541169,
-0.3346793056,
-0.294062674,
0.2053042054,
0.1035846695,
0.5411198139,
-0.1021243855,
0.0035158917,
-0.0846883059,
0.0362082645,
-0.4692043364,
-0.1788293421,
-0.2643844187,
0.0300264992,
0.2223576456,
0.1943108439,
-0.0616187192,
0.1931776702,
0.1847542077,
-0.100361079,
-0.0763818026,
-0.2584417462,
-0.2580341399,
0.0372572094,
-0.0724826157,
0.2678270936,
-0.1898682415,
-0.2380987704,
0.3634141982,
-0.2672346532,
0.0849273354,
0.0334907472,
0.0160589106,
0.669937551,
-0.2746173739,
0.1906252354,
-0.0161331743,
0.2923659682,
0.20166713,
-0.2945486009,
0.2462826818,
0.0245089754,
-0.2802990973,
-0.0878336728,
-0.0912395865,
0.1401889473,
-0.1739383489,
0.08009547,
-0.1157908142,
-0.0404332727,
0.2326635122,
0.3198108971,
0.1912132204,
0.2833020687,
-0.0796790272,
-0.113538295,
0.0008900538,
0.4026627839,
-0.2881116271,
-0.1653478593,
-0.0160357617,
-0.0607310347,
0.1993918568,
0.3537396193,
0.1719892919,
0.1471733153,
0.0368239991,
-0.116924122,
0.1564724743,
-0.1589808464,
0.1727954447,
0.22960639,
-0.0663468167,
0.0153558422,
0.5013180375,
0.1384326518,
0.1989767998,
0.3526782691,
0.066998221,
0.2979581654,
0.0530522801,
0.0318401083,
0.1548146158,
0.2173387259,
-0.0670627505,
0.1344041824,
-0.1077986062,
0.1149798632,
-0.0083513297,
-0.1065092236,
-0.3142517507,
-0.4529086351,
0.0083611608,
0.2475610375,
-0.1106024683,
-0.2584576905,
-0.3169409633,
-0.3145022392,
0.029548794,
-0.2020741999,
0.020411551,
-0.1642257124,
0.2425478995,
0.0104019158,
0.0582942218,
-0.6072797179,
-0.1158909947,
0.2009640634,
0.4825263321,
-0.0470444784,
-0.0451541096,
0.2541635633,
-0.1045297608,
0.2959364057,
0.1769168079,
-0.0101825446,
0.1673233658,
-0.0632341355,
-0.0442410223,
-0.1472975612,
-0.2732389867,
-0.0197549611,
-0.2685240805,
0.0655191466,
-0.2591525614,
0.427343756,
0.1967945248,
-0.1959592104,
0.2888393104,
-0.2689488828,
0.2470980883,
-0.0967145786,
0.3938009441,
0.2482174337,
-0.0834992081,
-0.1637673229,
-0.2074745595,
-0.4189086258,
-0.0337539129,
0.1735800803,
0.119016178,
0.3294916451,
-0.2304529995,
0.1744327843,
0.0467710234,
0.1016180068,
0.0656000674,
-0.1012199968,
-0.0420513339,
0.1775425375,
-0.596978426,
0.0986253321,
0.1457091421,
-0.4883114696,
-0.0039017126,
0.0689069182,
0.0076402724,
-0.3794308305,
0.2487163842,
-0.1756595075,
0.3450990915,
-0.1183805913,
-0.5937591195,
-0.1662165076,
0.1165787578,
-0.0916213244,
0.1675553173,
-0.1217336357,
-0.0188312121,
-0.2435669154,
0.1032894328,
0.0916007608,
0.2222185433,
0.1852479428,
0.2197617143,
0.0975193903,
0.0069887806,
0.3506557345,
0.0557343289,
0.0438974872,
-0.0433493666,
-0.0668634623,
-0.2903592587,
0.0402560532,
0.0220583342,
0.4526717961,
-0.0101345852,
0.1919435263,
-0.1298296154,
0.0125701763,
0.1213475466,
-0.2020455599,
-0.088204354,
0.2974076867,
-0.0348800719,
-0.2018260658,
0.2351928651,
0.3749946654,
0.1204511374,
0.0227133557,
0.0916109085,
-0.3557884693,
0.4579105675,
-0.0742051825,
-0.2912689447,
0.0117486157,
0.2051739395,
0.2138846815,
-0.0128115769,
-0.4568784833,
0.0492446721,
0.3367868662,
-0.1434979141,
-0.4387977719,
0.1279620081,
0.130661726,
0.0891050324,
-0.1594521552,
0.004114233,
0.1579317898,
0.054366149,
-0.141968146,
-0.1255167127
] |
https://github.com/huggingface/datasets/issues/2206 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer | Hi,
the output of the tokenizers is treated specially in the lib to optimize the dataset size (see the code [here](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L138-L141)). It looks like that one of the values in a dictionary returned by the tokenizer is out of the assumed range.
Can you please provide a minimal reproducible example for more help? | I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it? | 53 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
Hi,
the output of the tokenizers is treated specially in the lib to optimize the dataset size (see the code [here](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L138-L141)). It looks like that one of the values in a dictionary returned by the tokenizer is out of the assumed range.
Can you please provide a minimal reproducible example for more help? | [
-0.2338279635,
0.2921873927,
-0.0588287897,
0.0690966845,
0.2734427452,
-0.0860713571,
0.1836447716,
0.3055639565,
-0.5368506908,
-0.1932197958,
-0.0461709909,
0.4354701638,
-0.0010597073,
-0.2381743193,
0.2536686659,
-0.0995297357,
0.0430258997,
0.2507618666,
0.2605475783,
0.1317313313,
-0.0321430638,
0.1118263975,
-0.1489618719,
0.5977950096,
-0.3350471854,
-0.1270228177,
0.0943688005,
0.0601610988,
-0.0006359704,
-0.7611907125,
0.0361961126,
0.0767361075,
0.2579457462,
0.1267629117,
-0.000113376,
0.082067363,
0.3061079681,
0.0346665084,
-0.0352177098,
0.0471047461,
0.1980306953,
-0.0341247842,
0.2838693857,
-0.244741261,
0.0418413952,
-1.0216341019,
-0.0920636579,
0.1748208404,
0.4970360994,
0.2085004449,
0.2248862386,
0.2016522139,
0.4208301902,
0.0445981249,
0.4089099467,
0.0463490784,
0.1187576726,
0.2101747841,
0.0648389012,
-0.0744948462,
-0.0082716197,
-0.1188546792,
-0.3061369359,
0.2222593725,
0.081986405,
0.042217616,
-0.0128982961,
-0.0767087415,
-0.0784934685,
-0.0311291032,
0.4616257846,
-0.4693734348,
-0.1958954334,
-0.0923199803,
0.0183172189,
-0.4163800478,
0.1107919812,
0.1142619327,
-0.217158854,
0.0793025568,
0.1194191277,
-0.0217524301,
-0.2067582607,
0.1848449409,
-0.0662418157,
0.3541363478,
0.0308772698,
0.2433266193,
-0.0098534282,
0.0171072017,
0.2675459087,
0.1362326741,
-0.2063655555,
0.3336638212,
-0.3007290661,
0.0695282966,
-0.0275457613,
-0.2159134746,
0.1306024641,
0.1748593748,
0.1709087491,
0.1044648737,
0.1628208905,
0.0762211233,
-0.1299580932,
0.1835835129,
-0.1627521217,
0.232552588,
0.158568114,
-0.3149084747,
0.0370782092,
-0.1459878683,
-0.3320125937,
-0.2384872288,
0.3329925239,
0.1477690488,
0.3388663828,
-0.0093660727,
-0.1467919946,
0.0947749242,
-0.4526156187,
-0.1450778544,
0.0061006509,
0.245531112,
0.2182272971,
-0.2271979451,
-0.1537814736,
0.2055500001,
-0.1003332362,
-0.2328758538,
-0.1099832505,
-0.0415038392,
-0.0182201937,
0.1874150932,
0.2010737956,
0.0286403261,
0.2526600063,
0.1917856187,
-0.0618625879,
0.0152934939,
0.3261605799,
-0.1774684638,
0.0058482811,
0.3535847664,
0.0630945861,
0.3427802324,
0.0158787742,
-0.0727055445,
-0.0357824862,
0.2693836689,
-0.3565319479,
-0.4401062429,
-0.2793909907,
0.1600382179,
-0.1012902111,
0.0013679112,
-0.2858618498,
-0.0320907533,
0.4216962159,
-0.3251369596,
-0.1027347818,
-0.3298664987,
0.0337793082,
-0.3652558923,
0.3561749458,
-0.0902504027,
-0.5666177869,
0.1339235902,
-0.022986928,
-0.1644709855,
0.1516379118,
0.3593239486,
-0.379689455,
0.6116588116,
-0.3605374396,
0.6695793867,
0.2312916368,
-0.0378581546,
-0.2667086422,
-0.1009034812,
-0.109261483,
0.0314188972,
-0.1686671674,
-0.1111756265,
0.1504588276,
-0.0762142837,
-0.1399542987,
0.0632125288,
0.02883601,
0.0341262519,
-0.1693430245,
-0.09713687,
0.2992922664,
0.1167515665,
0.0325559229,
-0.1318497658,
0.0156451389,
-0.2472017705,
0.0563443154,
-0.3048325181,
0.1351846755,
0.0759488046,
0.2232840359,
-0.0552591868,
0.0894768238,
-0.1198256016,
-0.2498252094,
0.0050442964,
-0.5045517683,
-0.0529681891,
-0.3933265209,
-0.0097886845,
-0.2112289071,
0.088016279,
-0.1989301592,
0.1071836427,
0.1984063387,
0.1060437113,
0.0044009686,
0.1505634338,
0.0360574946,
-0.1274576336,
0.1176426485,
0.1194810718,
0.0944705755,
0.2554817796,
-0.2053659707,
-0.6145573854,
0.1276678145,
-0.0362823829,
0.2126548737,
-0.0232843403,
-0.0731339976,
0.2727455795,
-0.1284492165,
0.0718915612,
-0.2981532216,
0.074324429,
0.02668407,
-0.4504473507,
-0.1293709129,
-0.0512203909,
0.115185149,
-0.0185075477,
0.4564298391,
0.3656796217,
0.2342092097,
-0.0699913427,
-0.1562938243,
-0.2149703801,
0.2021133304,
0.0326521099,
0.2847647965,
0.1573238224,
0.0747533739,
0.3221540153,
0.1628094316,
-0.003715191,
-0.0672149211,
0.1072629839,
0.3034688234,
-0.1084507406,
0.0763665736,
0.0472968258,
-0.1052674875,
-0.100928463,
0.0544266775,
-0.429697156,
0.2058743238,
0.1628007591,
-0.3397502303,
0.013967501,
-0.0733784586,
-0.1370283812,
0.1553959846,
0.0631726608,
0.3842324615,
0.3814519346,
0.2945332229,
0.0729724914,
-0.1637675762,
0.0170359462,
0.226565823,
0.3600273728,
-0.4554608166,
-0.0783179998,
-0.1630182415,
-0.0508481786,
0.1702333242,
-0.3216292858,
-0.0486305207,
-0.1523304433,
0.0268299915,
0.0864848644,
-0.0517295301,
0.2023842335,
0.0673772171,
0.0459717214,
0.1958208084,
-0.023161184,
-0.3977651596,
-0.2804782093,
-0.2186537832,
0.0824888647,
0.3015551567,
0.0403779522,
0.2039325982,
0.2374727726,
0.0278314054,
-0.1771772057,
-0.3392224908,
0.0429517552,
-0.0736972094,
0.2346138209,
0.0524715073,
-0.031172175,
-0.080389373,
-0.4751780033,
0.2225090116,
-0.2364712954,
-0.2954795361,
0.1646380126,
-0.1729841977,
-0.0004738234,
-0.0085445121,
-0.0560010485,
-0.2244292051,
-0.1134304777,
0.1282333434,
0.0839182734,
0.1651002169,
-0.2448324263,
-0.0034249537,
0.1738711894,
-0.2032907754,
-0.1970702559,
-0.1134401783,
0.0453670919,
0.3519806564,
-0.1946185231,
-0.2235365808,
-0.1290648878,
-0.0890227407,
0.3335036635,
0.1064959466,
-0.2684745193,
0.1366404593,
-0.0324389711,
0.4266344309,
-0.3216073513,
-0.3929837942,
0.3826550841,
0.0959024876,
-0.1160591021,
0.0203607976,
-0.0092447922,
0.0358993933,
-0.1952967346,
-0.1222010106,
-0.0495729707,
0.3201514781,
-0.1264337599,
0.8966099024,
-0.2778320611,
-0.1123259664,
0.4765629172,
-0.0585325509,
-0.0492790267,
-0.1197140962,
-0.1173319817,
-0.1053836867,
-0.1219812259,
0.1585760713,
0.0415134951,
-0.3985213637,
-0.3152046204,
0.1176416874,
-0.0033435524,
-0.4849434495,
-0.1623240858,
0.0248302836,
-0.0060156104,
0.3399603069,
0.0808943287,
-0.1960049421,
-0.2349726707,
-0.1044548154,
0.1002519876,
-0.096442759,
0.1460984647,
-0.0823537558,
-0.6153333187,
-0.0263252333,
-0.3447530866,
0.3508984149,
0.2303438783,
0.278773278,
-0.0252002925,
0.0546589643,
0.1554450393,
-0.2645350695,
0.3481029868,
0.0460807458,
-0.079312779,
0.3778903484,
0.0673650354,
-0.4065202475,
-0.2591385245,
-0.1735210866,
0.2162075937,
0.1735275984,
0.2088101655,
-0.3339240253,
-0.1532549262,
0.1459284574,
0.0317489058,
-0.0758194923,
-0.1607362777,
-0.242378816,
-0.3862482309,
-0.2752544284,
0.0777347758,
0.0905972868,
0.2722554803,
-0.1924264133,
-0.0251265243,
-0.1741384566,
-0.1011119038,
-0.135707438,
-0.0230221562,
0.2261855602,
-0.0508403182,
0.0109644085,
0.0407163836,
-0.0713442415,
0.5171349049,
-0.0105130393,
0.6572526097,
-0.3270744383,
0.014612861,
0.0358018912,
0.3106366992,
-0.1036952138,
-0.2722660303,
0.4553169906,
-0.2256216109,
0.088626951,
0.0143844262,
0.2432909161,
0.3678916693,
-0.2389952391,
-0.3546925783,
-0.0285970084,
0.2601582408,
0.0681472868,
-0.1354560405,
0.3313288987,
-0.1181411073,
-0.3191923499,
0.3394185305,
0.2960070372,
0.7895689607,
-0.1261406243,
0.1547690034,
0.5485853553,
-0.2694839239,
0.334536612,
-0.1798015833,
0.0359759293,
-0.4415816665,
-0.0063236579,
0.0751747265,
-0.3206636012,
0.0590694882,
0.1349458545,
-0.1340191066,
-0.1622875184,
-0.1321254373,
0.3438937068,
0.3400494456,
0.3328997791,
0.1474962234,
-0.0178196058,
0.0948305428,
0.1308039278,
-0.404694289,
-0.134108007,
-0.2259294093,
-0.1723212004,
-0.0335795358,
-0.1221875101,
-0.1576713622,
0.0173197389,
-0.4561392665,
0.3478038311,
0.0849165767,
-0.3162206411,
0.1610311568,
-0.0474383533,
0.1019051746,
0.1037967801,
-0.1716718078,
0.1528246254,
-0.0826575309,
-0.1429954767,
-0.2142307162,
-0.2495845258,
0.0375231802,
-0.0866125897,
-0.2825960517,
0.4322397709,
-0.1139802635,
-0.2102707326,
-0.1728675067,
0.0125370938,
0.3119153976,
-0.2836611271,
0.202678144,
-0.2300823927,
0.0316062421,
-0.1942098439,
0.1211950034,
0.0395353809,
-0.03126809,
0.0140523575,
-0.2241230309,
-0.0533770919,
-0.0647388697,
0.10199783,
0.1302527189,
0.071900785,
0.8524983525,
-0.0117236078,
-0.0161465555,
-0.1319328696,
-0.0278517082,
0.1447283775,
-0.6926693916,
0.2088909298,
0.1893457323,
0.1745975018,
-0.0362518951,
0.214440003,
-0.0601532012,
0.1539873183,
0.1137558967,
-0.2568929493,
-0.3925018311,
0.1009483635,
-0.0155634694,
0.1732780486,
0.2280417383,
0.4849218428,
-0.2576970458,
0.2441183031,
-0.2813732028,
0.2138566077,
-0.1269192696,
0.1881318092,
-0.3539939821,
-0.2457782179,
-0.2418731004,
0.1209030449,
0.1827505678,
0.2270849794,
-0.0880004242,
-0.2621852458,
-0.0628425553,
0.1547939479,
0.1043957695,
-0.4758486152,
0.1384588182,
-0.0776493028,
0.0856481344,
0.0443278886,
0.141410619,
0.0083139166,
-0.0238953084,
-0.0294427127,
0.6121737957,
0.0333852544,
-0.1780308187,
0.1745882481,
-0.3252796829,
-0.0355583839,
0.094031021,
0.4215205908,
-0.0784160942,
0.0408307537,
0.0782188773,
0.0332823023,
0.2658987939,
-0.106800884,
0.1057714969,
-0.5149431229,
-0.333725214,
-0.2798565626,
0.2233314663,
0.0947138444,
-0.3138941824,
-0.2480107099,
0.2871522009,
0.2126104981,
-0.2153726816,
-0.0119206198,
0.1517177522,
-0.0533142537,
-0.2499146014,
-0.0180369616,
0.3401539326,
-0.1459797621,
0.0140544958,
0.0499459878,
0.5240613818,
0.1642273068,
-0.1419706792,
0.0678369254,
-0.1499076337,
-0.1343794912,
0.3621260226,
0.0754974782,
0.0589414276,
0.0791230872,
-0.2144825161,
0.1044683084,
0.2081273198,
0.1839294732,
0.0116760079,
-0.4132243991,
-0.2656543255,
0.2523524165,
0.0547423102,
-0.0737466663,
-0.0049851388,
0.3377450705,
0.6447911859,
-0.142298162,
-0.096844703,
0.5756680369,
-0.2329217046,
0.0020322464,
-0.3756767213,
-0.1465899348,
0.0745915473,
-0.0359974802,
-0.1046380699,
-0.1838692129,
-0.018551223,
0.2249234468,
-0.3663145304,
-0.32762748,
0.5081477165,
0.2541376054,
-0.084761031,
-0.1901150942,
0.3602638841,
0.1809311211,
-0.2443730533,
0.021939151,
0.416636914,
0.6981303096,
0.3844660819,
-0.2621093392,
0.0661905408,
-0.1517233551,
0.1134635285,
0.100722,
0.2648783624,
0.3564857841,
0.199669078,
0.0850160122,
0.1405354589,
-0.1578916609,
-0.2345959693,
0.3939754069,
0.0582140349,
-0.0315158553,
-0.0618404858,
-0.2130904496,
-0.4125779271,
0.0771785602,
0.2182447165,
-0.0915771797,
0.2303872406,
0.3385387361,
0.0952062905,
-0.0094058551,
-0.0438190587,
0.0980003029,
-0.1631916761,
0.5890396833,
0.3657805026,
0.2943977416,
-0.472666055,
-0.4595134854,
-0.4318796992,
0.4607590139,
-0.1200265288,
0.132616356,
0.2335555404,
0.1743253171,
0.0586352348,
0.0616113357,
0.1084997356,
0.4466972649,
-0.2370325327,
0.265786767,
-0.3800933659,
0.4180730283,
0.0149969636,
-0.0360371843,
-0.1832067668,
-0.2183642983,
0.3100323677,
-0.2936551273,
0.1718758941,
-0.1804481298,
-0.1550520658,
0.2990252674,
0.177846089,
0.5840935707,
0.0202658903,
0.3855085671,
0.0433582067,
0.3265525401,
-0.0895395279,
-0.3381976783,
-0.192140013,
0.3090173304,
-0.0329326764,
0.1928830445,
0.1407831311,
0.0347656682,
-0.3030676246,
0.0247733146,
-0.2038730532,
0.1529370248,
-0.1174187884,
0.125608027,
-0.1389213502,
-0.0102255158,
-0.0201864988,
-0.1073682606,
0.1551192999,
0.3255605996,
-0.5399785042,
-0.3889175355,
0.5106248856,
-0.3500752151,
-0.1078939065,
0.0033393763,
0.1297105104,
0.1302660108,
-0.0042219702,
-0.1421426833,
-0.0585343242,
0.7115311623,
-0.0309066381,
-0.2054664344,
0.3008841276,
0.083345592,
0.0646687299,
-0.0842686445,
0.2101774216,
0.0909493715,
-0.1234652847,
-0.2370409667,
-0.2266750783
] |
https://github.com/huggingface/datasets/issues/2206 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer | Hi @yana-xuyan, thanks for reporting.
As clearly @mariosasko explained, `datasets` performs some optimizations in order to reduce the size of the dataset cache files. And one of them is storing the field `special_tokens_mask` as `int8`, which means that this field can only contain integers between `-128` to `127`. As your message error states, one of the values of this field is `50259`, and therefore it cannot be stored as an `int8`.
Maybe we could implement a way to disable this optimization and allow using any integer value; although the size of the cache files would be much larger. | I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it? | 98 | Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
Hi @yana-xuyan, thanks for reporting.
As clearly @mariosasko explained, `datasets` performs some optimizations in order to reduce the size of the dataset cache files. And one of them is storing the field `special_tokens_mask` as `int8`, which means that this field can only contain integers between `-128` to `127`. As your message error states, one of the values of this field is `50259`, and therefore it cannot be stored as an `int8`.
Maybe we could implement a way to disable this optimization and allow using any integer value; although the size of the cache files would be much larger. | [
-0.2338279635,
0.2921873927,
-0.0588287897,
0.0690966845,
0.2734427452,
-0.0860713571,
0.1836447716,
0.3055639565,
-0.5368506908,
-0.1932197958,
-0.0461709909,
0.4354701638,
-0.0010597073,
-0.2381743193,
0.2536686659,
-0.0995297357,
0.0430258997,
0.2507618666,
0.2605475783,
0.1317313313,
-0.0321430638,
0.1118263975,
-0.1489618719,
0.5977950096,
-0.3350471854,
-0.1270228177,
0.0943688005,
0.0601610988,
-0.0006359704,
-0.7611907125,
0.0361961126,
0.0767361075,
0.2579457462,
0.1267629117,
-0.000113376,
0.082067363,
0.3061079681,
0.0346665084,
-0.0352177098,
0.0471047461,
0.1980306953,
-0.0341247842,
0.2838693857,
-0.244741261,
0.0418413952,
-1.0216341019,
-0.0920636579,
0.1748208404,
0.4970360994,
0.2085004449,
0.2248862386,
0.2016522139,
0.4208301902,
0.0445981249,
0.4089099467,
0.0463490784,
0.1187576726,
0.2101747841,
0.0648389012,
-0.0744948462,
-0.0082716197,
-0.1188546792,
-0.3061369359,
0.2222593725,
0.081986405,
0.042217616,
-0.0128982961,
-0.0767087415,
-0.0784934685,
-0.0311291032,
0.4616257846,
-0.4693734348,
-0.1958954334,
-0.0923199803,
0.0183172189,
-0.4163800478,
0.1107919812,
0.1142619327,
-0.217158854,
0.0793025568,
0.1194191277,
-0.0217524301,
-0.2067582607,
0.1848449409,
-0.0662418157,
0.3541363478,
0.0308772698,
0.2433266193,
-0.0098534282,
0.0171072017,
0.2675459087,
0.1362326741,
-0.2063655555,
0.3336638212,
-0.3007290661,
0.0695282966,
-0.0275457613,
-0.2159134746,
0.1306024641,
0.1748593748,
0.1709087491,
0.1044648737,
0.1628208905,
0.0762211233,
-0.1299580932,
0.1835835129,
-0.1627521217,
0.232552588,
0.158568114,
-0.3149084747,
0.0370782092,
-0.1459878683,
-0.3320125937,
-0.2384872288,
0.3329925239,
0.1477690488,
0.3388663828,
-0.0093660727,
-0.1467919946,
0.0947749242,
-0.4526156187,
-0.1450778544,
0.0061006509,
0.245531112,
0.2182272971,
-0.2271979451,
-0.1537814736,
0.2055500001,
-0.1003332362,
-0.2328758538,
-0.1099832505,
-0.0415038392,
-0.0182201937,
0.1874150932,
0.2010737956,
0.0286403261,
0.2526600063,
0.1917856187,
-0.0618625879,
0.0152934939,
0.3261605799,
-0.1774684638,
0.0058482811,
0.3535847664,
0.0630945861,
0.3427802324,
0.0158787742,
-0.0727055445,
-0.0357824862,
0.2693836689,
-0.3565319479,
-0.4401062429,
-0.2793909907,
0.1600382179,
-0.1012902111,
0.0013679112,
-0.2858618498,
-0.0320907533,
0.4216962159,
-0.3251369596,
-0.1027347818,
-0.3298664987,
0.0337793082,
-0.3652558923,
0.3561749458,
-0.0902504027,
-0.5666177869,
0.1339235902,
-0.022986928,
-0.1644709855,
0.1516379118,
0.3593239486,
-0.379689455,
0.6116588116,
-0.3605374396,
0.6695793867,
0.2312916368,
-0.0378581546,
-0.2667086422,
-0.1009034812,
-0.109261483,
0.0314188972,
-0.1686671674,
-0.1111756265,
0.1504588276,
-0.0762142837,
-0.1399542987,
0.0632125288,
0.02883601,
0.0341262519,
-0.1693430245,
-0.09713687,
0.2992922664,
0.1167515665,
0.0325559229,
-0.1318497658,
0.0156451389,
-0.2472017705,
0.0563443154,
-0.3048325181,
0.1351846755,
0.0759488046,
0.2232840359,
-0.0552591868,
0.0894768238,
-0.1198256016,
-0.2498252094,
0.0050442964,
-0.5045517683,
-0.0529681891,
-0.3933265209,
-0.0097886845,
-0.2112289071,
0.088016279,
-0.1989301592,
0.1071836427,
0.1984063387,
0.1060437113,
0.0044009686,
0.1505634338,
0.0360574946,
-0.1274576336,
0.1176426485,
0.1194810718,
0.0944705755,
0.2554817796,
-0.2053659707,
-0.6145573854,
0.1276678145,
-0.0362823829,
0.2126548737,
-0.0232843403,
-0.0731339976,
0.2727455795,
-0.1284492165,
0.0718915612,
-0.2981532216,
0.074324429,
0.02668407,
-0.4504473507,
-0.1293709129,
-0.0512203909,
0.115185149,
-0.0185075477,
0.4564298391,
0.3656796217,
0.2342092097,
-0.0699913427,
-0.1562938243,
-0.2149703801,
0.2021133304,
0.0326521099,
0.2847647965,
0.1573238224,
0.0747533739,
0.3221540153,
0.1628094316,
-0.003715191,
-0.0672149211,
0.1072629839,
0.3034688234,
-0.1084507406,
0.0763665736,
0.0472968258,
-0.1052674875,
-0.100928463,
0.0544266775,
-0.429697156,
0.2058743238,
0.1628007591,
-0.3397502303,
0.013967501,
-0.0733784586,
-0.1370283812,
0.1553959846,
0.0631726608,
0.3842324615,
0.3814519346,
0.2945332229,
0.0729724914,
-0.1637675762,
0.0170359462,
0.226565823,
0.3600273728,
-0.4554608166,
-0.0783179998,
-0.1630182415,
-0.0508481786,
0.1702333242,
-0.3216292858,
-0.0486305207,
-0.1523304433,
0.0268299915,
0.0864848644,
-0.0517295301,
0.2023842335,
0.0673772171,
0.0459717214,
0.1958208084,
-0.023161184,
-0.3977651596,
-0.2804782093,
-0.2186537832,
0.0824888647,
0.3015551567,
0.0403779522,
0.2039325982,
0.2374727726,
0.0278314054,
-0.1771772057,
-0.3392224908,
0.0429517552,
-0.0736972094,
0.2346138209,
0.0524715073,
-0.031172175,
-0.080389373,
-0.4751780033,
0.2225090116,
-0.2364712954,
-0.2954795361,
0.1646380126,
-0.1729841977,
-0.0004738234,
-0.0085445121,
-0.0560010485,
-0.2244292051,
-0.1134304777,
0.1282333434,
0.0839182734,
0.1651002169,
-0.2448324263,
-0.0034249537,
0.1738711894,
-0.2032907754,
-0.1970702559,
-0.1134401783,
0.0453670919,
0.3519806564,
-0.1946185231,
-0.2235365808,
-0.1290648878,
-0.0890227407,
0.3335036635,
0.1064959466,
-0.2684745193,
0.1366404593,
-0.0324389711,
0.4266344309,
-0.3216073513,
-0.3929837942,
0.3826550841,
0.0959024876,
-0.1160591021,
0.0203607976,
-0.0092447922,
0.0358993933,
-0.1952967346,
-0.1222010106,
-0.0495729707,
0.3201514781,
-0.1264337599,
0.8966099024,
-0.2778320611,
-0.1123259664,
0.4765629172,
-0.0585325509,
-0.0492790267,
-0.1197140962,
-0.1173319817,
-0.1053836867,
-0.1219812259,
0.1585760713,
0.0415134951,
-0.3985213637,
-0.3152046204,
0.1176416874,
-0.0033435524,
-0.4849434495,
-0.1623240858,
0.0248302836,
-0.0060156104,
0.3399603069,
0.0808943287,
-0.1960049421,
-0.2349726707,
-0.1044548154,
0.1002519876,
-0.096442759,
0.1460984647,
-0.0823537558,
-0.6153333187,
-0.0263252333,
-0.3447530866,
0.3508984149,
0.2303438783,
0.278773278,
-0.0252002925,
0.0546589643,
0.1554450393,
-0.2645350695,
0.3481029868,
0.0460807458,
-0.079312779,
0.3778903484,
0.0673650354,
-0.4065202475,
-0.2591385245,
-0.1735210866,
0.2162075937,
0.1735275984,
0.2088101655,
-0.3339240253,
-0.1532549262,
0.1459284574,
0.0317489058,
-0.0758194923,
-0.1607362777,
-0.242378816,
-0.3862482309,
-0.2752544284,
0.0777347758,
0.0905972868,
0.2722554803,
-0.1924264133,
-0.0251265243,
-0.1741384566,
-0.1011119038,
-0.135707438,
-0.0230221562,
0.2261855602,
-0.0508403182,
0.0109644085,
0.0407163836,
-0.0713442415,
0.5171349049,
-0.0105130393,
0.6572526097,
-0.3270744383,
0.014612861,
0.0358018912,
0.3106366992,
-0.1036952138,
-0.2722660303,
0.4553169906,
-0.2256216109,
0.088626951,
0.0143844262,
0.2432909161,
0.3678916693,
-0.2389952391,
-0.3546925783,
-0.0285970084,
0.2601582408,
0.0681472868,
-0.1354560405,
0.3313288987,
-0.1181411073,
-0.3191923499,
0.3394185305,
0.2960070372,
0.7895689607,
-0.1261406243,
0.1547690034,
0.5485853553,
-0.2694839239,
0.334536612,
-0.1798015833,
0.0359759293,
-0.4415816665,
-0.0063236579,
0.0751747265,
-0.3206636012,
0.0590694882,
0.1349458545,
-0.1340191066,
-0.1622875184,
-0.1321254373,
0.3438937068,
0.3400494456,
0.3328997791,
0.1474962234,
-0.0178196058,
0.0948305428,
0.1308039278,
-0.404694289,
-0.134108007,
-0.2259294093,
-0.1723212004,
-0.0335795358,
-0.1221875101,
-0.1576713622,
0.0173197389,
-0.4561392665,
0.3478038311,
0.0849165767,
-0.3162206411,
0.1610311568,
-0.0474383533,
0.1019051746,
0.1037967801,
-0.1716718078,
0.1528246254,
-0.0826575309,
-0.1429954767,
-0.2142307162,
-0.2495845258,
0.0375231802,
-0.0866125897,
-0.2825960517,
0.4322397709,
-0.1139802635,
-0.2102707326,
-0.1728675067,
0.0125370938,
0.3119153976,
-0.2836611271,
0.202678144,
-0.2300823927,
0.0316062421,
-0.1942098439,
0.1211950034,
0.0395353809,
-0.03126809,
0.0140523575,
-0.2241230309,
-0.0533770919,
-0.0647388697,
0.10199783,
0.1302527189,
0.071900785,
0.8524983525,
-0.0117236078,
-0.0161465555,
-0.1319328696,
-0.0278517082,
0.1447283775,
-0.6926693916,
0.2088909298,
0.1893457323,
0.1745975018,
-0.0362518951,
0.214440003,
-0.0601532012,
0.1539873183,
0.1137558967,
-0.2568929493,
-0.3925018311,
0.1009483635,
-0.0155634694,
0.1732780486,
0.2280417383,
0.4849218428,
-0.2576970458,
0.2441183031,
-0.2813732028,
0.2138566077,
-0.1269192696,
0.1881318092,
-0.3539939821,
-0.2457782179,
-0.2418731004,
0.1209030449,
0.1827505678,
0.2270849794,
-0.0880004242,
-0.2621852458,
-0.0628425553,
0.1547939479,
0.1043957695,
-0.4758486152,
0.1384588182,
-0.0776493028,
0.0856481344,
0.0443278886,
0.141410619,
0.0083139166,
-0.0238953084,
-0.0294427127,
0.6121737957,
0.0333852544,
-0.1780308187,
0.1745882481,
-0.3252796829,
-0.0355583839,
0.094031021,
0.4215205908,
-0.0784160942,
0.0408307537,
0.0782188773,
0.0332823023,
0.2658987939,
-0.106800884,
0.1057714969,
-0.5149431229,
-0.333725214,
-0.2798565626,
0.2233314663,
0.0947138444,
-0.3138941824,
-0.2480107099,
0.2871522009,
0.2126104981,
-0.2153726816,
-0.0119206198,
0.1517177522,
-0.0533142537,
-0.2499146014,
-0.0180369616,
0.3401539326,
-0.1459797621,
0.0140544958,
0.0499459878,
0.5240613818,
0.1642273068,
-0.1419706792,
0.0678369254,
-0.1499076337,
-0.1343794912,
0.3621260226,
0.0754974782,
0.0589414276,
0.0791230872,
-0.2144825161,
0.1044683084,
0.2081273198,
0.1839294732,
0.0116760079,
-0.4132243991,
-0.2656543255,
0.2523524165,
0.0547423102,
-0.0737466663,
-0.0049851388,
0.3377450705,
0.6447911859,
-0.142298162,
-0.096844703,
0.5756680369,
-0.2329217046,
0.0020322464,
-0.3756767213,
-0.1465899348,
0.0745915473,
-0.0359974802,
-0.1046380699,
-0.1838692129,
-0.018551223,
0.2249234468,
-0.3663145304,
-0.32762748,
0.5081477165,
0.2541376054,
-0.084761031,
-0.1901150942,
0.3602638841,
0.1809311211,
-0.2443730533,
0.021939151,
0.416636914,
0.6981303096,
0.3844660819,
-0.2621093392,
0.0661905408,
-0.1517233551,
0.1134635285,
0.100722,
0.2648783624,
0.3564857841,
0.199669078,
0.0850160122,
0.1405354589,
-0.1578916609,
-0.2345959693,
0.3939754069,
0.0582140349,
-0.0315158553,
-0.0618404858,
-0.2130904496,
-0.4125779271,
0.0771785602,
0.2182447165,
-0.0915771797,
0.2303872406,
0.3385387361,
0.0952062905,
-0.0094058551,
-0.0438190587,
0.0980003029,
-0.1631916761,
0.5890396833,
0.3657805026,
0.2943977416,
-0.472666055,
-0.4595134854,
-0.4318796992,
0.4607590139,
-0.1200265288,
0.132616356,
0.2335555404,
0.1743253171,
0.0586352348,
0.0616113357,
0.1084997356,
0.4466972649,
-0.2370325327,
0.265786767,
-0.3800933659,
0.4180730283,
0.0149969636,
-0.0360371843,
-0.1832067668,
-0.2183642983,
0.3100323677,
-0.2936551273,
0.1718758941,
-0.1804481298,
-0.1550520658,
0.2990252674,
0.177846089,
0.5840935707,
0.0202658903,
0.3855085671,
0.0433582067,
0.3265525401,
-0.0895395279,
-0.3381976783,
-0.192140013,
0.3090173304,
-0.0329326764,
0.1928830445,
0.1407831311,
0.0347656682,
-0.3030676246,
0.0247733146,
-0.2038730532,
0.1529370248,
-0.1174187884,
0.125608027,
-0.1389213502,
-0.0102255158,
-0.0201864988,
-0.1073682606,
0.1551192999,
0.3255605996,
-0.5399785042,
-0.3889175355,
0.5106248856,
-0.3500752151,
-0.1078939065,
0.0033393763,
0.1297105104,
0.1302660108,
-0.0042219702,
-0.1421426833,
-0.0585343242,
0.7115311623,
-0.0309066381,
-0.2054664344,
0.3008841276,
0.083345592,
0.0646687299,
-0.0842686445,
0.2101774216,
0.0909493715,
-0.1234652847,
-0.2370409667,
-0.2266750783
] |
https://github.com/huggingface/datasets/issues/2200 | _prepare_split will overwrite DatasetBuilder.info.features | Hi ! This might be related to #2153
You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
I'm opening a PR to fix this and also to figure out how it was not caught in the tests
EDIT: opened #2201 | Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function? | 43 | _prepare_split will overwrite DatasetBuilder.info.features
Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function?
Hi ! This might be related to #2153
You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
I'm opening a PR to fix this and also to figure out how it was not caught in the tests
EDIT: opened #2201 | [
-0.2406022549,
-0.0382909477,
-0.107767269,
0.1783376336,
0.2982983589,
0.2197922915,
0.4546082616,
0.2158690095,
-0.3327541351,
0.1149651855,
0.1291757673,
0.1715128273,
0.0863346756,
0.4873528779,
-0.1215007603,
0.076740995,
0.0831204802,
0.2866103649,
0.1698090732,
-0.0732159913,
-0.2161125392,
0.103940323,
-0.260414362,
0.0780968815,
-0.4611602426,
0.0068310872,
0.0738493204,
0.1830849946,
0.1115719751,
-0.42157197,
0.1278959513,
0.19315359,
-0.0024508126,
0.0135781243,
-0.0001165283,
0.0921402127,
0.0531198308,
-0.0490678698,
-0.3561656475,
0.1506264806,
-0.3260124326,
-0.2654622793,
-0.0111546777,
-0.2360558063,
-0.1424903274,
-0.3270659447,
-0.3870326877,
0.143145442,
0.2141012996,
0.226654619,
0.1773982048,
-0.2564503551,
0.1165276989,
0.1099400967,
0.3127685487,
0.1972706169,
-0.0730631351,
-0.2695532739,
-0.2947520614,
0.1149955839,
-0.1780860275,
0.4079656303,
-0.1879749596,
-0.024483379,
0.1067837253,
0.0501346812,
-0.0720181167,
-0.1327120364,
0.0906457603,
-0.3222063184,
0.297262609,
0.0031608262,
-0.07459566,
-0.5507095456,
-0.1756773889,
-0.3726776242,
0.1277294308,
-0.1672846526,
0.1768466234,
0.1145285815,
-0.1069565862,
-0.3455785513,
0.1335983872,
-0.0906985551,
-0.0378316864,
0.3073069751,
-0.400464803,
0.3126068711,
-0.114591822,
0.070075646,
0.29579404,
-0.2810820341,
-0.2957595289,
-0.1158547252,
-0.1413082927,
-0.1271787584,
0.1206178218,
-0.1135419607,
-0.020487722,
0.0391932987,
-0.183370173,
0.1696171165,
-0.0626039729,
-0.0579124726,
0.2710883319,
0.304397285,
0.2000661194,
0.1332719773,
-0.0148487054,
0.3680326641,
-0.3029091358,
-0.1120799705,
0.3196536303,
-0.1899857819,
0.3789294958,
0.3041921854,
0.5231936574,
-0.1912261248,
-0.2840595245,
0.2589046657,
0.3041546047,
-0.0476804078,
-0.0207292363,
0.1026611328,
0.0128639229,
0.2322099805,
-0.2137509882,
0.0731490254,
-0.3021541238,
-0.1779460162,
-0.2684747577,
-0.2020436376,
-0.0143176913,
0.195801571,
-0.0162583441,
-0.0289423279,
0.4025149643,
0.1338062137,
0.0593629666,
-0.5640694499,
-0.0786663294,
-0.1414088309,
0.2453933954,
0.237224564,
0.0063601732,
0.2979842722,
0.345356077,
-0.1086788699,
0.0423197448,
0.092891708,
-0.4464724064,
-0.3818402886,
0.024693178,
0.2049174756,
-0.0387652442,
0.2318274826,
0.0056332238,
0.0674563572,
0.3656387925,
-0.0792340264,
-0.010258045,
-0.1843765825,
-0.4282057881,
-0.0858237445,
0.068930842,
0.3378700912,
-0.3634487987,
0.02705127,
-0.0374607332,
-0.0010613762,
0.2343657613,
0.0017084293,
-0.0472927205,
0.2207316756,
-0.2923864424,
-0.1538806111,
0.4493570328,
0.0422425419,
-0.2183956504,
0.4702952206,
-0.0512736216,
0.1960454583,
0.0978574008,
-0.1573389024,
0.3125232458,
0.0569650941,
-0.0447398908,
0.0004940908,
-0.1355823576,
-0.0460938662,
-0.2612143457,
-0.2650540173,
-0.0084158033,
-0.2596245408,
0.0484580137,
0.2520490289,
-0.1498364806,
-0.2065733075,
0.2138381898,
0.1278960258,
0.0759676546,
0.2389377058,
-0.0274177231,
0.4694032073,
0.1447718143,
-0.1496133804,
-0.2516560853,
-0.0256627575,
-0.0062868893,
-0.2266124487,
-0.1490040123,
-0.5273110867,
-0.4477544129,
-0.0709881112,
-0.3762187362,
-0.264528811,
0.0848523676,
0.1711632609,
-0.028718099,
-0.1455246806,
0.0106613189,
0.0743657798,
-0.1461341381,
0.159685716,
-0.0771052539,
0.0408394039,
-0.027883837,
0.0059101544,
-0.050834775,
0.3137431145,
0.24227795,
-0.161542356,
-0.3486574292,
0.502921164,
0.1295908839,
0.025356099,
-0.3426884711,
-0.3701824546,
0.1229712442,
-0.0126649663,
-0.0751681551,
-0.0887557194,
0.0540346764,
-0.0973860621,
-0.0829880908,
0.4442036152,
-0.1351928413,
0.2727763057,
0.0633144379,
-0.045826301,
0.1429139972,
-0.0051073655,
0.2960256934,
-0.4752123058,
-0.4301361442,
-0.1807935834,
-0.1933783293,
0.136189878,
-0.0568670221,
0.4161860049,
0.7362262607,
0.0912746489,
-0.2430432886,
-0.0015032343,
-0.1585698128,
-0.0849270374,
0.1719686091,
-0.1211563051,
0.3886583447,
0.0281735435,
0.0056689614,
0.0048917253,
-0.0323951989,
0.0279555209,
0.2369138747,
0.1952090412,
0.1960088611,
0.2906233072,
0.0994650275,
-0.050844349,
-0.3068083525,
0.2607761025,
0.1012080684,
0.1346649975,
-0.3549929857,
0.3007316887,
-0.3476012945,
0.1741185784,
-0.3198780119,
-0.0015288144,
-0.0686362088,
-0.4444671273,
0.0085162409,
0.3251639903,
-0.0431839637,
0.1285806894,
-0.1287232935,
-0.1116975844,
0.0461465493,
-0.2226935774,
0.1801130176,
-0.0527553633,
-0.3112848103,
0.0221239999,
-0.0914605036,
0.1510242969,
0.0681760088,
0.0183007866,
-0.2734506428,
-0.2057695538,
-0.3139706552,
0.1297931075,
-0.2200111747,
0.1257250458,
0.1559236944,
-0.23142308,
0.3351610303,
-0.3764408231,
0.1105964556,
0.1745933592,
-0.0303359777,
-0.0731976181,
0.137620613,
0.0059765391,
-0.1190199926,
-0.5209406614,
0.044172354,
-0.2698734701,
-0.0336817354,
0.2164279968,
0.0426514819,
0.0496084169,
0.0118082911,
-0.1766922623,
0.1792864352,
0.0049384311,
-0.4112113118,
-0.20428361,
-0.0725067705,
-0.1624399275,
0.2003738284,
0.031419009,
-0.186989665,
0.0107458988,
-0.0141782425,
-0.3892455101,
0.0628276467,
-0.2297628075,
0.1830189228,
-0.0313399248,
-0.0654163212,
0.0715477765,
0.3412659764,
-0.0353142656,
0.0644657314,
-0.203080982,
0.2194039077,
-0.0548892021,
0.0521091893,
-0.1899808794,
0.3345888555,
-0.1968087703,
0.7819836736,
-0.0370063744,
0.1000478119,
0.0815292299,
-0.0416020006,
0.2504914999,
-0.2591482997,
-0.3987997174,
0.1645828038,
-0.1963438094,
-0.0728488937,
0.379606843,
-0.099073559,
0.1479528099,
0.2129001617,
0.036953561,
-0.1447472721,
-0.3877590299,
-0.0382352844,
-0.1339042783,
0.4046766162,
0.1702878624,
0.1226614118,
-0.2520205975,
-0.080998674,
-0.114826858,
0.24349989,
0.21733661,
-0.241508007,
-0.4367232919,
-0.047751192,
0.1094467491,
0.1142062396,
0.1452285051,
0.1801120639,
-0.0691871345,
-0.2261047363,
0.1469918787,
0.0663819909,
0.6020616293,
-0.0015931539,
0.0893496871,
0.2863385677,
0.1414214969,
0.439461261,
-0.3856308162,
-0.0263825133,
0.645760417,
0.0466841385,
0.3440137506,
0.0570219755,
-0.3574427068,
0.7359839678,
0.2237889022,
-0.4519285262,
0.1409163773,
-0.1648080498,
0.0155696124,
-0.1326272488,
0.0458730236,
-0.046516344,
0.0182098411,
-0.391572088,
-0.2023956031,
-0.241516605,
-0.1870998442,
-0.0574113131,
0.0098594949,
0.2120063603,
-0.0419110432,
0.0273000449,
-0.030403005,
0.1045278385,
0.1013763398,
0.6346019506,
-0.1218816563,
-0.6454028487,
0.0526318215,
-0.2799099088,
0.3864447474,
0.2780570984,
-0.1979072392,
0.3460097909,
-0.0478184372,
0.2940056622,
-0.5682279468,
0.2830229402,
0.4415438771,
0.0993340164,
-0.3798832595,
-0.5284827352,
0.3364792168,
-0.199105978,
-0.1632904559,
-0.1263375729,
0.1568228304,
-0.581549108,
0.502946496,
-0.0480978042,
0.5525753498,
0.2817795873,
0.1456730962,
-0.0596222244,
0.4062948823,
0.5035852194,
-0.2715288997,
0.2468829155,
-0.3581901193,
-0.4022681117,
-0.0234564319,
0.1249707043,
0.265476048,
0.1090993211,
-0.2776915133,
0.4931368828,
-0.3640534282,
0.2984285057,
-0.1434564292,
0.0993171185,
0.114813678,
-0.100486435,
0.2887804806,
0.0711409226,
0.0594277382,
0.0769228786,
0.1941157877,
-0.0005985647,
0.3359727263,
-0.0402312689,
-0.0544736832,
0.0335326567,
-0.0611638725,
0.150058344,
0.0133363083,
-0.2764918208,
0.3465050459,
-0.3510285318,
0.3947282732,
0.2172813118,
0.2850672305,
0.0914980471,
0.3242627978,
0.2868180275,
-0.1777193248,
0.2628848255,
0.2786636353,
0.3406603932,
-0.1953750253,
0.1444915533,
-0.136716187,
0.0413950086,
-0.2323200554,
-0.1036981791,
0.2827697396,
-0.8835757971,
-0.0947829485,
0.0146642122,
0.1324678957,
-0.3969876766,
0.0565001406,
-0.3819339871,
-0.2622254491,
0.1641949117,
-0.0680009425,
-0.3061913848,
-0.0870293975,
-0.1133321971,
0.3726704419,
0.1711788774,
0.6264430285,
-0.0985799134,
-0.1576814353,
-0.2450171411,
-0.0059853941,
-0.1231589168,
-0.2279705107,
0.1567361951,
0.0155930333,
-0.0709497035,
0.0796244889,
0.1542986631,
-0.1563891172,
0.3370621502,
-0.3017417192,
-0.2852938771,
-0.3449876308,
-0.2147874385,
-0.0338953771,
0.0869264826,
0.1602320969,
0.1853903383,
-0.2084303498,
0.4056216776,
-0.261914432,
-0.0314986296,
-0.036425706,
0.3956215978,
0.0656920522,
0.0869986787,
-0.0181532111,
-0.0262147803,
0.1215760708,
-0.1006321758,
0.268035084,
-0.2361129224,
-0.3126166761,
0.1382648647,
-0.1827713102,
0.0544779748,
-0.1590766162,
0.0578634739,
0.0218239538,
-0.1035419554,
0.3592786193,
-0.1412061006,
0.3238607347,
0.4083141088,
-0.2750032246,
0.0652098879,
-0.0785175413,
-0.0183322839,
-0.1225819439,
0.3001948297,
0.1198048294,
0.251044035,
-0.1364614069,
0.0107377395,
0.0105195232,
-0.0630395338,
-0.2360342741,
0.012677744,
0.2943050861,
-0.1888021082,
0.1414738297,
0.1635722369,
0.2870687246,
0.444011569,
0.1440840364,
-0.2545002699,
0.2238467932,
0.1845125109,
-0.1594917774,
-0.1798324585,
0.2453942597,
-0.2276020944,
0.2211376727,
0.4496668577,
0.2195437849,
0.2532427609,
0.1180916727,
0.2186752707,
0.1186127663,
-0.060294684,
0.4032920897,
0.6268616915,
0.1083770543,
0.1862608641,
0.3067199886,
0.0096249599,
0.1607293785,
0.4856569469,
0.1308962703,
0.23371692,
0.1021462008,
-0.1254927665,
-0.0429429077,
-0.5238929987,
0.0189285092,
0.1090185642,
-0.2705442309,
0.3666852713,
0.0564690679,
0.336540401,
-0.2169645578,
-0.3691894412,
0.0142579079,
0.2399220318,
-0.2655664682,
-0.3388783634,
0.2285335213,
-0.1335350573,
-0.4065555632,
0.1406853348,
0.0178987216,
-0.0867012441,
0.3517052531,
-0.2302889824,
-0.2614569366,
-0.2153620273,
0.135209024,
-0.1417117417,
0.1342934668,
-0.0578664914,
0.2423511147,
-0.0093197376,
0.1342033297,
0.0953272581,
0.1112263799,
0.2807967067,
0.1006871909,
-0.0732277334,
-0.2079862654,
0.007702589,
-0.1528949887,
-0.1608589441,
-0.077696681,
-0.298402667,
0.1202893853,
0.1377221644,
0.1062908769,
-0.1541674733,
-0.0458700098,
0.4999831915,
-0.2237766534,
-0.2473224998,
0.4840555787,
0.4217507541,
-0.1941656172,
-0.0158379227,
0.0170503762,
-0.2240186036,
-0.3644656539,
0.6477413177,
0.0759228915,
0.4203592837,
0.2216889411,
0.0639372915,
-0.040040426,
0.2455181181,
-0.0533749945,
-0.2108438462,
-0.4087746739,
0.1788353324,
-0.3057605326,
0.0167724527,
0.1303600967,
-0.131475538,
0.2277013958,
0.0077143759,
-0.1295630932,
-0.1021611616,
-0.0293922573,
-0.3368742168,
0.4206035733,
-0.0728647858,
-0.1466155052,
-0.1230788454,
-0.2190883607,
-0.0881387219,
-0.0774826184,
-0.3402247727,
0.1750459373,
0.2217362523,
-0.0822980776,
0.1343100816,
-0.0083877817,
0.222512871,
-0.3318461478,
0.0433523655,
0.1447064728,
0.1511900723,
-0.2609166503,
0.2926471829,
-0.0769183934,
-0.2004080117,
-0.3502568007,
0.2879442871,
0.0859962702,
0.3944645524,
-0.1279844046,
0.1640854031,
-0.3171315491,
0.0340158232,
0.365016818,
-0.1681363881,
-0.3235814571,
0.4275163412,
-0.0395364091,
0.2235408276,
0.6821812391,
0.3631208837,
-0.0285395235,
0.2105824649,
-0.1586071402,
-0.31867522,
0.4595023394,
0.2765707672,
-0.4551954567,
-0.1983163655,
0.2825817466,
0.470041275,
-0.2568917572,
-0.4221352339,
-0.2443163097,
0.4609529078,
-0.1922484189,
0.0276602581,
0.2145587057,
0.0945017934,
-0.0990522802,
-0.0457402319,
0.0095970668,
0.178073287,
-0.2173992842,
0.1988815218,
-0.1616548598
] |
https://github.com/huggingface/datasets/issues/2200 | _prepare_split will overwrite DatasetBuilder.info.features | > Hi ! This might be related to #2153
>
> You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
> I'm opening a PR to fix this and also to figure out how it was not caught in the tests
>
> EDIT: opened #2201
Glad to hear that! Thank you for your fix, I'm new to huggingface, it's a fantastic project 😁 | Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function? | 67 | _prepare_split will overwrite DatasetBuilder.info.features
Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function?
> Hi ! This might be related to #2153
>
> You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
> I'm opening a PR to fix this and also to figure out how it was not caught in the tests
>
> EDIT: opened #2201
Glad to hear that! Thank you for your fix, I'm new to huggingface, it's a fantastic project 😁 | [
-0.2406022549,
-0.0382909477,
-0.107767269,
0.1783376336,
0.2982983589,
0.2197922915,
0.4546082616,
0.2158690095,
-0.3327541351,
0.1149651855,
0.1291757673,
0.1715128273,
0.0863346756,
0.4873528779,
-0.1215007603,
0.076740995,
0.0831204802,
0.2866103649,
0.1698090732,
-0.0732159913,
-0.2161125392,
0.103940323,
-0.260414362,
0.0780968815,
-0.4611602426,
0.0068310872,
0.0738493204,
0.1830849946,
0.1115719751,
-0.42157197,
0.1278959513,
0.19315359,
-0.0024508126,
0.0135781243,
-0.0001165283,
0.0921402127,
0.0531198308,
-0.0490678698,
-0.3561656475,
0.1506264806,
-0.3260124326,
-0.2654622793,
-0.0111546777,
-0.2360558063,
-0.1424903274,
-0.3270659447,
-0.3870326877,
0.143145442,
0.2141012996,
0.226654619,
0.1773982048,
-0.2564503551,
0.1165276989,
0.1099400967,
0.3127685487,
0.1972706169,
-0.0730631351,
-0.2695532739,
-0.2947520614,
0.1149955839,
-0.1780860275,
0.4079656303,
-0.1879749596,
-0.024483379,
0.1067837253,
0.0501346812,
-0.0720181167,
-0.1327120364,
0.0906457603,
-0.3222063184,
0.297262609,
0.0031608262,
-0.07459566,
-0.5507095456,
-0.1756773889,
-0.3726776242,
0.1277294308,
-0.1672846526,
0.1768466234,
0.1145285815,
-0.1069565862,
-0.3455785513,
0.1335983872,
-0.0906985551,
-0.0378316864,
0.3073069751,
-0.400464803,
0.3126068711,
-0.114591822,
0.070075646,
0.29579404,
-0.2810820341,
-0.2957595289,
-0.1158547252,
-0.1413082927,
-0.1271787584,
0.1206178218,
-0.1135419607,
-0.020487722,
0.0391932987,
-0.183370173,
0.1696171165,
-0.0626039729,
-0.0579124726,
0.2710883319,
0.304397285,
0.2000661194,
0.1332719773,
-0.0148487054,
0.3680326641,
-0.3029091358,
-0.1120799705,
0.3196536303,
-0.1899857819,
0.3789294958,
0.3041921854,
0.5231936574,
-0.1912261248,
-0.2840595245,
0.2589046657,
0.3041546047,
-0.0476804078,
-0.0207292363,
0.1026611328,
0.0128639229,
0.2322099805,
-0.2137509882,
0.0731490254,
-0.3021541238,
-0.1779460162,
-0.2684747577,
-0.2020436376,
-0.0143176913,
0.195801571,
-0.0162583441,
-0.0289423279,
0.4025149643,
0.1338062137,
0.0593629666,
-0.5640694499,
-0.0786663294,
-0.1414088309,
0.2453933954,
0.237224564,
0.0063601732,
0.2979842722,
0.345356077,
-0.1086788699,
0.0423197448,
0.092891708,
-0.4464724064,
-0.3818402886,
0.024693178,
0.2049174756,
-0.0387652442,
0.2318274826,
0.0056332238,
0.0674563572,
0.3656387925,
-0.0792340264,
-0.010258045,
-0.1843765825,
-0.4282057881,
-0.0858237445,
0.068930842,
0.3378700912,
-0.3634487987,
0.02705127,
-0.0374607332,
-0.0010613762,
0.2343657613,
0.0017084293,
-0.0472927205,
0.2207316756,
-0.2923864424,
-0.1538806111,
0.4493570328,
0.0422425419,
-0.2183956504,
0.4702952206,
-0.0512736216,
0.1960454583,
0.0978574008,
-0.1573389024,
0.3125232458,
0.0569650941,
-0.0447398908,
0.0004940908,
-0.1355823576,
-0.0460938662,
-0.2612143457,
-0.2650540173,
-0.0084158033,
-0.2596245408,
0.0484580137,
0.2520490289,
-0.1498364806,
-0.2065733075,
0.2138381898,
0.1278960258,
0.0759676546,
0.2389377058,
-0.0274177231,
0.4694032073,
0.1447718143,
-0.1496133804,
-0.2516560853,
-0.0256627575,
-0.0062868893,
-0.2266124487,
-0.1490040123,
-0.5273110867,
-0.4477544129,
-0.0709881112,
-0.3762187362,
-0.264528811,
0.0848523676,
0.1711632609,
-0.028718099,
-0.1455246806,
0.0106613189,
0.0743657798,
-0.1461341381,
0.159685716,
-0.0771052539,
0.0408394039,
-0.027883837,
0.0059101544,
-0.050834775,
0.3137431145,
0.24227795,
-0.161542356,
-0.3486574292,
0.502921164,
0.1295908839,
0.025356099,
-0.3426884711,
-0.3701824546,
0.1229712442,
-0.0126649663,
-0.0751681551,
-0.0887557194,
0.0540346764,
-0.0973860621,
-0.0829880908,
0.4442036152,
-0.1351928413,
0.2727763057,
0.0633144379,
-0.045826301,
0.1429139972,
-0.0051073655,
0.2960256934,
-0.4752123058,
-0.4301361442,
-0.1807935834,
-0.1933783293,
0.136189878,
-0.0568670221,
0.4161860049,
0.7362262607,
0.0912746489,
-0.2430432886,
-0.0015032343,
-0.1585698128,
-0.0849270374,
0.1719686091,
-0.1211563051,
0.3886583447,
0.0281735435,
0.0056689614,
0.0048917253,
-0.0323951989,
0.0279555209,
0.2369138747,
0.1952090412,
0.1960088611,
0.2906233072,
0.0994650275,
-0.050844349,
-0.3068083525,
0.2607761025,
0.1012080684,
0.1346649975,
-0.3549929857,
0.3007316887,
-0.3476012945,
0.1741185784,
-0.3198780119,
-0.0015288144,
-0.0686362088,
-0.4444671273,
0.0085162409,
0.3251639903,
-0.0431839637,
0.1285806894,
-0.1287232935,
-0.1116975844,
0.0461465493,
-0.2226935774,
0.1801130176,
-0.0527553633,
-0.3112848103,
0.0221239999,
-0.0914605036,
0.1510242969,
0.0681760088,
0.0183007866,
-0.2734506428,
-0.2057695538,
-0.3139706552,
0.1297931075,
-0.2200111747,
0.1257250458,
0.1559236944,
-0.23142308,
0.3351610303,
-0.3764408231,
0.1105964556,
0.1745933592,
-0.0303359777,
-0.0731976181,
0.137620613,
0.0059765391,
-0.1190199926,
-0.5209406614,
0.044172354,
-0.2698734701,
-0.0336817354,
0.2164279968,
0.0426514819,
0.0496084169,
0.0118082911,
-0.1766922623,
0.1792864352,
0.0049384311,
-0.4112113118,
-0.20428361,
-0.0725067705,
-0.1624399275,
0.2003738284,
0.031419009,
-0.186989665,
0.0107458988,
-0.0141782425,
-0.3892455101,
0.0628276467,
-0.2297628075,
0.1830189228,
-0.0313399248,
-0.0654163212,
0.0715477765,
0.3412659764,
-0.0353142656,
0.0644657314,
-0.203080982,
0.2194039077,
-0.0548892021,
0.0521091893,
-0.1899808794,
0.3345888555,
-0.1968087703,
0.7819836736,
-0.0370063744,
0.1000478119,
0.0815292299,
-0.0416020006,
0.2504914999,
-0.2591482997,
-0.3987997174,
0.1645828038,
-0.1963438094,
-0.0728488937,
0.379606843,
-0.099073559,
0.1479528099,
0.2129001617,
0.036953561,
-0.1447472721,
-0.3877590299,
-0.0382352844,
-0.1339042783,
0.4046766162,
0.1702878624,
0.1226614118,
-0.2520205975,
-0.080998674,
-0.114826858,
0.24349989,
0.21733661,
-0.241508007,
-0.4367232919,
-0.047751192,
0.1094467491,
0.1142062396,
0.1452285051,
0.1801120639,
-0.0691871345,
-0.2261047363,
0.1469918787,
0.0663819909,
0.6020616293,
-0.0015931539,
0.0893496871,
0.2863385677,
0.1414214969,
0.439461261,
-0.3856308162,
-0.0263825133,
0.645760417,
0.0466841385,
0.3440137506,
0.0570219755,
-0.3574427068,
0.7359839678,
0.2237889022,
-0.4519285262,
0.1409163773,
-0.1648080498,
0.0155696124,
-0.1326272488,
0.0458730236,
-0.046516344,
0.0182098411,
-0.391572088,
-0.2023956031,
-0.241516605,
-0.1870998442,
-0.0574113131,
0.0098594949,
0.2120063603,
-0.0419110432,
0.0273000449,
-0.030403005,
0.1045278385,
0.1013763398,
0.6346019506,
-0.1218816563,
-0.6454028487,
0.0526318215,
-0.2799099088,
0.3864447474,
0.2780570984,
-0.1979072392,
0.3460097909,
-0.0478184372,
0.2940056622,
-0.5682279468,
0.2830229402,
0.4415438771,
0.0993340164,
-0.3798832595,
-0.5284827352,
0.3364792168,
-0.199105978,
-0.1632904559,
-0.1263375729,
0.1568228304,
-0.581549108,
0.502946496,
-0.0480978042,
0.5525753498,
0.2817795873,
0.1456730962,
-0.0596222244,
0.4062948823,
0.5035852194,
-0.2715288997,
0.2468829155,
-0.3581901193,
-0.4022681117,
-0.0234564319,
0.1249707043,
0.265476048,
0.1090993211,
-0.2776915133,
0.4931368828,
-0.3640534282,
0.2984285057,
-0.1434564292,
0.0993171185,
0.114813678,
-0.100486435,
0.2887804806,
0.0711409226,
0.0594277382,
0.0769228786,
0.1941157877,
-0.0005985647,
0.3359727263,
-0.0402312689,
-0.0544736832,
0.0335326567,
-0.0611638725,
0.150058344,
0.0133363083,
-0.2764918208,
0.3465050459,
-0.3510285318,
0.3947282732,
0.2172813118,
0.2850672305,
0.0914980471,
0.3242627978,
0.2868180275,
-0.1777193248,
0.2628848255,
0.2786636353,
0.3406603932,
-0.1953750253,
0.1444915533,
-0.136716187,
0.0413950086,
-0.2323200554,
-0.1036981791,
0.2827697396,
-0.8835757971,
-0.0947829485,
0.0146642122,
0.1324678957,
-0.3969876766,
0.0565001406,
-0.3819339871,
-0.2622254491,
0.1641949117,
-0.0680009425,
-0.3061913848,
-0.0870293975,
-0.1133321971,
0.3726704419,
0.1711788774,
0.6264430285,
-0.0985799134,
-0.1576814353,
-0.2450171411,
-0.0059853941,
-0.1231589168,
-0.2279705107,
0.1567361951,
0.0155930333,
-0.0709497035,
0.0796244889,
0.1542986631,
-0.1563891172,
0.3370621502,
-0.3017417192,
-0.2852938771,
-0.3449876308,
-0.2147874385,
-0.0338953771,
0.0869264826,
0.1602320969,
0.1853903383,
-0.2084303498,
0.4056216776,
-0.261914432,
-0.0314986296,
-0.036425706,
0.3956215978,
0.0656920522,
0.0869986787,
-0.0181532111,
-0.0262147803,
0.1215760708,
-0.1006321758,
0.268035084,
-0.2361129224,
-0.3126166761,
0.1382648647,
-0.1827713102,
0.0544779748,
-0.1590766162,
0.0578634739,
0.0218239538,
-0.1035419554,
0.3592786193,
-0.1412061006,
0.3238607347,
0.4083141088,
-0.2750032246,
0.0652098879,
-0.0785175413,
-0.0183322839,
-0.1225819439,
0.3001948297,
0.1198048294,
0.251044035,
-0.1364614069,
0.0107377395,
0.0105195232,
-0.0630395338,
-0.2360342741,
0.012677744,
0.2943050861,
-0.1888021082,
0.1414738297,
0.1635722369,
0.2870687246,
0.444011569,
0.1440840364,
-0.2545002699,
0.2238467932,
0.1845125109,
-0.1594917774,
-0.1798324585,
0.2453942597,
-0.2276020944,
0.2211376727,
0.4496668577,
0.2195437849,
0.2532427609,
0.1180916727,
0.2186752707,
0.1186127663,
-0.060294684,
0.4032920897,
0.6268616915,
0.1083770543,
0.1862608641,
0.3067199886,
0.0096249599,
0.1607293785,
0.4856569469,
0.1308962703,
0.23371692,
0.1021462008,
-0.1254927665,
-0.0429429077,
-0.5238929987,
0.0189285092,
0.1090185642,
-0.2705442309,
0.3666852713,
0.0564690679,
0.336540401,
-0.2169645578,
-0.3691894412,
0.0142579079,
0.2399220318,
-0.2655664682,
-0.3388783634,
0.2285335213,
-0.1335350573,
-0.4065555632,
0.1406853348,
0.0178987216,
-0.0867012441,
0.3517052531,
-0.2302889824,
-0.2614569366,
-0.2153620273,
0.135209024,
-0.1417117417,
0.1342934668,
-0.0578664914,
0.2423511147,
-0.0093197376,
0.1342033297,
0.0953272581,
0.1112263799,
0.2807967067,
0.1006871909,
-0.0732277334,
-0.2079862654,
0.007702589,
-0.1528949887,
-0.1608589441,
-0.077696681,
-0.298402667,
0.1202893853,
0.1377221644,
0.1062908769,
-0.1541674733,
-0.0458700098,
0.4999831915,
-0.2237766534,
-0.2473224998,
0.4840555787,
0.4217507541,
-0.1941656172,
-0.0158379227,
0.0170503762,
-0.2240186036,
-0.3644656539,
0.6477413177,
0.0759228915,
0.4203592837,
0.2216889411,
0.0639372915,
-0.040040426,
0.2455181181,
-0.0533749945,
-0.2108438462,
-0.4087746739,
0.1788353324,
-0.3057605326,
0.0167724527,
0.1303600967,
-0.131475538,
0.2277013958,
0.0077143759,
-0.1295630932,
-0.1021611616,
-0.0293922573,
-0.3368742168,
0.4206035733,
-0.0728647858,
-0.1466155052,
-0.1230788454,
-0.2190883607,
-0.0881387219,
-0.0774826184,
-0.3402247727,
0.1750459373,
0.2217362523,
-0.0822980776,
0.1343100816,
-0.0083877817,
0.222512871,
-0.3318461478,
0.0433523655,
0.1447064728,
0.1511900723,
-0.2609166503,
0.2926471829,
-0.0769183934,
-0.2004080117,
-0.3502568007,
0.2879442871,
0.0859962702,
0.3944645524,
-0.1279844046,
0.1640854031,
-0.3171315491,
0.0340158232,
0.365016818,
-0.1681363881,
-0.3235814571,
0.4275163412,
-0.0395364091,
0.2235408276,
0.6821812391,
0.3631208837,
-0.0285395235,
0.2105824649,
-0.1586071402,
-0.31867522,
0.4595023394,
0.2765707672,
-0.4551954567,
-0.1983163655,
0.2825817466,
0.470041275,
-0.2568917572,
-0.4221352339,
-0.2443163097,
0.4609529078,
-0.1922484189,
0.0276602581,
0.2145587057,
0.0945017934,
-0.0990522802,
-0.0457402319,
0.0095970668,
0.178073287,
-0.2173992842,
0.1988815218,
-0.1616548598
] |
https://github.com/huggingface/datasets/issues/2196 | `load_dataset` caches two arrow files? | Hi ! Files that starts with `cache-*` are cached computation files, i.e. they are the cached results of map/filter/cast/etc. operations. For example if you used `map` on your dataset to transform it, then the resulting dataset is going to be stored and cached in a `cache-*` file. These files are used to avoid having to load the dataset in RAM, even after many transforms | Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`? | 64 | `load_dataset` caches two arrow files?
Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`?
Hi ! Files that starts with `cache-*` are cached computation files, i.e. they are the cached results of map/filter/cast/etc. operations. For example if you used `map` on your dataset to transform it, then the resulting dataset is going to be stored and cached in a `cache-*` file. These files are used to avoid having to load the dataset in RAM, even after many transforms | [
-0.0206235871,
-0.1851760149,
-0.1328714788,
0.6645821333,
-0.0811097622,
0.3052116036,
0.1752958298,
0.2564811707,
0.2874499559,
-0.1578644663,
-0.0090865269,
0.1946640015,
0.0801827163,
-0.5130002499,
0.1924156845,
0.1686629504,
0.1584640294,
0.035714712,
-0.1609627306,
-0.13864097,
-0.1706290245,
0.1584539413,
0.2008035779,
0.1132958531,
-0.4863941967,
-0.1746707559,
0.1140893847,
0.2621502578,
-0.0464334413,
-0.3418194652,
0.2564128339,
-0.0493696444,
0.0540108606,
0.3561967015,
-0.000119842,
0.0101960748,
0.3606315851,
0.1277110577,
-0.4809899032,
0.015387401,
-0.3229598403,
-0.0753121227,
0.1952300519,
-0.2579163909,
0.4584198594,
-0.1872408837,
-0.0695053339,
-0.7284278274,
0.5684514046,
0.1373000145,
0.1673658341,
-0.1836175174,
-0.4365000725,
0.1170695275,
0.2427162975,
0.086270541,
0.0348213613,
-0.0274128187,
-0.1152971536,
0.2550847232,
0.0084781572,
0.06545984,
-0.1409609616,
-0.0061691143,
0.4315132797,
0.1002560556,
-0.0336376168,
-0.2234598696,
0.2855518162,
0.090217039,
0.8578150272,
-0.2979493439,
0.0392454714,
-0.3473232687,
-0.2356774956,
-0.144353956,
0.2823198736,
0.3157089949,
0.1556544602,
-0.0248258077,
-0.1394176632,
-0.4467859268,
0.0990008861,
-0.1330397874,
0.1985001415,
-0.3570917249,
-0.1704366207,
0.3212152123,
0.3046755791,
0.305157423,
0.3443064094,
-0.4836411476,
-0.2567693591,
0.3919181228,
-0.1676274538,
0.1453922987,
-0.1216801256,
0.0197674483,
-0.0845503807,
0.3244437873,
0.3523726761,
-0.2121753097,
-0.1888598055,
0.1681448519,
0.1398880482,
0.3988686502,
0.1835663915,
-0.0022789389,
0.0113465134,
-0.3571021259,
-0.0108401328,
-0.2608299255,
-0.0843962729,
-0.1345769763,
0.3956593871,
-0.3732518256,
-0.0711928159,
-0.1004830077,
0.0157761052,
0.0031898022,
0.0849958956,
-0.3467418253,
0.1040634736,
0.0538090542,
0.2754337192,
0.2759616971,
-0.1532220542,
0.0380467027,
-0.0484482683,
-0.0527622253,
-0.1766161323,
-0.017260544,
-0.1700627059,
0.270449996,
0.2655586004,
0.0037332773,
0.2545683086,
0.0916005373,
-0.0608628541,
-0.0543893203,
0.386248827,
-0.2153565288,
0.1529204547,
0.4383425117,
-0.1737543494,
0.4274986386,
0.0190216321,
-0.0169861317,
-0.1211498678,
0.4724339545,
-0.4885582924,
-0.1591057628,
0.1287666559,
0.1424017549,
-0.0551953949,
0.3164665103,
-0.8082448244,
-0.0007384308,
0.2645083666,
-0.1677343249,
0.2512050271,
0.0491758361,
-0.188352108,
-0.358083427,
-0.2017025352,
0.2732268572,
-0.4757972956,
-0.1344006658,
-0.2125523239,
-0.1847012639,
-0.1997343004,
0.3478361666,
-0.5759468079,
0.3453569114,
-0.5347442627,
0.1664723903,
0.5266281962,
-0.3847643733,
-0.3605981171,
0.2506013513,
-0.0380812734,
0.1663444638,
0.272128284,
0.218200773,
-0.1023307815,
-0.2018230408,
-0.1041522622,
-0.0861047208,
0.1661467254,
-0.3134889603,
-0.1434255689,
0.0190946758,
0.0897765607,
-0.066359736,
-0.1878649294,
0.0354379565,
0.0699581951,
-0.0580333918,
0.2170079648,
0.0795839056,
0.1795781553,
0.1891770959,
-0.143675983,
-0.2049159557,
0.2398437709,
0.106003657,
-0.6893282533,
0.2930277586,
-0.104339987,
-0.7563845515,
-0.0923603848,
-0.0757527649,
-0.1200726032,
-0.0650244132,
-0.2157048583,
0.0706047937,
-0.0474081002,
0.1403090507,
0.1338896453,
-0.243675068,
-0.3252308369,
0.7150176167,
-0.0651437342,
-0.0319742858,
-0.4741213024,
0.081887655,
0.1955752373,
0.2808515429,
-0.3693422675,
-0.173314333,
0.0616048574,
-0.1553856432,
-0.0872995257,
0.3423826396,
0.1587361991,
0.0816378444,
0.1597304046,
0.3373653293,
0.0528744981,
-0.094501853,
0.2905018926,
-0.1088058203,
0.2044790536,
-0.3820783794,
-0.1535616219,
0.0764500722,
-0.2378112674,
0.1004444659,
-0.0944694653,
-0.3120372295,
0.1867324114,
0.0675015152,
-0.0250658207,
-0.1098616645,
0.1858586818,
0.3055243492,
0.4112280309,
0.4338185787,
0.1313608438,
-0.0053280629,
0.411285162,
-0.237332046,
-0.1887229085,
0.1868095249,
-0.3113766313,
-0.3228852749,
-0.1912422925,
0.4735214114,
0.6378598213,
0.0563694537,
0.1754252315,
0.0024435539,
0.1258141249,
-0.1620594412,
0.2027003765,
-0.0622795187,
0.3740921617,
0.0654772595,
-0.1527921557,
-0.1322552711,
-0.3498427272,
-0.0258126482,
0.23696208,
0.0013320521,
-0.2612859905,
0.1710427403,
-0.0301582776,
-0.0766576603,
-0.2585294843,
0.1396564543,
-0.1742327958,
-0.1237518117,
-0.0833470076,
0.1740724742,
0.3223649859,
-0.1156031266,
-0.3016852438,
0.5464681387,
-0.044139348,
0.0205829088,
-0.4892039299,
-0.147387594,
-0.0474743135,
0.006040778,
0.0929663181,
-0.1244914606,
0.0971617624,
-0.1376734376,
0.2625198066,
-0.2510238886,
0.1507312655,
-0.0135110226,
0.1546670198,
-0.0067825634,
-0.1983197331,
0.0210129134,
-0.3504292071,
0.0431186371,
-0.112762481,
0.028471455,
-0.2904053628,
-0.0532988422,
-0.084039703,
0.0628022403,
-0.0875967592,
-0.0336914584,
0.0717708766,
0.0021123216,
0.2212627381,
-0.0548507199,
0.1340093166,
-0.0328850746,
-0.3017031252,
0.153970778,
0.144506529,
0.108298853,
-0.4748569131,
-0.7183318138,
0.2579836249,
-0.1595868766,
0.0216957908,
0.1440951973,
0.0385782346,
0.2280185372,
0.0514157712,
-0.5628799796,
0.1586026996,
-0.1018932238,
0.154806748,
-0.403614372,
-0.0201197695,
0.1646022797,
0.1399878711,
0.0117776617,
-0.2070707828,
-0.0790284649,
0.1412539333,
0.0238418393,
0.2856882215,
-0.0039135907,
0.2602863312,
-0.1735489666,
0.6865375638,
0.0560426936,
0.2372025698,
0.2109370977,
0.41492939,
0.4307763577,
-0.2159621865,
0.0449299887,
-0.1597058475,
-0.1557265073,
-0.1205708086,
0.1386094242,
0.1522234678,
-0.1358103007,
0.1498069465,
0.1156610698,
-0.1890239567,
0.1638128608,
0.1285746098,
-0.5458726883,
-0.0936675295,
0.0829505771,
-0.202848047,
-0.112208277,
0.104331851,
-0.0637393966,
0.1197955608,
0.3924951851,
0.0245916955,
-0.3626148999,
0.0418765247,
-0.101960443,
0.1704227626,
-0.1276641041,
-0.1241329908,
0.0466341972,
0.1456723064,
0.1839402318,
0.1173280329,
0.7556932569,
0.0689089745,
-0.0042750817,
0.2504170537,
0.1635791957,
-0.3476659656,
0.0561862141,
0.1012085825,
0.3155823946,
-0.0724939629,
0.3185844421,
-0.0702632442,
-0.0872597769,
-0.4280509949,
0.4414299726,
-0.3793691695,
-0.2284427434,
-0.1763136685,
-0.1661020964,
-0.0065113157,
-0.2366747409,
-0.0372675546,
-0.0689693689,
-0.1220226288,
0.0307865068,
-0.260910809,
-0.2192634195,
-0.0041812249,
-0.1828790009,
0.4164488912,
0.0628176481,
-0.0163296945,
0.3135467172,
0.4170596898,
0.1798790693,
0.5180502534,
-0.0844293982,
-0.0402147248,
-0.0343479365,
-0.0298484396,
0.0105950646,
0.0120344795,
-0.1521036327,
-0.0000466183,
0.0288308598,
-0.2253950834,
0.0190682933,
-0.0389359966,
0.0478708819,
-0.0167068802,
-0.2692252398,
-0.557072103,
0.5188220739,
0.2009659261,
-0.329957366,
0.5775395632,
-0.1945195049,
-0.2601768672,
0.1905089021,
-0.179751426,
0.8575189114,
-0.2320057899,
0.1530701518,
-0.0931508839,
-0.3358080089,
0.279990375,
-0.4325320721,
-0.0136612607,
-0.0686791465,
0.0142070316,
-0.0639229491,
-0.3193738461,
0.107494697,
0.5550760031,
0.039174065,
0.0568459593,
-0.190391317,
-0.095913291,
0.0254775621,
0.2349725515,
0.1144002602,
-0.1327078491,
-0.0066071954,
0.0858256817,
-0.1981879175,
-0.1961921006,
-0.0707820952,
0.1385369748,
0.1334469616,
-0.1467636377,
0.1382434815,
-0.0539936423,
-0.0569483526,
0.5380521417,
-0.1739408374,
-0.2969220579,
-0.1323027611,
0.4597609341,
0.0470263176,
-0.3815939724,
-0.0140121542,
0.45280388,
0.2481700331,
0.1352086365,
-0.3493241966,
-0.1970512867,
0.1152033359,
-0.062642619,
-0.0331333876,
0.1704403758,
-0.3907627761,
-0.5202932954,
0.0758626759,
0.3839438856,
0.0440746136,
0.0700658858,
-0.2338161021,
0.1925327778,
-0.0393801779,
0.122118853,
0.0389428809,
0.3972512484,
0.0753984749,
0.0174658448,
-0.0109420512,
-0.4464404583,
0.0197866522,
0.2537942231,
0.3440080583,
-0.2685215771,
0.4966939986,
-0.2944136262,
-0.2041377276,
-0.0906015858,
0.1410115659,
0.3131950796,
-0.4004876614,
0.3007010221,
0.0699771345,
0.2724126577,
-0.0875869244,
-0.1474679857,
0.2230045497,
0.1806051731,
-0.0779225454,
-0.275770992,
-0.3409194946,
0.0647656769,
-0.2518688142,
0.154330492,
0.2471301407,
-0.7568341494,
0.035993591,
0.2772007287,
-0.1806927174,
0.4340604842,
0.1817558706,
0.1086574644,
0.0465394221,
0.0083204657,
0.2035630196,
-0.0067308694,
-0.0142891966,
-0.1547662169,
-0.2815597355,
-0.177364096,
0.0064877495,
0.1880189478,
-0.1101573557,
-0.1239976883,
-0.3026311398,
-0.2136257589,
0.2996168733,
-0.0924044177,
0.1689257622,
0.076396279,
0.0154713057,
-0.0232407004,
0.3140021563,
-0.1672373116,
-0.4207925498,
0.1020236537,
-0.0712578893,
0.3043347299,
0.0287027247,
0.1461310983,
0.0224616416,
-0.1086339727,
-0.3524739742,
-0.0193175934,
0.1491246372,
-0.0739312917,
0.053520631,
-0.3656352758,
0.1887580752,
0.105871588,
0.1424255669,
0.2639561594,
-0.1918772161,
-0.1659753323,
-0.0014202707,
0.0538504571,
0.1590599269,
-0.2506591678,
0.1905308664,
0.095718272,
-0.3110485673,
0.0160590596,
0.3221443892,
-0.1197283193,
-0.0757649615,
0.0208640397,
0.4545163214,
-0.2129801661,
0.2867925465,
0.1155598462,
0.1423377395,
-0.0306052119,
0.4425144494,
0.3101653457,
0.0761292949,
0.4919671714,
-0.0862203687,
0.3369765878,
0.5232390761,
0.069639653,
-0.1504470706,
-0.4384795427,
-0.0164783634,
0.3598088622,
-0.4211256206,
0.040346384,
0.1181389764,
0.1521032751,
0.2226316482,
-0.1888799667,
-0.1005477682,
0.0676698238,
-0.2423575222,
-0.2012050152,
0.0536793619,
-0.2410688102,
0.1944408715,
0.2857095599,
-0.0437985249,
0.1294071227,
0.3107999563,
0.0396747217,
-0.2294273078,
0.0982368514,
0.4913253486,
0.1306879073,
-0.0662855282,
-0.1000393182,
-0.0126049165,
-0.06852635,
-0.0895672143,
0.1754462421,
-0.0227646306,
0.0520488694,
0.1915347129,
0.0926476121,
0.1363096237,
0.2215891778,
-0.0598477386,
-0.1363716871,
0.2799269259,
0.1623350382,
-0.371096611,
0.0641646236,
0.111416623,
-0.0446157679,
0.1663719714,
0.0484725088,
0.3469826281,
-0.206287846,
-0.1631239206,
-0.3431837261,
-0.0560137406,
-0.1490934789,
0.2874442935,
-0.1487059146,
-0.0673667267,
0.5298350453,
-0.1145622581,
-0.1195958257,
-0.2176062763,
-0.0045797899,
-0.1946097612,
0.4949950874,
0.3005734682,
0.0117111616,
-0.1784254164,
-0.297154665,
-0.4798891246,
-0.0468935184,
-0.2442490608,
0.3913602829,
0.0142150819,
0.3093050718,
-0.0688217431,
-0.0186908673,
0.406634748,
-0.0441020988,
0.109725371,
-0.023354806,
-0.2180858254,
0.0973769873,
0.4327718914,
0.2211845517,
-0.0986052752,
-0.3581765294,
0.011326313,
0.1744044125,
0.0111421272,
0.0408058651,
0.0218481272,
0.2159700394,
0.5090535879,
0.6151250005,
0.1940449476,
0.1792442054,
0.0992771611,
0.0417761356,
-0.051315181,
-0.1942851841,
0.1955424845,
0.1394192129,
0.0097882971,
0.1717471927,
-0.514379859,
0.328879267,
-0.093254894,
0.0292315669,
-0.1276394129,
-0.1343795061,
-0.1802268922,
-0.1930214465,
-0.3331323862,
0.1861664355,
0.1957949996,
0.2248795331,
0.0822165161,
0.1197487712,
-0.0191668123,
0.0241713673,
0.421518743,
-0.12539047,
-0.1972174048,
0.2731102705,
0.2348906696,
0.2969866097,
-0.1469350457,
-0.3629283905,
-0.0516286194,
0.566426158,
-0.2388068587,
-0.2849757969,
-0.0066740569,
-0.2340874672,
0.0793460608,
0.0303652436,
0.592017293,
0.0352813415,
-0.1686140597,
-0.076913029,
-0.3721186519
] |
https://github.com/huggingface/datasets/issues/2196 | `load_dataset` caches two arrow files? | Thanks @lhoestq! Hmm.. that's strange because I specifically turned off auto caching, and saved mapped result, using `save_to_disk`, to another location. At this location, the following file is created:`355G cache-ed205e500a7dc44c.arrow`
To my observation, both `load_dataset` and `map` creates `cache-*` files, and I wonder what the `cache-*` file from `load_dataset` is for (as I believe the same information is stored in `json-train.arrow`. | Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`? | 61 | `load_dataset` caches two arrow files?
Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`?
Thanks @lhoestq! Hmm.. that's strange because I specifically turned off auto caching, and saved mapped result, using `save_to_disk`, to another location. At this location, the following file is created:`355G cache-ed205e500a7dc44c.arrow`
To my observation, both `load_dataset` and `map` creates `cache-*` files, and I wonder what the `cache-*` file from `load_dataset` is for (as I believe the same information is stored in `json-train.arrow`. | [
0.0172759891,
-0.1464011073,
-0.1149082407,
0.6492553353,
-0.0665467978,
0.3106842637,
0.2409406751,
0.2578831315,
0.3021351397,
-0.2563414276,
-0.0356176086,
0.2787820399,
0.1161758155,
-0.4971508086,
0.2449561059,
0.1934695393,
0.1645392179,
0.041090332,
-0.1407983154,
-0.102236703,
-0.1449192017,
0.1404835284,
0.2229943573,
0.0501030944,
-0.4586229622,
-0.1467895806,
0.0726130158,
0.1264026761,
-0.0452623665,
-0.4037205577,
0.352699995,
-0.0786419213,
0.0307805836,
0.4275517762,
-0.0001186709,
0.0302081108,
0.3575190902,
0.0993109941,
-0.3851464689,
-0.0286419392,
-0.4544886947,
-0.0456946641,
0.1494432986,
-0.1819912195,
0.380058527,
-0.3371662796,
-0.0662366599,
-0.6853268147,
0.4682789147,
0.1548906565,
0.1796655059,
-0.1966748387,
-0.4313081205,
0.0719180927,
0.293679744,
0.1138560027,
-0.0295685306,
-0.0345637873,
-0.149180159,
0.2294981778,
-0.035603404,
0.1215267181,
-0.1098485887,
-0.0463744104,
0.4478718638,
0.1780070513,
-0.112323463,
-0.2661143541,
0.3580048084,
0.053959541,
0.8774024248,
-0.3279372752,
0.0023095459,
-0.3756664395,
-0.2317554504,
-0.0114045292,
0.2280349731,
0.3111106157,
0.1924593896,
-0.0084914602,
-0.2010507286,
-0.4259340167,
0.0605824962,
-0.1790849119,
0.1664554328,
-0.3395425379,
-0.2024619579,
0.3108738363,
0.2397376001,
0.2673693895,
0.2836099267,
-0.4972207546,
-0.3389440775,
0.4030970335,
-0.1985779405,
0.0318642259,
-0.0466745421,
-0.0403826013,
-0.033296112,
0.2953377366,
0.4044396281,
-0.2616675198,
-0.1658654064,
0.1207458451,
0.2782331705,
0.3537445068,
0.2547233403,
0.0268986262,
-0.04615172,
-0.3399738967,
-0.0218215436,
-0.2086741477,
-0.049039524,
-0.0859611928,
0.4438295364,
-0.4126616716,
-0.0931674391,
-0.0895797536,
0.0455820858,
0.0914718434,
0.0405219793,
-0.3477860093,
0.0488014109,
0.0804477483,
0.1820417494,
0.2340862751,
-0.2339141071,
0.0636637807,
-0.010130886,
-0.0300825052,
-0.1814796031,
-0.0180176497,
-0.14446491,
0.2653422356,
0.2735814452,
0.072182782,
0.2267827094,
0.1442111433,
-0.2142869085,
-0.0831866339,
0.4590843618,
-0.2324573398,
0.1928138137,
0.4072645903,
-0.1632725,
0.43477121,
-0.060497459,
0.1209552214,
-0.1324379444,
0.5263394713,
-0.4890320301,
-0.2337022722,
0.1063234657,
0.1635842472,
-0.1018487662,
0.2115261257,
-0.6663519144,
0.0656587929,
0.3233994246,
-0.2094892859,
0.2708795965,
0.0823251903,
-0.2421627194,
-0.3829836249,
-0.1247375011,
0.3206804395,
-0.3754128814,
-0.1680777371,
-0.1721185297,
-0.1740687788,
-0.234756887,
0.2553411126,
-0.5216799378,
0.3648765683,
-0.4526237547,
0.1768103838,
0.546233952,
-0.3530586958,
-0.422203064,
0.2921745479,
-0.0394612104,
0.1639524251,
0.1800560057,
0.2358597517,
-0.1294048429,
-0.1869403273,
-0.026511889,
-0.0481117666,
0.1490018517,
-0.252238065,
-0.0990573391,
-0.0420262925,
0.0355104879,
-0.0342945531,
-0.2268188447,
0.0001689754,
0.0800405294,
-0.0962591544,
0.1690088511,
0.1523700058,
0.2140231133,
0.2017191052,
-0.114455536,
-0.2469074726,
0.2298973203,
0.1480558813,
-0.7635052204,
0.3079407513,
-0.1594991684,
-0.7619140148,
-0.0747816414,
-0.1076102331,
-0.1010562181,
-0.0893120691,
-0.2672030926,
-0.0377834812,
-0.034367457,
0.1290230155,
0.0996727496,
-0.1897414029,
-0.2920210063,
0.5691559911,
0.0448394418,
-0.060855262,
-0.5005733371,
0.035024628,
0.2355832905,
0.2694955468,
-0.3725484312,
-0.1414362192,
0.008483937,
-0.169879064,
-0.0955609083,
0.2989889681,
0.1324431449,
0.2216419727,
0.1800315082,
0.2426695526,
0.074395217,
-0.06781362,
0.2297537476,
-0.1207530424,
0.1633174419,
-0.3794220686,
-0.2856491208,
0.0898486525,
-0.1546989977,
0.0992563963,
-0.1303555369,
-0.2762313783,
0.1194213107,
0.0226737186,
0.0369799286,
-0.1994016618,
0.0539999753,
0.2509945035,
0.3887885809,
0.4738149941,
0.1165864319,
0.1842741072,
0.3787925243,
-0.2087325156,
-0.1766486168,
0.1748844385,
-0.3041083217,
-0.4068354368,
-0.1282896549,
0.5813219547,
0.6566800475,
0.0224440172,
0.2662492096,
-0.0583367422,
0.2058678269,
-0.1070435792,
0.2185212225,
-0.1296967119,
0.3127494454,
0.1337822676,
0.0319624878,
-0.0801476687,
-0.314345032,
0.0470703319,
0.2231113911,
0.0093089547,
-0.1905514896,
0.1201200485,
-0.0449032784,
0.1156196892,
-0.2616872191,
0.1045315638,
-0.1441282332,
-0.1079821885,
-0.0595246032,
0.1823108196,
0.2603965104,
-0.135558337,
-0.398545891,
0.5211709142,
-0.0771156326,
-0.0677685291,
-0.4286521971,
-0.1353069693,
0.0023260787,
0.0156934857,
0.047366485,
-0.1873984039,
0.0727297813,
-0.0742986351,
0.2118713409,
-0.2597361207,
0.1914971769,
0.0028845286,
0.1121252403,
-0.0621774867,
-0.1794526875,
-0.0543341003,
-0.3448908329,
0.0772265047,
-0.1360481679,
-0.0512221381,
-0.3175913095,
-0.0746163949,
-0.1079361662,
0.1040944606,
-0.0770919919,
-0.073229894,
0.0474503413,
0.0155518875,
0.2687013745,
-0.0390587337,
0.0824764296,
-0.0717997625,
-0.3182492852,
0.2286306024,
0.023494672,
0.0890924633,
-0.5059280992,
-0.6877740622,
0.3267150521,
-0.2294781953,
0.0065218434,
0.1465345621,
0.0250761211,
0.1810815483,
0.0638732463,
-0.6293525696,
0.1646167636,
-0.1493867338,
0.118159458,
-0.3938651681,
-0.0835519135,
0.1742082238,
0.1690077335,
0.0234812051,
-0.2177425623,
-0.0835140869,
0.2013216764,
0.0812736228,
0.3253592551,
-0.0374764651,
0.1487572789,
-0.1572585702,
0.6849865317,
0.1634375155,
0.240847826,
0.1585011631,
0.3259361982,
0.4771511257,
-0.2095799595,
0.0312421545,
-0.1076795757,
-0.1500516534,
-0.0661487058,
0.1684326231,
0.1594666541,
-0.138969481,
0.1794697493,
0.0588188618,
-0.1254653037,
0.0917906091,
0.123193711,
-0.515414238,
-0.0883930624,
0.0399131551,
-0.1238293126,
-0.1138725728,
0.0483702272,
-0.0279453807,
0.0119855292,
0.4236931205,
0.0629796982,
-0.3388800025,
0.0458811633,
-0.2007434368,
0.110053122,
-0.0827292278,
-0.0739976764,
-0.0187990069,
0.0797374994,
0.1910791397,
0.0900402591,
0.6883507967,
-0.0268438831,
-0.0061348816,
0.1408072859,
0.2076439261,
-0.3507490456,
0.0895613208,
0.18443048,
0.3399961889,
-0.0810737908,
0.297380656,
-0.0714234114,
-0.0677845404,
-0.3177435994,
0.4325812161,
-0.3020209372,
-0.2460195571,
-0.1424421072,
-0.1041009054,
0.0907695889,
-0.274502933,
-0.0453041494,
-0.1495139897,
-0.1426375508,
-0.0587911233,
-0.1975502074,
-0.0950499624,
-0.0316322334,
-0.1203268021,
0.434266448,
0.0305791683,
0.0851260871,
0.3867998719,
0.3048562407,
0.1845516115,
0.5441380739,
-0.1185545698,
-0.048298046,
0.0191377364,
-0.1058680117,
0.0057777241,
-0.0007479191,
-0.1402359903,
0.0542885102,
-0.0021305233,
-0.3232116699,
0.046211414,
-0.1101755723,
0.1355287284,
-0.0768930316,
-0.3059689105,
-0.570868969,
0.497803539,
0.1715553254,
-0.291749686,
0.6982321143,
-0.2817906439,
-0.2447004318,
0.1893452108,
-0.1960579455,
0.8117067814,
-0.0243189782,
0.2095356882,
-0.0690744668,
-0.317486614,
0.2996849418,
-0.3061922789,
0.0094764791,
-0.0919212401,
0.047029078,
-0.031089142,
-0.2858133912,
0.02595485,
0.5388067365,
0.0217837691,
-0.0291945469,
-0.1891041994,
0.0749521405,
-0.0560937449,
0.1630779803,
0.0999962986,
-0.131926924,
0.0483122095,
0.1163754165,
-0.1305359751,
-0.1711046398,
0.0016543381,
0.0836493447,
0.0644806549,
-0.1286582798,
0.1008423716,
0.0099275708,
-0.0088807829,
0.5330635905,
-0.0894705206,
-0.352355063,
-0.1207577139,
0.4396196604,
0.0384690017,
-0.4387910664,
-0.0710995495,
0.4661089182,
0.3222035468,
0.229512915,
-0.2802363336,
-0.3105465472,
0.1266948134,
-0.0466569141,
-0.0474577025,
0.1918980479,
-0.375821203,
-0.4268637598,
0.0417730957,
0.4487207234,
0.0104907267,
0.0668503121,
-0.2820747495,
0.2307263613,
-0.0048327595,
0.0974723399,
0.062956892,
0.3662075102,
0.0885038972,
0.0299824718,
-0.1947008371,
-0.4164143503,
0.0288322754,
0.3071614802,
0.4012680352,
-0.2311731428,
0.5021207333,
-0.3150407076,
-0.1916741133,
-0.1308928877,
0.2161298543,
0.3525097072,
-0.4439142346,
0.1858521402,
-0.0059821941,
0.278999269,
-0.0248101242,
-0.1342750937,
0.1655059457,
0.1758141667,
-0.0388971083,
-0.2350425422,
-0.3576950133,
0.0346176252,
-0.2280536592,
0.1640295982,
0.1866444051,
-0.7211914062,
0.063842386,
0.2420559973,
-0.1967249662,
0.38302055,
0.2259816825,
0.0917928442,
-0.0010107961,
0.0435573459,
0.2381799817,
-0.0527109727,
-0.0253877845,
-0.1692887843,
-0.2760155797,
-0.1665809453,
-0.0204819106,
0.1742616147,
-0.085362941,
-0.0603219382,
-0.3280654252,
-0.2206214666,
0.1910259128,
-0.0904951841,
0.2266638726,
0.1168133467,
0.0530372337,
-0.1274452657,
0.2419677377,
-0.170364663,
-0.3918954134,
0.0772190765,
-0.046077963,
0.2237463444,
0.0458694734,
0.17449826,
-0.0128609017,
-0.1075057685,
-0.1906543672,
0.0292286631,
0.1161240712,
-0.0261584967,
0.0317419618,
-0.3172151148,
0.1668660343,
0.0520870164,
0.151622057,
0.309353739,
-0.2213670462,
-0.1850500405,
-0.0657382235,
0.0856714025,
0.1444751322,
-0.2371691763,
0.198524043,
0.1094168127,
-0.2801844776,
-0.030511871,
0.2940532565,
-0.0821691155,
-0.0816453695,
0.1285955906,
0.4023341537,
-0.255273968,
0.3821400106,
0.1273997724,
0.2081644833,
-0.0227916725,
0.3979857564,
0.2878244817,
0.1226841211,
0.3527513742,
-0.0447158292,
0.3252018392,
0.567937851,
0.0178866275,
-0.0907018557,
-0.4145135581,
-0.0341380835,
0.3077032566,
-0.4453383684,
0.0572335236,
0.2392230034,
0.2952445745,
0.0887698233,
-0.167503655,
-0.1869409382,
0.0120243542,
-0.1725142151,
-0.1931069642,
0.1219044998,
-0.3153282404,
0.2408368886,
0.2190693021,
-0.0109223323,
0.1480472088,
0.3217511177,
0.0533425137,
-0.1923637241,
-0.0535537824,
0.4184316099,
0.1564746201,
-0.0252307877,
-0.0622274578,
0.0233763959,
-0.0746110454,
-0.1131288558,
0.1222536862,
-0.018667303,
-0.0272837281,
0.1956579387,
0.109356977,
0.134221077,
0.2877747118,
-0.0464048013,
-0.1271412969,
0.3520171642,
0.1325875223,
-0.6029273272,
0.1157258675,
0.1073771045,
-0.0242129546,
0.1924083978,
0.1308599114,
0.3290370405,
-0.1656909585,
-0.0892706066,
-0.3895637393,
-0.0767214894,
-0.084927775,
0.2677375078,
-0.1598470807,
-0.1504535377,
0.5574600101,
-0.1089919209,
-0.0884576663,
-0.2930596173,
0.0069545135,
-0.147317335,
0.5219278336,
0.1645272076,
-0.0285381302,
-0.1346674263,
-0.2367603183,
-0.5200848579,
0.042393472,
-0.2269410193,
0.4772407711,
-0.0421165489,
0.3377252519,
-0.1472653151,
-0.0670681447,
0.3972638845,
0.07089632,
0.0967218578,
-0.0152609013,
-0.2222390473,
0.1080490798,
0.3750352263,
0.2518650293,
-0.1033042669,
-0.3137203157,
0.0358817354,
0.1303763092,
0.0149556324,
0.0387948304,
-0.0815357268,
0.189853251,
0.4535370171,
0.6795008183,
0.1503204703,
0.0926537216,
0.0682909042,
-0.0049877241,
-0.1192305833,
-0.2603259087,
0.1461517811,
0.1206532791,
0.0472408459,
0.133036077,
-0.470520556,
0.3438642025,
-0.0892517716,
-0.03156434,
-0.1404591948,
-0.129742682,
-0.1468492895,
-0.1365947723,
-0.3660118282,
0.204311341,
0.158000946,
0.1742908359,
0.0356455222,
0.1503092349,
-0.0317370296,
0.0285406634,
0.3936862946,
-0.1578486562,
-0.1641331613,
0.2927775979,
0.2191907167,
0.2682181597,
-0.2180184424,
-0.3902974129,
-0.0239673033,
0.5540383458,
-0.2181407064,
-0.2416338921,
-0.0371699743,
-0.258556664,
0.1128588095,
0.0346942097,
0.6675111055,
0.1050682738,
-0.1629906893,
0.0088213682,
-0.3090759516
] |
https://github.com/huggingface/datasets/issues/2196 | `load_dataset` caches two arrow files? | This is a wrong report -- `cache-*` files are created only my `map`, not by `load_dataset`. | Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`? | 16 | `load_dataset` caches two arrow files?
Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`?
This is a wrong report -- `cache-*` files are created only my `map`, not by `load_dataset`. | [
-0.0013233125,
-0.2079308629,
-0.1252865791,
0.741124928,
-0.1488291025,
0.2700351477,
0.2812333703,
0.2348197699,
0.3605192304,
-0.2358907163,
-0.0116219595,
0.2067557871,
0.134119153,
-0.4797015786,
0.1827089787,
0.251285702,
0.2364549488,
0.0539578274,
-0.1515447795,
-0.1846309304,
-0.1211208999,
0.1802387387,
0.1390397102,
0.0808778703,
-0.4849407077,
-0.1015204713,
0.1177734137,
0.1523871422,
-0.1212622821,
-0.3925188482,
0.3373829424,
-0.0722729862,
0.0059332475,
0.4784199595,
-0.0001242887,
0.0004776493,
0.3728578985,
0.0655028969,
-0.2765643597,
0.0549494177,
-0.3939551115,
-0.1579759717,
0.2119980156,
-0.2245273292,
0.3471080959,
-0.3236004114,
-0.1582757831,
-0.6293210387,
0.5224637985,
0.201578781,
0.1405275762,
-0.2274220735,
-0.4012844265,
0.1085537151,
0.2451901585,
0.1741997153,
0.0215821341,
0.0170849487,
-0.2218234837,
0.257230252,
-0.0648385435,
0.1377793252,
-0.0872286707,
0.0792113841,
0.4362149835,
0.1867982447,
-0.0146098658,
-0.2205651104,
0.3009512722,
0.0931445733,
0.9287807345,
-0.3096577525,
-0.0284921061,
-0.3948612809,
-0.2127704918,
-0.0490796864,
0.2915644944,
0.3378342688,
0.0747811198,
-0.0071368902,
-0.1541529447,
-0.4959347546,
0.106057696,
-0.1487175226,
0.1050287187,
-0.3734422624,
-0.202899605,
0.3179076314,
0.2064976543,
0.3100797534,
0.3849571049,
-0.4313020706,
-0.3036457896,
0.3299284279,
-0.2232827544,
0.0779075101,
-0.0468330868,
-0.0520558842,
0.0498712808,
0.2283989489,
0.3403443396,
-0.3397464156,
-0.2176028788,
0.0817576647,
0.2542228103,
0.3434743285,
0.2462421656,
0.1183109283,
-0.0782852098,
-0.3428348899,
-0.0451069698,
-0.2441421896,
-0.0325654596,
-0.1506536007,
0.3954873383,
-0.3582634926,
-0.060370557,
-0.1741027683,
0.1083909273,
0.0602606274,
0.0574861616,
-0.4677243531,
0.0272938274,
0.1005067304,
0.1709107906,
0.3066872954,
-0.1498605311,
0.1831598282,
-0.0014761798,
-0.0591006763,
-0.1941266358,
-0.0403831303,
-0.1624012142,
0.2471526265,
0.2412080765,
0.0371519178,
0.2517971396,
0.1460357755,
-0.148576051,
-0.1187229604,
0.3654901385,
-0.1904855222,
0.1931568831,
0.3797283471,
-0.0661889911,
0.4204210341,
0.0000279802,
0.0562608391,
-0.1615724862,
0.5288683176,
-0.5380878448,
-0.2114273608,
0.0173042137,
0.1125978306,
-0.1353360116,
0.2883087099,
-0.6906571984,
0.0383641645,
0.3620167375,
-0.1594407558,
0.2597056031,
0.1579668373,
-0.2269218564,
-0.3358775377,
-0.1293584406,
0.4049051106,
-0.4220992029,
-0.1894840151,
-0.2243158221,
-0.1474877745,
-0.0534976684,
0.2821418345,
-0.5153653026,
0.4251534045,
-0.5116041303,
0.1266725808,
0.5514278412,
-0.3688093424,
-0.4169303179,
0.3923600912,
-0.05749299,
0.0401590243,
0.3320167363,
0.1701673865,
-0.1255356818,
-0.1716518253,
-0.0239933394,
-0.0854509473,
0.1573118418,
-0.1866729259,
-0.1431427598,
-0.021327015,
0.1980860084,
-0.1080156714,
-0.176161617,
0.0533610992,
0.1160894632,
-0.0761265978,
0.2507043481,
0.1806486696,
0.1387555301,
0.2073519826,
-0.1048339903,
-0.2661546171,
0.222242415,
0.2363766432,
-0.7416952252,
0.2548565865,
-0.1476519108,
-0.7274239659,
0.0331728905,
-0.0695194155,
-0.1548352093,
-0.0574830025,
-0.220203042,
0.0517603904,
-0.065508835,
0.1196310073,
0.0642775595,
-0.2124180943,
-0.2887093723,
0.6405113339,
-0.072065413,
-0.0352002159,
-0.4461596608,
0.1213583574,
0.252979368,
0.2813433409,
-0.2945743799,
-0.2160004079,
0.0829771832,
-0.0783961713,
-0.138754487,
0.2713427544,
0.134809792,
0.1769556105,
0.2255709767,
0.1641740948,
0.0336066708,
-0.135171622,
0.2525275946,
-0.0646808892,
0.1850171089,
-0.3635969758,
-0.246309489,
0.073218517,
-0.1819235235,
0.0834353417,
-0.1729750037,
-0.2876411676,
0.2575790286,
0.0241395906,
0.0010643303,
-0.2000223696,
0.1289941967,
0.2738911808,
0.3292222023,
0.4564263225,
0.1869228482,
0.0687473938,
0.4439370036,
-0.1352471262,
-0.223104775,
0.2293701172,
-0.3471648991,
-0.4305858612,
-0.0428600758,
0.4795964956,
0.6346253157,
0.052427344,
0.24301745,
-0.0588978529,
0.2254142016,
-0.1210732907,
0.2058811635,
-0.1258013994,
0.2707573473,
0.2693888247,
-0.0361574739,
-0.1910194457,
-0.3453929424,
0.1269650161,
0.2785903811,
0.0752325431,
-0.3163998127,
0.022024639,
-0.0005506352,
0.000988923,
-0.2347725481,
0.1554814875,
-0.1514724195,
-0.0571272559,
-0.0359407663,
0.1012453884,
0.3760835826,
-0.1483341753,
-0.3818005621,
0.4429107904,
-0.0317030959,
0.0120565835,
-0.4359980226,
-0.0773774534,
0.0062158769,
-0.0201942585,
0.0612643547,
-0.0691550821,
0.1264528334,
-0.1897957623,
0.2256264985,
-0.2579313517,
0.2238739431,
0.0586702563,
0.1991297454,
-0.0722821653,
-0.0932448208,
-0.0063902289,
-0.3061403632,
0.0402891301,
-0.1290148497,
-0.0858143196,
-0.3608879149,
-0.0347953662,
-0.2356936783,
0.155282855,
-0.0740583763,
-0.120993495,
0.0866804942,
0.0295678005,
0.204562366,
0.0450366884,
0.132786423,
-0.0457832664,
-0.3009674549,
0.1279264838,
0.0439738072,
0.1046279296,
-0.537697494,
-0.7024540305,
0.2538052499,
-0.1244832501,
-0.0008705002,
0.1646631956,
0.0071903914,
0.1146520972,
0.0239119753,
-0.6430917978,
0.0776429623,
-0.1291879117,
0.100147523,
-0.4377546012,
0.031503506,
0.2254791856,
0.0922547206,
0.0403307639,
-0.2202932835,
-0.1112453789,
0.1473978013,
0.1006073505,
0.3648708165,
0.0325325169,
0.3112597466,
-0.1857200563,
0.607345283,
0.2476836294,
0.2405097783,
0.1981953532,
0.2462701201,
0.4493068457,
-0.1849255264,
0.0052214712,
-0.1256704926,
-0.0958620161,
-0.0745298862,
0.1621601731,
0.1993876398,
-0.1486027837,
0.121799089,
0.1278693974,
-0.3149560988,
0.1301391274,
0.0233467501,
-0.4966553748,
-0.0734959692,
0.0481186882,
-0.1772637665,
-0.1590230167,
0.017950099,
-0.0380285531,
0.0554811433,
0.483253777,
0.0229956955,
-0.3681586385,
0.0419557393,
-0.2726771533,
0.0945154727,
-0.144454658,
-0.0615254305,
0.0473866612,
0.1296502948,
0.2777794003,
0.1239323616,
0.7186539769,
-0.0076627936,
0.0801282525,
0.1951047331,
0.2021510303,
-0.3993444741,
0.0818052739,
0.0721870735,
0.3692383468,
-0.0813333839,
0.3179684579,
-0.1737512797,
-0.0363956653,
-0.3998004198,
0.4534442723,
-0.3241195977,
-0.3078626394,
-0.1848666668,
-0.1280237734,
0.0372168124,
-0.2122395337,
-0.0612464286,
-0.1030319482,
-0.0534728169,
-0.1018497273,
-0.1828901023,
-0.132600233,
-0.0106485672,
-0.1577117741,
0.5028897524,
0.0727728009,
0.1424805522,
0.3264437318,
0.2844716012,
0.1006740481,
0.6179876924,
-0.0507178456,
0.0110499859,
-0.0069832448,
-0.1388685554,
-0.0391126573,
0.0158234388,
-0.2123360783,
0.0428081676,
-0.0525371283,
-0.2650174499,
0.1317891777,
-0.0345819369,
0.0665621236,
-0.1058306545,
-0.2407786846,
-0.4946711063,
0.4943988025,
0.2218943685,
-0.2921308875,
0.7134969234,
-0.2678270638,
-0.2052764893,
0.1416470408,
-0.2339222431,
0.8169107437,
-0.1017176583,
0.0754899681,
-0.0712854937,
-0.2967707813,
0.2919248939,
-0.398455143,
-0.0409766324,
-0.1412092447,
-0.0110898297,
-0.0459517464,
-0.2833775878,
-0.0148656797,
0.5497391224,
0.0746046081,
0.0041171163,
-0.2025577128,
0.0279837549,
-0.0603115708,
0.2044802606,
0.1568811536,
-0.1264694035,
-0.0402074307,
0.0246013924,
-0.1684398949,
-0.1137954965,
0.0108402371,
0.1596242785,
0.1040775105,
-0.302012682,
0.0986560583,
-0.0503766015,
0.0130166113,
0.4422309101,
-0.0722522363,
-0.388096422,
-0.158960551,
0.4739690423,
0.0072585419,
-0.3844291568,
-0.0712878406,
0.3765247166,
0.2823238373,
0.2021593153,
-0.3082775176,
-0.189104557,
-0.0379739441,
-0.102207236,
-0.0399360284,
0.1005173475,
-0.3779097497,
-0.5546373129,
0.0911150575,
0.4258131087,
0.0130573418,
0.0490886755,
-0.2318654358,
0.2566054165,
0.0273942277,
0.1178206652,
0.0247646086,
0.4632154703,
0.0083300099,
0.0266211983,
-0.0653413981,
-0.4270563722,
0.0455711707,
0.3402091265,
0.4247436821,
-0.1800316274,
0.4000794291,
-0.28071931,
-0.1789235771,
-0.1061398983,
0.1377503574,
0.397651881,
-0.4959984422,
0.1845719516,
0.0446944349,
0.3036743701,
-0.0690997466,
-0.1082927212,
0.2218026221,
0.2455171347,
-0.0082298219,
-0.2096360922,
-0.3218846917,
0.0871957392,
-0.2704620957,
0.1277165413,
0.2162761837,
-0.7216895223,
0.0634285882,
0.3088504374,
-0.1518503278,
0.3722360432,
0.2691307366,
0.0742094517,
-0.0098019307,
0.0939174891,
0.2346450984,
-0.0647762194,
-0.0302752592,
-0.1650413871,
-0.2098021954,
-0.1362678409,
0.0189259425,
0.2167364657,
-0.0432213172,
-0.0407195315,
-0.2283443511,
-0.2332425714,
0.0817332119,
-0.0844751298,
0.1314608902,
0.0993549973,
-0.0014922637,
-0.0613767058,
0.3157810867,
-0.2510996461,
-0.5019792318,
0.0555395894,
-0.0692733675,
0.2259493768,
-0.0372877121,
0.183909893,
0.0821006,
-0.053561084,
-0.2882063687,
0.0313706882,
0.1032677293,
0.040359024,
0.0333199687,
-0.3170483708,
0.2241144329,
0.1492218971,
0.2395610511,
0.2552301586,
-0.2194755375,
-0.0856136531,
-0.0276295077,
0.0373449102,
0.0298785344,
-0.2787129879,
0.1930204481,
0.1288043708,
-0.3174738288,
-0.001282379,
0.3024916053,
-0.1544516981,
0.0009867214,
0.0811037645,
0.3936610818,
-0.2308752239,
0.3140847087,
0.2147595733,
0.1096524,
0.0043118568,
0.4021008909,
0.2612258196,
0.0197192244,
0.4292601347,
0.0874662697,
0.3169120848,
0.5410941839,
0.0506456532,
-0.2002194226,
-0.4718764424,
0.0128363874,
0.3030825853,
-0.4003794491,
-0.0461872071,
0.1700553596,
0.2563854754,
0.1450041831,
-0.1513086259,
-0.2486268282,
-0.0435137153,
-0.1459731609,
-0.1100515351,
0.0446673557,
-0.2654961348,
0.2061279714,
0.2095095515,
-0.0556971468,
0.1547969878,
0.272615999,
0.0718445256,
-0.2558668256,
-0.0111094825,
0.4257178307,
0.1911604255,
-0.0289074108,
-0.167975843,
0.0847852975,
-0.1648779064,
-0.0742945224,
0.2118580192,
-0.0026377421,
-0.0213932395,
0.16765365,
0.2285774052,
0.0593464002,
0.2703258991,
-0.0494425744,
-0.1172113791,
0.3435635567,
0.1106570959,
-0.5399622917,
0.0261543207,
0.0732435584,
-0.0348530039,
0.2287302166,
0.0645059794,
0.2918297648,
-0.1759207249,
-0.090645276,
-0.4421071112,
-0.0463002101,
-0.1719373167,
0.2332710028,
-0.1420275569,
-0.1617719233,
0.4996336102,
-0.0603867583,
-0.1057100818,
-0.3211372197,
-0.0186655521,
-0.2300727069,
0.3697825074,
0.1730163842,
0.0391442776,
-0.1572854221,
-0.2795974612,
-0.5812826157,
0.0849062055,
-0.2160642296,
0.4904791713,
-0.0278436504,
0.336250335,
-0.1336785555,
0.0438880548,
0.4437273443,
0.0589888617,
0.1473847032,
-0.0009263931,
-0.1656159461,
0.0090923961,
0.3874019384,
0.3115996718,
-0.1493278444,
-0.338329345,
0.0509229079,
0.1351896226,
-0.0269810408,
0.0927214772,
-0.1029009223,
0.2029489279,
0.5067507029,
0.6720571518,
0.1903526634,
0.2355192006,
0.0533223003,
0.0357371196,
-0.0773630142,
-0.2588538826,
0.1017115861,
0.1399802566,
0.0133875608,
0.1179542989,
-0.4730013609,
0.3262005746,
-0.0933827311,
0.0197410956,
-0.1346083879,
-0.1239296049,
-0.2015503347,
-0.1333200932,
-0.3255668283,
0.131202206,
0.1506087929,
0.1228455678,
0.0316737182,
0.0998738706,
0.0197812617,
-0.0221258923,
0.3603231907,
-0.14923127,
-0.1052181721,
0.2237623632,
0.3252859414,
0.3091467619,
-0.256737262,
-0.3304000497,
-0.0470988676,
0.5866268277,
-0.2299799174,
-0.2018123269,
0.0040308461,
-0.2191023976,
0.1260609329,
0.039979361,
0.6796938181,
0.0515369214,
-0.1524150074,
-0.0491040051,
-0.3140853047
] |
https://github.com/huggingface/datasets/issues/2195 | KeyError: '_indices_files' in `arrow_dataset.py` | Thanks @samsontmr this should be fixed on master now
Feel free to reopen if you're still having issues | After pulling the latest master, I'm getting a crash when `load_from_disk` tries to load my local dataset.
Trace:
```
Traceback (most recent call last):
File "load_data.py", line 11, in <module>
dataset = load_from_disk(SRC)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/load.py", line 784, in load_from_disk
return DatasetDict.load_from_disk(dataset_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/dataset_dict.py", line 692, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 634, in load_from_disk
if state["_indices_files"]:
KeyError: '_indices_files'
```
I believe this is the line causing the error since there may not be a `_indices_files` key in the older versions:
https://github.com/huggingface/datasets/blob/b70141e3c5149430951773aaa0155555c5fb3e76/src/datasets/arrow_dataset.py#L634
May I suggest using `state.get()` instead of directly indexing the dictionary?
@lhoestq | 18 | KeyError: '_indices_files' in `arrow_dataset.py`
After pulling the latest master, I'm getting a crash when `load_from_disk` tries to load my local dataset.
Trace:
```
Traceback (most recent call last):
File "load_data.py", line 11, in <module>
dataset = load_from_disk(SRC)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/load.py", line 784, in load_from_disk
return DatasetDict.load_from_disk(dataset_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/dataset_dict.py", line 692, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 634, in load_from_disk
if state["_indices_files"]:
KeyError: '_indices_files'
```
I believe this is the line causing the error since there may not be a `_indices_files` key in the older versions:
https://github.com/huggingface/datasets/blob/b70141e3c5149430951773aaa0155555c5fb3e76/src/datasets/arrow_dataset.py#L634
May I suggest using `state.get()` instead of directly indexing the dictionary?
@lhoestq
Thanks @samsontmr this should be fixed on master now
Feel free to reopen if you're still having issues | [
-0.3437004685,
0.0625088513,
-0.0619884171,
0.6979849339,
-0.0762992799,
0.1504234374,
0.1940688789,
0.49317348,
0.5131546855,
0.1480903327,
0.0192213506,
0.1839222908,
-0.3918608129,
0.0680307746,
-0.1045260876,
0.0790596083,
0.0853405297,
0.2412601113,
-0.1544324458,
-0.0522909947,
-0.2806541026,
0.1007368565,
-0.1309830993,
0.211374104,
-0.2218929976,
0.1231650412,
-0.0895239338,
0.489026159,
-0.1853998601,
-0.7146964073,
0.4884225726,
-0.0012379913,
0.1987974495,
0.6145879626,
-0.0001211874,
0.2563546598,
0.3283888996,
0.0076413453,
-0.3190931976,
-0.332614243,
-0.2397474647,
-0.1572864354,
0.3840706944,
-0.1370293349,
0.1061332747,
-0.4474046528,
-0.3572835326,
-0.3314715624,
0.2223310769,
0.0783567727,
0.1171720922,
0.3026998341,
0.207417801,
-0.1436064988,
0.2289529741,
0.0077804141,
0.104986757,
0.5003935099,
0.1849451661,
-0.293407768,
-0.1152013838,
0.1408636868,
-0.1057001948,
-0.0338395722,
0.355712682,
-0.0116484892,
0.5778523684,
-0.1533568054,
-0.0614433065,
0.1703199595,
0.7022149563,
-0.1459216475,
-0.4514219165,
-0.3354021311,
-0.1894250512,
-0.2096370459,
0.2590704262,
-0.2555753887,
-0.233031407,
0.155056715,
0.1738684773,
-0.1955356002,
0.0564367026,
0.2905202806,
-0.2734231353,
0.3019710779,
0.0345149972,
-0.0303231217,
0.6314468384,
-0.0803368688,
0.0911601782,
0.165660724,
-0.1702354848,
0.0807329118,
-0.2672143579,
-0.0388831981,
0.1909448653,
-0.3841377795,
-0.2094096243,
0.0528948233,
-0.0255246852,
0.1885950863,
-0.1497022808,
0.0399959534,
0.6687848568,
0.2489634603,
0.1215689778,
0.2297084033,
0.2717272937,
0.2171473205,
-0.0350569561,
0.0183775052,
0.0184037909,
-0.3471921086,
0.0448059887,
0.1191125363,
0.3112996519,
-0.3126896024,
-0.0694164336,
0.0593047179,
-0.0624833144,
-0.2015407234,
0.1370554417,
0.3150916994,
0.15584445,
0.5801064968,
0.0374667719,
0.1970071942,
-0.0338270888,
0.3713239729,
-0.1358800381,
-0.258133769,
-0.0995747149,
-0.0013663732,
0.1081540883,
-0.5095403194,
0.2359857261,
-0.0475410707,
0.0749818832,
0.0100534111,
-0.1632345319,
0.0840719417,
0.1596420705,
0.3046087623,
-0.1820001155,
0.2101746798,
0.3970348239,
-0.3919407129,
-0.152330935,
0.123846747,
-0.2913795114,
-0.578281045,
-0.3056542277,
0.1312685162,
0.1295808405,
0.0252592675,
-0.2260642797,
-0.1392921209,
0.111480698,
0.0196709558,
-0.0214506276,
-0.0969822332,
-0.0833032578,
-0.1675640494,
0.015969798,
0.3993792832,
-0.5810671449,
-0.0023691207,
-0.2711958885,
-0.1212871596,
-0.2390401512,
0.2816367447,
-0.4063344896,
0.2037548721,
-0.3347819448,
-0.134803161,
0.3043563366,
-0.4426822066,
-0.497435987,
0.352065742,
-0.0488601625,
-0.1117117107,
0.1396111846,
-0.1120445654,
0.1941484213,
-0.0449749716,
0.4687686861,
0.0551270433,
0.0712262467,
-0.0960200876,
-0.0715620965,
-0.1324856281,
0.0340085179,
0.3673785627,
0.0757357851,
-0.1486504823,
-0.0234472677,
-0.1910146773,
0.3385563493,
-0.0337543301,
-0.0971992612,
0.3182923198,
0.2205264121,
-0.0087159649,
0.0638509616,
-0.0000372604,
-0.4078007042,
0.4620514512,
0.1059392095,
-0.0443779752,
-0.3058127463,
0.0868809596,
-0.233858794,
0.1178291291,
-0.3985092044,
0.0907854065,
0.0071389526,
-0.1555869877,
-0.1538615823,
-0.107643187,
-0.3897002637,
-0.2656812668,
0.0552961752,
0.2186610997,
-0.1987505257,
0.2255679965,
-0.1129232869,
-0.0787863433,
-0.0303893834,
0.1103978157,
-0.0472366847,
-0.2692548931,
-0.1994895041,
0.3676318228,
0.2034950256,
0.0388878435,
-0.130207926,
0.0433960706,
0.2617530227,
-0.0059620216,
0.3687925041,
0.3228163421,
0.0084588379,
-0.1577736437,
0.0768167973,
0.4362379909,
-0.1849121898,
0.3767447472,
-0.0632538423,
0.04991097,
-0.000945881,
0.0831130445,
0.1180702671,
-0.5903173089,
-0.0254218578,
-0.1207480878,
0.3981436789,
-0.0711293891,
-0.031861946,
0.0112183318,
0.2275996506,
-0.098468855,
0.1662926674,
0.0018182083,
-0.1907742918,
0.0243228674,
0.043133609,
0.2312742472,
0.19580625,
0.1379644573,
-0.0030733608,
0.080564335,
0.1951950192,
-0.1046298072,
0.3564743102,
0.0686342865,
0.2952165604,
0.263284266,
-0.2636423409,
-0.1510629505,
-0.2133148313,
-0.0609142408,
-0.1362899244,
0.3755884171,
-0.2155832648,
-0.0201136954,
-0.4201763272,
-0.2314468622,
-0.1256988347,
-0.3376941085,
-0.1507585347,
-0.4368818402,
-0.0883781239,
0.2107358575,
-0.2474736124,
0.0550899878,
-0.1970358193,
-0.1132628918,
0.1789670885,
-0.0340479352,
0.0601627529,
-0.3995399475,
-0.205982551,
-0.0277683288,
0.4963711798,
-0.1698490679,
-0.0224510226,
0.0206513405,
0.0296297893,
-0.0853549391,
-0.000594154,
0.1873171926,
-0.1565775126,
-0.0260384195,
0.1472346038,
0.3131292164,
-0.0509981997,
-0.2090308964,
0.1667182744,
-0.1248662919,
-0.2623378038,
0.1546898335,
0.0747200102,
0.1215400696,
-0.0419440195,
-0.1364702582,
-0.2812354565,
-0.465927422,
0.1132293642,
0.1329468191,
0.3265405595,
0.3057713509,
0.256975174,
0.2501544058,
0.1969927549,
-0.1252462566,
-0.1024908051,
-0.1609047502,
0.0975890607,
0.0345189683,
-0.1683222204,
-0.147705555,
0.0333468914,
0.1063585728,
-0.145520255,
-0.5225365758,
0.0735286176,
0.0396970212,
0.3337233663,
-0.0432083458,
0.1500979215,
0.2738484442,
0.2244728208,
-0.1346718669,
0.08239007,
-0.071634464,
-0.052847445,
0.1690415293,
0.0709919557,
0.0759247839,
0.6219990253,
-0.1741819531,
0.9047240019,
-0.0850611031,
0.098351717,
0.3507146835,
0.0271196496,
0.3714458942,
-0.3195247054,
-0.3450510502,
-0.3971733451,
-0.0128924549,
-0.2690458596,
-0.0258767717,
-0.0536878482,
-0.2634806335,
-0.2424753606,
-0.1062418818,
-0.2012022734,
-0.2678861916,
0.0891785175,
-0.4607054591,
-0.1519240439,
-0.2918174267,
0.2894775867,
0.0338952765,
0.0784962475,
0.249653697,
0.0718301758,
0.1637626141,
-0.1985609233,
-0.1715665311,
-0.236058116,
-0.3028157949,
0.3233646154,
0.0326962583,
0.3189823329,
0.1509530842,
-0.278214395,
-0.1228730008,
-0.0274204277,
0.7755698562,
0.0694630444,
-0.0135412328,
0.34166044,
-0.1828563213,
-0.6849220991,
-0.1430059671,
-0.0769920349,
0.3777197599,
-0.282233119,
0.6447867155,
-0.1052529514,
-0.3734835982,
-0.1347846091,
0.2421913445,
-0.2975417376,
-0.0471378416,
-0.3241861761,
0.0681183189,
-0.361435324,
0.0424429849,
-0.1753164232,
0.1782322526,
-0.0182589274,
-0.0409769639,
-0.0233547054,
-0.2156773657,
-0.018986322,
0.170840919,
0.5178512335,
-0.0917808563,
0.1552844793,
0.3910790384,
0.1512525529,
0.3668095171,
0.5727208257,
-0.0524177812,
0.022786878,
0.1233678162,
0.0127733052,
0.2191069871,
0.3768681288,
0.0017911792,
0.0071476065,
0.1853461862,
-0.1399026066,
-0.2090144157,
-0.3456372619,
0.0707189739,
-0.0725741684,
-0.2323497534,
-0.3987551928,
0.5538122654,
0.0757331476,
-0.1451486349,
0.4524226785,
0.2212211192,
-0.2190645337,
0.7223879099,
0.0420397185,
0.5834650397,
-0.1472348869,
0.3033970594,
0.2070567012,
0.040847674,
-0.020474961,
0.2904043198,
-0.0836609453,
-0.421223253,
-0.0757738203,
-0.121399574,
-0.0991992801,
-0.0378701538,
0.1712073386,
0.008072257,
0.3083401024,
-0.3715079427,
0.0482663885,
-0.4021244049,
0.1216107905,
-0.1254556179,
-0.1721249372,
-0.4360767305,
0.0483663864,
0.2044886202,
0.0633207634,
-0.2060791105,
-0.1036890298,
-0.0989706293,
-0.1534952521,
-0.2596628666,
-0.131944716,
-0.1039301902,
0.5987221599,
-0.0494343638,
-0.4428333044,
-0.1699007601,
0.1780457795,
0.0864559263,
-0.11959932,
-0.1258823872,
-0.107554689,
-0.0314494893,
0.0419042893,
-0.0408889167,
0.0695693195,
0.4228495359,
-0.0175481886,
-0.3506647944,
0.0891877115,
-0.1480856091,
-0.6180959344,
0.1087118685,
0.1479554921,
-0.2532773018,
-0.0102039836,
-0.3166951239,
-0.111812517,
-0.0347659811,
-0.1134833395,
0.044243373,
0.1400856078,
0.0375357978,
-0.1662011296,
0.095424816,
-0.1088625193,
0.0871872231,
0.7104116082,
0.1615453511,
0.2259926498,
0.6737830043,
0.16518116,
0.0447910726,
-0.2560970783,
0.1196542084,
0.3818438351,
-0.2010107338,
0.2045419216,
-0.1781062335,
-0.1663607508,
0.2491133511,
0.1407565475,
0.4852975905,
0.1138318777,
-0.33939749,
-0.341242522,
-0.6491516232,
0.475800544,
-0.0777495205,
0.1905664504,
-0.3575004339,
-0.3366329968,
-0.2618660331,
-0.1594819874,
-0.2298217416,
0.3489598334,
0.0203115195,
-0.0432251878,
-0.0170161724,
0.0294097196,
0.1890239865,
-0.2335284054,
0.0664038733,
-0.1214156523,
-0.2289004773,
-0.1266573966,
0.0812335312,
0.1456775367,
0.0704902112,
-0.1864243448,
-0.0125318691,
-0.3193379045,
-0.0384720489,
-0.0330956317,
0.2820334136,
0.0154568925,
0.1098288298,
0.1792057455,
0.4029445648,
0.0735876039,
-0.1137400419,
0.3437512815,
-0.0137058944,
0.2762865126,
0.0530831479,
0.0968639851,
-0.2084211707,
-0.1503097117,
-0.1973828375,
0.1348845959,
-0.3143283725,
0.2006952316,
0.3316076994,
-0.3723170757,
-0.1694096327,
0.4137827158,
0.5258204341,
0.4191297889,
-0.1160741746,
0.061358124,
0.1539829969,
0.157477811,
-0.0676561967,
-0.2825665474,
-0.034991242,
0.0515103042,
-0.11263863,
0.1593420208,
0.2207187414,
-0.2603266835,
-0.0983491838,
0.2220220566,
0.0099680983,
0.17903997,
0.2652377784,
0.6549829245,
0.0477758199,
-0.1828882992,
0.2611662149,
0.0806481987,
0.5296797156,
0.5002400279,
-0.1772085726,
0.0948735997,
0.1470343471,
0.0580118708,
-0.0320032686,
-0.520743072,
0.3944751024,
0.1612301469,
-0.1278060228,
-0.1419653744,
0.1691358984,
0.5864530206,
-0.2946017981,
-0.1435379982,
-0.1679213345,
-0.1049020514,
-0.2334733605,
-0.090634197,
0.0862776041,
-0.2682773173,
0.0853690356,
0.0653267354,
-0.2018410116,
-0.160052374,
-0.0437692255,
0.0348186232,
-0.1453922987,
-0.1557486653,
-0.144446969,
0.3033106923,
0.1579713672,
-0.148150593,
-0.0349100009,
0.3843449652,
0.0172673967,
0.0584638268,
0.3044855595,
0.4444733262,
0.2658299208,
-0.5644999743,
0.0691370219,
0.1930318028,
-0.2052132487,
-0.0465577394,
-0.1699370593,
0.0112723485,
0.1480562091,
0.2356415838,
0.104722634,
-0.0508822687,
0.0374309644,
0.231392011,
0.3739522994,
-0.0057789944,
-0.0465185419,
0.0601953231,
-0.1229655966,
0.1386378855,
0.1046858877,
-0.2637209296,
-0.1810964644,
0.4095124602,
0.146042496,
0.1314706802,
0.0936340988,
0.0492330007,
-0.0019206069,
0.6029654145,
0.5017883778,
-0.0730917752,
-0.0634914041,
-0.020014897,
-0.6808799505,
-0.0904052854,
0.0202098675,
0.291287452,
0.3152634501,
0.1324050426,
0.3313703537,
0.1017873138,
0.2425287068,
0.0359325185,
0.0863954052,
0.0192452855,
-0.3052065372,
-0.2474490404,
0.1221125945,
-0.086973235,
-0.1743315756,
-0.3412004113,
0.016910255,
-0.1808810532,
0.0343125388,
-0.0641597807,
0.051038526,
-0.0993934795,
0.0412077978,
0.596794486,
-0.1437921524,
0.0915654302,
0.1601386964,
-0.2961278558,
-0.1572458446,
-0.3000840545,
-0.1445713043,
0.1659154892,
0.0093030725,
0.4882323742,
-0.1628597379,
-0.014357063,
-0.3650960028,
0.3171494007,
-0.0384444855,
-0.0233009495,
-0.4206438363,
0.1915091276,
-0.0203535184,
-0.2299862951,
0.1428320855,
0.2392262518,
0.1044665277,
0.1673978269,
-0.1479466558,
-0.1747444272,
0.4662322104,
-0.2733974457,
0.0169339851,
0.0283580273,
0.2047577798,
0.147178635,
-0.063684538,
-0.4889203608,
0.0350650102,
0.2195560932,
-0.0950232148,
-0.3031612337,
-0.0935751498,
0.1114848256,
0.2328036129,
-0.1336060166,
0.2096349001,
-0.0311651975,
-0.2814047039,
-0.1393114924,
-0.1226978898
] |