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/2644 | Batched `map` not allowed to return 0 items | Sorry to ping you, @lhoestq, did you have a chance to take a look at the proposed PR? Thank you! | ## Describe the bug
I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`.
However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case.
For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs.
## Steps to reproduce the bug
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
# The following line simulates no matches found, so we return an empty batch
result = {'key': []}
return result
filtered_dataset = dataset.map(
select_rows,
remove_columns = dataset.column_names,
batched = True,
num_proc = 1,
desc = "Selecting rows with images that exist"
)
```
The code above immediately triggers the exception. If we use the following instead:
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
result = {'key': []} # or defaultdict or whatever
# code to check for condition and append elements to result
# some_items_found will be set to True if there were any matching elements in the batch
return result if some_items_found else {}
```
Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it.
In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items.
## Expected results
The dataset would be filtered and only the matching fields would be returned.
## Actual results
An exception is encountered, as described. Using a workaround makes it fail further along the line.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 20 | Batched `map` not allowed to return 0 items
## Describe the bug
I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`.
However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case.
For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs.
## Steps to reproduce the bug
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
# The following line simulates no matches found, so we return an empty batch
result = {'key': []}
return result
filtered_dataset = dataset.map(
select_rows,
remove_columns = dataset.column_names,
batched = True,
num_proc = 1,
desc = "Selecting rows with images that exist"
)
```
The code above immediately triggers the exception. If we use the following instead:
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
result = {'key': []} # or defaultdict or whatever
# code to check for condition and append elements to result
# some_items_found will be set to True if there were any matching elements in the batch
return result if some_items_found else {}
```
Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it.
In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items.
## Expected results
The dataset would be filtered and only the matching fields would be returned.
## Actual results
An exception is encountered, as described. Using a workaround makes it fail further along the line.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
Sorry to ping you, @lhoestq, did you have a chance to take a look at the proposed PR? Thank you! | [
-0.2328359336,
-0.3903887272,
-0.0444568731,
0.1644899547,
-0.1085450575,
-0.0687687993,
0.1163393706,
0.4056321383,
0.6400416493,
0.1178811789,
-0.0565716475,
0.2460853457,
-0.3954414129,
0.1043546125,
-0.1629213691,
0.1608028412,
-0.0449333005,
0.1405792236,
-0.1691173315,
-0.1914923787,
-0.3362932205,
0.1631995887,
-0.3979260921,
-0.0501046889,
-0.1487713754,
-0.2919759452,
0.2864801288,
-0.0362103283,
-0.1628143191,
-0.2454051971,
0.2060909718,
-0.2328294963,
-0.2091358006,
0.5783208013,
-0.0001299275,
-0.0231368914,
0.1505940557,
-0.1851883233,
-0.0897616744,
-0.3029606342,
-0.1908178031,
-0.1715303659,
-0.1157186553,
-0.2824648917,
0.18194592,
-0.2716506422,
-0.1956347525,
-0.4482402503,
0.1071964651,
0.2587006986,
0.0433217548,
0.418817699,
0.0030659661,
0.1764480174,
0.3312484324,
0.2664010823,
-0.0753518194,
0.1288105696,
0.7205767632,
-0.2881011963,
0.0226272214,
0.3385902345,
-0.3921836019,
0.0709063411,
0.1367557049,
-0.0309032369,
0.2301689684,
-0.5515581965,
0.2697508037,
0.3675672114,
-0.0900000781,
0.0607852787,
-0.4333372116,
-0.6687817574,
-0.0403037108,
-0.095498845,
-0.0388976745,
0.2810003757,
-0.4210393727,
-0.0564596243,
-0.4846191406,
0.1217951775,
0.0078949109,
0.1618544906,
0.0306752101,
0.4589539766,
-0.0930405855,
0.2003239989,
0.3451096416,
-0.1618328393,
-0.0994020849,
-0.1672706306,
-0.2236275524,
0.5847229362,
-0.0366989821,
-0.1459875256,
0.3893203139,
0.2197677642,
0.2230354398,
-0.313242048,
-0.0503059775,
-0.0742758811,
0.264680028,
-0.0234319046,
0.4159454405,
0.0793760419,
0.2686938047,
0.3493202925,
-0.005052398,
-0.0590940565,
0.0676898658,
0.1131691933,
0.1134424806,
-0.0890840441,
-0.0096513927,
-0.0764085054,
0.2567854524,
-0.0787526742,
-0.121898666,
0.2341008484,
-0.4100168347,
0.1369069219,
0.0620477609,
0.1250827461,
0.1700580418,
-0.1776705384,
0.1202132329,
0.1126284897,
-0.1570284814,
0.1897115111,
-0.077246964,
-0.1316172779,
-0.1925022602,
-0.3208242357,
0.1964790821,
-0.3342857957,
0.2418164909,
-0.1585830748,
0.0198275074,
-0.0615329333,
0.0957403108,
-0.2645619214,
0.7512267232,
0.4937877953,
-0.1195115298,
0.2913582623,
0.3966238201,
-0.21855703,
-0.1752835661,
0.4062903821,
-0.3826130927,
-0.2777347565,
0.2100419402,
-0.0401862115,
-0.2380758226,
0.3465698957,
-0.5073058009,
0.2185848206,
0.1782456636,
0.0822512656,
0.2914727628,
-0.2697467208,
-0.1053944454,
-0.2360116988,
0.0425621271,
0.6938399076,
-0.6387727857,
-0.0499247313,
0.1101886928,
0.1013793349,
-0.061366193,
0.3478802145,
-0.0454606414,
0.3481101692,
-0.4107353091,
0.3059866428,
0.0873119533,
-0.1264712512,
-0.327563256,
0.3134198785,
-0.0358150899,
0.2356394529,
-0.0210547261,
-0.0642482862,
0.5519377589,
-0.1873889267,
0.3676522374,
-0.1700583547,
-0.2799574733,
0.1041628569,
-0.0503814667,
-0.0398439988,
0.0603798367,
-0.242081672,
0.194924444,
0.0165873673,
0.0390777737,
-0.5488618612,
0.1286390722,
-0.1508787572,
0.3383626342,
0.2401697338,
0.2621085048,
0.1233312786,
0.0182516463,
-0.2563518286,
-0.4713619649,
0.3001764715,
-0.4880333543,
0.0212486014,
-0.4338339567,
-0.1033040956,
0.0309645981,
0.1834742725,
-0.0350199975,
0.0330952369,
-0.0749207586,
-0.4975807071,
0.1765708923,
-0.0213437341,
-0.2262369543,
-0.237070024,
-0.1358645707,
-0.0084388666,
-0.3567226827,
0.0713603124,
0.250108391,
-0.2921575904,
-0.2542050779,
0.2466301769,
0.1149316803,
-0.1176103577,
0.1173543334,
0.1758525819,
-0.0348160528,
-0.1673576087,
-0.1400129348,
0.1312534064,
0.011728311,
-0.0458009616,
0.101837188,
0.1450141966,
0.3444771171,
-0.2378433198,
-0.0694067776,
0.5054205656,
-0.1876149029,
0.5359302163,
-0.1796861291,
0.0512385145,
-0.1996322572,
0.0426063314,
-0.2059214711,
-0.3850509226,
0.076283738,
-0.1577370167,
0.0513376147,
0.0319149792,
0.0012571439,
-0.1989195198,
0.0856174678,
-0.0469621643,
0.1647788286,
0.0144882249,
-0.0630521327,
0.2266898751,
0.044692874,
-0.0142773464,
0.343269974,
0.219142884,
-0.0887256265,
-0.1521820277,
0.2504404485,
0.0001221001,
0.413918227,
0.1816677749,
0.0260532498,
0.1550094783,
-0.0036411956,
-0.0657199621,
-0.2528336048,
-0.1814306676,
0.0057150275,
0.1495339721,
-0.3952980638,
-0.0354199558,
0.1101147234,
-0.1585038006,
0.0689760298,
-0.0765034333,
-0.2908561826,
-0.3032283783,
-0.0453334339,
0.260158062,
-0.2722712159,
-0.0240079537,
-0.4013136327,
0.0116534531,
0.1975093186,
-0.2747200429,
-0.2812997997,
-0.1685465574,
-0.0756110102,
-0.0741588622,
0.0731140077,
-0.1339875162,
0.3615631759,
0.252137512,
-0.2612817883,
-0.2437715828,
-0.0951136649,
0.0065132948,
-0.5370396376,
0.2054032385,
0.4100924134,
0.39817065,
-0.2923846245,
0.1470608413,
0.279386133,
-0.1071428657,
-0.2480683625,
-0.0079055019,
0.0223338567,
0.153262943,
-0.1792153567,
0.1474314928,
0.0644614995,
-0.3209299445,
0.1781849265,
-0.1891590059,
0.2615511715,
0.2194532752,
0.2780077755,
0.1538576335,
-0.3693769276,
-0.4285492897,
0.1223511547,
-0.1416767538,
0.4460206926,
0.0390228108,
-0.1469309032,
0.1844057888,
0.0262185782,
-0.185319677,
0.2405572534,
-0.0966859162,
0.0939638317,
-0.0562741235,
0.1234828234,
0.1900067329,
0.3668000996,
0.4985277355,
0.0864884555,
0.0460447483,
-0.2846722007,
-0.1089554876,
0.0812636688,
0.0222764909,
-0.064513877,
0.42252931,
0.3217892349,
0.0287000686,
0.7504062653,
0.3654771149,
0.127213642,
0.0946452469,
0.0725372955,
0.3822361827,
-0.1140067503,
-0.3796923161,
-0.2082248032,
0.1538847834,
-0.0840785205,
0.032513313,
0.0550553538,
-0.062034443,
-0.0012850612,
0.0619004965,
-0.4879449606,
-0.1890369803,
0.4240103066,
-0.3093632162,
0.07615605,
-0.074914895,
0.095616743,
-0.2788099647,
-0.1820271015,
-0.1637151688,
-0.3036246896,
0.6426758766,
-0.082324788,
-0.0753787681,
-0.1154973581,
-0.6797440052,
0.3325339556,
0.221179828,
-0.0848111957,
0.1067162603,
-0.1852943599,
0.0687568486,
0.3100571632,
0.9494886994,
-0.1932724118,
0.156655699,
0.0814262033,
-0.0248434767,
-0.4435343146,
0.0998062938,
-0.3279415369,
0.2550862432,
0.2495421022,
0.5071643591,
-0.3575256765,
-0.0723438412,
-0.0420527868,
-0.0277325567,
0.0347221866,
-0.0264869258,
-0.1733805835,
-0.1495418549,
-0.1380317807,
0.3645798564,
0.4469458759,
0.072685495,
0.1356699914,
-0.2094713151,
-0.0988868251,
0.0481702834,
0.0175999552,
-0.1340297759,
0.4707480669,
0.0158331282,
0.0505988151,
0.270137161,
0.1117347777,
0.220630005,
0.4900633395,
-0.1534305811,
0.2074070573,
-0.1815866828,
0.0305913612,
0.3123360872,
0.4398166239,
0.0099648051,
0.0579146743,
0.3812750876,
0.3522176147,
-0.0515041053,
-0.2942022979,
0.126235798,
0.0464039668,
-0.541770041,
0.0036567524,
0.1158789396,
-0.099581778,
0.0849706531,
0.6082313061,
0.5790846348,
-0.363804549,
0.3609665334,
0.0432920009,
0.892306447,
-0.0148935597,
0.107627362,
0.1486807168,
0.0709491447,
0.2498287708,
0.5552588105,
0.0943638384,
0.0084223673,
0.0974387825,
-0.0407665297,
-0.008215487,
0.1668746471,
0.3400382102,
0.1027864516,
0.2708595693,
0.0819575191,
0.1208938956,
-0.1503460109,
-0.2895898223,
0.2877456546,
-0.3301816881,
-0.3449307084,
-0.075538516,
0.0785713345,
0.2657670677,
-0.0579299852,
-0.1058487147,
-0.0309242681,
-0.4037671685,
-0.1928453892,
-0.1852023453,
-0.4449901879,
0.021173995,
0.263892889,
-0.2862432599,
-0.0328590088,
0.0515846647,
-0.4806173444,
0.1447315812,
-0.1111118048,
-0.1330837011,
0.3892785311,
0.1719240695,
0.0218229629,
-0.1521929353,
0.1726182848,
0.199816674,
-0.1803181767,
0.0575538352,
-0.4518595636,
-0.1729946434,
0.0644665509,
0.4083661735,
-0.202341184,
-0.2228998691,
-0.3968204856,
-0.1921590567,
0.1015421301,
0.0394882038,
-0.0883382633,
0.2670640945,
-0.0757653341,
0.3907501698,
-0.1920090765,
-0.4534187615,
-0.043742422,
0.5255665779,
0.0346298888,
-0.1923186481,
0.4125704467,
0.1591854692,
-0.164441824,
-0.0695428178,
0.1383888423,
0.3426442742,
-0.6278496981,
0.5433267951,
0.2498694062,
0.0369901806,
0.1378324926,
0.4185100198,
0.1368643045,
0.2798643708,
-0.3155889213,
-0.1867184639,
-0.2580824494,
0.4086383283,
0.1035425514,
0.0359808914,
-0.1420464516,
-0.2367395759,
0.3288377225,
-0.1956320405,
-0.1520755738,
0.0660048723,
-0.0865764692,
0.3288319707,
0.2184333801,
0.2640421391,
0.3569835126,
-0.0818117112,
-0.1028166711,
0.1315307617,
-0.2793510258,
-0.0736057311,
-0.0467088595,
0.1763547212,
0.1042602137,
-0.2203988731,
0.1627229601,
-0.4074194133,
-0.0460063294,
-0.4062665701,
0.2619497776,
0.4909594059,
-0.0040139761,
-0.2378338277,
0.3719466627,
0.0600780882,
-0.0297461078,
0.2064462155,
-0.1776875108,
-0.0705969483,
-0.0677785277,
0.3043537438,
0.1634593308,
0.0337508023,
0.0829740763,
0.0720480829,
0.0142619237,
0.0030943975,
0.4227865636,
-0.2046114206,
-0.2124463618,
0.3322142363,
0.2543899417,
0.0184189528,
-0.0208609384,
-0.1518294215,
0.2098126262,
0.0060320436,
-0.1523620188,
0.0288434103,
0.1550513208,
0.3418108821,
0.2605258226,
0.3646140099,
-0.1685423553,
-0.2591930628,
0.0174684562,
0.188615784,
0.0211040378,
0.0309397839,
0.1880583465,
0.3906852603,
0.3334282637,
-0.0989429504,
0.3222150803,
0.0788697451,
0.2825941145,
0.2901289165,
0.2377106547,
0.266004771,
0.0139710251,
0.0864452347,
-0.2048540264,
-0.5083088875,
0.0377851725,
0.0890343413,
-0.0027338825,
0.3360840082,
0.1234637797,
0.1538112015,
-0.1924221665,
-0.2750574052,
0.0418598875,
0.0021715993,
-0.3454611897,
-0.0618338808,
-0.3136751056,
-0.2561421096,
0.4150930643,
-0.1609165967,
0.062736541,
-0.3454865813,
0.3650223315,
-0.0776077807,
-0.095370397,
-0.1441653669,
-0.3677255809,
0.0240028463,
0.2292593867,
-0.1103793234,
0.1378631741,
-0.0913241506,
-0.0463286415,
0.0504922718,
0.5798310041,
0.5111635327,
0.3985683322,
-0.0246107038,
0.4008251429,
0.1301573515,
-0.2436255217,
-0.2861930728,
0.3631896377,
-0.0595288835,
-0.025094511,
0.200109154,
-0.0104517881,
-0.046925921,
-0.0630549937,
-0.0026361542,
0.1076258719,
0.1635148525,
-0.1908553988,
-0.1974215508,
-0.2362536192,
-0.2687472999,
-0.0491944142,
-0.0817953274,
0.0160534643,
0.293864131,
-0.0996415466,
0.0463561788,
0.0778610334,
-0.0013326295,
-0.0415195152,
0.2583117187,
0.4536598027,
0.0035889377,
-0.4841508865,
0.1772230268,
-0.3718907535,
-0.0301732048,
-0.4928693771,
0.2783645093,
0.0389187112,
0.197258234,
0.1198172718,
-0.122641921,
0.3183076382,
-0.0501735397,
-0.0438347682,
0.354549855,
0.0648138523,
-0.2790634036,
-0.192818433,
-0.013535344,
0.0101543143,
-0.3842704892,
0.1062458903,
-0.1135110855,
-0.0753598958,
-0.1056097224,
0.1699268222,
-0.15767169,
0.027592659,
0.177414313,
0.336016804,
-0.0418954827,
0.0294317901,
-0.017705299,
-0.3504042029,
0.1464199275,
-0.1264902651,
0.1394367516,
0.3596005738,
0.4612443447,
-0.3284624815,
-0.2027061284,
-0.0240753181,
0.0423466489,
0.004644461,
0.0361620411,
-0.1818932593,
0.1435848922,
-0.3938452303,
-0.0358403809,
-0.1220739931,
0.0222710595,
0.0860233307,
0.0270857513,
-0.2525870502,
-0.3549434543,
0.3827644587,
-0.6531072259,
-0.2620071769,
-0.0693187937,
0.3420593739,
0.2115106285,
-0.2256406099,
-0.3928542137,
-0.1719203889,
0.2626016736,
-0.069357872,
-0.0616547763,
-0.1847909242,
-0.5037384033,
-0.0344291702,
-0.157623902,
0.1152826995,
0.0357201397,
0.0066587701,
0.2311962694,
-0.3098660409
] |
https://github.com/huggingface/datasets/issues/2644 | Batched `map` not allowed to return 0 items | Yes and it's all good, thank you :)
Feel free to close this issue if it's good for you | ## Describe the bug
I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`.
However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case.
For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs.
## Steps to reproduce the bug
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
# The following line simulates no matches found, so we return an empty batch
result = {'key': []}
return result
filtered_dataset = dataset.map(
select_rows,
remove_columns = dataset.column_names,
batched = True,
num_proc = 1,
desc = "Selecting rows with images that exist"
)
```
The code above immediately triggers the exception. If we use the following instead:
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
result = {'key': []} # or defaultdict or whatever
# code to check for condition and append elements to result
# some_items_found will be set to True if there were any matching elements in the batch
return result if some_items_found else {}
```
Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it.
In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items.
## Expected results
The dataset would be filtered and only the matching fields would be returned.
## Actual results
An exception is encountered, as described. Using a workaround makes it fail further along the line.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 19 | Batched `map` not allowed to return 0 items
## Describe the bug
I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`.
However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case.
For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs.
## Steps to reproduce the bug
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
# The following line simulates no matches found, so we return an empty batch
result = {'key': []}
return result
filtered_dataset = dataset.map(
select_rows,
remove_columns = dataset.column_names,
batched = True,
num_proc = 1,
desc = "Selecting rows with images that exist"
)
```
The code above immediately triggers the exception. If we use the following instead:
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
result = {'key': []} # or defaultdict or whatever
# code to check for condition and append elements to result
# some_items_found will be set to True if there were any matching elements in the batch
return result if some_items_found else {}
```
Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it.
In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items.
## Expected results
The dataset would be filtered and only the matching fields would be returned.
## Actual results
An exception is encountered, as described. Using a workaround makes it fail further along the line.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
Yes and it's all good, thank you :)
Feel free to close this issue if it's good for you | [
-0.2328359336,
-0.3903887272,
-0.0444568731,
0.1644899547,
-0.1085450575,
-0.0687687993,
0.1163393706,
0.4056321383,
0.6400416493,
0.1178811789,
-0.0565716475,
0.2460853457,
-0.3954414129,
0.1043546125,
-0.1629213691,
0.1608028412,
-0.0449333005,
0.1405792236,
-0.1691173315,
-0.1914923787,
-0.3362932205,
0.1631995887,
-0.3979260921,
-0.0501046889,
-0.1487713754,
-0.2919759452,
0.2864801288,
-0.0362103283,
-0.1628143191,
-0.2454051971,
0.2060909718,
-0.2328294963,
-0.2091358006,
0.5783208013,
-0.0001299275,
-0.0231368914,
0.1505940557,
-0.1851883233,
-0.0897616744,
-0.3029606342,
-0.1908178031,
-0.1715303659,
-0.1157186553,
-0.2824648917,
0.18194592,
-0.2716506422,
-0.1956347525,
-0.4482402503,
0.1071964651,
0.2587006986,
0.0433217548,
0.418817699,
0.0030659661,
0.1764480174,
0.3312484324,
0.2664010823,
-0.0753518194,
0.1288105696,
0.7205767632,
-0.2881011963,
0.0226272214,
0.3385902345,
-0.3921836019,
0.0709063411,
0.1367557049,
-0.0309032369,
0.2301689684,
-0.5515581965,
0.2697508037,
0.3675672114,
-0.0900000781,
0.0607852787,
-0.4333372116,
-0.6687817574,
-0.0403037108,
-0.095498845,
-0.0388976745,
0.2810003757,
-0.4210393727,
-0.0564596243,
-0.4846191406,
0.1217951775,
0.0078949109,
0.1618544906,
0.0306752101,
0.4589539766,
-0.0930405855,
0.2003239989,
0.3451096416,
-0.1618328393,
-0.0994020849,
-0.1672706306,
-0.2236275524,
0.5847229362,
-0.0366989821,
-0.1459875256,
0.3893203139,
0.2197677642,
0.2230354398,
-0.313242048,
-0.0503059775,
-0.0742758811,
0.264680028,
-0.0234319046,
0.4159454405,
0.0793760419,
0.2686938047,
0.3493202925,
-0.005052398,
-0.0590940565,
0.0676898658,
0.1131691933,
0.1134424806,
-0.0890840441,
-0.0096513927,
-0.0764085054,
0.2567854524,
-0.0787526742,
-0.121898666,
0.2341008484,
-0.4100168347,
0.1369069219,
0.0620477609,
0.1250827461,
0.1700580418,
-0.1776705384,
0.1202132329,
0.1126284897,
-0.1570284814,
0.1897115111,
-0.077246964,
-0.1316172779,
-0.1925022602,
-0.3208242357,
0.1964790821,
-0.3342857957,
0.2418164909,
-0.1585830748,
0.0198275074,
-0.0615329333,
0.0957403108,
-0.2645619214,
0.7512267232,
0.4937877953,
-0.1195115298,
0.2913582623,
0.3966238201,
-0.21855703,
-0.1752835661,
0.4062903821,
-0.3826130927,
-0.2777347565,
0.2100419402,
-0.0401862115,
-0.2380758226,
0.3465698957,
-0.5073058009,
0.2185848206,
0.1782456636,
0.0822512656,
0.2914727628,
-0.2697467208,
-0.1053944454,
-0.2360116988,
0.0425621271,
0.6938399076,
-0.6387727857,
-0.0499247313,
0.1101886928,
0.1013793349,
-0.061366193,
0.3478802145,
-0.0454606414,
0.3481101692,
-0.4107353091,
0.3059866428,
0.0873119533,
-0.1264712512,
-0.327563256,
0.3134198785,
-0.0358150899,
0.2356394529,
-0.0210547261,
-0.0642482862,
0.5519377589,
-0.1873889267,
0.3676522374,
-0.1700583547,
-0.2799574733,
0.1041628569,
-0.0503814667,
-0.0398439988,
0.0603798367,
-0.242081672,
0.194924444,
0.0165873673,
0.0390777737,
-0.5488618612,
0.1286390722,
-0.1508787572,
0.3383626342,
0.2401697338,
0.2621085048,
0.1233312786,
0.0182516463,
-0.2563518286,
-0.4713619649,
0.3001764715,
-0.4880333543,
0.0212486014,
-0.4338339567,
-0.1033040956,
0.0309645981,
0.1834742725,
-0.0350199975,
0.0330952369,
-0.0749207586,
-0.4975807071,
0.1765708923,
-0.0213437341,
-0.2262369543,
-0.237070024,
-0.1358645707,
-0.0084388666,
-0.3567226827,
0.0713603124,
0.250108391,
-0.2921575904,
-0.2542050779,
0.2466301769,
0.1149316803,
-0.1176103577,
0.1173543334,
0.1758525819,
-0.0348160528,
-0.1673576087,
-0.1400129348,
0.1312534064,
0.011728311,
-0.0458009616,
0.101837188,
0.1450141966,
0.3444771171,
-0.2378433198,
-0.0694067776,
0.5054205656,
-0.1876149029,
0.5359302163,
-0.1796861291,
0.0512385145,
-0.1996322572,
0.0426063314,
-0.2059214711,
-0.3850509226,
0.076283738,
-0.1577370167,
0.0513376147,
0.0319149792,
0.0012571439,
-0.1989195198,
0.0856174678,
-0.0469621643,
0.1647788286,
0.0144882249,
-0.0630521327,
0.2266898751,
0.044692874,
-0.0142773464,
0.343269974,
0.219142884,
-0.0887256265,
-0.1521820277,
0.2504404485,
0.0001221001,
0.413918227,
0.1816677749,
0.0260532498,
0.1550094783,
-0.0036411956,
-0.0657199621,
-0.2528336048,
-0.1814306676,
0.0057150275,
0.1495339721,
-0.3952980638,
-0.0354199558,
0.1101147234,
-0.1585038006,
0.0689760298,
-0.0765034333,
-0.2908561826,
-0.3032283783,
-0.0453334339,
0.260158062,
-0.2722712159,
-0.0240079537,
-0.4013136327,
0.0116534531,
0.1975093186,
-0.2747200429,
-0.2812997997,
-0.1685465574,
-0.0756110102,
-0.0741588622,
0.0731140077,
-0.1339875162,
0.3615631759,
0.252137512,
-0.2612817883,
-0.2437715828,
-0.0951136649,
0.0065132948,
-0.5370396376,
0.2054032385,
0.4100924134,
0.39817065,
-0.2923846245,
0.1470608413,
0.279386133,
-0.1071428657,
-0.2480683625,
-0.0079055019,
0.0223338567,
0.153262943,
-0.1792153567,
0.1474314928,
0.0644614995,
-0.3209299445,
0.1781849265,
-0.1891590059,
0.2615511715,
0.2194532752,
0.2780077755,
0.1538576335,
-0.3693769276,
-0.4285492897,
0.1223511547,
-0.1416767538,
0.4460206926,
0.0390228108,
-0.1469309032,
0.1844057888,
0.0262185782,
-0.185319677,
0.2405572534,
-0.0966859162,
0.0939638317,
-0.0562741235,
0.1234828234,
0.1900067329,
0.3668000996,
0.4985277355,
0.0864884555,
0.0460447483,
-0.2846722007,
-0.1089554876,
0.0812636688,
0.0222764909,
-0.064513877,
0.42252931,
0.3217892349,
0.0287000686,
0.7504062653,
0.3654771149,
0.127213642,
0.0946452469,
0.0725372955,
0.3822361827,
-0.1140067503,
-0.3796923161,
-0.2082248032,
0.1538847834,
-0.0840785205,
0.032513313,
0.0550553538,
-0.062034443,
-0.0012850612,
0.0619004965,
-0.4879449606,
-0.1890369803,
0.4240103066,
-0.3093632162,
0.07615605,
-0.074914895,
0.095616743,
-0.2788099647,
-0.1820271015,
-0.1637151688,
-0.3036246896,
0.6426758766,
-0.082324788,
-0.0753787681,
-0.1154973581,
-0.6797440052,
0.3325339556,
0.221179828,
-0.0848111957,
0.1067162603,
-0.1852943599,
0.0687568486,
0.3100571632,
0.9494886994,
-0.1932724118,
0.156655699,
0.0814262033,
-0.0248434767,
-0.4435343146,
0.0998062938,
-0.3279415369,
0.2550862432,
0.2495421022,
0.5071643591,
-0.3575256765,
-0.0723438412,
-0.0420527868,
-0.0277325567,
0.0347221866,
-0.0264869258,
-0.1733805835,
-0.1495418549,
-0.1380317807,
0.3645798564,
0.4469458759,
0.072685495,
0.1356699914,
-0.2094713151,
-0.0988868251,
0.0481702834,
0.0175999552,
-0.1340297759,
0.4707480669,
0.0158331282,
0.0505988151,
0.270137161,
0.1117347777,
0.220630005,
0.4900633395,
-0.1534305811,
0.2074070573,
-0.1815866828,
0.0305913612,
0.3123360872,
0.4398166239,
0.0099648051,
0.0579146743,
0.3812750876,
0.3522176147,
-0.0515041053,
-0.2942022979,
0.126235798,
0.0464039668,
-0.541770041,
0.0036567524,
0.1158789396,
-0.099581778,
0.0849706531,
0.6082313061,
0.5790846348,
-0.363804549,
0.3609665334,
0.0432920009,
0.892306447,
-0.0148935597,
0.107627362,
0.1486807168,
0.0709491447,
0.2498287708,
0.5552588105,
0.0943638384,
0.0084223673,
0.0974387825,
-0.0407665297,
-0.008215487,
0.1668746471,
0.3400382102,
0.1027864516,
0.2708595693,
0.0819575191,
0.1208938956,
-0.1503460109,
-0.2895898223,
0.2877456546,
-0.3301816881,
-0.3449307084,
-0.075538516,
0.0785713345,
0.2657670677,
-0.0579299852,
-0.1058487147,
-0.0309242681,
-0.4037671685,
-0.1928453892,
-0.1852023453,
-0.4449901879,
0.021173995,
0.263892889,
-0.2862432599,
-0.0328590088,
0.0515846647,
-0.4806173444,
0.1447315812,
-0.1111118048,
-0.1330837011,
0.3892785311,
0.1719240695,
0.0218229629,
-0.1521929353,
0.1726182848,
0.199816674,
-0.1803181767,
0.0575538352,
-0.4518595636,
-0.1729946434,
0.0644665509,
0.4083661735,
-0.202341184,
-0.2228998691,
-0.3968204856,
-0.1921590567,
0.1015421301,
0.0394882038,
-0.0883382633,
0.2670640945,
-0.0757653341,
0.3907501698,
-0.1920090765,
-0.4534187615,
-0.043742422,
0.5255665779,
0.0346298888,
-0.1923186481,
0.4125704467,
0.1591854692,
-0.164441824,
-0.0695428178,
0.1383888423,
0.3426442742,
-0.6278496981,
0.5433267951,
0.2498694062,
0.0369901806,
0.1378324926,
0.4185100198,
0.1368643045,
0.2798643708,
-0.3155889213,
-0.1867184639,
-0.2580824494,
0.4086383283,
0.1035425514,
0.0359808914,
-0.1420464516,
-0.2367395759,
0.3288377225,
-0.1956320405,
-0.1520755738,
0.0660048723,
-0.0865764692,
0.3288319707,
0.2184333801,
0.2640421391,
0.3569835126,
-0.0818117112,
-0.1028166711,
0.1315307617,
-0.2793510258,
-0.0736057311,
-0.0467088595,
0.1763547212,
0.1042602137,
-0.2203988731,
0.1627229601,
-0.4074194133,
-0.0460063294,
-0.4062665701,
0.2619497776,
0.4909594059,
-0.0040139761,
-0.2378338277,
0.3719466627,
0.0600780882,
-0.0297461078,
0.2064462155,
-0.1776875108,
-0.0705969483,
-0.0677785277,
0.3043537438,
0.1634593308,
0.0337508023,
0.0829740763,
0.0720480829,
0.0142619237,
0.0030943975,
0.4227865636,
-0.2046114206,
-0.2124463618,
0.3322142363,
0.2543899417,
0.0184189528,
-0.0208609384,
-0.1518294215,
0.2098126262,
0.0060320436,
-0.1523620188,
0.0288434103,
0.1550513208,
0.3418108821,
0.2605258226,
0.3646140099,
-0.1685423553,
-0.2591930628,
0.0174684562,
0.188615784,
0.0211040378,
0.0309397839,
0.1880583465,
0.3906852603,
0.3334282637,
-0.0989429504,
0.3222150803,
0.0788697451,
0.2825941145,
0.2901289165,
0.2377106547,
0.266004771,
0.0139710251,
0.0864452347,
-0.2048540264,
-0.5083088875,
0.0377851725,
0.0890343413,
-0.0027338825,
0.3360840082,
0.1234637797,
0.1538112015,
-0.1924221665,
-0.2750574052,
0.0418598875,
0.0021715993,
-0.3454611897,
-0.0618338808,
-0.3136751056,
-0.2561421096,
0.4150930643,
-0.1609165967,
0.062736541,
-0.3454865813,
0.3650223315,
-0.0776077807,
-0.095370397,
-0.1441653669,
-0.3677255809,
0.0240028463,
0.2292593867,
-0.1103793234,
0.1378631741,
-0.0913241506,
-0.0463286415,
0.0504922718,
0.5798310041,
0.5111635327,
0.3985683322,
-0.0246107038,
0.4008251429,
0.1301573515,
-0.2436255217,
-0.2861930728,
0.3631896377,
-0.0595288835,
-0.025094511,
0.200109154,
-0.0104517881,
-0.046925921,
-0.0630549937,
-0.0026361542,
0.1076258719,
0.1635148525,
-0.1908553988,
-0.1974215508,
-0.2362536192,
-0.2687472999,
-0.0491944142,
-0.0817953274,
0.0160534643,
0.293864131,
-0.0996415466,
0.0463561788,
0.0778610334,
-0.0013326295,
-0.0415195152,
0.2583117187,
0.4536598027,
0.0035889377,
-0.4841508865,
0.1772230268,
-0.3718907535,
-0.0301732048,
-0.4928693771,
0.2783645093,
0.0389187112,
0.197258234,
0.1198172718,
-0.122641921,
0.3183076382,
-0.0501735397,
-0.0438347682,
0.354549855,
0.0648138523,
-0.2790634036,
-0.192818433,
-0.013535344,
0.0101543143,
-0.3842704892,
0.1062458903,
-0.1135110855,
-0.0753598958,
-0.1056097224,
0.1699268222,
-0.15767169,
0.027592659,
0.177414313,
0.336016804,
-0.0418954827,
0.0294317901,
-0.017705299,
-0.3504042029,
0.1464199275,
-0.1264902651,
0.1394367516,
0.3596005738,
0.4612443447,
-0.3284624815,
-0.2027061284,
-0.0240753181,
0.0423466489,
0.004644461,
0.0361620411,
-0.1818932593,
0.1435848922,
-0.3938452303,
-0.0358403809,
-0.1220739931,
0.0222710595,
0.0860233307,
0.0270857513,
-0.2525870502,
-0.3549434543,
0.3827644587,
-0.6531072259,
-0.2620071769,
-0.0693187937,
0.3420593739,
0.2115106285,
-0.2256406099,
-0.3928542137,
-0.1719203889,
0.2626016736,
-0.069357872,
-0.0616547763,
-0.1847909242,
-0.5037384033,
-0.0344291702,
-0.157623902,
0.1152826995,
0.0357201397,
0.0066587701,
0.2311962694,
-0.3098660409
] |
https://github.com/huggingface/datasets/issues/2643 | Enum used in map functions will raise a RecursionError with dill. | I'm running into this as well. (Thank you so much for reporting @jorgeecardona — was staring at this massive stack trace and unsure what exactly was wrong!) | ## Describe the bug
Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from enum import Enum
class A(Enum):
a = 'a'
def main():
a = A.a
def f(x):
return {} if a == a.a else x
ds = load_dataset('cnn_dailymail', '3.0.0')['test']
ds = ds.map(f, num_proc=15)
if __name__ == "__main__":
main()
```
## Expected results
The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood.
## Actual results
```python
File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type
pickler.save_reduce(_create_type, (type(obj), obj.__name__,
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce
save(args)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save
f(self, obj) # Call unbound method with explicit self
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple
save(element)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save
self.framer.commit_frame()
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame
if f.tell() >= self._FRAME_SIZE_TARGET or force:
RecursionError: maximum recursion depth exceeded while calling a Python object
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 3.0.0
| 27 | Enum used in map functions will raise a RecursionError with dill.
## Describe the bug
Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from enum import Enum
class A(Enum):
a = 'a'
def main():
a = A.a
def f(x):
return {} if a == a.a else x
ds = load_dataset('cnn_dailymail', '3.0.0')['test']
ds = ds.map(f, num_proc=15)
if __name__ == "__main__":
main()
```
## Expected results
The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood.
## Actual results
```python
File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type
pickler.save_reduce(_create_type, (type(obj), obj.__name__,
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce
save(args)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save
f(self, obj) # Call unbound method with explicit self
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple
save(element)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save
self.framer.commit_frame()
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame
if f.tell() >= self._FRAME_SIZE_TARGET or force:
RecursionError: maximum recursion depth exceeded while calling a Python object
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 3.0.0
I'm running into this as well. (Thank you so much for reporting @jorgeecardona — was staring at this massive stack trace and unsure what exactly was wrong!) | [
0.1053604186,
0.1992541254,
0.0405321047,
0.1406992525,
-0.0743718147,
-0.0783434361,
0.1477604806,
0.2337797284,
0.1263176054,
0.1690647155,
0.1453326046,
0.9332163334,
-0.2908694744,
-0.3072983325,
-0.0783376917,
0.0934458449,
0.0223676898,
0.0455222614,
-0.618113637,
-0.245678544,
-0.3375146985,
-0.0052424036,
-0.1024472639,
-0.0100889169,
-0.2116013467,
0.2239995897,
0.0477665439,
0.4010352194,
0.0841138214,
-0.2200672477,
0.3333718777,
-0.073449783,
0.1974622607,
0.3142177165,
-0.0001113916,
0.0850248337,
0.1187559217,
-0.2274406254,
-0.3654647171,
-0.2395341843,
0.1474915147,
0.1226188391,
0.0726438314,
-0.4154759645,
0.2226357162,
0.3753211498,
-0.0025736652,
-0.2636499703,
-0.0621620603,
0.0543685779,
0.1718366742,
-0.1396810114,
0.2170403153,
0.0761598647,
0.4435096979,
-0.018286664,
0.0448157042,
0.5206540227,
0.1653602123,
-0.3055963814,
-0.1643483341,
0.1722365767,
-0.0976960659,
-0.0254111439,
0.3883351982,
-0.113608785,
0.6294153929,
-0.0288462695,
-0.16401501,
0.2222028673,
-0.1290317774,
-0.2840957344,
-0.2295472622,
0.0401712209,
-0.0794382393,
-0.1017232612,
0.3087863922,
-0.0180279724,
-0.0133563988,
-0.077560693,
0.1240700111,
-0.2159888148,
0.0056778789,
0.4278800189,
-0.1641046554,
0.5943014622,
0.1378127784,
0.1661041528,
0.2780689597,
-0.1684813499,
-0.1965378076,
0.1178518832,
0.1020066738,
0.09503337,
-0.2208728939,
-0.0939792618,
0.2846586406,
-0.360153228,
0.3353612423,
-0.1542603523,
0.0143166296,
0.1036642268,
-0.0685879365,
0.3336909711,
0.3899121284,
-0.1418341994,
-0.051656343,
0.5599201918,
0.2155427933,
-0.1122439355,
0.0307029635,
0.360703826,
0.0600124933,
0.0919064432,
-0.0083616823,
-0.1110875458,
0.01128757,
-0.095411472,
-0.1062043905,
0.4172791541,
-0.4747123718,
-0.1136132404,
0.1349553466,
0.1240018606,
-0.1058504283,
0.0211870559,
0.1341362447,
0.0897011161,
-0.052564498,
0.4216716588,
-0.2110072076,
-0.0060293786,
0.0234192908,
-0.2131150067,
-0.1768060774,
0.0548268035,
0.2632887661,
0.0713272467,
0.1322998703,
-0.0223734602,
0.0825916007,
-0.2246849388,
0.1783070266,
0.1025305837,
-0.5080519915,
-0.0832128078,
0.2530030906,
-0.2604119778,
-0.2579995692,
0.2515309155,
-0.4531786442,
-0.0923265815,
-0.3719530106,
0.2141514421,
0.1512586027,
0.1420761198,
0.1465845108,
-0.1181596071,
0.3029903471,
-0.1372454911,
0.1552295685,
-0.4185495973,
-0.3111717999,
-0.2451113462,
0.0752647743,
-0.0309840068,
-0.072397694,
-0.2012917697,
-0.2666212618,
0.1593030393,
0.1756732613,
-0.0490409732,
-0.1848201007,
-0.1414387822,
-0.2404542863,
0.2867937684,
-0.1029910967,
-0.1263522059,
-0.3646343052,
-0.0630570501,
-0.0521468297,
0.1691657156,
-0.2541861236,
-0.1637444347,
0.2021382451,
-0.2736369967,
0.5204457641,
0.1751688868,
0.1138645932,
-0.014207501,
-0.3202032149,
-0.1133952439,
0.3278878033,
0.1209527999,
-0.1715011746,
-0.0926164687,
-0.265378803,
-0.1963818967,
0.3977232277,
-0.2698429823,
0.0405842587,
0.1311579943,
0.1083371267,
0.08826527,
0.0628296509,
-0.1535955369,
-0.3434664905,
0.1982898414,
-0.2558757961,
-0.0215068515,
0.0164882895,
-0.1004740149,
0.0963972807,
0.2580535412,
-0.0351008773,
-0.0973074436,
0.1891378164,
0.0994401574,
-0.1080731377,
-0.0216377079,
-0.0003865436,
-0.3291852176,
-0.4009250104,
-0.0294389203,
0.0524639525,
0.3023038507,
-0.230508253,
-0.2322060764,
-0.2058909833,
0.1653585285,
-0.0919001102,
0.0035679452,
-0.2516868412,
0.0290702842,
0.3874913454,
-0.5933541656,
-0.2805412114,
-0.0545176864,
-0.1167529672,
-0.2748850882,
0.0368424281,
0.4684724212,
0.145491749,
-0.2771626711,
0.2459005266,
0.1754849404,
0.1758498847,
0.1228598058,
0.0697168857,
0.2272967696,
-0.1998264045,
-0.1135166734,
-0.02902399,
-0.3736835122,
-0.1019666791,
0.09346921,
0.0345105976,
0.1148609146,
-0.0388509482,
-0.2529436946,
0.167915076,
0.2472829521,
0.2872358859,
0.2680384219,
-0.14141123,
0.0800696611,
0.1683732718,
0.0561094359,
0.1142270714,
-0.0879762247,
0.0976701379,
0.1423884481,
-0.1171694249,
0.1136521101,
-0.0736679137,
0.0754609928,
0.3981696367,
0.1457406431,
-0.0600118898,
0.0496477708,
-0.0412557572,
-0.2883345485,
-0.0536867939,
0.1021304131,
-0.0684400871,
0.0745905265,
-0.4567011595,
0.4747096896,
0.13333112,
-0.5235564709,
-0.2458881736,
-0.2118289471,
-0.1701544523,
0.1294810474,
-0.5239450932,
0.2111627162,
-0.1791204512,
-0.44667238,
0.1996655911,
-0.344062835,
0.2858994603,
-0.3210588396,
-0.2967033684,
-0.0235464163,
0.1581546962,
-0.1790602505,
0.0374892652,
0.2627149522,
-0.3319723308,
0.0355787575,
-0.2012698948,
0.1469756514,
0.0324611738,
0.1711266786,
0.2742405534,
0.0931566805,
-0.4386805594,
-0.4228977859,
0.1325160265,
0.1339357495,
-0.0586655512,
0.0601035804,
0.2963470221,
0.2722680271,
-0.2222014964,
-0.3065882921,
-0.197307393,
-0.3845987618,
-0.2084994018,
0.0703799129,
0.4546932578,
0.2742165029,
-0.016064398,
0.4758416414,
0.3324288428,
0.3127490282,
-0.3234796822,
0.3757662773,
0.2017488182,
-0.1626096368,
-0.2093155384,
-0.1637183279,
-0.5420064926,
0.0844262168,
0.1182150841,
-0.5454446077,
-0.2052110583,
0.1891745478,
0.0723087117,
-0.2491005957,
-0.1957812607,
0.1190050617,
0.2233188301,
0.0628092885,
-0.0219543055,
-0.2726018429,
0.2237222344,
0.2733662724,
0.1518391222,
0.1783870161,
-0.0109513765,
-0.0432437137,
0.3684875071,
0.3489732146,
-0.0253312327,
0.411600709,
0.3529876173,
-0.0865499154,
0.0425223671,
0.0363262817,
0.1121198237,
0.0395058915,
-0.089695096,
0.1329945028,
-0.1452874243,
-0.6623034477,
0.0320489183,
0.1480094641,
0.3037309051,
-0.4923018813,
0.2677828968,
-0.393976599,
0.0531445332,
-0.3042105436,
0.2357546389,
0.1242342591,
0.226337105,
0.109044984,
-0.0914259851,
0.190357551,
-0.1192370057,
-0.0924876332,
-0.1650371552,
-0.0067231506,
0.1185411215,
0.3353765011,
0.3717652559,
-0.0453587323,
-0.3760144114,
-0.1243965402,
-0.1063318551,
0.4010098279,
-0.3481984735,
0.0769573376,
0.412226826,
-0.2628344893,
-0.2899605632,
-0.135805741,
0.0748562813,
0.0418149978,
0.3262104392,
-0.1238100752,
-0.4923032522,
0.1185788587,
0.4219983816,
0.0081254952,
0.1181250811,
-0.0038845465,
-0.058897946,
-0.1878027618,
-0.2951492071,
-0.011558596,
-0.1458279788,
0.1225045994,
0.215028286,
-0.0180003196,
-0.1149311066,
0.1004173681,
-0.083803013,
-0.1668768525,
0.2862613499,
-0.1239508539,
0.1584715396,
0.1450294256,
0.302513361,
0.2738065422,
0.32763502,
-0.3374812305,
0.1992721409,
0.2932469845,
0.2256001085,
0.1761761755,
0.055247806,
0.2008030117,
0.1537930667,
0.0105551668,
-0.1905162334,
-0.1788253486,
-0.3223813772,
0.087277554,
0.0500284024,
-0.1219284385,
-0.3815683722,
0.0662227273,
0.1693699062,
-0.0110467374,
0.0616261028,
-0.3657361269,
-0.0102440659,
0.4981332123,
0.3520676196,
0.8710967302,
0.2196188569,
-0.0461066104,
0.0972308218,
-0.0263176337,
-0.2297056466,
0.3024890423,
-0.1804320216,
-0.2986611128,
0.00406738,
-0.0744973421,
-0.1246087328,
-0.0215664357,
-0.0152553003,
-0.3948971033,
0.0234435536,
-0.1997486055,
0.0419670455,
0.0282366648,
-0.052602943,
-0.0607001856,
-0.1094833612,
0.2939591408,
0.1608692706,
0.0929875225,
0.07982409,
-0.065613389,
-0.0919521749,
-0.2405120134,
-0.380510062,
-0.1540367007,
0.1441756189,
-0.1137664765,
0.4462915361,
0.3543664217,
-0.2859050632,
0.13251625,
0.3625555038,
-0.2675672174,
0.1217102557,
-0.0649966076,
-0.0234083124,
0.0419260152,
0.1990348548,
0.2569919825,
-0.0653647706,
0.5327146649,
-0.0084037557,
-0.2321225554,
0.1457434893,
-0.0940774977,
-0.2741780281,
-0.0868035182,
0.3060583174,
0.3108744323,
-0.0182178132,
0.0556955859,
-0.0570493266,
-0.175193727,
-0.1722621918,
0.1487811953,
0.1978511959,
-0.1734807193,
0.2513154745,
0.0907392353,
-0.2189702094,
-0.0801060498,
0.4010270238,
0.4048633575,
0.5142775178,
0.3133553863,
-0.0660539195,
-0.1195439771,
-0.1525502354,
-0.3521789908,
-0.3539167941,
0.2396393269,
0.2017316818,
0.0184830539,
-0.1471089572,
-0.33260566,
-0.0950678438,
0.081941545,
0.2781377435,
-0.4085234404,
-0.2797383666,
-0.3357232213,
0.0974262133,
-0.1204472035,
0.2147093266,
-0.2588469088,
-0.0375361852,
-0.3156366348,
0.2042545527,
-0.3219062388,
0.0381848365,
-0.3997867107,
0.1722812355,
-0.148306638,
-0.2481524646,
0.0182315111,
0.0307650194,
0.1673876047,
0.2304181755,
-0.2873896956,
-0.1121999472,
-0.2405645251,
0.0865457058,
0.1410396695,
-0.1369154602,
0.1307749897,
-0.1663820744,
0.0774900615,
-0.1897874773,
0.0325979516,
-0.1548466682,
-0.1185715646,
0.3641764522,
0.1978075355,
0.1557998061,
0.1883445829,
0.2656751573,
-0.1431949735,
0.2839574218,
-0.1587208509,
0.0132916328,
-0.2259700298,
-0.0838631839,
-0.0842177793,
0.0726766288,
-0.2182116956,
-0.2391781658,
0.2639331222,
-0.0150742214,
-0.1912010014,
-0.0865056142,
0.1725260019,
0.2049277723,
-0.3796471357,
-0.1530581862,
0.540761888,
0.2050436884,
-0.0046197176,
-0.0341049768,
0.5727976561,
-0.0924608409,
0.2316608131,
0.3061141968,
-0.153756991,
-0.1879760772,
-0.1503072977,
-0.0117989406,
-0.3474123776,
0.0528137907,
0.215601027,
0.4500200152,
-0.1907595098,
0.1537032723,
0.1534423679,
-0.1342352778,
0.5434713364,
0.0144108739,
0.1349454969,
0.1574077755,
-0.0015680064,
0.0444373302,
0.3795163631,
-0.4899708033,
0.4982144535,
0.6172639728,
0.2385596931,
0.3534964025,
0.1136447564,
0.1797678322,
-0.1803996414,
0.031093061,
-0.1614091098,
0.2059420049,
-0.347053498,
-0.018273402,
-0.017570138,
-0.1287973523,
0.0025713891,
0.0317991748,
-0.0331077836,
-0.1463286281,
0.2225929201,
0.1030734554,
-0.2522373199,
-0.3613154888,
-0.0293794069,
-0.1957935691,
0.019742541,
-0.2202988863,
-0.0594294593,
0.1275483668,
0.1394576132,
-0.362834096,
0.1233996227,
0.2021778226,
0.5606964827,
-0.4515581429,
-0.2535941005,
0.2951529026,
0.0871659741,
-0.2988334894,
0.1697480083,
-0.2322260886,
-0.1714935154,
0.4422872365,
0.075216189,
-0.2449633777,
-0.1833670735,
0.1342608631,
0.4924426377,
0.2643303275,
0.0972136185,
0.2130133808,
0.204780072,
0.1633074284,
-0.2080276161,
-0.2605630755,
-0.1555673629,
0.1988854408,
-0.0063203201,
0.3195680976,
0.0728774369,
0.0928778648,
-0.0425353684,
0.2382953614,
0.2152568102,
0.1745690107,
-0.0464246646,
-0.0878166705,
-0.2692610919,
0.3507026136,
-0.1388016194,
-0.2081338614,
0.3059593737,
-0.0111725777,
0.0657361746,
0.1503103226,
-0.1154861152,
-0.2089875191,
0.1607621163,
0.4486102164,
-0.290609777,
-0.1849914044,
-0.1059624404,
-0.1510677487,
0.2687520683,
-0.5409832597,
0.1342630386,
0.1473649293,
0.0705440193,
-0.2318173051,
0.0140693635,
-0.0116061047,
0.3986551762,
0.4254052043,
0.1147440374,
0.4639268219,
-0.1939549893,
-0.1057452932,
0.2056581974,
0.0157289878,
-0.0213507339,
-0.1691845655,
-0.1176788509,
0.3652637601,
-0.0849697217,
-0.2337134182,
-0.1284030676,
0.5321086049,
-0.1069319621,
-0.1859683096,
-0.1602982283,
0.312315762,
-0.013214387,
0.0239583738,
-0.4056391716,
0.2057971805,
0.166184023,
0.2969310284,
-0.0653436109,
-0.2356070727,
0.7419952154,
0.0621227659,
-0.054097645,
-0.1270351708,
0.0202785842,
-0.5549430847,
-0.1697124392,
-0.2463076413,
-0.1268685758,
0.2110937238,
0.1947375983,
-0.5221105814,
-0.150292486,
0.1450443268,
0.0715023279,
-0.2004755139,
0.6373543739,
-0.2366665304,
-0.3341545761,
0.2838118076,
-0.0978839323
] |
https://github.com/huggingface/datasets/issues/2643 | Enum used in map functions will raise a RecursionError with dill. | Hi ! Thanks for reporting :)
Until this is fixed on `dill`'s side, we could implement a custom saving in our Pickler indefined in utils.py_utils.py
There is already a suggestion in this message about how to do it:
https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
Let me know if such a workaround could help, and feel free to open a PR if you want to contribute ! | ## Describe the bug
Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from enum import Enum
class A(Enum):
a = 'a'
def main():
a = A.a
def f(x):
return {} if a == a.a else x
ds = load_dataset('cnn_dailymail', '3.0.0')['test']
ds = ds.map(f, num_proc=15)
if __name__ == "__main__":
main()
```
## Expected results
The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood.
## Actual results
```python
File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type
pickler.save_reduce(_create_type, (type(obj), obj.__name__,
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce
save(args)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save
f(self, obj) # Call unbound method with explicit self
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple
save(element)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save
self.framer.commit_frame()
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame
if f.tell() >= self._FRAME_SIZE_TARGET or force:
RecursionError: maximum recursion depth exceeded while calling a Python object
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 3.0.0
| 61 | Enum used in map functions will raise a RecursionError with dill.
## Describe the bug
Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from enum import Enum
class A(Enum):
a = 'a'
def main():
a = A.a
def f(x):
return {} if a == a.a else x
ds = load_dataset('cnn_dailymail', '3.0.0')['test']
ds = ds.map(f, num_proc=15)
if __name__ == "__main__":
main()
```
## Expected results
The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood.
## Actual results
```python
File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type
pickler.save_reduce(_create_type, (type(obj), obj.__name__,
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce
save(args)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save
f(self, obj) # Call unbound method with explicit self
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple
save(element)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save
self.framer.commit_frame()
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame
if f.tell() >= self._FRAME_SIZE_TARGET or force:
RecursionError: maximum recursion depth exceeded while calling a Python object
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 3.0.0
Hi ! Thanks for reporting :)
Until this is fixed on `dill`'s side, we could implement a custom saving in our Pickler indefined in utils.py_utils.py
There is already a suggestion in this message about how to do it:
https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
Let me know if such a workaround could help, and feel free to open a PR if you want to contribute ! | [
0.1053604186,
0.1992541254,
0.0405321047,
0.1406992525,
-0.0743718147,
-0.0783434361,
0.1477604806,
0.2337797284,
0.1263176054,
0.1690647155,
0.1453326046,
0.9332163334,
-0.2908694744,
-0.3072983325,
-0.0783376917,
0.0934458449,
0.0223676898,
0.0455222614,
-0.618113637,
-0.245678544,
-0.3375146985,
-0.0052424036,
-0.1024472639,
-0.0100889169,
-0.2116013467,
0.2239995897,
0.0477665439,
0.4010352194,
0.0841138214,
-0.2200672477,
0.3333718777,
-0.073449783,
0.1974622607,
0.3142177165,
-0.0001113916,
0.0850248337,
0.1187559217,
-0.2274406254,
-0.3654647171,
-0.2395341843,
0.1474915147,
0.1226188391,
0.0726438314,
-0.4154759645,
0.2226357162,
0.3753211498,
-0.0025736652,
-0.2636499703,
-0.0621620603,
0.0543685779,
0.1718366742,
-0.1396810114,
0.2170403153,
0.0761598647,
0.4435096979,
-0.018286664,
0.0448157042,
0.5206540227,
0.1653602123,
-0.3055963814,
-0.1643483341,
0.1722365767,
-0.0976960659,
-0.0254111439,
0.3883351982,
-0.113608785,
0.6294153929,
-0.0288462695,
-0.16401501,
0.2222028673,
-0.1290317774,
-0.2840957344,
-0.2295472622,
0.0401712209,
-0.0794382393,
-0.1017232612,
0.3087863922,
-0.0180279724,
-0.0133563988,
-0.077560693,
0.1240700111,
-0.2159888148,
0.0056778789,
0.4278800189,
-0.1641046554,
0.5943014622,
0.1378127784,
0.1661041528,
0.2780689597,
-0.1684813499,
-0.1965378076,
0.1178518832,
0.1020066738,
0.09503337,
-0.2208728939,
-0.0939792618,
0.2846586406,
-0.360153228,
0.3353612423,
-0.1542603523,
0.0143166296,
0.1036642268,
-0.0685879365,
0.3336909711,
0.3899121284,
-0.1418341994,
-0.051656343,
0.5599201918,
0.2155427933,
-0.1122439355,
0.0307029635,
0.360703826,
0.0600124933,
0.0919064432,
-0.0083616823,
-0.1110875458,
0.01128757,
-0.095411472,
-0.1062043905,
0.4172791541,
-0.4747123718,
-0.1136132404,
0.1349553466,
0.1240018606,
-0.1058504283,
0.0211870559,
0.1341362447,
0.0897011161,
-0.052564498,
0.4216716588,
-0.2110072076,
-0.0060293786,
0.0234192908,
-0.2131150067,
-0.1768060774,
0.0548268035,
0.2632887661,
0.0713272467,
0.1322998703,
-0.0223734602,
0.0825916007,
-0.2246849388,
0.1783070266,
0.1025305837,
-0.5080519915,
-0.0832128078,
0.2530030906,
-0.2604119778,
-0.2579995692,
0.2515309155,
-0.4531786442,
-0.0923265815,
-0.3719530106,
0.2141514421,
0.1512586027,
0.1420761198,
0.1465845108,
-0.1181596071,
0.3029903471,
-0.1372454911,
0.1552295685,
-0.4185495973,
-0.3111717999,
-0.2451113462,
0.0752647743,
-0.0309840068,
-0.072397694,
-0.2012917697,
-0.2666212618,
0.1593030393,
0.1756732613,
-0.0490409732,
-0.1848201007,
-0.1414387822,
-0.2404542863,
0.2867937684,
-0.1029910967,
-0.1263522059,
-0.3646343052,
-0.0630570501,
-0.0521468297,
0.1691657156,
-0.2541861236,
-0.1637444347,
0.2021382451,
-0.2736369967,
0.5204457641,
0.1751688868,
0.1138645932,
-0.014207501,
-0.3202032149,
-0.1133952439,
0.3278878033,
0.1209527999,
-0.1715011746,
-0.0926164687,
-0.265378803,
-0.1963818967,
0.3977232277,
-0.2698429823,
0.0405842587,
0.1311579943,
0.1083371267,
0.08826527,
0.0628296509,
-0.1535955369,
-0.3434664905,
0.1982898414,
-0.2558757961,
-0.0215068515,
0.0164882895,
-0.1004740149,
0.0963972807,
0.2580535412,
-0.0351008773,
-0.0973074436,
0.1891378164,
0.0994401574,
-0.1080731377,
-0.0216377079,
-0.0003865436,
-0.3291852176,
-0.4009250104,
-0.0294389203,
0.0524639525,
0.3023038507,
-0.230508253,
-0.2322060764,
-0.2058909833,
0.1653585285,
-0.0919001102,
0.0035679452,
-0.2516868412,
0.0290702842,
0.3874913454,
-0.5933541656,
-0.2805412114,
-0.0545176864,
-0.1167529672,
-0.2748850882,
0.0368424281,
0.4684724212,
0.145491749,
-0.2771626711,
0.2459005266,
0.1754849404,
0.1758498847,
0.1228598058,
0.0697168857,
0.2272967696,
-0.1998264045,
-0.1135166734,
-0.02902399,
-0.3736835122,
-0.1019666791,
0.09346921,
0.0345105976,
0.1148609146,
-0.0388509482,
-0.2529436946,
0.167915076,
0.2472829521,
0.2872358859,
0.2680384219,
-0.14141123,
0.0800696611,
0.1683732718,
0.0561094359,
0.1142270714,
-0.0879762247,
0.0976701379,
0.1423884481,
-0.1171694249,
0.1136521101,
-0.0736679137,
0.0754609928,
0.3981696367,
0.1457406431,
-0.0600118898,
0.0496477708,
-0.0412557572,
-0.2883345485,
-0.0536867939,
0.1021304131,
-0.0684400871,
0.0745905265,
-0.4567011595,
0.4747096896,
0.13333112,
-0.5235564709,
-0.2458881736,
-0.2118289471,
-0.1701544523,
0.1294810474,
-0.5239450932,
0.2111627162,
-0.1791204512,
-0.44667238,
0.1996655911,
-0.344062835,
0.2858994603,
-0.3210588396,
-0.2967033684,
-0.0235464163,
0.1581546962,
-0.1790602505,
0.0374892652,
0.2627149522,
-0.3319723308,
0.0355787575,
-0.2012698948,
0.1469756514,
0.0324611738,
0.1711266786,
0.2742405534,
0.0931566805,
-0.4386805594,
-0.4228977859,
0.1325160265,
0.1339357495,
-0.0586655512,
0.0601035804,
0.2963470221,
0.2722680271,
-0.2222014964,
-0.3065882921,
-0.197307393,
-0.3845987618,
-0.2084994018,
0.0703799129,
0.4546932578,
0.2742165029,
-0.016064398,
0.4758416414,
0.3324288428,
0.3127490282,
-0.3234796822,
0.3757662773,
0.2017488182,
-0.1626096368,
-0.2093155384,
-0.1637183279,
-0.5420064926,
0.0844262168,
0.1182150841,
-0.5454446077,
-0.2052110583,
0.1891745478,
0.0723087117,
-0.2491005957,
-0.1957812607,
0.1190050617,
0.2233188301,
0.0628092885,
-0.0219543055,
-0.2726018429,
0.2237222344,
0.2733662724,
0.1518391222,
0.1783870161,
-0.0109513765,
-0.0432437137,
0.3684875071,
0.3489732146,
-0.0253312327,
0.411600709,
0.3529876173,
-0.0865499154,
0.0425223671,
0.0363262817,
0.1121198237,
0.0395058915,
-0.089695096,
0.1329945028,
-0.1452874243,
-0.6623034477,
0.0320489183,
0.1480094641,
0.3037309051,
-0.4923018813,
0.2677828968,
-0.393976599,
0.0531445332,
-0.3042105436,
0.2357546389,
0.1242342591,
0.226337105,
0.109044984,
-0.0914259851,
0.190357551,
-0.1192370057,
-0.0924876332,
-0.1650371552,
-0.0067231506,
0.1185411215,
0.3353765011,
0.3717652559,
-0.0453587323,
-0.3760144114,
-0.1243965402,
-0.1063318551,
0.4010098279,
-0.3481984735,
0.0769573376,
0.412226826,
-0.2628344893,
-0.2899605632,
-0.135805741,
0.0748562813,
0.0418149978,
0.3262104392,
-0.1238100752,
-0.4923032522,
0.1185788587,
0.4219983816,
0.0081254952,
0.1181250811,
-0.0038845465,
-0.058897946,
-0.1878027618,
-0.2951492071,
-0.011558596,
-0.1458279788,
0.1225045994,
0.215028286,
-0.0180003196,
-0.1149311066,
0.1004173681,
-0.083803013,
-0.1668768525,
0.2862613499,
-0.1239508539,
0.1584715396,
0.1450294256,
0.302513361,
0.2738065422,
0.32763502,
-0.3374812305,
0.1992721409,
0.2932469845,
0.2256001085,
0.1761761755,
0.055247806,
0.2008030117,
0.1537930667,
0.0105551668,
-0.1905162334,
-0.1788253486,
-0.3223813772,
0.087277554,
0.0500284024,
-0.1219284385,
-0.3815683722,
0.0662227273,
0.1693699062,
-0.0110467374,
0.0616261028,
-0.3657361269,
-0.0102440659,
0.4981332123,
0.3520676196,
0.8710967302,
0.2196188569,
-0.0461066104,
0.0972308218,
-0.0263176337,
-0.2297056466,
0.3024890423,
-0.1804320216,
-0.2986611128,
0.00406738,
-0.0744973421,
-0.1246087328,
-0.0215664357,
-0.0152553003,
-0.3948971033,
0.0234435536,
-0.1997486055,
0.0419670455,
0.0282366648,
-0.052602943,
-0.0607001856,
-0.1094833612,
0.2939591408,
0.1608692706,
0.0929875225,
0.07982409,
-0.065613389,
-0.0919521749,
-0.2405120134,
-0.380510062,
-0.1540367007,
0.1441756189,
-0.1137664765,
0.4462915361,
0.3543664217,
-0.2859050632,
0.13251625,
0.3625555038,
-0.2675672174,
0.1217102557,
-0.0649966076,
-0.0234083124,
0.0419260152,
0.1990348548,
0.2569919825,
-0.0653647706,
0.5327146649,
-0.0084037557,
-0.2321225554,
0.1457434893,
-0.0940774977,
-0.2741780281,
-0.0868035182,
0.3060583174,
0.3108744323,
-0.0182178132,
0.0556955859,
-0.0570493266,
-0.175193727,
-0.1722621918,
0.1487811953,
0.1978511959,
-0.1734807193,
0.2513154745,
0.0907392353,
-0.2189702094,
-0.0801060498,
0.4010270238,
0.4048633575,
0.5142775178,
0.3133553863,
-0.0660539195,
-0.1195439771,
-0.1525502354,
-0.3521789908,
-0.3539167941,
0.2396393269,
0.2017316818,
0.0184830539,
-0.1471089572,
-0.33260566,
-0.0950678438,
0.081941545,
0.2781377435,
-0.4085234404,
-0.2797383666,
-0.3357232213,
0.0974262133,
-0.1204472035,
0.2147093266,
-0.2588469088,
-0.0375361852,
-0.3156366348,
0.2042545527,
-0.3219062388,
0.0381848365,
-0.3997867107,
0.1722812355,
-0.148306638,
-0.2481524646,
0.0182315111,
0.0307650194,
0.1673876047,
0.2304181755,
-0.2873896956,
-0.1121999472,
-0.2405645251,
0.0865457058,
0.1410396695,
-0.1369154602,
0.1307749897,
-0.1663820744,
0.0774900615,
-0.1897874773,
0.0325979516,
-0.1548466682,
-0.1185715646,
0.3641764522,
0.1978075355,
0.1557998061,
0.1883445829,
0.2656751573,
-0.1431949735,
0.2839574218,
-0.1587208509,
0.0132916328,
-0.2259700298,
-0.0838631839,
-0.0842177793,
0.0726766288,
-0.2182116956,
-0.2391781658,
0.2639331222,
-0.0150742214,
-0.1912010014,
-0.0865056142,
0.1725260019,
0.2049277723,
-0.3796471357,
-0.1530581862,
0.540761888,
0.2050436884,
-0.0046197176,
-0.0341049768,
0.5727976561,
-0.0924608409,
0.2316608131,
0.3061141968,
-0.153756991,
-0.1879760772,
-0.1503072977,
-0.0117989406,
-0.3474123776,
0.0528137907,
0.215601027,
0.4500200152,
-0.1907595098,
0.1537032723,
0.1534423679,
-0.1342352778,
0.5434713364,
0.0144108739,
0.1349454969,
0.1574077755,
-0.0015680064,
0.0444373302,
0.3795163631,
-0.4899708033,
0.4982144535,
0.6172639728,
0.2385596931,
0.3534964025,
0.1136447564,
0.1797678322,
-0.1803996414,
0.031093061,
-0.1614091098,
0.2059420049,
-0.347053498,
-0.018273402,
-0.017570138,
-0.1287973523,
0.0025713891,
0.0317991748,
-0.0331077836,
-0.1463286281,
0.2225929201,
0.1030734554,
-0.2522373199,
-0.3613154888,
-0.0293794069,
-0.1957935691,
0.019742541,
-0.2202988863,
-0.0594294593,
0.1275483668,
0.1394576132,
-0.362834096,
0.1233996227,
0.2021778226,
0.5606964827,
-0.4515581429,
-0.2535941005,
0.2951529026,
0.0871659741,
-0.2988334894,
0.1697480083,
-0.2322260886,
-0.1714935154,
0.4422872365,
0.075216189,
-0.2449633777,
-0.1833670735,
0.1342608631,
0.4924426377,
0.2643303275,
0.0972136185,
0.2130133808,
0.204780072,
0.1633074284,
-0.2080276161,
-0.2605630755,
-0.1555673629,
0.1988854408,
-0.0063203201,
0.3195680976,
0.0728774369,
0.0928778648,
-0.0425353684,
0.2382953614,
0.2152568102,
0.1745690107,
-0.0464246646,
-0.0878166705,
-0.2692610919,
0.3507026136,
-0.1388016194,
-0.2081338614,
0.3059593737,
-0.0111725777,
0.0657361746,
0.1503103226,
-0.1154861152,
-0.2089875191,
0.1607621163,
0.4486102164,
-0.290609777,
-0.1849914044,
-0.1059624404,
-0.1510677487,
0.2687520683,
-0.5409832597,
0.1342630386,
0.1473649293,
0.0705440193,
-0.2318173051,
0.0140693635,
-0.0116061047,
0.3986551762,
0.4254052043,
0.1147440374,
0.4639268219,
-0.1939549893,
-0.1057452932,
0.2056581974,
0.0157289878,
-0.0213507339,
-0.1691845655,
-0.1176788509,
0.3652637601,
-0.0849697217,
-0.2337134182,
-0.1284030676,
0.5321086049,
-0.1069319621,
-0.1859683096,
-0.1602982283,
0.312315762,
-0.013214387,
0.0239583738,
-0.4056391716,
0.2057971805,
0.166184023,
0.2969310284,
-0.0653436109,
-0.2356070727,
0.7419952154,
0.0621227659,
-0.054097645,
-0.1270351708,
0.0202785842,
-0.5549430847,
-0.1697124392,
-0.2463076413,
-0.1268685758,
0.2110937238,
0.1947375983,
-0.5221105814,
-0.150292486,
0.1450443268,
0.0715023279,
-0.2004755139,
0.6373543739,
-0.2366665304,
-0.3341545761,
0.2838118076,
-0.0978839323
] |
https://github.com/huggingface/datasets/issues/2642 | Support multi-worker with streaming dataset (IterableDataset). | Hi ! This is a great idea :)
I think we could have something similar to what we have in `datasets.Dataset.map`, i.e. a `num_proc` parameter that tells how many processes to spawn to parallelize the data processing.
Regarding AUTOTUNE, this could be a nice feature as well, we could see how to add it in a second step | **Is your feature request related to a problem? Please describe.**
The current `.map` does not support multi-process, CPU can become bottleneck if the pre-processing is complex (e.g. t5 span masking).
**Describe the solution you'd like**
Ideally `.map` should support multi-worker like tfds, with `AUTOTUNE`.
**Describe alternatives you've considered**
A simpler solution is to shard the dataset and process it in parallel with pytorch dataloader. The shard does not need to be of equal size.
* https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset
**Additional context**
| 58 | Support multi-worker with streaming dataset (IterableDataset).
**Is your feature request related to a problem? Please describe.**
The current `.map` does not support multi-process, CPU can become bottleneck if the pre-processing is complex (e.g. t5 span masking).
**Describe the solution you'd like**
Ideally `.map` should support multi-worker like tfds, with `AUTOTUNE`.
**Describe alternatives you've considered**
A simpler solution is to shard the dataset and process it in parallel with pytorch dataloader. The shard does not need to be of equal size.
* https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset
**Additional context**
Hi ! This is a great idea :)
I think we could have something similar to what we have in `datasets.Dataset.map`, i.e. a `num_proc` parameter that tells how many processes to spawn to parallelize the data processing.
Regarding AUTOTUNE, this could be a nice feature as well, we could see how to add it in a second step | [
-0.6293718815,
-0.5262185931,
-0.1424404979,
-0.0420491062,
-0.1927179545,
-0.0104302391,
0.5165584087,
0.1782798767,
0.0827182978,
0.1480466574,
-0.0847558081,
0.3020121455,
-0.2687703371,
0.2669042945,
-0.0826475024,
-0.2372145802,
-0.1250282377,
0.0643194467,
-0.0082345083,
0.230846718,
-0.1249569952,
0.0046403166,
-0.1339983046,
-0.2044822574,
-0.3420332074,
-0.0932870507,
-0.0188151821,
0.037900202,
0.3172483444,
-0.244389683,
0.0603745878,
0.4343950748,
0.1305344701,
0.585218668,
-0.0001076541,
-0.0930029452,
0.1798301786,
-0.0003877878,
-0.0898808688,
0.0590005815,
-0.0778126717,
-0.1035521328,
0.0630580261,
-0.3442629576,
-0.0596426204,
-0.2667039037,
0.1754977852,
-0.4042601883,
0.2037626803,
-0.1677054763,
0.1624762118,
0.3757340908,
-0.1845999956,
0.108905077,
-0.3134668171,
-0.0016087536,
-0.1212614775,
0.0694385916,
0.629193604,
0.0375891477,
-0.3766746223,
0.3427776694,
-0.2514379025,
0.3703423142,
0.2419781685,
-0.1848530173,
-0.3477921486,
-0.4835860729,
0.0880193189,
0.3975021541,
0.2647565603,
-0.2432528585,
-0.1754494011,
-0.411239475,
-0.1313700378,
-0.067261152,
-0.056901481,
0.1599917263,
-0.2204436362,
-0.0761078298,
-0.3439472616,
-0.0879492834,
-0.2108644247,
0.1095365584,
0.1564041078,
0.3157582879,
0.0834363997,
0.2758636475,
0.2605763972,
0.1159338802,
0.3285746574,
-0.1067810208,
0.3322061598,
0.1372991204,
-0.4830513597,
-0.2322724313,
-0.0932081193,
-0.4594942927,
0.1724087,
-0.0372720659,
0.2354431152,
0.3031926155,
-0.1467371434,
0.3102490902,
0.3134964108,
-0.273982048,
-0.2789576054,
-0.1171552241,
0.4016439021,
-0.1800671518,
-0.1007044166,
0.0791769028,
0.1089922935,
-0.3574825525,
0.3322723508,
0.2111252248,
0.1256032437,
0.3532759547,
0.1471806765,
-0.3941157162,
-0.1462439299,
-0.2977169752,
-0.0636942536,
0.1053121686,
-0.0647524521,
0.3614374995,
-0.1102483794,
-0.1895646453,
-0.0609048642,
-0.269421041,
-0.0108172521,
-0.265240252,
-0.0306396335,
0.1368183643,
0.207842052,
-0.5171918273,
0.2112830877,
-0.0188691802,
0.3191462159,
0.2308339328,
0.3875932693,
-0.2626329064,
0.2241920978,
0.0336894915,
0.0267634839,
-0.0016430393,
-0.18489106,
0.5143520832,
-0.1868381649,
0.3826094866,
-0.2418970168,
-0.53414464,
-0.0030775322,
0.1260259748,
0.0426390991,
-0.0261152014,
-0.1706096828,
0.3209350705,
0.2911278307,
-0.2322875261,
-0.0450491384,
-0.0829446241,
-0.3704199195,
-0.261688292,
0.1099368706,
0.1438870132,
0.0900039971,
-0.0141939968,
-0.0176148936,
0.0520846359,
0.0604343079,
0.2784422934,
-0.2516743839,
-0.1148800328,
-0.1209257618,
0.2565869093,
0.2521808147,
-0.0623328835,
-0.1281464845,
0.5759638548,
-0.1012862995,
0.0670711994,
0.2291385978,
0.4602634013,
0.48731938,
-0.1004530415,
0.0499886647,
0.4320585132,
-0.3681762516,
0.3279695511,
-0.1328710318,
-0.2349711359,
0.2222042084,
0.4411796331,
0.2141227424,
-0.1205198765,
-0.0339909643,
-0.3242703676,
0.39233464,
-0.1728549004,
0.2822702527,
0.0077500492,
-0.0183662158,
0.042802833,
0.1039087772,
-0.4952968359,
-0.4326004088,
0.1770923138,
0.14759624,
-0.1315745711,
0.3082437813,
-0.1840862483,
0.2749667764,
-0.1251863539,
-0.1211157069,
-0.1684863567,
0.0596544892,
0.1639615595,
-0.232368201,
-0.4080902636,
-0.5029201508,
0.2063699961,
-0.0860887915,
-0.2651178241,
-0.1824333966,
0.1871778667,
0.1442109495,
-0.0866209045,
-0.1398966014,
-0.0140006728,
-0.0666921437,
-0.1611417532,
-0.0031099282,
0.2786309719,
-0.1334878504,
0.2993046939,
0.0858061165,
0.5260650516,
0.4518823028,
-0.156273365,
0.045842886,
0.2426930815,
-0.1348727942,
-0.2062018216,
-0.0090114083,
0.1845544279,
-0.3368799984,
0.219412595,
0.0417127237,
-0.0113583468,
0.2030810565,
0.0669188946,
-0.1730813384,
0.1992409527,
-0.0525553897,
-0.3027155995,
0.0736509562,
-0.0028768051,
-0.5791732073,
0.2516584694,
0.3946074247,
0.1065454632,
-0.0127726812,
0.0887367651,
-0.1118110493,
0.0106018558,
0.1834913045,
0.1043296009,
0.3538616896,
0.2624371648,
0.1418781877,
-0.106848374,
0.1929641068,
-0.0949224532,
-0.0051332712,
0.0241869576,
0.3479544818,
0.272895515,
0.0987077355,
-0.0123774037,
-0.0414279029,
-0.4256393313,
0.2487672269,
-0.0164841525,
0.0392940119,
-0.0153858736,
0.0869058669,
-0.0173117742,
-0.0803795457,
-0.1648904383,
-0.0341389328,
-0.020999331,
0.1612664908,
0.7649842501,
-0.1086931229,
0.3368276358,
0.1869970411,
0.1899262965,
0.0012889579,
-0.2053342462,
-0.1098533273,
-0.2062004805,
0.2713901103,
0.108214967,
0.1666264236,
-0.2358656228,
0.4359214008,
0.3054795861,
-0.0445546508,
-0.4260458648,
-0.0482702702,
-0.002731692,
0.0770407468,
-0.2029361427,
0.0277963858,
0.1210204363,
0.2024898678,
-0.2030796856,
0.0591699705,
-0.3240244389,
0.0467325225,
-0.1095951349,
0.014464695,
0.0102427788,
-0.0533558242,
-0.215424493,
-0.2746197581,
-0.4614111781,
0.3068508208,
-0.199726969,
0.3495415151,
-0.1097628847,
0.0805515647,
-0.131374523,
0.3815683126,
-0.156650722,
-0.0187263079,
-0.4405144453,
0.2183484733,
-0.319465369,
-0.1749505252,
-0.0687199086,
0.0693104565,
0.1051422656,
0.495021522,
-0.1572958827,
-0.1464730799,
-0.1428732574,
0.2285069972,
-0.1550753117,
-0.0148039041,
0.4700109363,
0.2209293544,
-0.0559556708,
0.0330370143,
0.0362329483,
-0.0336565785,
0.2212246507,
-0.1767290235,
0.3686835766,
0.1956782937,
0.2241789997,
0.9834294915,
0.2730430365,
-0.1933691353,
0.172633484,
-0.0970554128,
-0.234212622,
-0.0213301256,
-0.4307989478,
0.117789112,
-0.3169781268,
0.1275520623,
0.2472836077,
-0.1683031172,
-0.4030025303,
-0.0669215992,
-0.1508390903,
-0.0975207388,
-0.0979944542,
0.4519284964,
-0.252099663,
0.522931397,
-0.2508047819,
-0.235395208,
-0.2905540764,
-0.0854288191,
-0.001717288,
-0.0591427833,
0.5325171351,
-0.2169796824,
0.1875937283,
0.2896521986,
-0.3857783079,
0.2180109322,
0.2700886428,
0.1115730256,
0.0211346149,
-0.0307999924,
0.180156827,
-0.0222092662,
0.590208292,
-0.180959329,
-0.0085111242,
-0.1172948405,
-0.4298486114,
-0.1785358936,
0.1208771765,
-0.0219997689,
0.5310912132,
0.1881124228,
0.3519922793,
-0.3006888628,
-0.3387384713,
0.1681137383,
-0.0491722189,
-0.2068436742,
-0.5010208488,
-0.1466503143,
0.0997282341,
-0.3303321004,
0.0575712845,
0.2879674435,
-0.0101079457,
-0.0430898182,
-0.3219866455,
0.0266617518,
-0.0725408122,
-0.0972077921,
0.0893384591,
-0.1573420614,
0.0391400754,
0.2516458929,
0.295263052,
0.0998363942,
-0.0102311894,
0.1687058657,
-0.0394127592,
-0.299523741,
0.1923435926,
0.0215372071,
0.3395830393,
0.1412066966,
0.0733015537,
0.1217142791,
0.309463799,
0.3474083245,
-0.3580639958,
-0.06978333,
0.1916175783,
0.1663692147,
-0.2413713187,
-0.5865661502,
0.1394339502,
-0.0614258684,
0.0212545991,
0.7402989268,
-0.6871581078,
-0.0097414609,
0.0306589194,
0.2126386464,
0.731896162,
-0.1772028059,
-0.0073232632,
-0.2439951003,
-0.1093555093,
-0.0284228381,
-0.6782634258,
0.2952969968,
-0.3901476264,
-0.3920977414,
0.0123795643,
-0.0111212805,
-0.0493861176,
0.3122451901,
-0.1722315252,
0.0835741758,
0.4423431158,
0.1314246505,
-0.0283049326,
0.5326044559,
-0.1827598661,
-0.4784121513,
0.1902930439,
0.1007151455,
-0.1842089891,
-0.0690600723,
-0.050068453,
-0.2347415388,
0.4787382483,
0.1893512607,
-0.3163776696,
-0.1800214648,
-0.3334517777,
0.2092458159,
-0.1788118333,
-0.1591263711,
0.1756000519,
0.3089119494,
-0.035331931,
-0.2407429516,
-0.172600925,
-0.0363509357,
0.1060291603,
0.1997065097,
-0.2126331627,
-0.2004949749,
0.205283463,
-0.1876519024,
-0.3720927238,
0.1847063303,
0.079523176,
-0.7108383775,
-0.1137463525,
0.1862836629,
0.2419988066,
-0.0530625694,
0.0024892613,
0.1466776133,
-0.3283700347,
-0.0868973061,
0.0864286125,
0.1477684677,
-0.2835684121,
0.3946528137,
-0.1098798439,
-0.0146182105,
0.019464504,
0.2222325206,
0.2573188245,
0.1654965281,
0.1047627032,
0.1918557882,
-0.1148468181,
-0.1579133272,
-0.0795263872,
-0.0692365244,
-0.2391889393,
0.1350428909,
0.0412490815,
-0.0697526932,
-0.0137542449,
0.0260215756,
-0.1451541632,
0.3203092217,
-0.4574453235,
-0.1812989861,
-0.3838827908,
-0.049250856,
-0.128218323,
0.2407490909,
0.1523818076,
0.1835387796,
0.2417334467,
0.2774107754,
-0.3676073551,
0.0033951551,
0.0303830877,
0.1178158522,
0.3157605231,
0.0077408939,
0.0328890905,
0.1178871542,
-0.0120737441,
0.1400617808,
-0.2202545404,
-0.205306232,
0.0054279864,
0.131035462,
-0.0028322376,
-0.1303898096,
-0.1397245526,
-0.3036533892,
-0.4215177596,
-0.2941893041,
0.3874069452,
0.0073461235,
-0.1853873581,
0.1504860818,
0.3489687145,
-0.1714661419,
-0.3820737898,
0.1257567704,
0.0127150789,
-0.011070285,
-0.1302939504,
0.1807024181,
0.1936527938,
-0.0785644799,
0.1138293073,
-0.0060944185,
0.4877409935,
0.0790147409,
0.2957892418,
-0.0931204706,
-0.0083849207,
-0.0264300257,
0.5431426167,
0.0852585286,
0.0113999695,
0.0572851524,
0.105992645,
0.238009423,
-0.2243828326,
-0.0963296592,
0.2588998973,
-0.0133984406,
0.3597096801,
0.0477933288,
0.1111510098,
0.2732595503,
0.2716711164,
0.0893563926,
0.0652726442,
-0.6158900261,
0.1082560867,
0.0534313433,
0.0312713906,
-0.0071789343,
0.1999309063,
-0.010748419,
0.1078583151,
0.1145013124,
-0.0024116375,
0.466404438,
0.344442755,
-0.0291095078,
0.4277683198,
-0.1750669777,
-0.1497742236,
-0.2447572052,
0.0544218458,
0.2061461359,
0.1318283826,
0.3818691671,
-0.1328711212,
-0.3123095632,
-0.1352182776,
0.2957094312,
-0.0832957774,
0.0801599473,
0.1402191818,
-0.0916440114,
0.0491211712,
0.1167824268,
0.0031896872,
0.1527353227,
0.578841567,
0.1417353004,
0.029920809,
-0.1154498085,
-0.1152565777,
0.1618233025,
0.401812911,
-0.1014017388,
0.0352478251,
0.2605154514,
-0.0876449421,
-0.1865586936,
0.3738209605,
-0.011405671,
0.22883448,
-0.2890348434,
0.3083409667,
-0.1942516267,
0.0493062884,
-0.0616874844,
0.1305249929,
0.0310061071,
-0.1848923564,
0.2718440592,
0.0862405822,
-0.1359891593,
0.1400531679,
0.0778838173,
-0.0533229336,
-0.1775748134,
-0.0522572771,
0.1619807482,
-0.3829638958,
0.0948391855,
-0.1358786225,
-0.3094891906,
-0.1989817768,
0.3970515728,
-0.5590795875,
-0.0172539428,
-0.0677932203,
0.0971184671,
-0.0362350754,
0.5721185207,
-0.0464658961,
0.1212590635,
-0.1624726057,
-0.0892015621,
-0.436213553,
0.1404663324,
0.0510176159,
0.1698208153,
0.0484594516,
0.1633260399,
0.0967914909,
0.2467534244,
0.1776276678,
-0.2321390659,
0.2296188474,
0.5826244354,
-0.2657504678,
0.008240507,
-0.1866098642,
0.1839832515,
0.2505392134,
-0.2351412326,
0.1752398908,
-0.0001158528,
0.0779675618,
-0.1394907534,
-0.1977129281,
0.2392977774,
-0.1181762069,
0.3051759601,
-0.0323589407,
0.1504874378,
-0.1956101358,
0.1657875776,
0.0188937187,
0.1386987269,
-0.2586945891,
0.158397153,
0.4099114537,
0.2171965241,
-0.1410979629,
-0.2294483483,
-0.4657685459,
0.1876066923,
-0.2457248867,
-0.0698335096,
-0.042702347,
-0.0891586393,
-0.1189173609,
0.1519983262,
-0.0827870071,
0.4181877375,
-0.0050672423,
-0.1724428833,
-0.3620941639,
-0.1471315026,
0.2909375131,
-0.39711079,
-0.343290031,
-0.2164864838,
0.120565325,
0.212236762,
0.305452466,
-0.3281844258,
-0.0952288583,
0.2278412282,
0.0935083404,
-0.0681597069,
0.2993310988,
-0.0034042969,
-0.1540492326,
-0.0574608296,
0.020473564,
0.1408081204,
-0.1839335561,
-0.186101988,
-0.376164943
] |
https://github.com/huggingface/datasets/issues/2641 | load_dataset("financial_phrasebank") NonMatchingChecksumError | Hi! It's probably because this dataset is stored on google drive and it has a per day quota limit. It should work if you retry, I was able to initiate the download.
Similar issue [here](https://github.com/huggingface/datasets/issues/2646) | ## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
| 35 | load_dataset("financial_phrasebank") NonMatchingChecksumError
## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
Hi! It's probably because this dataset is stored on google drive and it has a per day quota limit. It should work if you retry, I was able to initiate the download.
Similar issue [here](https://github.com/huggingface/datasets/issues/2646) | [
-0.122161679,
0.2191510797,
-0.0784074441,
0.2884528041,
0.2203612775,
0.1347172856,
0.065888986,
0.3310615718,
0.209574312,
0.1821723729,
-0.1414383054,
0.0533879958,
0.1674157977,
0.07501553,
-0.1415329129,
0.0439128391,
0.0427034497,
-0.0287593342,
0.0304535646,
-0.1089906842,
-0.1035574898,
0.3996218145,
-0.2143703103,
-0.204873547,
-0.0571745783,
0.0271738674,
0.1256501079,
0.1493479013,
-0.3555093408,
-0.106242761,
0.3173009157,
0.2356398702,
-0.0364056341,
0.408857137,
-0.0001165979,
-0.1570467204,
0.2954361737,
-0.0023204722,
-0.3087727427,
-0.4117236733,
-0.3101622462,
-0.5327077508,
-0.0006331801,
-0.1562373191,
0.1472095251,
0.2293885201,
0.1187412888,
-0.0404396057,
0.1839254349,
0.2563110292,
0.1976445019,
0.1766310334,
0.1544100195,
-0.0672572479,
0.2356062382,
-0.306135267,
-0.0442655832,
0.2061335891,
0.1339271516,
0.1396628618,
-0.1116091162,
0.0986640155,
-0.2409785092,
0.3398786485,
-0.0248230733,
-0.0569330603,
-0.1054869145,
-0.435031414,
0.3071874976,
0.4293165803,
0.5019189715,
-0.1383177936,
-0.3338047266,
-0.2137771547,
-0.1314462125,
-0.0050599054,
0.4133679867,
0.2254232913,
-0.22245197,
-0.0487494357,
-0.4026900828,
0.2127029896,
0.0522078872,
0.1742326319,
0.0008494407,
-0.0786487907,
-0.1465947926,
-0.0958845764,
0.2525237501,
-0.0932485014,
0.0778144225,
-0.3102551699,
-0.0711331218,
0.2796262503,
-0.3990392983,
-0.0756753981,
0.0446170717,
0.5124952197,
0.5575391054,
0.3724073768,
0.1555419713,
0.2275237888,
-0.2916595936,
0.0197752118,
0.1210930794,
0.2486975491,
0.0146072907,
-0.1616900414,
0.2106141448,
0.4556144178,
-0.0590558946,
0.1310697198,
-0.0883602947,
-0.0742755309,
0.5709370375,
-0.055899933,
0.0653929412,
-0.5341385007,
-0.3482499421,
0.4446008801,
-0.1251796931,
-0.1410442889,
-0.0437682979,
0.2691246271,
-0.2513552606,
0.1109620258,
-0.0669108853,
0.1472852528,
-0.0376439132,
-0.1506906003,
-0.2671845853,
-0.0550957136,
-0.1249772534,
-0.0389058329,
0.2755369246,
-0.4455492496,
0.3306751251,
-0.0811800808,
0.2223323286,
-0.2022910565,
0.0439214036,
-0.1592710912,
-0.275652349,
0.2825683653,
0.1362628043,
0.2232763171,
0.0382251367,
0.0837551355,
0.0077715516,
0.0198637191,
-0.2361139655,
-0.1198630556,
0.0956026316,
0.212060973,
-0.5457581282,
-0.4264358878,
-0.0918329805,
-0.2004864365,
0.1569832563,
-0.0646278858,
-0.0429724529,
-0.0988636017,
-0.2170906961,
-0.2330785394,
-0.0128976591,
0.2208422571,
-0.1360917687,
-0.019683592,
-0.1142557114,
-0.0846792236,
0.4203272462,
0.3317055702,
-0.0746125281,
0.046775993,
-0.1993375719,
0.3415529728,
0.2876549363,
-0.0402505845,
-0.8489012718,
0.2736240029,
-0.0461515188,
0.3179982901,
0.1135814339,
0.0936849266,
-0.0120975059,
0.0986147895,
0.0596024245,
0.2110909224,
0.0724113882,
0.1698854566,
-0.1996619105,
-0.332952708,
-0.0283887591,
0.1590504944,
0.0541047789,
0.1359464973,
0.1838504672,
-0.0445338897,
0.2891628444,
-0.026276987,
0.0180042908,
0.233686015,
0.2727539539,
0.2090257555,
0.1021463275,
-0.2314193249,
-0.3615790606,
0.3223057985,
-0.2195712626,
0.1002212167,
-0.015847411,
-0.1486969292,
-0.3613631725,
-0.2824738324,
-0.1490220428,
0.1300823241,
0.0898798332,
0.3411882222,
0.3992158175,
0.0405048206,
-0.0459840745,
0.3040064573,
-0.1290017366,
0.0751187131,
-0.1407591105,
0.2749924362,
-0.03420664,
-0.0159850474,
0.0301264226,
-0.0177686736,
0.1630054414,
0.0362788774,
-0.1874522567,
0.2895478606,
0.2095123529,
0.1428240985,
-0.0875204057,
0.2737726569,
-0.1595004052,
-0.0725644305,
0.0289920699,
0.4911871552,
0.1428548098,
-0.0163486302,
-0.1632609814,
0.3131427169,
0.0755077973,
0.0060956441,
0.037729241,
0.1592748612,
0.3733705878,
-0.1345325261,
-0.0825448632,
-0.1518209279,
0.5095812082,
-0.3409511149,
0.2042862177,
0.0117272716,
-0.2768357694,
-0.0628603697,
0.2434816957,
-0.1203335524,
0.1307430267,
0.1853297949,
0.0470327288,
-0.0759682506,
-0.1524517238,
0.5569286346,
0.2706280649,
0.2248675227,
0.1861107647,
0.0303606708,
-0.0696508139,
-0.2190411091,
-0.0496182144,
0.2269034386,
0.1424945891,
0.5023202896,
0.2711748183,
0.0449597985,
-0.4356443882,
-0.0609105304,
0.0420996025,
0.3274985552,
-0.3210886717,
-0.1184831709,
-0.0740199834,
-0.3158182204,
-0.2219234705,
-0.1268129051,
-0.1441176236,
-0.4463296533,
-0.1008802056,
0.3465776145,
0.016585663,
0.0658373609,
-0.2468461096,
0.0564301535,
-0.0425220653,
-0.239436239,
-0.1359227449,
0.2502993941,
-0.1967726648,
0.0108748749,
0.2604634166,
-0.0329328775,
0.3196415305,
-0.3917440176,
-0.0326172821,
-0.7137259245,
-0.2451633513,
0.0635805801,
-0.2230636775,
0.2376657873,
0.2862512767,
0.2511951327,
-0.2726145387,
0.0127000064,
0.1277004927,
-0.0658943281,
-0.3835558295,
0.2892596722,
-0.1202681959,
0.0041036792,
0.0760870576,
0.0091316141,
-0.2212629616,
-0.3392722309,
0.1055782884,
0.1535755396,
0.1743022054,
0.3875109851,
-0.1369951516,
0.098293975,
-0.0144526102,
0.4250249863,
-0.28994295,
-0.570898056,
0.5505200624,
0.1047238261,
-0.4363672733,
0.0650429502,
-0.0068896338,
0.0403069332,
0.2376916111,
-0.5485626459,
-0.1757596582,
-0.4750023186,
-0.0197928548,
0.206916526,
0.0863767937,
0.2451553792,
-0.1192779317,
-0.0731348917,
-0.1427674145,
-0.2040532976,
0.1644187868,
0.0457208939,
0.2432696074,
-0.2186841667,
0.3314567208,
0.0300986245,
0.2455588579,
0.4993487895,
0.2258812636,
0.3620392084,
-0.0157044921,
0.1015440598,
-0.1246870011,
-0.2068128288,
-0.2209390104,
-0.144907102,
-0.1907993555,
0.2884584069,
0.0923218727,
-0.0258496236,
-0.171409443,
-0.2088143229,
-0.3271814585,
-0.0996693522,
-0.0835734904,
0.037435554,
0.2761643231,
0.2141872048,
0.1735150665,
0.0233187303,
-0.4117974639,
-0.0359504931,
0.1915614456,
-0.1432242692,
-0.0861983374,
-0.1249313429,
0.0669989958,
-0.1941168308,
0.3062369823,
0.2048944831,
0.313277185,
0.0918786824,
-0.0567606278,
0.0808624327,
-0.1370030642,
0.235016942,
-0.3195801377,
0.2417844832,
-0.1173864603,
-0.0975530148,
-0.0400495641,
-0.134679988,
-0.1839418709,
-0.006651815,
0.178133741,
0.2111275792,
-0.3331176937,
0.1802728474,
0.1622034907,
0.3555179834,
-0.07344497,
-0.2499946058,
-0.3602523208,
-0.3973374963,
-0.4730680883,
-0.0465527326,
-0.0780731812,
0.2964991629,
0.0057761669,
0.0083066225,
0.1236909553,
-0.0609050319,
0.3348438442,
-0.1178349778,
0.2964921296,
0.1444339454,
0.4310886562,
0.0208030008,
-0.2529498339,
0.2428247184,
0.850620687,
-0.1115589142,
-0.3002644777,
-0.0208238587,
-0.2596763968,
-0.1827897877,
0.2945629358,
-0.0698254332,
-0.1580358148,
0.5602294803,
-0.0459540933,
0.0295532905,
-0.1841435134,
0.2151615024,
0.1545515954,
-0.3614546657,
-0.382971704,
0.2304230332,
0.1975792348,
-0.0046774298,
-0.003739486,
0.0719223469,
0.0169114061,
0.2724886537,
-0.0937045068,
0.8974527717,
-0.0552462377,
0.11758928,
0.1804945171,
-0.032611005,
0.2929914594,
-0.1215181649,
0.0069583096,
-0.3133255243,
-0.3222323954,
-0.1347278506,
-0.1603715718,
-0.029078301,
0.0732392818,
-0.08669734,
0.4799544811,
-0.0798345804,
0.1357246041,
0.1839293838,
0.2583574653,
-0.3799634278,
0.014992848,
-0.0880149901,
0.1443733573,
-0.1540364176,
0.4836384058,
-0.0140660033,
-0.0352432914,
-0.1993365735,
-0.0697435886,
-0.4931160808,
0.1923331916,
-0.1009212583,
-0.0309274532,
0.1258203387,
-0.0468099639,
-0.0820196271,
0.141716361,
0.3609255552,
0.217204392,
-0.3999872506,
0.0911652297,
0.4621317387,
-0.1197997853,
0.1616779268,
-0.168874383,
0.3982611597,
-0.088603273,
-0.0883512199,
0.0203620251,
0.0301735811,
-0.2782289982,
-0.1040682271,
-0.1673217267,
-0.220861271,
-0.4374100268,
-0.3119947612,
-0.2206150144,
-0.022058852,
-0.3384542465,
0.1484307349,
0.3153917193,
-0.1170987189,
0.0452212244,
0.1356399506,
-0.3526618481,
-0.2894952893,
0.508267045,
0.0665684491,
-0.2172293067,
0.4001288414,
0.2137261331,
-0.3720185459,
-0.2060298026,
-0.2480863035,
0.0154856518,
-0.5568868518,
0.1028476357,
-0.1460930258,
0.1439405084,
-0.1928807944,
0.6873802543,
0.366198808,
0.069799073,
0.0478506535,
-0.5624490976,
-0.0862551332,
0.0078371502,
0.1924952567,
0.2684267759,
-0.1106654927,
-0.1940055788,
0.1182286441,
-0.3049823344,
-0.3084527552,
0.0951334462,
-0.367718339,
-0.2362302095,
0.0257711001,
0.045689024,
0.2157554477,
-0.0252676997,
0.1524682194,
0.1220989972,
-0.1302345991,
-0.2290393412,
-0.0952445865,
0.1270601004,
0.1071471125,
-0.1345245093,
0.1926582307,
-0.2410960495,
-0.2747994065,
-0.0860039443,
-0.107716389,
0.2322983295,
-0.006430719,
-0.0020666346,
0.4033739865,
-0.0852802396,
-0.0753920227,
-0.010309699,
-0.3013207316,
0.1477063894,
0.049876526,
0.0464970283,
0.1096672565,
0.0157167614,
0.0190075226,
0.1012861878,
0.2976623774,
-0.1261166632,
0.2856270373,
-0.493349582,
0.0349995196,
0.3791499734,
0.4438382983,
0.3468147516,
-0.3567602336,
-0.1222536042,
0.2193127573,
0.2458249331,
-0.3080707192,
-0.0401917621,
0.1209114939,
-0.1554642767,
0.0858021975,
0.1831363142,
0.2804102898,
-0.2571415007,
0.318490833,
0.0923774987,
0.3009258509,
-0.1381951571,
-0.0575688034,
0.2769340873,
0.0487013608,
-0.0406653322,
0.1509642005,
-0.0880109966,
-0.2364579588,
-0.0612558685,
-0.0018630214,
0.1562166959,
-0.1395241916,
0.2553445399,
-0.3627964854,
-0.4343452454,
0.5834097862,
0.2807838917,
-0.1072907075,
0.0108279446,
0.0934109837,
0.4049896002,
0.0636730343,
0.4803865552,
-0.4838215709,
0.1242951453,
-0.1419123858,
-0.0481925011,
0.0856261775,
-0.3457254767,
-0.0336676091,
0.2599738538,
-0.1245321333,
-0.0538141429,
0.1761935353,
0.02603985,
-0.066199705,
-0.5886386037,
-0.2144330144,
0.055666104,
0.0368917957,
-0.3682448268,
0.328042388,
0.0068316013,
-0.1071479395,
0.1543099731,
0.5266042352,
0.4051479995,
0.2689424157,
0.0497506,
-0.0460614674,
-0.1030213609,
-0.0639668331,
-0.1054769903,
0.730872333,
0.0666671768,
0.1839333177,
0.4525198638,
0.1251128912,
-0.2385045886,
-0.1184502319,
-0.1909352541,
-0.1659151614,
-0.2035478055,
0.5051550269,
-0.0546077788,
0.3409983516,
-0.2327009737,
0.0303858835,
-0.53577739,
-0.2007474154,
0.1476439536,
0.0456341021,
0.1432322264,
0.0100594237,
0.094828397,
-0.1558016241,
0.2976531088,
0.4738083482,
0.3946791291,
-0.2382066399,
-0.1704329848,
-0.7519156337,
0.2489972711,
-0.2298062295,
0.0174108893,
0.0112720877,
0.2548755407,
0.0063321106,
0.1431938261,
0.2265385389,
0.1472437382,
-0.2896078229,
0.0963929147,
-0.0963002592,
-0.1539230049,
0.1487318575,
-0.0657907128,
-0.1417072266,
-0.2585193217,
0.2292402238,
0.0112277269,
0.0666426569,
-0.0997960269,
-0.0953959152,
-0.1319226921,
-0.0698080286,
0.1715172231,
0.0703994632,
0.7023627758,
-0.1001649797,
-0.1950007081,
-0.1363226175,
-0.0615542829,
-0.19642061,
0.2539494336,
-0.03531757,
0.3724662066,
0.0276160017,
-0.1068935841,
-0.2079974711,
0.1193820983,
0.2141571641,
-0.3031125665,
-0.2412964553,
0.0820640847,
-0.2160597742,
0.1823356152,
-0.1776263863,
0.0750410259,
0.198972702,
0.2210660279,
-0.1798101664,
-0.4148390889,
0.5957766771,
-0.1084749922,
-0.1966469288,
-0.036414057,
0.134812519,
0.0660782903,
-0.3253693283,
-0.755881846,
0.1723072678,
0.2922219932,
0.0433014743,
-0.3046833277,
0.2104218155,
-0.2924987674,
0.1448929608,
0.0048214868,
0.319583714,
0.1815308779,
-0.2171661258,
0.0646397173,
-0.1397778094
] |
https://github.com/huggingface/datasets/issues/2641 | load_dataset("financial_phrasebank") NonMatchingChecksumError | Hi ! Loading the dataset works on my side as well.
Feel free to try again and let us know if it works for you know | ## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
| 26 | load_dataset("financial_phrasebank") NonMatchingChecksumError
## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
Hi ! Loading the dataset works on my side as well.
Feel free to try again and let us know if it works for you know | [
-0.1198336408,
0.1794099361,
-0.0883815885,
0.3396995068,
0.1879687011,
0.1173865199,
0.0060673291,
0.3996658027,
0.141947031,
0.1976890713,
-0.1613843143,
0.2437271923,
0.2304034978,
-0.1089785248,
-0.0927743167,
0.1406143159,
0.1338221431,
0.0298895668,
0.0345547497,
-0.1668420136,
-0.1839316934,
0.3492645323,
-0.1968889683,
-0.1531045437,
-0.0255644452,
0.1277684867,
0.1105168983,
0.1647166312,
-0.2496968359,
-0.1128348336,
0.373203069,
0.1607762128,
-0.0779850408,
0.4326269627,
-0.0001198013,
-0.10419631,
0.2349774539,
-0.0170199201,
-0.2702703178,
-0.3771176934,
-0.4048727751,
-0.5063531995,
0.0147820488,
-0.1779721379,
0.1007491797,
0.267157793,
0.1191740632,
-0.0723108798,
0.0938148946,
0.1856912673,
0.1936353743,
0.155429095,
0.0486353338,
-0.0412599705,
0.3124480247,
-0.2527000606,
-0.0651913807,
0.1622198522,
0.1873314232,
0.1267404258,
-0.2227673084,
0.1186725199,
-0.3079533577,
0.3004409969,
-0.0344961807,
0.0108131245,
0.0467391945,
-0.3264698386,
0.2752399445,
0.4079027474,
0.4325537682,
-0.1871506572,
-0.2944859862,
-0.1738484204,
-0.1533007324,
-0.0023675263,
0.4001487494,
0.1629083455,
-0.2278743684,
-0.0463879406,
-0.3922581077,
0.2648799419,
0.052860789,
0.2153357565,
0.0590293482,
0.048391711,
-0.0609726347,
-0.1191073209,
0.1370474398,
-0.0754752159,
0.2253556848,
-0.3740886152,
-0.1097708419,
0.2610439658,
-0.420671761,
-0.061445687,
-0.0303058475,
0.5376827717,
0.529184103,
0.353502214,
0.1522082686,
0.2514331341,
-0.2445680499,
0.0461461805,
0.0204784051,
0.2093227357,
0.0655856133,
-0.0943784118,
0.1245096326,
0.387291342,
-0.1391384155,
0.1805371642,
-0.0368319191,
-0.0456449799,
0.6784488559,
0.0181595571,
0.1439567804,
-0.5884660482,
-0.336814642,
0.4549659193,
-0.1517418474,
-0.1199073195,
-0.0062455833,
0.3078670204,
-0.2831115723,
0.1685541123,
-0.105060026,
0.1378828585,
-0.0804603696,
-0.1539841145,
-0.2957545519,
-0.1397242248,
-0.1504715085,
-0.0632837787,
0.2246824503,
-0.3565537333,
0.3352395296,
-0.0515731648,
0.2992821634,
-0.1967780292,
0.015907295,
-0.1158532202,
-0.192108497,
0.2023260742,
0.0298570022,
0.2005929351,
0.1549965739,
0.059727326,
0.0133518577,
0.0879231989,
-0.2705897093,
-0.132460922,
0.1108848229,
0.2053997219,
-0.5836595893,
-0.3937796354,
0.0451772884,
-0.2672803998,
0.2497828603,
-0.1411279589,
0.0544543788,
-0.1093122065,
-0.215465486,
-0.2687776983,
-0.0199844986,
0.1369311512,
-0.1675181687,
-0.0077665374,
-0.0942450315,
-0.1026165932,
0.5374267101,
0.2014992088,
-0.0416984409,
0.0285321828,
-0.2054147571,
0.2833957672,
0.3906704187,
-0.1673757285,
-0.879896462,
0.259762764,
-0.0273196623,
0.4781276286,
0.1399355829,
0.160044536,
-0.0521170236,
0.0658209026,
0.1036422253,
0.1195329726,
0.0777687877,
0.1902892143,
-0.2474449128,
-0.3442917466,
0.039446976,
0.1539604664,
0.044324778,
0.1407006979,
0.1851329654,
-0.0210837014,
0.3947174549,
-0.0458302982,
-0.0327070653,
0.094594866,
0.3341777623,
0.2300526202,
0.1512165815,
-0.3137421012,
-0.3739696443,
0.3189924061,
-0.2645704448,
0.0681858659,
0.0149741136,
-0.170330584,
-0.3815482259,
-0.2504170835,
-0.2797920108,
0.1239092052,
0.076875031,
0.376924783,
0.3604222834,
-0.0117451847,
-0.0419714153,
0.3240388036,
-0.0933087543,
0.1179430187,
-0.1803279221,
0.280403465,
0.0320101306,
-0.0506399907,
-0.1284962445,
0.0905665308,
0.1922346354,
0.110051915,
-0.2473992109,
0.3598936796,
0.2414756119,
0.067389071,
-0.1680868119,
0.2145635188,
-0.1735950559,
-0.1560676098,
-0.0303701535,
0.5238756537,
0.1082737967,
-0.0023807064,
-0.0148321874,
0.2883144021,
0.0723006874,
0.0380466171,
-0.0439898744,
0.0857011527,
0.326271534,
-0.1612971574,
-0.0934866667,
-0.2017483413,
0.4962557554,
-0.4073311687,
0.1981090605,
0.0379775912,
-0.2952640951,
-0.0991543829,
0.1828970015,
-0.1132808477,
0.1603102684,
0.1191871911,
0.0249363873,
-0.0544470586,
-0.1000170931,
0.5423451662,
0.3044377863,
0.2119982541,
0.1004115492,
0.105939351,
-0.1225009635,
-0.1714086682,
-0.0072752982,
0.2283168137,
0.2661947608,
0.549040556,
0.2414597273,
0.0022511035,
-0.4095115662,
-0.0301397182,
-0.0552828237,
0.2440392524,
-0.4301236272,
-0.0997077823,
-0.1695823371,
-0.3729844093,
-0.2735745907,
-0.2497573644,
-0.1284105927,
-0.4585258067,
-0.0836520493,
0.2773180604,
0.054666914,
0.118055664,
-0.3774234354,
-0.0120091736,
-0.0948294997,
-0.2251136005,
-0.1511171758,
0.2100323141,
-0.1957799494,
-0.015423283,
0.1645876765,
-0.0427269414,
0.2526283264,
-0.4117340446,
0.0165243223,
-0.6264839768,
-0.2493327707,
0.0706533417,
-0.1580812037,
0.2078708112,
0.3840278089,
0.1392317563,
-0.2632398307,
-0.0744715929,
0.2209402919,
-0.0393373854,
-0.3720576465,
0.3436582386,
-0.0934947431,
0.0148344636,
0.1287029684,
-0.0040656626,
-0.2322085202,
-0.2908135653,
-0.0185989924,
0.10105519,
0.2270291895,
0.3653249443,
-0.1820602268,
0.0977609307,
-0.1169122308,
0.4977902472,
-0.2711401284,
-0.5762332678,
0.5287802815,
0.1319573522,
-0.3189799488,
0.0123400092,
-0.0178967826,
0.0606250949,
0.2794055045,
-0.5194582343,
-0.1023496315,
-0.3720163703,
-0.0292396061,
0.1933089048,
0.0693052262,
0.1819201559,
0.0034622997,
-0.0545214638,
-0.2112665474,
-0.1410181671,
0.1383915991,
-0.0830824673,
0.3895275593,
-0.2822101712,
0.295948118,
0.0198221877,
0.2290985882,
0.5105572939,
0.2102248818,
0.2790658176,
-0.0221378002,
0.0786331892,
-0.1357042938,
-0.253015101,
-0.3591163754,
-0.0960391462,
-0.2027604133,
0.2613115013,
0.0672071427,
-0.0426023006,
-0.134684667,
-0.1588934511,
-0.3620477319,
-0.1007310376,
-0.1116909981,
-0.1078895032,
0.2217813581,
0.2286431789,
0.1920690089,
-0.0074412972,
-0.4660684168,
-0.0560879111,
0.1957434863,
-0.2219418883,
-0.119017601,
-0.1878304631,
0.0527469628,
-0.0519203879,
0.3516173363,
0.2311101556,
0.3435096443,
0.1457470655,
-0.1631284356,
0.0708227456,
-0.1249523312,
0.2933347523,
-0.3399790227,
0.2645272017,
-0.091392763,
-0.1360712051,
-0.0874284357,
-0.1689928472,
-0.1418351829,
0.0066419952,
0.1979947239,
0.2709620595,
-0.2072630525,
0.1520736516,
0.1595964581,
0.3525723517,
-0.125257507,
-0.3678179383,
-0.4135632515,
-0.2623332441,
-0.3545668125,
-0.1133565009,
-0.2403358519,
0.3150266707,
0.0603453293,
-0.0413847305,
0.1093558371,
-0.052160114,
0.4151340723,
-0.0601405203,
0.3245255351,
0.0494064875,
0.4183502197,
-0.023410162,
-0.1006492674,
0.2492771894,
0.7642993927,
-0.149109602,
-0.4221656919,
-0.1268508434,
-0.2571388483,
-0.0364701971,
0.2482250035,
-0.1150082648,
-0.1268870682,
0.5341658592,
-0.1608301997,
0.0693539307,
-0.2341209054,
0.1269027591,
0.1964581609,
-0.3661152124,
-0.3686054647,
0.1963642687,
0.1817588806,
-0.0542320162,
-0.0333047658,
-0.0174971521,
-0.0665111691,
0.340520829,
-0.0597455315,
0.9199492931,
0.0424162187,
0.1259316206,
0.1951047927,
-0.0516659655,
0.3047739863,
-0.1051316261,
0.0203015655,
-0.3845818043,
-0.3679979146,
-0.1337034404,
-0.2327865064,
0.0154212229,
0.0759784877,
-0.063377358,
0.4916327298,
-0.1382282376,
0.0897130221,
0.1643393785,
0.0708204657,
-0.2747768462,
0.0489214696,
-0.080693841,
0.1188895851,
-0.2044605166,
0.4700172544,
-0.0599914938,
0.0378524512,
-0.2523480654,
-0.0325144865,
-0.388263464,
0.3136290908,
-0.0900411755,
0.0068345778,
0.1810777932,
-0.0599019453,
-0.1171374172,
0.2041877508,
0.3489328623,
0.2161974907,
-0.3388771117,
0.036106769,
0.6333320737,
0.0288185403,
0.2552765608,
-0.1395580769,
0.3817414641,
-0.0319739617,
-0.1542729735,
0.0370164812,
0.0370304994,
-0.3310629725,
-0.0266516209,
-0.2256550789,
-0.0555974655,
-0.4416367412,
-0.3367224038,
-0.2361734211,
0.0836624801,
-0.35813573,
0.1454234868,
0.2794809341,
-0.1910572201,
0.104803279,
0.0902280733,
-0.4249241948,
-0.1986412853,
0.5109450221,
0.1301188469,
-0.2581570745,
0.3898134232,
0.1299090981,
-0.3723614514,
-0.1800108254,
-0.188239336,
-0.0007799007,
-0.5864366889,
0.0053130724,
-0.1609651744,
0.1322831213,
-0.1549684703,
0.6723008156,
0.4406673312,
0.0752770901,
0.0322015733,
-0.5120886564,
-0.1179991066,
0.0460898727,
0.2858417928,
0.2809040844,
-0.0923961252,
-0.2369230092,
0.0420574322,
-0.3204147518,
-0.2894462943,
0.0279525816,
-0.3091939688,
-0.1901142448,
-0.1275562048,
0.1389645934,
0.1591070592,
-0.0235691778,
0.1628991961,
0.1089340821,
-0.1183580309,
-0.2295141369,
-0.0552687347,
0.1434463561,
0.1118169576,
-0.1579223126,
0.1640966088,
-0.1574898362,
-0.1348264962,
-0.100724116,
-0.1353989244,
0.252268672,
0.0209839083,
0.1265061796,
0.4397990704,
-0.0466281101,
-0.1041766033,
0.0049415324,
-0.3345201015,
0.1264840961,
0.0096746571,
-0.0096271755,
-0.0194079634,
-0.0256756395,
0.0981445834,
0.1202703863,
0.2992763519,
-0.0745702535,
0.3204857111,
-0.5192996264,
0.0408261344,
0.4413580298,
0.3220763803,
0.329051137,
-0.3597909808,
-0.1625896394,
0.1890517473,
0.2422226667,
-0.333081305,
-0.0266629383,
0.1844204366,
-0.1138401628,
0.0457813516,
0.2178557813,
0.2019945532,
-0.323889792,
0.3665142655,
0.0521346331,
0.3090809286,
-0.1789855659,
0.0376734622,
0.4241366982,
0.026364468,
0.0111829508,
0.0806492269,
-0.1289930642,
-0.2466050088,
-0.0109651703,
0.0656309277,
0.2367640585,
-0.0883419067,
0.2106248438,
-0.3246667981,
-0.3685192764,
0.5605862737,
0.2961850464,
-0.1180601195,
0.0086456062,
0.164383173,
0.4116299748,
0.1224038899,
0.4931636155,
-0.4444055259,
0.0553322583,
-0.176274851,
-0.0625825524,
-0.0243953504,
-0.3048773706,
0.014393568,
0.1418551803,
-0.214131847,
0.0696994364,
0.1698766351,
0.018070057,
-0.0291246958,
-0.5382279158,
-0.1806330681,
0.0753897727,
0.0018891394,
-0.3647795916,
0.343775481,
0.0476116128,
-0.0740755051,
0.1884782314,
0.5166018009,
0.3630852997,
0.3304815888,
0.05722256,
-0.1468574554,
-0.1063452363,
-0.0453081727,
-0.1067152917,
0.7710258365,
0.0892903283,
0.1964204311,
0.4270025194,
0.1217722297,
-0.2061084211,
-0.0785390288,
-0.0745924413,
-0.1373121887,
-0.0980080813,
0.625607729,
-0.0283874013,
0.3117578924,
-0.1254245192,
0.0871391222,
-0.513936758,
-0.1703627706,
0.2215815634,
0.1166300103,
0.1453152746,
0.0713304952,
0.082428284,
-0.1198963523,
0.2320910394,
0.4119337201,
0.3059856594,
-0.2828147113,
-0.1840684414,
-0.7421236038,
0.3818671405,
-0.1460011601,
0.0460474119,
0.0320162028,
0.21921435,
0.0551561266,
0.1389514357,
0.2569923401,
0.0552323088,
-0.312965095,
0.1226780266,
-0.0873491392,
-0.174003005,
0.1411597282,
-0.0759260505,
-0.1713542342,
-0.2909752429,
0.2007523477,
0.1011782959,
0.078793034,
-0.0870430022,
-0.1461332142,
-0.0750289783,
-0.0425873585,
0.1597319394,
0.0204745401,
0.691318512,
-0.0852557197,
-0.1843108088,
-0.080761835,
-0.1366758347,
-0.1403535753,
0.3539605737,
-0.0689123571,
0.3379172087,
0.0062352791,
-0.0303948987,
-0.1603721082,
0.0069343857,
0.2029080093,
-0.4047209918,
-0.2947222888,
0.108153224,
-0.1863507032,
0.1158693582,
-0.1977020204,
0.069220908,
0.18685624,
0.3272363544,
-0.126037851,
-0.3980071545,
0.6327152252,
-0.1071641445,
-0.225705266,
-0.0875337124,
0.1851275861,
-0.0624417663,
-0.289681673,
-0.7371850014,
0.0527090281,
0.3887310624,
0.0558811575,
-0.2227689624,
0.1716943681,
-0.2935404181,
0.1815587282,
-0.0190170221,
0.2885157764,
0.1767712086,
-0.1869167686,
0.0473232716,
-0.2415454686
] |
https://github.com/huggingface/datasets/issues/2641 | load_dataset("financial_phrasebank") NonMatchingChecksumError | Thank you! I've been trying periodically for the past month, and no luck yet with this particular dataset. Just tried again and still hitting the checksum error.
Code:
`dataset = load_dataset("financial_phrasebank", "sentences_allagree") `
Traceback:
```
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-2-55cc2144f31e> in <module>
----> 1 dataset = load_dataset("financial_phrasebank", "sentences_allagree")
/opt/conda/lib/python3.7/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, task, streaming, **config_kwargs)
859 ignore_verifications=ignore_verifications,
860 try_from_hf_gcs=try_from_hf_gcs,
--> 861 use_auth_token=use_auth_token,
862 )
863
/opt/conda/lib/python3.7/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)
582 if not downloaded_from_gcs:
583 self._download_and_prepare(
--> 584 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
585 )
586 # Sync info
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
642 if verify_infos:
643 verify_checksums(
--> 644 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files"
645 )
646
/opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
38 if len(bad_urls) > 0:
39 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls))
41 logger.info("All the checksums matched successfully" + for_verification_name)
42
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
``` | ## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
| 174 | load_dataset("financial_phrasebank") NonMatchingChecksumError
## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
Thank you! I've been trying periodically for the past month, and no luck yet with this particular dataset. Just tried again and still hitting the checksum error.
Code:
`dataset = load_dataset("financial_phrasebank", "sentences_allagree") `
Traceback:
```
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-2-55cc2144f31e> in <module>
----> 1 dataset = load_dataset("financial_phrasebank", "sentences_allagree")
/opt/conda/lib/python3.7/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, task, streaming, **config_kwargs)
859 ignore_verifications=ignore_verifications,
860 try_from_hf_gcs=try_from_hf_gcs,
--> 861 use_auth_token=use_auth_token,
862 )
863
/opt/conda/lib/python3.7/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)
582 if not downloaded_from_gcs:
583 self._download_and_prepare(
--> 584 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
585 )
586 # Sync info
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
642 if verify_infos:
643 verify_checksums(
--> 644 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files"
645 )
646
/opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
38 if len(bad_urls) > 0:
39 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls))
41 logger.info("All the checksums matched successfully" + for_verification_name)
42
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
``` | [
-0.1219038367,
0.2504355907,
-0.0632825494,
0.3291988969,
0.1633204818,
0.1306017935,
0.0294302627,
0.3981848061,
0.10427434,
0.1001082137,
-0.2370300889,
0.2519069612,
0.2408211529,
-0.1808862984,
-0.1394712031,
0.1404774785,
0.1074732542,
0.0431749113,
-0.0138182603,
-0.0908906013,
-0.1074014232,
0.2812155783,
-0.2145472169,
-0.2022113651,
-0.0256866552,
0.0863930285,
0.1104896739,
0.0720110238,
-0.2658268213,
-0.134888947,
0.4920260012,
0.1678605825,
-0.0726739541,
0.4778307676,
-0.0001244328,
-0.0519940704,
0.2715742588,
-0.0486341007,
-0.356780529,
-0.3707870245,
-0.4534246624,
-0.4662199616,
-0.0433720946,
-0.2014844567,
0.1378686279,
0.3529549837,
0.1445152462,
-0.1261878014,
0.0545098521,
0.1745297462,
0.1397491097,
0.2478659004,
0.1467759311,
0.0349864662,
0.2998352051,
-0.1909594536,
-0.1134897321,
0.2703517973,
0.1460586935,
0.0511561483,
-0.2077227235,
0.1088072881,
-0.3613058031,
0.3707386553,
-0.000834845,
0.068915762,
0.0588342473,
-0.288993299,
0.2137652338,
0.3574341238,
0.4351551235,
-0.2187329978,
-0.3650903702,
-0.1239953414,
-0.2084688544,
-0.0463217013,
0.4173537195,
0.1647840738,
-0.2831152976,
-0.0629979223,
-0.4683913887,
0.2776025534,
-0.0092775971,
0.234502852,
0.0326497108,
0.0620338358,
-0.0185132511,
-0.0787273869,
0.1915029287,
-0.0618738048,
0.2658660412,
-0.3590572178,
-0.0391858891,
0.2633778155,
-0.416085422,
-0.1000157967,
-0.0744053572,
0.4421433806,
0.4887326956,
0.4190538228,
0.1808799356,
0.1608914733,
-0.1823398173,
0.0954614729,
0.0509007834,
0.1860753596,
0.0430599302,
0.019263763,
0.1798641533,
0.4134495556,
-0.1069432944,
0.1626020968,
-0.0692649484,
-0.03160844,
0.7316471338,
0.0094840117,
0.220451057,
-0.6202275157,
-0.3789456785,
0.4553823173,
-0.1631373614,
-0.1740150303,
0.0485573038,
0.2002506107,
-0.3129517734,
0.1997937113,
-0.0601884536,
0.0835550874,
-0.0794083402,
-0.1734062731,
-0.226570338,
-0.0589112639,
-0.1227231547,
0.0320245996,
0.3139740229,
-0.3250134587,
0.3017095327,
-0.0585970506,
0.3189174831,
-0.1349219382,
0.1294153333,
-0.147220999,
-0.1777921915,
0.3243796229,
-0.0608403534,
0.1900532544,
0.1779841632,
0.0699721277,
-0.1106023118,
0.1508006901,
-0.2157251239,
-0.1449102759,
0.0084859356,
0.1288294345,
-0.6136752963,
-0.3836392164,
0.0747276247,
-0.417157799,
0.3301468194,
-0.2364791185,
0.0597680546,
-0.135556832,
-0.2099695504,
-0.2326624393,
0.0224019364,
0.1867605001,
-0.1150826514,
0.0642107651,
-0.1237891987,
-0.0815361291,
0.5374075174,
0.2021666169,
-0.0115690492,
0.0198312514,
-0.1981374621,
0.1501950026,
0.2272738665,
-0.1579649448,
-0.8371688724,
0.2042019963,
0.0438024625,
0.5060796142,
0.1131727248,
0.1906835735,
-0.0519393459,
0.0921693146,
0.165884003,
0.082041271,
-0.0265888236,
0.0848588422,
-0.2368452996,
-0.3326883018,
0.1446269155,
0.2096134722,
0.0511388555,
0.1455377787,
0.1411496699,
0.0321555398,
0.2999111414,
-0.0340316445,
-0.011776302,
0.0532306992,
0.4530855715,
0.1720777601,
0.0931849331,
-0.363153398,
-0.477475971,
0.2887387872,
-0.1649099141,
0.0705630034,
-0.0916768238,
-0.0877331495,
-0.3856806457,
-0.2757387161,
-0.2165608704,
0.1742725074,
0.0195609331,
0.3824871778,
0.3753992915,
-0.0675052553,
-0.0457651317,
0.4224550426,
-0.1418424547,
0.1107592136,
-0.2753639221,
0.3411240876,
-0.0082150009,
-0.0534481369,
-0.0830920488,
0.0514114313,
0.1445266902,
0.0604135804,
-0.2113298178,
0.3504086137,
0.2670075297,
-0.0531188622,
-0.1756032407,
0.2846344709,
-0.1455770284,
-0.1669675261,
-0.0429786667,
0.5265864134,
0.0918031931,
-0.0179366693,
-0.0586443953,
0.3515950441,
-0.0240478888,
0.0481228195,
-0.0688225105,
0.1417026818,
0.3558283448,
-0.1717815548,
-0.1814339757,
-0.1569632888,
0.5086337328,
-0.2532767653,
0.1340861022,
0.0424638838,
-0.2152331173,
-0.1337839663,
0.1059001237,
-0.1258066893,
0.1081800312,
0.1274549365,
0.1138326824,
-0.0263650268,
-0.0446383916,
0.4975660741,
0.3507777452,
0.1526298523,
0.1489659995,
0.111748293,
-0.215327248,
-0.0640217215,
-0.0453855172,
0.1830275953,
0.2811229825,
0.5960557461,
0.2287653387,
0.0227120221,
-0.3897042274,
-0.163665086,
-0.0485493019,
0.3402168453,
-0.4080114961,
-0.0583374724,
-0.2477993965,
-0.2078673989,
-0.2976737618,
-0.3445231318,
-0.2360523194,
-0.4660620391,
-0.1171726882,
0.4518060088,
0.0896142721,
0.1947256923,
-0.5383246541,
0.0194813311,
-0.0496500432,
-0.314350754,
-0.1638917476,
0.1301636845,
-0.1365330219,
-0.0599618778,
0.3283938169,
-0.0334943309,
0.2559365034,
-0.4378321767,
0.001131691,
-0.5693757534,
-0.3058413863,
-0.0112474225,
-0.0950185955,
0.2326526344,
0.306250751,
0.1937240809,
-0.2337454259,
-0.2111411393,
0.1895796955,
-0.0036030933,
-0.3972535133,
0.3469936848,
-0.1643624902,
0.0363668278,
0.1348141581,
-0.0390870608,
-0.1930676997,
-0.2375828028,
-0.0209741779,
0.1128811315,
0.2617203891,
0.3831792772,
-0.1477777362,
0.1182788908,
-0.1250495911,
0.5495762229,
-0.2225151211,
-0.6153051853,
0.614875257,
0.1510249674,
-0.2769511342,
0.0600511879,
-0.0439408161,
0.1141603142,
0.3257290423,
-0.5195678473,
-0.1178137735,
-0.3152969182,
-0.0033043623,
0.1880894005,
0.0336293951,
0.1843610406,
-0.0221019536,
0.002933044,
-0.1638474613,
-0.2238503098,
0.128564924,
-0.0007639118,
0.4240906239,
-0.2705940604,
0.2751894593,
0.0128680542,
0.2359662503,
0.5632454753,
0.1702882051,
0.1899770796,
0.0112493094,
0.1286745667,
-0.1215767637,
-0.2859443724,
-0.3453658223,
-0.1348690242,
-0.2140858322,
0.1119887233,
0.0240025856,
-0.0919808298,
-0.178699255,
-0.1164297014,
-0.2810485959,
-0.1257556677,
-0.0735263228,
-0.1298165917,
0.2713859975,
0.1732881069,
0.1204107702,
-0.0861362666,
-0.4792511165,
-0.0838756785,
0.2706707716,
-0.2183156163,
-0.073383905,
-0.1870015413,
0.0389388315,
-0.0228255875,
0.3018492162,
0.2446889877,
0.5021723509,
0.1392091066,
-0.1495166868,
0.0045429096,
-0.1419413388,
0.2533041835,
-0.282584697,
0.2747724652,
0.0071258545,
-0.1487609744,
-0.0293890648,
-0.1878372878,
-0.1596636772,
0.0067630149,
0.2366041839,
0.3087528348,
-0.2637103796,
0.1630424559,
0.2867017686,
0.3816694915,
-0.078521423,
-0.350381434,
-0.4151213765,
-0.2587957382,
-0.3248909116,
-0.0434847325,
-0.1886048317,
0.3431870341,
0.1090603024,
0.0063236579,
0.0852995738,
-0.0185558312,
0.4009566605,
-0.0053487383,
0.234623909,
0.0873073414,
0.473359704,
0.0183097646,
-0.1044885516,
0.2621967793,
0.7463162541,
-0.1263429523,
-0.3905004263,
-0.0601693727,
-0.2182455659,
-0.0893030614,
0.157281816,
-0.0247592945,
-0.1962780058,
0.57553339,
-0.2040040791,
0.0969355777,
-0.2935264707,
0.0606858879,
0.1835068464,
-0.4045858085,
-0.3151388764,
0.1746523082,
0.150454253,
-0.004303962,
0.1125736088,
-0.0374622829,
0.018513456,
0.1966502964,
0.0452961847,
0.9319773316,
0.054332912,
0.0852789134,
0.1511657536,
-0.1225953847,
0.1917182058,
-0.0383275934,
0.0385139808,
-0.3248578906,
-0.3994271159,
-0.142288655,
-0.2868809104,
0.1556830555,
0.0419333689,
-0.0673464984,
0.4279147089,
-0.0480768606,
0.1722874045,
0.1531152278,
-0.000400126,
-0.2481520623,
0.0684647411,
-0.0544432551,
0.0903512985,
-0.2329606563,
0.4803927839,
-0.0346048921,
0.0329109319,
-0.2976821959,
-0.0550482087,
-0.4033448398,
0.2658830881,
-0.0128098652,
0.0464146137,
0.3049311936,
-0.0883250982,
-0.0986068696,
0.0667984337,
0.3115850091,
0.0923189819,
-0.3378294408,
-0.0497367047,
0.5200313926,
0.0160236806,
0.2511175573,
-0.18076168,
0.379658401,
-0.0339455195,
-0.1229576319,
0.0533335768,
0.054515332,
-0.4156989753,
0.1536204517,
-0.2063108385,
-0.071737051,
-0.3756572306,
-0.2514220476,
-0.1947634071,
0.1044772565,
-0.3385733366,
0.1092134565,
0.2938656509,
-0.1672355086,
0.13149032,
0.0317730419,
-0.3552617729,
-0.1696757525,
0.5675468445,
0.1759828329,
-0.3029548228,
0.3590068221,
0.0606702864,
-0.4059323072,
-0.1437843293,
-0.1519132853,
-0.1260745972,
-0.5568310022,
0.0036304183,
-0.2260169685,
0.2084529251,
-0.1619077325,
0.5562609434,
0.4231033623,
0.0605462193,
0.0963710845,
-0.5787781477,
-0.1846331209,
0.0521539859,
0.2902798057,
0.328240037,
-0.2014440447,
-0.1680797935,
0.0361440703,
-0.2816249728,
-0.2290260792,
0.0165985413,
-0.3228540421,
-0.143745929,
-0.1001372337,
0.0894571543,
0.114709571,
0.0107991546,
0.1213108227,
0.0876620114,
-0.1428940147,
-0.1518721282,
-0.1098080575,
0.1690674871,
0.1186796352,
-0.1569393873,
0.247040838,
-0.1336449683,
-0.1350233555,
-0.0956209973,
-0.2308689207,
0.2656267285,
0.0039489064,
0.1658151448,
0.4067257643,
-0.0667615831,
-0.1009623557,
-0.0175441857,
-0.3136406541,
0.0998435467,
0.0851506144,
0.0601072907,
-0.0241163447,
0.0018701553,
0.102578111,
0.1002928615,
0.1374370456,
-0.1723910868,
0.3762361109,
-0.4806801081,
0.0395816118,
0.4147231579,
0.3139625192,
0.4134079218,
-0.2964339256,
-0.1443816274,
0.2171409279,
0.1816911846,
-0.3661003411,
-0.0208086222,
0.3057403564,
-0.0886875242,
0.0459725335,
0.2180381417,
0.0981329232,
-0.4027277529,
0.5062954426,
0.0732104778,
0.2739269137,
-0.2543126643,
0.0885760412,
0.4516223967,
0.0508755445,
-0.0288514532,
0.1816984266,
-0.1374538839,
-0.1385575384,
-0.0538746305,
0.0023306087,
0.1581178904,
-0.174913764,
0.2445425838,
-0.3738258481,
-0.3313353062,
0.4353526533,
0.3104016483,
-0.0227356218,
0.018237818,
0.1479921043,
0.3204092979,
0.0382736735,
0.480466485,
-0.4871773124,
0.0208973102,
-0.1371545047,
-0.0031390339,
-0.1264347732,
-0.3061620593,
-0.0127939433,
0.1861976385,
-0.1569748819,
0.0500200465,
0.3224605918,
0.0631819814,
-0.0963129327,
-0.5983760953,
-0.1321248412,
0.0831594914,
-0.0296675935,
-0.3643828034,
0.3487516046,
0.093566969,
-0.1344631761,
0.1059627682,
0.4878089726,
0.3832367659,
0.3555279076,
0.1230699047,
-0.0582436621,
-0.1259438545,
-0.0571523942,
-0.0442969948,
0.8251379728,
0.0631784201,
0.1144645661,
0.3569466472,
0.0808129832,
-0.147083506,
-0.0094993766,
-0.1333686858,
-0.2202534974,
-0.0671076253,
0.6605433226,
0.0178659111,
0.278839767,
-0.0525647774,
0.0635826662,
-0.3988303542,
-0.2211650759,
0.1704477519,
0.1211574376,
0.0941234976,
0.1547725648,
0.0418642685,
-0.177807793,
0.2235857546,
0.384976089,
0.2284826487,
-0.3141387999,
-0.249504149,
-0.8176962733,
0.3130851388,
-0.2140872627,
-0.0132976547,
0.1057880148,
0.2192132026,
0.0326821655,
0.2004253268,
0.2210348248,
-0.0831792578,
-0.2814390361,
0.1178942174,
-0.1038771495,
-0.184837997,
0.1755459309,
-0.0894713104,
-0.1763822883,
-0.3068356514,
0.1846025884,
0.1732802391,
0.0328213945,
-0.0366831832,
-0.1215735674,
-0.0129540786,
0.1075285822,
0.0982149243,
0.0058037955,
0.7441558242,
0.0030065551,
-0.2014532685,
-0.1133373454,
-0.1136912182,
-0.1094558686,
0.3623208106,
-0.0614575259,
0.3728074431,
-0.0001261309,
-0.0332111381,
-0.19792445,
0.1834509075,
0.1207965016,
-0.4166775644,
-0.2454315126,
0.14119789,
-0.2058521211,
0.1800932288,
-0.2665815949,
0.0322951972,
0.1959615946,
0.400723815,
-0.2157138288,
-0.3244045973,
0.6163960695,
-0.1873250008,
-0.233450532,
-0.0866208747,
0.1230187416,
-0.2233284116,
-0.264516443,
-0.7100595236,
0.087951079,
0.4004308879,
0.0140683278,
-0.2292499989,
0.2437375486,
-0.2831465006,
0.1963930279,
-0.0241500102,
0.4023308456,
0.1048546582,
-0.2167248875,
0.0047478825,
-0.209256202
] |
https://github.com/huggingface/datasets/issues/2630 | Progress bars are not properly rendered in Jupyter notebook | To add my experience when trying to debug this issue:
Seems like previously the workaround given [here](https://github.com/tqdm/tqdm/issues/485#issuecomment-473338308) worked around this issue. But with the latest version of jupyter/tqdm I still get terminal warnings that IPython tried to send a message from a forked process. | ## Describe the bug
The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal).
## Steps to reproduce the bug
```python
ds.map(tokenize, num_proc=10)
```
## Expected results
Jupyter widgets displaying the progress bars.
## Actual results
Simple plane progress bars.
cc: Reported by @thomwolf | 44 | Progress bars are not properly rendered in Jupyter notebook
## Describe the bug
The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal).
## Steps to reproduce the bug
```python
ds.map(tokenize, num_proc=10)
```
## Expected results
Jupyter widgets displaying the progress bars.
## Actual results
Simple plane progress bars.
cc: Reported by @thomwolf
To add my experience when trying to debug this issue:
Seems like previously the workaround given [here](https://github.com/tqdm/tqdm/issues/485#issuecomment-473338308) worked around this issue. But with the latest version of jupyter/tqdm I still get terminal warnings that IPython tried to send a message from a forked process. | [
0.1817374527,
0.0266524702,
-0.0048844628,
0.0565507598,
0.1184261143,
-0.3483623862,
0.5567897558,
0.4173840284,
-0.2593960762,
0.002457507,
-0.2125668228,
0.6025978327,
0.265894115,
0.1672157943,
0.0038401857,
-0.2379229069,
-0.15845263,
0.1035002917,
-0.3469717801,
0.0024839416,
-0.2896267772,
0.1918028295,
-0.2716617584,
0.3635055125,
-0.4041290283,
0.0030338243,
0.0743729025,
0.0767614618,
0.1247889102,
-0.4877852201,
0.1010511741,
-0.0711859688,
0.0366620421,
0.3372045457,
-0.0001156703,
-0.0285917521,
0.5814053416,
0.0483195782,
-0.053403195,
0.3121868968,
0.4811501801,
-0.4962195754,
0.292168349,
-0.2768396735,
0.0297931656,
-0.1636993289,
-0.312853545,
0.1014390364,
0.5365032554,
-0.1144312471,
0.1887733638,
0.5778617859,
0.0724003315,
0.2014872879,
0.0623274632,
-0.0967911854,
-0.2323306054,
0.0826816186,
0.4364378452,
-0.1705190539,
-0.4072225988,
0.086250037,
-0.0827878118,
0.3567173183,
-0.0489210077,
0.1682757139,
0.8467938304,
-0.0950434506,
-0.3010843992,
0.1756131649,
0.157087177,
-0.221791476,
-0.2138754129,
-0.1908810735,
-0.2720875144,
-0.1241787151,
-0.0247896835,
-0.211727798,
-0.1801391393,
0.0630748421,
-0.3082978427,
0.1876829863,
-0.0752098858,
0.061160434,
-0.2718209028,
0.0522361621,
0.0162741095,
0.0222461559,
-0.425168246,
0.0447073579,
0.2143156081,
-0.0899432153,
0.095250383,
0.0319859125,
0.0103440443,
-0.10967388,
0.1929796338,
-0.2212169766,
-0.170880571,
0.0629815906,
-0.1323726326,
0.0801316202,
-0.1984624565,
0.1380111277,
0.2272792757,
-0.0242729969,
0.2722263932,
0.0318768285,
0.4079745412,
0.1121728569,
0.077100873,
0.0203982405,
0.1639781147,
-0.1972354501,
0.1264158487,
0.2029943913,
-0.0121485293,
-0.0115514249,
-0.1646594107,
0.3339940608,
0.3537814915,
0.0827572346,
0.1300662607,
-0.0598979183,
-0.1128530353,
-0.0985692516,
0.1420911103,
0.2114593536,
-0.1650138795,
-0.3398203552,
-0.0455712825,
-0.3156959713,
-0.1131619737,
-0.0326121934,
-0.0819027796,
0.5226351619,
0.2015720159,
0.1167481393,
-0.0133675225,
-0.0608449392,
-0.0039567426,
-0.0454568192,
0.160414964,
0.2736177146,
-0.1801852584,
0.0645641834,
0.3331305385,
-0.2147265077,
0.1004186273,
0.4017115533,
0.0019670166,
0.0147306845,
-0.3248887658,
0.0271351598,
-0.3449070454,
0.2925203145,
-0.3482390344,
-0.2347099185,
0.3120611608,
0.0191088319,
0.0911080986,
-0.4993658066,
0.0704648346,
-0.0417193696,
0.2428244203,
0.2687726021,
-0.5468885899,
-0.3661728501,
-0.2729978263,
-0.1132059321,
0.582264483,
0.4652714729,
0.0913209692,
0.3527902365,
-0.0516457632,
0.0799938142,
-0.0715073794,
0.0040803105,
-0.3240097463,
-0.0506804734,
0.0342349783,
0.3598088026,
-0.2217021585,
-0.1391576976,
0.5451209545,
0.0268422179,
0.2225213051,
0.1077181548,
0.220151782,
0.0050674453,
-0.5182210207,
0.1198144108,
0.1424681395,
0.0539521873,
0.2264510095,
-0.0413969383,
-0.0760636702,
-0.3514196873,
0.378759563,
0.4695473909,
0.061398685,
-0.1032749861,
-0.1235894859,
0.0379324742,
0.2085111439,
0.2291625142,
0.1162107959,
0.2249444425,
-0.2089492083,
-0.0343401544,
0.0795868412,
0.1317455024,
-0.4423642159,
0.0988323018,
-0.3059397936,
-0.141505152,
0.1749252528,
-0.1771276295,
-0.0869027376,
0.2503202558,
0.1665765345,
-0.1593332142,
-0.0878701136,
0.0841876417,
0.2446445525,
0.6247321963,
0.2298951298,
-0.6264796257,
0.0758991241,
0.1546839625,
-0.0475361012,
0.1062092334,
-0.0996648073,
0.0255798195,
0.4109320641,
-0.0742418468,
-0.2628405988,
-0.2066324204,
0.247916311,
0.0921128765,
-0.0527585447,
0.6166585684,
-0.1669974029,
-0.0735859424,
0.265144825,
0.1080777049,
-0.150793165,
0.2166772187,
-0.1668830365,
0.3541099429,
-0.0477510244,
0.0042004958,
-0.1646632701,
-0.0965933129,
0.0865283608,
0.0519810282,
0.1038384438,
-0.2703275681,
0.289926827,
0.2455772907,
0.2856424153,
0.0597278848,
0.1261175871,
-0.108426623,
-0.4426056147,
0.3919287324,
0.3509079218,
-0.1244852245,
-0.064175263,
-0.0059917867,
-0.0925079957,
0.1071564257,
-0.1056125462,
-0.1911779046,
-0.241939798,
0.2931980789,
0.0717579573,
0.2813780904,
-0.0015518218,
-0.0976845175,
-0.1878172457,
0.1744768471,
-0.2419842929,
0.0416073576,
-0.2596997023,
-0.1773070395,
-0.2635087371,
-0.0708168,
0.0574664026,
-0.3950709701,
-0.1241571084,
-0.2460374981,
0.0640075505,
0.2776842117,
-0.0457181484,
0.4009765983,
0.4703307748,
-0.1269135773,
0.2192727476,
0.3190116584,
-0.2036362588,
-0.2075870484,
-0.1263900101,
0.0597337112,
-0.0034546219,
-0.0828465074,
-0.0726938248,
-0.4586651921,
0.2137558609,
-0.2816903591,
-0.0525498614,
0.074359566,
-0.0355220065,
0.5063039064,
-0.261762321,
0.2529340386,
-0.1107390076,
0.4106067121,
0.4045545459,
-0.20052737,
-0.1289597005,
0.019946903,
0.0778890774,
-0.2607970834,
-0.0393585116,
0.3344100416,
-0.260805428,
-0.142444849,
0.2783360481,
0.0502965748,
0.1694929153,
-0.5509200692,
-0.3159073293,
0.0516404137,
0.2530950904,
-0.1564558446,
-0.0282125436,
-0.2223111689,
0.2857840657,
-0.2854259312,
-0.2039783299,
-0.1333151758,
-0.0329737477,
0.0216917507,
-0.6995677948,
-0.3913336992,
-0.0166673884,
-0.1515092105,
0.5323097706,
0.0880488008,
0.025373986,
0.0278318599,
0.0030354112,
-0.0044204965,
-0.0663748384,
-0.2988656759,
0.01681339,
0.0403068215,
0.3351401091,
-0.07346531,
0.0413798578,
-0.1678373516,
0.267757833,
0.1905384213,
0.0943187326,
0.0324878283,
-0.0937041342,
0.0733190775,
0.0126706772,
-0.0974271968,
-0.1152832359,
-0.1858904213,
-0.0731044859,
0.0631049201,
0.1063183323,
0.1593655348,
0.1933679581,
0.0347989947,
-0.1947153211,
-0.2861015201,
-0.1182758808,
-0.2299226224,
-0.1167775095,
0.033535324,
0.3312157989,
-0.0719774514,
-0.2232435644,
-0.1226545349,
0.1832715124,
0.4686769843,
0.0486776009,
0.3824288547,
-0.1621934772,
-0.2085375786,
-0.0009658262,
0.1433836818,
0.0303799286,
-0.0637194514,
0.0102408081,
0.2103753984,
0.19039689,
0.186486274,
0.0376271978,
-0.1315951794,
0.4868619442,
-0.1329535991,
-0.590780139,
-0.448507309,
-0.0838372633,
-0.0461814255,
0.4464477599,
0.202593118,
0.1214462072,
0.1832030714,
-0.1629593074,
0.1613387465,
-0.4406792521,
-0.4085013568,
-0.5296401978,
-0.0772081017,
-0.1208096594,
0.1012932807,
0.0220484436,
-0.2823103368,
-0.3443129361,
-0.4439451694,
0.1510319561,
-0.2343675643,
-0.2038644403,
0.4826026857,
0.1618640721,
-0.3691057265,
0.2843442559,
0.1946533024,
0.0703479722,
0.2092737108,
-0.1213415414,
0.1955965608,
0.1174238399,
0.212920472,
-0.4535713494,
-0.054235287,
-0.0327300504,
-0.0540473945,
0.2696754634,
-0.3494567871,
0.1118168384,
-0.071397081,
-0.2171406001,
0.3293795884,
-0.1024741381,
0.104069978,
0.2512624562,
0.0664818734,
-0.1387918591,
-0.0392673016,
0.0648059696,
-0.2958231866,
0.2502629161,
-0.3924262822,
0.2538970709,
0.4127413034,
-0.307387352,
-0.1985528469,
0.1135266721,
-0.100840345,
0.0674054474,
0.3842748404,
0.0769116879,
-0.4579054713,
-0.1355754435,
0.0896985233,
-0.1970645785,
-0.0743464828,
0.0143762073,
-0.2643181086,
0.0920370221,
-0.3580288887,
-0.0003536724,
0.1422571987,
-0.1866117865,
0.4732818604,
-0.0945190191,
-0.2393087,
0.1698597372,
-0.1792888492,
0.3100371361,
-0.0778422877,
0.0323347226,
-0.2217235565,
0.2593061328,
-0.3242450356,
0.1942669451,
0.086885646,
0.3065231442,
0.6779503226,
-0.2582505345,
-0.478056252,
-0.1305697411,
0.0957539976,
-0.0298391543,
0.0410919785,
0.1004782617,
0.265399754,
0.1224280819,
0.0419643447,
0.2340960503,
0.1169518903,
-0.2659301758,
-0.3217813969,
0.2303244025,
0.0165106244,
-0.4008858502,
-0.1908880919,
0.2124530673,
0.5923560858,
0.0772768706,
0.607111454,
-0.1708685607,
0.0938696265,
-0.2045493275,
0.1392642558,
0.2038928419,
-0.1019267812,
0.6167325377,
-0.2241155505,
-0.0105043575,
-0.0011597509,
0.0155343823,
-0.1059427559,
0.2463879436,
0.1346391588,
0.2571752071,
-0.2707900405,
-0.04004471,
0.3904452324,
0.0253425911,
-0.0369005352,
0.4749500453,
-0.2261118442,
0.2843961716,
-0.3062979579,
0.2049472481,
0.3042432666,
-0.1515858322,
-0.4816411734,
-0.1707334667,
-0.5891591311,
0.086181134,
-0.0511256605,
-0.1754153669,
-0.0631227642,
0.5393024683,
-0.0343943499,
-0.1166119277,
-0.2260078192,
-0.002778437,
-0.1965396106,
0.1588025987,
0.3093069196,
-0.1977652013,
-0.3245772421,
-0.1785842776,
-0.0507260822,
0.0764012933,
0.0561276153,
-0.1820083857,
-0.2545236945,
0.0841500685,
-0.0078680879,
-0.2569125891,
-0.0423268788,
0.1870152354,
-0.0193929784,
-0.0605706684,
0.1704660058,
0.0101391897,
0.0925530195,
0.2859083116,
0.0786388516,
0.1287001818,
-0.1340815276,
-0.089594461,
0.1099937856,
0.5431035757,
-0.0363829583,
0.1304315329,
0.2100278586,
0.20702672,
-0.0093536377,
-0.0843577012,
-0.3582530916,
0.2575760186,
0.369330138,
-0.2755761147,
0.1990133226,
-0.3448757231,
0.2791691422,
0.2967948616,
-0.038264975,
-0.4296239018,
0.1247140616,
0.1603263319,
-0.0035058483,
-0.1456476748,
0.1596734971,
0.3591034412,
-0.0659681335,
0.2362091541,
-0.1499637365,
0.0523926765,
0.1445043683,
0.0649674237,
0.0041034482,
-0.1538080573,
-0.2074183524,
0.3424957991,
-0.0387570038,
0.291607976,
0.2955340445,
-0.1797025502,
-0.2489405423,
-0.2290111035,
0.0882854164,
-0.1418276429,
0.1646238863,
-0.0915948302,
0.0886860788,
0.20833534,
-0.3614553511,
-0.2503941655,
-0.0059378967,
0.0110781565,
0.0686567053,
0.1550809592,
-0.1648518294,
-0.221675992,
-0.3788728416,
0.0777986944,
-0.0932445079,
0.0874358118,
-0.1769074351,
-0.0204311237,
-0.097280845,
0.0688078105,
-0.1281936616,
0.3972242475,
0.2002469897,
-0.015865162,
0.0069481991,
-0.3464373648,
-0.2009715885,
0.1060380042,
0.2996791899,
-0.0015275031,
-0.1086379141,
0.3010879457,
0.24251616,
-0.2698402107,
0.1807519048,
0.2070457488,
0.3308273852,
-0.1841490567,
-0.5122317076,
-0.0871944129,
0.0147968009,
0.0765604228,
0.3983007073,
0.0104468372,
-0.2393778861,
0.0372043662,
0.0716235638,
-0.1399574429,
0.1981387585,
0.0323797837,
0.2398911119,
0.1445457786,
0.5007631779,
-0.2323464304,
-0.211114645,
0.1001098529,
-0.3531177938,
-0.1419486105,
0.0075194277,
0.2385790944,
-0.0802275538,
-0.023847796,
-0.1415866911,
0.0790750757,
-0.4065199196,
0.3623473346,
0.3410251439,
0.3175620437,
-0.0254956577,
-0.0492034778,
-0.3845285773,
0.3794111609,
-0.1781534404,
-0.3013529181,
0.254118979,
0.0433155149,
-0.2651918232,
0.3701044917,
0.7036458254,
-0.2908415198,
-0.5082321167,
-0.333339721,
-0.2769775391,
0.0086103743,
0.3501789868,
-0.2469127178,
-0.089045018,
-0.0982789844,
0.2765980363,
-0.0749763772,
0.1320377588,
0.1540166885,
-0.1242892072,
0.0688348934,
0.591154635,
0.0691592395,
0.2064617276,
0.1213231683,
0.044296883,
-0.1319380701,
0.1508341283,
-0.3454101086,
-0.0218686089,
0.3271326721,
-0.3355369568,
0.4607936442,
0.272130549,
-0.0749803931,
-0.3710611761,
0.4132903218,
0.2208668292,
-0.0048903637,
-0.090368107,
-0.0934830979,
0.0511620045,
-0.0792130455,
-0.0652787089,
0.1165086478,
-0.0506934598,
0.4800718129,
-0.0764003098,
-0.1664083004,
0.2783626914,
-0.1838288605,
-0.3798907995,
-0.1245585829,
-0.021779418,
0.072536692,
-0.0096235946,
-0.0441761017,
-0.320820272,
0.2267317623,
-0.1420070976,
-0.2845942676,
0.121676892,
-0.1535636783,
0.0717054605,
0.0470279455,
0.1328729242,
0.1103115529,
0.0145055428,
-0.1096885949,
-0.0973096639
] |
https://github.com/huggingface/datasets/issues/2630 | Progress bars are not properly rendered in Jupyter notebook | Hi @mludv, thanks for the hint!!! :)
We will definitely take it into account to try to fix this issue... It seems somehow related to `multiprocessing` and `tqdm`... | ## Describe the bug
The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal).
## Steps to reproduce the bug
```python
ds.map(tokenize, num_proc=10)
```
## Expected results
Jupyter widgets displaying the progress bars.
## Actual results
Simple plane progress bars.
cc: Reported by @thomwolf | 28 | Progress bars are not properly rendered in Jupyter notebook
## Describe the bug
The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal).
## Steps to reproduce the bug
```python
ds.map(tokenize, num_proc=10)
```
## Expected results
Jupyter widgets displaying the progress bars.
## Actual results
Simple plane progress bars.
cc: Reported by @thomwolf
Hi @mludv, thanks for the hint!!! :)
We will definitely take it into account to try to fix this issue... It seems somehow related to `multiprocessing` and `tqdm`... | [
0.084075138,
-0.0174473375,
-0.0553432368,
0.1467485875,
0.1418052763,
-0.2826744616,
0.4365520179,
0.308170855,
-0.2813868523,
0.1335174739,
-0.1734685004,
0.4958983362,
0.3021134138,
0.3606436253,
-0.0934584737,
-0.2819553018,
-0.0838802904,
0.1640944034,
-0.3097079694,
-0.0013431981,
-0.3553543091,
0.2289115489,
-0.3600172698,
0.2748979628,
-0.3260472119,
-0.0157695431,
0.0067366362,
-0.0339759849,
0.2025543451,
-0.3707711101,
0.0603213683,
-0.0869972706,
0.1291180402,
0.4368248284,
-0.0001134229,
-0.1087477356,
0.4875663221,
0.0413400978,
0.0329009779,
0.2878981233,
0.4559454918,
-0.4877923727,
0.2829349041,
-0.2850022912,
0.0710595548,
-0.1794686168,
-0.3954916298,
-0.0420610383,
0.4065068662,
-0.1567408293,
0.2473644018,
0.4405182004,
-0.0182324424,
0.2076785564,
0.0391100794,
-0.1461221576,
-0.208389312,
-0.0282217804,
0.4653917849,
-0.3063620329,
-0.3879887164,
0.1063969061,
-0.0486427918,
0.4187018573,
-0.0393804498,
0.2133059949,
0.9913768768,
-0.0878652185,
-0.2944224179,
0.2115101963,
0.2394180149,
-0.1059775949,
-0.1512372196,
-0.1202547252,
-0.2735104561,
-0.1160389557,
-0.1966738254,
-0.0861075744,
-0.2104893178,
0.0214732122,
-0.3254859447,
0.147457391,
0.0230797231,
0.0039321259,
-0.2227222323,
0.0638746172,
-0.0164265558,
-0.025415875,
-0.4152093828,
0.1107598096,
0.1686973274,
-0.164711073,
0.1662715375,
-0.0174237434,
-0.0668759793,
0.0514465272,
0.1705869734,
-0.039477706,
-0.1951254606,
-0.0893873274,
-0.0934437513,
0.1065660417,
-0.1109588444,
0.1176109463,
0.1380230337,
0.0363829397,
0.2670511901,
-0.0737982392,
0.4157477915,
0.0265660509,
0.0262288749,
0.051055871,
0.2824548185,
-0.2843369246,
0.1190833598,
0.2696624398,
-0.1699025333,
-0.0240199715,
-0.1325651258,
0.2839513719,
0.3845818937,
-0.1172235832,
0.0501016118,
-0.0212008804,
-0.1604378968,
0.0458949059,
0.0982234925,
0.2016149759,
-0.0938864797,
-0.2694260776,
-0.127925247,
-0.2795526683,
-0.2595213354,
0.0063247643,
-0.1258069873,
0.3609222472,
0.2234244049,
0.1400427371,
-0.0556915887,
-0.1958277076,
-0.0410633795,
-0.0504103005,
0.103253752,
0.2466242313,
-0.0829610303,
0.1367762387,
0.2960922122,
-0.2910874188,
0.1265165806,
0.425904423,
-0.0393443592,
0.0393929854,
-0.3534790277,
0.0832792372,
-0.3191149235,
0.3744325042,
-0.4555281997,
-0.2263982594,
0.3937737942,
0.0776725411,
0.0967461318,
-0.4163134098,
-0.0178408697,
-0.1785809845,
0.1732370555,
0.1455978006,
-0.5406768322,
-0.3143547177,
-0.0999099314,
-0.1438417435,
0.674564302,
0.3311753273,
0.0616384894,
0.3111006618,
-0.0355520956,
0.1803799868,
-0.0299434438,
-0.0998079404,
-0.2703014314,
-0.0446332023,
0.068681255,
0.3434053361,
-0.1168106645,
-0.1047253534,
0.3879330158,
0.0571676418,
0.1605417132,
0.1995617151,
0.2249498069,
-0.0040510148,
-0.5000806451,
0.1472547948,
0.2613554597,
0.1368755996,
0.2515565455,
-0.1051909104,
-0.1100688428,
-0.4471720755,
0.4548561871,
0.3896094859,
0.0735655427,
-0.1086158156,
-0.2065191865,
0.0486684591,
0.2095972151,
0.2003743947,
0.0501532257,
0.2725408673,
-0.2228263319,
-0.1505787373,
0.1081632525,
0.0841673464,
-0.2802227437,
0.0574535802,
-0.3637307584,
-0.212339133,
0.2303522527,
-0.0214929208,
-0.0324376635,
0.1609051228,
0.192889601,
-0.0381632186,
0.0449485928,
-0.0241237357,
0.2177130878,
0.6586594582,
0.2201010138,
-0.5620321035,
0.1005696356,
0.1098101363,
-0.010012608,
0.0599660613,
-0.1167562082,
0.1055461541,
0.3706771731,
-0.0126160309,
-0.2862401009,
-0.2531234026,
0.1941242516,
0.1476226598,
-0.1142539456,
0.5261477232,
-0.0583536774,
-0.1218652949,
0.3449293077,
0.087262243,
-0.1932428926,
0.3505969942,
-0.1336086392,
0.2573172748,
-0.0148074925,
0.016546309,
-0.0542391725,
-0.1458518207,
0.1375338137,
0.0343477279,
0.0556812882,
-0.2651257813,
0.3374623656,
0.2101247907,
0.2718615532,
0.0949250534,
0.1694934368,
-0.170860216,
-0.452381134,
0.3870064914,
0.3288428485,
-0.1260956228,
0.1076468006,
0.0887194723,
-0.0556903929,
0.0388399363,
0.0346243419,
-0.2729831338,
-0.2650905252,
0.2690734863,
0.2852129936,
0.3415219784,
-0.0553954057,
-0.1524232924,
-0.0843225718,
0.1791528761,
-0.2676637471,
0.0621221885,
-0.1503645927,
-0.2169018686,
-0.2802103162,
-0.0814335346,
0.1066747606,
-0.2798353136,
-0.0973203927,
-0.2014978528,
-0.0294566229,
0.1356528997,
0.0548097119,
0.3602169752,
0.5633691549,
-0.1225380301,
0.140152663,
0.3674176037,
-0.1848126352,
-0.2312564403,
-0.2094031721,
0.0796077549,
0.0218692906,
-0.0270250887,
-0.1452461332,
-0.5066242218,
0.2695991397,
-0.290669769,
0.0424456671,
0.0552969612,
0.0010295333,
0.42390576,
-0.3118074834,
0.1914335936,
-0.0486040041,
0.4684606791,
0.3779625595,
-0.1273930818,
-0.1681382358,
0.0822192803,
0.0849715918,
-0.2132690549,
-0.0504143313,
0.3898362219,
-0.3317185044,
-0.1092649549,
0.239123404,
-0.0295658596,
0.1968764216,
-0.7200555205,
-0.2799718976,
-0.0238179509,
0.2932691574,
-0.0693961009,
-0.1043621227,
-0.1313591748,
0.2333753854,
-0.2860139906,
-0.25431633,
-0.2362782061,
-0.0590562075,
0.0311986022,
-0.6471828222,
-0.4120872915,
-0.0859327316,
-0.2004362345,
0.3781545758,
0.0382052027,
0.1749145836,
0.1584654748,
0.0033084415,
-0.053871084,
-0.0849443078,
-0.4036503732,
0.0524330698,
-0.0169645622,
0.3014838696,
-0.0230090674,
-0.0270720422,
-0.1710708141,
0.1382596195,
0.2992334366,
0.0753851756,
0.1574764848,
-0.052221328,
-0.0141518414,
0.1012699977,
-0.0767280012,
-0.1693760157,
-0.1942319125,
0.0478077084,
0.1227429509,
0.0846473947,
0.0652757958,
0.1389369965,
-0.0133855194,
-0.3803445399,
-0.1787617356,
-0.155385673,
-0.1738339067,
-0.084815979,
0.0064559504,
0.2819904089,
-0.0114204027,
-0.2094163448,
-0.1050018221,
0.1878013015,
0.3450334668,
-0.0218555126,
0.4383287728,
-0.2292401046,
-0.1616393775,
0.1673972905,
0.1712917686,
-0.021953756,
0.0534428433,
0.0723042414,
0.1686128676,
0.1126673222,
0.3454293311,
-0.1313163489,
-0.1081414521,
0.4399825335,
-0.1932770312,
-0.5599924922,
-0.5287841558,
-0.1388816535,
-0.0271138884,
0.3023208678,
0.3238761425,
0.1704631597,
0.129438445,
-0.3058633208,
0.1342191994,
-0.4507175088,
-0.5005687475,
-0.5428311825,
-0.0320378952,
-0.0099371225,
-0.027590353,
-0.0984963924,
-0.1000108719,
-0.3013595045,
-0.4653050601,
0.1186718121,
-0.2689271569,
-0.1494289637,
0.4330701232,
0.1591851413,
-0.2284727395,
0.1799618602,
0.1587317884,
0.2233384252,
0.139924556,
-0.1881378442,
0.00178809,
0.2173333764,
0.2586933672,
-0.4733979702,
0.0423989333,
-0.0806367248,
-0.116195567,
0.270462811,
-0.4603219926,
0.2149652243,
-0.157017529,
-0.2689239383,
0.341473192,
-0.0483213514,
0.0132105909,
0.2080332935,
0.1232946068,
0.0050049871,
-0.1137183383,
-0.0689212531,
-0.2857619524,
0.2130227983,
-0.3701865077,
0.22927095,
0.3312897682,
-0.3805874288,
-0.1750412732,
-0.0680914968,
-0.2268902957,
0.1177385896,
0.3030439615,
0.0624669231,
-0.3827466965,
-0.2603968084,
0.0825033486,
-0.2630776167,
-0.02588851,
-0.0040110862,
-0.2764790952,
0.2061018646,
-0.4202794433,
-0.0411718972,
0.1308256984,
-0.1384241283,
0.6062146425,
-0.1045557037,
-0.13994959,
0.1635838747,
-0.2762540579,
0.3311767578,
-0.1298910379,
0.066511184,
-0.154027909,
0.2529996336,
-0.3340656757,
0.162199229,
0.0469714142,
0.3277936578,
0.5213471651,
-0.2467438877,
-0.4642070532,
0.1279602647,
0.1828421056,
-0.0753350556,
0.0802315101,
0.0282325149,
0.1075993627,
0.1536435187,
-0.0152190272,
0.2035625577,
0.0659378096,
-0.3426289558,
-0.3608881831,
0.2768602371,
0.0544738173,
-0.3398239315,
-0.158008188,
0.2512800992,
0.5153217912,
0.1659759581,
0.5921127796,
-0.0823669434,
0.220064044,
-0.2310075015,
0.1685484201,
0.2138748616,
-0.2118782103,
0.7508043051,
-0.20676817,
-0.0217725188,
0.0426449552,
0.0263495613,
0.0704073235,
0.1268018782,
0.0671624541,
0.3412513733,
-0.2547575533,
-0.0963543504,
0.2661042213,
0.1276565492,
0.0116728246,
0.4833356738,
-0.222004503,
0.2646158338,
-0.2258886099,
0.3405119181,
0.2906496823,
-0.009998668,
-0.4293838739,
-0.2461831868,
-0.5078005791,
0.0547660068,
0.0729144812,
-0.1993188262,
-0.1020386145,
0.4341854751,
0.0094320327,
0.1235910207,
-0.2600488663,
0.0482482985,
-0.2103753537,
0.1416707188,
0.2156024873,
-0.127395764,
-0.3874326348,
-0.1020737737,
0.0111419484,
0.0294882283,
-0.024992492,
-0.2505484223,
-0.237358287,
0.0590547547,
-0.0618386976,
-0.1189650372,
0.0829753876,
0.1766028404,
-0.0137003027,
-0.0503276773,
0.1899186224,
0.0070657507,
0.0427719168,
0.3488993645,
0.1346112192,
0.1165414751,
-0.1515334845,
-0.0605688766,
-0.0059830882,
0.5434561968,
-0.0660189465,
0.1043646485,
0.3075921237,
0.1612799466,
0.0489347167,
-0.2327803075,
-0.318811208,
0.2774233818,
0.2623286247,
-0.3050260544,
0.2351171374,
-0.3422240019,
0.332639277,
0.1437484771,
-0.0338616148,
-0.2724224627,
0.1375379562,
0.2036044747,
-0.0683357716,
-0.2091984749,
0.2082446218,
0.3461474776,
-0.0081881657,
0.3194358945,
-0.1421829462,
0.0462910086,
0.1024083793,
0.0240946114,
-0.0675438792,
0.0091022067,
-0.2059787512,
0.3505126536,
0.0656636283,
0.2744110227,
0.2748163044,
-0.0593207181,
-0.3289282918,
-0.1768021286,
0.1106420308,
-0.0434989259,
0.0747661591,
-0.0942511633,
0.0331626572,
0.1554331928,
-0.1741337329,
-0.1245344132,
-0.0719829276,
-0.0183951296,
-0.062889874,
0.2263253331,
-0.1679671109,
-0.2615427971,
-0.327953428,
0.0831791162,
-0.0947100371,
-0.0216261335,
-0.0767756626,
-0.0971217304,
-0.0849747807,
0.0793218166,
-0.1062793359,
0.3211345673,
0.3122425973,
-0.0279706791,
-0.0099638663,
-0.1597611159,
-0.2634786963,
0.125837326,
0.3141280711,
0.0011355504,
-0.1765207201,
0.2330842614,
0.2390508056,
-0.3890819848,
0.210318923,
0.1597009003,
0.3547718227,
-0.2991585135,
-0.511567831,
0.0465828367,
0.0431714058,
0.0745617151,
0.3577718139,
0.1426043212,
-0.2597826421,
0.0522161014,
0.0783247501,
-0.1751220375,
0.2820823789,
0.0768238753,
0.3440591097,
0.1252895892,
0.449524343,
-0.2704701722,
-0.1520072967,
0.1030547172,
-0.2561651766,
-0.2923439741,
0.0472157523,
0.2022028267,
-0.1473374963,
-0.0348978415,
-0.1349246353,
0.1029420048,
-0.396171391,
0.37718454,
0.2636164725,
0.4115663767,
-0.1070388108,
-0.1958610117,
-0.3908256888,
0.3388754129,
-0.1304856092,
-0.2475672066,
0.1263137758,
0.1302089393,
-0.2292498946,
0.3551635742,
0.7703398466,
-0.1849020571,
-0.4258206785,
-0.1495707482,
-0.4036407471,
0.0335614942,
0.3173780143,
-0.231418699,
-0.043361906,
-0.0700696558,
0.2427538931,
-0.0539348088,
0.2154805362,
0.0531417318,
-0.0059422478,
0.0582593232,
0.3602850735,
0.1891820133,
0.1174987033,
0.0260111578,
0.0147798657,
-0.0830274746,
0.3153700531,
-0.1140945852,
0.1464641839,
0.2588915527,
-0.2921170294,
0.3584015965,
0.1357862949,
0.1304059327,
-0.3719018996,
0.3412765861,
0.2734382749,
0.1059358716,
-0.1206755415,
-0.0670827553,
0.2311578393,
-0.1974954456,
0.0351052731,
0.1029527485,
-0.1211244538,
0.34088552,
-0.1112639084,
-0.098540917,
0.2666785121,
-0.1712311208,
-0.4160817862,
-0.1571352035,
-0.0429108888,
0.0663785487,
0.0479207933,
-0.0647943988,
-0.3053125143,
0.2395626009,
-0.0582253039,
-0.3515852094,
0.1449593604,
-0.325643599,
0.0265670121,
0.0682525933,
-0.0356901512,
0.1399086565,
-0.0035143122,
-0.1854759902,
-0.1822354645
] |
https://github.com/huggingface/datasets/issues/2629 | Load datasets from the Hub without requiring a dataset script | This is so cool, let us know if we can help with anything on the hub side (@Pierrci @elishowk) 🎉 | As a user I would like to be able to upload my csv/json/text/parquet/etc. files in a dataset repository on the Hugging Face Hub and be able to load this dataset with `load_dataset` without having to implement a dataset script.
Moreover I would like to be able to specify which file goes into which split using the `data_files` argument.
This feature should be compatible with private repositories and dataset streaming.
This can be implemented by checking the extension of the files in the dataset repository and then by using the right dataset builder that is already packaged in the library (csv/json/text/parquet/etc.) | 20 | Load datasets from the Hub without requiring a dataset script
As a user I would like to be able to upload my csv/json/text/parquet/etc. files in a dataset repository on the Hugging Face Hub and be able to load this dataset with `load_dataset` without having to implement a dataset script.
Moreover I would like to be able to specify which file goes into which split using the `data_files` argument.
This feature should be compatible with private repositories and dataset streaming.
This can be implemented by checking the extension of the files in the dataset repository and then by using the right dataset builder that is already packaged in the library (csv/json/text/parquet/etc.)
This is so cool, let us know if we can help with anything on the hub side (@Pierrci @elishowk) 🎉 | [
-0.4575757384,
-0.0447009057,
-0.042136699,
0.1991643757,
-0.1262192726,
0.1635167748,
0.3772644997,
0.1787043661,
0.4132854939,
0.1388913095,
-0.2391808629,
0.3387722671,
-0.0637953728,
0.5494145751,
0.2678028941,
0.1731880903,
0.1355398595,
0.3373372257,
0.0156678408,
0.1087152362,
-0.147266686,
-0.0281414427,
0.0509657562,
-0.3055995107,
-0.4166119695,
0.1337526739,
-0.057475809,
0.5216124058,
-0.2011021823,
-0.2119367719,
0.4005631208,
0.5012657642,
0.250264585,
0.1841828376,
-0.0001212054,
0.0434090644,
0.1928072125,
-0.1468496025,
-0.3016460538,
-0.1539456993,
-0.299346298,
0.0231877193,
0.2855740488,
-0.101063624,
-0.0823808387,
0.2093598694,
0.1571629345,
-0.1291954219,
0.3677398562,
0.0976221412,
0.0166193731,
0.2999821305,
-0.259233892,
-0.3383879662,
0.1060963944,
0.5227717161,
-0.0501802713,
0.0753658116,
0.4466708601,
0.1501270235,
-0.2684878111,
-0.0616009682,
-0.0511121191,
-0.1306409389,
0.6978549361,
0.0141169913,
-0.4139384925,
-0.3369880021,
-0.0558858477,
0.269610703,
0.4849344194,
-0.2226597816,
-0.1884822845,
-0.5040724277,
-0.1010901406,
-0.0231113657,
0.1161085665,
0.3829920888,
-0.0745234266,
0.3300857544,
-0.1943246871,
-0.499504894,
-0.2894497216,
-0.0394164473,
0.0870333463,
0.051034566,
0.08335419,
-0.1139841005,
0.2059301436,
0.0716911703,
0.3125396371,
-0.1525993943,
-0.1997702122,
0.1841588467,
-0.2591177225,
-0.1511710286,
-0.1909292042,
0.3544423878,
0.2726557851,
0.477696538,
0.0313503072,
0.2450517416,
-0.4523227215,
0.0596118569,
0.3471122086,
-0.0049101636,
0.1210731864,
0.0548967868,
0.3135947585,
0.2362888306,
0.3534660339,
-0.0196902417,
-0.1949660778,
0.0806538314,
-0.4910584986,
-0.1728902757,
0.1783721298,
-0.0850358754,
-0.0836665034,
-0.346141547,
0.5396622419,
0.0528209955,
0.229903549,
0.2829743922,
0.1364172995,
0.1290994585,
-0.2617962956,
0.1894246936,
-0.1174896061,
-0.2959379554,
-0.1057051122,
0.1344974041,
0.1033400744,
0.2694163024,
0.3688506484,
-0.3593109548,
0.1102583855,
0.0069273859,
0.4422929585,
0.0437481403,
-0.0864410624,
-0.0130615756,
0.0163178332,
0.143294096,
0.3748800159,
-0.0535979755,
-0.0228159595,
-0.2377945334,
-0.3192481995,
0.0625881702,
-0.4418228269,
-0.518388629,
-0.056974858,
0.0121523784,
-0.4268385172,
0.0280668363,
-0.6266528368,
0.0605007298,
-0.39988029,
-0.0416648909,
-0.0795241296,
0.2116312087,
-0.0123845413,
-0.0399876535,
0.1320931911,
0.5962692499,
-0.2625656724,
-0.1146186516,
-0.0567259341,
-0.2146861106,
-0.328630507,
-0.0449767411,
-0.1742633283,
0.1860434562,
-0.2278232276,
0.3033219576,
0.4498624802,
-0.579693377,
-0.2853994668,
0.0064897425,
-0.1179376617,
0.0732645318,
0.1743251085,
0.3771459758,
0.3957130611,
-0.129654482,
-0.1318278313,
0.526086688,
0.0008255355,
0.0909401774,
0.1459449232,
-0.518383801,
-0.1579159051,
0.431994915,
0.1243645549,
0.0304876938,
0.3115405738,
0.2013214678,
0.1387487203,
-0.2980287671,
0.1430208236,
-0.1011161432,
0.0254288148,
0.0401324034,
-0.068433091,
-0.0548530258,
-0.6891092658,
0.316314429,
0.0964965522,
-0.0020367149,
-0.0244455971,
-0.3710267544,
-0.1171226799,
-0.1898973733,
-0.2818384469,
0.0634646863,
-0.0909613296,
-0.083014898,
0.0350429192,
-0.1356610209,
-0.592110455,
0.6018564701,
-0.0149238184,
0.1960616112,
-0.6531128287,
0.40639323,
0.3386698067,
-0.0153759811,
0.2168536484,
-0.0285901949,
0.1245827526,
-0.1221516877,
0.1126260012,
0.2599677742,
0.1257734895,
0.614746809,
0.2605302036,
0.1702953279,
0.1483875215,
-0.0583525337,
0.2140931934,
-0.3489826322,
0.0123653412,
-0.1390496939,
-0.3719677329,
0.3414108157,
-0.4983015358,
0.1190768331,
0.0701576322,
-0.020437479,
0.0052311197,
-0.0468478538,
-0.186111778,
-0.1877374053,
-0.0455211848,
0.1042952985,
0.1593878567,
0.0439117774,
0.0219549686,
0.0218883026,
0.4020874202,
-0.0820775777,
0.0510960445,
0.1745689362,
-0.158708334,
-0.0367912315,
0.1882547587,
0.0600355566,
0.2340114415,
0.1528205425,
-0.066654399,
0.255310297,
0.3917656839,
-0.25596416,
-0.006317541,
-0.0388428122,
0.0046937466,
0.1148880571,
-0.1143906713,
-0.1490907967,
-0.3427887559,
-0.0038194954,
-0.0566471927,
-0.1197239533,
-0.2024751604,
-0.1974550486,
-0.1885627806,
0.0441670865,
0.1086141691,
-0.1390507817,
-0.2280119956,
-0.0474895909,
0.1132055819,
0.292614162,
0.1356823742,
-0.1808515787,
0.1021873057,
0.8752861023,
-0.2077578604,
-0.4260379374,
-0.2744222581,
-0.0052179992,
0.2112579644,
-0.0357648879,
0.2536877394,
0.3942881227,
0.2186065465,
-0.2756739259,
0.2006197572,
-0.3470379114,
0.1797514707,
0.1969394833,
0.0370651111,
0.0286826398,
0.113885507,
0.0788868815,
0.2208518684,
-0.0224465206,
-0.1317494214,
-0.0986446142,
-0.0600059927,
-0.1949047446,
0.0839640498,
-0.0586361736,
-0.1458728909,
-0.1207061261,
-0.3679880202,
-0.4563328624,
0.3621262312,
0.3808915317,
0.0275838133,
-0.2261140794,
-0.094819501,
-0.012828812,
-0.1683929712,
-0.2992094159,
0.0453891605,
-0.5231454372,
0.4055296779,
-0.341571033,
-0.2106559575,
0.2707833946,
0.0609658509,
0.1544734389,
0.0539416149,
-0.3392733634,
-0.2430037111,
0.0532308891,
0.0894927979,
0.0398275778,
0.0650906861,
0.2832047343,
-0.110256955,
0.2209950089,
-0.0620182306,
-0.0730819255,
0.0882785171,
0.2928552032,
-0.3506479561,
0.1858037412,
-0.1205244362,
-0.1198294312,
0.5136721134,
0.2791602314,
0.2512261868,
0.1940321624,
-0.0187379885,
0.3876355588,
-0.3456958234,
0.0017485321,
-0.1830448508,
0.038366206,
-0.0451300405,
0.4778504968,
0.2628041506,
0.1216738895,
-0.3591518402,
-0.4306380749,
0.0288199782,
-0.1977300346,
0.0783410743,
-0.0111116953,
-0.0104183052,
-0.1670584828,
0.0205234289,
-0.125132218,
-0.2814126015,
0.0326020382,
0.3820091188,
0.3374102712,
0.1487733275,
-0.1922380924,
0.0919731781,
-0.291688323,
0.2229801863,
-0.0234764144,
-0.3273977935,
0.0144211501,
0.0260605887,
0.0434437022,
-0.0784057379,
0.5525980592,
-0.0768231973,
-0.0256263502,
-0.2390154302,
-0.2209441364,
-0.1558264792,
0.0994997546,
0.1380494833,
0.0132202879,
-0.4880356491,
0.7941617966,
-0.0995160192,
-0.3218310773,
0.0524175242,
-0.0858283117,
-0.1860135645,
-0.1060687602,
0.1103660017,
-0.0785630867,
-0.4641356468,
-0.2623744607,
0.0945595503,
-0.1030065566,
-0.2374692261,
-0.1350485235,
-0.0629909262,
0.1310780495,
0.1900202632,
0.1737858653,
0.2542228997,
0.0578284338,
-0.1312515587,
0.4289525747,
0.0591996461,
0.2980825305,
0.6782127619,
0.1396739483,
-0.4402041137,
0.0134958588,
-0.2010635883,
0.2921778858,
0.5223492384,
0.0938642547,
0.0564075336,
0.0585683919,
0.0362378284,
-0.5819572806,
0.147711888,
-0.0381950028,
-0.2752723396,
-0.4304093122,
-0.4510778487,
0.6226555109,
-0.0689186826,
0.0640259236,
-0.1069792956,
0.4030180871,
-0.377048403,
0.1231428385,
0.0702424943,
0.8982328176,
-0.0711546689,
0.2976280153,
0.0360320583,
-0.0640624836,
0.3835211396,
-0.691093564,
-0.0053562578,
-0.3164270818,
-0.1875430942,
-0.3519820273,
-0.0240894035,
0.1682011038,
0.2223049402,
-0.2135067731,
0.3743101358,
0.0577207208,
0.4703813493,
-0.044575572,
0.427241236,
-0.3970291018,
-0.5239439011,
-0.1813054234,
0.0216598436,
0.0262454804,
-0.0213817805,
-0.045597624,
-0.143703118,
0.0020611286,
-0.1098013297,
-0.0077885538,
0.140237689,
0.2143563777,
-0.2197983563,
0.0066364594,
-0.0144396648,
0.3113360107,
0.3582704067,
0.2158787549,
0.0300092585,
-0.3226817548,
0.230414331,
-0.2172026336,
-0.0157416482,
-0.1394654214,
-0.0272874702,
0.2691302598,
0.0546625555,
-0.1156827882,
-0.0498546213,
-0.0464587621,
-0.3997412622,
-0.1941819787,
0.1144545972,
0.1813282371,
-0.2519483268,
-0.1360104531,
0.0127851963,
0.0661639646,
0.0536812395,
-0.0303367861,
0.0336859673,
0.0313880444,
-0.0099910423,
0.1384612322,
-0.1035654098,
-0.086317718,
0.1303193718,
-0.2854100466,
-0.3250839412,
0.0819166601,
-0.0630932301,
-0.0948148221,
-0.1671717465,
0.1966568679,
0.4302744567,
-0.3918290138,
0.1148459613,
0.0370113477,
-0.039054051,
0.0038852617,
0.0323106647,
-0.0390971005,
-0.1722213328,
-0.1630106866,
-0.2594659626,
-0.0582634024,
0.2405711263,
0.0249612462,
0.3125116527,
0.2753747106,
-0.3476408124,
-0.2138454169,
-0.0816114396,
-0.1637906432,
0.1681686342,
-0.0679172054,
0.03381446,
-0.0260062497,
0.1627785712,
0.0351050459,
-0.2060478628,
-0.1087181196,
-0.0047191707,
-0.3626045585,
-0.027424207,
-0.0853212625,
0.2391911,
0.0578093529,
0.1277650595,
-0.1629248112,
-0.1107509881,
-0.2145333737,
-0.3260589838,
0.5787266493,
0.0464807749,
-0.0090240464,
-0.173122853,
0.5798000693,
0.064522922,
-0.3917689919,
0.3677154779,
0.2882387042,
0.49360919,
-0.1893947124,
0.1349028647,
-0.3057217896,
0.0603800565,
0.3331647515,
0.6284928918,
0.9139981866,
0.1212794781,
0.2586688399,
-0.1242344975,
0.1203270853,
-0.0284561627,
0.2634214759,
0.1179242358,
-0.147369951,
0.1469344795,
0.1326862276,
-0.0013375604,
0.0035381764,
-0.10916619,
0.4651370943,
-0.2163639367,
0.0897272378,
0.4169332385,
0.3571682572,
0.1019722968,
-0.2288589329,
0.0479044393,
0.6168884039,
0.1762442589,
0.3369449973,
0.4259214699,
-0.1810423732,
0.0998248607,
-0.0017920788,
0.2226396203,
0.0534648336,
0.4730300605,
-0.3988973796,
0.362960875,
0.2224747539,
0.134929195,
0.336578548,
-0.3683719337,
-0.2057875693,
-0.0170304477,
0.2325684279,
0.0959950015,
-0.0759054571,
0.3478372693,
-0.1701823473,
-0.0474812537,
-0.4018287659,
0.0004570596,
0.0625687093,
0.1317359358,
0.0139119998,
-0.2197067291,
-0.2836593986,
0.2622633576,
-0.0878894031,
-0.331415236,
-0.1918561608,
0.168584764,
0.2644777596,
0.2347224057,
0.3726986945,
-0.0108068781,
0.0364035517,
-0.0733316541,
0.0056838058,
-0.078916885,
0.1261890829,
0.4738395512,
0.0657804683,
-0.0959517956,
0.1417223811,
0.0203566551,
0.207963407,
0.1000195593,
-0.0975628644,
0.1016672403,
-0.0791084468,
-0.1497849226,
0.3356244862,
0.0141822957,
0.0848567933,
-0.0308180675,
-0.0254233759,
-0.1691257805,
0.0687800795,
-0.3932407796,
0.373421669,
0.1371651292,
-0.0253048688,
-0.001359229,
-0.0318556279,
-0.174977541,
-0.2812852859,
0.4291781485,
-0.0715984181,
0.115672946,
0.1271267086,
-0.0008258931,
-0.0232296083,
0.4580633044,
0.1040100232,
-0.0665537417,
0.0290403515,
-0.1584469676,
-0.3442613482,
-0.0480587706,
0.1553259045,
-0.0620344132,
0.0165727325,
-0.0875469521,
0.1618357003,
0.2478549033,
0.0179807134,
-0.2271557748,
0.2294033617,
0.0271107163,
-0.068109408,
-0.042745132,
0.1231128052,
0.1112902537,
-0.1210731789,
-0.2770118415,
0.0364798829,
0.190236941,
-0.2698024213,
0.2569992542,
0.2185706496,
0.2078662664,
-0.4765966237,
0.2123611867,
-0.209557265,
0.219864428,
-0.0315440707,
0.1896928102,
-0.2996186912,
-0.0461363532,
-0.335570097,
-0.0755931586,
-0.174886182,
0.2164683342,
-0.2423886359,
-0.013369129,
-0.30652982,
-0.030206183,
-0.0357381552,
0.1394874752,
-0.2000430822,
-0.0881001577,
-0.3969621658,
0.1654981822,
0.2673885524,
0.1068124622,
-0.1092738882,
-0.177687034,
-0.0837418288,
0.0489655957,
0.421264261,
-0.2280203998,
-0.2450334579,
0.0018891022,
-0.0527400076,
0.1859925836,
-0.1028056815,
-0.1450480968,
0.1127402484,
0.0636363775,
-0.1726149321,
0.1622056216,
0.249965772,
0.166696921,
-0.1502142102,
-0.2082293481,
-0.2506299913,
0.3272822797,
-0.167269215,
-0.1096109748,
-0.4348281324
] |
https://github.com/huggingface/datasets/issues/2622 | Integration with AugLy | Hi,
you can define your own custom formatting with `Dataset.set_transform()` and then run the tokenizer with the batches of augmented data as follows:
```python
dset = load_dataset("imdb", split="train") # Let's say we are working with the IMDB dataset
dset.set_transform(lambda ex: {"text": augly_text_augmentation(ex["text"])}, columns="text", output_all_columns=True)
dataloader = torch.utils.data.DataLoader(dset, batch_size=32)
for epoch in range(5):
for batch in dataloader:
tokenizer_output = tokenizer(batch.pop("text"), padding=True, truncation=True, return_tensors="pt")
batch.update(tokenizer_output)
output = model(**batch)
...
``` | **Is your feature request related to a problem? Please describe.**
Facebook recently launched a library, [AugLy](https://github.com/facebookresearch/AugLy) , that has a unified API for augmentations for image, video and text.
It would be pretty exciting to have it hooked up to HF libraries so that we can make NLP models robust to misspellings or to punctuation, or emojis etc. Plus, with Transformers supporting more CV use cases, having augmentations support becomes crucial.
**Describe the solution you'd like**
The biggest difference between augmentations and preprocessing is that preprocessing happens only once, but you are running augmentations once per epoch. AugLy operates on text directly, so this breaks the typical workflow where we would run the tokenizer once, set format to pt tensors and be ready for the Dataloader.
**Describe alternatives you've considered**
One possible way of implementing these is to make a custom Dataset class where getitem(i) runs the augmentation and the tokenizer every time, though this would slow training down considerably given we wouldn't even run the tokenizer in batches.
| 68 | Integration with AugLy
**Is your feature request related to a problem? Please describe.**
Facebook recently launched a library, [AugLy](https://github.com/facebookresearch/AugLy) , that has a unified API for augmentations for image, video and text.
It would be pretty exciting to have it hooked up to HF libraries so that we can make NLP models robust to misspellings or to punctuation, or emojis etc. Plus, with Transformers supporting more CV use cases, having augmentations support becomes crucial.
**Describe the solution you'd like**
The biggest difference between augmentations and preprocessing is that preprocessing happens only once, but you are running augmentations once per epoch. AugLy operates on text directly, so this breaks the typical workflow where we would run the tokenizer once, set format to pt tensors and be ready for the Dataloader.
**Describe alternatives you've considered**
One possible way of implementing these is to make a custom Dataset class where getitem(i) runs the augmentation and the tokenizer every time, though this would slow training down considerably given we wouldn't even run the tokenizer in batches.
Hi,
you can define your own custom formatting with `Dataset.set_transform()` and then run the tokenizer with the batches of augmented data as follows:
```python
dset = load_dataset("imdb", split="train") # Let's say we are working with the IMDB dataset
dset.set_transform(lambda ex: {"text": augly_text_augmentation(ex["text"])}, columns="text", output_all_columns=True)
dataloader = torch.utils.data.DataLoader(dset, batch_size=32)
for epoch in range(5):
for batch in dataloader:
tokenizer_output = tokenizer(batch.pop("text"), padding=True, truncation=True, return_tensors="pt")
batch.update(tokenizer_output)
output = model(**batch)
...
``` | [
-0.1749235392,
-0.1920809746,
-0.1434521228,
-0.239678368,
0.1912635267,
0.0263557285,
0.1673913896,
0.3273122609,
-0.3234900236,
0.0160069652,
0.0447252542,
-0.0170347858,
-0.260895282,
0.1105005816,
-0.0723289847,
-0.1290824115,
0.162385717,
0.1287828684,
0.0835960805,
-0.0614517033,
0.2458241582,
-0.0801942721,
-0.1216682494,
0.0804531649,
-0.4331207871,
-0.200529784,
-0.018463295,
-0.1191413999,
0.0323870033,
-0.0549193025,
-0.2768345475,
0.2928821445,
0.139453575,
0.2861317098,
-0.0001094861,
-0.2278577089,
-0.0457841679,
-0.137302503,
-0.3240188658,
-0.0370470062,
0.8906270266,
-0.4260547161,
0.0184370354,
-0.1956670731,
-0.208693102,
-0.2443616539,
0.2259549052,
-0.102584742,
0.7065521479,
-0.1400631368,
0.1746796668,
0.164266631,
-0.1695446372,
0.1748895645,
0.0812373608,
0.6041791439,
-0.0998974591,
-0.1248121336,
0.3372094631,
-0.2876379788,
-0.1602467149,
0.5248733759,
0.0838092864,
-0.085036248,
0.3582634032,
0.0786502436,
0.0502490737,
-0.5240313411,
-0.2224519253,
0.161794737,
0.0644258708,
-0.1844713986,
-0.5932478309,
-0.3726418912,
0.2279145271,
-0.0164297782,
-0.2347870469,
0.1063614115,
-0.1818402559,
0.0403820239,
-0.1904089898,
-0.1769421846,
-0.0590319298,
0.2114751339,
0.257406354,
0.2118015438,
0.2327118814,
-0.1030833125,
-0.3152119219,
-0.1901498884,
-0.0175507199,
0.1092632413,
0.2167674005,
0.3279652297,
-0.0164926052,
-0.1686117053,
-0.2443468571,
-0.3988575935,
-0.00088422,
0.1280758381,
0.0307481885,
0.4207872748,
-0.4762349129,
0.0391773954,
0.0057942308,
0.028280329,
0.0076813027,
0.163835749,
0.3196818829,
0.0540730208,
0.0039825439,
-0.0232678503,
0.010846965,
0.1630417109,
0.03016413,
-0.1091244966,
-0.3127090335,
0.2283017635,
-0.262807548,
0.0098470449,
-0.1675759256,
0.1402468383,
0.0705194324,
0.234556064,
-0.227433607,
0.2814391255,
0.2564772964,
0.1967922002,
0.0014192685,
0.0355219506,
-0.043399632,
0.1743158847,
-0.3539296687,
0.1625115275,
0.2804242373,
0.5648198724,
0.1444966942,
0.0708907917,
0.3205165565,
0.0095685124,
0.2328445911,
-0.1425881535,
0.421746254,
-0.0478331633,
-0.1146400347,
0.2201909423,
-0.0657537505,
0.0721535832,
-0.1196187809,
-0.1751387715,
-0.1528180838,
0.1419909447,
-0.2186925858,
0.2464309782,
0.3551000655,
-0.0151167046,
-0.2094569802,
0.3241280019,
0.021042116,
-0.3204987645,
0.1727178246,
-0.1375954598,
0.0115350336,
-0.0599738546,
0.2275058627,
0.0374387503,
-0.0412999131,
-0.2540356517,
0.4374252856,
0.2148566544,
0.1135617197,
0.3173479438,
-0.2680597603,
0.0712595284,
-0.0477387607,
0.0781118721,
0.5492461324,
-0.4070937335,
0.0510664433,
0.2031703591,
0.0156890452,
0.0639113188,
-0.1526076198,
0.3913734257,
0.2438088357,
0.0073969588,
0.147161305,
0.57880795,
-0.0462911054,
0.0729111061,
-0.0735742897,
-0.3104630113,
0.2083486915,
0.0925203636,
0.0948225409,
-0.3573523164,
-0.2048755586,
0.099973157,
0.3083712459,
-0.2700299025,
0.3583820462,
-0.0095584095,
-0.2125838101,
0.3153029978,
-0.0342439078,
-0.155893445,
0.0081811957,
0.0151071548,
-0.0870278701,
0.3045282364,
-0.1963897496,
-0.3819636703,
0.2294835895,
-0.0637032092,
0.0682514682,
-0.3417000771,
0.1884031892,
0.0611839257,
-0.0851468593,
-0.0551096275,
-0.3363077343,
0.1103341952,
-0.1135300472,
0.1098781675,
0.0517387502,
0.0406879783,
-0.0345539674,
-0.1430624127,
-0.3016892076,
0.3711787164,
-0.0835314691,
-0.019919334,
-0.0105549358,
0.2912920713,
-0.0540972278,
0.1201766133,
-0.0536799356,
0.2401740253,
0.3565205038,
-0.096243307,
0.1682845503,
0.137267828,
-0.0107514523,
-0.2892516851,
-0.0039150901,
0.5061607361,
0.2224727571,
0.2047209889,
0.3028246164,
-0.0844085664,
0.0872403458,
0.043729499,
-0.2721040249,
-0.3616883457,
-0.1609092057,
-0.0939853862,
0.1342761815,
-0.3366360068,
-0.5899164677,
-0.011484161,
0.2806827426,
0.2557839453,
-0.0145955086,
0.1399238408,
-0.1836905479,
-0.1397485733,
0.0756565854,
-0.5855829716,
-0.0750119612,
0.202407375,
-0.0168651603,
0.1435842663,
-0.0854754001,
-0.0052287206,
0.0352683999,
0.2353794724,
-0.0255141109,
0.0951069444,
0.4083148539,
0.3604505658,
-0.1396542937,
-0.3078113794,
-0.1590866894,
-0.4041631222,
-0.0580309518,
0.247676,
-0.1718840599,
-0.4956325889,
-0.1368497312,
-0.4858053923,
-0.231585443,
0.0946227983,
0.3938375115,
-0.0339783132,
-0.1213258207,
0.308996439,
-0.0552516878,
0.3120442033,
-0.0148540139,
-0.1032002717,
-0.0295116007,
0.1958804876,
-0.2043000013,
0.0272400007,
0.0039903708,
0.0478982516,
0.4143899381,
0.2367701828,
-0.0613217652,
-0.3688527644,
-0.5738258958,
0.198915422,
-0.0435737297,
-0.0754412636,
0.1535942256,
-0.2465474904,
0.0378200263,
-0.5249400139,
0.0829259306,
-0.2365263849,
-0.0877230912,
-0.3229256272,
0.0898313522,
-0.1227382496,
-0.2532225847,
0.0823827013,
-0.3209184706,
-0.3508951068,
-0.0673325658,
0.2139359713,
0.0358342156,
-0.1540174633,
-0.2602301538,
-0.1037169695,
0.1582042575,
0.2489970773,
0.0276555717,
0.0360088199,
0.2866538167,
-0.3043048382,
-0.143674314,
-0.1987396181,
-0.3153317273,
0.1066347659,
0.223794803,
-0.1450606287,
-0.2972123623,
0.0744433329,
0.0842171907,
-0.2484324872,
-0.1239835322,
0.0842123479,
-0.0569642559,
-0.152604565,
0.0490062833,
-0.0183922723,
0.1789527088,
-0.176957041,
0.1623332351,
-0.3505837023,
0.2998358905,
0.2065784782,
0.4156169295,
-0.1009594128,
-0.1860575229,
0.4628735483,
-0.1015676409,
-0.0547133721,
-0.0337041505,
-0.0693562627,
-0.0145599917,
-0.2122709155,
-0.0271375477,
0.2304042131,
-0.0089175627,
-0.2364800274,
-0.1578740478,
0.2057921588,
-0.3513623178,
-0.1594029963,
0.3336035311,
-0.5718928576,
0.2396319956,
-0.2130248249,
0.159139514,
-0.1597554982,
-0.2681818902,
0.3210597634,
-0.1664439142,
0.2673804164,
-0.0826042145,
-0.0513879433,
0.0470831059,
-0.140473336,
0.279759109,
0.2064884007,
0.1528767645,
0.1210507452,
-0.1761028618,
0.1129440069,
-0.1383547485,
0.4136572778,
0.0103406627,
-0.3415988088,
-0.0356958732,
-0.1137943342,
-0.1227873042,
-0.1780913472,
-0.1877987236,
-0.0266247224,
0.5311673284,
0.5997408032,
-0.2997633219,
-0.2721076012,
0.3077863753,
-0.1064924747,
-0.1589559913,
0.1346832365,
0.1879261732,
0.215133816,
-0.4126151502,
0.1211766303,
0.0550888926,
0.0057666562,
0.132362932,
-0.1052784473,
-0.0704210103,
0.1855517477,
0.2677014172,
0.1676830649,
-0.0399027169,
-0.0350228474,
-0.0575042032,
-0.0223074108,
0.0960758254,
0.3651772738,
-0.0264439546,
0.070454672,
-0.2445631027,
-0.0447183885,
0.1562060714,
0.4355124831,
0.4480149746,
0.2516475916,
0.3036265671,
0.0256298557,
0.1053520218,
-0.3496854305,
0.3098250628,
0.4465027452,
-0.015354488,
-0.497428894,
-0.410382241,
0.176253885,
-0.0963573679,
-0.0155201629,
-0.2599524856,
0.0811263844,
-0.3926424682,
0.6640620232,
0.4433374107,
1.1297672987,
0.3573448062,
0.4586038888,
-0.0423529744,
0.115250349,
0.3830606937,
-0.6734589934,
0.0660288185,
-0.3117776811,
0.0425262488,
-0.0314419754,
0.0484329835,
0.0105466954,
0.2368614823,
-0.0657506585,
0.22402668,
0.0588077456,
0.0110481782,
-0.1085083485,
0.44474563,
0.0051071364,
-0.627037406,
-0.1310869157,
0.126771003,
0.0423103012,
-0.0223924164,
-0.0884532481,
-0.1645101756,
0.1444617361,
0.0065418333,
-0.1351336837,
0.048210673,
-0.2696854472,
0.1632842422,
0.0733545274,
-0.0779522508,
0.2392181158,
-0.2708639801,
0.3563738167,
0.194015801,
0.1004142016,
0.1763640195,
0.1171761304,
0.2489154935,
-0.0542249978,
-0.3167652786,
0.8901435733,
-0.0371695235,
0.200030759,
0.0912045315,
0.2408934534,
-0.1644593775,
-0.0225648582,
-0.1324385107,
0.3902789056,
-0.1736594886,
-0.0781239942,
0.18459934,
-0.2183441371,
-0.124709487,
0.133534357,
-0.0311876759,
-0.1671605706,
0.2195687741,
0.329856813,
-0.0261123329,
-0.1715523303,
0.1039446741,
-0.2159542888,
-0.4586626589,
0.5600895286,
0.1068936884,
-0.222066626,
-0.116867587,
-0.2498065233,
0.2313773334,
-0.0732233226,
-0.0247415341,
0.1908104271,
-0.1832657754,
0.0654037595,
0.2495055497,
0.1321738809,
0.0188958347,
-0.3815692663,
-0.078928858,
-0.2347979993,
0.2478353083,
0.200076431,
0.231726706,
0.0152799636,
0.3859037757,
-0.0833214447,
0.4019308984,
-0.3887149692,
-0.073624365,
0.0603842512,
0.3245539367,
-0.4759232998,
-0.1236638874,
-0.0635303259,
0.2932153344,
0.0952198207,
0.2746931314,
-0.0704279393,
-0.1763805151,
-0.315569967,
0.1093036383,
0.0088389963,
-0.0300794933,
-0.005569227,
0.0915762782,
-0.155271858,
-0.3959917426,
0.0469368696,
-0.0575987212,
-0.0003967509,
0.0493512452,
-0.0077324193,
0.0337232426,
0.058431372,
-0.1813467741,
0.1635543853,
0.2311698943,
0.2100100368,
0.1916546673,
-0.0230311379,
-0.1339607686,
-0.1600052118,
0.2594054937,
0.3972218335,
-0.1446177959,
0.0327138416,
0.0640669689,
-0.2973064184,
0.0151834227,
0.3159182966,
0.1479311138,
-0.0713802129,
-0.2626301646,
0.3240514994,
0.2630265951,
-0.2260718495,
0.1383364648,
-0.0347758085,
-0.5336184502,
0.0946141481,
0.2589984536,
0.3436367512,
0.4469392896,
-0.1533934921,
-0.0033766441,
-0.0396507382,
-0.4922486544,
-0.0260318834,
-0.1051436663,
-0.1139656529,
0.082566157,
0.2647013664,
0.1236173585,
0.2827005684,
-0.0334639102,
0.0462085009,
0.2988393903,
0.3937667012,
0.024555238,
0.155998975,
-0.0895120576,
-0.1781277955,
-0.1676715314,
0.3514992595,
0.3922955692,
-0.0154846944,
0.0106550362,
0.1252191365,
-0.3595493138,
-0.091057986,
0.4749235511,
-0.1580017656,
-0.0369392708,
0.0938890949,
0.0166434944,
-0.5320455432,
-0.0606438294,
-0.0281225443,
-0.0847433358,
-0.3039168417,
0.2317364067,
-0.0121711604,
-0.091798231,
0.102301687,
-0.2134154141,
0.5871027112,
-0.2450862974,
0.0072283987,
0.1629153788,
0.1580483466,
-0.0144394189,
0.1343712509,
0.3595365882,
0.3483407497,
-0.2469236404,
0.0921177715,
-0.3106657267,
-0.0230592862,
-0.1457128376,
0.2029488981,
0.3186670244,
0.1778249443,
0.0684293956,
0.1633449048,
-0.2882709801,
-0.0467922874,
-0.1142949834,
0.3790618479,
-0.2499669343,
0.1722801626,
0.257794857,
-0.1916578114,
-0.4491399527,
0.0122592375,
-0.2413174808,
-0.0236191079,
0.3017311692,
-0.2390322685,
-0.0330839828,
-0.2029786259,
0.1085818708,
0.024044171,
0.4602802992,
0.5174254775,
0.3198363483,
-0.0012376085,
-0.0460653529,
-0.1639815867,
-0.0320615917,
0.306517154,
-0.0632730573,
-0.0743618384,
0.3361046314,
0.215415746,
0.0053995512,
-0.004030548,
-0.2370177954,
-0.2534394264,
0.2219523191,
-0.1255367249,
0.4652814269,
-0.2609789968,
0.2266547233,
0.1869704872,
-0.1629937589,
-0.0399312079,
-0.2518542111,
0.0541985482,
0.0949320793,
-0.0672330186,
0.119167991,
0.0002793272,
0.5229856372,
0.0870423764,
0.1229854673,
-0.3334083855,
-0.1373924017,
-0.1719635129,
-0.172270447,
-0.5522135496,
0.0878213644,
0.0875230208,
0.6268985868,
0.0971799344,
-0.1202662736,
-0.1241283193,
0.0881528929,
0.0131389499,
-0.5722588897,
-0.1499317586,
0.0011819378,
-0.087850824,
-0.0149728358,
-0.0661503226,
0.472006917,
0.0517066792,
-0.0070292242,
-0.3324207664,
-0.4548492432,
0.33701998,
-0.0535527356,
-0.2709164619,
-0.3991357982,
0.1516966373,
0.3290503621,
0.1189178973,
-0.6594867706,
-0.1559225768,
0.2090784758,
0.0794969276,
-0.0144648477,
0.3205158114,
0.0903446972,
-0.1893981397,
-0.2628097832,
0.0255034529,
-0.1981239766,
0.0315608233,
-0.3176019788,
-0.2944545448
] |
https://github.com/huggingface/datasets/issues/2618 | `filelock.py` Error | Hi @liyucheng09, thanks for reporting.
Apparently this issue has to do with your environment setup. One question: is your data in an NFS share? Some people have reported this error when using `fcntl` to write to an NFS share... If this is the case, then it might be that your NFS just may not be set up to provide file locks. You should ask your system administrator, or try these commands in the terminal:
```shell
sudo systemctl enable rpc-statd
sudo systemctl start rpc-statd
``` | ## Describe the bug
It seems that the `filelock.py` went error.
```
>>> ds=load_dataset('xsum')
^CTraceback (most recent call last):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
OSError: [Errno 37] No locks available
```
According to error log, it is OSError, but there is an `except` in the `_acquire` function.
```
def _acquire(self):
open_mode = os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_TRUNC
try:
fd = os.open(self._lock_file, open_mode)
except (IOError, OSError):
pass
else:
self._lock_file_fd = fd
return None
```
I don't know why it stucked rather than `pass` directly.
I am not quite familiar with filelock operation, so any help is highly appriciated.
## Steps to reproduce the bug
```python
ds = load_dataset('xsum')
```
## Expected results
A clear and concise description of the expected results.
## Actual results
```
>>> ds=load_dataset('xsum')
^CTraceback (most recent call last):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
OSError: [Errno 37] No locks available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 818, in load_dataset
use_auth_token=use_auth_token,
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 470, in prepare_module
with FileLock(lock_path):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 323, in __enter__
self.acquire()
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 272, in acquire
self._acquire()
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
KeyboardInterrupt
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.0
- Platform: Linux-4.15.0-135-generic-x86_64-with-debian-buster-sid
- Python version: 3.6.13
- PyArrow version: 4.0.1
| 84 | `filelock.py` Error
## Describe the bug
It seems that the `filelock.py` went error.
```
>>> ds=load_dataset('xsum')
^CTraceback (most recent call last):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
OSError: [Errno 37] No locks available
```
According to error log, it is OSError, but there is an `except` in the `_acquire` function.
```
def _acquire(self):
open_mode = os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_TRUNC
try:
fd = os.open(self._lock_file, open_mode)
except (IOError, OSError):
pass
else:
self._lock_file_fd = fd
return None
```
I don't know why it stucked rather than `pass` directly.
I am not quite familiar with filelock operation, so any help is highly appriciated.
## Steps to reproduce the bug
```python
ds = load_dataset('xsum')
```
## Expected results
A clear and concise description of the expected results.
## Actual results
```
>>> ds=load_dataset('xsum')
^CTraceback (most recent call last):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
OSError: [Errno 37] No locks available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 818, in load_dataset
use_auth_token=use_auth_token,
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 470, in prepare_module
with FileLock(lock_path):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 323, in __enter__
self.acquire()
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 272, in acquire
self._acquire()
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
KeyboardInterrupt
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.0
- Platform: Linux-4.15.0-135-generic-x86_64-with-debian-buster-sid
- Python version: 3.6.13
- PyArrow version: 4.0.1
Hi @liyucheng09, thanks for reporting.
Apparently this issue has to do with your environment setup. One question: is your data in an NFS share? Some people have reported this error when using `fcntl` to write to an NFS share... If this is the case, then it might be that your NFS just may not be set up to provide file locks. You should ask your system administrator, or try these commands in the terminal:
```shell
sudo systemctl enable rpc-statd
sudo systemctl start rpc-statd
``` | [
0.1390440464,
-0.3473012745,
0.0151472017,
0.0418613404,
0.0302765891,
0.0907047242,
0.1623595059,
0.1356668323,
0.0592383146,
0.0936226547,
-0.1010854319,
0.340319097,
-0.0329609402,
-0.4240651727,
-0.4592514634,
0.114182502,
0.0069273189,
-0.0698583052,
-0.114956826,
-0.0138158053,
-0.3595567942,
0.3968341351,
-0.4249513745,
0.0698366314,
-0.2793181837,
-0.0480348617,
-0.1366250068,
0.3886513412,
-0.1688993573,
-0.1395635754,
-0.0517243817,
0.0867065787,
0.0480412319,
0.5414584279,
-0.0001142323,
-0.1104708686,
0.0751494244,
-0.0566151366,
-0.3720931411,
-0.0422808379,
0.1407610029,
-0.09100876,
-0.0822484195,
-0.3874729574,
0.2373983562,
-0.3464204669,
0.143478319,
-0.2871148586,
0.402238369,
0.2639315724,
0.1441262364,
0.1482029408,
0.4175286889,
-0.1780091971,
0.1095129102,
-0.4201952517,
-0.0597184114,
0.6798740625,
0.7193903923,
-0.1613603234,
0.0171955489,
0.0855055004,
-0.1482494473,
-0.2049400657,
0.2320628762,
0.0193502754,
0.3815199733,
-0.4401882887,
-0.2167773694,
-0.0676428676,
0.0476562977,
-0.0331160538,
-0.4759553075,
-0.1618112922,
0.4275056124,
-0.0776197836,
0.0674170926,
0.1474143565,
-0.3159742057,
0.3756869435,
0.3556928635,
-0.1153599024,
-0.0145976692,
0.0721763745,
-0.0632615238,
0.3086349666,
0.0281342044,
0.1370659173,
0.2627248764,
-0.0308759753,
-0.0805698037,
-0.0226213858,
-0.0786237195,
0.1791379005,
-0.3750106096,
0.0532033443,
0.1346544474,
0.0576872528,
0.0491890237,
-0.23617737,
-0.344327718,
-0.2468751967,
-0.2653759718,
0.2343065888,
-0.1037880555,
0.0391339771,
0.0564298965,
0.1757359654,
0.3515811563,
0.1015718132,
-0.1955175102,
0.0138688534,
-0.0682473332,
-0.2627123892,
0.1323338002,
0.2916416526,
0.4077890515,
-0.1522001028,
-0.039868705,
0.2337807566,
-0.3236958385,
0.018107377,
0.1310849488,
0.2916446328,
0.1106775105,
-0.0809487998,
0.4470185637,
0.1683356464,
-0.1455668807,
0.0815060139,
-0.0896993279,
0.2096744776,
-0.0342747271,
-0.0005648062,
-0.1708631217,
-0.363021493,
0.0755958408,
0.3683514595,
0.2384224087,
-0.3314390481,
0.2022260725,
-0.1128127798,
-0.1492997259,
0.1193966717,
-0.139465183,
-0.0028866827,
0.3368241787,
-0.2456147969,
0.1286298186,
0.171438545,
-0.3326621652,
-0.1702171862,
-0.2444073111,
0.1446684897,
-0.0669415221,
0.0573143251,
0.198247999,
-0.3010267317,
0.0458979495,
-0.3152229786,
0.1590231359,
-0.3397693336,
0.1084701568,
-0.1530378759,
0.0482601672,
0.4075000286,
-0.1205241904,
0.2917502522,
0.18150267,
-0.1920054555,
0.1625550836,
0.0901742578,
-0.0213392563,
0.1109136045,
-0.4444104433,
0.0197575837,
0.106738627,
-0.5011026263,
-0.5333336592,
0.0561692975,
-0.4790903926,
0.0537881255,
0.1695951074,
0.4211777151,
-0.0173681583,
-0.164170593,
0.2718981802,
0.0371414609,
-0.0135015007,
-0.1450968087,
-0.1528098583,
0.0375401527,
-0.0440819822,
0.1406922787,
-0.002950686,
0.1586374789,
0.1399625093,
0.0071285777,
0.5296826959,
-0.1462132037,
-0.2674141526,
0.162833035,
0.4794794619,
0.1399135739,
0.0850242972,
-0.1591177285,
-0.1892719567,
0.2522280514,
-0.1989827454,
-0.0743361413,
-0.0725061372,
-0.0764315948,
-0.0437690131,
-0.043534372,
-0.0420150869,
-0.0813652426,
0.1175977886,
-0.0148879811,
-0.1799630374,
0.0497148335,
-0.1294883043,
0.4790838957,
-0.4433470368,
0.2013792098,
-0.1435980946,
0.0725169554,
-0.1064023972,
-0.2321330607,
-0.2575784326,
-0.0071405917,
0.2843229473,
-0.1900358498,
-0.2792269289,
0.4126045704,
0.2959445417,
-0.1124270186,
-0.2172020376,
-0.2112117112,
0.1744602472,
0.3583765924,
-0.2304764688,
0.014889434,
0.0837065056,
-0.0612621084,
0.1202407554,
0.1285024881,
0.0746096969,
-0.0397936329,
-0.0832265615,
0.2109802961,
-0.0251822732,
0.0652942955,
0.0204292312,
0.0194804519,
0.4611050785,
0.0080107823,
0.0624383092,
-0.1079219282,
-0.0518780872,
-0.0763699114,
0.1907404512,
0.0570197329,
0.2793465257,
0.1884340495,
0.3128790259,
0.3672697544,
-0.1931110322,
0.5885144472,
0.7208219767,
0.1016850471,
-0.2875606716,
0.0199204031,
0.3027026653,
-0.2104962319,
-0.0469007865,
-0.0330835432,
-0.0418755189,
0.212072894,
0.0586944595,
0.2311489582,
0.2032689452,
-0.8740935326,
-0.012597125,
0.2340480685,
-0.0049027726,
-0.0489194617,
-0.1694611609,
0.1353218406,
0.0601872131,
0.3312357068,
-0.0317485221,
-0.3138142824,
0.1344852149,
0.4649528265,
-0.074478291,
0.0039707422,
-0.363145858,
0.0643609986,
0.1980468631,
0.1316610128,
0.1112056524,
0.0367515571,
-0.0958562046,
-0.066424422,
0.1315076351,
-0.0980743915,
0.2080142945,
-0.0003201142,
-0.081226334,
-0.4246043563,
-0.1829680502,
-0.0314672142,
-0.1735014021,
0.4597561657,
0.0567155965,
0.3035487831,
-0.0233458132,
0.0249482058,
0.1383038461,
-0.0979296565,
-0.0782775134,
0.0798409581,
0.0149583295,
-0.0715150163,
-0.3844693005,
-0.0347080827,
-0.3898948729,
-0.5175121427,
0.1433669925,
-0.1855087578,
0.0664418638,
0.3325218558,
-0.1523123085,
0.4005429447,
0.1016700864,
0.1809340417,
0.1439605802,
-0.2926709056,
0.2969040573,
-0.0858421773,
-0.4228855371,
-0.3153538406,
0.0855030864,
-0.4737828672,
-0.1134320721,
-0.2983641922,
-0.5243878365,
-0.3494297564,
0.0939466208,
-0.5529786348,
0.0196179766,
0.161808446,
-0.2451498359,
-0.0653790012,
-0.2333382368,
0.179431662,
0.1334120482,
0.0864112228,
0.1263543516,
0.0655042231,
0.0586762354,
-0.0067033023,
0.3639446795,
0.1085517704,
0.2269399017,
0.2979876697,
-0.0920616016,
0.2684895396,
0.0239149947,
-0.2958975732,
-0.2039773911,
0.2649235427,
-0.232086733,
-0.1843944639,
-0.0148585541,
0.2902778983,
-0.1478253752,
-0.3533303142,
-0.2893272638,
-0.3504853547,
-0.0850317627,
0.422770977,
-0.0989020243,
-0.1246487945,
0.1201504916,
0.108476907,
0.1586568356,
0.0896880627,
0.5906788707,
0.4121561348,
-0.1058216095,
-0.0802928805,
-0.196801126,
0.032653749,
0.3254835904,
-0.035332948,
0.2591302395,
-0.0896732137,
0.0270838141,
0.1045221537,
-0.1417987198,
0.4386396706,
0.3848523796,
0.13846232,
0.0464404374,
0.1160206944,
-0.0257856213,
-0.1277817488,
-0.2922454476,
0.2406878769,
0.4588382542,
0.3851799369,
-0.0347467437,
-0.0558454208,
-0.2660074234,
0.1702409238,
-0.2192810178,
-0.6137130857,
-0.0278828144,
-0.1019436643,
-0.4393643737,
0.1196117252,
0.0954025537,
0.1485136747,
-0.0178365447,
-0.0758678392,
0.2558478713,
-0.2038923055,
0.0230456125,
-0.0956969708,
0.0668248311,
-0.1188012213,
0.1291119158,
-0.0056657596,
-0.3534394503,
0.3384052515,
0.2287882268,
0.2727630138,
0.0599869415,
0.2580748796,
-0.2394797802,
-0.0094575994,
0.2725383639,
-0.2674665749,
0.1491401196,
-0.0385686271,
0.2362753451,
0.1778625846,
-0.2500509024,
0.2482466698,
0.0410700962,
0.0385380946,
0.0458141863,
0.0593946055,
0.1177941114,
-0.0741812214,
0.716598928,
0.4143910706,
0.0822598711,
0.3143226504,
0.0100759324,
0.788975656,
0.011547789,
-0.0575823635,
0.224194169,
-0.0027725026,
0.3785952926,
-0.1774417758,
0.1131700873,
-0.3271005154,
-0.5434800386,
0.1170889139,
-0.2865745425,
0.4315251112,
-0.4660891294,
-0.0726578236,
-0.0296697542,
-0.3799651861,
-0.4223927259,
0.0227129869,
0.0103898793,
-0.8001111746,
-0.039497599,
-0.1688692868,
0.1111009866,
0.164642632,
0.345425725,
-0.1081509441,
-0.1112473011,
-0.3464572132,
-0.1693927348,
-0.3626003861,
0.1279753745,
0.029659342,
0.2635751069,
-0.0892515481,
0.0973386168,
-0.0544375405,
0.4668443501,
-0.0660160184,
0.251654774,
0.0980861634,
-0.0213678386,
0.0322904922,
0.0524953045,
0.2574523389,
-0.0581388138,
0.5052597523,
-0.0395308845,
-0.1861052513,
0.2242102921,
-0.1182094514,
-0.2262897789,
0.0197781324,
0.1649949104,
0.0535588376,
0.0207641087,
-0.3287981749,
-0.3234477639,
-0.24973993,
-0.118394047,
0.0701758042,
0.2645713091,
-0.2806157768,
0.0412965715,
-0.2572525144,
-0.2472551167,
0.0778117627,
0.2369467318,
-0.135496825,
-0.1562505811,
0.7352296114,
0.3345288038,
0.0765156746,
-0.0932233632,
0.1682737768,
-0.1857689321,
-0.3107035458,
0.121874392,
-0.1181880608,
0.233687073,
0.1547018737,
0.1354112178,
0.1855072677,
-0.1656296253,
-0.047842633,
-0.8504981399,
-0.3750933409,
-0.1020793691,
-0.2187471539,
0.0418165661,
-0.1938306391,
-0.0538674593,
-0.1249260008,
-0.1879476905,
-0.2676636577,
0.0953265578,
-0.3377147317,
-0.1140253097,
0.27874282,
0.1326108575,
-0.0353809632,
0.0669252574,
0.1483337879,
0.4477181733,
0.0377088189,
-0.1106638834,
-0.2386958748,
0.1802296937,
-0.0075025661,
0.0598252192,
0.1673073769,
-0.426777333,
-0.0159846395,
0.1985913366,
-0.1804459542,
0.1699618697,
0.0499135032,
0.1316346973,
0.4090230465,
0.3865377307,
-0.0312669501,
0.2474777699,
-0.1597062647,
-0.0531046093,
-0.011753533,
-0.0375697725,
-0.3258424103,
0.0814678371,
-0.6099708676,
-0.213570714,
-0.0352856554,
0.2961657941,
0.2289547026,
-0.052654922,
0.2311437279,
0.3749023676,
0.3837082982,
0.1908659339,
-0.1463356018,
0.1729477197,
0.1554067433,
0.1978394836,
-0.0282336883,
0.0028659441,
0.2605311573,
0.1168465763,
-0.242686078,
0.1361650079,
-0.5636628866,
-0.034467712,
0.0085771102,
0.0550476238,
-0.0534488857,
0.1351453513,
-0.05059769,
0.0278802626,
-0.0216866881,
0.0026910435,
0.2283747792,
-0.1127718985,
0.1167695224,
0.2027148604,
-0.3984921873,
-0.0443700328,
0.0387876481,
0.0246720016,
0.2728334367,
-0.3969198167,
0.3170890808,
0.0065245032,
0.1835428923,
-0.1422096044,
-0.1942425817,
0.1280910969,
-0.2384288013,
0.1914544106,
0.22333318,
0.3583886623,
-0.1798892021,
0.3329329491,
0.3796786964,
-0.0558154806,
0.0767560303,
-0.219825983,
0.0660910755,
0.0864090323,
-0.2148159146,
0.3427778482,
0.0418099798,
-0.3922552168,
-0.448530674,
0.2099494636,
0.3679637611,
-0.3328230381,
-0.2037754357,
0.5172690749,
0.1183421463,
0.3015899658,
-0.0462847203,
0.3640758395,
0.5558552146,
0.0813664943,
0.3179983497,
-0.1306937188,
-0.0043298863,
0.0670639873,
0.3741816878,
0.1950093657,
0.0765070617,
0.2795681655,
0.1557220519,
-0.2470973134,
0.1012522578,
0.0990155339,
0.2535736561,
-0.271057874,
0.2363591492,
0.1587242484,
-0.1288722605,
-0.109339036,
0.0350660197,
-0.2995657623,
-0.0277636833,
-0.0843698457,
0.2166172862,
0.0319531262,
-0.0139266662,
0.0988720283,
-0.003107395,
-0.3188240826,
0.5872222185,
0.2256662548,
-0.3283103108,
0.1795730442,
-0.5215360522,
0.3325364292,
0.1587112397,
-0.4344835579,
-0.1075680405,
-0.0355024412,
-0.0812782496,
-0.0342816114,
0.5500479937,
-0.1895497143,
0.18381387,
0.4769850373,
-0.2052765489,
-0.2011804879,
0.1557516754,
-0.1988182813,
-0.0595370457,
-0.1038196608,
0.0095434412,
-0.45229882,
0.1238265485,
-0.0814458132,
-0.5590341687,
-0.0229629986,
-0.0602851361,
0.257126987,
0.1017163321,
0.3643155992,
-0.1040786281,
-0.377312541,
-0.1476344466,
-0.1132518947,
0.0484947264,
-0.3111387193,
0.0286665,
0.3408144712,
-0.3522244692,
-0.4135693908,
-0.402769953,
0.4307855368,
-0.4707093835,
-0.4059114754,
-0.5092318654,
0.355138123,
-0.0586613119,
0.0347449854,
0.2844442725,
0.3230707645,
0.2075725645,
0.3168869913,
-0.4063811898,
-0.1496327519,
0.6324791908,
-0.5143603086,
-0.0433190241,
0.1410473287,
0.4048154056,
-0.0384848416,
-0.143857494,
-0.0502862632,
0.0080291927,
0.3262681961,
0.0352984853,
-0.1190952361,
0.0173804201,
0.0460164249,
-0.0275522247,
0.0891541541,
0.1260188371,
0.0651955456,
0.15042606,
0.3225905895,
0.0388340876
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | For some reason this happens (both `datasets` version are on master) only on Python 3.6 and not Python 3.8. | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 19 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
For some reason this happens (both `datasets` version are on master) only on Python 3.6 and not Python 3.8. | [
-0.3504129648,
0.1333581805,
-0.0069016591,
0.3097093701,
0.0389037877,
0.0805482119,
0.2188648582,
0.3883448541,
0.0006040633,
-0.0402303115,
0.3231002986,
0.0345942155,
0.06731648,
0.0446977764,
-0.1680245101,
-0.167406857,
0.2194829285,
-0.0308501832,
0.0336681679,
0.2225417942,
-0.277071476,
0.3025197983,
-0.1921600103,
-0.2260369509,
-0.3988592625,
-0.216871202,
0.1474189907,
0.0140268486,
-0.0263664052,
-0.528249383,
-0.0391153544,
-0.2388430089,
0.4440393746,
0.5343334675,
-0.0001208482,
-0.1544706225,
0.3335987628,
0.0061303154,
-0.2074825615,
0.0264418162,
-0.4390987158,
-0.3250524104,
0.0626771376,
-0.332159102,
0.4254891276,
-0.0433258414,
-0.3561617434,
-0.4652174413,
0.6484060287,
0.445558846,
0.1272597164,
0.0488454849,
0.0954690725,
-0.0134074874,
-0.0303340778,
0.1398147643,
-0.027031038,
0.1463215053,
-0.167342633,
0.2741566002,
0.2642324269,
-0.0571530052,
-0.1586716473,
-0.254106164,
-0.1199240535,
-0.0854108706,
-0.0593050309,
-0.2858149409,
0.1833253652,
0.4000854492,
0.1188574135,
-0.1941764057,
-0.212276116,
-0.3544605672,
0.1109926254,
-0.5715146661,
0.0593008772,
0.5090210438,
-0.0011915341,
0.1080369502,
-0.2637681663,
-0.1144096702,
-0.2154254019,
-0.0444664732,
0.0033298135,
-0.1853810996,
-0.1245928481,
0.0236597918,
-0.123682797,
-0.0916753262,
-0.0017675757,
-0.2792039514,
-0.5480951071,
-0.0483756736,
-0.1531420201,
0.0719259679,
0.1683174968,
-0.4102763236,
0.0765405595,
-0.1706938148,
0.2756135762,
-0.3768745661,
0.252215147,
0.0399435759,
0.562956214,
0.1241350174,
0.3155885637,
-0.0116558112,
0.2348292768,
0.0134433359,
0.0630374551,
-0.0512276292,
0.0182548203,
-0.1685533971,
0.1308634281,
0.0527189337,
0.0156178698,
-0.0881918147,
-0.0524228439,
0.1799783409,
-0.3575301468,
-0.17916587,
-0.2505486012,
-0.1906237304,
-0.0992804021,
0.2618558109,
0.16350393,
0.295634836,
-0.1717637628,
0.0063082688,
-0.0204489771,
-0.1102863401,
-0.0897189081,
-0.02362312,
-0.073194772,
-0.2337141037,
-0.0126972012,
0.2607295811,
-0.0713078901,
-0.2439555973,
-0.0935665816,
-0.0429422222,
-0.1192921698,
0.2015204728,
0.3051176071,
0.1432212442,
-0.1321806759,
-0.1420607567,
-0.0551179573,
0.1836928129,
-0.4487808347,
-0.0509721935,
-0.3994897902,
0.1303583533,
-0.1831217706,
0.132242009,
-0.4531031847,
-0.0757281631,
0.1063628867,
0.105637148,
0.3775987029,
-0.354727447,
0.5717500448,
-0.280420661,
0.022484079,
0.2825923264,
-0.7132419348,
0.0905746222,
0.0787855685,
-0.0180386659,
0.4428822398,
0.3599771261,
-0.0533611849,
0.3268299103,
-0.1179182008,
0.2507767081,
0.1492944807,
0.1822725832,
0.0733188167,
0.490275979,
-0.0750964135,
0.0082652569,
-0.0178808607,
-0.3451777995,
0.6365370154,
0.1081682295,
0.5238192081,
0.3789553344,
0.0567398295,
0.2471431047,
-0.1749352813,
-0.193417877,
-0.0582303554,
-0.1998624802,
-0.3382232487,
-0.0477833189,
0.1436715871,
-0.2043279707,
0.3136584163,
-0.2468698621,
0.1187639013,
0.4237186909,
0.1386940181,
0.1213781685,
0.0007521138,
0.2297510952,
-0.4470791221,
-0.1484592557,
-0.1031329781,
-0.1582557857,
-0.1408944726,
-0.0262277797,
0.2096292078,
0.2228936255,
-0.0618907437,
0.1483443826,
0.0206856802,
-0.1179928929,
-0.0828323588,
0.2088548541,
-0.0439203307,
0.1072661728,
0.1892152131,
0.0468168221,
-0.2518904507,
0.3014495671,
0.2420798093,
-0.2325038612,
0.2049760818,
0.120919928,
0.1598202288,
-0.3047864139,
-0.1392453611,
0.2068883181,
0.0553343408,
-0.04376176,
-0.2117632329,
0.0500008613,
0.1228868887,
0.1427296102,
-0.1562664658,
0.2958239913,
-0.0600602217,
0.0939997956,
-0.0663733408,
0.6036193967,
-0.1680667996,
0.3515253961,
-0.0444825739,
-0.0093329735,
0.2048703134,
-0.1004325524,
-0.0489792898,
-0.2392227948,
0.2890394926,
0.2199496031,
-0.1189383715,
0.0350224227,
-0.2944984436,
0.0433701575,
0.6203616261,
0.0286877304,
0.0749297217,
0.2449775636,
-0.0279281139,
-0.0106856972,
0.0029465128,
0.1193473265,
0.3418048918,
0.1002836451,
0.0062351432,
0.1227353066,
0.2248274684,
-0.0821279883,
0.28829211,
0.1530654132,
0.3440402448,
0.2973323464,
0.189880684,
0.1800426394,
-0.140583843,
-0.3945007324,
-0.2151728421,
0.0726258159,
-0.3205604553,
0.3570818305,
-0.1810529083,
-0.0075611919,
-0.4912694693,
-0.4257616699,
-0.2852299213,
-0.3221098185,
-0.1869161874,
-0.1177200675,
-0.4756627977,
-0.1666973829,
-0.1625770628,
0.0679476038,
0.1090966985,
-0.0620148629,
0.080745399,
0.0071077831,
-0.1285311133,
-0.1226082146,
-0.0314300843,
-0.2198493928,
0.0281817224,
0.0962629691,
0.0953905582,
-0.079917714,
0.1263903826,
0.1485721916,
0.0225122496,
-0.0986565575,
0.177281633,
0.1919341236,
0.0379261523,
-0.5070130825,
0.044114586,
0.1346119642,
0.004804574,
0.1715759039,
-0.0695159584,
-0.1623263359,
-0.0968113318,
-0.0530370511,
-0.0232676975,
-0.3681435585,
0.4280721545,
-0.1050024405,
0.0783648491,
-0.092758514,
0.1251448095,
-0.0520537607,
-0.0536760949,
-0.287979424,
0.2134601176,
-0.4409473836,
0.0076128701,
-0.2837554812,
-0.2592485845,
0.1172969937,
0.1513834596,
-0.0292774849,
0.0501037687,
-0.3940511942,
0.5075172782,
-0.1001567617,
0.3795504868,
-0.1231448054,
0.1970723271,
0.1210309565,
-0.0695039779,
-0.0169991739,
-0.0407808349,
0.1108446866,
0.1125225574,
0.0556511544,
0.482134819,
-0.0872539431,
0.716424346,
-0.2381188869,
-0.1243976206,
0.8051137328,
0.1623542309,
0.2087135464,
0.0996946618,
0.170273155,
-0.1429883242,
-0.0274126641,
0.0307167247,
-0.1232378632,
-0.1478365362,
0.1717360914,
0.0345601887,
-0.1530417353,
0.0378617197,
-0.010811083,
-0.3851906061,
-0.3762855828,
0.2383836955,
-0.1005224884,
0.3272309303,
-0.3106669784,
0.0180651993,
-0.0260735005,
0.0866976678,
-0.2485886216,
-0.0391860195,
0.2262443304,
0.1218073815,
-0.5017978549,
-0.374683857,
-0.4901306033,
0.2143227011,
0.0604575425,
0.6483104825,
0.1418090761,
0.0654698908,
-0.0685711652,
-0.0753924027,
0.6379694343,
-0.0187666751,
-0.2247713059,
0.2450767457,
0.323269099,
-0.2799648643,
-0.1315704584,
0.1515451968,
0.2155803293,
0.8975405693,
0.059787441,
-0.2848914862,
-0.0003903508,
0.2221137732,
0.3107578754,
-0.1043007523,
-0.2652482688,
-0.1747551262,
-0.1859596372,
-0.0746013001,
-0.2814921439,
0.1014093459,
0.4137972593,
-0.1576347351,
-0.1487753987,
0.0687110126,
-0.3437818289,
-0.0412045829,
0.0084780157,
0.2232960165,
-0.0842653662,
0.1385911405,
-0.0246471222,
0.2563929856,
0.4521253705,
0.3058807254,
0.0356716253,
-0.4467418194,
-0.0822936296,
-0.2442293614,
0.3771299422,
-0.0825338364,
-0.2151098847,
0.1014142036,
-0.0907826051,
0.3834987879,
0.1219997555,
-0.3035018444,
0.3149877787,
0.0513521023,
-0.8291918635,
0.0223529488,
0.3281480968,
0.0547031909,
0.2725347281,
0.1803309768,
-0.2888332903,
-0.3916203082,
0.1753712744,
-0.1807685494,
0.5057513118,
0.4422090352,
0.1994864494,
0.0818075091,
-0.4618524015,
0.6346321106,
0.1170887202,
0.0573921092,
-0.2433636636,
0.4591757655,
0.1332219243,
-0.1751398444,
0.1018058062,
0.0069228038,
-0.1019010767,
0.0277276188,
-0.5292730331,
-0.2904353738,
-0.2342902124,
-0.0197917968,
0.1661035866,
-0.2177007645,
-0.5199828148,
-0.0114513151,
-0.036423184,
-0.2229021192,
-0.0615969226,
-0.214888826,
0.0885431021,
-0.1690397859,
-0.4068053961,
0.1753610671,
0.0427624807,
0.1383467913,
0.3813124299,
-0.2322727293,
0.1784352958,
-0.1881962866,
0.238540113,
0.1239836141,
0.0410763249,
-0.0559255853,
-0.073775515,
-0.0862138867,
0.1032482013,
-0.0203392282,
0.1611800343,
-0.0562099107,
-0.1563476026,
0.1622191668,
0.0425422788,
-0.2514264882,
-0.0624588728,
0.2822571993,
-0.238487348,
-0.3111319244,
-0.1231716201,
0.0842907429,
0.2433491051,
-0.1255086064,
0.0237616431,
0.2197460383,
0.0179517716,
0.301540941,
-0.3990696669,
-0.2024073005,
-0.2789297998,
0.1237439066,
0.0286224,
-0.2644251287,
0.2547754347,
0.5522831678,
-0.1724935472,
-0.0548525155,
0.46135813,
0.2994171083,
-0.4373064935,
0.5468574762,
-0.1161937267,
0.2572832406,
-0.064738065,
0.4393744171,
0.0246307906,
-0.0039304588,
0.1056319028,
-0.4127840996,
-0.1596416682,
-0.056125477,
0.1559870541,
-0.0151460394,
0.0502729714,
0.4513690174,
0.0733482316,
-0.2226617336,
-0.1254235804,
-0.000382036,
-0.1558337808,
0.0274691023,
-0.0910617709,
-0.0516923368,
0.070270434,
-0.0788925737,
0.0237129927,
0.0943355188,
-0.0427362956,
-0.0913178623,
-0.3859696686,
0.1511208117,
0.1576990634,
-0.2384634614,
0.1840205789,
-0.0280539915,
-0.2168806493,
-0.0194974672,
0.2399766147,
0.008457087,
-0.1093642414,
-0.0348286033,
0.0417552665,
-0.1395688206,
-0.0450166427,
0.0915858001,
0.2478060573,
0.6310983896,
-0.0039620399,
0.4617322683,
-0.0837520659,
-0.0817985833,
-0.4447195828,
0.0365297347,
-0.1844372004,
0.3684321046,
0.1258163452,
-0.7131573558,
-0.0333926119,
0.3153312206,
0.1713239104,
0.3518635929,
-0.2561751902,
0.0928816721,
0.0609295852,
0.1493957341,
0.0489135012,
-0.1838424355,
-0.0148720825,
0.1542604119,
-0.2073801458,
0.0270517021,
-0.1055362895,
-0.3753697276,
-0.2184964716,
-0.0562070534,
0.3148275018,
0.1969404072,
0.301007688,
0.3379616737,
0.1170078665,
0.1715706289,
-0.0953869671,
0.2353034019,
0.1874184608,
0.0852257013,
0.21916008,
-0.0530833825,
0.5097370744,
-0.1636622548,
-0.1327754259,
-0.5077127814,
-0.062922284,
-0.0243232548,
-0.1108367965,
0.2969661355,
0.1731533706,
0.1295633018,
-0.2328275144,
-0.0546788946,
-0.1317439377,
0.1354824305,
-0.1146020144,
0.0271173008,
-0.1979805082,
0.0300391167,
0.2139833868,
0.140345782,
0.025071213,
0.2218131572,
-0.1614846438,
0.2567000091,
-0.0148262791,
-0.4643141627,
0.1446291357,
-0.096281752,
0.2030681074,
-0.3048175871,
0.0698809475,
0.1747231185,
-0.0594314225,
-0.1174422503,
0.1270094067,
0.6228169203,
0.3317955434,
0.2254387736,
-0.1523674428,
-0.1855995953,
0.1193913594,
0.0882169381,
0.1380411983,
0.2320009321,
0.0738767684,
0.1868018955,
0.0277625322,
-0.0597376265,
0.3779552281,
0.125699982,
0.1086772233,
0.0675296038,
0.2136911899,
-0.1539219022,
-0.1720199883,
-0.4478200674,
-0.1431650221,
-0.2603189945,
-0.0390318967,
0.4155710936,
-0.077690579,
-0.1089190766,
-0.111005418,
0.0211324319,
-0.2312808633,
0.4254667461,
0.316393435,
0.3585677147,
-0.0846128911,
-0.1597925425,
0.1236491799,
-0.0332794301,
-0.3323062956,
0.3897256255,
0.3716342449,
0.2889093161,
-0.2752666473,
0.0416820012,
0.2435317338,
0.635832727,
-0.5123925209,
-0.0114977397,
-0.4014298916,
0.0414298736,
0.4235151112,
0.0521734357,
-0.1359282434,
-0.1739707291,
0.4652431011,
-0.1783282608,
-0.0755834356,
-0.1921003312,
0.102909416,
-0.0304349735,
0.011667612,
0.0697246939,
0.426915139,
0.084098652,
-0.0229897797,
-0.2912997007,
-0.3464736044,
-0.1918723583,
0.0432452224,
0.2732585073,
0.2471270263,
0.5369343758,
-0.1444125473,
-0.0654274523,
-0.2570611537,
0.2039146274,
-0.0345534943,
-0.3771499395,
-0.0903438479,
0.0467708036,
-0.0981630683,
0.0540510379,
0.2709194124,
0.2368745506,
-0.0699159354,
0.2132074237,
-0.0019539595,
-0.2278090715,
0.0939568505,
-0.4700146019,
-0.3610374928,
-0.0471689627,
0.2895598114,
0.1970520765,
-0.0877746418,
-0.1467587054,
0.1632648706,
0.3798911273,
-0.1767862141,
-0.3856868744,
0.2137869447,
-0.1509817392,
-0.0710370243,
0.2052475512,
0.3572627306,
0.2654608786,
-0.4532508254,
0.2572435439,
-0.0953834727
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | @TevenLeScao we are using `pandas` to serialize the dataset to JSON Lines. So it must be due to pandas. Could you please check the pandas version causing the issue? | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 29 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
@TevenLeScao we are using `pandas` to serialize the dataset to JSON Lines. So it must be due to pandas. Could you please check the pandas version causing the issue? | [
-0.3529364467,
0.1344453394,
-0.0139708631,
0.2699110806,
0.0913661271,
0.0805774033,
0.2758990526,
0.4209207296,
-0.001224488,
-0.0546870157,
0.3439739048,
0.0168317184,
0.1050095856,
0.1663783193,
-0.2123271823,
-0.219845742,
0.2366725951,
0.0008690394,
-0.0046991818,
0.2111839652,
-0.2990747392,
0.2603414059,
-0.1727564931,
-0.1527430117,
-0.4317583442,
-0.3298732936,
0.0938417614,
-0.0441340432,
0.0058595277,
-0.4725072682,
-0.0423333086,
-0.2630412877,
0.467656076,
0.5261771679,
-0.0001195658,
-0.1944763958,
0.322065562,
0.0135893673,
-0.1867631376,
0.0544611365,
-0.4758793712,
-0.3755788207,
0.0264106542,
-0.3169335127,
0.4677457809,
-0.1366832554,
-0.3192302585,
-0.3943058848,
0.6600260735,
0.3750502467,
0.1458732784,
-0.0116167665,
0.1228371263,
0.0027562641,
-0.1855166554,
0.1420012116,
0.0120759159,
0.1403745711,
-0.1949198097,
0.2560222447,
0.2439373732,
-0.0405930653,
-0.1299277693,
-0.2738687694,
-0.1651039124,
-0.1033715457,
0.0106682684,
-0.2650200725,
0.2222116441,
0.388964653,
0.2334923148,
-0.1778815687,
-0.2301107496,
-0.3413919806,
0.0876553729,
-0.5814913511,
0.0522421785,
0.4974866211,
0.0348253548,
0.1073146164,
-0.1599734724,
-0.0986206681,
-0.2680466771,
-0.0571154729,
-0.0128140524,
-0.235178411,
-0.1353163421,
0.0022890475,
-0.2164380997,
-0.1658332199,
-0.0493838936,
-0.2810889781,
-0.4807429314,
-0.0021586008,
-0.2009213567,
0.0675937235,
0.1232376173,
-0.5326529741,
0.0609982759,
-0.0570518859,
0.3082894683,
-0.3318082988,
0.184278667,
0.0480579995,
0.535582006,
0.2027213424,
0.2703156173,
-0.0536254868,
0.2857007682,
0.0064851269,
0.0928443596,
-0.0749028847,
-0.0085742399,
-0.2188671231,
0.0825404525,
0.0149516277,
0.0333819315,
-0.0884103328,
-0.0457932018,
0.238183111,
-0.3975781202,
-0.1502699405,
-0.2566151023,
-0.1565059274,
-0.1036846936,
0.304549098,
0.1440951675,
0.2482615411,
-0.0999798775,
0.0432459638,
-0.0405064784,
-0.0961540937,
-0.0510435775,
-0.0417154357,
-0.059888538,
-0.1935316771,
-0.0223594531,
0.2295277417,
-0.1399096102,
-0.2545554042,
-0.1193481684,
-0.0958458707,
-0.1304166317,
0.1919519603,
0.2618643939,
0.1400868148,
-0.1878331453,
-0.1636244357,
-0.0112472773,
0.1853889227,
-0.4196414948,
-0.0066010877,
-0.4253169298,
0.1383524537,
-0.1044837236,
0.136747241,
-0.4679187536,
-0.0312341545,
0.1029539406,
0.1681158543,
0.402390033,
-0.2843469679,
0.5852188468,
-0.2737249434,
-0.0134123527,
0.2795951664,
-0.7273976803,
0.0780296028,
0.1663562208,
-0.0066932533,
0.4735566378,
0.4228543937,
-0.0087972321,
0.3183477521,
-0.0838812441,
0.2450966686,
0.0956277847,
0.1964690238,
0.0790033117,
0.5843230486,
-0.0501273051,
0.0050992966,
0.0808046311,
-0.3214188814,
0.5988570452,
0.1140355617,
0.4622331858,
0.3923929334,
0.0614681914,
0.2183371186,
-0.1816773415,
-0.237398237,
0.0264635384,
-0.2356804013,
-0.2884986401,
0.0058604181,
0.1468085349,
-0.1964567602,
0.3013798892,
-0.2460613996,
0.1070938185,
0.4218321741,
0.1388189644,
0.1713829488,
0.0404157229,
0.2613672018,
-0.3996375501,
-0.202600643,
-0.1755859703,
-0.1705568433,
-0.1746136248,
-0.0611297898,
0.1994908303,
0.210285455,
0.0337505937,
0.184689939,
0.0434005186,
-0.1528934687,
-0.1080068797,
0.2392733246,
-0.0202544034,
0.2720686197,
0.1215363145,
0.0703211278,
-0.2877201736,
0.2894146442,
0.1951190382,
-0.2047721893,
0.2890509367,
0.1089505181,
0.1802472472,
-0.3298682272,
-0.1243566573,
0.2506780624,
-0.0237741284,
-0.0298403352,
-0.1105639637,
0.0919204056,
0.1511950493,
0.1865121424,
-0.1851963699,
0.2800286412,
-0.021161139,
0.0737262666,
-0.1132219881,
0.5642176867,
-0.2457127124,
0.2829079628,
-0.062557064,
-0.0128165595,
0.3005695641,
-0.0625312477,
-0.0879971981,
-0.1714466959,
0.2660798728,
0.1631940305,
-0.1138840467,
0.0562230647,
-0.4401576221,
-0.051648546,
0.5020252466,
-0.0390513949,
0.1236079335,
0.218270123,
0.0230587907,
-0.0328239724,
0.0820226371,
0.0920972079,
0.2714564204,
0.1238183379,
-0.0892973542,
0.0432208404,
0.1545456499,
-0.0774390772,
0.2806870341,
0.174172774,
0.2688158154,
0.2540609241,
0.1505661905,
0.1775210947,
-0.1411738545,
-0.3314293921,
-0.1864497364,
0.111568667,
-0.3104499578,
0.3321208656,
-0.2076401711,
-0.0999991745,
-0.4491665065,
-0.398208648,
-0.2386237234,
-0.2300272286,
-0.2367467433,
-0.1190830916,
-0.4333932996,
-0.075287804,
-0.1449390501,
0.0991031751,
0.169790104,
-0.0045733787,
0.0295292214,
0.0061938241,
-0.0869574845,
-0.0757520571,
0.0253163762,
-0.1559319496,
0.0153030585,
0.1156512052,
0.1703988016,
-0.0613913313,
0.1679658741,
0.0688270032,
-0.0236095004,
-0.1093086898,
0.1402525008,
0.2671135068,
-0.0551958792,
-0.5096025467,
-0.0115269199,
0.1602479815,
0.028143391,
0.1368238926,
-0.1092101932,
-0.2188172191,
-0.0702956244,
-0.0341575593,
-0.0018334147,
-0.3069933653,
0.4799241722,
-0.0855260789,
0.0724560618,
-0.0527046919,
0.1263264865,
-0.0759283453,
0.040293511,
-0.2723291218,
0.1749475449,
-0.4066646397,
0.0378725678,
-0.2577100694,
-0.2774898708,
0.1150118783,
0.1448030174,
-0.0473121665,
-0.0669013709,
-0.361792922,
0.5396342278,
-0.1307225972,
0.3153796196,
-0.1509941816,
0.1408165097,
0.1063911393,
-0.0515445322,
-0.0481922738,
-0.009552069,
0.1201777458,
0.1875931621,
0.0448184982,
0.4433203936,
-0.0413811654,
0.7773230672,
-0.1926978528,
-0.2444992214,
0.7898447514,
0.1316352934,
0.211589396,
0.1151452363,
0.1390177011,
-0.1353592873,
-0.0279303081,
0.0455645882,
-0.1468821168,
-0.0766203478,
0.1834487319,
-0.0149412453,
-0.1180610731,
0.0647347718,
-0.0425784625,
-0.3984563947,
-0.3288908303,
0.1766888201,
-0.0940917432,
0.3057631254,
-0.2974818051,
-0.0212454572,
-0.0664560944,
0.0871306732,
-0.1968190372,
0.0041390173,
0.2274215519,
0.1077058017,
-0.4807261527,
-0.4307633042,
-0.5369929075,
0.2102300823,
0.0410192609,
0.7110476494,
0.1348101646,
0.1258118153,
-0.0493267775,
-0.0679448843,
0.7193495631,
0.0377155617,
-0.2552367449,
0.1822211891,
0.3052653968,
-0.2205705643,
-0.0752839968,
0.1674722731,
0.2276559174,
0.7511640191,
0.0254301541,
-0.2779776454,
-0.0177200586,
0.2570810318,
0.269254297,
-0.137440294,
-0.264275521,
-0.1753085703,
-0.1455646753,
-0.0927022174,
-0.2050189376,
0.0776111111,
0.4493770301,
-0.1585994512,
-0.1447980106,
0.0166420285,
-0.4110096693,
0.0234442279,
0.0332663506,
0.2265169024,
-0.0339939706,
0.1226977482,
-0.0917231441,
0.3180518746,
0.5115267038,
0.1914928406,
0.0366322063,
-0.3783220351,
-0.0597477779,
-0.3364691138,
0.3730205894,
-0.0945389643,
-0.2697621286,
0.089024514,
-0.122571528,
0.3454494178,
0.0978462547,
-0.3196590543,
0.3448732793,
0.1271498501,
-0.8693087101,
0.0403294638,
0.3497121334,
0.0754920244,
0.25599581,
0.1632464528,
-0.2913646102,
-0.4001286924,
0.1954011321,
-0.2215898484,
0.5349738598,
0.4000048637,
0.1256387681,
0.0780607387,
-0.4380122125,
0.6267950535,
0.1097603068,
0.0620519407,
-0.205224961,
0.3821619749,
0.0868347958,
-0.1458933204,
0.1996168345,
0.0108879479,
-0.0975730345,
0.0620533377,
-0.5207386017,
-0.2721302807,
-0.2103891969,
0.0633191615,
0.2039903104,
-0.2107550949,
-0.570271492,
-0.0021739528,
-0.060787987,
-0.2533459365,
-0.0670553073,
-0.2045764923,
0.0590339452,
-0.1251280457,
-0.3649451137,
0.0907055214,
0.1318026781,
0.2061830759,
0.3368250132,
-0.1952327788,
0.1447540075,
-0.1788708568,
0.2955813408,
0.1077706665,
0.0045015253,
-0.0674384981,
-0.1130902395,
-0.1078405157,
0.0571676642,
0.038885463,
0.1876396984,
-0.0155580491,
-0.125918895,
0.1938147694,
0.0704369992,
-0.1935295016,
-0.0962936878,
0.2029901743,
-0.2946879268,
-0.3295081854,
-0.1623877138,
0.0329157822,
0.2324554324,
-0.1372101605,
0.0390672125,
0.1924269497,
0.02804121,
0.3296632767,
-0.3757055402,
-0.1614171267,
-0.339089185,
0.1104763001,
0.0222629309,
-0.1946792901,
0.2751015723,
0.5374060869,
-0.2416735142,
-0.0429456532,
0.4625178576,
0.3201996088,
-0.4603796005,
0.5341432095,
-0.0770807341,
0.2449527681,
-0.1203359663,
0.4825564921,
0.0772650242,
0.001295656,
0.1211182475,
-0.3984120488,
-0.2224571109,
0.0035766698,
0.1803526431,
0.0048179207,
0.0767069608,
0.5469904542,
0.0969509333,
-0.224124074,
-0.1405326277,
-0.0130532645,
-0.2337539494,
0.0333455391,
-0.0965533331,
-0.0322134383,
0.0356993936,
-0.0731007457,
0.0366534963,
0.1145424992,
0.0164358839,
-0.1236487851,
-0.3727946877,
0.1271933317,
0.1557141095,
-0.2110013962,
0.1434064209,
-0.0033734143,
-0.250189364,
0.0102503933,
0.1792969704,
0.0619122833,
-0.0944192633,
-0.045882538,
0.1153453588,
-0.1610635668,
-0.0681883767,
0.1086579859,
0.2025462389,
0.5488926768,
0.0119079687,
0.405336827,
-0.0716580003,
-0.0732143894,
-0.4471324682,
0.0277349688,
-0.203941226,
0.3001707792,
0.1436184049,
-0.7271791697,
-0.0998682082,
0.367133975,
0.1616158634,
0.2915070057,
-0.2427119315,
0.0772214532,
0.046941407,
0.1624556184,
-0.0157322213,
-0.1802331656,
-0.0087850485,
0.0827631056,
-0.1923853457,
0.0270686261,
-0.0308605582,
-0.414347291,
-0.1752532572,
-0.0408897102,
0.3402948976,
0.1533825845,
0.293258965,
0.3838327527,
0.1860474348,
0.161279127,
-0.0830127895,
0.3084392846,
0.1719073206,
0.041356124,
0.2358126789,
-0.1518706679,
0.5499086976,
-0.0797495097,
-0.2109903693,
-0.4842017293,
-0.101355508,
0.0385557562,
-0.212779209,
0.2878962159,
0.1786765456,
0.1412263662,
-0.2053217888,
-0.0585109517,
-0.1316242218,
0.146982193,
-0.1549755484,
-0.0191581659,
-0.2165701836,
0.0453937203,
0.2118903548,
0.0991669595,
0.0438985303,
0.2256008089,
-0.2876899242,
0.2112771571,
-0.0219825357,
-0.4377118051,
0.1144833267,
-0.1112748086,
0.2158977836,
-0.2742502093,
0.0428078771,
0.1431732178,
-0.0642305687,
-0.0831957608,
0.1545313299,
0.5885648131,
0.2697699964,
0.2648821175,
-0.1208001375,
-0.1706361175,
0.1073351428,
0.1742766947,
0.1686101109,
0.23148489,
-0.01364558,
0.1752026528,
0.0392281115,
-0.0672090277,
0.3838609159,
0.1897578388,
0.1100060493,
0.0028357878,
0.176902011,
-0.1984805465,
-0.1982294321,
-0.420022577,
-0.171066165,
-0.2558767796,
-0.0049825571,
0.3394448459,
-0.1537773609,
-0.1319400221,
-0.0998607576,
0.029187195,
-0.2728428543,
0.4100105464,
0.3090420663,
0.3422876596,
-0.0362542644,
-0.1375626922,
0.1079029292,
-0.1108528376,
-0.2709165514,
0.384044379,
0.3714984357,
0.2755207419,
-0.2814262211,
-0.056595102,
0.2465706617,
0.6157265902,
-0.505651474,
0.0120017286,
-0.3906679153,
0.1191624552,
0.3668139875,
0.0803153291,
-0.1651151776,
-0.1229631007,
0.4900046885,
-0.1206825078,
-0.0789342448,
-0.1198879033,
0.0980634987,
-0.1092530638,
0.076708056,
0.0152674001,
0.407882005,
0.0250431616,
-0.029551167,
-0.2083171308,
-0.294170171,
-0.1928320825,
0.0614786074,
0.3428524137,
0.2553369403,
0.5357607007,
-0.1673199832,
-0.0385084376,
-0.1830641031,
0.2234834731,
-0.0328900255,
-0.3865860701,
-0.1538762152,
0.0641759112,
-0.1441622674,
0.0128575154,
0.2859579623,
0.2245041728,
-0.0872953534,
0.261708945,
0.0529519767,
-0.2685488164,
0.0616973042,
-0.4994948804,
-0.3638347685,
-0.0477744155,
0.2398653626,
0.2502556443,
-0.048028864,
-0.0469893292,
0.1621945351,
0.3588540256,
-0.1503749937,
-0.3527109921,
0.1869351566,
-0.1928921044,
-0.0597137138,
0.1786051989,
0.2957511544,
0.2869985998,
-0.4042104781,
0.2542161942,
-0.1248800904
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | @TevenLeScao I have just checked it: this was a bug in `pandas` and it was fixed in version 1.2: https://github.com/pandas-dev/pandas/pull/36898 | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 20 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
@TevenLeScao I have just checked it: this was a bug in `pandas` and it was fixed in version 1.2: https://github.com/pandas-dev/pandas/pull/36898 | [
-0.341271311,
0.1240305901,
-0.0055018961,
0.2580178976,
0.1083405167,
0.0757044256,
0.3035872281,
0.4069498181,
0.0264137462,
-0.041183196,
0.2745398283,
0.0067485608,
0.1387156844,
0.1741788685,
-0.2055493891,
-0.2439862192,
0.2017902285,
-0.0212466754,
0.0084572695,
0.2275888771,
-0.3102153838,
0.2221114784,
-0.1696818918,
-0.1478929669,
-0.4680123329,
-0.3230390549,
0.0654655024,
-0.0415011495,
0.0460147113,
-0.4286079407,
-0.0355173424,
-0.2563438416,
0.4413878918,
0.5364952683,
-0.0001190371,
-0.2155592442,
0.3319275975,
0.0182694569,
-0.2052393258,
0.0686348826,
-0.4720401168,
-0.3954091668,
0.0219649002,
-0.3430719376,
0.4541323185,
-0.1743061543,
-0.3328181803,
-0.4177091718,
0.6475178003,
0.3707947731,
0.1486110836,
-0.0328415297,
0.1063491404,
-0.0371335298,
-0.2036337852,
0.0837967694,
0.0200113654,
0.1159933209,
-0.2379018664,
0.2098365277,
0.2300751358,
-0.0716976225,
-0.1255663037,
-0.2341947258,
-0.1767509878,
-0.0656959414,
-0.0222572275,
-0.2992708981,
0.1961592436,
0.4449343681,
0.2029709816,
-0.1828812361,
-0.2681333423,
-0.4125077426,
0.1113054007,
-0.5898335576,
0.0529377311,
0.4741689861,
0.0347093791,
0.0870471597,
-0.1121773273,
-0.0808054805,
-0.2130057812,
-0.0569748394,
-0.0503386557,
-0.2372409105,
-0.1518814564,
-0.0181153566,
-0.2036603391,
-0.1465213299,
0.0027883612,
-0.2815831304,
-0.4799127579,
0.0245662369,
-0.1968794614,
0.0740087405,
0.1518741697,
-0.5287780166,
0.0522211492,
-0.0778354406,
0.3272015452,
-0.3820249736,
0.1291120052,
0.0760855526,
0.5744825006,
0.2120937705,
0.1829942763,
-0.0716198832,
0.3002837598,
0.0313620232,
0.0964882746,
-0.08939448,
0.0688515007,
-0.2353243083,
0.0683997646,
0.0023821294,
0.0328884721,
-0.0524888597,
-0.0941910371,
0.2288007885,
-0.3604729772,
-0.1577095091,
-0.2764320076,
-0.1858025491,
-0.1272217929,
0.3287421167,
0.130870223,
0.2427658439,
-0.0845067948,
0.0472008288,
-0.0698759928,
-0.0375037044,
-0.005531162,
-0.0535056815,
-0.0542490259,
-0.1753412932,
0.0107757896,
0.2415701598,
-0.086128898,
-0.2899804115,
-0.1535127163,
-0.112754494,
-0.1566496193,
0.2403198183,
0.3214479387,
0.1444984376,
-0.1472987831,
-0.1794866025,
-0.0155877545,
0.1483363658,
-0.4130088985,
-0.0150126219,
-0.3744746745,
0.1352473497,
-0.1423558295,
0.1480704844,
-0.5019353032,
-0.0314695761,
0.0777532682,
0.1964425147,
0.4208013415,
-0.2530837059,
0.6042642593,
-0.284863472,
0.0148760378,
0.2816120684,
-0.7312349081,
0.1030588299,
0.1470304132,
0.0361658856,
0.4897563457,
0.4170343876,
-0.0245814659,
0.3368768692,
-0.1128996611,
0.2621538937,
0.071158804,
0.2094034106,
0.098247461,
0.5672947764,
-0.0708637089,
0.0182834193,
0.0297983997,
-0.300128907,
0.5715807676,
0.1137626767,
0.4756502807,
0.4330531955,
0.0384259224,
0.2293848097,
-0.1646939814,
-0.1979118437,
0.0348156914,
-0.2483369261,
-0.254676789,
0.0026692152,
0.1543459296,
-0.1928167641,
0.2644365728,
-0.2410074472,
0.1251207739,
0.4268116653,
0.1328845769,
0.1417980194,
0.0218668208,
0.2489670813,
-0.3805503547,
-0.1901163757,
-0.1566671282,
-0.1665301472,
-0.1608524173,
-0.0739143491,
0.1734649241,
0.1861052215,
0.0388096124,
0.1554862559,
0.0502700582,
-0.1581522673,
-0.1364506781,
0.2717756629,
-0.0530623719,
0.3020297885,
0.1365136653,
0.0570236258,
-0.2673313916,
0.267239213,
0.2391947508,
-0.1706704646,
0.3222699761,
0.110603258,
0.1830596328,
-0.2960665226,
-0.1514950097,
0.2638210654,
-0.0377146266,
0.0216185376,
-0.1175804138,
0.0669657588,
0.1620995402,
0.194870621,
-0.2273024023,
0.2584479153,
-0.0121853948,
0.0613595694,
-0.140277341,
0.6026521921,
-0.2641135156,
0.2733408511,
-0.0368502289,
0.0274140239,
0.3373426497,
-0.1023815647,
-0.1084208637,
-0.1580343544,
0.2359514832,
0.1434626877,
-0.1225716323,
0.0540064275,
-0.4003921151,
-0.0303650722,
0.5197225809,
0.0007627606,
0.1170565933,
0.184430331,
0.0339209661,
-0.0154380612,
0.0759515539,
0.1254653484,
0.293073684,
0.1264981776,
-0.0394468941,
0.052565515,
0.1151165664,
-0.0862426162,
0.2848723829,
0.1711806059,
0.2693834901,
0.2485689372,
0.1466230154,
0.1977821738,
-0.1394347101,
-0.3373421431,
-0.1755521744,
0.1275864244,
-0.3030415177,
0.3055093884,
-0.1936163604,
-0.1043046936,
-0.3914399147,
-0.4014571905,
-0.2060246766,
-0.2955178916,
-0.241534248,
-0.0955120325,
-0.4658669829,
-0.085312888,
-0.1617813408,
0.0963583738,
0.1571009904,
-0.0004359763,
0.019278504,
0.0009037443,
-0.0431022421,
-0.0549470857,
-0.0049515329,
-0.1238728464,
0.0270976182,
0.1601216644,
0.1456881464,
-0.0970121622,
0.1815307736,
0.0411112122,
-0.0188200995,
-0.083214201,
0.1475450099,
0.2630806863,
-0.0727503151,
-0.5481497645,
-0.0182919148,
0.1664045751,
0.0384018272,
0.1412494928,
-0.1206463352,
-0.1862712353,
-0.0932751074,
-0.0603480116,
0.0194406305,
-0.3349897265,
0.4810388684,
-0.1055284292,
0.0269013345,
-0.0864218026,
0.1476099193,
-0.0642028004,
0.0781241208,
-0.2673321962,
0.1539456099,
-0.4169500172,
0.0305449795,
-0.2566615045,
-0.2721677721,
0.1277551353,
0.0963205546,
0.0096770171,
-0.0782588571,
-0.3716353774,
0.5211659074,
-0.1465876848,
0.3120243251,
-0.1196962669,
0.1910607964,
0.0726432651,
-0.0763164908,
-0.0702414289,
0.0268291533,
0.1516520679,
0.1500847936,
0.0634178519,
0.4252821803,
-0.0681785941,
0.7963743806,
-0.2070921361,
-0.2428022176,
0.7851776481,
0.179844588,
0.2147372365,
0.1114978343,
0.1771983653,
-0.1324885786,
-0.0516301319,
0.0562986843,
-0.1535123289,
-0.0847820714,
0.1383903027,
-0.0334203877,
-0.0991481468,
0.0346304104,
-0.0383115001,
-0.3957052231,
-0.3372080326,
0.1653226465,
-0.1299584806,
0.278585434,
-0.2796359658,
-0.0569241159,
-0.0546337441,
0.1119031608,
-0.2268248647,
-0.0253558047,
0.2500808239,
0.0908863097,
-0.4192571044,
-0.4416008294,
-0.5331686735,
0.1681438535,
0.0267067142,
0.6945684552,
0.1523018777,
0.1240498498,
-0.0636751056,
-0.0554271378,
0.6983476877,
0.0264318716,
-0.292491734,
0.1699610353,
0.2758516073,
-0.2267137915,
-0.0662789494,
0.1623209268,
0.1873942316,
0.7814654112,
-0.0040753335,
-0.285783112,
-0.0204495024,
0.2629455328,
0.2712850273,
-0.1538703889,
-0.252933383,
-0.1603032053,
-0.1997379363,
-0.0814148411,
-0.1784593761,
0.1562791914,
0.4531795681,
-0.2090241909,
-0.1592235863,
-0.007168673,
-0.4004325867,
0.0399246439,
0.0399925262,
0.1950913221,
-0.010804873,
0.1504080445,
-0.1228338927,
0.2694625258,
0.4711753428,
0.2290256023,
0.0092925355,
-0.3669424951,
-0.070977509,
-0.3196598291,
0.3802236021,
-0.0930658728,
-0.2809782922,
0.085449487,
-0.1541885287,
0.3633082807,
0.1215594709,
-0.2874756753,
0.3155451715,
0.1552752554,
-0.8324906826,
0.0266840607,
0.3657887876,
0.1117780134,
0.25711447,
0.1980549991,
-0.2689128816,
-0.3762990236,
0.1702101827,
-0.2446853518,
0.4795739055,
0.3824549913,
0.1580192,
0.1130344942,
-0.4080255032,
0.676199615,
0.0891284049,
0.0456147902,
-0.1887372136,
0.3455244005,
0.0942927822,
-0.1524704397,
0.1718706638,
0.0052319621,
-0.0884761736,
0.0735981166,
-0.5113878846,
-0.244937405,
-0.1931395531,
0.0475889221,
0.2021458298,
-0.2321410924,
-0.6011219025,
-0.0003101081,
-0.0318103507,
-0.2616800368,
-0.0451882035,
-0.1800917089,
0.0536062196,
-0.0957734212,
-0.3610688448,
0.083534047,
0.147834301,
0.1861359477,
0.3207153976,
-0.1669661403,
0.1520549357,
-0.1513991207,
0.3327765763,
0.1178428456,
0.0078482646,
-0.0754910111,
-0.0993498117,
-0.0884820819,
0.0514728241,
0.0506726578,
0.2107185572,
0.0061883554,
-0.0954471603,
0.2538424134,
0.0702207014,
-0.1800710857,
-0.0787265599,
0.2651980519,
-0.344417572,
-0.3410689235,
-0.157745406,
0.0235498436,
0.2334506065,
-0.1699759811,
0.0516469739,
0.2095891684,
0.0149965398,
0.3483527303,
-0.3776893616,
-0.1721510887,
-0.3480564654,
0.1002500951,
0.0455053747,
-0.1881160736,
0.2446303219,
0.4835462272,
-0.2497793138,
-0.0274277143,
0.4238176942,
0.3446509838,
-0.42655316,
0.5984867215,
-0.1005208045,
0.2218949795,
-0.1415479034,
0.4189108312,
0.0658271834,
0.0264703389,
0.1126519442,
-0.3906415403,
-0.2438433319,
-0.0110299289,
0.1985441297,
0.0316890925,
0.0800385475,
0.5649983287,
0.0825438648,
-0.1961649805,
-0.1431964785,
-0.0040080622,
-0.2632649541,
0.0200010613,
-0.0976490378,
0.0054124091,
0.0304386094,
-0.0590461828,
0.0467738174,
0.1368298531,
0.0306496061,
-0.1308159083,
-0.4030763209,
0.1121965125,
0.1812615544,
-0.213150084,
0.1576088816,
-0.0253618509,
-0.2624440491,
-0.0120827537,
0.1790465713,
0.0902932733,
-0.101690039,
-0.0464466438,
0.1531554163,
-0.1598234475,
-0.0562742129,
0.1164113581,
0.2109646499,
0.5365227461,
0.0306343026,
0.3913276792,
-0.0880651623,
-0.0555298775,
-0.4043056369,
-0.0179544203,
-0.2343649566,
0.2840468585,
0.1519259363,
-0.6966727376,
-0.1060282513,
0.3511354625,
0.1717193425,
0.284722805,
-0.259978354,
0.1179754734,
0.0656609386,
0.1584096998,
-0.057225503,
-0.1518690288,
-0.0016454682,
0.1128947958,
-0.1379242241,
0.0401754268,
-0.0058042929,
-0.4350818098,
-0.1529609114,
-0.0542752855,
0.3313522339,
0.1398854554,
0.2754511237,
0.3992129266,
0.1721582413,
0.1769744605,
-0.0564030185,
0.2889546752,
0.1773956418,
0.0684146285,
0.2014057934,
-0.1621274054,
0.471750468,
-0.0953747183,
-0.2096824944,
-0.4819865227,
-0.0746588185,
0.0079447106,
-0.2684752047,
0.2657919228,
0.1635710299,
0.1167764589,
-0.2271027714,
-0.0101144612,
-0.0770573169,
0.1764440536,
-0.1731635332,
0.0039133169,
-0.1582722664,
0.0181202143,
0.2310755849,
0.1033619642,
0.0914601609,
0.1970945299,
-0.2558514774,
0.1926352978,
-0.0159909502,
-0.3948795199,
0.1356339455,
-0.1107457429,
0.2268873155,
-0.2725753784,
-0.0000761654,
0.1675510257,
-0.0984948277,
-0.1251691282,
0.1620347053,
0.5886418223,
0.2581673861,
0.2816857398,
-0.1151438281,
-0.1393073946,
0.0920640975,
0.1447828561,
0.1526226103,
0.2300887704,
-0.0126196295,
0.1981307864,
0.0573749021,
-0.0856675059,
0.3561894894,
0.1813799143,
0.1266651303,
-0.0304747317,
0.2105373144,
-0.1760416329,
-0.1970002055,
-0.4345937371,
-0.1564475149,
-0.2098416388,
-0.0391119048,
0.3237748146,
-0.1878924519,
-0.1111786589,
-0.1099401787,
0.0362065099,
-0.2735573649,
0.3935522735,
0.3105425239,
0.3471532464,
-0.0577560589,
-0.1337614208,
0.0504732728,
-0.0989683419,
-0.3138723075,
0.3750600219,
0.3629866838,
0.2740957141,
-0.3101058602,
-0.0636711344,
0.2408324182,
0.6288331747,
-0.4764030278,
-0.0152288955,
-0.3945144415,
0.0170965586,
0.2993405759,
0.073330529,
-0.1631339192,
-0.1150183529,
0.4784138203,
-0.091317825,
-0.0644215271,
-0.1011607498,
0.1213781983,
-0.0869345367,
0.1177811176,
-0.0237041786,
0.427400589,
0.004520487,
-0.041650828,
-0.1996573508,
-0.3047761619,
-0.1673978865,
0.0448245443,
0.2976604104,
0.2640579343,
0.5109521151,
-0.1467372179,
-0.1196800172,
-0.2036105096,
0.2333160639,
0.0009662062,
-0.3993261158,
-0.1593141109,
0.0673377886,
-0.1250604689,
0.0530024357,
0.2979463637,
0.2603332102,
-0.1092881039,
0.2785043418,
0.0814721435,
-0.2846654654,
0.0990651846,
-0.473443687,
-0.3631595969,
-0.0700144917,
0.2307449579,
0.2449285388,
-0.0357334353,
-0.0005883425,
0.1598484665,
0.3397051692,
-0.1527701616,
-0.3735354543,
0.1693942845,
-0.2099453509,
-0.0370307639,
0.1827780753,
0.247698009,
0.3111517727,
-0.368702352,
0.2597649097,
-0.1153500378
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | Sorry, I was also talking to teven offline so I already had the PR ready before noticing x) | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 18 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
Sorry, I was also talking to teven offline so I already had the PR ready before noticing x) | [
-0.3764410019,
0.0621023476,
-0.0249255374,
0.2861754,
0.0446193479,
0.0809500366,
0.1558458805,
0.3971739113,
0.0510588959,
-0.0476372764,
0.3336999416,
0.0041156933,
0.0834178925,
0.1582752466,
-0.1321930289,
-0.1995779872,
0.1929604113,
-0.0722633973,
0.0871966779,
0.2302480191,
-0.2315649986,
0.2663526833,
-0.1839068681,
-0.203163147,
-0.4015370905,
-0.2735065818,
0.1577019542,
-0.0050985469,
0.043691881,
-0.4615626037,
-0.0991505757,
-0.2882112861,
0.4996249974,
0.4922950864,
-0.0001196299,
-0.1714508533,
0.2876416445,
-0.0389572829,
-0.2002032399,
0.0875427872,
-0.4354243875,
-0.3970064223,
-0.0468422882,
-0.3596847057,
0.3823304474,
-0.1017138511,
-0.3481948376,
-0.4584699869,
0.6558186412,
0.4028024971,
0.1424899697,
0.0162797198,
0.1383094937,
0.017078571,
-0.07578969,
0.0695119053,
-0.0042965487,
0.1023577005,
-0.1442516446,
0.3273941875,
0.2477683723,
-0.0633082688,
-0.1642432064,
-0.2750754654,
-0.1225754023,
-0.086519435,
-0.0925149024,
-0.2516681552,
0.1980661005,
0.3637439609,
0.1841873527,
-0.2028265297,
-0.145775795,
-0.3202912211,
0.071385026,
-0.6242571473,
0.0502860695,
0.5177455544,
-0.0037658215,
0.1118399128,
-0.2235127985,
-0.0908084512,
-0.2312036753,
-0.0297229551,
0.0023632497,
-0.2277643383,
-0.1178189665,
0.0040287226,
-0.1674535722,
-0.0984254479,
-0.1111667901,
-0.2227241248,
-0.5720720291,
-0.0140361115,
-0.1784094274,
0.0443735123,
0.136865586,
-0.4408859015,
0.1079220995,
-0.0460405126,
0.3337439001,
-0.385314256,
0.2083595842,
0.0500750653,
0.5481049418,
0.1906705499,
0.28014642,
-0.1100365967,
0.259835422,
-0.021327842,
0.0885009915,
-0.0792430937,
0.0471382402,
-0.2001504004,
0.0954318494,
0.0385468677,
-0.0271398276,
-0.0987015143,
-0.0599272512,
0.2017267048,
-0.407875061,
-0.151807487,
-0.2807912827,
-0.1851530671,
-0.0983671248,
0.2293490916,
0.1623688638,
0.2720748782,
-0.1685679555,
-0.108585909,
-0.0424003303,
-0.0828756243,
-0.0747888237,
-0.0433045514,
-0.0337314159,
-0.1575299501,
-0.0203638859,
0.2245581597,
-0.0742417723,
-0.2805363536,
-0.1095873713,
-0.0356902927,
-0.1673445106,
0.179668352,
0.2852640152,
0.1275251657,
-0.1639614254,
-0.2139399946,
-0.0154007599,
0.1968716085,
-0.4836390316,
-0.0749539733,
-0.3604169488,
0.1418752223,
-0.1785313785,
0.11251463,
-0.48274827,
-0.0880969018,
0.1005533487,
0.1740033031,
0.3533984423,
-0.2788316011,
0.6303642392,
-0.2761409581,
0.0279026851,
0.2305349708,
-0.7488188148,
0.0958138481,
0.1825980246,
0.0159452446,
0.449608326,
0.3953610659,
-0.0237350836,
0.3770442009,
-0.0881660283,
0.2835770249,
0.1006708443,
0.1974981278,
0.117177695,
0.4938794971,
-0.0722177923,
-0.0063221902,
0.0184166916,
-0.299261272,
0.6212949753,
0.1084750593,
0.5063622594,
0.4043259323,
0.0377523527,
0.2353621125,
-0.2143670917,
-0.1688395441,
-0.055902645,
-0.1844297498,
-0.3852593005,
-0.0556434318,
0.1588096321,
-0.174625501,
0.2962258458,
-0.24518767,
0.1185822487,
0.4660311341,
0.0828760415,
0.1488809139,
0.0076209269,
0.3006694317,
-0.4398678243,
-0.1985076666,
-0.0882368088,
-0.1634426713,
-0.126803726,
-0.0337223411,
0.1973336935,
0.2187895775,
-0.0381890833,
0.1392458826,
0.0512020253,
-0.1272215843,
-0.1436673999,
0.1798046082,
-0.006184876,
0.2388721406,
0.1822490841,
0.0251254365,
-0.3140969276,
0.2853171229,
0.2368263155,
-0.2068867534,
0.1841397434,
0.122063674,
0.167508021,
-0.3401519656,
-0.155544132,
0.2237613797,
0.0257928781,
-0.0869446918,
-0.1305888146,
0.1246154159,
0.1281080544,
0.0885502249,
-0.1277748495,
0.2919146121,
-0.0615547262,
0.0573415831,
-0.1319106966,
0.551309824,
-0.2694430947,
0.3201514482,
-0.0676283687,
-0.0254174583,
0.2279527485,
-0.1107779667,
-0.0442407988,
-0.1289411634,
0.2877565026,
0.151295647,
-0.1880396008,
-0.0283115543,
-0.3569779396,
0.0031251311,
0.5259001255,
0.0223967806,
0.0300823152,
0.1846692264,
-0.0212224163,
0.0098988861,
0.0738687366,
0.0619091094,
0.2687599063,
0.1387556344,
-0.0613799058,
0.0710845143,
0.2284824401,
-0.0677136332,
0.2718981504,
0.1209924072,
0.2285158485,
0.3146277964,
0.1939517409,
0.1624785513,
-0.1181254089,
-0.4355784059,
-0.2385642827,
0.1119900569,
-0.3184940815,
0.2901816666,
-0.1427605748,
-0.0482052974,
-0.4705458283,
-0.367821306,
-0.2575355768,
-0.3024018109,
-0.1673859805,
-0.0986448973,
-0.4747140706,
-0.140602842,
-0.1137057468,
0.0823615268,
0.0937035531,
-0.1105913445,
0.0388369039,
-0.0006970279,
-0.1376157403,
-0.0897182673,
0.0183231048,
-0.1932260245,
0.1084224507,
0.0978775173,
0.1040240973,
-0.1154597774,
0.123994872,
0.1251720041,
-0.0150253922,
-0.0435006097,
0.1202461421,
0.2838807404,
-0.0367316641,
-0.5128856897,
0.0337206088,
0.1928915381,
0.033315964,
0.1826903224,
-0.0985660255,
-0.1741505265,
-0.0930802822,
-0.1191132665,
-0.0344736353,
-0.3550936878,
0.4420226812,
-0.0710538924,
0.0302069336,
-0.0339095779,
0.1259302795,
-0.1103537828,
0.0671881065,
-0.2847225666,
0.23164621,
-0.4047393203,
-0.0109361745,
-0.2776231766,
-0.222185269,
0.1345078498,
0.1779782623,
-0.0056697521,
0.0136064552,
-0.3946298659,
0.6360442638,
-0.0991961807,
0.4422526658,
-0.1970857829,
0.1547566503,
0.1013635844,
-0.050504338,
-0.0257119574,
-0.0238361657,
0.1536918879,
0.1530252695,
0.0260204487,
0.4894848466,
-0.071928516,
0.6651268601,
-0.2164901942,
-0.1908439994,
0.765354991,
0.1234661192,
0.2171910107,
0.1095760986,
0.0839434713,
-0.1581352651,
0.015622206,
0.0867916048,
-0.1268136501,
-0.1643208265,
0.1484075338,
0.0400950462,
-0.1123043299,
0.0120479614,
0.0154591799,
-0.4064568579,
-0.3510843813,
0.2497029752,
-0.0109538455,
0.2938518524,
-0.3571611047,
-0.0692216307,
-0.0584153943,
0.0109493621,
-0.2322797924,
-0.017288316,
0.2271164656,
0.1395559907,
-0.5072894692,
-0.4268558025,
-0.4834099114,
0.2316380739,
0.010130126,
0.5988480449,
0.1351303309,
0.0753420293,
-0.0829709619,
-0.0961533263,
0.6169040203,
-0.0279186014,
-0.1888394207,
0.2580968142,
0.3820473552,
-0.1696610898,
-0.1103733703,
0.1042632759,
0.1699739993,
0.8767217398,
0.0393477902,
-0.30581218,
-0.0314472839,
0.2559390068,
0.3879095912,
-0.1291908026,
-0.2496610433,
-0.1338587701,
-0.1862450987,
-0.0875427648,
-0.2614000142,
0.1268764436,
0.4449921548,
-0.1607405841,
-0.1525977552,
0.0704751834,
-0.3098807633,
-0.0101514198,
0.0039962977,
0.2558421791,
-0.1063281,
0.1659553498,
-0.120341301,
0.3574883938,
0.4377619624,
0.1959056854,
0.06533546,
-0.3315351009,
-0.0828119218,
-0.2703198791,
0.4001965225,
-0.1436282098,
-0.2139935941,
0.063736856,
-0.1926662028,
0.4227812886,
0.1368253231,
-0.2731592059,
0.2954879701,
0.0849186108,
-0.8648975492,
0.0916431472,
0.3287992179,
0.0798566639,
0.2831909657,
0.1733737737,
-0.3656851053,
-0.3700636625,
0.2008539885,
-0.1924825609,
0.5724707246,
0.4445641935,
0.1451866925,
0.0728923231,
-0.3968036175,
0.6061345935,
-0.138077572,
0.0499900505,
-0.1944586039,
0.4044935405,
0.1480767727,
-0.1363780946,
0.1013562977,
0.0813191757,
-0.1146968305,
0.0374638438,
-0.5104407072,
-0.2355324477,
-0.2661845088,
0.0068017244,
0.2548334897,
-0.2045746744,
-0.4993149638,
0.0002575889,
-0.0960660651,
-0.2361403108,
-0.0767508969,
-0.2121944427,
0.0923319384,
-0.1266332418,
-0.3447327018,
0.1222202927,
0.0673819706,
0.1341663301,
0.3516375124,
-0.1614587456,
0.1418850124,
-0.1786927432,
0.2616021037,
0.1652996391,
0.0301987324,
-0.0494893342,
-0.0438413024,
-0.0911646485,
0.1017382443,
0.0304715708,
0.0966755226,
-0.06684912,
-0.128318578,
0.1746307611,
0.0405157432,
-0.2131315768,
-0.1321573257,
0.2128764689,
-0.2299480736,
-0.3254309893,
-0.0812900439,
0.1551058888,
0.2293552607,
-0.1209978461,
0.043292623,
0.1576851159,
0.0012240149,
0.3172682226,
-0.369515121,
-0.1802066267,
-0.3000697196,
0.0828469545,
0.0605167598,
-0.3104259074,
0.2204137743,
0.5383704305,
-0.1888043135,
-0.0755429938,
0.4676376581,
0.2899442911,
-0.5295377374,
0.5389207006,
-0.0684273392,
0.2785634398,
-0.1015069932,
0.5041587949,
0.0523466393,
0.0035970826,
0.1955276877,
-0.3853608668,
-0.1970254779,
0.0192922466,
0.2155110389,
0.0335062593,
0.0403317511,
0.5567018986,
0.0400166735,
-0.1997790635,
-0.1487130523,
-0.0358410738,
-0.15304178,
0.0441132672,
-0.0679203719,
0.0058576311,
0.0446635522,
-0.0326013863,
0.0643294305,
0.1154641658,
-0.0202102624,
-0.1217160523,
-0.3338361382,
0.1359890103,
0.1383673996,
-0.2122684717,
0.1569171995,
-0.0265432745,
-0.2173286229,
-0.0107316021,
0.2423768193,
0.0046660304,
-0.0858201981,
-0.0795544758,
0.1157710254,
-0.0999295712,
-0.0826604068,
0.1023369133,
0.3121546507,
0.6382738352,
-0.0223687738,
0.4231962264,
-0.0875719786,
-0.1236259118,
-0.4861340225,
0.0350302234,
-0.1686681956,
0.3962354362,
0.0872167051,
-0.7172759175,
-0.0945849717,
0.2883250415,
0.1118498668,
0.3069838881,
-0.2442878336,
0.0710043535,
0.0554243922,
0.1902158558,
0.0319103599,
-0.1302333325,
0.0334515721,
0.1064766049,
-0.2001508176,
0.030841019,
-0.0713485032,
-0.3821999431,
-0.1464615464,
-0.1012205929,
0.3103379011,
0.1554691195,
0.2649973333,
0.3487344384,
0.1282586902,
0.1409234703,
-0.1922418624,
0.1946357936,
0.1932113767,
0.045002494,
0.1877512336,
-0.1048114747,
0.6095269322,
-0.1501399428,
-0.1892778277,
-0.5214873552,
-0.112322934,
0.0434062108,
-0.1085387766,
0.2948248386,
0.1533849686,
0.1485001296,
-0.1096452177,
-0.1047789752,
-0.1312396377,
0.1712989211,
-0.1323462576,
0.0783268064,
-0.2375474423,
-0.031154111,
0.1510170102,
0.125593856,
0.047065828,
0.2665864527,
-0.2235801369,
0.2642551959,
-0.0198158324,
-0.4577939212,
0.146653831,
-0.1241182387,
0.1841652095,
-0.272195518,
0.1180653647,
0.2160521746,
-0.0673266724,
-0.1253815591,
0.0946727246,
0.5830350518,
0.2718701959,
0.2764336467,
-0.1151663885,
-0.2004845738,
0.1104088873,
0.0924617425,
0.1398357153,
0.2113535106,
-0.0534770638,
0.2168442756,
0.0385825932,
-0.0623800009,
0.3692180514,
0.1508295536,
0.0476594158,
0.0692038536,
0.1251080185,
-0.0931203514,
-0.220943898,
-0.4400242865,
-0.2172724307,
-0.2373040915,
-0.0207322184,
0.3701363206,
-0.0824689418,
-0.1008038372,
-0.0718299672,
0.0317696854,
-0.2750129104,
0.4035340548,
0.2331795245,
0.361777693,
-0.1201839149,
-0.1971980631,
0.1496267468,
-0.0485248044,
-0.3061575294,
0.3782444894,
0.3052503169,
0.254586041,
-0.2659118474,
0.0281369127,
0.2452306747,
0.6335808635,
-0.4491251707,
0.0829715729,
-0.4112228155,
0.0556147322,
0.4788251221,
0.0878126398,
-0.1390583515,
-0.1592510492,
0.4242454767,
-0.0451972671,
-0.065967828,
-0.1633171439,
0.1127591729,
-0.0138573572,
0.0729883164,
0.0500523709,
0.3976199627,
0.0954836458,
-0.04865117,
-0.2607994676,
-0.2927938402,
-0.2146589905,
0.0567150004,
0.2732061744,
0.31866768,
0.5101505518,
-0.1051620394,
0.0070794327,
-0.2610444427,
0.1790614575,
-0.0048988536,
-0.352893889,
-0.1002614498,
-0.0099239275,
-0.1000589728,
0.0584656745,
0.2610976994,
0.240387544,
-0.0881790817,
0.2841230333,
-0.0016544461,
-0.2450391948,
0.1022860855,
-0.4079574049,
-0.3293612003,
-0.0242528673,
0.3105502129,
0.1907436848,
-0.0387672707,
-0.0404481813,
0.1713292599,
0.3940404356,
-0.135338217,
-0.3708797693,
0.2906872332,
-0.115711078,
-0.122192964,
0.2361462116,
0.3582156599,
0.3031454086,
-0.4336030483,
0.2544979453,
-0.0895152688
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | I was also already working in my PR... Nevermind. Next time we should pay attention if there is somebody (self-)assigned to an issue and if he/she is still working on it before overtaking it... 😄 | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 35 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
I was also already working in my PR... Nevermind. Next time we should pay attention if there is somebody (self-)assigned to an issue and if he/she is still working on it before overtaking it... 😄 | [
-0.3961873651,
0.1412504613,
-0.0447769985,
0.2652051449,
0.0552899875,
0.0680767596,
0.1558928192,
0.3812040389,
-0.0110886246,
-0.0350052938,
0.3722910583,
0.0118637718,
0.0816398039,
0.1777884513,
-0.1461669207,
-0.1732498109,
0.1780273765,
-0.0427162722,
0.0344860628,
0.2413802743,
-0.236317113,
0.2680279016,
-0.1862005591,
-0.1968690455,
-0.4044492841,
-0.2788296044,
0.1452199817,
-0.0217894465,
-0.0256085545,
-0.4830839038,
-0.0936043859,
-0.2329350412,
0.4571807384,
0.4846558571,
-0.0001165353,
-0.1735851169,
0.3210088909,
0.0024081171,
-0.235312447,
0.0530452803,
-0.4531084001,
-0.3837756217,
-0.0385644324,
-0.3636561036,
0.4063391089,
-0.1223695874,
-0.3413084745,
-0.4172589481,
0.663090229,
0.4112569392,
0.1693600416,
-0.0337705873,
0.1536697894,
-0.0172524415,
-0.0696141124,
0.1026430577,
0.0065903366,
0.093883574,
-0.1790847778,
0.2880727947,
0.2553640604,
-0.0584251136,
-0.142484352,
-0.309188664,
-0.1423951387,
-0.1177989841,
-0.0604584292,
-0.2552991807,
0.199863255,
0.3594555557,
0.1978216469,
-0.225909248,
-0.1474906802,
-0.3116995692,
0.1133380905,
-0.6214419603,
0.0487787575,
0.5457023978,
-0.0193282738,
0.1305300593,
-0.2266014814,
-0.1034050584,
-0.2398210466,
-0.0559338816,
0.0324961245,
-0.21104303,
-0.1272571087,
-0.0004991014,
-0.152813524,
-0.1180547252,
-0.0579755828,
-0.2560565472,
-0.5472078323,
-0.0116198789,
-0.1763406694,
0.0649496019,
0.1567474008,
-0.4249261022,
0.1423414648,
-0.0389585346,
0.3401733637,
-0.3556587696,
0.2603926361,
0.0585183054,
0.5224484801,
0.1673793793,
0.2801503837,
-0.0627352148,
0.2633458376,
0.0293104015,
0.0720380694,
-0.079978317,
0.0121569522,
-0.2061020285,
0.0648716688,
0.0841450244,
-0.0219788626,
-0.0744553357,
-0.0336105488,
0.207349211,
-0.3438679278,
-0.179113239,
-0.2502125204,
-0.1604059339,
-0.0843879282,
0.2370718718,
0.1838044226,
0.2299663872,
-0.1399746835,
-0.0561748035,
-0.0527574494,
-0.0764696598,
-0.0975604728,
-0.0274424553,
-0.0434099436,
-0.1516244113,
-0.0221040882,
0.2452820987,
-0.0967636406,
-0.2866635919,
-0.1144349873,
-0.055788774,
-0.1505908966,
0.1774310023,
0.2737613618,
0.0941288397,
-0.1824356318,
-0.1792261004,
-0.0290985927,
0.1685350388,
-0.4769120812,
-0.0423703566,
-0.3549824357,
0.1847226322,
-0.1505173892,
0.1518643647,
-0.498549372,
-0.0430407189,
0.0819737315,
0.1303448081,
0.3610824645,
-0.2751138806,
0.6181918383,
-0.2749444544,
0.0540612862,
0.2397005856,
-0.7175137997,
0.08108446,
0.1316867918,
-0.0445573851,
0.4499323666,
0.3594822288,
-0.0470603332,
0.3819954097,
-0.1250739694,
0.2862241566,
0.1025876999,
0.213668108,
0.0858993754,
0.4878996611,
-0.0910151154,
-0.0233896673,
0.0445554852,
-0.3476257622,
0.6521733403,
0.1151159331,
0.5111977458,
0.393697679,
0.0430698097,
0.2332154512,
-0.20628196,
-0.1988589466,
-0.0399719402,
-0.1981980503,
-0.3763436675,
-0.0651777387,
0.1363246739,
-0.2017883956,
0.3150212467,
-0.2656433284,
0.111289151,
0.4608141184,
0.1455950141,
0.124272421,
0.0168556795,
0.2683563828,
-0.4331433177,
-0.1937400401,
-0.1475526541,
-0.1563939452,
-0.1399597228,
-0.060787268,
0.18789424,
0.2176562548,
-0.0309703052,
0.1624683738,
0.0908313096,
-0.1438447535,
-0.1194212437,
0.2200557292,
-0.0303871855,
0.2314019203,
0.1400977075,
0.0296045095,
-0.278229177,
0.2797175646,
0.1940131187,
-0.206618607,
0.2257089764,
0.1197512075,
0.1610756516,
-0.3396232128,
-0.145009011,
0.2079987079,
-0.0224904176,
-0.0433608405,
-0.1313812584,
0.1153149456,
0.1300598532,
0.0743058994,
-0.1831322312,
0.265992105,
-0.0412704907,
0.079085879,
-0.1302528977,
0.5811470747,
-0.2238219082,
0.3129169941,
-0.033744514,
-0.0359511152,
0.2417224348,
-0.1326750219,
-0.0523959361,
-0.143210277,
0.2920070291,
0.1506682336,
-0.1095959693,
-0.0038497886,
-0.2997741401,
0.0130576305,
0.5700364709,
-0.0009292662,
0.0543816797,
0.2003083527,
-0.0104245022,
-0.0128899515,
0.0481964052,
0.0733976886,
0.2701422572,
0.1434920728,
-0.0610883869,
0.0817699954,
0.2391862273,
-0.0793037787,
0.2866186202,
0.1085491925,
0.2617504001,
0.3045496941,
0.1869597584,
0.1485619098,
-0.1427886784,
-0.3971891403,
-0.1929118335,
0.0980409607,
-0.2990089357,
0.2812851667,
-0.1797006726,
-0.0317721069,
-0.4606838524,
-0.3426710963,
-0.2431137562,
-0.2658651173,
-0.1617095917,
-0.1251090169,
-0.4919678569,
-0.110369131,
-0.1233099848,
0.1165725365,
0.0983995125,
-0.0651702285,
0.0480171144,
-0.0258519612,
-0.0790171176,
-0.062612541,
0.0483231843,
-0.1822839975,
0.08695364,
0.1118428856,
0.1157571003,
-0.1118567735,
0.125967592,
0.1281927824,
0.013544159,
-0.0798395202,
0.1168404371,
0.2671393752,
0.0046182722,
-0.544141829,
0.0093047135,
0.1585276127,
-0.000653632,
0.1666563451,
-0.1094907969,
-0.1939058453,
-0.1040722802,
-0.1158942431,
-0.049713023,
-0.3589125574,
0.429766506,
-0.1107402444,
0.0624388456,
-0.0566828847,
0.1418195665,
-0.0834655613,
0.0264391266,
-0.2701608241,
0.2086097747,
-0.3947092891,
-0.0383480601,
-0.2872617245,
-0.2344915271,
0.1153706014,
0.1351061463,
-0.0412319079,
-0.0148709565,
-0.3945080042,
0.5985488892,
-0.0911801234,
0.4072627425,
-0.1543259919,
0.1598563194,
0.108213529,
-0.0609387048,
-0.0605883375,
-0.0171034038,
0.1243248433,
0.1429905593,
0.0405625515,
0.45375368,
-0.0769097954,
0.6510972381,
-0.2171835303,
-0.1933769584,
0.7931036353,
0.1460743248,
0.2074934244,
0.1000397205,
0.0890259519,
-0.1275721341,
-0.0149201006,
0.1259263009,
-0.1118102297,
-0.1663993597,
0.1738020629,
0.0149769895,
-0.1547592878,
0.0323640481,
-0.0189312175,
-0.4336747229,
-0.3735411465,
0.2495990396,
0.0172789916,
0.314997077,
-0.3155668974,
-0.0837373659,
-0.0497691855,
0.0810694844,
-0.2002608776,
-0.0312318467,
0.2059075236,
0.1080905497,
-0.5688770413,
-0.4343659878,
-0.4829704463,
0.2001949251,
0.0003757887,
0.5802278519,
0.1253153086,
0.1026380807,
-0.0884910077,
-0.1208555773,
0.6239224076,
0.0179615002,
-0.2077334076,
0.2325397134,
0.3804987669,
-0.1194760799,
-0.1136855558,
0.1311789155,
0.2040762305,
0.8154344559,
0.0144143747,
-0.336288929,
-0.0315197632,
0.2510596812,
0.3690198064,
-0.1367793977,
-0.2473214269,
-0.1221586764,
-0.2105505615,
-0.1063997149,
-0.2394165695,
0.1065254733,
0.4578875303,
-0.184573561,
-0.1501580775,
0.0830232799,
-0.3093687296,
-0.023828201,
-0.0061984546,
0.2689369023,
-0.1025288403,
0.1319542527,
-0.106750153,
0.3046078384,
0.4929366708,
0.2555458844,
0.0591751896,
-0.3818763793,
-0.0648601651,
-0.2778082788,
0.3906010985,
-0.0863913298,
-0.2303909957,
0.0898374915,
-0.1147760153,
0.431096822,
0.1055246145,
-0.3060206175,
0.2839092612,
0.0938791931,
-0.8680294156,
0.0672666058,
0.3517989516,
0.0851371437,
0.2663377821,
0.1425238103,
-0.2993607819,
-0.3890746832,
0.2268267274,
-0.2212848514,
0.5617579222,
0.4622304142,
0.1309821606,
0.0501695499,
-0.3823642731,
0.6059623957,
-0.0751364604,
0.049606286,
-0.1981854439,
0.4180104434,
0.1599106491,
-0.1468543261,
0.1330642253,
0.0571739264,
-0.1249787137,
0.0460068099,
-0.5140422583,
-0.268851459,
-0.2236864567,
0.0458565056,
0.2291855812,
-0.195632562,
-0.4780572057,
0.0274466425,
-0.0778484344,
-0.2507960796,
-0.0765792727,
-0.221252203,
0.0822524875,
-0.1366337985,
-0.3644067049,
0.135405302,
0.0133269988,
0.1475525349,
0.3296109736,
-0.1759185493,
0.1654906422,
-0.216759935,
0.2632960975,
0.1756986678,
0.0403590277,
-0.0355152041,
-0.0498481356,
-0.091055125,
0.0518338084,
0.0180135928,
0.139724791,
-0.0720629171,
-0.1476309597,
0.1676952243,
0.0531063825,
-0.1870750785,
-0.0945008546,
0.2120666802,
-0.2272659093,
-0.3123399019,
-0.1369524151,
0.138425231,
0.2350003719,
-0.1234996021,
0.0652359948,
0.1545719802,
-0.0345680118,
0.3239793181,
-0.326908648,
-0.1750404984,
-0.3134273887,
0.0673527867,
0.0197506435,
-0.283639431,
0.2368382663,
0.5338140726,
-0.1851440072,
-0.0918224975,
0.454033792,
0.3182338178,
-0.5063893795,
0.5193540454,
-0.0397058949,
0.2553127706,
-0.0921566263,
0.4893005788,
0.0531963743,
0.0110748652,
0.1609015018,
-0.3807057738,
-0.1938462555,
0.0168896727,
0.1840257943,
-0.0162062179,
0.0661961138,
0.5399187803,
0.0404981896,
-0.195321545,
-0.1874677837,
-0.0092313774,
-0.1997165382,
0.0325761624,
-0.0907297432,
-0.0542651378,
0.0203118995,
-0.0453841239,
0.0894769579,
0.1245509386,
-0.0444694869,
-0.158092171,
-0.3493084311,
0.1171223223,
0.1262571514,
-0.2073095441,
0.141467467,
-0.0291933306,
-0.2103939652,
0.0005527325,
0.2124819756,
-0.0117090866,
-0.076383844,
-0.0766828805,
0.0884387419,
-0.1290400326,
-0.0834908187,
0.1204847693,
0.2823752463,
0.6134369373,
-0.0171170682,
0.4254069328,
-0.1109528765,
-0.0925213918,
-0.4530904889,
0.0277667735,
-0.1683809608,
0.3954146504,
0.1107919514,
-0.7080250382,
-0.0672921687,
0.3276772797,
0.1321101338,
0.2972353399,
-0.2673637569,
0.1047084555,
0.0698430091,
0.2139058262,
0.0089484975,
-0.1369236112,
0.0516108088,
0.0806514174,
-0.1645414978,
0.0097808242,
-0.0316821784,
-0.3678218722,
-0.1688465178,
-0.0747518018,
0.3498601317,
0.1809720099,
0.2724541128,
0.2772693634,
0.1594462395,
0.1348488331,
-0.1623572707,
0.2629077733,
0.201290831,
0.0330719836,
0.1631922573,
-0.127763927,
0.5978218317,
-0.1219806224,
-0.1643752158,
-0.519751668,
-0.0607055724,
0.0547770485,
-0.1363773197,
0.2861793637,
0.1311555803,
0.1412819326,
-0.1452393234,
-0.0822572112,
-0.1150155142,
0.1540480852,
-0.1161715686,
0.0658311099,
-0.2405931056,
-0.0113795772,
0.1586650163,
0.1075957865,
0.0564217195,
0.2367660105,
-0.2280268669,
0.2521003187,
-0.0296713933,
-0.4436666965,
0.1266708672,
-0.0706361085,
0.208353743,
-0.2805274725,
0.1073608026,
0.204057321,
-0.059235245,
-0.1331191957,
0.1519399285,
0.6114038229,
0.2904870212,
0.2430250198,
-0.1104624644,
-0.1894612312,
0.1082888693,
0.0853863657,
0.1249111146,
0.2442240119,
-0.0256536864,
0.1872607172,
0.0772904009,
-0.0963658914,
0.3418992758,
0.1763306856,
0.0398246944,
0.0606258512,
0.0977976024,
-0.1357239336,
-0.1935824156,
-0.4640135169,
-0.1927345246,
-0.2539292574,
-0.027709065,
0.4014788866,
-0.1180350631,
-0.0988112837,
-0.0877254307,
0.0542041659,
-0.2858715355,
0.4002650678,
0.252284646,
0.3638441861,
-0.1063380688,
-0.1944319308,
0.1350936294,
-0.068945013,
-0.3103599548,
0.3789413273,
0.3164228201,
0.2905768156,
-0.2551519275,
0.008613646,
0.22562024,
0.5962051153,
-0.4504058063,
0.0481309332,
-0.4447435439,
0.1119722426,
0.4354966581,
0.0993828997,
-0.1263372749,
-0.1538098603,
0.4535106421,
-0.0902020037,
-0.0474686027,
-0.1513186246,
0.1403333992,
-0.0010736212,
0.0311154313,
0.0529584661,
0.3920417726,
0.0907529593,
-0.0732079148,
-0.2500060499,
-0.2859655917,
-0.2042217851,
0.0479783863,
0.2739372849,
0.335399121,
0.5070762634,
-0.1164323688,
-0.0498181432,
-0.2381437272,
0.1675783992,
-0.0087680817,
-0.3936249614,
-0.137532413,
0.0164313018,
-0.0868349522,
0.0525357574,
0.2316705883,
0.2337380052,
-0.0883539915,
0.2496709675,
0.0207407773,
-0.2763333321,
0.1088409126,
-0.396543026,
-0.316778928,
-0.0161591396,
0.3135697842,
0.2053135633,
-0.0361026041,
-0.0450267419,
0.1803866625,
0.3660030365,
-0.1656157523,
-0.3628180027,
0.2734827697,
-0.1614824831,
-0.0895514861,
0.2288850397,
0.3258035779,
0.2899276316,
-0.4333473742,
0.2282893807,
-0.0857070982
] |
https://github.com/huggingface/datasets/issues/2607 | Streaming local gzip compressed JSON line files is not working | Hi @thomwolf, thanks for reporting.
It seems this might be due to the fact that the JSON Dataset builder uses `pyarrow.json` (`paj.read_json`) to read the data without using the Python standard `open(file,...` (which is the one patched with `xopen` to work in streaming mode).
This has to be fixed. | ## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0 | 49 | Streaming local gzip compressed JSON line files is not working
## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0
Hi @thomwolf, thanks for reporting.
It seems this might be due to the fact that the JSON Dataset builder uses `pyarrow.json` (`paj.read_json`) to read the data without using the Python standard `open(file,...` (which is the one patched with `xopen` to work in streaming mode).
This has to be fixed. | [
-0.1992492974,
-0.1339780837,
-0.0091443993,
0.2391351163,
0.077764377,
0.0168802813,
0.3976745605,
0.5178918242,
0.1970212311,
0.0789986923,
0.1030011773,
0.3306826949,
-0.0883668065,
0.0208741724,
0.2288867235,
-0.1809344888,
-0.0436614715,
0.3560612202,
-0.0251666121,
0.0015848652,
-0.130566597,
0.2937990427,
-0.1404588819,
-0.0185172297,
-0.0187979415,
-0.039555233,
-0.0471498221,
0.1500945985,
-0.0939592272,
-0.3326383531,
0.0627698451,
-0.1684145927,
0.1880224943,
0.4454548061,
-0.000114536,
0.288641125,
0.2961109281,
-0.1629140824,
-0.3886067271,
-0.4712480009,
-0.2299013585,
-0.1492992342,
-0.1307718605,
-0.2858454585,
-0.1378193945,
-0.3474363089,
-0.0337570757,
-0.5072003007,
0.5416864753,
0.2922604978,
0.1556636244,
0.0419651344,
-0.0617718734,
0.0905791372,
0.0390163288,
0.1573234051,
-0.0886077434,
0.3150972128,
0.0327886045,
0.1149680614,
0.0552850068,
0.4286459088,
-0.2254958451,
-0.1747768968,
0.1473701149,
-0.0008165427,
-0.0843829662,
-0.1257869452,
-0.1683151126,
0.0857349411,
0.1845450252,
-0.4122561216,
-0.4398343861,
-0.3761076033,
0.0466744862,
-0.4488027692,
0.2118547559,
0.4092859924,
-0.2503086627,
0.1969693899,
-0.1006655097,
-0.1305317283,
-0.3545617759,
0.0854526982,
0.3618492484,
0.3480826318,
-0.0946777612,
0.0091284607,
-0.0919867307,
0.1193794534,
-0.0839841291,
-0.3859618902,
-0.1857064217,
0.2277565151,
-0.2421416491,
-0.1349226534,
0.1443625391,
-0.6062142253,
0.1511493921,
0.1012289077,
0.4615778625,
-0.125744909,
0.3588074148,
0.0546080992,
0.2728680074,
0.1870487183,
0.1769656837,
0.2638418078,
0.0566590987,
0.3898805976,
-0.0865664035,
-0.1980737299,
-0.2363378853,
-0.0394050144,
-0.0915298909,
0.1368107647,
0.4833263159,
-0.1576657444,
-0.0890934989,
0.0819105506,
-0.594180882,
-0.1327001303,
0.1576725543,
0.0986094177,
0.0661022365,
0.2201752812,
0.0264847875,
0.1610842198,
-0.002104748,
-0.0618944615,
-0.090795517,
0.0235722065,
0.0740589648,
0.1347988546,
0.2518973947,
-0.5213882923,
0.2793644071,
0.0087542534,
-0.0460298285,
-0.1562339365,
0.0058458075,
-0.1255563796,
0.1504514366,
0.1468390673,
-0.0259296224,
0.0193637609,
0.205884397,
-0.1102269441,
-0.1738199443,
0.1183539554,
-0.2751957178,
-0.2672142088,
0.0372359902,
0.2010165751,
0.0381587669,
0.0093890857,
-0.0081488863,
0.0059313858,
0.0556992218,
-0.356513083,
0.0236361884,
-0.0094646513,
-0.0558017008,
-0.0841290802,
0.2759923339,
0.4360964894,
-0.3608722687,
-0.1035922319,
0.0715647787,
0.2175854295,
0.7216556072,
0.342538327,
-0.2379718423,
0.1273072064,
-0.3681202829,
0.3619051576,
0.6931352615,
0.0160380006,
-0.362465471,
0.8522370458,
-0.1086346656,
0.3817507625,
0.4800849855,
-0.2044290304,
0.1941486299,
-0.0105184838,
0.3352073431,
0.2812873423,
-0.044572711,
0.0385275409,
-0.4642710686,
0.1312143058,
0.0419497602,
0.0378057286,
-0.2513180375,
0.2954411507,
-0.0433922224,
0.0150336735,
0.3520896435,
-0.1800564229,
0.108184509,
0.2904558778,
0.2378064245,
0.0199460946,
0.2021737397,
0.0092638433,
-0.2178030014,
0.0324925631,
-0.3366103768,
-0.2629366815,
-0.2826168835,
-0.0624105297,
-0.1401132345,
0.1486999691,
-0.184348017,
-0.3533779979,
0.1464817822,
0.4111511111,
0.3808982372,
0.0224370062,
-0.4623305798,
0.3006554544,
-0.2987253666,
-0.1048562676,
-0.2611707151,
0.4293633699,
0.0721353441,
-0.2631467581,
0.1758849025,
-0.0589888431,
0.1717890799,
-0.2416349649,
-0.2221169174,
0.2450815737,
-0.1208554804,
0.1709068269,
0.1169750616,
-0.2226248682,
0.2957749367,
-0.0062119737,
-0.0720566139,
0.3445871472,
0.2193278372,
0.2041206509,
-0.2239912599,
0.4739871621,
-0.0305660609,
0.3029980361,
0.020911172,
-0.2058361769,
0.1924335957,
-0.0084313154,
-0.3421521187,
0.0653707981,
0.3345848918,
-0.1258887798,
0.094605267,
-0.0612958446,
-0.3791345954,
-0.0635567307,
0.5271072984,
-0.0830585808,
-0.1615023464,
0.1926882267,
-0.1803122908,
-0.0555442944,
0.2965637445,
-0.0067164972,
0.3335770667,
0.1575454324,
0.1046025157,
0.0166131947,
-0.1111164615,
-0.2565551996,
0.2091609836,
-0.0900345594,
0.1146258712,
0.5449169874,
0.0356365442,
0.0449169874,
-0.3995403051,
-0.2428153008,
-0.1288820952,
0.145580247,
-0.0990884379,
0.384134233,
-0.3911355138,
-0.3713187575,
-0.1201702282,
-0.1128698736,
-0.0630645603,
-0.0857731774,
-0.0269653015,
0.2985588014,
-0.2004607618,
0.2329238951,
0.0005525425,
0.0394021869,
0.2519484162,
-0.4227376878,
-0.4818941951,
-0.1630385518,
-0.191156745,
-0.0104029179,
0.2656036317,
-0.2878891826,
0.3017161787,
-0.0459045134,
-0.3699755669,
-0.2707994878,
0.1194070578,
0.1435606927,
0.0721820593,
-0.0227002576,
-0.0912800282,
0.2280843407,
-0.0796870887,
-0.3324356079,
0.287009567,
-0.2174522281,
-0.1486556083,
0.1948514879,
-0.0311843641,
-0.0018442385,
-0.2352986038,
-0.2655212283,
-0.147244826,
-0.4852221906,
0.2896815538,
-0.0403697789,
0.3086785078,
0.2429100573,
0.1440982968,
0.17795977,
0.1556588262,
-0.0546924844,
-0.1509626657,
-0.6362752914,
0.3917453587,
-0.1101356298,
-0.2303780019,
-0.0295006931,
-0.1555968225,
-0.0550975576,
0.3612909615,
-0.4562183022,
0.2379129827,
0.0702733397,
0.0834181905,
-0.0950674415,
-0.1340571344,
0.1914462745,
-0.1075465083,
-0.0603605621,
-0.2590094209,
0.0759437233,
-0.0122350045,
0.2527309656,
0.1833105683,
0.4013441503,
0.7469967008,
-0.0391616002,
0.2865435481,
0.3533920646,
0.1458688825,
0.5503773093,
-0.1300926208,
0.1602508724,
-0.2425832152,
-0.2188410759,
0.0596467443,
0.105084151,
-0.3196412027,
0.0274332743,
0.0012187846,
-0.3406587243,
-0.3240849078,
0.1244036555,
-0.3062013388,
-0.1882945001,
0.2014840245,
-0.0963938534,
0.1964116395,
-0.0394229591,
-0.0296398103,
-0.0032316111,
0.1153506637,
-0.0483283401,
0.265410006,
0.4285129309,
0.1289334744,
-0.0543235354,
-0.1830666065,
-0.3484932184,
0.0787644908,
0.2743042111,
0.6020604372,
-0.1669997573,
-0.1687550545,
0.0798476785,
-0.168412894,
0.4636309147,
-0.1258803755,
-0.0341539606,
0.3472771347,
-0.1242793351,
-0.0266533978,
-0.1190545186,
-0.0431698188,
0.3530089557,
0.1959492117,
0.6723822355,
-0.1772068739,
-0.2202008665,
0.1132564545,
0.0215651728,
0.0907035172,
-0.1562679708,
-0.292806685,
-0.1358121634,
-0.2019329071,
-0.065504238,
-0.0717765018,
0.2410787791,
0.0199556947,
-0.1312818527,
0.053600654,
-0.0730546638,
-0.1126661897,
0.0078034177,
0.2940388918,
-0.0325307846,
0.15934214,
0.0570227653,
0.5039331913,
0.2327843606,
0.513666749,
0.5314756632,
-0.4147781432,
0.1325848997,
0.0702450573,
0.1329937875,
0.1649884284,
-0.1350933164,
-0.1513893157,
0.1381043643,
0.2574624121,
-0.0355814844,
-0.0832139701,
0.2338192612,
-0.15558213,
-0.3567371964,
-0.4606521428,
0.2432615161,
-0.039202787,
0.1920532137,
0.7787451148,
-0.6046571136,
-0.1680705249,
0.1287045479,
-0.3274393082,
0.6506019831,
0.3056918383,
-0.012612409,
0.4230309129,
-0.1530072838,
0.4291077852,
-0.4506249428,
0.3880236447,
-0.1075448096,
-0.1895090044,
0.0136246011,
-0.1521779895,
0.3272459507,
0.1736507416,
-0.330124408,
0.1560814381,
0.0949872732,
-0.0261120368,
0.056402415,
0.0844661146,
-0.3410910964,
-0.1478554904,
-0.6056395173,
0.0822724551,
-0.1643426567,
0.3591600955,
0.119865112,
-0.3871606588,
0.0100031868,
-0.2189192772,
-0.1640436053,
0.4873071313,
-0.2205232978,
-0.0437987521,
-0.1201651841,
-0.6457443237,
-0.3231775463,
-0.1665349603,
-0.3695809841,
-0.1014872938,
-0.096880652,
-0.0140162269,
-0.156002745,
0.0815747231,
-0.4244862795,
0.2442319393,
0.1879111826,
-0.1447574198,
-0.0854346976,
0.1730189621,
-0.2793942392,
-0.5516795516,
0.2067952007,
-0.0945817083,
0.2443373501,
0.1387690753,
-0.0142799281,
0.018897783,
-0.1952124536,
-0.202106148,
0.131595701,
-0.140814513,
-0.3405293524,
-0.2667015195,
-0.1519019902,
-0.2008609176,
-0.1044819355,
0.2798333466,
0.0701383054,
0.3024793565,
0.3966616988,
-0.0176078305,
-0.0633014217,
-0.284956038,
0.0822027996,
-0.1994448751,
-0.0627177507,
0.145860821,
-0.0238583945,
0.1735637039,
-0.2250165343,
-0.0105745308,
0.1574331224,
0.0527800657,
0.031123817,
-0.4647314548,
-0.1359291375,
-0.1071504354,
-0.0055008866,
0.1117187589,
0.1044034809,
0.205255419,
0.1506942511,
-0.1848129332,
-0.2874044478,
-0.1490446925,
-0.179832682,
0.0388781838,
0.0197010636,
0.144513756,
0.3058992028,
0.0417762436,
0.1726239622,
0.1845808774,
0.1145530641,
-0.2760637701,
-0.1294751912,
0.1017442569,
0.147550717,
-0.1066456437,
-0.2568070292,
-0.0784027427,
-0.2397450656,
-0.0903132409,
0.1030202955,
-0.0890860111,
-0.0714162067,
0.2204837054,
0.3504036665,
-0.0414798968,
-0.1651161611,
-0.0696930736,
-0.202970922,
0.3246163726,
-0.1491925418,
0.0957459062,
0.0479336679,
0.0756747872,
-0.5871009827,
-0.0813037157,
-0.0964611024,
0.1543783396,
0.5952441692,
-0.4551479816,
0.031125553,
0.0455694981,
0.1699536145,
0.4789018333,
-0.1304555982,
0.0390132144,
0.1729508489,
0.1876670569,
-0.0484994873,
-0.0702740103,
0.1377955824,
0.1060288772,
-0.0637332723,
-0.0711322576,
-0.1525838971,
-0.1502205878,
0.099859558,
0.0143190548,
0.3330244422,
0.0458891243,
0.2113549411,
0.4080848694,
0.2017602921,
0.0718020648,
-0.3809927404,
0.0200542621,
0.0718999878,
-0.188730374,
-0.1524383128,
-0.1257037818,
0.0813988447,
0.1215053499,
-0.3927784562,
-0.3188355565,
-0.3502138853,
0.0856018662,
-0.1179062575,
0.4086128473,
-0.0059120096,
0.2030268759,
-0.206398502,
0.0338467807,
0.0438849404,
0.1606598496,
0.0185741317,
0.1159619242,
-0.5277092457,
-0.0310804322,
-0.0583054498,
0.038965404,
0.3544372618,
0.5155143738,
-0.0361988507,
0.2214540988,
-0.1061515063,
-0.1359118819,
0.0883780569,
0.1771473885,
0.3425748944,
-0.3739396334,
0.2876466513,
0.2135392874,
0.0820100754,
-0.0754377395,
0.0099539291,
0.3729596138,
0.3608309031,
0.0665017962,
0.0278088301,
0.0363487378,
-0.0933403596,
0.0266608074,
0.3354784548,
0.190485388,
-0.1879784614,
0.2221894562,
0.1101661325,
-0.0887120515,
0.3944173455,
0.0983027592,
0.1196608096,
-0.1152642667,
0.1943058074,
-0.2477380484,
-0.1086109206,
0.0640459657,
-0.3541445136,
-0.358768791,
-0.063477464,
0.2332485616,
0.1124904603,
0.0440792404,
-0.0250768736,
0.0849538743,
-0.1289325953,
0.2790076137,
0.2456027716,
-0.0800000876,
-0.1668444276,
-0.1844665408,
-0.2015264481,
0.1580558568,
-0.0404094085,
-0.1079187617,
0.2371382713,
0.3279324174,
-0.0682449639,
0.20604527,
-0.0900722444,
-0.1822009981,
-0.2946013212,
0.2807137072,
-0.3546518683,
-0.2369972467,
0.1787969023,
0.2335970849,
0.0910652727,
-0.4543964863,
0.2050724626,
-0.3312029243,
0.1178358272,
0.05539231,
-0.0305207893,
0.0156795159,
0.0668511093,
0.2356528938,
0.1621073186,
0.115546979,
-0.1349949837,
-0.1920707226,
-0.0728198439,
-0.1768476963,
-0.0183115155,
0.1458833814,
-0.0582505353,
0.50287503,
-0.0484359153,
-0.4014245868,
-0.4371392429,
0.4285812974,
-0.0439620689,
-0.4439986348,
0.0103936717,
0.0140107051,
-0.1760369539,
0.1818833351,
0.0124766156,
0.1777726114,
-0.0506042875,
0.0616824105,
-0.3085520864,
-0.1021585986,
0.594225049,
-0.422496736,
-0.3192535937,
0.3241406381,
0.1266874671,
0.1190700531,
0.1298956424,
-0.1965911984,
0.1324761808,
0.437204659,
-0.0283877328,
0.1215386689,
0.1597632766,
0.1152021959,
0.1851296276,
0.1178185567,
0.0776480883,
0.1725969464,
-0.2597602606,
0.1329277456,
-0.2140504718
] |
https://github.com/huggingface/datasets/issues/2607 | Streaming local gzip compressed JSON line files is not working | Sorry for reopening this, but I'm having the same issue as @thomwolf when streaming a gzipped JSON Lines file from the hub. Or is that just not possible by definition?
I installed `datasets`in editable mode from source (so probably includes the fix from #2608 ?):
```
>>> datasets.__version__
'1.9.1.dev0'
```
```
>>> msmarco = datasets.load_dataset("webis/msmarco", "corpus", streaming=True)
Using custom data configuration corpus-174d3b7155eb68db
>>> msmarco_iter = iter(msmarco['train'])
>>> print(next(msmarco_iter))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 338, in __iter__
for key, example in self._iter():
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 335, in _iter
yield from ex_iterable
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 78, in __iter__
for key, example in self.generate_examples_fn(**self.kwargs):
File "/home/christopher/.cache/huggingface/modules/datasets_modules/datasets/msmarco/eb63dff8d83107168e973c7a655a6082d37e08d71b4ac39a0afada479c138745/msmarco.py", line 96, in _generate_examples
with gzip.open(file, "rt", encoding="utf-8") as f:
File "/usr/lib/python3.6/gzip.py", line 53, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File "/usr/lib/python3.6/gzip.py", line 163, in __init__
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'https://huggingface.co/datasets/webis/msmarco/resolve/main/msmarco_doc_00.gz'
```
Loading the dataset without streaming set to True, works fine. | ## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0 | 167 | Streaming local gzip compressed JSON line files is not working
## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0
Sorry for reopening this, but I'm having the same issue as @thomwolf when streaming a gzipped JSON Lines file from the hub. Or is that just not possible by definition?
I installed `datasets`in editable mode from source (so probably includes the fix from #2608 ?):
```
>>> datasets.__version__
'1.9.1.dev0'
```
```
>>> msmarco = datasets.load_dataset("webis/msmarco", "corpus", streaming=True)
Using custom data configuration corpus-174d3b7155eb68db
>>> msmarco_iter = iter(msmarco['train'])
>>> print(next(msmarco_iter))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 338, in __iter__
for key, example in self._iter():
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 335, in _iter
yield from ex_iterable
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 78, in __iter__
for key, example in self.generate_examples_fn(**self.kwargs):
File "/home/christopher/.cache/huggingface/modules/datasets_modules/datasets/msmarco/eb63dff8d83107168e973c7a655a6082d37e08d71b4ac39a0afada479c138745/msmarco.py", line 96, in _generate_examples
with gzip.open(file, "rt", encoding="utf-8") as f:
File "/usr/lib/python3.6/gzip.py", line 53, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File "/usr/lib/python3.6/gzip.py", line 163, in __init__
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'https://huggingface.co/datasets/webis/msmarco/resolve/main/msmarco_doc_00.gz'
```
Loading the dataset without streaming set to True, works fine. | [
-0.1992492974,
-0.1339780837,
-0.0091443993,
0.2391351163,
0.077764377,
0.0168802813,
0.3976745605,
0.5178918242,
0.1970212311,
0.0789986923,
0.1030011773,
0.3306826949,
-0.0883668065,
0.0208741724,
0.2288867235,
-0.1809344888,
-0.0436614715,
0.3560612202,
-0.0251666121,
0.0015848652,
-0.130566597,
0.2937990427,
-0.1404588819,
-0.0185172297,
-0.0187979415,
-0.039555233,
-0.0471498221,
0.1500945985,
-0.0939592272,
-0.3326383531,
0.0627698451,
-0.1684145927,
0.1880224943,
0.4454548061,
-0.000114536,
0.288641125,
0.2961109281,
-0.1629140824,
-0.3886067271,
-0.4712480009,
-0.2299013585,
-0.1492992342,
-0.1307718605,
-0.2858454585,
-0.1378193945,
-0.3474363089,
-0.0337570757,
-0.5072003007,
0.5416864753,
0.2922604978,
0.1556636244,
0.0419651344,
-0.0617718734,
0.0905791372,
0.0390163288,
0.1573234051,
-0.0886077434,
0.3150972128,
0.0327886045,
0.1149680614,
0.0552850068,
0.4286459088,
-0.2254958451,
-0.1747768968,
0.1473701149,
-0.0008165427,
-0.0843829662,
-0.1257869452,
-0.1683151126,
0.0857349411,
0.1845450252,
-0.4122561216,
-0.4398343861,
-0.3761076033,
0.0466744862,
-0.4488027692,
0.2118547559,
0.4092859924,
-0.2503086627,
0.1969693899,
-0.1006655097,
-0.1305317283,
-0.3545617759,
0.0854526982,
0.3618492484,
0.3480826318,
-0.0946777612,
0.0091284607,
-0.0919867307,
0.1193794534,
-0.0839841291,
-0.3859618902,
-0.1857064217,
0.2277565151,
-0.2421416491,
-0.1349226534,
0.1443625391,
-0.6062142253,
0.1511493921,
0.1012289077,
0.4615778625,
-0.125744909,
0.3588074148,
0.0546080992,
0.2728680074,
0.1870487183,
0.1769656837,
0.2638418078,
0.0566590987,
0.3898805976,
-0.0865664035,
-0.1980737299,
-0.2363378853,
-0.0394050144,
-0.0915298909,
0.1368107647,
0.4833263159,
-0.1576657444,
-0.0890934989,
0.0819105506,
-0.594180882,
-0.1327001303,
0.1576725543,
0.0986094177,
0.0661022365,
0.2201752812,
0.0264847875,
0.1610842198,
-0.002104748,
-0.0618944615,
-0.090795517,
0.0235722065,
0.0740589648,
0.1347988546,
0.2518973947,
-0.5213882923,
0.2793644071,
0.0087542534,
-0.0460298285,
-0.1562339365,
0.0058458075,
-0.1255563796,
0.1504514366,
0.1468390673,
-0.0259296224,
0.0193637609,
0.205884397,
-0.1102269441,
-0.1738199443,
0.1183539554,
-0.2751957178,
-0.2672142088,
0.0372359902,
0.2010165751,
0.0381587669,
0.0093890857,
-0.0081488863,
0.0059313858,
0.0556992218,
-0.356513083,
0.0236361884,
-0.0094646513,
-0.0558017008,
-0.0841290802,
0.2759923339,
0.4360964894,
-0.3608722687,
-0.1035922319,
0.0715647787,
0.2175854295,
0.7216556072,
0.342538327,
-0.2379718423,
0.1273072064,
-0.3681202829,
0.3619051576,
0.6931352615,
0.0160380006,
-0.362465471,
0.8522370458,
-0.1086346656,
0.3817507625,
0.4800849855,
-0.2044290304,
0.1941486299,
-0.0105184838,
0.3352073431,
0.2812873423,
-0.044572711,
0.0385275409,
-0.4642710686,
0.1312143058,
0.0419497602,
0.0378057286,
-0.2513180375,
0.2954411507,
-0.0433922224,
0.0150336735,
0.3520896435,
-0.1800564229,
0.108184509,
0.2904558778,
0.2378064245,
0.0199460946,
0.2021737397,
0.0092638433,
-0.2178030014,
0.0324925631,
-0.3366103768,
-0.2629366815,
-0.2826168835,
-0.0624105297,
-0.1401132345,
0.1486999691,
-0.184348017,
-0.3533779979,
0.1464817822,
0.4111511111,
0.3808982372,
0.0224370062,
-0.4623305798,
0.3006554544,
-0.2987253666,
-0.1048562676,
-0.2611707151,
0.4293633699,
0.0721353441,
-0.2631467581,
0.1758849025,
-0.0589888431,
0.1717890799,
-0.2416349649,
-0.2221169174,
0.2450815737,
-0.1208554804,
0.1709068269,
0.1169750616,
-0.2226248682,
0.2957749367,
-0.0062119737,
-0.0720566139,
0.3445871472,
0.2193278372,
0.2041206509,
-0.2239912599,
0.4739871621,
-0.0305660609,
0.3029980361,
0.020911172,
-0.2058361769,
0.1924335957,
-0.0084313154,
-0.3421521187,
0.0653707981,
0.3345848918,
-0.1258887798,
0.094605267,
-0.0612958446,
-0.3791345954,
-0.0635567307,
0.5271072984,
-0.0830585808,
-0.1615023464,
0.1926882267,
-0.1803122908,
-0.0555442944,
0.2965637445,
-0.0067164972,
0.3335770667,
0.1575454324,
0.1046025157,
0.0166131947,
-0.1111164615,
-0.2565551996,
0.2091609836,
-0.0900345594,
0.1146258712,
0.5449169874,
0.0356365442,
0.0449169874,
-0.3995403051,
-0.2428153008,
-0.1288820952,
0.145580247,
-0.0990884379,
0.384134233,
-0.3911355138,
-0.3713187575,
-0.1201702282,
-0.1128698736,
-0.0630645603,
-0.0857731774,
-0.0269653015,
0.2985588014,
-0.2004607618,
0.2329238951,
0.0005525425,
0.0394021869,
0.2519484162,
-0.4227376878,
-0.4818941951,
-0.1630385518,
-0.191156745,
-0.0104029179,
0.2656036317,
-0.2878891826,
0.3017161787,
-0.0459045134,
-0.3699755669,
-0.2707994878,
0.1194070578,
0.1435606927,
0.0721820593,
-0.0227002576,
-0.0912800282,
0.2280843407,
-0.0796870887,
-0.3324356079,
0.287009567,
-0.2174522281,
-0.1486556083,
0.1948514879,
-0.0311843641,
-0.0018442385,
-0.2352986038,
-0.2655212283,
-0.147244826,
-0.4852221906,
0.2896815538,
-0.0403697789,
0.3086785078,
0.2429100573,
0.1440982968,
0.17795977,
0.1556588262,
-0.0546924844,
-0.1509626657,
-0.6362752914,
0.3917453587,
-0.1101356298,
-0.2303780019,
-0.0295006931,
-0.1555968225,
-0.0550975576,
0.3612909615,
-0.4562183022,
0.2379129827,
0.0702733397,
0.0834181905,
-0.0950674415,
-0.1340571344,
0.1914462745,
-0.1075465083,
-0.0603605621,
-0.2590094209,
0.0759437233,
-0.0122350045,
0.2527309656,
0.1833105683,
0.4013441503,
0.7469967008,
-0.0391616002,
0.2865435481,
0.3533920646,
0.1458688825,
0.5503773093,
-0.1300926208,
0.1602508724,
-0.2425832152,
-0.2188410759,
0.0596467443,
0.105084151,
-0.3196412027,
0.0274332743,
0.0012187846,
-0.3406587243,
-0.3240849078,
0.1244036555,
-0.3062013388,
-0.1882945001,
0.2014840245,
-0.0963938534,
0.1964116395,
-0.0394229591,
-0.0296398103,
-0.0032316111,
0.1153506637,
-0.0483283401,
0.265410006,
0.4285129309,
0.1289334744,
-0.0543235354,
-0.1830666065,
-0.3484932184,
0.0787644908,
0.2743042111,
0.6020604372,
-0.1669997573,
-0.1687550545,
0.0798476785,
-0.168412894,
0.4636309147,
-0.1258803755,
-0.0341539606,
0.3472771347,
-0.1242793351,
-0.0266533978,
-0.1190545186,
-0.0431698188,
0.3530089557,
0.1959492117,
0.6723822355,
-0.1772068739,
-0.2202008665,
0.1132564545,
0.0215651728,
0.0907035172,
-0.1562679708,
-0.292806685,
-0.1358121634,
-0.2019329071,
-0.065504238,
-0.0717765018,
0.2410787791,
0.0199556947,
-0.1312818527,
0.053600654,
-0.0730546638,
-0.1126661897,
0.0078034177,
0.2940388918,
-0.0325307846,
0.15934214,
0.0570227653,
0.5039331913,
0.2327843606,
0.513666749,
0.5314756632,
-0.4147781432,
0.1325848997,
0.0702450573,
0.1329937875,
0.1649884284,
-0.1350933164,
-0.1513893157,
0.1381043643,
0.2574624121,
-0.0355814844,
-0.0832139701,
0.2338192612,
-0.15558213,
-0.3567371964,
-0.4606521428,
0.2432615161,
-0.039202787,
0.1920532137,
0.7787451148,
-0.6046571136,
-0.1680705249,
0.1287045479,
-0.3274393082,
0.6506019831,
0.3056918383,
-0.012612409,
0.4230309129,
-0.1530072838,
0.4291077852,
-0.4506249428,
0.3880236447,
-0.1075448096,
-0.1895090044,
0.0136246011,
-0.1521779895,
0.3272459507,
0.1736507416,
-0.330124408,
0.1560814381,
0.0949872732,
-0.0261120368,
0.056402415,
0.0844661146,
-0.3410910964,
-0.1478554904,
-0.6056395173,
0.0822724551,
-0.1643426567,
0.3591600955,
0.119865112,
-0.3871606588,
0.0100031868,
-0.2189192772,
-0.1640436053,
0.4873071313,
-0.2205232978,
-0.0437987521,
-0.1201651841,
-0.6457443237,
-0.3231775463,
-0.1665349603,
-0.3695809841,
-0.1014872938,
-0.096880652,
-0.0140162269,
-0.156002745,
0.0815747231,
-0.4244862795,
0.2442319393,
0.1879111826,
-0.1447574198,
-0.0854346976,
0.1730189621,
-0.2793942392,
-0.5516795516,
0.2067952007,
-0.0945817083,
0.2443373501,
0.1387690753,
-0.0142799281,
0.018897783,
-0.1952124536,
-0.202106148,
0.131595701,
-0.140814513,
-0.3405293524,
-0.2667015195,
-0.1519019902,
-0.2008609176,
-0.1044819355,
0.2798333466,
0.0701383054,
0.3024793565,
0.3966616988,
-0.0176078305,
-0.0633014217,
-0.284956038,
0.0822027996,
-0.1994448751,
-0.0627177507,
0.145860821,
-0.0238583945,
0.1735637039,
-0.2250165343,
-0.0105745308,
0.1574331224,
0.0527800657,
0.031123817,
-0.4647314548,
-0.1359291375,
-0.1071504354,
-0.0055008866,
0.1117187589,
0.1044034809,
0.205255419,
0.1506942511,
-0.1848129332,
-0.2874044478,
-0.1490446925,
-0.179832682,
0.0388781838,
0.0197010636,
0.144513756,
0.3058992028,
0.0417762436,
0.1726239622,
0.1845808774,
0.1145530641,
-0.2760637701,
-0.1294751912,
0.1017442569,
0.147550717,
-0.1066456437,
-0.2568070292,
-0.0784027427,
-0.2397450656,
-0.0903132409,
0.1030202955,
-0.0890860111,
-0.0714162067,
0.2204837054,
0.3504036665,
-0.0414798968,
-0.1651161611,
-0.0696930736,
-0.202970922,
0.3246163726,
-0.1491925418,
0.0957459062,
0.0479336679,
0.0756747872,
-0.5871009827,
-0.0813037157,
-0.0964611024,
0.1543783396,
0.5952441692,
-0.4551479816,
0.031125553,
0.0455694981,
0.1699536145,
0.4789018333,
-0.1304555982,
0.0390132144,
0.1729508489,
0.1876670569,
-0.0484994873,
-0.0702740103,
0.1377955824,
0.1060288772,
-0.0637332723,
-0.0711322576,
-0.1525838971,
-0.1502205878,
0.099859558,
0.0143190548,
0.3330244422,
0.0458891243,
0.2113549411,
0.4080848694,
0.2017602921,
0.0718020648,
-0.3809927404,
0.0200542621,
0.0718999878,
-0.188730374,
-0.1524383128,
-0.1257037818,
0.0813988447,
0.1215053499,
-0.3927784562,
-0.3188355565,
-0.3502138853,
0.0856018662,
-0.1179062575,
0.4086128473,
-0.0059120096,
0.2030268759,
-0.206398502,
0.0338467807,
0.0438849404,
0.1606598496,
0.0185741317,
0.1159619242,
-0.5277092457,
-0.0310804322,
-0.0583054498,
0.038965404,
0.3544372618,
0.5155143738,
-0.0361988507,
0.2214540988,
-0.1061515063,
-0.1359118819,
0.0883780569,
0.1771473885,
0.3425748944,
-0.3739396334,
0.2876466513,
0.2135392874,
0.0820100754,
-0.0754377395,
0.0099539291,
0.3729596138,
0.3608309031,
0.0665017962,
0.0278088301,
0.0363487378,
-0.0933403596,
0.0266608074,
0.3354784548,
0.190485388,
-0.1879784614,
0.2221894562,
0.1101661325,
-0.0887120515,
0.3944173455,
0.0983027592,
0.1196608096,
-0.1152642667,
0.1943058074,
-0.2477380484,
-0.1086109206,
0.0640459657,
-0.3541445136,
-0.358768791,
-0.063477464,
0.2332485616,
0.1124904603,
0.0440792404,
-0.0250768736,
0.0849538743,
-0.1289325953,
0.2790076137,
0.2456027716,
-0.0800000876,
-0.1668444276,
-0.1844665408,
-0.2015264481,
0.1580558568,
-0.0404094085,
-0.1079187617,
0.2371382713,
0.3279324174,
-0.0682449639,
0.20604527,
-0.0900722444,
-0.1822009981,
-0.2946013212,
0.2807137072,
-0.3546518683,
-0.2369972467,
0.1787969023,
0.2335970849,
0.0910652727,
-0.4543964863,
0.2050724626,
-0.3312029243,
0.1178358272,
0.05539231,
-0.0305207893,
0.0156795159,
0.0668511093,
0.2356528938,
0.1621073186,
0.115546979,
-0.1349949837,
-0.1920707226,
-0.0728198439,
-0.1768476963,
-0.0183115155,
0.1458833814,
-0.0582505353,
0.50287503,
-0.0484359153,
-0.4014245868,
-0.4371392429,
0.4285812974,
-0.0439620689,
-0.4439986348,
0.0103936717,
0.0140107051,
-0.1760369539,
0.1818833351,
0.0124766156,
0.1777726114,
-0.0506042875,
0.0616824105,
-0.3085520864,
-0.1021585986,
0.594225049,
-0.422496736,
-0.3192535937,
0.3241406381,
0.1266874671,
0.1190700531,
0.1298956424,
-0.1965911984,
0.1324761808,
0.437204659,
-0.0283877328,
0.1215386689,
0.1597632766,
0.1152021959,
0.1851296276,
0.1178185567,
0.0776480883,
0.1725969464,
-0.2597602606,
0.1329277456,
-0.2140504718
] |
https://github.com/huggingface/datasets/issues/2607 | Streaming local gzip compressed JSON line files is not working | Hi ! To make the streaming work, we extend `open` in the dataset builder to work with urls.
Therefore you just need to use `open` before using `gzip.open`:
```diff
- with gzip.open(file, "rt", encoding="utf-8") as f:
+ with gzip.open(open(file, "rb"), "rt", encoding="utf-8") as f:
```
You can see that it is the case for oscar.py and c4.py for example:
https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/oscar/oscar.py#L358-L358
https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/c4/c4.py#L88-L88
| ## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0 | 61 | Streaming local gzip compressed JSON line files is not working
## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0
Hi ! To make the streaming work, we extend `open` in the dataset builder to work with urls.
Therefore you just need to use `open` before using `gzip.open`:
```diff
- with gzip.open(file, "rt", encoding="utf-8") as f:
+ with gzip.open(open(file, "rb"), "rt", encoding="utf-8") as f:
```
You can see that it is the case for oscar.py and c4.py for example:
https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/oscar/oscar.py#L358-L358
https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/c4/c4.py#L88-L88
| [
-0.1992492974,
-0.1339780837,
-0.0091443993,
0.2391351163,
0.077764377,
0.0168802813,
0.3976745605,
0.5178918242,
0.1970212311,
0.0789986923,
0.1030011773,
0.3306826949,
-0.0883668065,
0.0208741724,
0.2288867235,
-0.1809344888,
-0.0436614715,
0.3560612202,
-0.0251666121,
0.0015848652,
-0.130566597,
0.2937990427,
-0.1404588819,
-0.0185172297,
-0.0187979415,
-0.039555233,
-0.0471498221,
0.1500945985,
-0.0939592272,
-0.3326383531,
0.0627698451,
-0.1684145927,
0.1880224943,
0.4454548061,
-0.000114536,
0.288641125,
0.2961109281,
-0.1629140824,
-0.3886067271,
-0.4712480009,
-0.2299013585,
-0.1492992342,
-0.1307718605,
-0.2858454585,
-0.1378193945,
-0.3474363089,
-0.0337570757,
-0.5072003007,
0.5416864753,
0.2922604978,
0.1556636244,
0.0419651344,
-0.0617718734,
0.0905791372,
0.0390163288,
0.1573234051,
-0.0886077434,
0.3150972128,
0.0327886045,
0.1149680614,
0.0552850068,
0.4286459088,
-0.2254958451,
-0.1747768968,
0.1473701149,
-0.0008165427,
-0.0843829662,
-0.1257869452,
-0.1683151126,
0.0857349411,
0.1845450252,
-0.4122561216,
-0.4398343861,
-0.3761076033,
0.0466744862,
-0.4488027692,
0.2118547559,
0.4092859924,
-0.2503086627,
0.1969693899,
-0.1006655097,
-0.1305317283,
-0.3545617759,
0.0854526982,
0.3618492484,
0.3480826318,
-0.0946777612,
0.0091284607,
-0.0919867307,
0.1193794534,
-0.0839841291,
-0.3859618902,
-0.1857064217,
0.2277565151,
-0.2421416491,
-0.1349226534,
0.1443625391,
-0.6062142253,
0.1511493921,
0.1012289077,
0.4615778625,
-0.125744909,
0.3588074148,
0.0546080992,
0.2728680074,
0.1870487183,
0.1769656837,
0.2638418078,
0.0566590987,
0.3898805976,
-0.0865664035,
-0.1980737299,
-0.2363378853,
-0.0394050144,
-0.0915298909,
0.1368107647,
0.4833263159,
-0.1576657444,
-0.0890934989,
0.0819105506,
-0.594180882,
-0.1327001303,
0.1576725543,
0.0986094177,
0.0661022365,
0.2201752812,
0.0264847875,
0.1610842198,
-0.002104748,
-0.0618944615,
-0.090795517,
0.0235722065,
0.0740589648,
0.1347988546,
0.2518973947,
-0.5213882923,
0.2793644071,
0.0087542534,
-0.0460298285,
-0.1562339365,
0.0058458075,
-0.1255563796,
0.1504514366,
0.1468390673,
-0.0259296224,
0.0193637609,
0.205884397,
-0.1102269441,
-0.1738199443,
0.1183539554,
-0.2751957178,
-0.2672142088,
0.0372359902,
0.2010165751,
0.0381587669,
0.0093890857,
-0.0081488863,
0.0059313858,
0.0556992218,
-0.356513083,
0.0236361884,
-0.0094646513,
-0.0558017008,
-0.0841290802,
0.2759923339,
0.4360964894,
-0.3608722687,
-0.1035922319,
0.0715647787,
0.2175854295,
0.7216556072,
0.342538327,
-0.2379718423,
0.1273072064,
-0.3681202829,
0.3619051576,
0.6931352615,
0.0160380006,
-0.362465471,
0.8522370458,
-0.1086346656,
0.3817507625,
0.4800849855,
-0.2044290304,
0.1941486299,
-0.0105184838,
0.3352073431,
0.2812873423,
-0.044572711,
0.0385275409,
-0.4642710686,
0.1312143058,
0.0419497602,
0.0378057286,
-0.2513180375,
0.2954411507,
-0.0433922224,
0.0150336735,
0.3520896435,
-0.1800564229,
0.108184509,
0.2904558778,
0.2378064245,
0.0199460946,
0.2021737397,
0.0092638433,
-0.2178030014,
0.0324925631,
-0.3366103768,
-0.2629366815,
-0.2826168835,
-0.0624105297,
-0.1401132345,
0.1486999691,
-0.184348017,
-0.3533779979,
0.1464817822,
0.4111511111,
0.3808982372,
0.0224370062,
-0.4623305798,
0.3006554544,
-0.2987253666,
-0.1048562676,
-0.2611707151,
0.4293633699,
0.0721353441,
-0.2631467581,
0.1758849025,
-0.0589888431,
0.1717890799,
-0.2416349649,
-0.2221169174,
0.2450815737,
-0.1208554804,
0.1709068269,
0.1169750616,
-0.2226248682,
0.2957749367,
-0.0062119737,
-0.0720566139,
0.3445871472,
0.2193278372,
0.2041206509,
-0.2239912599,
0.4739871621,
-0.0305660609,
0.3029980361,
0.020911172,
-0.2058361769,
0.1924335957,
-0.0084313154,
-0.3421521187,
0.0653707981,
0.3345848918,
-0.1258887798,
0.094605267,
-0.0612958446,
-0.3791345954,
-0.0635567307,
0.5271072984,
-0.0830585808,
-0.1615023464,
0.1926882267,
-0.1803122908,
-0.0555442944,
0.2965637445,
-0.0067164972,
0.3335770667,
0.1575454324,
0.1046025157,
0.0166131947,
-0.1111164615,
-0.2565551996,
0.2091609836,
-0.0900345594,
0.1146258712,
0.5449169874,
0.0356365442,
0.0449169874,
-0.3995403051,
-0.2428153008,
-0.1288820952,
0.145580247,
-0.0990884379,
0.384134233,
-0.3911355138,
-0.3713187575,
-0.1201702282,
-0.1128698736,
-0.0630645603,
-0.0857731774,
-0.0269653015,
0.2985588014,
-0.2004607618,
0.2329238951,
0.0005525425,
0.0394021869,
0.2519484162,
-0.4227376878,
-0.4818941951,
-0.1630385518,
-0.191156745,
-0.0104029179,
0.2656036317,
-0.2878891826,
0.3017161787,
-0.0459045134,
-0.3699755669,
-0.2707994878,
0.1194070578,
0.1435606927,
0.0721820593,
-0.0227002576,
-0.0912800282,
0.2280843407,
-0.0796870887,
-0.3324356079,
0.287009567,
-0.2174522281,
-0.1486556083,
0.1948514879,
-0.0311843641,
-0.0018442385,
-0.2352986038,
-0.2655212283,
-0.147244826,
-0.4852221906,
0.2896815538,
-0.0403697789,
0.3086785078,
0.2429100573,
0.1440982968,
0.17795977,
0.1556588262,
-0.0546924844,
-0.1509626657,
-0.6362752914,
0.3917453587,
-0.1101356298,
-0.2303780019,
-0.0295006931,
-0.1555968225,
-0.0550975576,
0.3612909615,
-0.4562183022,
0.2379129827,
0.0702733397,
0.0834181905,
-0.0950674415,
-0.1340571344,
0.1914462745,
-0.1075465083,
-0.0603605621,
-0.2590094209,
0.0759437233,
-0.0122350045,
0.2527309656,
0.1833105683,
0.4013441503,
0.7469967008,
-0.0391616002,
0.2865435481,
0.3533920646,
0.1458688825,
0.5503773093,
-0.1300926208,
0.1602508724,
-0.2425832152,
-0.2188410759,
0.0596467443,
0.105084151,
-0.3196412027,
0.0274332743,
0.0012187846,
-0.3406587243,
-0.3240849078,
0.1244036555,
-0.3062013388,
-0.1882945001,
0.2014840245,
-0.0963938534,
0.1964116395,
-0.0394229591,
-0.0296398103,
-0.0032316111,
0.1153506637,
-0.0483283401,
0.265410006,
0.4285129309,
0.1289334744,
-0.0543235354,
-0.1830666065,
-0.3484932184,
0.0787644908,
0.2743042111,
0.6020604372,
-0.1669997573,
-0.1687550545,
0.0798476785,
-0.168412894,
0.4636309147,
-0.1258803755,
-0.0341539606,
0.3472771347,
-0.1242793351,
-0.0266533978,
-0.1190545186,
-0.0431698188,
0.3530089557,
0.1959492117,
0.6723822355,
-0.1772068739,
-0.2202008665,
0.1132564545,
0.0215651728,
0.0907035172,
-0.1562679708,
-0.292806685,
-0.1358121634,
-0.2019329071,
-0.065504238,
-0.0717765018,
0.2410787791,
0.0199556947,
-0.1312818527,
0.053600654,
-0.0730546638,
-0.1126661897,
0.0078034177,
0.2940388918,
-0.0325307846,
0.15934214,
0.0570227653,
0.5039331913,
0.2327843606,
0.513666749,
0.5314756632,
-0.4147781432,
0.1325848997,
0.0702450573,
0.1329937875,
0.1649884284,
-0.1350933164,
-0.1513893157,
0.1381043643,
0.2574624121,
-0.0355814844,
-0.0832139701,
0.2338192612,
-0.15558213,
-0.3567371964,
-0.4606521428,
0.2432615161,
-0.039202787,
0.1920532137,
0.7787451148,
-0.6046571136,
-0.1680705249,
0.1287045479,
-0.3274393082,
0.6506019831,
0.3056918383,
-0.012612409,
0.4230309129,
-0.1530072838,
0.4291077852,
-0.4506249428,
0.3880236447,
-0.1075448096,
-0.1895090044,
0.0136246011,
-0.1521779895,
0.3272459507,
0.1736507416,
-0.330124408,
0.1560814381,
0.0949872732,
-0.0261120368,
0.056402415,
0.0844661146,
-0.3410910964,
-0.1478554904,
-0.6056395173,
0.0822724551,
-0.1643426567,
0.3591600955,
0.119865112,
-0.3871606588,
0.0100031868,
-0.2189192772,
-0.1640436053,
0.4873071313,
-0.2205232978,
-0.0437987521,
-0.1201651841,
-0.6457443237,
-0.3231775463,
-0.1665349603,
-0.3695809841,
-0.1014872938,
-0.096880652,
-0.0140162269,
-0.156002745,
0.0815747231,
-0.4244862795,
0.2442319393,
0.1879111826,
-0.1447574198,
-0.0854346976,
0.1730189621,
-0.2793942392,
-0.5516795516,
0.2067952007,
-0.0945817083,
0.2443373501,
0.1387690753,
-0.0142799281,
0.018897783,
-0.1952124536,
-0.202106148,
0.131595701,
-0.140814513,
-0.3405293524,
-0.2667015195,
-0.1519019902,
-0.2008609176,
-0.1044819355,
0.2798333466,
0.0701383054,
0.3024793565,
0.3966616988,
-0.0176078305,
-0.0633014217,
-0.284956038,
0.0822027996,
-0.1994448751,
-0.0627177507,
0.145860821,
-0.0238583945,
0.1735637039,
-0.2250165343,
-0.0105745308,
0.1574331224,
0.0527800657,
0.031123817,
-0.4647314548,
-0.1359291375,
-0.1071504354,
-0.0055008866,
0.1117187589,
0.1044034809,
0.205255419,
0.1506942511,
-0.1848129332,
-0.2874044478,
-0.1490446925,
-0.179832682,
0.0388781838,
0.0197010636,
0.144513756,
0.3058992028,
0.0417762436,
0.1726239622,
0.1845808774,
0.1145530641,
-0.2760637701,
-0.1294751912,
0.1017442569,
0.147550717,
-0.1066456437,
-0.2568070292,
-0.0784027427,
-0.2397450656,
-0.0903132409,
0.1030202955,
-0.0890860111,
-0.0714162067,
0.2204837054,
0.3504036665,
-0.0414798968,
-0.1651161611,
-0.0696930736,
-0.202970922,
0.3246163726,
-0.1491925418,
0.0957459062,
0.0479336679,
0.0756747872,
-0.5871009827,
-0.0813037157,
-0.0964611024,
0.1543783396,
0.5952441692,
-0.4551479816,
0.031125553,
0.0455694981,
0.1699536145,
0.4789018333,
-0.1304555982,
0.0390132144,
0.1729508489,
0.1876670569,
-0.0484994873,
-0.0702740103,
0.1377955824,
0.1060288772,
-0.0637332723,
-0.0711322576,
-0.1525838971,
-0.1502205878,
0.099859558,
0.0143190548,
0.3330244422,
0.0458891243,
0.2113549411,
0.4080848694,
0.2017602921,
0.0718020648,
-0.3809927404,
0.0200542621,
0.0718999878,
-0.188730374,
-0.1524383128,
-0.1257037818,
0.0813988447,
0.1215053499,
-0.3927784562,
-0.3188355565,
-0.3502138853,
0.0856018662,
-0.1179062575,
0.4086128473,
-0.0059120096,
0.2030268759,
-0.206398502,
0.0338467807,
0.0438849404,
0.1606598496,
0.0185741317,
0.1159619242,
-0.5277092457,
-0.0310804322,
-0.0583054498,
0.038965404,
0.3544372618,
0.5155143738,
-0.0361988507,
0.2214540988,
-0.1061515063,
-0.1359118819,
0.0883780569,
0.1771473885,
0.3425748944,
-0.3739396334,
0.2876466513,
0.2135392874,
0.0820100754,
-0.0754377395,
0.0099539291,
0.3729596138,
0.3608309031,
0.0665017962,
0.0278088301,
0.0363487378,
-0.0933403596,
0.0266608074,
0.3354784548,
0.190485388,
-0.1879784614,
0.2221894562,
0.1101661325,
-0.0887120515,
0.3944173455,
0.0983027592,
0.1196608096,
-0.1152642667,
0.1943058074,
-0.2477380484,
-0.1086109206,
0.0640459657,
-0.3541445136,
-0.358768791,
-0.063477464,
0.2332485616,
0.1124904603,
0.0440792404,
-0.0250768736,
0.0849538743,
-0.1289325953,
0.2790076137,
0.2456027716,
-0.0800000876,
-0.1668444276,
-0.1844665408,
-0.2015264481,
0.1580558568,
-0.0404094085,
-0.1079187617,
0.2371382713,
0.3279324174,
-0.0682449639,
0.20604527,
-0.0900722444,
-0.1822009981,
-0.2946013212,
0.2807137072,
-0.3546518683,
-0.2369972467,
0.1787969023,
0.2335970849,
0.0910652727,
-0.4543964863,
0.2050724626,
-0.3312029243,
0.1178358272,
0.05539231,
-0.0305207893,
0.0156795159,
0.0668511093,
0.2356528938,
0.1621073186,
0.115546979,
-0.1349949837,
-0.1920707226,
-0.0728198439,
-0.1768476963,
-0.0183115155,
0.1458833814,
-0.0582505353,
0.50287503,
-0.0484359153,
-0.4014245868,
-0.4371392429,
0.4285812974,
-0.0439620689,
-0.4439986348,
0.0103936717,
0.0140107051,
-0.1760369539,
0.1818833351,
0.0124766156,
0.1777726114,
-0.0506042875,
0.0616824105,
-0.3085520864,
-0.1021585986,
0.594225049,
-0.422496736,
-0.3192535937,
0.3241406381,
0.1266874671,
0.1190700531,
0.1298956424,
-0.1965911984,
0.1324761808,
0.437204659,
-0.0283877328,
0.1215386689,
0.1597632766,
0.1152021959,
0.1851296276,
0.1178185567,
0.0776480883,
0.1725969464,
-0.2597602606,
0.1329277456,
-0.2140504718
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Hi !
If we want something more general, we could either
1. delete the extracted files after the arrow data generation automatically, or
2. delete each extracted file during the arrow generation right after it has been closed.
Solution 2 is better to save disk space during the arrow generation. Is it what you had in mind ?
The API could look like
```python
load_dataset(..., delete_extracted_files_after_usage=True)
```
In terms of implementation, here are some directions we could take for each solution:
1. get the list of the extracted files from the DownloadManager and then delete them after the dataset is processed. This can be implemented in `download_and_prepare` I guess
2. maybe wrap and mock `open` in the builder to make it delete the file when the file is closed. | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 129 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Hi !
If we want something more general, we could either
1. delete the extracted files after the arrow data generation automatically, or
2. delete each extracted file during the arrow generation right after it has been closed.
Solution 2 is better to save disk space during the arrow generation. Is it what you had in mind ?
The API could look like
```python
load_dataset(..., delete_extracted_files_after_usage=True)
```
In terms of implementation, here are some directions we could take for each solution:
1. get the list of the extracted files from the DownloadManager and then delete them after the dataset is processed. This can be implemented in `download_and_prepare` I guess
2. maybe wrap and mock `open` in the builder to make it delete the file when the file is closed. | [
-0.0422240831,
-0.052078262,
-0.1375647038,
0.2491360456,
-0.0890203565,
0.1040987894,
-0.119827643,
0.1847192347,
0.2342313379,
0.240758568,
0.1567286849,
0.5178810358,
-0.3404893577,
-0.0508523807,
-0.1349282861,
-0.020200571,
-0.1992253661,
0.3400243819,
-0.0047850311,
0.2303297669,
-0.2209787071,
0.0262251403,
0.0232039988,
-0.1026178151,
0.0811790824,
-0.3859205246,
0.1359875798,
-0.1867466271,
-0.1622754931,
-0.5164058805,
0.0541751683,
0.5212089419,
0.2322491854,
0.0971320719,
-0.0001223348,
0.03224805,
0.259151876,
0.0799543411,
-0.4075616598,
0.1244009882,
-0.1461260766,
-0.2453015149,
0.2597363591,
-0.1671174765,
0.2101425827,
-0.5648963451,
-0.2238961309,
-0.6139017344,
0.5910026431,
-0.0977442786,
0.0498434082,
0.1384616345,
-0.3260315061,
0.2452622652,
0.2004277408,
0.2770323157,
-0.0424005799,
0.022367008,
0.4151896238,
0.0967545733,
0.1619672924,
0.3807040453,
-0.0550239645,
-0.1603197157,
0.4445160925,
0.0631317869,
-0.0319241397,
-0.4852728546,
0.1398252547,
-0.0066928184,
0.7061526179,
-0.4330635667,
-0.2672888339,
-0.4574387372,
0.028046973,
-0.5922440886,
0.0385921039,
0.2951567173,
-0.1211811155,
0.2089287937,
-0.1103958562,
-0.4544367194,
-0.3733915091,
-0.0871407241,
0.6077165008,
-0.3243744671,
-0.0568624064,
-0.0656688511,
0.3697438836,
0.0736786947,
0.2949276865,
-0.2698957324,
-0.139909938,
0.5059065819,
-0.0271435343,
-0.1845746934,
-0.2607628703,
-0.2897100151,
0.1194356233,
0.3029821217,
0.3516385257,
-0.007010649,
0.1930617541,
0.1110152155,
0.1876700372,
0.3751331568,
0.0078878775,
-0.0530543327,
0.1721743941,
0.2076801211,
0.0642983466,
-0.0915423781,
0.0383335873,
-0.1278784126,
0.3636782765,
0.0154573545,
0.0716330558,
0.0261882246,
-0.1650816649,
0.0782494619,
0.1291302294,
-0.1351673901,
0.1513490379,
0.2670408785,
0.0587308556,
0.1620470285,
0.2158886194,
0.2350442559,
-0.0299418867,
-0.1465884149,
0.1376227736,
0.0731804073,
-0.2401809394,
-0.1884092093,
0.3641346097,
-0.0083346218,
0.04164166,
0.0005882457,
-0.3138784766,
-0.0641820729,
0.6676414609,
-0.0993858129,
0.2807013094,
0.342197001,
-0.1093471497,
-0.2436191887,
-0.3248208761,
-0.1198693886,
-0.1965584308,
0.5875698328,
-0.1568875611,
-0.317016989,
-0.1368436366,
0.1290899366,
-0.0270508379,
0.243729189,
-0.5556284785,
0.1172114238,
0.1631527543,
0.0627302378,
-0.0224353932,
0.2961558402,
-0.0586103685,
-0.1787773818,
-0.1893479824,
0.3691440523,
-0.5007241964,
-0.1223105639,
-0.3205632567,
-0.1797676086,
0.1424595118,
-0.0010876022,
-0.123974666,
0.3791064918,
-0.2620406151,
0.0915973336,
0.5124639273,
-0.1815717518,
-0.4231871367,
0.1482756883,
0.110098362,
0.2711137533,
0.3149678707,
0.2507961988,
0.2787887156,
0.0021170229,
-0.038488321,
0.4016494751,
0.0736520067,
0.0040992275,
-0.2239467055,
-0.4116461873,
0.0513558276,
0.2471982837,
-0.0207931362,
0.0398835726,
0.0623965785,
-0.1024290919,
0.3069232702,
0.0978259519,
0.1519833803,
0.1327219009,
0.1448922753,
-0.248571977,
-0.2080590576,
0.0697805583,
-0.5534025431,
0.173768878,
-0.5192010403,
-0.2917678952,
-0.4091204703,
-0.3444458842,
0.0820593089,
0.1959256828,
-0.2989020348,
0.1966814995,
0.0327641405,
-0.1894044876,
0.2831683159,
-0.0064169914,
-0.4284305573,
0.0199058,
-0.1408996135,
0.1741945744,
-0.4501318634,
0.1040372252,
0.2124264836,
-0.1986986101,
-0.1110477746,
-0.0094024315,
-0.2910375893,
-0.3422916532,
-0.0936389863,
0.2829712331,
0.3651205599,
0.2683432698,
0.1073638946,
0.2281974554,
0.2203880548,
0.2218502015,
0.0824293494,
0.2590487599,
0.0871411189,
0.1824861318,
-0.229126364,
0.5258799195,
-0.0765102133,
0.0241307858,
-0.1283983737,
-0.3022352159,
0.2240569443,
-0.0017422661,
0.01285965,
-0.4730242491,
-0.0542873293,
0.3683066964,
0.1288885623,
0.0917662233,
0.1476072222,
-0.0150871389,
0.0925109088,
-0.1031510532,
-0.1026701331,
0.3242188394,
-0.069617793,
-0.1613182127,
0.057330206,
0.4151656032,
0.448120594,
0.0921722353,
-0.1154636592,
-0.0787659809,
0.4702811539,
0.051421009,
0.268476218,
0.1953538209,
0.0813861713,
0.3618116379,
0.168240726,
-0.0622613616,
-0.2748677433,
-0.0914835557,
0.0715451017,
0.2726359367,
0.2208339423,
-0.0611379407,
-0.1839367002,
-0.2929827571,
0.2759947777,
0.125220716,
0.2172902077,
-0.0161958039,
0.4093544483,
0.0779332221,
-0.3893389404,
0.0748198852,
0.008211799,
0.5284098387,
-0.0873367786,
-0.2672451735,
-0.3404185772,
-0.1312679201,
0.2366929352,
-0.0275298096,
0.3818286955,
-0.19845514,
0.510712862,
0.0785910711,
0.0959746987,
-0.0302718636,
-0.0918451026,
0.061534021,
0.4084801078,
0.0522788242,
0.1331735104,
0.1684497595,
0.1248738766,
0.0609199665,
-0.1308314651,
-0.2205234021,
-0.0963044167,
0.1561928093,
0.0524339564,
0.0963249207,
-0.2165248543,
-0.0163152553,
-0.3071953356,
-0.3777162135,
0.2557629347,
0.1072918624,
0.137236312,
0.08451204,
0.2943948805,
-0.058756642,
0.1412729919,
0.0703830123,
0.0453879088,
-0.5879278779,
0.1189820021,
-0.2073391676,
0.0725700408,
0.307482183,
-0.1221041828,
0.0604233593,
0.3388396204,
-0.3763494194,
-0.0693923235,
-0.0415730551,
0.2056569457,
-0.2972854376,
-0.0365346223,
0.1967597455,
0.332067281,
-0.0217488222,
0.0054504946,
0.2608991861,
0.1648941487,
0.240036726,
0.0658641309,
0.2286017835,
0.2869085968,
0.0574269146,
0.4774220586,
-0.1240692958,
0.0212158915,
0.3330624104,
0.322478652,
0.3370012939,
-0.2226608098,
0.2584810257,
-0.5167127848,
-0.0704164058,
-0.1229768097,
0.0886603296,
0.145204559,
-0.1283568144,
0.0905670375,
-0.1557758152,
-0.2041721046,
-0.185889259,
0.3037091792,
-0.3123895228,
0.0866003036,
-0.0249371976,
-0.2253082395,
-0.1689938009,
-0.0579381697,
0.0685017109,
0.1171314418,
0.5481665134,
-0.1229561418,
-0.0619337708,
-0.0753129125,
-0.3717125058,
0.2466867417,
-0.1443479657,
-0.2700845301,
0.1441916376,
0.0228028521,
0.1901639551,
0.0920122117,
0.2852838039,
-0.0214636307,
-0.0921424776,
-0.1937488467,
-0.0241021216,
-0.3323917091,
0.0090946406,
0.059958525,
0.0449145399,
-0.1582286209,
0.3985444903,
-0.3091912866,
-0.192460373,
-0.3509972394,
0.6400805116,
-0.2645500302,
-0.0694293231,
-0.1440260559,
-0.3062005639,
-0.6328192353,
0.0667907223,
0.0798802152,
-0.0590770021,
0.1539487243,
-0.3315375447,
-0.1019189358,
-0.1806176305,
0.0187126324,
0.0143039338,
0.6302096248,
-0.3630811274,
0.0931549892,
-0.1307260692,
0.0234385096,
0.4154004157,
0.309586823,
-0.0904392004,
-0.1662481427,
-0.0879405588,
-0.2519860864,
0.0639649034,
0.168466419,
-0.2705994248,
0.4433527589,
-0.1818030626,
0.5496019125,
-0.1045353562,
-0.0213434659,
-0.07653822,
-0.2536762357,
0.004494004,
-0.454815954,
0.2276912779,
0.0446159318,
-0.1759064049,
0.5514414907,
-0.0850599557,
-0.2699745595,
0.5203490853,
0.0690077692,
1.0979146957,
-0.0484184548,
0.0587538965,
-0.0167363919,
-0.2775871754,
0.3807531893,
-0.4976661205,
0.2090118527,
-0.0645463243,
-0.0310500562,
0.0491860434,
-0.0622940212,
0.0427285507,
0.2365064025,
-0.1930375099,
0.123034656,
-0.390476048,
-0.1313733011,
-0.2855243087,
0.3503835201,
-0.2633568347,
-0.2937427163,
-0.2429059148,
-0.042314332,
0.0437843949,
0.0046021584,
-0.3125767708,
-0.0823145211,
0.3401920199,
-0.062388204,
0.2848977149,
-0.1401858926,
-0.3396236897,
0.3695366383,
-0.1837325692,
-0.1763910502,
-0.2778176069,
0.2090360522,
-0.2893453538,
-0.0132780839,
0.1523065865,
0.0673094541,
0.0064269174,
0.0233528391,
-0.332041502,
-0.000707116,
0.0622994676,
-0.1600415409,
0.0114368945,
0.2037500441,
-0.3674550653,
-0.3369386792,
0.215146333,
0.1448114961,
-0.0885298029,
0.0572300553,
-0.3552042544,
-0.2007966042,
-0.4958282411,
0.0858130157,
0.0628236234,
0.3129727244,
-0.2482841164,
0.2814536095,
-0.3506731987,
-0.1324829161,
-0.1104249656,
-0.2255332917,
0.2954696715,
-0.0500767194,
0.3738798797,
-0.1685557961,
-0.2155814767,
-0.3375291824,
0.0205048323,
-0.017895624,
-0.4794528186,
0.4637893736,
0.1569730937,
-0.07216236,
0.0354017206,
0.0089944908,
-0.0942447782,
0.0493264198,
-0.1572987437,
-0.1785902083,
-0.5771639943,
0.2368874401,
0.2657475471,
0.4896398783,
0.0345771611,
-0.1116782278,
-0.1058107242,
0.032958284,
-0.2004257143,
0.2264086902,
0.2059654593,
0.1356118321,
-0.0961439535,
0.2747271061,
0.0138174593,
-0.2292103022,
-0.1126266718,
0.0334488042,
-0.1656562686,
-0.1269177645,
-0.1983716488,
0.1402418911,
-0.0914145336,
-0.1350335479,
-0.0911220759,
-0.2899680436,
0.0810251012,
-0.1910167933,
0.2622933388,
-0.2783587575,
-0.1321273148,
-0.1273306608,
0.37508744,
0.0331165567,
-0.251036346,
0.2264987826,
-0.1331767589,
0.4104572535,
0.0275571458,
0.0273097679,
-0.0992767215,
-0.0567129329,
-0.2499888241,
0.0564191118,
0.2500877082,
0.0263426937,
0.1521476805,
-0.0712459981,
-0.0994434655,
-0.0005780756,
0.1916673183,
0.2741945386,
-0.069949694,
-0.0008063316,
-0.0776973739,
0.175611943,
-0.2982021868,
-0.1586705148,
-0.0591924973,
-0.0076437108,
-0.1619357467,
0.2961511612,
0.2256489247,
0.0899926722,
-0.1198942438,
0.1513802111,
0.3126502931,
-0.2347841412,
0.2393760979,
0.369867444,
0.0780754238,
-0.1059270352,
-0.0545850769,
0.3103902042,
0.2109913826,
-0.0467234515,
-0.2592593431,
0.4465028942,
0.5072870851,
0.2389117628,
-0.5002034307,
-0.3075029254,
-0.2232684493,
0.5195418596,
-0.0814840347,
0.368180871,
0.4082185328,
0.2382926047,
0.2595689893,
-0.2480432391,
-0.135873422,
0.5102299452,
0.0621814951,
-0.067664288,
0.0678964779,
-0.1146045178,
0.1157869548,
0.1046570539,
0.1796215177,
0.1921071112,
-0.1854076087,
0.3415930867,
0.0732641816,
0.2138112783,
0.4533453882,
0.2281687111,
0.4140398204,
-0.2492752969,
-0.2296026647,
0.2814235389,
0.2110305578,
-0.1215109378,
-0.174724862,
0.0849730223,
0.1095458493,
-0.4609770477,
0.0860373303,
0.070716083,
0.0760111362,
-0.2645120323,
0.3912461698,
0.2391768992,
-0.0945055634,
-0.0702005029,
0.0254680291,
-0.1013296768,
0.0878038928,
0.1649088413,
0.2344885319,
-0.1868003309,
-0.0388956591,
0.2961953282,
-0.471298933,
-0.020624619,
-0.1165809631,
-0.1584407985,
-0.0656103715,
0.2926980257,
-0.1955595464,
-0.0210691318,
-0.1047487482,
0.0503780805,
-0.2902585566,
0.2498257756,
0.1887844801,
-0.1815609485,
-0.3060781062,
-0.2786379158,
-0.3781635165,
-0.2545593083,
-0.1980646104,
-0.0352442153,
0.2598965764,
0.1381268203,
-0.0356416255,
0.1969053447,
0.0324111655,
0.0291325673,
0.0739199668,
0.1020734757,
-0.4914735556,
0.0756241083,
0.1766170412,
0.1397941113,
0.0936073959,
-0.5097524524,
-0.3088515699,
-0.1815599501,
-0.0467218757,
-0.0911014378,
0.2209638953,
0.2755781412,
0.6003807783,
0.7884602547,
-0.1086814925,
-0.2611300945,
-0.0246223509,
-0.2064300478,
0.0625543669,
-0.0551165566,
-0.0832702518,
-0.2104489952,
0.3017950356,
0.3111484051,
-0.2844792902,
0.3605869412,
-0.3408157527,
-0.2436242849,
-0.146689862,
0.0409393162,
-0.2627131641,
-0.0334499739,
-0.0489039756,
0.4001444876,
0.0136864148,
0.2550776005,
0.0295580644,
0.0588342026,
-0.3597675264,
-0.025477495,
0.3839750886,
0.1979368478,
-0.2956696749,
0.407986939,
0.1053550839,
0.0487203598,
0.0305682477,
-0.3500059247,
0.2871959805,
0.1400468349,
-0.3088757098,
-0.0610061586,
0.2714015543,
0.0102574676,
0.0061123222,
0.1072331965,
0.4342740476,
0.2631799877,
0.0932724774,
-0.4791612625,
-0.2532895207
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Also, if I delete the extracted files they need to be re-extracted again instead of loading from the Arrow cache files | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 21 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Also, if I delete the extracted files they need to be re-extracted again instead of loading from the Arrow cache files | [
-0.0280627087,
-0.1268454194,
-0.1462640166,
0.1517366171,
-0.1755875796,
0.1943834424,
-0.2197524309,
0.2515497804,
0.1799503863,
0.163849771,
0.1056417599,
0.4813866913,
-0.2407221347,
-0.1040745005,
-0.1887399107,
-0.0030700048,
-0.2355996519,
0.2889701724,
-0.0076107383,
0.162108466,
-0.135131225,
0.0150678027,
0.0465385318,
-0.1541213691,
0.0537764169,
-0.4090360701,
0.206112653,
-0.2602270544,
-0.110286355,
-0.3523693085,
-0.0030771866,
0.5342470407,
0.276607275,
0.1419578344,
-0.0001208869,
-0.014273636,
0.2875988185,
0.0723435283,
-0.408996135,
0.2255584598,
-0.2436763942,
-0.103128314,
0.2598849535,
-0.1265428066,
0.2946943045,
-0.408439517,
-0.2041456401,
-0.649734199,
0.5037790537,
-0.2386166751,
0.0973826572,
0.0096097812,
-0.5454067588,
0.1060435101,
0.3338084221,
0.3475065529,
-0.131041944,
-0.0081456024,
0.4774484932,
0.1009966657,
0.2767945826,
0.3542627096,
-0.0738359988,
-0.2929219902,
0.3386685848,
-0.0257927701,
-0.0745977685,
-0.2595770955,
0.2915353477,
0.0246846564,
0.6543718576,
-0.3459972143,
-0.0916246623,
-0.3327180445,
0.1247221678,
-0.5869956613,
0.0834859312,
0.1749038994,
0.0470301434,
0.2470873445,
-0.1042246222,
-0.4791459441,
-0.3593366444,
-0.1478557289,
0.6762896776,
-0.4306482077,
-0.0751290023,
-0.1268769801,
0.5420332551,
0.1520414352,
0.2174187899,
-0.1760032028,
-0.3039320707,
0.4096333683,
-0.0656303465,
-0.1792777628,
-0.4102027416,
-0.2998043001,
0.1566985101,
0.1752880663,
0.425445348,
-0.0052141733,
0.1747296005,
0.0212201886,
0.2458347231,
0.3867217004,
0.0701312125,
-0.0618340448,
0.1884943247,
0.1172564179,
0.1380645931,
-0.049279321,
0.0289422013,
-0.0381846242,
0.2580288649,
0.0199353769,
-0.0384121053,
-0.1320513487,
-0.0718105063,
0.0647789314,
0.2061201781,
-0.1974594295,
0.086588636,
0.1973827481,
0.2360133976,
0.0340709127,
0.0615366027,
0.2982642353,
0.0124634579,
-0.3605466485,
0.1215327829,
0.122191146,
-0.3169589937,
-0.2377638519,
0.4114533663,
-0.0058698617,
-0.04180035,
-0.127721861,
-0.3367881775,
0.0653979555,
0.5076660514,
-0.1196556687,
0.2788883746,
0.2771743238,
-0.19640176,
-0.2270882726,
-0.2803885639,
-0.0114322081,
-0.1321523488,
0.5104100108,
-0.1253011078,
-0.2173404396,
-0.0665487573,
0.1125039533,
0.152828604,
0.2723377347,
-0.5884195566,
0.1173690706,
0.1026505828,
0.0425824374,
0.0408397913,
0.3486082852,
0.0186310932,
-0.0803234428,
-0.3321527839,
0.259816885,
-0.6571012139,
-0.0888551772,
-0.3545110822,
-0.2567662597,
0.2115153521,
0.1125073135,
-0.1175073981,
0.2376222312,
-0.1577702761,
0.1594098806,
0.3421446681,
-0.093567349,
-0.3924855888,
0.1546454877,
0.0958269238,
0.1922515035,
0.3176068068,
0.3045808077,
0.3846732974,
0.0386507809,
-0.0686704963,
0.2615580559,
0.0880156606,
-0.108370021,
-0.3247458339,
-0.4044739604,
0.0343364142,
0.2238271534,
-0.0033789598,
0.0553450435,
0.2231910527,
-0.0305487178,
0.1710039973,
0.1498517394,
0.1663508117,
0.1606842428,
0.1390222162,
-0.2714567482,
-0.2364158481,
0.1407705545,
-0.6055963039,
-0.0088955313,
-0.5798180699,
-0.3777630627,
-0.182852298,
-0.3519935608,
0.1315583736,
0.0131071061,
-0.1980333626,
0.1989232749,
0.0346166156,
-0.0616226457,
0.2489037067,
-0.0277930833,
-0.4232953787,
-0.01714666,
-0.094081834,
-0.0000205748,
-0.4419444501,
0.1254568547,
0.1512193233,
-0.2590887547,
-0.0199726671,
0.0140803345,
-0.287511766,
-0.4913885593,
-0.1318502575,
0.2647312284,
0.3056977093,
0.2912361026,
0.2880560458,
0.2514718771,
0.1814326495,
0.1652215719,
0.1045264155,
0.159960717,
-0.0176253859,
0.0884640068,
-0.3933171332,
0.3887655139,
-0.2242786884,
-0.0352118611,
-0.1823386252,
-0.392252028,
0.2207525969,
-0.1020584181,
0.112998195,
-0.5385865569,
0.0472975075,
0.3436099589,
-0.1163012609,
0.0287124608,
0.1037618741,
-0.1153913736,
-0.0062075304,
-0.0449937992,
-0.1471544653,
0.3006249368,
-0.0148152933,
-0.1625532359,
0.078936249,
0.3862736821,
0.3511198759,
0.1766190976,
-0.1846852899,
-0.1630650014,
0.457921207,
-0.0095848702,
0.1368842721,
0.0368468016,
0.0184979998,
0.3677565157,
0.0602164976,
-0.0062987171,
-0.2424095422,
-0.0591290742,
0.1128255799,
0.210131675,
0.28193295,
-0.2630927265,
-0.276941359,
-0.4187938273,
0.4745364785,
0.3225940764,
0.2582393885,
-0.018371433,
0.5235859156,
0.0613531135,
-0.4129446745,
0.069545038,
-0.019826822,
0.6686823368,
-0.1250791848,
-0.2156374902,
-0.4043355882,
-0.1886479408,
0.1578583717,
0.0167336874,
0.3731069565,
-0.101244539,
0.5151020288,
0.1303831935,
0.1142641455,
-0.0901172757,
-0.0323506072,
0.0783113837,
0.3688563406,
-0.0753834248,
0.0812373608,
0.1757232696,
-0.0526802763,
0.1216849089,
-0.1933172941,
-0.2980669737,
-0.1248314008,
0.1577712744,
0.0885913223,
-0.0213488024,
-0.2257020473,
-0.0321052596,
-0.1681331247,
-0.3950458169,
0.2272085845,
-0.0255390741,
0.0000477415,
0.1141300425,
0.2313454449,
0.0122269578,
0.0164260343,
0.0707679093,
-0.0095830932,
-0.5886601806,
0.1329727918,
-0.208015129,
0.0741184801,
0.2229173332,
0.018606104,
-0.0014540898,
0.348713696,
-0.3909088671,
0.0475145653,
0.0179734807,
0.1181500703,
-0.3372396827,
-0.0764739215,
0.2148704678,
0.231320709,
-0.0852176249,
0.0311031714,
0.1433143318,
0.2431012988,
0.3958517015,
0.1196725219,
0.0834096298,
0.2145754099,
0.1187928617,
0.3881931007,
-0.2566871643,
0.0381415486,
0.319503963,
0.3901723325,
0.4156243503,
-0.190815568,
0.2777891755,
-0.4188166857,
0.0556620359,
-0.0858858302,
0.1190651953,
0.0261616111,
-0.1459259987,
0.1614794284,
-0.2239906192,
-0.1283928007,
-0.0923645124,
0.3123983741,
-0.2337029278,
0.0603834391,
-0.0057247505,
-0.2973091006,
-0.0169654116,
-0.0230033845,
0.1660928428,
0.1780428588,
0.4248472154,
-0.106580101,
-0.2460838258,
-0.0765041411,
-0.1745066941,
0.323702246,
-0.2353145033,
-0.2074516416,
-0.0801078603,
0.0300732926,
0.1610287428,
0.2512598336,
0.3416737318,
-0.1118746251,
-0.0361465663,
-0.167520225,
0.0489434004,
-0.2440117151,
-0.025270015,
-0.0103167221,
0.0381948389,
-0.0038877493,
0.4042283297,
-0.2591196597,
-0.1607069075,
-0.2055032253,
0.5759974718,
-0.2591154873,
-0.0916464478,
-0.0329356864,
-0.1711937785,
-0.5231108069,
0.0666253567,
0.0182753354,
-0.1166658849,
0.1697264612,
-0.3050324321,
-0.0972609669,
-0.3248195946,
0.0477094986,
0.0438212939,
0.5563676357,
-0.2645009458,
0.0622154474,
-0.1286520958,
0.1483028531,
0.5444574952,
0.2043477446,
-0.0919582844,
0.0192480106,
0.0162743442,
-0.3969777822,
0.1736553013,
0.1599514782,
-0.2013666928,
0.3397914767,
-0.2212539017,
0.5212978125,
0.0699872971,
-0.0226436649,
-0.205865413,
-0.3038176,
-0.0185764618,
-0.1665754616,
0.115005672,
0.0280129686,
-0.1756879985,
0.4709265232,
-0.1054575145,
-0.2438370883,
0.4904082716,
0.0997255519,
1.1869291067,
-0.0977287889,
-0.0377991758,
-0.2128302753,
-0.282096982,
0.2717680633,
-0.5684894323,
0.1390947104,
0.0268346965,
-0.0716795921,
0.1070433557,
-0.0506125204,
0.0369740576,
0.2111319304,
-0.2481747121,
0.0501421466,
-0.3473036289,
-0.158104524,
-0.288477391,
0.3806918263,
-0.0826267675,
-0.2182890326,
-0.0489720106,
-0.023917187,
0.0337179266,
-0.0894676819,
-0.241253525,
-0.0738156736,
0.370157361,
-0.0102720559,
0.3230470419,
-0.131590426,
-0.2649992406,
0.3628645539,
-0.1891300529,
-0.1291916817,
-0.2284800857,
0.0440042242,
-0.2324737906,
0.0319454148,
0.1362994611,
0.0124499723,
0.0906264782,
-0.0633031428,
-0.4203029573,
0.0675699785,
-0.1030762345,
-0.1273814142,
0.0338451862,
0.1527556926,
-0.2764270604,
-0.3605757356,
0.1511141807,
0.1476822793,
-0.1120918691,
0.0539427139,
-0.2646897137,
-0.1267176718,
-0.5518772006,
0.0999611989,
0.0886902213,
0.2987125516,
-0.1719683409,
0.2865865827,
-0.165457055,
-0.147064507,
-0.2052552104,
-0.1596969664,
0.2845781147,
-0.1546221673,
0.2459612489,
-0.2449814528,
-0.2290403992,
-0.4594869316,
-0.0160059258,
-0.0629502088,
-0.3975656033,
0.4622120857,
0.0260997601,
-0.1692353338,
0.0772050992,
-0.0973460749,
0.0437743142,
0.0307617467,
-0.1405875683,
-0.1074348986,
-0.4702297747,
0.2746435404,
0.2288829982,
0.5749305487,
0.0355821326,
-0.0146398265,
-0.1230107695,
0.1055090576,
-0.2284844071,
0.2524850965,
0.2734742761,
0.1581346244,
-0.0451624282,
0.2865174115,
0.0547465198,
-0.2374957353,
-0.0978448391,
0.0568666682,
-0.1206638068,
-0.158670783,
-0.1071337312,
0.1126030609,
-0.1398204565,
-0.1054829806,
-0.1901089847,
-0.2603548467,
0.0911476612,
-0.1766230911,
0.2107423544,
-0.2486182898,
-0.1409255266,
-0.1472359747,
0.4561418295,
-0.0292982124,
-0.0877421871,
0.1730326563,
-0.0714689046,
0.3503181636,
-0.0195527822,
-0.0122251436,
-0.0435414389,
-0.0748710483,
-0.3222391903,
0.067705512,
0.3231784701,
0.0681732744,
-0.0155769493,
-0.0005591894,
-0.0903895944,
0.0692130327,
0.0420606658,
0.2573960423,
-0.0696022213,
-0.1179597229,
-0.0512683839,
0.1871218681,
-0.2150456011,
-0.1542570442,
-0.063514784,
0.0174148157,
-0.2230871767,
0.2765959501,
0.3653719127,
0.0691098124,
0.0669684932,
0.0881163552,
0.2617769241,
-0.2271983027,
0.3391409218,
0.3206993341,
0.0553323478,
-0.241157487,
-0.1346067041,
0.2819796205,
0.1234783158,
-0.1622909904,
-0.1784496903,
0.3938891292,
0.5958598256,
0.3432157338,
-0.5122551322,
-0.2275398672,
-0.2946730256,
0.6062334776,
-0.0741073042,
0.4444572031,
0.4342081547,
0.175813213,
0.3189775646,
-0.2883319557,
-0.2041719854,
0.412907958,
0.0876332074,
0.0666525662,
0.0287965685,
-0.1246609464,
0.1117319763,
0.1013870537,
0.144933641,
0.4016495645,
-0.1080210656,
0.3295118809,
0.0834282935,
0.2578529119,
0.5938125253,
0.185158968,
0.4273990095,
-0.1433628201,
-0.2068376541,
0.2007969469,
0.2718921602,
0.0493028127,
-0.1012153476,
-0.0775127411,
0.1623558402,
-0.3642906249,
-0.0038274825,
0.0908985436,
0.0632567555,
-0.2624428868,
0.4751575291,
0.2595595419,
-0.2415836751,
-0.0355232731,
0.0558044314,
-0.0822853744,
0.170440495,
0.0924598053,
0.2030280679,
-0.0839181021,
-0.2313919216,
0.3846431375,
-0.4732674062,
0.0324263349,
-0.1434433609,
-0.0942881554,
0.0122138485,
0.2725040317,
-0.2859966457,
0.0040992871,
-0.0526314229,
0.0566741414,
-0.2232702672,
0.2803291678,
0.2043564022,
-0.3420992494,
-0.2589806616,
-0.3161489964,
-0.2175915986,
-0.2054595947,
-0.2143555582,
0.0308528394,
0.2443350703,
0.2561448216,
-0.0242516994,
0.2262444049,
0.2455411702,
-0.1379128844,
-0.0417930037,
0.0555959344,
-0.4732879996,
0.143389374,
0.3838847876,
0.2196657509,
0.1469880641,
-0.4231846333,
-0.2671886981,
0.0411408208,
-0.0139269903,
-0.1904659867,
0.2165525705,
0.1297935545,
0.7412775159,
0.6710227728,
-0.1407819241,
-0.3098007143,
-0.0868345797,
-0.188519001,
-0.0123667084,
-0.125013575,
0.0300796442,
-0.1888546646,
0.4749765694,
0.2099931985,
-0.2864179015,
0.2727653086,
-0.286182493,
-0.2152548581,
-0.1712093949,
0.2367957085,
-0.2296844125,
-0.0501833335,
0.0234884322,
0.4224822223,
-0.0384048745,
0.1940825582,
0.0690298826,
0.0839973986,
-0.360106945,
0.0329034552,
0.3062989116,
0.3926435709,
-0.3070216179,
0.5346332788,
0.1490333378,
0.0852204561,
-0.0019344743,
-0.2796180546,
0.2397044599,
0.1016342789,
-0.2820930779,
0.0436745137,
0.289792031,
-0.0310824532,
-0.0459958427,
0.1021827757,
0.2989758849,
0.3729034662,
0.0405287668,
-0.4589452147,
-0.2643266916
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | I think we already opened an issue about this topic (suggested by @stas00): duplicated of #2481?
This is in our TODO list... 😅 | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 23 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
I think we already opened an issue about this topic (suggested by @stas00): duplicated of #2481?
This is in our TODO list... 😅 | [
-0.0192103386,
-0.1269762218,
-0.1481828988,
0.0798468143,
-0.1321692765,
0.1765157878,
-0.198702246,
0.2431637794,
0.2124013454,
0.2022786438,
0.1615423858,
0.4751732349,
-0.2215890735,
-0.0703336522,
-0.2046112567,
0.0402211584,
-0.1827222407,
0.2646827698,
0.0021856744,
0.1824558675,
-0.1406532973,
0.0362733006,
0.0394840688,
-0.1689869314,
0.0975503176,
-0.3767840862,
0.2147900164,
-0.2744057178,
-0.1201766059,
-0.3621689975,
0.0429046005,
0.5484213829,
0.2381388545,
0.1525385678,
-0.0001205524,
-0.0380502716,
0.2979128957,
0.1006245911,
-0.4042671323,
0.175779596,
-0.2399449497,
-0.1098073274,
0.2304791808,
-0.1402706206,
0.275436759,
-0.3210345209,
-0.1625757068,
-0.6223294735,
0.4326827526,
-0.2468685657,
0.0960134789,
0.0167479143,
-0.5319136381,
0.0954351723,
0.3050425351,
0.4185585976,
-0.1824690402,
-0.0573914126,
0.5388316512,
0.0341584682,
0.2726577818,
0.3712635934,
-0.0588137694,
-0.2781785429,
0.3521534503,
-0.0666617826,
-0.0870363191,
-0.2991165519,
0.2780793905,
-0.0211907737,
0.6806835532,
-0.3543689251,
-0.1248813272,
-0.3069050908,
0.0766368657,
-0.5461725593,
0.1264317781,
0.179912746,
-0.0215024985,
0.2723223865,
-0.1678594649,
-0.4257776737,
-0.3638317883,
-0.1120301187,
0.686694622,
-0.3886206746,
-0.0511008017,
-0.1442258507,
0.5321466327,
0.1710868031,
0.203884244,
-0.0841105953,
-0.2778002024,
0.416786015,
-0.0302321203,
-0.1976915598,
-0.3469559848,
-0.3571131527,
0.2482503802,
0.172357887,
0.4253971577,
-0.0317953601,
0.1785061359,
0.0627933592,
0.2811261415,
0.3864464164,
0.0619173944,
-0.1031349748,
0.2124249041,
0.1001008675,
0.150651902,
-0.0452674963,
0.1101079881,
-0.010606274,
0.2505975962,
0.0307719186,
-0.0374101028,
-0.1456223428,
-0.0515754372,
0.0740639567,
0.2023869157,
-0.1960344166,
0.066668056,
0.1708455682,
0.2334367633,
0.0534012541,
0.0713053942,
0.3021497428,
-0.0025233701,
-0.3367944062,
0.1256251633,
0.1341756135,
-0.3137155473,
-0.2757600546,
0.4017679691,
-0.0329741053,
-0.0375759266,
-0.0856450796,
-0.3078610003,
0.0509176925,
0.5031173229,
-0.0553310364,
0.2366698682,
0.3152057827,
-0.1929735988,
-0.249615401,
-0.2744355798,
-0.0515333936,
-0.1477897465,
0.4894921184,
-0.1400500089,
-0.2936851084,
-0.1132902205,
0.1049485654,
0.1574420631,
0.2329838127,
-0.5811306238,
0.1551565379,
0.0752397031,
0.0513778627,
-0.029490009,
0.4142984152,
-0.013343662,
-0.0749279112,
-0.3167108297,
0.2698729634,
-0.6963499784,
-0.0778398439,
-0.3436827958,
-0.2515712082,
0.20949018,
0.1533281803,
-0.1195057333,
0.1820372343,
-0.1769448817,
0.1597189605,
0.2982472479,
-0.1038845852,
-0.3767283559,
0.1588909328,
0.0618310347,
0.1861559749,
0.3381637633,
0.3027476072,
0.3510043621,
0.0028313026,
-0.0717588216,
0.3363140225,
0.0428751037,
-0.0459025986,
-0.3771966696,
-0.4258616567,
0.1138879359,
0.2161459327,
0.0186995622,
0.0835733861,
0.2645460069,
0.0252898149,
0.1387608945,
0.1308914125,
0.1084436923,
0.1359110028,
0.1836428046,
-0.2509691119,
-0.2359624207,
0.1677514017,
-0.5864217877,
-0.03307309,
-0.5517912507,
-0.294354558,
-0.1435649544,
-0.3622751832,
0.1396680176,
0.0530987009,
-0.147879675,
0.1732766628,
0.0387974754,
-0.0886314064,
0.2117042989,
-0.0261979923,
-0.4154312909,
-0.0330970883,
-0.1128372252,
0.0020009503,
-0.4649412632,
0.1039661169,
0.0835515633,
-0.2256428897,
-0.0497680604,
0.0020143483,
-0.2528686523,
-0.5000705123,
-0.1524205357,
0.2905791402,
0.2850808203,
0.2995110452,
0.2822107375,
0.2653039694,
0.218071267,
0.1882406175,
0.0474347994,
0.1773795038,
-0.0457336083,
0.0735765994,
-0.4050092101,
0.343950808,
-0.240901798,
-0.084930405,
-0.2035915554,
-0.3892905712,
0.2516005337,
-0.1002891213,
0.0859726742,
-0.4930277169,
0.085994944,
0.3708956838,
-0.1917723119,
0.0199164879,
0.1214129329,
-0.1024173647,
0.003755888,
-0.078245528,
-0.1640657783,
0.3610447943,
0.0768099949,
-0.2198454142,
0.0704467967,
0.3702919483,
0.3388825655,
0.1903001964,
-0.2203630358,
-0.1675287783,
0.4414019883,
0.0176829621,
0.1687618941,
0.0462636463,
-0.0339809246,
0.3442344666,
0.1006003171,
-0.0012357812,
-0.2634165883,
-0.0832915604,
0.1024766713,
0.2208108902,
0.2615540028,
-0.2776215076,
-0.2431861758,
-0.4085784554,
0.5601937771,
0.3427142501,
0.2305350155,
-0.0628960431,
0.5425231457,
0.0828969777,
-0.4694441557,
0.0687307119,
0.0326798707,
0.7095781565,
-0.163451001,
-0.1467923969,
-0.4266523719,
-0.1652528346,
0.157426089,
-0.0002178699,
0.387247622,
-0.1314135641,
0.5233259201,
0.1060382724,
0.0948028415,
-0.0910520926,
-0.1202441081,
0.0795937181,
0.3784054816,
0.0271686669,
0.1042734385,
0.1606735736,
-0.0195351318,
0.0585908107,
-0.2174528539,
-0.2745068669,
-0.1152909398,
0.1672184914,
0.1256195903,
0.0023233555,
-0.2697549462,
-0.0511664599,
-0.181190446,
-0.4072161317,
0.2652529478,
-0.0908301845,
0.0454163328,
0.1008219421,
0.2078519464,
-0.0895773768,
0.0180452131,
0.087981604,
-0.0705332756,
-0.7061078548,
0.1135700867,
-0.1956966221,
0.027381435,
0.2443943769,
0.0343264118,
-0.0326907299,
0.3245292008,
-0.4147773683,
-0.050450258,
0.0886663273,
0.1621684283,
-0.3129666448,
-0.1039420664,
0.168517828,
0.2275391519,
-0.0814687014,
0.0571502671,
0.0484278053,
0.1911782175,
0.3824151754,
0.1352133155,
0.117651239,
0.2851805091,
0.2092828155,
0.336217612,
-0.2803316712,
0.0880407095,
0.3748084605,
0.3983899951,
0.418654561,
-0.2215989977,
0.1879462302,
-0.3908186257,
0.019647859,
-0.1622592211,
0.1251029521,
0.0533164814,
-0.2120586634,
0.1556342393,
-0.2383008301,
-0.1149867177,
-0.0837215111,
0.2974510491,
-0.2194244415,
0.0257992297,
0.0152264237,
-0.2889418602,
-0.078325443,
-0.044106748,
0.165241003,
0.2261771113,
0.4313423038,
-0.0759897232,
-0.2336571813,
-0.0816132277,
-0.1685787737,
0.3073796034,
-0.2065436989,
-0.1619289368,
-0.1456629932,
0.0682423636,
0.1803956926,
0.2353228629,
0.4696421027,
-0.0961228684,
-0.0197153278,
-0.2219818234,
0.024103418,
-0.1631157696,
0.0119679868,
0.0207884982,
0.0121082813,
0.1047580093,
0.4172721803,
-0.2507812083,
-0.1821790934,
-0.2067552507,
0.5407699347,
-0.2291522324,
-0.1452020407,
-0.0057221875,
-0.2123628557,
-0.5202819109,
0.0625925064,
0.0947569683,
-0.1236626431,
0.234485805,
-0.3365582526,
-0.0600595698,
-0.3407363892,
0.0559323058,
0.0333821997,
0.5054509044,
-0.2519850135,
0.0512897894,
-0.177984044,
0.1141241491,
0.4623526335,
0.1752749681,
-0.1009979248,
0.0274560302,
0.0044708513,
-0.3934121132,
0.1438114196,
0.150896281,
-0.1485906988,
0.2990285456,
-0.2558402121,
0.5546309948,
0.0296257026,
-0.0601639897,
-0.1810206771,
-0.305801332,
-0.0189948156,
-0.1649746746,
0.1217675656,
0.0261507556,
-0.1800436676,
0.4581392705,
-0.1303934306,
-0.2181835175,
0.5202695131,
0.0637352467,
1.1716754436,
-0.074296698,
-0.0621437989,
-0.2309650332,
-0.257096976,
0.3165609539,
-0.6766653657,
0.1244021505,
0.073420763,
-0.1243327856,
0.1023871899,
-0.0162253603,
0.0199672394,
0.2219275087,
-0.247842133,
0.0639301911,
-0.300156951,
-0.1765236109,
-0.2858093977,
0.3896427751,
-0.1006882712,
-0.2490498722,
-0.0716718286,
-0.0173444301,
0.0153468288,
-0.0213926472,
-0.2215708494,
-0.0595905334,
0.4131847024,
-0.017229408,
0.2468739599,
-0.1121236086,
-0.2360195071,
0.3648223281,
-0.1647971421,
-0.0689614415,
-0.2324288487,
0.0299131908,
-0.1733216196,
0.094281286,
0.1340539008,
-0.0163541492,
0.07486628,
-0.0172677822,
-0.3920019567,
0.081821084,
-0.0549438596,
-0.1253943145,
0.0464402735,
0.1012337655,
-0.2979837954,
-0.371275574,
0.0831153691,
0.0987871736,
-0.1517132819,
0.0230121315,
-0.284404099,
-0.1307132542,
-0.5083079934,
0.0835141093,
0.09186811,
0.3376483023,
-0.1956742257,
0.3320390582,
-0.1939462572,
-0.1492913216,
-0.2179478407,
-0.1215123236,
0.2511501312,
-0.1914857924,
0.178842023,
-0.2094885856,
-0.2418766469,
-0.4316693544,
-0.0149515122,
-0.0827954412,
-0.3865462542,
0.4302399457,
0.049406074,
-0.2330639809,
0.0752278119,
-0.1367809772,
0.0579775237,
0.0033783168,
-0.1083915532,
-0.1550695896,
-0.4857674241,
0.2241017073,
0.2175263613,
0.5688452721,
0.0788136199,
0.0453642346,
-0.1192527413,
0.0687628388,
-0.2306440473,
0.2507712543,
0.2330903411,
0.1651654541,
-0.0121291298,
0.2815651,
0.0334079415,
-0.2585386634,
-0.0945776403,
0.0784752518,
-0.1148143783,
-0.1441341639,
-0.0973203331,
0.121538341,
-0.099129498,
-0.0808284134,
-0.1344826967,
-0.2419472784,
0.0778195485,
-0.1644073278,
0.2182532102,
-0.1838770509,
-0.1200953573,
-0.1128278375,
0.4099226892,
-0.0394895561,
-0.0061419159,
0.1524099857,
-0.0428902395,
0.3734465241,
-0.0446036533,
0.013397241,
-0.0645923316,
-0.0591992885,
-0.3752074242,
0.0733761638,
0.2588772774,
0.1090114862,
-0.0003991416,
0.0225510336,
-0.0875496641,
0.0966069251,
0.0399106592,
0.1827135682,
-0.1169920564,
-0.0676398128,
-0.0235155374,
0.1917643696,
-0.1976938844,
-0.1988270432,
-0.0608728528,
0.0752244443,
-0.2139885724,
0.247860387,
0.4000190198,
0.0741870552,
0.1304771006,
0.1099632084,
0.3531487584,
-0.2766366601,
0.3193090856,
0.3104668856,
-0.0166345388,
-0.2100171447,
-0.1769706756,
0.2833023667,
0.1194736362,
-0.1427143514,
-0.1698101163,
0.3863299191,
0.6007134914,
0.3873368502,
-0.4875279069,
-0.1816847026,
-0.2639196217,
0.6182790399,
-0.0514409952,
0.4884516299,
0.4662978351,
0.188454181,
0.2922810912,
-0.2606739402,
-0.2065417767,
0.430962801,
0.0768074915,
0.0376481339,
-0.0007757545,
-0.1363189071,
0.115870595,
0.0870212018,
0.1426930726,
0.384087801,
-0.116505608,
0.3271659911,
0.0655353963,
0.2888730466,
0.5928451419,
0.1578068435,
0.4371985495,
-0.1594476551,
-0.1655698121,
0.1945152283,
0.2201552093,
0.0693239272,
-0.0579899997,
-0.0156212803,
0.1615112126,
-0.3188797235,
-0.0212755017,
0.059096761,
0.0533903316,
-0.2769365311,
0.4711275101,
0.2056368291,
-0.2247935385,
-0.059054371,
0.0458208919,
-0.0872467607,
0.1757307798,
0.1273064166,
0.2065496445,
-0.0734713599,
-0.226173833,
0.3755024076,
-0.4341765046,
0.0296870694,
-0.1775700152,
-0.108225219,
-0.0197181329,
0.2628770471,
-0.2581287622,
0.0527021997,
-0.065505594,
0.0659321249,
-0.1818636954,
0.2217469662,
0.1854013056,
-0.4435363412,
-0.2482800484,
-0.2721305788,
-0.2667447031,
-0.1807054281,
-0.1906945407,
0.0515158027,
0.3041936755,
0.2105132937,
-0.0289454609,
0.2490499914,
0.1911311448,
-0.1328957379,
-0.0568944849,
0.1076927036,
-0.4754074812,
0.1072264612,
0.3888155222,
0.2782550454,
0.1642228514,
-0.3787929416,
-0.2844343781,
0.0037733875,
-0.0145658888,
-0.2515187263,
0.2765553594,
0.1154202074,
0.7933056355,
0.5852684975,
-0.1099347621,
-0.3783088326,
-0.0988554507,
-0.2023892999,
0.0157386772,
-0.1293276101,
0.0116773769,
-0.197129041,
0.4506743252,
0.1910799295,
-0.2832458615,
0.2106017172,
-0.2632029057,
-0.2245252877,
-0.2430837154,
0.2408836782,
-0.284316808,
0.0277251303,
0.0219359696,
0.4092617035,
-0.0663308352,
0.1995100677,
0.063439317,
0.1137816757,
-0.3624653816,
-0.0177794248,
0.2839456201,
0.355863452,
-0.3132499456,
0.5239499807,
0.0752071068,
0.0631891787,
-0.0131415948,
-0.290397346,
0.2310444713,
0.0778575763,
-0.2676573098,
0.0424916744,
0.342707783,
-0.0503718257,
-0.0736874342,
0.1060921252,
0.271881938,
0.4296525419,
0.0202603638,
-0.4044407904,
-0.2552905083
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | I think the deletion of each extracted file could be implemented in our CacheManager and ExtractManager (once merged to master: #2295, #2277). 😉 | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 23 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
I think the deletion of each extracted file could be implemented in our CacheManager and ExtractManager (once merged to master: #2295, #2277). 😉 | [
-0.0226012468,
-0.1121033058,
-0.1641411632,
0.163986519,
-0.1408301443,
0.1568214297,
-0.1947340965,
0.2873066366,
0.232114166,
0.1775881052,
0.0999826565,
0.4532558918,
-0.2333149314,
-0.106482707,
-0.2285247445,
0.0652220994,
-0.218204841,
0.2731811404,
-0.0273978859,
0.2025792748,
-0.0816407949,
0.0862377286,
0.0794723779,
-0.1437506676,
0.0515122414,
-0.4186532199,
0.2156177461,
-0.2527046204,
-0.0921539068,
-0.3959027827,
0.0014363006,
0.5230807066,
0.2234821618,
0.1859764457,
-0.0001158199,
-0.0553465337,
0.3054268956,
0.0845194384,
-0.3473011255,
0.1930395961,
-0.1883358955,
-0.1002467275,
0.2181224525,
-0.141743347,
0.2566105425,
-0.304568857,
-0.1959097683,
-0.6068359613,
0.452791214,
-0.2366440892,
0.1494682431,
-0.0148587152,
-0.5173229575,
0.1346340328,
0.3028508425,
0.3194511831,
-0.110709399,
-0.0475236587,
0.4241870046,
0.0751271993,
0.2008990198,
0.3739815652,
-0.1134387106,
-0.2500635386,
0.324303031,
-0.0099845435,
-0.1423217654,
-0.2449113578,
0.3142211437,
0.0150830867,
0.5898214579,
-0.3973078728,
-0.0776184052,
-0.2895053029,
0.0565596595,
-0.5846498609,
0.1107223183,
0.167732358,
0.0058498494,
0.2414091825,
-0.1400057375,
-0.4298629761,
-0.3438480496,
-0.1900563091,
0.6732527018,
-0.3742928803,
-0.094934687,
-0.1413281411,
0.4534680247,
0.1464482248,
0.1862222701,
-0.1259606779,
-0.2888205051,
0.3707062602,
-0.0712989718,
-0.2018735409,
-0.3689158261,
-0.3332552612,
0.2370149046,
0.1708976626,
0.423826009,
0.0518854521,
0.2351701111,
0.0633936524,
0.26377666,
0.3954230547,
0.0883609578,
-0.1276813596,
0.2007572949,
0.1112255156,
0.0768837184,
-0.0542464629,
0.0928937346,
0.0000740923,
0.307166487,
0.0206518881,
-0.0722564831,
-0.1556967348,
-0.0429362208,
0.0741356835,
0.2563768625,
-0.1725343764,
0.0869790465,
0.201975584,
0.1532337964,
0.0464816503,
0.0632905513,
0.2291135043,
0.0240843818,
-0.296138972,
0.0856629759,
0.1718934625,
-0.3100760579,
-0.266143024,
0.3942471743,
-0.060051553,
-0.035321787,
-0.1283133328,
-0.304346323,
0.0390800387,
0.5187656283,
-0.1317345053,
0.2679395974,
0.2626908123,
-0.1665895581,
-0.259931922,
-0.285692811,
-0.0274821967,
-0.1568220854,
0.4221941829,
-0.1159837693,
-0.2432413399,
-0.0390985906,
0.1673654467,
0.1655026823,
0.304838866,
-0.4949509501,
0.1325608939,
0.1554321051,
0.05270046,
-0.0254454091,
0.3915012777,
-0.0121704563,
-0.1084476039,
-0.3085302114,
0.2602826357,
-0.6160302162,
-0.0765487105,
-0.2943628132,
-0.2651216388,
0.193464756,
0.1379142702,
-0.0625766367,
0.18025738,
-0.1758535802,
0.1568833739,
0.304770112,
-0.10473001,
-0.3668221831,
0.1630243361,
0.0668904632,
0.1986338496,
0.347504884,
0.2767176926,
0.3986901045,
-0.0060511082,
-0.0315097496,
0.2765128911,
0.0772937611,
-0.0692828819,
-0.3465444446,
-0.395434171,
0.0166983716,
0.2093606442,
0.0411174856,
0.0486387126,
0.2571692467,
0.0145428963,
0.1615275145,
0.1562282592,
0.1540133059,
0.1770209074,
0.1292432249,
-0.2629849911,
-0.2178766131,
0.1299290508,
-0.5425733328,
0.0111169145,
-0.5635594726,
-0.3578421474,
-0.1681198776,
-0.3451925516,
0.144657284,
0.0259727836,
-0.1506371796,
0.1525579393,
0.1201667562,
-0.0306173712,
0.2321799695,
-0.0576329753,
-0.414154619,
0.0821240619,
-0.0787244365,
0.0214124545,
-0.4709241986,
0.039849773,
0.1304673553,
-0.2229181379,
-0.0247543901,
0.0109062372,
-0.2736271024,
-0.5044940114,
-0.1394359469,
0.269844681,
0.2659398317,
0.2694548965,
0.2403143048,
0.2347733229,
0.1686521918,
0.252933979,
0.0780905187,
0.1655548215,
-0.0219970196,
0.0573898032,
-0.3692440987,
0.3941812515,
-0.1629271209,
-0.0680425912,
-0.209149763,
-0.3963091969,
0.2487937808,
-0.1182920784,
0.1494150609,
-0.528213799,
0.0754011869,
0.3249075711,
-0.0978753343,
0.0129046477,
0.1258077621,
-0.0843764469,
-0.0029910947,
0.0030724779,
-0.0814075321,
0.3343491554,
-0.0005703047,
-0.2064737678,
0.0179731902,
0.3947645426,
0.3731949329,
0.1863263696,
-0.1443184763,
-0.1430870742,
0.4674762487,
-0.0077399909,
0.1551848054,
0.0356971025,
0.0012497194,
0.3792585135,
0.082741797,
0.0095784776,
-0.265332818,
-0.0908619389,
0.1035447419,
0.185401693,
0.3281433582,
-0.2157001048,
-0.2645331323,
-0.3503083587,
0.4957949221,
0.3474988043,
0.2267125249,
0.0012917668,
0.5297100544,
0.1080577075,
-0.4376135468,
0.0794266388,
0.0360067785,
0.634299159,
-0.133888796,
-0.1276339293,
-0.4051323533,
-0.1930312514,
0.1563116163,
0.0413373448,
0.3700553775,
-0.0946754813,
0.4919625819,
0.1280312091,
0.1074847132,
-0.1013563648,
-0.0828963593,
0.0904888511,
0.3652787805,
-0.0422656052,
0.1250081062,
0.1520942003,
-0.0196180791,
0.1258701086,
-0.2163588256,
-0.3381377161,
-0.1388873309,
0.2075247318,
0.0852054507,
-0.0198438186,
-0.2818318605,
-0.0219433047,
-0.1901810765,
-0.4262129664,
0.2239808589,
-0.0602327026,
0.0722542331,
0.0535559542,
0.1596736014,
-0.0304913558,
0.0300516821,
0.0889114812,
-0.0778837204,
-0.6628454328,
0.0983511433,
-0.1868419796,
0.0379834883,
0.2425361276,
0.0444731116,
0.0063196914,
0.2807712257,
-0.3876610398,
-0.0573444478,
0.0818390772,
0.1049457565,
-0.3130925894,
-0.1184418127,
0.2026218921,
0.2476178408,
-0.1233280078,
-0.0007631481,
0.1013069153,
0.2300357819,
0.3424206376,
0.1033395082,
0.1240424961,
0.3077456057,
0.2200434804,
0.304297477,
-0.2809363306,
0.044384893,
0.3332581818,
0.4032057524,
0.3957529664,
-0.1999594271,
0.2320668399,
-0.3902227283,
-0.0107682794,
-0.1272914559,
0.1531164795,
0.019207973,
-0.2371979058,
0.1621902883,
-0.2351831496,
-0.107633993,
-0.092457436,
0.3103541136,
-0.1896029413,
0.0137223471,
0.0337257013,
-0.2891179919,
-0.0444940999,
-0.0280927103,
0.1488055438,
0.1669507474,
0.3563658893,
-0.0836425871,
-0.2635135651,
-0.0878598988,
-0.2644633949,
0.333278656,
-0.222354725,
-0.1899113208,
-0.1091746315,
0.0586025864,
0.1371451318,
0.1942603737,
0.3985283673,
-0.0987227485,
-0.0259502083,
-0.1894543469,
-0.0066751465,
-0.1578938663,
0.0347215459,
0.0147041902,
0.0553894565,
0.0625591725,
0.3513254821,
-0.3022963405,
-0.2003956437,
-0.2519723177,
0.541574955,
-0.2682743371,
-0.1403572559,
-0.0532959327,
-0.2300037742,
-0.5152531862,
0.0718513876,
0.0248223096,
-0.1205943003,
0.1934350431,
-0.3178029656,
-0.0970484689,
-0.3147117496,
0.0356627032,
0.0134958141,
0.5749185085,
-0.308090657,
0.0529583842,
-0.1670598537,
0.1460406482,
0.4614255726,
0.1831461936,
-0.0740577653,
0.0567421652,
0.0455555581,
-0.3605612218,
0.0747279376,
0.1328520626,
-0.1521327794,
0.3234330416,
-0.2378544211,
0.5641592741,
0.0926814377,
-0.0550358631,
-0.2353072166,
-0.2607460618,
-0.01914303,
-0.1411491781,
0.0838326514,
0.0453277677,
-0.1757594794,
0.448343575,
-0.2364690453,
-0.2719982564,
0.4784608483,
0.0938815922,
1.15234375,
-0.0630941242,
-0.0443604253,
-0.2481874228,
-0.2877422571,
0.2968457937,
-0.655552268,
0.1433554441,
-0.0354745761,
-0.1166591048,
0.1045613959,
0.0114563778,
0.0144006582,
0.1993406415,
-0.252482146,
0.0956661999,
-0.2879778743,
-0.1406226754,
-0.2822279334,
0.3869051337,
-0.1198888943,
-0.272975862,
-0.0524285957,
0.0311329626,
0.0025456673,
-0.0838770121,
-0.2410693318,
-0.1141214371,
0.4444568157,
-0.0500531942,
0.3152217865,
-0.0998767316,
-0.2177523971,
0.4091770649,
-0.1741432995,
-0.108746469,
-0.3227097988,
-0.043151807,
-0.176937297,
0.050937213,
0.1713894159,
-0.0063801855,
0.1149520129,
-0.0327296518,
-0.4030064046,
0.0416041687,
-0.1148713976,
-0.1488923728,
0.0588001758,
0.1078939885,
-0.2950465083,
-0.3856198192,
0.1859517246,
0.141058147,
-0.1611457914,
0.081183359,
-0.2483863086,
-0.1064985618,
-0.525357604,
0.0941525996,
0.1336241961,
0.3176448941,
-0.2119374275,
0.3105858564,
-0.1847429872,
-0.1575231552,
-0.2423825413,
-0.1405695379,
0.3364911675,
-0.1629327089,
0.2128504366,
-0.2056052387,
-0.2502362132,
-0.469057858,
-0.0277931616,
-0.0476667769,
-0.363473177,
0.4130424261,
0.0049339123,
-0.2247469872,
0.1111172438,
-0.1620085686,
0.0459866226,
0.0497668907,
-0.1696456969,
-0.1416974962,
-0.4695398808,
0.2392652035,
0.2084291726,
0.5362951756,
0.0531938076,
-0.0222181454,
-0.1506142318,
0.1603459418,
-0.284322381,
0.2370122373,
0.2197365761,
0.1688712239,
-0.0506396256,
0.2401746958,
0.0455842987,
-0.2088136375,
-0.0520525984,
0.1431403011,
-0.1415210217,
-0.2087109089,
-0.0709002241,
0.0874165446,
-0.1571531892,
-0.0231145676,
-0.2286976129,
-0.1295991242,
0.095883064,
-0.1730569452,
0.2635294795,
-0.1905891299,
-0.1276009381,
-0.1356276423,
0.4436530471,
-0.0629728734,
-0.0862331688,
0.1529290378,
-0.0350120068,
0.3017440438,
-0.043830879,
-0.0223690718,
-0.0828737766,
-0.0681064278,
-0.302716732,
0.0466783345,
0.274930656,
0.0693441629,
-0.0142250117,
-0.012762893,
-0.0826873332,
0.1370899975,
0.0449923128,
0.2047973126,
-0.0748965219,
-0.1229489818,
-0.0379076749,
0.2374709696,
-0.2128135711,
-0.2070527226,
-0.0718626678,
0.0127489045,
-0.1917214394,
0.2789098024,
0.3626362383,
0.0886572301,
0.1699346006,
0.1253297478,
0.3471668661,
-0.2870440483,
0.273958236,
0.215436995,
0.0546473935,
-0.2092104852,
-0.064642936,
0.3144549131,
0.1434215009,
-0.1145214662,
-0.1292228997,
0.390596658,
0.5757665634,
0.3090759218,
-0.5367895365,
-0.2223834991,
-0.2938578129,
0.6234040856,
-0.1351086497,
0.4427971244,
0.4038830698,
0.1510082483,
0.2659566104,
-0.3229813874,
-0.2195305526,
0.4456716776,
0.045727171,
0.0698688477,
0.0785572976,
-0.0774755031,
0.1426015198,
0.0914164484,
0.1999514997,
0.4314355254,
-0.0809788257,
0.3132271767,
0.031887047,
0.2796558738,
0.5481156707,
0.1850630939,
0.4165058732,
-0.1622707248,
-0.1929335892,
0.2023341209,
0.2120333612,
0.0040215822,
-0.0710146129,
-0.0656384975,
0.1874188334,
-0.3410094082,
-0.0158142019,
0.0678005517,
0.0633218139,
-0.3073608279,
0.4482387602,
0.2307688892,
-0.2887845337,
-0.0415340289,
0.0883272216,
-0.1180124283,
0.2189890146,
0.1187863201,
0.1506617516,
-0.0560569838,
-0.2042900324,
0.41454193,
-0.4256969988,
0.0216815993,
-0.1777398139,
-0.208208099,
-0.0141027011,
0.2535842061,
-0.2977362275,
0.0267716348,
-0.0983163565,
0.0933163315,
-0.1633646786,
0.2756983936,
0.1564215422,
-0.4175424576,
-0.2338572741,
-0.2869608998,
-0.2420897186,
-0.1407166719,
-0.2342233211,
0.0474547744,
0.2318336964,
0.2380513847,
-0.0537078194,
0.2327622175,
0.1777538955,
-0.127585426,
-0.1051268727,
0.0347120464,
-0.5523294806,
0.1517515332,
0.4012072384,
0.1970657706,
0.196334064,
-0.3999382854,
-0.2417611778,
-0.025516931,
0.0489214286,
-0.1619681418,
0.2541069984,
0.1139992326,
0.7210945487,
0.630227387,
-0.0951024294,
-0.353976965,
-0.1152172089,
-0.174641341,
-0.0046842825,
-0.0954035968,
0.0094208345,
-0.2118437737,
0.491209954,
0.2396742254,
-0.2630657554,
0.2059001029,
-0.2440060079,
-0.1443869025,
-0.2059298754,
0.1979186237,
-0.2080571651,
0.0010104328,
0.0479299277,
0.4529610872,
-0.0281879269,
0.2303513587,
0.0885685012,
0.0875781327,
-0.4007245302,
-0.0172657855,
0.2634523511,
0.338711679,
-0.3430578113,
0.4724926054,
0.1206609979,
0.1163156033,
-0.0524528958,
-0.2271256,
0.2592239976,
0.0508886911,
-0.2261129469,
-0.0018730611,
0.2962717712,
-0.0765096918,
-0.0646931231,
0.1092458814,
0.2242141962,
0.3844120204,
0.0134389326,
-0.4318144023,
-0.2402965426
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Nevermind @thomwolf, I just mentioned the other issue so that both appear linked in GitHub and we do not forget to close both once we make the corresponding Pull Request... That was the main reason! 😄 | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 36 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Nevermind @thomwolf, I just mentioned the other issue so that both appear linked in GitHub and we do not forget to close both once we make the corresponding Pull Request... That was the main reason! 😄 | [
-0.0855272487,
-0.0671885163,
-0.1844739914,
0.1047871709,
-0.0681768507,
0.0940928087,
-0.2069171071,
0.3579804003,
0.1929917186,
0.180330351,
0.125636518,
0.5178528428,
-0.199065581,
-0.0532917231,
-0.2303046286,
0.1003463343,
-0.171078369,
0.2507983148,
-0.0966362432,
0.1721234918,
-0.118225418,
0.158629328,
0.0584241152,
-0.2147803009,
0.0472868346,
-0.3116939068,
0.2470158041,
-0.1306723952,
-0.2001819313,
-0.3335464597,
0.0496935919,
0.4665738344,
0.154793784,
0.1924551874,
-0.0001120515,
-0.0588398352,
0.326346457,
0.0419635773,
-0.2812105417,
0.15788427,
-0.1546338648,
-0.1296811998,
0.2462518513,
-0.1716014445,
0.1941533834,
-0.2860304415,
-0.2619874775,
-0.5600836873,
0.4046290815,
-0.2074567527,
0.218479827,
0.0659197122,
-0.4778722525,
0.0386691503,
0.3469431698,
0.3130681515,
-0.2208002955,
-0.0241454113,
0.4340993762,
0.0210294873,
0.1328233778,
0.4203092754,
-0.0427931584,
-0.16822806,
0.366037786,
-0.0318533368,
-0.132076472,
-0.265994668,
0.3651873171,
-0.0418886468,
0.6081596613,
-0.4039490223,
-0.070497185,
-0.233220458,
-0.0010142922,
-0.5103726387,
0.1964832246,
0.1308748871,
-0.0294248089,
0.2057878971,
-0.2156450152,
-0.3320871592,
-0.2986850142,
-0.2275018096,
0.5624456406,
-0.3171733022,
-0.093184039,
-0.1442538202,
0.462785542,
0.1177916676,
0.1654223502,
-0.043840725,
-0.3093245625,
0.2831890583,
-0.0899897814,
-0.2204521894,
-0.2162858248,
-0.3502410352,
0.2751027048,
0.215909645,
0.3916690946,
0.0350788608,
0.1952480078,
-0.0696301311,
0.2703440189,
0.432302177,
0.0422204733,
-0.1306512803,
0.2671501637,
0.0566862635,
0.0712899193,
0.0143636391,
0.1246156245,
-0.0277855508,
0.2098573744,
-0.0353088379,
-0.0223605782,
-0.2735992074,
-0.0027618855,
0.0769031942,
0.2991530299,
-0.1116635874,
0.0472757854,
0.2507169247,
0.2106905431,
0.1088606641,
0.0572777987,
0.2573494911,
-0.0073827207,
-0.2515545487,
0.038627103,
0.1590307057,
-0.3453049064,
-0.2071356475,
0.3635475039,
0.0165207945,
0.044596523,
-0.0871832073,
-0.2391292155,
0.0957718343,
0.4768105745,
-0.0525909252,
0.1936013699,
0.3282549977,
-0.1214081049,
-0.1968097091,
-0.2486094534,
-0.0390988737,
-0.1242087334,
0.3764864206,
-0.1488396376,
-0.2738032937,
-0.0759817958,
0.2167506218,
0.1099694371,
0.2422160208,
-0.5487085581,
0.1165578142,
0.1360515356,
0.0423571393,
0.0025538243,
0.3891153336,
0.0077828988,
-0.1569076926,
-0.2708090544,
0.1842841506,
-0.6277384758,
0.0181339234,
-0.2419083863,
-0.1849184781,
0.2255011201,
0.2400518358,
-0.1519255638,
0.1250221431,
-0.1377114505,
0.1953274459,
0.2903510928,
-0.1376110464,
-0.4272358716,
0.1646078676,
0.0116300881,
0.1267750263,
0.3082720339,
0.1919440031,
0.3640699983,
0.0199809968,
-0.0059910826,
0.2740215659,
0.0454166159,
-0.0088727027,
-0.4472188652,
-0.4030654132,
0.0181711875,
0.2065698802,
0.0435483903,
-0.0042688586,
0.2280374467,
-0.0454456806,
0.14474231,
0.0252099168,
0.1102004349,
0.199010089,
0.1636437476,
-0.3638186753,
-0.1670940369,
0.1051173955,
-0.5550245047,
0.0267475173,
-0.5375995636,
-0.2535659373,
-0.1553029716,
-0.3377279043,
0.1138795465,
-0.017805744,
-0.1368131489,
0.0994875431,
0.1636168063,
-0.0505281389,
0.2101662159,
-0.113443628,
-0.3678590655,
-0.0459865071,
-0.0555341542,
-0.0171631854,
-0.4335534871,
0.0670197383,
0.0713249296,
-0.2523714304,
0.07253512,
-0.0116517171,
-0.1854886115,
-0.4729954302,
-0.153863132,
0.2603838146,
0.2450779974,
0.2921966016,
0.2877054513,
0.2621399164,
0.2128138542,
0.2098299861,
0.1372448057,
0.1424444914,
-0.0159271173,
0.0594554096,
-0.4149571061,
0.3945380449,
-0.1529709995,
-0.0591715723,
-0.1509152502,
-0.3506003618,
0.2903295457,
-0.1401844621,
0.0475267917,
-0.4543600976,
0.1019946933,
0.3108374178,
-0.1102145687,
0.0151064862,
0.0789270103,
0.0402070247,
0.1006063372,
-0.0401639491,
-0.1399710178,
0.3669390082,
0.055462122,
-0.2806322873,
0.0664960518,
0.3567689359,
0.3791139126,
0.2107023895,
-0.1949291974,
-0.1907742023,
0.3597587049,
-0.0184014477,
0.2091445476,
0.0221838076,
0.0290996358,
0.3412799537,
0.1237495393,
-0.0266184788,
-0.2955548465,
-0.1001158655,
0.0776938573,
0.2316411138,
0.2472865582,
-0.2816295922,
-0.2429945618,
-0.3020987809,
0.5641666055,
0.3144174516,
0.2222726941,
-0.0718771666,
0.5412748456,
0.0934948623,
-0.5482689142,
0.1295157671,
0.0619634092,
0.6242784858,
-0.1175669134,
-0.0005495902,
-0.3989091218,
-0.2547470927,
0.1361460537,
0.087342523,
0.3191330731,
-0.0864867866,
0.4921013415,
0.036190547,
0.0833233595,
-0.1482569873,
-0.1364149004,
0.0951897949,
0.28647241,
-0.0357893333,
0.1129133254,
0.1283289194,
0.0019896328,
0.0689896047,
-0.1443587989,
-0.3590827584,
-0.1567141861,
0.1778902262,
0.0516764075,
-0.1459528804,
-0.3483547866,
-0.1375783682,
-0.1167288423,
-0.4708237648,
0.2861889601,
-0.0042633563,
0.0580686927,
0.1066811234,
0.1871892214,
-0.0102372356,
0.1018384397,
0.0515300632,
-0.1312522292,
-0.6456320286,
0.1629994065,
-0.2419214249,
-0.1073776782,
0.2100317478,
0.0845393836,
0.0674856305,
0.2412574738,
-0.4375686049,
-0.0472029373,
-0.0146710593,
0.1606193632,
-0.2070332468,
-0.1185267866,
0.191557318,
0.259881109,
-0.2031117976,
-0.0333358087,
0.0307549834,
0.2139244527,
0.3151899874,
0.1125566661,
0.0599738732,
0.2892115712,
0.16513367,
0.3626139164,
-0.3334110677,
0.0752131492,
0.3752720952,
0.3635938466,
0.4455353022,
-0.2741264105,
0.2036559284,
-0.3434283733,
-0.017895855,
-0.09213157,
0.1906603426,
0.0659163371,
-0.2766293883,
0.1496108323,
-0.2267405093,
-0.0468465351,
-0.0985539854,
0.3262549341,
-0.2088489085,
-0.0914772674,
0.0621345192,
-0.2048479021,
-0.068883948,
0.0063672885,
0.1837729216,
0.1083877608,
0.2688843012,
-0.130429253,
-0.2644744217,
-0.0394005366,
-0.2572120428,
0.2851051092,
-0.2718002498,
-0.2192861885,
-0.1319359839,
-0.0172104016,
0.145188719,
0.1310502589,
0.4179217815,
-0.1409444809,
-0.1006118059,
-0.1882837117,
0.0125889927,
-0.2201875746,
0.0189311281,
-0.0363560691,
0.1079014391,
0.1314084828,
0.3927887678,
-0.2881759405,
-0.2088009417,
-0.2204588354,
0.4583601952,
-0.2030732632,
-0.0995665938,
-0.0356748179,
-0.2675746083,
-0.5211287141,
0.0827571452,
0.1385282278,
-0.1120304018,
0.149510473,
-0.2988809943,
-0.0196064077,
-0.3307201266,
0.0492196381,
0.101037547,
0.587572813,
-0.2887617648,
0.0951905996,
-0.2015620768,
0.1822342575,
0.4474599957,
0.2902313173,
-0.0935396701,
0.1095423996,
0.0888661742,
-0.3233521581,
0.0258915387,
0.1684430242,
-0.1167429015,
0.2301912308,
-0.2475329638,
0.6316025853,
0.0619256012,
-0.1011544615,
-0.1581905186,
-0.2953956723,
0.0368268788,
-0.1168681681,
0.1441994309,
0.0038702488,
-0.1517391652,
0.4974933565,
-0.1742267162,
-0.2369039953,
0.5581267476,
0.1118874624,
1.1223026514,
0.0662453473,
-0.0082099233,
-0.1159413904,
-0.3521789908,
0.2567615509,
-0.6527988315,
0.091991052,
0.012415044,
-0.1366781592,
0.1495248675,
-0.0076313317,
-0.0505193993,
0.1721398383,
-0.3216414452,
0.043433506,
-0.2436958849,
-0.1264188886,
-0.300565809,
0.3972910643,
-0.088121444,
-0.3036727309,
-0.1368496716,
0.0695899129,
0.0961644053,
-0.1027522087,
-0.2141227573,
-0.1129526943,
0.3157936335,
-0.0842181891,
0.2002488971,
-0.053164836,
-0.1764605194,
0.3988558054,
-0.1700197458,
-0.0771735013,
-0.2630423903,
-0.0888825282,
-0.1211330295,
0.0884734243,
0.0152103696,
0.0539481416,
0.1129605696,
0.0923839808,
-0.3502333164,
-0.0262474809,
-0.0631622747,
-0.1901106834,
0.0450097024,
0.038484998,
-0.3371966183,
-0.2730950415,
0.1275774986,
0.1341820955,
-0.168729037,
-0.0039639175,
-0.2065663636,
-0.0774891376,
-0.5094293952,
0.0137628689,
0.1816053689,
0.285528332,
-0.1449524462,
0.3495627046,
-0.0768416002,
-0.2227308154,
-0.2739013135,
-0.0561630167,
0.3547871113,
-0.0918882936,
0.1497977972,
-0.1659594178,
-0.281550765,
-0.4964165092,
-0.0726445764,
0.0225013196,
-0.431399256,
0.4540010691,
-0.0022812858,
-0.3116536736,
0.1154087856,
-0.0660912395,
0.138086766,
0.037206199,
-0.1806197464,
-0.0911824256,
-0.4733947814,
0.2555477321,
0.1506567746,
0.5617163777,
0.0009448007,
-0.001648739,
-0.0733288303,
0.1851303428,
-0.3437161744,
0.1866713166,
0.1418772042,
0.1569524854,
-0.0738392323,
0.152254954,
0.0887038559,
-0.1735327244,
0.0005618185,
0.1184089482,
-0.1825790852,
-0.2424516976,
-0.0360616967,
0.0890143737,
-0.1598329842,
-0.082326144,
-0.1170866787,
-0.1031419337,
-0.0009929966,
-0.1549751461,
0.3016620278,
-0.199535951,
-0.068570286,
-0.2173980922,
0.4563751519,
-0.0954960212,
0.0174303427,
0.1671783477,
-0.0397901461,
0.3143790066,
-0.0514563173,
0.0146953175,
-0.0966605991,
-0.106132336,
-0.2136601657,
0.0702317059,
0.2113620341,
0.113814272,
-0.009303432,
0.0091657694,
-0.1153389513,
0.1331099421,
0.1107858866,
0.2708093822,
-0.0825883746,
-0.1567667425,
-0.0329394192,
0.303212285,
-0.2050680518,
-0.1960132867,
-0.1091993302,
0.0081966408,
-0.1648896784,
0.1821452379,
0.3783392012,
0.01125893,
0.2039261162,
0.189028725,
0.3733146191,
-0.292996645,
0.2233549803,
0.0937396288,
-0.0571073107,
-0.2370071411,
-0.08507815,
0.2410744578,
0.1441716403,
-0.0554114878,
-0.1522159576,
0.3187151253,
0.5666560531,
0.3326037824,
-0.4247449636,
-0.0982950255,
-0.198043704,
0.5276716948,
-0.120838806,
0.4313079417,
0.4194308817,
0.1199666858,
0.2624454498,
-0.3267872036,
-0.2990858257,
0.4584266245,
0.0017614877,
0.0138818994,
0.0278939009,
-0.185159713,
0.1503156722,
0.0822535679,
0.1463254541,
0.4236715138,
0.0050893798,
0.2698342502,
0.0395107083,
0.225147143,
0.5589660406,
0.1303587854,
0.4065196216,
-0.1425887644,
-0.0419808291,
0.2612913847,
0.2220591009,
0.0050226692,
0.0026295539,
0.1577073485,
0.2627749443,
-0.3247104287,
-0.0300764367,
0.191537559,
0.0047537386,
-0.3440208137,
0.4657172561,
0.2651111186,
-0.2276812047,
0.0245031118,
0.1511318237,
-0.2007097155,
0.1950538009,
0.0990492478,
0.1387066245,
-0.014524959,
-0.2503454685,
0.3574081063,
-0.4714487493,
0.0433497801,
-0.2280959934,
-0.247266084,
-0.0754451156,
0.1768153608,
-0.2844343185,
0.0725034401,
-0.1067320257,
0.1258524656,
-0.1753312051,
0.3727456629,
0.1064317077,
-0.4275985956,
-0.2481842339,
-0.3017340302,
-0.2549421787,
-0.0955485031,
-0.2005654871,
0.0457932279,
0.2084632963,
0.340015769,
-0.0459288433,
0.1553066075,
0.2822339535,
-0.1257597506,
-0.1181760579,
0.0454460755,
-0.6027137041,
0.2640286982,
0.3624569476,
0.2131042928,
0.2241928428,
-0.3873642683,
-0.2172870487,
0.0356934145,
0.0904211104,
-0.237491563,
0.2351772934,
0.136128068,
0.6803236604,
0.5626972914,
-0.0797042847,
-0.3214339614,
-0.1804884523,
-0.2506407499,
-0.1027371213,
-0.19035694,
0.0146539882,
-0.1661777943,
0.504953146,
0.2326369435,
-0.196562469,
0.0962210149,
-0.2331665158,
-0.1289420724,
-0.1913466305,
0.264850378,
-0.1744268388,
0.0859468058,
0.0570476726,
0.3812099099,
-0.1171633676,
0.1815218627,
0.0742730051,
0.1007424816,
-0.3683784604,
-0.1265715808,
0.3467054069,
0.2702928483,
-0.3461804688,
0.5040487051,
0.1022235528,
0.0673034042,
-0.094445236,
-0.336417079,
0.2133802474,
0.0235657953,
-0.1767973602,
-0.000187017,
0.3356519938,
-0.0955227166,
-0.0587276891,
0.0671306625,
0.2493181676,
0.3315479457,
-0.0811263695,
-0.3822199106,
-0.2865696549
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Ok yes. I think this is an important feature to be able to use large datasets which are pretty much always compressed files.
In particular now this requires to keep the extracted file on the drive if you want to avoid reprocessing the dataset so in my case, this require using always ~400GB of drive instead of just 200GB (which is already significant).
Two nice features would be to:
- allow to delete the extracted files without loosing the ability to load the dataset from the cached arrow-file
- streamlined decompression when only the currently read file is extracted - this might require to read the list of files from the extracted archives before processing them? | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 116 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Ok yes. I think this is an important feature to be able to use large datasets which are pretty much always compressed files.
In particular now this requires to keep the extracted file on the drive if you want to avoid reprocessing the dataset so in my case, this require using always ~400GB of drive instead of just 200GB (which is already significant).
Two nice features would be to:
- allow to delete the extracted files without loosing the ability to load the dataset from the cached arrow-file
- streamlined decompression when only the currently read file is extracted - this might require to read the list of files from the extracted archives before processing them? | [
-0.0659784675,
-0.0675044581,
-0.1214437485,
0.1361942589,
-0.1881688833,
0.2371559143,
-0.1601302326,
0.2473284006,
0.1624710262,
0.1584106386,
0.1043196246,
0.4483777285,
-0.3028531075,
-0.10580571,
-0.1939977407,
-0.0391122028,
-0.1808357835,
0.3018629551,
0.0600303262,
0.1913314611,
-0.1481151879,
-0.0545215234,
0.021462664,
-0.1286901236,
0.1161557734,
-0.4201308191,
0.2055556178,
-0.2362956405,
-0.098224014,
-0.3271231055,
-0.0077747107,
0.5414353609,
0.3300153613,
0.1635193825,
-0.0001216864,
0.0521241874,
0.2817977667,
0.0643243566,
-0.4494720101,
0.1446416378,
-0.3190245032,
-0.1872634888,
0.1448404938,
-0.1605795771,
0.2758429646,
-0.5139069557,
-0.1515803784,
-0.7546899319,
0.4762697518,
-0.2039915025,
0.0753074586,
-0.0049458928,
-0.5496515036,
0.1562355012,
0.312471658,
0.3418071866,
-0.1361887157,
-0.0434957445,
0.4967583418,
0.119031705,
0.2489923537,
0.3314891756,
-0.0464918204,
-0.3507283032,
0.3594222367,
-0.0695530996,
-0.0735745281,
-0.2807364464,
0.2501987219,
0.0622789413,
0.6185544729,
-0.2949787378,
-0.1788841784,
-0.3965526521,
0.0939030796,
-0.6207107902,
-0.0016166959,
0.2456873953,
0.0135155544,
0.3100343347,
-0.0990563482,
-0.4396601915,
-0.3894589543,
-0.112868242,
0.632661581,
-0.4742107689,
-0.0741032586,
-0.1111172438,
0.512136817,
0.1867255419,
0.2198594362,
-0.1967430264,
-0.2167708427,
0.3942317963,
-0.0830869526,
-0.1818789095,
-0.3705097139,
-0.2833350301,
0.1888691634,
0.1414780766,
0.4201415777,
-0.0434933081,
0.1795666516,
0.0853911936,
0.2840004861,
0.3924606442,
-0.0170194022,
-0.1081940383,
0.1641591638,
0.1096846163,
0.1837195158,
-0.0634689927,
0.0451793596,
-0.0622211471,
0.1686202139,
0.1019991636,
-0.090588823,
-0.110068351,
-0.0399751328,
0.0446353778,
0.0713075995,
-0.2095420659,
0.09905871,
0.1798972487,
0.2338264585,
0.0712888613,
0.089520514,
0.2898357213,
0.0463682488,
-0.3151606619,
0.1110787392,
0.0767038092,
-0.3082774282,
-0.2443212271,
0.4048586488,
-0.1130670011,
-0.0529357344,
-0.1779989302,
-0.2501622736,
0.0887635201,
0.5159019232,
-0.1552267522,
0.324642241,
0.2360243201,
-0.2288740575,
-0.251458168,
-0.2872161567,
-0.0144999474,
-0.1715118736,
0.5403383374,
-0.1308786422,
-0.2736296356,
-0.0119040627,
0.0827527568,
0.0778670982,
0.2827008367,
-0.5317144394,
0.235083431,
0.0539900102,
-0.0468181148,
-0.0410923399,
0.3351683617,
-0.0156068206,
-0.0135695543,
-0.3476057649,
0.2468974292,
-0.6518741846,
-0.0602273531,
-0.3570016623,
-0.2370944619,
0.1824220121,
0.1142957881,
-0.1536521763,
0.1675506681,
-0.1818364412,
0.1057170779,
0.382294178,
-0.0641672388,
-0.3867467642,
0.1953919977,
0.1077703387,
0.2615795135,
0.3133717179,
0.2150317132,
0.4147535861,
-0.0729535222,
-0.0957666636,
0.2799835801,
0.0771863312,
-0.096942775,
-0.2989011407,
-0.4622783661,
0.0986727104,
0.2479759306,
0.0211346205,
0.1290630996,
0.2614647746,
-0.0357315689,
0.203703016,
0.1651516855,
0.2209410518,
0.1400307119,
0.0642624423,
-0.2695456445,
-0.1503100991,
0.1737480015,
-0.4975179434,
0.0126309246,
-0.521406889,
-0.3172442317,
-0.204538092,
-0.2885703444,
0.137227267,
-0.033504609,
-0.1988252103,
0.2015223056,
0.0237850174,
-0.1412812173,
0.2724554837,
0.0653195307,
-0.4101708531,
-0.0657816529,
-0.0675780028,
-0.0595216453,
-0.4646091759,
0.1204922199,
0.1567466259,
-0.1407266557,
-0.1265906096,
0.0524365455,
-0.3225056529,
-0.441072613,
-0.1505691707,
0.1877080649,
0.2010251284,
0.2613531351,
0.1614186466,
0.3275241256,
0.2161500603,
0.1428627968,
0.1739605665,
0.1386934519,
0.0297905616,
0.0958651006,
-0.3868566751,
0.407758534,
-0.3279556036,
-0.0253799148,
-0.192820549,
-0.4176355004,
0.2501661777,
-0.1081965789,
0.0301856697,
-0.5059498549,
0.0732085258,
0.3495836854,
-0.0904177129,
-0.0261920616,
0.1483161449,
-0.2089300454,
-0.0180655774,
-0.0765656456,
-0.2578073144,
0.3139605224,
-0.0984881893,
-0.1204740554,
0.1099252775,
0.4566310644,
0.3945098519,
0.213454634,
-0.1338795424,
-0.1825797409,
0.5015576482,
0.0169859193,
0.1319736838,
0.0567717701,
0.0611690544,
0.416952014,
0.1301808357,
0.0714415163,
-0.2148227096,
-0.1260572374,
0.1761089563,
0.1470306963,
0.2887781858,
-0.1400395483,
-0.2087572217,
-0.4624945521,
0.4350060821,
0.3845836818,
0.2519317567,
-0.0065837614,
0.5214509964,
0.0077444343,
-0.3969200552,
0.0599970743,
-0.0019941628,
0.7599349618,
-0.0931037217,
-0.3055968583,
-0.4187724888,
-0.1977103055,
0.1883242726,
0.0038353726,
0.3493971527,
-0.1790193319,
0.4796021581,
0.2143741548,
0.0479681715,
-0.0809134841,
-0.0552875698,
0.0849812925,
0.3521820605,
-0.0478454903,
0.0350215733,
0.1456887722,
0.0863026455,
0.0937903225,
-0.1733704954,
-0.2101907432,
-0.125600934,
0.1074935347,
0.1208859533,
0.0952275172,
-0.2698010802,
0.0426242463,
-0.2468212396,
-0.4235399663,
0.3091304004,
-0.0513286255,
-0.0689932108,
0.1583265811,
0.2341707796,
-0.0445754938,
0.0575845614,
0.0680006668,
-0.0336195976,
-0.6436603665,
0.1269381195,
-0.1944604963,
0.0436174646,
0.0808591247,
-0.063168779,
-0.0740562975,
0.419819057,
-0.3769465089,
0.0351679996,
0.0643249527,
0.1337394267,
-0.298814863,
-0.0806288347,
0.2037662268,
0.212161541,
-0.0176125318,
-0.0105864853,
0.1454560757,
0.2049530745,
0.3793354928,
0.1457604468,
0.1917962432,
0.2467258275,
0.2169595957,
0.4157985151,
-0.2578361332,
-0.0076828054,
0.3150090575,
0.391985774,
0.4485299587,
-0.143201828,
0.1977033168,
-0.3346403837,
-0.01016175,
-0.1489814818,
0.0669747069,
0.0261992402,
-0.2776843309,
0.1452685595,
-0.2031219602,
-0.0504852794,
-0.1147195622,
0.2853798568,
-0.2961051464,
0.1113293394,
0.0297482461,
-0.2856205404,
-0.0609255731,
-0.0604317859,
0.1740288734,
0.1901504695,
0.5275211334,
-0.0549111515,
-0.1452024579,
-0.0328799449,
-0.1676222384,
0.2732892334,
-0.1726187915,
-0.1998917013,
0.0356645137,
-0.0120087191,
0.0921490416,
0.2388249785,
0.3515523374,
-0.1252102703,
-0.0307968296,
-0.1520736217,
0.043005988,
-0.2111052573,
0.0137661099,
0.0080303401,
0.0207167864,
0.0089399274,
0.4495281279,
-0.2623150349,
-0.1419359446,
-0.2325690091,
0.5902495384,
-0.2365605384,
-0.1827655137,
-0.0008260384,
-0.1295437515,
-0.5585112572,
0.0057389475,
0.0432744995,
-0.1035291031,
0.0979589224,
-0.2668537498,
-0.1903071702,
-0.2498413324,
0.0896732509,
0.0202737078,
0.4588964581,
-0.2742722631,
0.0562032759,
-0.035032995,
0.2389666736,
0.5481042862,
0.2142433375,
-0.1473026574,
-0.0585222542,
0.0262671299,
-0.3692212701,
0.1674479693,
0.1663970053,
-0.2425574064,
0.3254415691,
-0.2277769595,
0.4670628607,
-0.0689683855,
0.065204218,
-0.2590867579,
-0.2505387366,
-0.0571975745,
-0.2039660215,
0.1911699027,
0.0541405529,
-0.209872663,
0.4351097345,
-0.1205914766,
-0.257270664,
0.5326520205,
0.0590782687,
1.1551052332,
-0.1128399,
0.0149776954,
-0.2680405974,
-0.1797768176,
0.3728267252,
-0.663331449,
0.1816277057,
0.0149576813,
-0.138488248,
0.0593061149,
-0.0376285501,
0.037668515,
0.2846595943,
-0.2282193154,
0.0590174049,
-0.2025695443,
-0.2804598808,
-0.2769897878,
0.3981357515,
-0.0736174732,
-0.2576680481,
-0.0592690334,
-0.0360441133,
0.059620712,
-0.0574106984,
-0.2111499459,
-0.1065165401,
0.3768345118,
0.0289756656,
0.2776345909,
-0.1710879356,
-0.3207927942,
0.3730856478,
-0.2118289322,
-0.2551981211,
-0.1024202332,
0.0718892589,
-0.2685132623,
0.0503333583,
0.1471632421,
-0.0070662168,
0.0903499126,
-0.0627788454,
-0.3701246977,
0.0344958045,
-0.0024104733,
-0.0782947466,
0.0977917016,
0.1336590946,
-0.3397372663,
-0.3465417922,
0.1758271456,
0.1366617531,
-0.124431476,
0.0564567409,
-0.2980698347,
-0.0924462304,
-0.4841827154,
0.140990302,
0.0586789325,
0.3002811074,
-0.1433353126,
0.2562084794,
-0.1935006678,
-0.1190176457,
-0.1494343728,
-0.152820155,
0.1490317583,
-0.2014126182,
0.2311072499,
-0.2553103566,
-0.2430457622,
-0.3802861273,
-0.0017060041,
-0.1441027224,
-0.3890043795,
0.4247325361,
0.0393174775,
-0.1646713912,
0.0566641502,
-0.1659505814,
0.0021755784,
0.0056374781,
-0.0699911788,
-0.1672659367,
-0.4592878222,
0.2587141395,
0.1362247765,
0.5790663362,
0.0889935866,
0.0018239617,
-0.1906795502,
0.0303709824,
-0.2141229361,
0.3121223748,
0.3379606605,
0.1776248366,
0.0269685909,
0.2774657309,
0.0403180234,
-0.237420857,
-0.1122769788,
0.1082692072,
-0.0424622148,
-0.1265538931,
-0.1338107586,
0.1278323233,
-0.1039083004,
-0.1173322424,
-0.1563272923,
-0.2644058466,
0.0292448513,
-0.2014669776,
0.2527791262,
-0.2529951334,
-0.1273671985,
-0.1315406859,
0.3878422379,
-0.0559783354,
-0.1523722112,
0.1996944994,
-0.0371239446,
0.4207262993,
0.0125946775,
0.1074034274,
-0.0790143237,
-0.0557296798,
-0.3938589692,
0.0815992951,
0.3363563418,
0.0910334587,
0.1453466266,
0.0098266369,
-0.034661267,
0.1117324904,
0.0570548847,
0.2079504728,
-0.1051378995,
-0.0590625927,
0.0234874524,
0.1583218724,
-0.2124461383,
-0.1063571051,
-0.0475776941,
-0.0073402636,
-0.1604297161,
0.2504927814,
0.3605209887,
0.0801654011,
-0.0175499544,
0.0418238789,
0.3067477942,
-0.1281602085,
0.3053995371,
0.3543406427,
0.1122723147,
-0.1918134242,
-0.1634384692,
0.3312186897,
0.1881328821,
-0.1521893144,
-0.1744485646,
0.4083155096,
0.6499541998,
0.3493703902,
-0.5603495836,
-0.2789341509,
-0.2383552492,
0.623247385,
-0.059077885,
0.4289213717,
0.3845163286,
0.2122106701,
0.3161064386,
-0.1366517097,
-0.142798394,
0.3982593119,
0.0905592889,
0.035521701,
0.0893567055,
-0.1809117645,
0.1088453084,
0.0697771609,
0.1355871707,
0.3712619841,
-0.1599113792,
0.36428532,
0.1624093354,
0.2602544427,
0.5718258619,
0.2083935142,
0.4663645029,
-0.1589476466,
-0.2222063243,
0.2036522627,
0.2428523153,
0.1175449938,
-0.1486442089,
-0.0576638579,
0.1116551608,
-0.3451364636,
-0.0397506207,
0.0243021771,
0.0840383396,
-0.2572033703,
0.4885838926,
0.2748908401,
-0.1898317784,
0.0664420053,
0.0044171512,
-0.0531427413,
0.1279200613,
0.1066856459,
0.2125917971,
-0.1347332895,
-0.2357349396,
0.379519999,
-0.4040883482,
0.0092475954,
-0.1563634872,
-0.0164120942,
0.029393144,
0.3202222586,
-0.2720811367,
0.07905972,
-0.003983587,
0.0465872511,
-0.2235046774,
0.2113467753,
0.2501468062,
-0.3231531084,
-0.2714590728,
-0.2596999705,
-0.1967798173,
-0.212723121,
-0.2271254063,
0.0763293207,
0.1694621146,
0.255387336,
0.0660129562,
0.2566126287,
0.0694930032,
-0.1009571552,
0.0615431145,
0.0652921349,
-0.4469426572,
0.0430704542,
0.3881988525,
0.2435120791,
0.1337824464,
-0.4015808105,
-0.3996722698,
-0.000154227,
-0.0219376236,
-0.1888750792,
0.2017793655,
0.0450215787,
0.689019978,
0.6287794709,
-0.1140043437,
-0.3001965284,
-0.0539146885,
-0.2284240574,
-0.0118990559,
-0.083009854,
0.0136511885,
-0.1952998787,
0.4423671663,
0.1934664547,
-0.3521393538,
0.2612173557,
-0.2566982806,
-0.2904363573,
-0.1876445413,
0.1607293785,
-0.3335033059,
-0.066442512,
0.0190967172,
0.4339581132,
-0.0229123756,
0.2096651196,
0.0817558467,
0.0818541646,
-0.3381945789,
0.0530680344,
0.3016918898,
0.3127165735,
-0.2746136785,
0.5506643653,
0.0493567735,
0.0816833451,
0.0799991563,
-0.2568174005,
0.2503432631,
0.1334228963,
-0.3104124069,
0.0269018859,
0.2244577706,
0.0296759978,
-0.0604570024,
0.0501811355,
0.2297378778,
0.4168798625,
0.0695709661,
-0.4529073536,
-0.2204632461
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Note that I'm confirming that with the current master branch of dataset, deleting extracted files (without deleting the arrow cache file) lead to **re-extracting** these files when reloading the dataset instead of directly loading the arrow cache file. | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 38 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Note that I'm confirming that with the current master branch of dataset, deleting extracted files (without deleting the arrow cache file) lead to **re-extracting** these files when reloading the dataset instead of directly loading the arrow cache file. | [
-0.1638347507,
0.038030833,
-0.1447685212,
0.1780928522,
-0.1592693925,
0.2357142866,
-0.1746570468,
0.2873373032,
0.1265912652,
0.1585223675,
0.0674440935,
0.5160758495,
-0.2275414914,
-0.0690875649,
-0.2018715888,
0.0688019991,
-0.2498384267,
0.2992703915,
-0.1215838268,
0.147556901,
-0.1509248018,
0.0209512431,
0.0688547343,
-0.1775142998,
-0.0016515777,
-0.3966263235,
0.2204260379,
-0.2167358696,
-0.13470079,
-0.4136337638,
0.0634002835,
0.555729866,
0.2655677199,
0.1864331514,
-0.0001169127,
-0.0113524273,
0.2978254557,
0.1052253917,
-0.462044239,
0.1928022504,
-0.2715249062,
-0.1185480058,
0.2721541524,
-0.1176441908,
0.2377960384,
-0.4201450348,
-0.2090131044,
-0.6489427686,
0.4792972803,
-0.1898257434,
0.1478466243,
0.0329267308,
-0.5153905749,
0.0615889281,
0.2572769523,
0.3319446743,
-0.0981927589,
0.0039386861,
0.3674484789,
0.0887911543,
0.1793733984,
0.3715208173,
-0.0340013541,
-0.2261724621,
0.3655919135,
-0.016139131,
-0.1732268631,
-0.2317012101,
0.3097933829,
0.0443825163,
0.6939406395,
-0.4388228953,
-0.1589536369,
-0.3909530938,
0.1421657205,
-0.5054188967,
0.1175635159,
0.1817198396,
0.0114594251,
0.2422338873,
-0.1476074755,
-0.4430014193,
-0.3262473941,
-0.1966210753,
0.5953675508,
-0.4200974703,
-0.0878204107,
-0.1266939491,
0.4859718084,
0.0839420781,
0.225202322,
-0.17928572,
-0.3020442724,
0.3221303821,
-0.1004943475,
-0.1947904229,
-0.3318038285,
-0.2837390602,
0.1633083522,
0.197144419,
0.392190069,
0.0155778583,
0.1589903384,
-0.0024580816,
0.3650122285,
0.3253181875,
0.056749016,
-0.0154445618,
0.1955091059,
0.1219285205,
0.0944666937,
-0.0626403391,
0.0564418733,
-0.0361695699,
0.3055575788,
-0.0224619657,
0.0320762917,
-0.1643723398,
-0.0773372501,
0.0661551058,
0.1919804662,
-0.1818096787,
0.0514084324,
0.1919045746,
0.1945617795,
0.1084142178,
0.0120295957,
0.2396142185,
0.0325861722,
-0.3729589581,
0.0624156818,
0.0842375085,
-0.3152472377,
-0.2167699039,
0.4251203835,
-0.0692526102,
-0.0677438825,
-0.0776425377,
-0.3325960934,
0.1238679737,
0.5096792579,
-0.0929377154,
0.2749299109,
0.3011270165,
-0.1944485903,
-0.2114196122,
-0.2887331247,
0.0115744546,
-0.146205321,
0.4718726277,
-0.0836263597,
-0.2405283898,
-0.079288207,
0.1582889259,
0.0998339951,
0.253929913,
-0.6136035323,
0.1032643914,
0.1020419002,
0.062907286,
0.006415695,
0.2727427483,
-0.0109286755,
-0.0711654723,
-0.250028491,
0.2974756062,
-0.7026982903,
-0.015114598,
-0.3810774684,
-0.2615413666,
0.1441980153,
0.1360020041,
-0.1140999645,
0.2153520733,
-0.1931096613,
0.1585100889,
0.2810719013,
-0.1277638227,
-0.4494961798,
0.1385639906,
0.0316711217,
0.221645236,
0.2527032197,
0.2599442303,
0.4064208865,
-0.0053484142,
-0.0747050568,
0.2618268132,
0.0072225761,
-0.0818888918,
-0.3101493716,
-0.3716853857,
0.009133121,
0.2902944088,
-0.0464236699,
0.0333960503,
0.2457733452,
-0.0116136298,
0.1760634035,
0.1377883554,
0.1765563637,
0.1564888358,
0.1129364073,
-0.2869826555,
-0.2430575043,
0.1173629463,
-0.6472292542,
0.0515575856,
-0.4302774668,
-0.3367313147,
-0.2597640753,
-0.4017221928,
0.1069796383,
0.000314042,
-0.2254599184,
0.1922653764,
0.0904280618,
-0.0458628759,
0.1582462937,
-0.0665627271,
-0.39130193,
0.0469880104,
-0.0650380552,
0.0207481571,
-0.4797949195,
0.0695303977,
0.171474427,
-0.2255221009,
0.0300063267,
0.0377178267,
-0.3066352904,
-0.4373157918,
-0.136769399,
0.2760287225,
0.2677146792,
0.2772710323,
0.2583812773,
0.2232232839,
0.172356829,
0.1517797709,
0.0993094146,
0.1439179331,
-0.0193576999,
0.1048069,
-0.4482201338,
0.3862940967,
-0.1830080152,
-0.0284164697,
-0.1669946909,
-0.3487371206,
0.2705667019,
-0.0806844756,
0.0948652327,
-0.6014314294,
-0.0367366225,
0.3301690817,
-0.0589252524,
0.0794565082,
0.0906825662,
0.0266449079,
0.0612903014,
-0.0423660651,
-0.1162150875,
0.3406757712,
-0.0697613955,
-0.2100415081,
0.1170763001,
0.4911102653,
0.3566937745,
0.2214137018,
-0.0846715868,
-0.1309576482,
0.4406018555,
0.0044327788,
0.1452682018,
0.0406753384,
0.085757792,
0.308553189,
0.0913145021,
-0.0110083371,
-0.2508099675,
-0.0662559271,
0.1040212288,
0.2441476434,
0.2336023152,
-0.2658804655,
-0.3304502666,
-0.381860137,
0.4872902036,
0.3326805532,
0.2534177005,
-0.0412214845,
0.4535224736,
0.1211714298,
-0.4766841829,
0.124992393,
-0.0667656884,
0.6247704029,
-0.1010293886,
-0.2049592286,
-0.3821297288,
-0.2168398798,
0.126638338,
0.0564314052,
0.3907304108,
-0.0646001622,
0.4973317683,
0.118051447,
0.1314407289,
-0.1648131609,
-0.0041277483,
0.0818762258,
0.3110401928,
-0.0571075901,
0.1339188814,
0.1453294456,
-0.0676506907,
0.1235650927,
-0.2136648297,
-0.3039456606,
-0.1567977667,
0.1779381037,
0.0637524873,
-0.004493203,
-0.2445878088,
-0.1115917563,
-0.163843438,
-0.4349406362,
0.2674321532,
-0.0510963835,
0.0239289906,
0.108626619,
0.1742660105,
-0.0175037831,
-0.0008385628,
0.009125147,
-0.0748915821,
-0.585169673,
0.1650399715,
-0.21321854,
0.0230192356,
0.2357923687,
0.0374632999,
0.0251582004,
0.3056433797,
-0.4097908735,
0.0278874747,
-0.0611578524,
0.179148674,
-0.2906419337,
-0.1186671555,
0.2030059397,
0.2551261187,
-0.1212827936,
0.0341082588,
0.1248947978,
0.2755824924,
0.3200292587,
0.0323266834,
0.0342406593,
0.285916239,
0.1640782058,
0.3512733281,
-0.1879604757,
0.051215481,
0.2993654609,
0.3690423965,
0.4838580191,
-0.2564124167,
0.2488675416,
-0.3840310276,
0.0199967474,
-0.0404899083,
0.152416721,
0.040785186,
-0.1463923454,
0.2161569893,
-0.2363278568,
-0.0881398469,
-0.1792968363,
0.273165375,
-0.2889288664,
0.0402080268,
0.0800962895,
-0.2684659362,
-0.0185031705,
-0.0233895779,
0.1533513069,
0.0773831531,
0.3878051639,
-0.0952339619,
-0.2750812471,
-0.0267899595,
-0.2655270696,
0.3023186922,
-0.2460314929,
-0.1332045943,
-0.0475663021,
0.0054383352,
0.1472667605,
0.2468611449,
0.377007246,
-0.1615944207,
0.0034674965,
-0.1344493926,
0.04936257,
-0.325489223,
0.0385542884,
-0.0113813132,
0.0659052953,
-0.0248180274,
0.3186225891,
-0.2891429067,
-0.2005817294,
-0.1354071796,
0.5658420324,
-0.2458694875,
-0.0819142684,
0.0042756051,
-0.2207073271,
-0.4849288166,
0.0790769085,
0.0261180624,
-0.1166032255,
0.1459046602,
-0.2863047123,
-0.1278499961,
-0.2963279188,
0.0831853747,
0.0918702781,
0.5984146595,
-0.2050713003,
0.1636434793,
-0.0610120595,
0.1400485188,
0.6094436646,
0.3160104454,
-0.109106794,
-0.0088361055,
0.034518376,
-0.3696351349,
0.1417116374,
0.1127380431,
-0.186681807,
0.2563533485,
-0.1997178197,
0.5040169954,
0.0093946494,
0.0027099028,
-0.2488680035,
-0.2839727998,
-0.0684405938,
-0.2279617786,
0.1080497652,
0.0423951522,
-0.1545618176,
0.4536224306,
-0.1000726521,
-0.2369528264,
0.4782825112,
0.111401543,
1.0490746498,
-0.0775836632,
0.0356167555,
-0.1609677225,
-0.2834874392,
0.3261195719,
-0.5598513484,
0.0843034238,
0.0123189613,
-0.1201917678,
0.1132014021,
-0.0343067497,
-0.0023789424,
0.2772350311,
-0.2347500473,
0.0795549229,
-0.3114009798,
-0.1200343817,
-0.2471472919,
0.4306899905,
-0.1301984936,
-0.2882217169,
-0.0762301981,
0.0350222513,
0.0873174071,
-0.1888193339,
-0.2189511955,
-0.0781410486,
0.3835893869,
-0.0389156118,
0.2399488986,
-0.0820738673,
-0.2556139529,
0.3634470403,
-0.1974612325,
-0.1324066818,
-0.1501625478,
0.0025842846,
-0.1674366742,
0.0485406518,
0.1268176585,
0.0721173137,
0.0788133144,
0.0102124959,
-0.3229547441,
0.017607972,
-0.0816232041,
-0.1278712451,
0.0057417303,
0.0871287286,
-0.2665797472,
-0.3794741035,
0.2276145369,
0.1466223896,
-0.1534772962,
0.0173727088,
-0.2547751665,
-0.125576213,
-0.4791088998,
0.0489409417,
0.1253711283,
0.2693444788,
-0.1279640049,
0.2854361236,
-0.1708796769,
-0.2049614191,
-0.2208630443,
-0.1151560247,
0.2870612442,
-0.1019972414,
0.3308943808,
-0.1526322514,
-0.1944945306,
-0.4860873818,
0.0062781274,
0.0898373723,
-0.4311341643,
0.4288221002,
0.0083313249,
-0.1597495973,
0.1343875229,
-0.078534022,
-0.0049222009,
-0.0023802556,
-0.1550838649,
-0.1179554537,
-0.4771162271,
0.2584300935,
0.1668667942,
0.5414475799,
0.0517602861,
-0.0477173924,
-0.1501582265,
0.1248977333,
-0.2867145538,
0.2042430639,
0.2524321675,
0.1670936942,
-0.056289807,
0.3051926196,
0.1198347658,
-0.3132948577,
-0.0517854914,
0.0629813969,
-0.1310726702,
-0.2062088847,
-0.0797002167,
0.0879196301,
-0.1630657613,
-0.0899494812,
-0.1748681813,
-0.1778808981,
0.0288618542,
-0.2104349583,
0.2703492939,
-0.1927797794,
-0.1530978084,
-0.1547865272,
0.4422272742,
-0.0978602767,
-0.127412945,
0.1500855684,
-0.0465309843,
0.300034225,
-0.0446943566,
0.0621789321,
-0.0825495347,
-0.0836140215,
-0.225050658,
0.1014939025,
0.2650088072,
0.0771160871,
-0.019549001,
-0.0275108963,
-0.1250664592,
0.1517776102,
0.1358238459,
0.2690423727,
-0.0462780222,
-0.179092139,
-0.0391744785,
0.2356311083,
-0.2341135144,
-0.1392618418,
-0.0257324502,
0.0546710789,
-0.1703191698,
0.2459826767,
0.3385910988,
0.0634860396,
0.0567091145,
0.1311381459,
0.2675948143,
-0.2423138022,
0.3843116462,
0.3634721935,
0.0747027546,
-0.2442731559,
-0.065298982,
0.3188362122,
0.1602813005,
0.0378596261,
-0.1042150334,
0.4175529778,
0.6066236496,
0.3013850749,
-0.4863902628,
-0.3089414239,
-0.2099139988,
0.5793690681,
-0.0945491195,
0.4008532465,
0.4404425025,
0.1670520902,
0.3227193356,
-0.3564127684,
-0.2688575089,
0.3678480387,
0.0567994639,
0.0569507815,
0.032485351,
-0.1135431007,
0.1598707587,
0.124046348,
0.1077642217,
0.3357600272,
-0.0621858798,
0.2875963151,
0.09811645,
0.1508204192,
0.5759003758,
0.1738010049,
0.3641438782,
-0.1365811378,
-0.1599029601,
0.1996972859,
0.2128985822,
0.0841390714,
-0.0369847529,
-0.0155063868,
0.1501615345,
-0.3222708702,
0.0604527295,
0.0688137263,
0.0356954113,
-0.2824097574,
0.4310360551,
0.2198581696,
-0.2790059447,
0.0124405883,
0.1058832258,
-0.0951277614,
0.1621370912,
0.0995231718,
0.1884833872,
-0.0682638288,
-0.2039424181,
0.3901365995,
-0.4440830052,
0.0619218163,
-0.1376009583,
-0.0918117538,
-0.0495721176,
0.3588741422,
-0.3027017415,
0.0067119747,
-0.1420396268,
0.090586707,
-0.194609642,
0.3490245342,
0.186971277,
-0.3395479918,
-0.2126796991,
-0.3154651225,
-0.337893486,
-0.1892919391,
-0.2675839067,
0.0137951225,
0.2698316276,
0.2674232423,
-0.0198094472,
0.2280038744,
0.2677685022,
-0.0480602719,
-0.1025074869,
0.0251171943,
-0.5011217594,
0.1211821586,
0.3226193786,
0.2113983184,
0.130186528,
-0.4562163949,
-0.2158824354,
-0.0135161504,
0.0075381398,
-0.1407111138,
0.2123308629,
0.1369472295,
0.6466159821,
0.663548708,
-0.0839912072,
-0.3119260073,
-0.0729773045,
-0.1753681302,
-0.1198863536,
-0.1471248269,
-0.0737960413,
-0.1096396744,
0.4317800105,
0.2941236496,
-0.2969915867,
0.2574813068,
-0.2406550497,
-0.2088908404,
-0.1787055135,
0.2433130443,
-0.2513652146,
0.0599742383,
0.0469661951,
0.4676734805,
-0.051547192,
0.1882142723,
0.0739946961,
0.1181129664,
-0.3579022884,
-0.0601622574,
0.338868916,
0.2894137502,
-0.3498059511,
0.4524708986,
0.1452548504,
0.0975930542,
-0.1375297308,
-0.2947257459,
0.2565616965,
0.1006883085,
-0.2167925388,
-0.0259710029,
0.2420883328,
-0.0488132574,
-0.0287115127,
0.0757225379,
0.3928266764,
0.3239247799,
-0.0721381754,
-0.4051160514,
-0.2832626104
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Hi ! That's weird, it doesn't do that on my side (tested on master on my laptop by deleting the `extracted` folder in the download cache directory). You tested with one of the files at https://huggingface.co/datasets/thomwolf/github-python that you have locally ? | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 41 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Hi ! That's weird, it doesn't do that on my side (tested on master on my laptop by deleting the `extracted` folder in the download cache directory). You tested with one of the files at https://huggingface.co/datasets/thomwolf/github-python that you have locally ? | [
-0.0332568809,
-0.0617314726,
-0.1518050879,
0.2321404964,
-0.0794416964,
0.1899538934,
-0.1519192457,
0.3226886988,
0.2679438889,
0.1859112829,
-0.0086608715,
0.4785898924,
-0.2064819932,
0.0198206976,
-0.1249554604,
0.0193799417,
-0.2612203658,
0.2673114538,
-0.0352829769,
0.1023951769,
-0.1649815291,
0.1615478992,
0.0307116359,
-0.2143167257,
-0.0014292002,
-0.2806629241,
0.1773869395,
-0.0900830328,
-0.2368222475,
-0.4120257497,
0.0911945552,
0.4586047828,
0.2278507352,
0.2842087746,
-0.0001189412,
0.0202763826,
0.3218189478,
0.0664270595,
-0.3416109383,
0.0965559557,
-0.1090634167,
-0.2528344393,
0.3365178108,
-0.2395071685,
0.1118234843,
-0.2765811384,
-0.2922463417,
-0.5912127495,
0.531522274,
-0.0952574983,
0.1267585456,
0.1466718316,
-0.3559587598,
0.2192573845,
0.2747632563,
0.2166807055,
-0.098864764,
0.0537275895,
0.3152773678,
0.0675991029,
0.2849490345,
0.3909695148,
-0.1213170737,
-0.1054867432,
0.3051480949,
0.053714294,
-0.1651776731,
-0.4498273432,
0.2631423771,
-0.0311787948,
0.565312326,
-0.4969910979,
-0.2195426822,
-0.3977091312,
0.0205812603,
-0.6025556326,
0.0792897195,
0.3545735776,
-0.0875535309,
0.2304888964,
-0.2468706518,
-0.3859893978,
-0.3075895011,
-0.0835524276,
0.4763793647,
-0.2620851994,
-0.1824117303,
-0.1066637784,
0.4677401483,
0.1795822531,
0.0424531065,
-0.2289458364,
-0.2521288693,
0.3555208743,
-0.127411902,
-0.2224957645,
-0.208864972,
-0.3136998713,
0.2307110727,
0.2699066103,
0.2709550858,
0.0157216005,
0.1045328528,
-0.0305520222,
0.3759335577,
0.4152935147,
-0.0611147583,
0.1297468245,
0.3189990819,
0.1017591357,
0.0494837761,
-0.0757147372,
0.1097161397,
-0.0244886912,
0.3162863851,
-0.1740891337,
0.1749754548,
-0.153149575,
-0.0912242457,
0.1615379155,
0.1361989379,
-0.1264772266,
0.0433214381,
0.2908785641,
0.0304661952,
0.087059252,
0.0671085119,
0.320992738,
-0.0561015345,
-0.1605154723,
0.0770600215,
0.1735166013,
-0.2492263019,
-0.2693282068,
0.4215800166,
-0.1249040216,
0.0887148455,
-0.0435724482,
-0.216262877,
-0.0413142741,
0.5175766945,
-0.1195726246,
0.3411773741,
0.4210416079,
-0.0745882243,
-0.1149849221,
-0.1722792238,
-0.1657734513,
-0.1743790805,
0.4609255493,
-0.1498116851,
-0.2387830317,
-0.1282223463,
0.1567414403,
-0.0032495037,
0.2452868372,
-0.6246501803,
0.0005454714,
0.1519325078,
0.2135064006,
0.0848617405,
0.2263611704,
0.0496608168,
-0.1697265208,
-0.1571182162,
0.3347274065,
-0.466812849,
-0.0333850458,
-0.2098706067,
-0.1474102139,
0.1847275198,
0.2946439683,
-0.0912265405,
0.240730077,
-0.2020548433,
0.1187641472,
0.3351454139,
-0.2505325675,
-0.5275450349,
0.2201986909,
0.0643168241,
0.310369432,
0.2630606294,
0.2385440916,
0.3052239418,
0.0946831852,
0.0400314257,
0.3342139423,
0.0402660444,
0.057985425,
-0.4034207761,
-0.2949005365,
0.0445609726,
0.2469551861,
-0.0413195007,
0.1011844799,
0.1281716675,
-0.1058716774,
0.3076840341,
0.0411468111,
0.1362335384,
0.2670235932,
0.1770785749,
-0.2603791356,
-0.162383616,
0.0183596313,
-0.4770289958,
0.0945221782,
-0.4080125093,
-0.2634163201,
-0.3683609962,
-0.3869253993,
0.0043123253,
0.0810937285,
-0.342312783,
0.0619368032,
0.0587097555,
-0.1631045938,
0.3893433809,
0.0027061328,
-0.3460029066,
0.1510157436,
0.0202829391,
0.1022441164,
-0.4906037748,
0.1922680736,
0.188643083,
-0.251817733,
-0.040912956,
-0.015228264,
-0.2488426268,
-0.4605016708,
-0.1549682319,
0.2493538111,
0.2999376059,
0.1253160238,
0.2067979425,
0.2235667855,
0.1670230776,
0.2181143165,
0.1772173792,
0.222254619,
0.0617597625,
0.1005987078,
-0.2781882584,
0.4478907883,
-0.1885372996,
-0.0291268714,
-0.1488329172,
-0.3766204119,
0.3021797538,
-0.0755828992,
-0.0541072562,
-0.4702612758,
-0.0302457996,
0.3676837683,
-0.0016348213,
-0.0202191565,
-0.0253916979,
-0.0472820438,
0.1545383036,
-0.0499397814,
-0.1253128797,
0.4055541456,
-0.1499509513,
-0.1962156892,
-0.0140798315,
0.415500164,
0.4606250525,
0.1591749191,
-0.0678064972,
-0.0173172858,
0.3735674322,
0.0155712627,
0.1984345466,
0.0710079297,
-0.0462576449,
0.3129605055,
0.2086462677,
-0.0325563699,
-0.2569280267,
0.020821251,
-0.0300836451,
0.2917763591,
0.1879808307,
-0.0984209925,
-0.319522351,
-0.3765309453,
0.4093850553,
0.1857547313,
0.1845461428,
-0.1193322167,
0.3986590803,
0.1807386279,
-0.3674201369,
0.0814922228,
0.0344219804,
0.3880400956,
-0.0016940683,
-0.3106746376,
-0.2539880276,
-0.1466287971,
0.1887051463,
-0.0019916967,
0.2663026452,
-0.1614185721,
0.5131767988,
-0.0222540051,
-0.0057921149,
-0.170504868,
0.0209886804,
0.0856399015,
0.2487092912,
0.0692660362,
0.1128557473,
0.2418882996,
0.0192850307,
0.1607368588,
-0.0956476033,
-0.2883743346,
-0.1349901855,
0.1901531816,
0.1394326985,
0.0259200111,
-0.2716072202,
-0.1041247025,
-0.2724404931,
-0.442222476,
0.3500591218,
0.1526200771,
0.0999123082,
0.1743974984,
0.2171637416,
-0.0255619157,
0.1482318938,
0.0802662969,
-0.1224796772,
-0.6555258036,
0.2202029675,
-0.2332465053,
-0.0462398753,
0.3175823689,
0.0387546644,
0.0010782313,
0.2596192062,
-0.4103812575,
-0.1555807292,
-0.1932015866,
0.245321691,
-0.1802006364,
0.1367727816,
0.1767835915,
0.1448152214,
-0.0755917206,
0.0392445177,
0.0460777804,
0.1047629267,
0.3434066772,
-0.0044577681,
0.1057258993,
0.3205357492,
0.1107364967,
0.4776504636,
-0.0486312732,
0.0883380026,
0.4071292579,
0.2520944178,
0.4920270443,
-0.3374050558,
0.1258829236,
-0.484644711,
-0.0934857428,
-0.085488461,
0.1300483942,
0.1559645236,
-0.1521030813,
0.1395100802,
-0.2521049976,
-0.1673851907,
-0.1934485734,
0.2668281794,
-0.2344255745,
-0.0259916373,
0.093927294,
-0.1695003211,
-0.0837176517,
-0.0794796497,
0.0241835229,
0.1382853389,
0.2804588377,
-0.0628484413,
-0.1751361489,
-0.1319057494,
-0.4479259551,
0.3159880042,
-0.2335047275,
-0.2515757978,
0.1123895943,
-0.0193638802,
0.2216554135,
0.1352764517,
0.418378979,
-0.1490492225,
-0.0966634899,
-0.0755919889,
-0.113754943,
-0.31812796,
0.0026899055,
-0.0213221088,
0.1850786507,
0.0618402399,
0.2871910036,
-0.2788699269,
-0.2535725236,
-0.1004385054,
0.6766916513,
-0.2556498647,
-0.0628542677,
-0.2358074337,
-0.40805161,
-0.6040321589,
0.097063303,
0.1638951004,
-0.1048909128,
0.0750682652,
-0.2510489821,
-0.0694822893,
-0.3054732382,
0.0271758493,
0.0615985543,
0.6772764325,
-0.269992739,
0.1834556758,
-0.123134166,
0.0992161036,
0.4116412997,
0.4825194478,
-0.0674109608,
-0.0367383845,
-0.0192387048,
-0.2285837233,
0.0878268182,
0.1801993847,
-0.1216645837,
0.2007098496,
-0.3159461021,
0.6137956381,
-0.0255603865,
-0.0278346036,
-0.0738733336,
-0.2462097853,
-0.1315935701,
-0.3758293986,
0.1242165715,
0.0124269277,
-0.0810216069,
0.4736641049,
-0.154247582,
-0.227491945,
0.4616509676,
-0.0732439309,
1.1378896236,
-0.0573133305,
0.1218130887,
-0.0517425202,
-0.318449676,
0.3369060457,
-0.6598296762,
0.1584889591,
-0.1112316996,
-0.0681796968,
0.1269741505,
-0.0553703718,
-0.0240612179,
0.133413434,
-0.2422804832,
0.2128765285,
-0.4090473354,
-0.2152427882,
-0.3238564134,
0.4293535948,
-0.1048842296,
-0.276799351,
-0.298887521,
0.0471160486,
0.1215237826,
0.0428712368,
-0.1723893583,
-0.0776227936,
0.31757164,
-0.1417821944,
0.1199446768,
-0.069297716,
-0.1389084905,
0.3715848923,
-0.1808599979,
-0.1589771956,
-0.3154515624,
0.0253912341,
-0.0409133732,
0.1076190919,
0.1379157752,
-0.0042093219,
-0.019211825,
0.0207406916,
-0.3300171196,
0.0066793002,
-0.0624320284,
-0.1476427317,
-0.0375367701,
0.1586972475,
-0.3073326945,
-0.4090113342,
0.2464352995,
0.2679153383,
-0.2021262497,
-0.0482518859,
-0.2696135044,
-0.1242537498,
-0.3961208463,
0.028508164,
0.1112094,
0.395378083,
-0.2896129191,
0.4057914019,
-0.2678985298,
-0.3382914662,
-0.2832977772,
-0.0936655477,
0.3441708088,
-0.0186302811,
0.3068980277,
-0.1357006729,
-0.2476723492,
-0.4111405015,
-0.0265931115,
-0.025420947,
-0.3614841402,
0.5023360848,
0.0710433871,
-0.0541998893,
0.0357516482,
-0.0458609201,
-0.0785355419,
-0.0049884226,
-0.192513898,
-0.0915512517,
-0.4491462111,
0.1111074388,
0.290815413,
0.5239836574,
0.1269325614,
0.0626060143,
-0.0523874909,
0.1228005439,
-0.2610008419,
0.2496443987,
0.1228008941,
0.1014567763,
-0.0038103703,
0.2337699383,
0.1216496974,
-0.3009346426,
-0.0606019422,
0.075594224,
-0.157336697,
-0.2063390315,
-0.0989712179,
0.1312091351,
-0.1449004412,
-0.1276475787,
-0.0739606991,
-0.1366323233,
0.1312752217,
-0.2527084649,
0.4108953178,
-0.0777805373,
-0.0681055188,
-0.1161759198,
0.4291162789,
-0.1365370899,
-0.0248721689,
0.1099174768,
-0.1912467778,
0.4337046146,
0.0322050415,
-0.0077120457,
-0.0308947377,
-0.0435570329,
-0.3207207918,
-0.0046775304,
0.2004584372,
0.0698056221,
0.0687475055,
-0.1616945863,
-0.0815910846,
0.1398992687,
0.2040311396,
0.3896821141,
-0.1375798583,
-0.1116091907,
0.0036818422,
0.2207110077,
-0.2480196804,
-0.2681472898,
0.0259246677,
0.0022778399,
-0.1571577191,
0.3477061987,
0.3385124505,
0.1567883492,
0.1067680642,
0.1792643219,
0.4243696034,
-0.2484148294,
0.3661260605,
0.1565619707,
0.073189646,
-0.1989876926,
-0.0861181021,
0.2434792817,
0.1555795968,
-0.0020667226,
-0.1434388161,
0.3063274622,
0.519988656,
0.2046108097,
-0.5770915747,
-0.2283823341,
-0.2111487389,
0.4667410254,
-0.2342362702,
0.473567903,
0.4336746037,
0.1427625716,
0.1222105622,
-0.2752472162,
-0.2910155952,
0.5431440473,
0.01501978,
-0.0291631799,
0.179815203,
-0.096511811,
0.1239804327,
0.2251505256,
0.1246052235,
0.2634053528,
-0.0272089653,
0.2285268456,
0.0037362464,
0.091121994,
0.5725485682,
0.0508423597,
0.428185612,
-0.2018008828,
-0.1588833928,
0.2087464035,
0.1749548912,
-0.1198234856,
-0.0308805779,
0.1743924916,
0.212211594,
-0.3490410447,
0.0587138645,
0.0426386967,
-0.0047611482,
-0.295835793,
0.389501214,
0.152113229,
-0.1610447019,
-0.0768553391,
0.1117372587,
-0.1184738651,
0.1702170074,
0.0884495676,
0.1912443638,
-0.2271019369,
-0.06561023,
0.2860579193,
-0.4047800601,
-0.0090621561,
-0.2457283884,
-0.2952024341,
-0.0067709088,
0.2661708593,
-0.222427696,
0.035518989,
-0.1656461805,
0.0889625773,
-0.1993582249,
0.3422855735,
0.23505494,
-0.2720921934,
-0.3159382045,
-0.2059532702,
-0.3135771155,
-0.1919192225,
-0.3323298097,
-0.116324231,
0.1817055643,
0.3304493129,
-0.106038101,
0.2373958975,
0.1871118248,
-0.0952252224,
-0.1168181524,
0.0020115823,
-0.4604874849,
0.1378268152,
0.1788460314,
0.2282203436,
0.2081565261,
-0.5176973939,
-0.2647792697,
-0.1527629793,
0.0007780492,
-0.135869503,
0.30298087,
0.1575911939,
0.5477009416,
0.6887497902,
0.0014798455,
-0.2566511929,
-0.0870687366,
-0.2421880066,
-0.0738506317,
-0.1291608214,
-0.1220878288,
-0.1594548523,
0.346560657,
0.3143830299,
-0.3293669522,
0.0846822709,
-0.2532246113,
-0.0861109644,
-0.0682176799,
0.145522967,
-0.0891818851,
-0.0163178369,
0.0765480548,
0.4157754481,
-0.0701460913,
0.3245225847,
-0.0210704952,
0.1589497328,
-0.3448206782,
-0.1187076569,
0.3293447196,
0.2186017334,
-0.4817659259,
0.4003862441,
0.1353745162,
0.0657074079,
-0.1505671293,
-0.3618248105,
0.3132096529,
0.1325525641,
-0.2016754299,
-0.1304767728,
0.3226751387,
-0.0866592079,
-0.0766901374,
0.1098620668,
0.3308892846,
0.3124459088,
-0.0759334788,
-0.3197582066,
-0.2632792592
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | @thomwolf I'm sorry but I can't reproduce this problem. I'm also using:
```python
ds = load_dataset("json", split="train", data_files=data_files, cache_dir=cache_dir)
```
after having removed the extracted files:
```python
assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == []
```
I get the logging message:
```shell
WARNING datasets.builder:builder.py:531 Reusing dataset json ...
``` | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 49 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
@thomwolf I'm sorry but I can't reproduce this problem. I'm also using:
```python
ds = load_dataset("json", split="train", data_files=data_files, cache_dir=cache_dir)
```
after having removed the extracted files:
```python
assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == []
```
I get the logging message:
```shell
WARNING datasets.builder:builder.py:531 Reusing dataset json ...
``` | [
0.0387398452,
0.0011512786,
-0.0731728002,
0.2888256907,
-0.022597529,
0.2442344576,
0.0043716487,
0.2252015918,
0.2111161649,
0.1112266332,
0.1300093532,
0.4447045326,
-0.3149457872,
-0.1522339284,
-0.1879174262,
0.0685455203,
-0.1822634339,
0.2303553969,
0.1179901063,
0.1538839936,
-0.1485171914,
0.0167132113,
0.0281607509,
-0.1277254522,
-0.0811996013,
-0.3685382605,
0.1793391705,
-0.2001989335,
-0.0709406435,
-0.4755670726,
0.193516925,
0.4872879982,
0.2634621859,
0.2937752903,
-0.000127032,
0.1402313113,
0.2824356258,
0.1706400514,
-0.4946144521,
0.0734711438,
-0.2185478806,
-0.1317236722,
0.2783430517,
-0.1279085129,
0.2389566898,
-0.5058010221,
-0.2874327004,
-0.7039574981,
0.6001024246,
-0.1444820166,
0.022612853,
0.0881785005,
-0.4752637744,
0.2353415787,
0.1795051992,
0.3432499766,
0.0032172278,
-0.014562143,
0.3974128664,
0.0410050526,
0.2530757785,
0.3323468566,
-0.1500109881,
-0.2315429151,
0.2820385098,
-0.0412385091,
-0.0308064967,
-0.3038097918,
0.1847779602,
-0.0036728885,
0.6249607801,
-0.3946922421,
-0.2556184232,
-0.5423303843,
0.0626546293,
-0.600943923,
0.0232608505,
0.2797490358,
-0.0825030282,
0.2129976898,
-0.1887131631,
-0.3832756579,
-0.3273216188,
-0.1123425961,
0.5984610915,
-0.3998056948,
-0.0372387357,
-0.0458067581,
0.4938418269,
0.1461504996,
0.2353726923,
-0.3142923117,
-0.2171894014,
0.3846136034,
-0.1873884648,
-0.0936433375,
-0.2239201218,
-0.2821354866,
0.1414933056,
0.1589776725,
0.2970093489,
-0.1674042195,
0.1185297221,
0.0908485502,
0.3935777247,
0.4597049057,
-0.0481680632,
0.112855196,
0.1008520871,
0.1619086564,
0.048287034,
-0.0979922861,
0.1011851504,
-0.0617836416,
0.4250556827,
-0.0321998522,
0.0416538715,
-0.1071878597,
-0.2610664964,
0.0968778431,
-0.0078232288,
-0.2051993608,
0.166612938,
0.1866744608,
0.1723242253,
0.0193718597,
0.067290619,
0.4301666021,
-0.0577313416,
-0.2265525162,
0.103295885,
0.1011031941,
-0.3205891848,
-0.3679001331,
0.4237627685,
-0.1298707724,
-0.0259718616,
-0.0048201792,
-0.2550819516,
-0.0653331876,
0.4840126634,
-0.092919305,
0.2538096011,
0.309985131,
-0.2183119506,
-0.0880333558,
-0.212264955,
-0.1653791517,
-0.1422927678,
0.5295104384,
-0.1849962175,
-0.3411288261,
-0.0856949016,
0.0599792786,
-0.0660019815,
0.2800514996,
-0.5685245395,
0.061199788,
0.1911430955,
0.0687459484,
-0.0418273807,
0.2140059024,
-0.03750927,
-0.088715449,
-0.2247150093,
0.4024040699,
-0.6254300475,
-0.1333289593,
-0.3174978197,
-0.1452009678,
0.2010460049,
0.2420938611,
-0.1749442518,
0.3494222164,
-0.3156356215,
0.0096581876,
0.4006726146,
-0.2328708917,
-0.454367578,
0.176541537,
0.1190124601,
0.4207155108,
0.3524939418,
0.2543873191,
0.2594757378,
-0.0322539732,
-0.0024925396,
0.3350211382,
0.0773676708,
-0.0738490075,
-0.2808282673,
-0.3792132139,
0.225636214,
0.1916750073,
-0.0921852589,
0.110551849,
0.167808935,
-0.002440732,
0.2609682679,
0.1150508076,
0.1132843643,
0.1940720081,
0.1154082641,
-0.2010037899,
-0.1774227023,
0.1313795894,
-0.5052554011,
0.0986857191,
-0.4657925963,
-0.3321770132,
-0.3756708503,
-0.2849502563,
0.0386046842,
0.1174931005,
-0.389092654,
0.1290551424,
-0.0220171455,
-0.1279524714,
0.3280847669,
0.0559470057,
-0.3593136072,
0.1520721018,
-0.098379232,
0.0780226737,
-0.5450097322,
0.2050354481,
0.1843024641,
-0.2473081499,
-0.1290710419,
0.1400126219,
-0.2306078076,
-0.3627336621,
-0.1653994173,
0.2036162615,
0.339112848,
0.2150986195,
0.1560035646,
0.2421352267,
0.230407536,
0.2009598166,
0.0469740778,
0.1948218495,
0.0115870945,
0.0463876873,
-0.2821245193,
0.3812070787,
-0.2219505161,
0.0534807257,
-0.1775822788,
-0.4575613439,
0.2535551786,
-0.0570938289,
0.0790789649,
-0.4799566567,
0.1083344072,
0.3552140296,
-0.0536250249,
0.0245039295,
0.1122617349,
-0.1633776128,
0.0036086407,
-0.0947123244,
-0.1975778341,
0.2892427742,
-0.1210101545,
-0.1792409122,
0.0539704636,
0.4722076058,
0.3872457743,
0.0728119612,
-0.0692077428,
-0.1037088484,
0.4217989743,
0.0783270746,
0.1705799997,
0.0563218072,
-0.0379131772,
0.3702068031,
0.2599153221,
-0.092585288,
-0.2354389429,
0.0143227801,
0.1043259278,
0.2683177292,
0.1289217621,
-0.0334742889,
-0.3978504837,
-0.3873171508,
0.33656919,
0.1967992485,
0.1924794316,
-0.1469785571,
0.3643903136,
0.1799006015,
-0.2070638984,
0.0305839404,
-0.0449995212,
0.4603663087,
0.0073025897,
-0.3709698319,
-0.3444035649,
-0.1632084548,
0.1228644699,
-0.083105959,
0.402292937,
-0.2809520066,
0.4440796077,
0.1275640577,
-0.0038784258,
-0.0542432629,
-0.017709963,
0.0376476049,
0.3879232705,
0.1876690537,
0.1001779139,
0.1531305611,
0.0379871875,
0.096378997,
-0.0991244912,
-0.1449351311,
-0.1022411883,
0.3233745694,
0.0661226809,
0.1851317585,
-0.1712576747,
0.0005537309,
-0.2757931054,
-0.2898994982,
0.2013385296,
0.0319608524,
-0.0162346624,
0.2689191103,
0.281016916,
-0.0965228975,
0.0841752738,
0.1488936543,
-0.0251835175,
-0.7104848623,
0.1607455611,
-0.0769013017,
0.1364144981,
0.189065665,
-0.0697533339,
-0.029377237,
0.3408834338,
-0.4336384833,
-0.0120823681,
0.0660451651,
0.1627594829,
-0.2804269791,
0.0191993695,
0.0958870202,
0.2754338384,
0.0378886759,
0.0201793015,
0.098508209,
0.1447321922,
0.3198248446,
0.1731149107,
0.126267314,
0.260363102,
0.2043637335,
0.4321886301,
-0.0622240119,
0.0196015481,
0.3881893754,
0.3163257241,
0.4387295842,
-0.2470132113,
0.0989194065,
-0.4738690257,
0.0049999282,
-0.2182051837,
-0.0037106164,
0.1213674471,
-0.0496471263,
0.1735693812,
-0.1063399911,
-0.1391185522,
-0.1404743344,
0.2118045688,
-0.3662154078,
0.1025422662,
0.0500667468,
-0.270519346,
-0.117421478,
-0.1675272286,
0.0391078182,
0.1657990962,
0.5044095516,
-0.0209648367,
-0.1951974928,
-0.1079097241,
-0.2236533463,
0.2688920498,
-0.1963935345,
-0.1239870191,
0.0256857425,
0.0904643387,
0.2192270458,
0.2238590866,
0.4910550714,
-0.1035335958,
0.0390724577,
-0.0954006985,
-0.0014428794,
-0.2994737029,
-0.0398617163,
0.0502792299,
0.0924928784,
-0.0287453271,
0.400367111,
-0.25196141,
-0.1651295274,
-0.2257089019,
0.6906106472,
-0.260124445,
-0.1884288788,
-0.1495397687,
-0.2630372047,
-0.5465506315,
-0.0200447626,
-0.0080206469,
-0.0236063432,
0.0812034309,
-0.2832097113,
-0.1270309538,
-0.2804131806,
0.116642423,
-0.0564049967,
0.5973098874,
-0.2932861745,
0.1725893617,
-0.0703301877,
0.085205093,
0.5068811178,
0.3177329898,
-0.0923689455,
-0.0827539265,
-0.168062821,
-0.1983065754,
0.1099878997,
0.0935980082,
-0.3003249764,
0.3180708587,
-0.2498793006,
0.4409911036,
-0.0315180719,
0.0097206943,
0.0271957181,
-0.2729806304,
-0.1154156625,
-0.3969812989,
0.097960189,
0.0724429786,
-0.1441587508,
0.4777908921,
-0.2132848054,
-0.2477704883,
0.4918861687,
-0.1485554278,
1.0456453562,
-0.1345219463,
-0.0002491528,
-0.0578193627,
-0.2254694551,
0.4228832126,
-0.6274009943,
0.1990945339,
-0.043100737,
-0.0408792719,
0.1003762856,
-0.1200108081,
0.0230390187,
0.3152314425,
-0.0527526736,
0.2467500269,
-0.4842721522,
-0.1601078957,
-0.3023615479,
0.3316246271,
-0.0552998409,
-0.1308071911,
-0.19818376,
-0.0560085513,
0.0174178556,
-0.0206173472,
-0.2003170401,
-0.0525970459,
0.460752666,
-0.0518720038,
0.2136150897,
-0.1244364753,
-0.2420247197,
0.4143177271,
-0.1312366128,
-0.253813386,
-0.1891985536,
0.1305611134,
-0.2244036943,
0.0189590715,
0.2749984562,
-0.0032372824,
0.0313759595,
-0.0009668805,
-0.3601748645,
0.1051988006,
0.017696267,
-0.0305394791,
-0.0243017524,
0.1501024663,
-0.3183411956,
-0.4439485073,
0.141323626,
0.1588861793,
-0.1130426675,
-0.0460682102,
-0.2940951586,
-0.0910578668,
-0.3285749555,
0.0937719345,
0.0375564508,
0.3554032743,
-0.2288431525,
0.2944495678,
-0.4424224198,
-0.1805373281,
-0.1387424618,
-0.1259227395,
0.2781561017,
-0.1078391969,
0.4058580995,
-0.196103394,
-0.1697500646,
-0.3114446998,
-0.1094646454,
-0.0591651648,
-0.3523539901,
0.4959714711,
0.1541585177,
0.0191138238,
0.0306142382,
-0.1891186386,
-0.112821728,
-0.0036654957,
-0.0883891732,
-0.2330772579,
-0.5126237869,
0.1333561838,
0.2334327698,
0.5337323546,
0.0982189775,
0.0723916218,
-0.2063542902,
0.0403029695,
-0.1466145366,
0.2719168663,
0.2714769542,
0.1760982871,
-0.0057530664,
0.2576832473,
0.1207276285,
-0.2755827606,
-0.1310793608,
-0.0162492748,
-0.1007202566,
-0.1133256108,
-0.138499856,
0.1380104572,
-0.0858070329,
-0.0821945295,
-0.1708723158,
-0.341599673,
0.1951058954,
-0.2087670267,
0.3060407639,
-0.0774551481,
-0.0922982395,
-0.0460986942,
0.364161253,
-0.1011658534,
-0.0318122134,
0.129586786,
-0.077737011,
0.3581883609,
0.0935711041,
0.0184436701,
-0.0247679483,
0.0216317326,
-0.5045362711,
-0.0154079907,
0.2184851915,
0.0654115081,
0.1145339757,
-0.1634783149,
-0.0516780578,
0.0544047952,
0.1629262269,
0.2467236072,
-0.1528829783,
-0.0133644529,
-0.1064776555,
0.1030096188,
-0.1887696981,
-0.2644707859,
0.0574015155,
0.1221702546,
-0.253868103,
0.353916496,
0.3832465112,
0.059159264,
0.0459613204,
0.0415379852,
0.3936088085,
-0.2163316905,
0.4034714699,
0.4159604907,
0.0731045529,
-0.2110334784,
-0.15883784,
0.3227527738,
0.1293343157,
-0.0114390263,
-0.1280555427,
0.3922552764,
0.5880976915,
0.1931764185,
-0.600384593,
-0.3592980802,
-0.2539198399,
0.6064804196,
-0.0488206632,
0.4539383948,
0.3565710783,
0.2720523179,
0.2334131002,
-0.1520126164,
-0.1246997565,
0.4989547431,
0.0763912648,
-0.0607320778,
0.1866457462,
-0.1306656003,
0.155877322,
0.1319537908,
0.0924907401,
0.2826762795,
-0.2776641548,
0.2349213511,
-0.0209260322,
0.1108351573,
0.4764106274,
0.1959998906,
0.4155320525,
-0.1994318366,
-0.1705277711,
0.2443345785,
0.2839075029,
0.0255324133,
-0.0954847261,
0.1415085793,
0.1138871983,
-0.344054848,
-0.0115642436,
0.0395422243,
0.0908907726,
-0.1983005255,
0.483802408,
0.0526315086,
-0.1877348125,
-0.0884464979,
-0.0205577426,
-0.0426027924,
0.1373261511,
0.2074401975,
0.2993082106,
-0.2762261629,
-0.0551264323,
0.2671679556,
-0.3956133127,
-0.0130176572,
-0.0915186852,
-0.1284047365,
0.0006953105,
0.4648070931,
-0.1881520748,
0.0386161208,
-0.1176984236,
0.0331622437,
-0.2790227532,
0.1828396916,
0.2430694401,
-0.3257081509,
-0.3032852709,
-0.1775816679,
-0.3610861301,
-0.2281066626,
-0.3321953118,
0.0023372099,
0.2257023603,
0.190851599,
-0.0866645947,
0.1338696927,
0.1663006246,
-0.0277513061,
-0.0381057039,
0.0489808023,
-0.3745658398,
-0.0142569365,
0.215121299,
0.1890991926,
0.0779752955,
-0.4346443117,
-0.310842663,
-0.1040523425,
-0.0754252821,
-0.0823541358,
0.2746671736,
0.1471285522,
0.7400564551,
0.6187961698,
-0.0363840647,
-0.2140890956,
0.0963762328,
-0.2081692964,
-0.0401759297,
-0.1646406353,
-0.0168142691,
-0.1596770138,
0.2693035603,
0.2698894739,
-0.4261138439,
0.2645617127,
-0.3312880695,
-0.2856912911,
-0.1148093492,
0.0231924653,
-0.2574584484,
-0.0212331191,
-0.0297406837,
0.5283960104,
0.0099376775,
0.3121961653,
0.0479231775,
0.2261253893,
-0.3168376088,
-0.0664730445,
0.3342604935,
0.1714877486,
-0.3807067573,
0.5087203979,
0.0780477822,
0.0506943613,
-0.0518042296,
-0.3348766565,
0.3184894919,
0.2205944359,
-0.391220957,
0.0043195635,
0.2257649004,
-0.0556486994,
-0.0024562478,
0.1746976972,
0.2327559888,
0.4356972873,
0.0615051612,
-0.2619686127,
-0.1745369434
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | >
>
> Do you confirm the extracted folder stays empty after reloading?
Yes, I have the above mentioned assertion on the emptiness of the extracted folder:
```python
assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == []
```
| I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 37 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
>
>
> Do you confirm the extracted folder stays empty after reloading?
Yes, I have the above mentioned assertion on the emptiness of the extracted folder:
```python
assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == []
```
| [
0.0413073748,
-0.0485375673,
-0.1449723095,
0.2248296887,
-0.0466052666,
0.2017893791,
-0.1690855622,
0.3027117252,
0.2245081514,
0.1342940331,
0.0109502524,
0.4801862538,
-0.2686917484,
-0.1230430305,
-0.1824235022,
-0.0093837781,
-0.2349087894,
0.2767878771,
-0.0039625689,
0.1206633747,
-0.1744757444,
0.0921200514,
0.0378462672,
-0.196569398,
0.0525065921,
-0.4080628455,
0.1274045855,
-0.0839397013,
-0.1356525719,
-0.443868041,
0.0438198,
0.4613907039,
0.2651352286,
0.2756150365,
-0.0001182811,
-0.0052504689,
0.3214163184,
0.0448975712,
-0.4485220015,
0.0787612498,
-0.1391091198,
-0.1689037979,
0.2623524964,
-0.1987498999,
0.2233509868,
-0.3563091755,
-0.2938636839,
-0.6617412567,
0.5167127252,
-0.1608561426,
0.1268812716,
0.0683711171,
-0.4738255739,
0.1933883876,
0.2738462389,
0.2409304529,
-0.0916808322,
0.0385858938,
0.3927952051,
0.0045665652,
0.2632927299,
0.3668139875,
-0.1002370119,
-0.2114971429,
0.3557850718,
0.0218769461,
-0.1461001039,
-0.32141608,
0.2498353422,
-0.0287614726,
0.6228607893,
-0.3944320679,
-0.227524817,
-0.3693218231,
0.0613995269,
-0.6855837703,
0.0714121163,
0.2646583021,
-0.025692001,
0.2382504195,
-0.0805310309,
-0.3740075827,
-0.3292847872,
-0.1420145631,
0.5611352921,
-0.3349315822,
-0.067938,
-0.1523856819,
0.4347506464,
0.1455316842,
0.2015199065,
-0.2469357997,
-0.2134846449,
0.4398027062,
-0.1156597733,
-0.1684399843,
-0.2826517522,
-0.2550821602,
0.1541436315,
0.2384482324,
0.3873398006,
-0.0318554193,
0.1681100726,
0.0122857736,
0.302649796,
0.4701260626,
0.0035454985,
0.0091400445,
0.1823689789,
0.0923326761,
0.0784322172,
-0.0593409277,
-0.0071673766,
0.0037685558,
0.3564741015,
-0.0054524019,
-0.000394918,
-0.1036436558,
-0.0663222075,
0.1109705269,
0.1465502828,
-0.1764887273,
0.0581149906,
0.2550417185,
0.1115231216,
0.0797705874,
0.1175453067,
0.3180949986,
-0.0062526762,
-0.1697300822,
0.0901407376,
0.1622941792,
-0.2889664769,
-0.315397501,
0.4541114569,
-0.0812459514,
0.0166764259,
-0.1212240607,
-0.2307781875,
0.0247759074,
0.5310210586,
-0.1226881519,
0.2855819166,
0.3619466722,
-0.1461783201,
-0.1604758203,
-0.1923616827,
-0.0846229494,
-0.1570643485,
0.4940740466,
-0.1157705039,
-0.2477861643,
-0.0082165217,
0.172128588,
0.010168165,
0.2284961194,
-0.5198005438,
0.0128180012,
0.1061694473,
0.0977830142,
0.0089789852,
0.3370684981,
0.059268333,
-0.1662469208,
-0.2143193185,
0.3602551818,
-0.575424552,
-0.0783931017,
-0.3162106276,
-0.1381839216,
0.1419519782,
0.1934991628,
-0.0748170912,
0.2696570158,
-0.2039484084,
0.1503592432,
0.3257903457,
-0.2086217105,
-0.4496497214,
0.1334089637,
0.0934550166,
0.351213038,
0.2929979265,
0.2657371163,
0.3637499511,
0.0370405838,
0.0280230008,
0.3027047217,
0.0446930975,
-0.0319467895,
-0.3799367547,
-0.3065940142,
0.1273223162,
0.202374965,
0.040177606,
0.0616229102,
0.1113653481,
-0.0308882799,
0.2415638715,
0.1242304146,
0.1132446527,
0.2096998394,
0.2101256251,
-0.2184162885,
-0.1411336809,
0.0758422166,
-0.5337054729,
0.1161194891,
-0.480255127,
-0.2700075507,
-0.3258731365,
-0.354567498,
-0.0062885918,
0.0603999794,
-0.2571121752,
0.0709151924,
0.1001927704,
-0.0983827263,
0.3363023996,
0.0053296611,
-0.4017882645,
0.0917586908,
-0.0026925802,
0.0702564269,
-0.4425692856,
0.1793137491,
0.1284513474,
-0.2546830177,
-0.0913696736,
0.0198449772,
-0.2252414227,
-0.5050377846,
-0.1748075783,
0.250662595,
0.3291647434,
0.2336898595,
0.207957685,
0.2225168943,
0.1781662554,
0.2550554276,
0.0977900252,
0.219826147,
0.0716382265,
0.0666633844,
-0.3593187928,
0.4581736922,
-0.2268886715,
-0.0226652101,
-0.1261263639,
-0.3892329633,
0.2734324634,
-0.1001379862,
0.0814294368,
-0.4512610435,
0.078741163,
0.353368789,
-0.0491035581,
0.0033767056,
0.1296360195,
-0.0848268121,
-0.01077965,
-0.0596407428,
-0.1538950503,
0.3206886053,
-0.1086351648,
-0.1442067325,
0.0110896099,
0.4614608288,
0.4385591149,
0.1701882631,
-0.1012913361,
-0.1148273796,
0.457180649,
0.0365352221,
0.181686908,
0.0530167297,
-0.0488280207,
0.3767082095,
0.1704260707,
0.001793392,
-0.3105229139,
-0.0254257806,
0.0866793543,
0.2245714366,
0.2444342077,
-0.1599863768,
-0.2307392359,
-0.364702493,
0.4693768322,
0.1976756006,
0.2197479904,
-0.0726307184,
0.4689160883,
0.1539279222,
-0.3263404965,
0.0959923863,
-0.0333919674,
0.5423592329,
-0.0170691311,
-0.3114194572,
-0.3771662116,
-0.1681102067,
0.2098540962,
0.0186219364,
0.3155294657,
-0.1995820403,
0.4949294329,
0.0888491943,
0.058531478,
-0.046410948,
-0.0641168654,
0.0497561768,
0.2917629182,
0.0272741336,
0.1036750972,
0.2092252374,
0.0225744918,
0.1079356819,
-0.0946434513,
-0.3111016154,
-0.1514033675,
0.2132696509,
0.1755683571,
0.0509327836,
-0.2745604217,
-0.1111385226,
-0.2817263007,
-0.4231971502,
0.2254270613,
0.0398008078,
0.0331119224,
0.1260124743,
0.1688351333,
-0.0610670224,
0.1147642136,
0.0811153278,
-0.0450231209,
-0.6299253106,
0.1831356734,
-0.1912480295,
-0.000760511,
0.2425487339,
-0.0675700158,
-0.0057534622,
0.3238609433,
-0.3674841523,
-0.0564067103,
-0.0332860164,
0.1807261109,
-0.310947001,
-0.0223116428,
0.2386683524,
0.2549815476,
-0.1006571203,
-0.0001964122,
0.0948110372,
0.1612854302,
0.3627623916,
0.0858088583,
0.0152381994,
0.2255532742,
0.1552606076,
0.457528919,
-0.2319747657,
0.0894566476,
0.3778052032,
0.3623316586,
0.4830920994,
-0.2674521506,
0.135019362,
-0.4761628807,
-0.0597167835,
-0.163560912,
0.0615000539,
0.1268327534,
-0.1489724368,
0.127156347,
-0.2267466336,
-0.2554059625,
-0.1087198257,
0.3488435745,
-0.2455917746,
0.0747067928,
0.0337018222,
-0.2601055503,
-0.1106658876,
-0.0750344396,
0.0525460131,
0.1934338808,
0.3555975854,
-0.0959622413,
-0.2293904275,
-0.0704650134,
-0.2582454383,
0.2436960787,
-0.1842191815,
-0.1575852334,
0.0507777482,
0.0009017959,
0.1316083819,
0.1704192311,
0.4188083708,
-0.1102040336,
-0.0316154435,
-0.0432011411,
-0.0491017513,
-0.2723814249,
0.0143878087,
-0.0436880626,
0.0513819605,
0.0062425733,
0.3517799675,
-0.2450856566,
-0.1610231847,
-0.2627817392,
0.6113594174,
-0.2914119363,
-0.1461897343,
-0.1679041684,
-0.2758179307,
-0.520575881,
0.0137086865,
0.1024273932,
-0.0699492991,
0.1287714541,
-0.2261883467,
-0.1165660173,
-0.3135035932,
0.0955887735,
0.026120428,
0.6730558872,
-0.3106625974,
0.133815214,
-0.1499757767,
0.1353078485,
0.4575920105,
0.3512049317,
-0.1634148061,
0.0324222445,
-0.1253555715,
-0.2660616636,
0.111749351,
0.1593419611,
-0.2497406453,
0.2355034202,
-0.3442843556,
0.4965206683,
-0.0019971877,
-0.0435360149,
-0.1301546693,
-0.2528442442,
-0.0031909347,
-0.2554461658,
0.1030297875,
-0.0219741799,
-0.1552116275,
0.4835706055,
-0.1392625868,
-0.2553928196,
0.5033291578,
-0.0633164048,
1.1462253332,
-0.0912557989,
0.0590808839,
-0.0746249557,
-0.2671490014,
0.2941931188,
-0.6101070046,
0.1928521544,
-0.0238332599,
-0.1474047303,
0.1032524183,
-0.032194674,
0.0073781032,
0.1978936344,
-0.2577224374,
0.172475785,
-0.4044652581,
-0.2458295226,
-0.3127625585,
0.3859441578,
-0.1336408406,
-0.2389239669,
-0.2229068428,
0.0304172784,
0.0703628734,
0.0096995234,
-0.2433693707,
-0.0699395984,
0.3483139277,
-0.1029402316,
0.2205171585,
-0.1050832868,
-0.2115620077,
0.3625519872,
-0.1709132493,
-0.1693256646,
-0.3747055531,
0.0147157535,
-0.2277483344,
0.0665275156,
0.1771566719,
0.0191217177,
-0.0063909721,
-0.0273662489,
-0.3108094931,
0.0840573162,
-0.0238343216,
-0.1177816167,
0.0023076385,
0.1461183131,
-0.3547465205,
-0.3214161098,
0.2032022178,
0.1750044823,
-0.1204068661,
0.0108269416,
-0.3190674484,
-0.1161414534,
-0.504312396,
0.0812234432,
0.1145052612,
0.3476789892,
-0.2278479785,
0.330480963,
-0.2915905118,
-0.2250874043,
-0.2206316292,
-0.0532793179,
0.3131299019,
-0.1598391235,
0.3334148526,
-0.2019821405,
-0.2323345393,
-0.4242374301,
0.0082434565,
-0.0975851864,
-0.2666526437,
0.4921970069,
0.0498115458,
-0.1244073734,
0.0569742396,
-0.1461437941,
0.0851469263,
-0.0082857218,
-0.1706764996,
-0.190172866,
-0.4423624277,
0.2361504138,
0.3011801243,
0.5027702451,
0.0333817452,
-0.0045292936,
-0.0241315663,
0.123178646,
-0.2732386291,
0.2419103086,
0.1690103412,
0.1864474565,
-0.0108391363,
0.209804371,
0.114693135,
-0.2905044258,
-0.0424863324,
0.0280293599,
-0.1194050759,
-0.205280304,
-0.1194579229,
0.1100732237,
-0.1223045513,
-0.0890902281,
-0.1279249787,
-0.2548088729,
0.1514481306,
-0.1967032701,
0.2219267339,
-0.1408967227,
-0.1152800843,
-0.0382677354,
0.4236795902,
-0.0534897521,
-0.0667499304,
0.1244282126,
-0.1753024459,
0.3281990886,
0.0484312959,
-0.0580320433,
-0.0151755475,
-0.0559296161,
-0.3425909281,
-0.0125504993,
0.1476256847,
0.0793363899,
0.0730558336,
-0.0756690428,
-0.091799207,
0.0424775705,
0.1605763435,
0.3133686185,
-0.1005903929,
-0.0278405286,
-0.0152046867,
0.2355524153,
-0.3078089356,
-0.2028858662,
-0.0959702581,
0.0422859006,
-0.1282797903,
0.3526956439,
0.2551882863,
0.0160210282,
0.0785969347,
0.1219499111,
0.4435402751,
-0.2625608444,
0.3567341864,
0.2330173105,
0.0335214436,
-0.2034562081,
-0.1404132694,
0.2835741639,
0.0813074261,
-0.0411899053,
-0.135351032,
0.4125169516,
0.5396202207,
0.2706170678,
-0.5496683121,
-0.2321301997,
-0.304735899,
0.564860642,
-0.0636365861,
0.4833980203,
0.4112481177,
0.1609773189,
0.1994059831,
-0.2693642676,
-0.2112758756,
0.3925042152,
0.0376016386,
0.0151274875,
0.1779450178,
-0.1225660667,
0.1545840651,
0.0890966579,
0.1928017139,
0.3150665164,
-0.0763058364,
0.3050921857,
0.0403473713,
0.1444403231,
0.5403455496,
0.172673896,
0.4122550189,
-0.2008505017,
-0.1683287919,
0.3069994748,
0.2286302745,
-0.0467791669,
-0.0426459983,
0.0607593246,
0.230011642,
-0.4002388716,
0.0562204011,
0.0291172229,
0.0361652598,
-0.2809960246,
0.4738408327,
0.1764168888,
-0.1633596867,
-0.0665000528,
0.0892371088,
-0.1348400414,
0.2295843661,
0.1274812818,
0.1664563864,
-0.1332197785,
-0.0953402668,
0.3460353613,
-0.4161978364,
-0.0393494144,
-0.1494922042,
-0.240546152,
0.0283945762,
0.3042206764,
-0.1859046817,
0.0206842758,
-0.0995513052,
0.0874012187,
-0.1506766677,
0.2765622139,
0.2304380834,
-0.3117171228,
-0.2855136395,
-0.2408074141,
-0.3313228488,
-0.1924170852,
-0.3334589005,
-0.079361707,
0.2031911016,
0.2810607851,
-0.0578946657,
0.2194301188,
0.2072458863,
-0.0437058434,
-0.1320685297,
0.009600359,
-0.5555418134,
0.0932327062,
0.2999008298,
0.2253646404,
0.1715483665,
-0.5085917711,
-0.2904876769,
-0.0740843341,
0.0490975827,
-0.1099370569,
0.1973837614,
0.1196562052,
0.7663522363,
0.6555728316,
-0.0823288709,
-0.2813946903,
-0.0887068883,
-0.2264492512,
-0.0294563435,
-0.1210757047,
-0.0183541439,
-0.1915729642,
0.4612553716,
0.2556865811,
-0.3579709828,
0.1751773357,
-0.2629186213,
-0.201805532,
-0.1126139909,
0.1124973148,
-0.2136932611,
0.0236823857,
0.0916533321,
0.466955483,
-0.0725995377,
0.3228868544,
-0.0376901701,
0.134064436,
-0.3692815304,
-0.1002734154,
0.3550425768,
0.2534768879,
-0.4091675878,
0.4840551317,
0.1112583801,
0.0214011539,
-0.0204091929,
-0.2937960625,
0.3100434542,
0.1386472136,
-0.2728066146,
-0.0513297617,
0.2545326054,
-0.106062606,
-0.0809823126,
0.1383155137,
0.2301090658,
0.3491556048,
0.0669754669,
-0.3895576596,
-0.2239034772
] |
https://github.com/huggingface/datasets/issues/2598 | Unable to download omp dataset | Hi @erikadistefano , thanks for reporting the issue.
I have created a Pull Request that should fix it.
Once merged into master, feel free to update your installed `datasets` library (either by installing it from our GitHub master branch or waiting until our next release) to be able to load omp dataset. | ## Describe the bug
The omp dataset cannot be downloaded because of a DuplicatedKeysError
## Steps to reproduce the bug
from datasets import load_dataset
omp = load_dataset('omp', 'posts_labeled')
print(omp)
## Expected results
This code should download the omp dataset and print the dictionary
## Actual results
Downloading and preparing dataset omp/posts_labeled (download: 1.27 MiB, generated: 13.31 MiB, post-processed: Unknown size, total: 14.58 MiB) to /home/erika_distefano/.cache/huggingface/datasets/omp/posts_labeled/1.1.0/2fe5b067be3bff1d4588d5b0cbb9b5b22ae1b9d5b026a8ff572cd389f862735b...
0 examples [00:00, ? examples/s]2021-07-06 09:43:55.868815: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 990, in _prepare_split
writer.write(example, key)
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 338, in write
self.check_duplicate_keys()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 3326
Keys should be unique and deterministic in nature
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "hf_datasets.py", line 32, in <module>
omp = load_dataset('omp', 'posts_labeled')
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/load.py", line 748, in load_dataset
use_auth_token=use_auth_token,
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 3326
Keys should be unique and deterministic in nature
## Environment info
- `datasets` version: 1.8.0
- Platform: Ubuntu 18.04.4 LTS
- Python version: 3.6.9
- PyArrow version: 3.0.0
| 52 | Unable to download omp dataset
## Describe the bug
The omp dataset cannot be downloaded because of a DuplicatedKeysError
## Steps to reproduce the bug
from datasets import load_dataset
omp = load_dataset('omp', 'posts_labeled')
print(omp)
## Expected results
This code should download the omp dataset and print the dictionary
## Actual results
Downloading and preparing dataset omp/posts_labeled (download: 1.27 MiB, generated: 13.31 MiB, post-processed: Unknown size, total: 14.58 MiB) to /home/erika_distefano/.cache/huggingface/datasets/omp/posts_labeled/1.1.0/2fe5b067be3bff1d4588d5b0cbb9b5b22ae1b9d5b026a8ff572cd389f862735b...
0 examples [00:00, ? examples/s]2021-07-06 09:43:55.868815: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 990, in _prepare_split
writer.write(example, key)
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 338, in write
self.check_duplicate_keys()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 3326
Keys should be unique and deterministic in nature
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "hf_datasets.py", line 32, in <module>
omp = load_dataset('omp', 'posts_labeled')
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/load.py", line 748, in load_dataset
use_auth_token=use_auth_token,
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 3326
Keys should be unique and deterministic in nature
## Environment info
- `datasets` version: 1.8.0
- Platform: Ubuntu 18.04.4 LTS
- Python version: 3.6.9
- PyArrow version: 3.0.0
Hi @erikadistefano , thanks for reporting the issue.
I have created a Pull Request that should fix it.
Once merged into master, feel free to update your installed `datasets` library (either by installing it from our GitHub master branch or waiting until our next release) to be able to load omp dataset. | [
-0.2633759677,
-0.1163594946,
-0.0825288892,
0.1005097777,
0.2311993539,
-0.0217431486,
0.205231443,
0.2830139399,
0.0483130589,
0.2094641924,
-0.2077928483,
0.5524357557,
-0.2091247737,
0.235901922,
0.1329853237,
-0.2663646042,
-0.158126682,
0.1020686328,
-0.334205687,
-0.0926270783,
-0.1104446799,
0.2932710946,
-0.1778838784,
0.0904804245,
0.0324104279,
-0.1805105507,
-0.0745370016,
-0.0469905324,
-0.2778786719,
-0.3463787436,
0.0518866628,
0.0548788644,
-0.1014625877,
0.3988807797,
-0.0001096027,
0.1178161651,
0.0741748512,
0.0171127692,
-0.1459123343,
-0.6719622612,
-0.1396108717,
-0.2014087886,
-0.0826204643,
-0.3633431792,
0.2272391617,
-0.2570005953,
0.059407033,
-0.2267069519,
0.4353801906,
0.3867660165,
0.2739731669,
0.1229684278,
0.5405082107,
-0.0700389743,
0.1368205547,
-0.1091350541,
-0.1206636727,
0.347019881,
0.0586241707,
0.1539105326,
0.257621944,
0.3272626102,
0.0221025571,
0.2050426006,
0.0925242081,
0.0125785209,
0.1395573765,
-0.2800304294,
0.1792055964,
0.2613039017,
0.6987872124,
-0.3968586624,
-0.2707766294,
-0.1148354113,
0.2155595273,
-0.1440119445,
0.1142742783,
0.1241134256,
-0.1997848451,
0.0727658421,
-0.1605888754,
-0.0320137367,
-0.2135592401,
0.1117545515,
0.0657202303,
0.2325627208,
-0.0038949754,
0.216361478,
0.0000731293,
-0.0169967413,
-0.0831872076,
-0.1148605198,
0.138449505,
0.1905741245,
-0.1152871698,
-0.1532758176,
-0.0530042537,
-0.643604815,
0.2569110394,
0.0238949247,
0.3082271516,
-0.0463232622,
-0.213043347,
0.0331315771,
0.1188268661,
0.2266346365,
0.1491996497,
0.0412931144,
0.1060218215,
0.1200549453,
-0.2173781544,
0.0168235116,
-0.0801325291,
-0.1001486704,
0.264767319,
-0.055464264,
0.5122631192,
-0.1609933823,
-0.4319579601,
0.2365228385,
-0.6948943734,
-0.1090141386,
-0.1088429391,
0.2770731747,
-0.0793987066,
-0.0746439323,
0.1808509082,
0.0832691789,
-0.234276101,
-0.2156971097,
-0.1566639841,
0.154624179,
-0.0371545814,
-0.1352514476,
0.1518602967,
0.0900968686,
0.4250288606,
0.1070040315,
0.1088746116,
-0.5665569305,
0.2359182835,
0.1804819405,
-0.3607873023,
0.2312490791,
0.1812455654,
0.1465977132,
-0.0617693327,
0.0378140211,
-0.1002754867,
0.2124568522,
-0.1672935337,
-0.4056833982,
-0.0748659372,
0.3433822989,
0.0531352833,
-0.2699446082,
-0.1625709385,
-0.050822556,
0.0389540792,
0.0309835002,
0.0246787146,
0.0224646144,
-0.2562176287,
-0.2442113012,
0.1460745335,
0.2647910118,
-0.203979969,
-0.0658722073,
-0.1158692986,
0.0010875817,
0.2173048854,
0.2107515633,
-0.2382166684,
0.492054075,
-0.1265224218,
-0.0613779873,
0.3794513941,
-0.29468593,
-0.5540882349,
0.1498635113,
-0.3093817234,
0.0878859088,
0.2221281081,
-0.0451890193,
0.1302655041,
0.1655367762,
0.1286419332,
-0.1027145237,
-0.134443298,
-0.1439591646,
-0.3133153319,
-0.0950461403,
-0.2379137725,
0.0358377844,
0.1849700212,
-0.0782919824,
0.197124809,
0.232987687,
0.3517863154,
0.0966918021,
-0.0691677928,
0.2216299474,
0.3059598207,
-0.330041945,
0.1108260602,
-0.2293464839,
-0.373976469,
0.3155354261,
-0.0165560916,
-0.1355932355,
-0.0300448649,
-0.1432412416,
-0.5316032767,
0.1148186922,
-0.0472932868,
0.071796909,
0.1636959612,
-0.222544536,
0.1199737191,
0.1033537239,
-0.1992000639,
0.3342385292,
-0.2297877073,
0.1891274601,
-0.0412656069,
0.0069935471,
-0.3651163876,
0.0663700104,
0.1807124615,
0.155402422,
0.1503354907,
-0.1990830004,
-0.1807877123,
0.4038277864,
-0.1873676032,
0.1631094366,
-0.1956851035,
-0.0584175736,
0.2430953979,
-0.2473965287,
-0.0698490068,
-0.0453464165,
0.1733225286,
0.0142513365,
-0.077047281,
0.3409190178,
0.121230796,
-0.2174376249,
0.0157483891,
0.2041943371,
0.3598778844,
-0.2917148173,
0.2594670653,
-0.2255243659,
0.4635403156,
-0.2363405079,
0.1157254577,
0.0373715162,
-0.1989540309,
0.299392879,
0.0630543828,
0.0063306466,
0.1100189239,
-0.0354822725,
0.0314820781,
0.033440806,
-0.0733478591,
0.463072747,
0.2423424125,
0.2329951972,
0.083980009,
0.1448697597,
-0.2224031687,
-0.1442312449,
0.2096167952,
0.063876763,
0.1202781498,
0.3854890168,
0.0990732163,
0.1486279517,
-0.2791567743,
-0.2268599421,
0.4535357952,
0.354528904,
-0.064973399,
-0.0871002376,
-0.4004330635,
-0.2362250239,
-0.2478104234,
0.0471527129,
-0.062615931,
-0.089380838,
0.0793110281,
0.3766825795,
0.072220102,
0.0774608105,
-0.0053530335,
0.0080938488,
-0.087140955,
0.0769116953,
-0.0113643929,
-0.0330479816,
-0.2678027749,
0.1273901165,
0.2780001462,
-0.1478262693,
0.6885923743,
0.0321409851,
-0.2163362503,
-0.5223963857,
-0.2491728514,
0.0373583883,
0.0187590271,
-0.2935936153,
0.0439140312,
-0.0209343247,
-0.1361766011,
-0.2722960413,
0.0198057704,
-0.2420300841,
-0.4843812883,
0.0103912652,
-0.1160223633,
-0.0720854849,
-0.203024745,
-0.5646249056,
-0.213123247,
-0.240003556,
0.1935493052,
0.0466991663,
0.3808449209,
0.2424077988,
-0.0673823506,
0.1859570742,
0.4195985198,
0.1539193988,
-0.1942103803,
-0.239459753,
0.1029660404,
-0.2137132883,
-0.2867952585,
0.0474882275,
-0.1526742876,
0.3554936349,
0.0046595596,
-0.6089314222,
-0.1365870535,
-0.2141958922,
0.0243423805,
-0.1862190068,
-0.1313260645,
0.30981341,
0.015480537,
-0.1365220398,
-0.2190907896,
-0.0629927441,
0.2879424095,
0.1635591984,
0.3820870519,
-0.1381602138,
0.5215933323,
0.2062052488,
0.5446684361,
0.2092473507,
0.0309620146,
0.2792490125,
-0.0046167085,
0.0192990489,
-0.0550990105,
-0.2558482587,
0.0054707341,
-0.0831015855,
0.0095832124,
0.0092909895,
-0.0893405825,
-0.0721258,
-0.0446567237,
0.1175525486,
-0.3608140647,
-0.3377098739,
-0.1046720818,
-0.4469052255,
-0.0484972782,
0.2157610953,
0.0611392111,
-0.2130891681,
-0.007050056,
0.0934164822,
0.0202057734,
-0.0688989386,
-0.0649518371,
-0.1495745927,
-0.0190239903,
-0.8308065534,
0.2251753807,
0.0450990126,
0.2880031466,
-0.1243756115,
0.3266199529,
0.3935658336,
-0.1652687639,
0.3911043108,
-0.167634666,
0.2698667049,
0.097936362,
-0.0790562481,
-0.1465239823,
-0.1656598002,
-0.2510338128,
0.0800314844,
0.4006589949,
0.3576405048,
-0.3497653604,
0.1794050783,
0.3486422598,
-0.0631893277,
-0.1417796314,
-0.2178063989,
0.0823130533,
-0.4743448794,
-0.4810011387,
-0.0521648116,
0.043916367,
0.3531838953,
0.0911348015,
-0.0304136239,
-0.0107768774,
-0.0366412923,
0.1665460169,
-0.0943754017,
0.1184208617,
0.160120219,
0.6448456645,
0.0918147787,
-0.0352793187,
0.5881879926,
0.683915019,
0.0093938448,
-0.5672092438,
-0.1577606052,
-0.1065873727,
-0.1010123417,
0.1782250404,
0.0908018947,
0.0933463275,
-0.2088735402,
-0.0646624044,
0.2587458491,
0.2643453777,
0.3142027855,
0.072390765,
-0.3763008118,
-0.250683099,
0.3191965222,
-0.0817586035,
-0.1552016884,
0.5849034786,
-0.0678473711,
-0.1047821715,
0.4721504152,
-0.0114795566,
0.7160585523,
-0.398578316,
-0.0927850679,
0.0731137544,
-0.4017655551,
0.6066355109,
-0.2347764522,
0.1309986562,
-0.2987133265,
-0.2008709311,
0.0399285629,
-0.0824519098,
0.02221651,
0.0752066076,
-0.1967361569,
-0.0872489959,
0.1580343395,
0.0872747451,
0.3206408322,
0.3674145937,
-0.0319648013,
-0.0848513991,
0.11500521,
0.1373306662,
-0.262863338,
0.4060242772,
-0.0181210376,
-0.0668046921,
0.1028441861,
-0.2992660999,
-0.4831859171,
0.2173604965,
-0.1947447658,
0.318595916,
-0.0621493421,
-0.4355200231,
0.1259122044,
0.4583159089,
0.3842693567,
0.0739845037,
-0.1031518653,
0.2048924267,
0.2485312819,
-0.1178390235,
-0.1350046098,
-0.1210527718,
0.1363635659,
-0.18447721,
-0.1647848934,
-0.0278721824,
0.1377193034,
-0.370180428,
0.0673826635,
0.0858001262,
0.177897498,
0.1031587943,
0.1012722626,
0.1136687845,
-0.2541301548,
-0.4362236857,
0.1229942888,
-0.0469450764,
-0.243112132,
0.1577250659,
-0.0330423675,
-0.4383395314,
0.0451808088,
0.4698193669,
0.3405236006,
-0.0250851922,
0.5422223806,
-0.1824438721,
0.0245184451,
-0.2797748446,
0.1596969366,
0.0143838637,
-0.1909032762,
0.2175254524,
-0.2706027627,
0.1917576939,
-0.0280454699,
0.2737776339,
0.2958149314,
0.1645799577,
0.112758927,
-0.4255633354,
-0.2509504259,
0.0301229097,
-0.0641631186,
0.1341325641,
0.0876576304,
0.4184316993,
-0.0506979674,
0.2553928494,
-0.3356302083,
0.1482079625,
-0.1318368167,
-0.0594203137,
0.1746113747,
-0.1717108488,
0.0425737128,
0.0718939304,
0.2041370273,
0.2437288016,
-0.1099789441,
-0.2864662409,
-0.2727620006,
0.1219254285,
-0.017966127,
-0.008863207,
-0.0567951016,
-0.2603076696,
-0.1260800362,
0.1398867816,
-0.0748911947,
0.4401755333,
0.0784293562,
-0.1644560844,
0.1582755893,
0.2488700897,
-0.2460636646,
-0.0389498249,
-0.3369630873,
0.2750462592,
0.1759336144,
0.2675980628,
0.02924053,
-0.1288137883,
-0.2296473533,
-0.2728818953,
-0.2131315023,
-0.1464959681,
0.243555665,
-0.3018553257,
-0.0421688743,
0.1519550383,
0.2460224479,
0.1520500183,
-0.2486084998,
-0.1632194072,
0.1644358337,
0.2459693104,
-0.3797387183,
-0.2860783935,
0.2032910883,
0.2655283809,
0.1033861339,
0.3162935674,
0.1810365617,
-0.1276567131,
-0.0802387223,
-0.0684387088,
0.2473835349,
0.0403769463,
0.0515419096,
0.23372899,
-0.0613505505,
-0.1315998286,
0.2003406286,
0.1655678451,
0.2464241236,
0.2796700001,
-0.3739531636,
0.1008225232,
0.1590705961,
0.2548453808,
0.1725819409,
-0.2700348794,
0.0207826756,
0.053929463,
-0.2069548815,
0.2022989541,
0.1390526295,
0.0993253738,
-0.2250608355,
-0.0641923621,
-0.149813056,
0.1119477823,
-0.116499871,
0.0984504074,
-0.484709233,
-0.1465497762,
-0.2188894749,
0.1769059151,
0.0303369146,
-0.1044945121,
0.2071798444,
0.09878093,
-0.3320985436,
-0.4219250977,
-0.284945488,
0.1937772334,
0.2210935652,
-0.4458440542,
0.286119163,
0.1453131735,
-0.2279458642,
-0.1188645363,
0.4128701091,
0.288254261,
0.1377205104,
-0.0044572614,
0.1866990179,
0.2432625443,
0.0614093244,
-0.0662976578,
0.1467691511,
0.3831851482,
0.1861083359,
0.2336899042,
0.0937461704,
-0.1420444995,
-0.0458600335,
0.4072278142,
-0.051564157,
0.0260135718,
0.20180659,
-0.1265822202,
-0.1134503409,
-0.0411495604,
0.1652197093,
-0.2065222859,
-0.355045855,
0.0897855908,
0.0607542433,
0.137869671,
0.0109455399,
0.11264503,
-0.1217450947,
0.1125571281,
0.3411008418,
0.213298589,
-0.4258602858,
-0.1614371836,
-0.613324821,
0.3812156916,
-0.3473394513,
-0.0025531426,
0.0322081335,
0.2755568027,
-0.0445151851,
0.0474412628,
0.3256109953,
0.0206120014,
-0.1362324655,
0.5303824544,
-0.3904483914,
-0.0794869438,
0.1565258205,
-0.2918982208,
-0.013428703,
-0.2815950215,
0.2825535238,
-0.2720334828,
0.0293644816,
0.0055841804,
-0.0935334861,
0.2100777775,
-0.0703669935,
0.3803651035,
0.0622595325,
0.5195212364,
-0.0308380686,
-0.1754388958,
0.0944978744,
-0.0112742241,
-0.3946167827,
0.1818334162,
0.3479686677,
0.2045310289,
-0.091768302,
-0.0474524871,
0.0297553204,
0.4856369793,
0.2023918927,
-0.1520925164,
-0.3098873794,
0.0615712032,
-0.2254936695,
0.1006585881,
0.0082634762,
0.3684364557,
0.0600801781,
0.1921830177,
-0.3377582431,
-0.4812724888,
0.51017344,
-0.208874166,
-0.0934797525,
-0.161066547,
0.3750959039,
0.0586280748,
-0.0781519711,
-0.4696169496,
-0.1114212573,
0.3627080619,
-0.4114661813,
-0.2139763981,
-0.0388944261,
-0.0612030849,
0.0370037705,
-0.0616341606,
0.5893383622,
-0.0260268319,
-0.2274932414,
0.2875641286,
-0.2218987942
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Hi ! Do you have an example in mind that shows how this could be useful ? | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 17 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Hi ! Do you have an example in mind that shows how this could be useful ? | [
-0.4188197553,
-0.1118552759,
-0.0211096704,
0.1649781168,
0.4431480765,
-0.0737170726,
0.5200480223,
0.0255106911,
-0.0000914559,
-0.0612897649,
0.1383577138,
0.3554060757,
-0.3664285243,
0.1816852838,
0.1437230259,
-0.1267324686,
-0.019303143,
0.3366389871,
-0.3813780844,
-0.1455223411,
-0.1810209751,
-0.3653588593,
-0.1667020917,
0.0209226832,
-0.1870877147,
-0.0778728053,
-0.0324454382,
-0.4812175333,
-0.033489354,
-0.0890979171,
0.7275015116,
0.049632743,
-0.0156269372,
0.6457776427,
-0.0001180408,
-0.1917842329,
0.0963874683,
-0.0768374056,
0.0740181208,
-0.3926312327,
-0.4702489376,
-0.0931000262,
0.0384802297,
-0.2704015374,
-0.4740883708,
-0.0527881831,
-0.0390679315,
-0.0544613004,
0.4018721581,
0.1389983296,
0.1720726341,
-0.4391124249,
-0.1384256631,
-0.1219022647,
-0.0793523341,
0.4444638789,
-0.2869962156,
-0.1327411383,
0.1904754937,
0.304264456,
0.0484423935,
-0.0256285332,
-0.0494293123,
-0.1503825784,
0.7289842963,
-0.1378203034,
0.1042370424,
-0.441871345,
-0.1786397398,
0.4444394112,
0.7537171841,
-0.3168219328,
-0.1675660908,
-0.1634079814,
0.2200717777,
0.2761263251,
-0.0231506415,
0.2009138018,
-0.0280609913,
0.2865290642,
-0.2226816714,
-0.2574945092,
-0.422495842,
0.0322744213,
-0.5201647878,
0.1166952401,
-0.0681911409,
0.0087467488,
0.0091334656,
-0.0526342168,
0.2658054233,
0.0693865567,
0.1179424971,
0.1734822541,
-0.13983652,
-0.5531539321,
-0.3461990654,
0.2137342095,
-0.1130962521,
-0.005009478,
-0.1444609165,
-0.1590374857,
0.1009187475,
-0.0037084473,
-0.0453525037,
0.2560717762,
0.0444243923,
0.2834719121,
0.1548121423,
-0.332998544,
-0.1865011454,
0.1489245594,
0.004497081,
-0.1453439295,
0.1278152168,
0.0848204643,
0.0767352805,
-0.1519825757,
0.0595548972,
-0.2803953886,
-0.0193670243,
0.0458845869,
-0.1318851411,
0.0430739969,
0.1812559217,
0.079200916,
0.1768167615,
0.245832324,
0.2344775498,
-0.2285808027,
0.0617157072,
0.2511284053,
-0.2971737087,
-0.1399852931,
0.0375423133,
0.1639121771,
-0.2676418126,
0.0062302388,
-0.1234983057,
0.3804898262,
-0.0001210719,
-0.262252599,
0.1476204544,
0.2959809303,
-0.5519158244,
-0.2185195982,
0.158268258,
-0.1785983592,
-0.2252626419,
0.4631130695,
-0.1985177845,
0.0231163055,
0.0901266336,
0.1778135449,
-0.0336975791,
0.0682862699,
-0.1685471833,
0.3371285796,
0.0445054099,
-0.110077247,
0.1710589826,
-0.3961256146,
-0.1047371179,
-0.14223966,
-0.0999873355,
0.0916868374,
-0.614099443,
-0.3623416722,
-0.1760552973,
-0.0748703107,
0.1173582226,
0.068914555,
-0.228548795,
0.304056555,
-0.1412665844,
-0.1797799319,
0.6639189124,
0.0727629215,
-0.2718647718,
0.2040670961,
-0.5375025868,
-0.1342459321,
0.148908779,
0.3913097382,
0.2420570254,
-0.2189546674,
-0.5890003443,
0.2351156771,
-0.0481768437,
-0.1363938302,
0.0984597355,
-0.1721862555,
0.5869361758,
0.02074527,
0.2949227095,
0.4651507139,
0.1826669872,
0.5072153807,
-0.1435580552,
-0.3711577654,
0.2393027693,
-0.0810984075,
0.4471267462,
-0.0450608358,
0.0037965961,
-0.3930868208,
-0.0073087644,
-0.1223514974,
-0.0850007758,
0.1331424117,
0.3702484965,
-0.0906623751,
0.022119619,
-0.3194075823,
-0.1461207569,
-0.1193116605,
0.1447149813,
-0.3999893665,
0.280167222,
-0.265173912,
-0.1051318049,
0.4493664801,
0.0060808063,
0.0600682497,
-0.4010300934,
0.2931921482,
0.0819305778,
0.2227483392,
-0.3591736853,
-0.0449867882,
-0.1441909373,
-0.1969309002,
-0.1015446261,
-0.1836637557,
-0.0584040619,
-0.0512784347,
0.008519779,
0.4392883778,
0.2763770819,
-0.4933921695,
0.4896823764,
0.0793198645,
0.0957186073,
-0.193977654,
-0.3488174379,
0.4720557332,
-0.1501276791,
0.2503138483,
-0.3207320273,
0.0362433121,
0.1863243878,
-0.4335702062,
-0.1252279431,
-0.0907750949,
-0.0459953994,
0.0280871429,
0.1391775906,
0.2028848827,
0.0194782764,
-0.1024755687,
-0.0012695855,
-0.0949837044,
0.2904399335,
0.463814497,
-0.2357064188,
0.2653408647,
-0.2432361394,
0.5296258926,
0.6370875835,
0.1556208432,
-0.2533011436,
0.2274796069,
0.0958715826,
-0.1503846794,
0.2806730866,
-0.0943114311,
0.2716947794,
0.0350975469,
-0.1571453214,
0.1369215399,
0.0707577467,
-0.3582982719,
-0.0043882504,
0.1940807104,
-0.1077885702,
0.045917809,
-0.1841409504,
-0.0973766744,
-0.3303298354,
0.0659511313,
0.0720970482,
0.1469987631,
-0.094523713,
-0.0728326142,
0.2812081277,
0.0661742389,
-0.0833276957,
0.2607309222,
0.2367434055,
-0.0579363853,
-0.1471121162,
-0.0701678842,
0.0777692571,
0.1580584645,
-0.1741781235,
0.0169899948,
0.2542794347,
-0.3422034979,
0.1313808262,
-0.0990183502,
-0.4404470921,
-0.011937907,
0.056602139,
0.1673405021,
0.3422217369,
0.02478512,
-0.0896842182,
0.0493689217,
-0.020710472,
0.0460865721,
-0.186003685,
-0.0157514699,
-0.2754969001,
0.2332953215,
0.0840449929,
-0.2450774312,
-0.2703361213,
-0.105266884,
0.1708028466,
0.0575787723,
-0.0584607907,
0.0116341002,
0.0825020149,
-0.0196996145,
0.0160592869,
0.1571202725,
-0.0940392017,
0.0360755101,
0.2773391008,
0.0892531872,
-0.1180109233,
-0.165502578,
-0.2728354931,
-0.0858475938,
0.2958506048,
-0.3110003471,
0.0010256171,
-0.1123815179,
0.0221877396,
-0.0838600099,
-0.1456454694,
0.5014488697,
0.0509759821,
0.0237526819,
-0.0218031853,
0.0657576993,
-0.0743145347,
0.1865724325,
0.3480322361,
0.176613763,
0.4494112134,
-0.0166082829,
0.2254584283,
-0.3424141407,
-0.4381716847,
-0.2640429437,
0.0538091063,
-0.0042795315,
0.1079062372,
-0.4174183011,
0.2436745465,
0.2311607003,
-0.3049210608,
-0.0121199526,
-0.0834342837,
-0.2215758562,
-0.1662245989,
-0.2121593356,
0.047875613,
-0.0702748373,
0.0171245094,
-0.2095750719,
-0.0629357398,
-0.1967491806,
-0.0494219735,
0.126091674,
-0.1038435251,
0.0292487182,
0.521897912,
0.1103511453,
-0.0452303514,
-0.0242135897,
0.0248741508,
0.2543195188,
-0.0987892672,
-0.2955639958,
0.0200692415,
-0.0834714025,
0.0568513274,
-0.0046997741,
0.192279309,
0.7796649933,
-0.0551338457,
0.1961560249,
0.1951417774,
-0.3799059391,
-0.2024968117,
0.0559914112,
-0.2858710885,
-0.1767361313,
0.0113887992,
0.0822415054,
-0.0798511505,
-0.1225576997,
0.1050648242,
0.2761808038,
-0.2947766185,
-0.3678511679,
0.1842409372,
0.0087053627,
-0.256067723,
0.2149042785,
0.0323031992,
-0.1509325057,
-0.1219075993,
-0.0597331896,
-0.373452872,
-0.0020949319,
0.3103733063,
-0.1419567466,
-0.1717826724,
-0.0993549675,
0.2183591574,
0.0002128044,
0.2302402258,
0.0964580923,
-0.0325961933,
0.2010594308,
-0.5295641422,
0.0463534184,
0.010304898,
0.2909167409,
-0.212796241,
0.0490579195,
-0.0731628984,
-0.0993532538,
0.248952806,
-0.1713676006,
0.0567140952,
-0.0679484159,
0.0433361977,
-0.2862589359,
-0.3991355896,
0.3170523643,
0.1924041361,
-0.1370120943,
-0.0299174786,
-0.0295862742,
-0.5042584538,
0.1977592111,
0.5593022108,
0.9863250256,
0.1159869283,
0.1385220438,
-0.1127604693,
-0.0312078819,
0.4583588839,
-0.1164898425,
-0.0582189336,
-0.2965382338,
-0.3926323056,
-0.2365937233,
-0.3042209148,
0.3992499113,
0.5360764861,
-0.5129195452,
0.2585293651,
-0.3717176616,
-0.083806783,
0.2241664678,
-0.1047997326,
0.3480708897,
-0.3577432036,
0.0461030267,
0.1679158509,
-0.0882539377,
0.260130614,
0.0308569968,
-0.1675021797,
-0.0712006837,
0.2808560729,
-0.088077262,
-0.0689703971,
-0.2679658234,
-0.1455811858,
-0.2007421255,
-0.4343779683,
0.8832830787,
0.3755265772,
0.2161356211,
0.2257458419,
-0.1638488173,
0.0465084054,
-0.0744039416,
0.3089936376,
0.0002891794,
-0.1842875183,
0.4555921555,
-0.0458960533,
-0.0858468339,
0.0682663321,
0.0122590587,
-0.118693687,
0.2134863734,
-0.1756022125,
0.1199541092,
-0.3734202981,
-0.0196652636,
0.0330975428,
0.0182802454,
-0.0086923391,
0.1461738646,
0.321288377,
-0.0359910019,
0.4378371835,
0.3599594831,
-0.2925545275,
-0.0926594287,
0.1525406539,
0.588739872,
0.0593946427,
0.1273664832,
-0.384159416,
-0.3116019368,
-0.3853753209,
0.2694800198,
-0.0588147677,
-0.2542477846,
0.2276106477,
0.0699301511,
0.0229324698,
-0.0068976469,
-0.3377266228,
0.2592758536,
0.2940542102,
-0.3691020608,
-0.4159670472,
-0.3563140333,
-0.204651311,
0.0908984393,
0.070982486,
-0.0747276992,
0.1950052232,
0.3595226407,
0.0223156717,
-0.3131051362,
-0.053686738,
0.0048853606,
0.1169307232,
0.1778047979,
0.1654964834,
-0.3920321763,
0.1679168791,
0.0183159709,
-0.0933927745,
-0.1448341608,
-0.1975417435,
-0.1709581465,
0.1506624669,
0.1506833136,
0.2185855359,
-0.1473587602,
0.0401097313,
-0.0144195408,
0.1092646345,
-0.0177837647,
0.2290978879,
-0.057783626,
0.3751969635,
0.4489990175,
-0.2798544168,
-0.4648516476,
0.0532284789,
0.0720135644,
-0.0067778528,
-0.1587938517,
0.2750160694,
0.0991028771,
0.0945452899,
-0.5071002245,
0.0320367292,
0.0995941982,
-0.0615904666,
0.4186538756,
-0.0078996979,
0.4520019889,
0.5059017539,
-0.0441633984,
0.0501446351,
-0.1926657408,
0.013905324,
0.2509202063,
0.1545983851,
-0.3792208135,
0.1363565028,
0.2737792432,
0.0160395764,
-0.0480938889,
0.295191288,
-0.0435871854,
0.0883006454,
-0.0707059801,
-0.1038780212,
0.4184023738,
-0.3603197038,
0.2763776779,
0.695544064,
-0.2741847038,
-0.0000256505,
0.5876774788,
0.0294151641,
-0.0534790717,
0.3487198353,
0.1648123711,
0.3593230546,
0.1140986979,
-0.0763522238,
0.2673564255,
0.2705790699,
0.1185703427,
0.6662789583,
-0.0775699392,
-0.1824607253,
0.1305555701,
-0.1851769984,
-0.036671441,
-0.2404727489,
-0.046064429,
0.1559820175,
-0.2395358533,
0.3208654225,
-0.2013944387,
-0.0566180721,
0.1262229085,
-0.3402044177,
-0.1603170335,
-0.2548775077,
0.3563574851,
0.1266769022,
0.0537594892,
0.2256073952,
0.350441128,
0.0669029653,
0.0871790797,
-0.08892674,
-0.2596401274,
0.1178574413,
0.1217088997,
0.1699086279,
0.5181459188,
0.0359264016,
0.1865808517,
-0.049604632,
0.0585876778,
-0.1713819206,
-0.2473456264,
0.0949905515,
0.2725589275,
-0.296721071,
-0.1580559909,
0.1844724864,
0.2032931447,
-0.1213301122,
0.4222790599,
0.0366928279,
0.209102869,
-0.2514106035,
0.3976303041,
0.3067563176,
-0.182313174,
-0.1009441018,
0.1998398155,
0.0393759012,
-0.0032948963,
0.4314260483,
-0.4219202995,
-0.0242354721,
-0.0415411219,
0.0387023054,
0.2140875608,
0.1312821805,
0.0181334578,
0.0149852969,
-0.0151186017,
0.0497832,
-0.3194944859,
0.2027308494,
0.1657826304,
0.0185093805,
-0.1336499155,
-0.2075476646,
0.0096984878,
0.2501331568,
0.0554257929,
-0.1713774651,
-0.1410388499,
0.2018372715,
-0.0365418643,
-0.0278336052,
0.1539265066,
0.428373903,
0.0223405734,
-0.2247021198,
0.0716223717,
0.2997151315,
0.0264118612,
-0.0329235159,
0.3513908982,
0.0385432541,
0.2977878451,
0.2075157166,
0.0420184582,
0.6284480095,
-0.0537592769,
0.3799884617,
0.5167904496,
-0.0332605317,
-0.2373845577,
0.2958484292,
0.2015536726,
-0.214161098,
-0.244931668,
-0.1070013642,
0.1380839348,
-0.2363911569,
0.0062237605,
0.06047998,
-0.8246730566,
0.0415497646,
-0.1709615737,
-0.1113110036,
0.1197765619,
0.0274883565,
-0.0676506758,
-0.0671234801,
-0.0524833873,
-0.1298250556,
0.2856087685,
0.0781062692,
-0.3340091109,
-0.1724071652,
-0.068887189,
-0.3314648569,
0.1222175285,
-0.0650873706,
-0.0006406754,
0.4729181826,
-0.0696835816,
0.3831115067,
0.0582937449,
-0.0738809779,
-0.0992478207,
-0.2302219868,
0.6369760633,
-0.2621817589,
0.0422274694,
-0.226910904,
-0.0962079689
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Example:
Merge 2 datasets into one datasets
Label extraction from dataset
dataset(text, label)
—> dataset(text, newlabel)
TextCleaning.
For image dataset,
Transformation are easier (ie linear algebra).
> On Jul 6, 2021, at 17:39, Quentin Lhoest ***@***.***> wrote:
>
>
> Hi ! Do you have an example in mind that shows how this could be useful ?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 83 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Example:
Merge 2 datasets into one datasets
Label extraction from dataset
dataset(text, label)
—> dataset(text, newlabel)
TextCleaning.
For image dataset,
Transformation are easier (ie linear algebra).
> On Jul 6, 2021, at 17:39, Quentin Lhoest ***@***.***> wrote:
>
>
> Hi ! Do you have an example in mind that shows how this could be useful ?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| [
-0.4854319394,
0.1529303491,
-0.0886404589,
0.1896274537,
0.4006462097,
0.106850341,
0.5075283051,
0.1244743541,
-0.011682976,
-0.0620447397,
0.0533832684,
0.3345320225,
-0.3507426083,
0.187582463,
0.0721608102,
-0.1314894259,
-0.0283110328,
0.3180097938,
-0.4435117841,
-0.1215900853,
-0.2172259837,
-0.2452004254,
-0.2043321282,
-0.0350170769,
-0.2736259699,
-0.1387139857,
-0.1118711159,
-0.2744324803,
-0.1285723001,
0.0032408983,
0.5669195056,
0.2155506462,
-0.0712964609,
0.565695405,
-0.0001113632,
-0.127902329,
0.1100609228,
-0.0080484003,
-0.1362925917,
-0.3996143937,
-0.416370213,
-0.0603966936,
-0.0396464579,
-0.2917910218,
-0.2664451003,
-0.1854080856,
0.0237758737,
-0.0645150691,
0.4134104252,
0.0751382783,
0.2136539221,
-0.4207116365,
-0.081319578,
-0.1326421499,
-0.0725328475,
0.4323450029,
-0.1573565006,
-0.0739579573,
0.255933851,
0.2774942517,
-0.0052240416,
0.2231011391,
-0.109807983,
-0.2118473947,
0.6597433686,
-0.0868725404,
-0.0518905595,
-0.3680223823,
-0.1720132679,
0.3020718098,
0.6202868819,
-0.416546911,
-0.2718211114,
-0.2353089005,
0.3179516792,
0.1380976588,
-0.0936645567,
0.1536031067,
-0.0291529149,
0.2862280309,
-0.3013943136,
-0.3070754409,
-0.3126645386,
0.0769139603,
-0.3927911818,
0.183833316,
-0.0187025294,
0.0787063763,
0.0261068698,
-0.0120618287,
0.2786215544,
0.0286739543,
0.1734904647,
0.130250752,
-0.1575929224,
-0.4430967867,
-0.3470883071,
-0.0164717659,
-0.1724018157,
0.0820527524,
-0.0669371486,
-0.1407573372,
0.0001508147,
0.067874223,
-0.097616747,
0.2801890075,
0.0756245553,
0.2835090756,
0.0927258134,
-0.2981123626,
-0.1342789233,
0.2335574031,
-0.1500679553,
-0.1828361452,
0.0823877528,
0.0751632601,
0.0881748348,
0.0607575104,
0.0079323202,
-0.3705037236,
0.0102080405,
0.0104205199,
-0.15925695,
0.0114261452,
0.2135359794,
0.0537421741,
0.2268781662,
0.1977368593,
0.2781533897,
-0.2910179794,
0.0033116937,
0.3380634785,
-0.3129454851,
-0.1553814113,
0.0573048592,
0.0989248455,
-0.3175148964,
-0.0068464465,
-0.244489789,
0.3860974908,
-0.0104766935,
-0.2480304837,
0.2561534345,
0.1999245584,
-0.4474496245,
-0.1308987141,
0.1515335143,
-0.20377855,
-0.2086181194,
0.3421453238,
-0.1957413554,
0.1629635394,
0.0655771196,
0.2365573943,
0.1148010865,
0.031650804,
-0.2980537713,
0.3904441595,
0.0113527104,
-0.0630761087,
0.1027775854,
-0.3152865767,
-0.0638455078,
-0.0778255016,
-0.0714211762,
0.1344807744,
-0.659701407,
-0.3752602339,
-0.0892389566,
-0.040043436,
0.0257386398,
0.178510353,
-0.1679378301,
0.3726217449,
-0.1166769341,
-0.2042840421,
0.7212477922,
-0.065918535,
-0.1949133575,
0.1581443399,
-0.5203274488,
-0.1914048344,
0.1640526354,
0.3704345822,
0.2596189082,
-0.174730137,
-0.4552612901,
0.359772563,
-0.135193944,
-0.1334810853,
0.1524546444,
-0.2831426263,
0.4489600658,
0.1342546791,
0.2727262378,
0.2775526047,
0.0847698897,
0.415812254,
-0.1401903331,
-0.4404051304,
0.2843723297,
0.0401457697,
0.3044772446,
-0.1269483715,
-0.0328502581,
-0.3859140277,
-0.1105206907,
-0.126223743,
0.0478567109,
0.1563088894,
0.2692359686,
-0.05149097,
-0.050979197,
-0.2854634523,
-0.1628870517,
-0.2248647511,
0.2087795883,
-0.3400037885,
0.2504788041,
-0.3147003055,
-0.0745699778,
0.550313592,
0.0370457917,
0.213727966,
-0.5016189814,
0.3224228024,
0.0449389666,
0.2022390217,
-0.3285855651,
0.0471549071,
-0.2616766691,
-0.2003247887,
0.0024986118,
-0.1345226467,
-0.0960846245,
-0.0462610796,
0.0916254148,
0.3488051593,
0.3109100759,
-0.4374356866,
0.3571303785,
-0.0832564533,
0.1965894997,
-0.1748180687,
-0.403409481,
0.3144295812,
-0.2289666981,
0.2899326682,
-0.1774755865,
0.0508709922,
0.1357771456,
-0.3550782502,
-0.1169620305,
-0.1495442986,
-0.0605596192,
-0.0075771865,
0.2507331371,
0.25669083,
0.0911046714,
-0.0859349221,
0.1485475898,
-0.0672261566,
0.2210752666,
0.3868328333,
-0.2876421809,
0.2263996452,
-0.2082075924,
0.5587706566,
0.4472162127,
0.2356889993,
-0.2560156286,
0.2304825038,
0.1021549627,
-0.073640056,
0.2621407509,
0.0267601609,
0.4427096546,
-0.0132772643,
-0.0441404618,
0.2116563916,
0.0442382842,
-0.4906041622,
0.0805867016,
0.1066002995,
-0.0207085162,
0.0048888326,
-0.1806947589,
-0.1815152764,
-0.404219985,
0.1540661901,
0.0376803651,
-0.0611131117,
-0.088003628,
-0.0729028136,
0.1077064127,
0.1231756136,
0.0667177513,
0.2231048197,
0.2378365993,
-0.1540002525,
-0.0582206436,
-0.1108325645,
0.0576143563,
0.1907511801,
-0.0666939691,
0.0429162383,
0.3864465654,
-0.3671719432,
0.2392288446,
-0.1411263943,
-0.5004367828,
0.1360854506,
-0.0246938467,
0.0368476585,
0.3780709207,
-0.0869701058,
-0.1010202914,
-0.0403239019,
0.0226904973,
0.0577008352,
-0.2035495341,
0.0045403168,
-0.2300646007,
0.0799106508,
0.0435020477,
-0.2263130993,
-0.3054023981,
-0.2169417292,
0.2214500159,
-0.0128983557,
-0.0439196378,
0.0234341994,
0.1507762074,
0.0317595378,
-0.0810160488,
0.1676726043,
-0.0809069872,
0.0390492827,
0.17362082,
0.1272812486,
-0.0919614434,
-0.2783715725,
-0.3630927801,
0.0234742016,
0.3173169494,
-0.2352733314,
0.014670223,
-0.1455158889,
0.0455432236,
-0.00765156,
-0.0787571967,
0.516715467,
0.1359911561,
-0.0250541121,
-0.0448867716,
0.0040795729,
-0.0832192674,
0.0459285788,
0.1290346086,
0.0709376186,
0.3557413816,
0.0434622616,
0.2524476051,
-0.1993198395,
-0.3729280829,
-0.2999459803,
0.1988698691,
0.0998337269,
0.0715790391,
-0.484623462,
0.266557157,
0.1256867349,
-0.2803893983,
-0.0643637031,
-0.0726479962,
-0.1584721357,
-0.1652671844,
-0.0832461566,
-0.1282408834,
-0.1157135218,
0.1214829907,
-0.1738655418,
-0.0606963933,
-0.1348017007,
-0.1101048589,
0.0693342835,
0.0560914129,
0.0124647096,
0.4534646273,
0.0439975746,
-0.0185625553,
-0.1429921985,
0.0537806675,
0.2013118714,
-0.0198410079,
-0.1649231017,
-0.0192361157,
-0.0233304575,
0.0138596892,
-0.1604788601,
0.1167049259,
0.8743853569,
-0.1053468436,
0.0392138362,
0.1754387319,
-0.3215917349,
-0.2480319142,
0.0342378393,
-0.371578902,
-0.3055802882,
0.0614510402,
0.208567366,
-0.1138119102,
-0.1256840527,
0.328609705,
0.3007798791,
-0.1876242459,
-0.2429511845,
0.2264593244,
-0.0608756319,
-0.3976769447,
0.0634016618,
0.0986594781,
0.0182804577,
-0.1287333667,
-0.0159146935,
-0.3286941946,
-0.0786560029,
0.3200695217,
-0.0887121111,
-0.1668915451,
-0.0883673429,
0.1926547885,
-0.0395862386,
0.2257265896,
0.1378196776,
0.1193495244,
0.0274982825,
-0.6537033916,
0.1715270281,
0.0505663119,
0.4162426293,
-0.1999123991,
0.0344757512,
-0.1658147722,
-0.092152454,
0.2252512425,
-0.2954204381,
0.1215903163,
-0.0343760177,
0.1489758044,
-0.4204340279,
-0.3190878928,
0.2972897887,
0.2758482695,
-0.1264446825,
0.0362369344,
-0.1070567295,
-0.4972881079,
0.2006771266,
0.4948273897,
0.881839633,
-0.0173553973,
0.236485064,
-0.0485706702,
-0.2004303187,
0.5380058885,
-0.0032376722,
-0.020132985,
-0.2822463512,
-0.3579153121,
-0.1545644552,
-0.2693385482,
0.3293355107,
0.512581408,
-0.518963933,
0.2395552397,
-0.217263788,
-0.0057562683,
0.1921660453,
0.0804130882,
0.2758342624,
-0.5404214263,
0.0213345587,
0.1845384389,
-0.0028099669,
0.1811757684,
-0.0103382953,
-0.1743305922,
-0.1444305629,
0.2676251829,
-0.1415927112,
-0.0099303722,
-0.248807013,
-0.0028001126,
-0.1635058522,
-0.348461926,
0.6934311986,
0.2555443645,
0.2147723138,
0.2217783779,
-0.0578558668,
-0.0136012528,
-0.1644589007,
0.3608773053,
0.0370061323,
-0.3177414536,
0.5784926414,
0.0348816961,
0.0611877143,
0.0403621346,
0.0455637723,
-0.0843531713,
0.1005492508,
-0.151942566,
0.1185913533,
-0.332574904,
-0.0250460189,
0.1056227162,
-0.0096461549,
-0.1124951616,
0.149144724,
0.2361217439,
0.0416296385,
0.2985836565,
0.290743649,
-0.3393576443,
-0.0290108472,
0.1557556838,
0.5326725245,
-0.0060441941,
0.2088620961,
-0.2699061632,
-0.2365811169,
-0.4026526809,
0.2671616077,
0.1195405871,
-0.3909741044,
0.3062413633,
-0.0393648632,
-0.0612294227,
0.0492317155,
-0.3851855397,
0.3085524738,
0.2617300749,
-0.2858160734,
-0.3528084159,
-0.3455170989,
-0.0381410047,
0.1107472628,
0.1079320759,
0.0000761598,
0.3572798073,
0.2443056405,
0.037587516,
-0.3780192137,
-0.0753516927,
-0.0252062418,
0.0798525661,
0.1635489762,
0.076535821,
-0.3550302386,
0.1056523621,
0.0826993734,
-0.0714537874,
-0.1629397571,
-0.277849704,
-0.1733828187,
0.1210464165,
0.0908100158,
0.2292820662,
-0.0004703514,
0.1254822165,
-0.0314021856,
-0.0468612835,
0.0633696467,
0.0709615201,
-0.0459406078,
0.2866377234,
0.2412422746,
-0.1901993006,
-0.3151236475,
0.0731053799,
0.0351771154,
-0.0556333847,
-0.1957435459,
0.359633714,
0.1982057542,
0.0916905552,
-0.4791549444,
0.0773008317,
0.1645245999,
-0.0897558182,
0.393325001,
-0.0731326044,
0.391671896,
0.4886706173,
0.0866591036,
-0.0632251203,
-0.1646961719,
0.0011307448,
0.1072950363,
0.2124188244,
-0.3923548162,
0.1034418792,
0.276743263,
0.0379577279,
0.0326945484,
0.2100822181,
-0.1345961094,
0.238176927,
-0.1169753671,
-0.078198418,
0.47969383,
-0.3370962739,
0.3642077744,
0.6463413239,
-0.1479433775,
0.0617978051,
0.4965007007,
0.0711722523,
-0.019574184,
0.3492749333,
0.0980382264,
0.4678315222,
0.005631309,
-0.006190734,
0.4555324018,
0.1775164902,
0.1988166571,
0.6114425659,
-0.0600669011,
-0.028298948,
0.0239461716,
-0.1431373954,
-0.0567237288,
-0.3246423006,
0.0277537629,
0.2988834679,
-0.2211218774,
0.3321266174,
-0.1391835213,
-0.0811678916,
0.076417163,
-0.3467303514,
-0.2239057124,
-0.3499321938,
0.3692117929,
0.0660322607,
-0.0369875282,
0.0641425401,
0.1676669568,
-0.0217835009,
0.0589332767,
-0.1439836323,
-0.1938709319,
0.1554632485,
0.0918553025,
0.1143857241,
0.618326664,
0.141357854,
0.2268328965,
-0.0266370699,
0.0454733372,
-0.2194774747,
-0.2695863545,
-0.0295804441,
0.2105141282,
-0.2484849095,
-0.1852521002,
0.2631676793,
0.2606521547,
-0.1493425071,
0.2405786216,
0.0895511061,
0.1632006466,
-0.2439079881,
0.2572742701,
0.1971980631,
-0.1521506906,
-0.0466410555,
0.1972217262,
-0.1380619407,
-0.0838321149,
0.5476491451,
-0.4606725872,
0.0192350522,
0.0142848715,
0.0761796385,
0.1886262745,
0.2115137279,
0.1003275365,
-0.0400602892,
-0.0238130111,
0.0371471196,
-0.3171055317,
0.0832647681,
0.1469299048,
-0.0947078988,
-0.1891987175,
-0.100426659,
0.1086470336,
0.3245384991,
0.0671725869,
-0.1424295604,
-0.1395661533,
0.1300494075,
-0.1766141355,
-0.071824275,
0.3381156027,
0.2639376521,
0.0775396675,
-0.3354122639,
0.0684431791,
0.3268902898,
0.065098159,
-0.0475228727,
0.3619347811,
0.1386043727,
0.1587194353,
0.206741482,
0.090131253,
0.5049049854,
-0.0686622337,
0.1637923867,
0.37045452,
-0.0732802451,
-0.2627438903,
0.39999336,
0.2048810124,
-0.0300378576,
-0.252940923,
-0.1391844153,
0.1666021049,
-0.189974919,
0.0365461409,
0.0669787154,
-0.8383822441,
0.0600656569,
-0.115921177,
-0.0091718547,
0.1660300791,
0.0594989024,
0.0017778473,
-0.0214666128,
-0.0139746368,
-0.3064363003,
0.3038729429,
0.0405735373,
-0.3939805329,
-0.1428615898,
-0.163425386,
-0.21891433,
0.1842785329,
-0.0942625403,
0.0096320361,
0.4470907748,
-0.1043237746,
0.335305512,
0.2366401702,
0.073426351,
0.0055565313,
-0.2274938971,
0.5061413646,
-0.3077506423,
-0.1795009673,
-0.2111508697,
-0.1740987599
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | There are already a few transformations that you can apply on a dataset using methods like `dataset.map()`.
You can find examples in the documentation here:
https://huggingface.co/docs/datasets/processing.html
You can merge two datasets with `concatenate_datasets()` or do label extraction with `dataset.map()` for example | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 41 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
There are already a few transformations that you can apply on a dataset using methods like `dataset.map()`.
You can find examples in the documentation here:
https://huggingface.co/docs/datasets/processing.html
You can merge two datasets with `concatenate_datasets()` or do label extraction with `dataset.map()` for example | [
-0.4685245156,
-0.2306801826,
-0.0531574935,
0.1410390437,
0.3790984452,
-0.1987146437,
0.3367206156,
0.1695585698,
0.1045029908,
0.1931906492,
-0.1746758223,
0.2893978357,
-0.2316428423,
0.5593628287,
0.0868370086,
-0.2147054374,
-0.1576154381,
0.3244950771,
-0.4510016739,
-0.093391262,
-0.2045134902,
-0.1517911553,
0.0859739855,
0.0435050502,
-0.2052290589,
-0.2564643621,
-0.0503220558,
-0.1808667779,
-0.0929278433,
-0.0206907578,
0.3956407011,
0.2275131047,
-0.1231824756,
0.4610510468,
-0.0000994468,
-0.1074683368,
-0.1551019847,
-0.0925967097,
0.1021683067,
-0.168192029,
-0.1254186034,
-0.0846334174,
0.0220992267,
-0.2678523064,
-0.5002472997,
-0.1091541126,
-0.0318485387,
0.06312491,
0.5358986259,
-0.0103138909,
0.2958767116,
0.0097886771,
-0.015897654,
-0.1169514507,
-0.0069823712,
0.2734378874,
-0.1275932342,
-0.0180726424,
0.1740117073,
0.2556475699,
-0.1945541054,
0.3934059441,
-0.0161710754,
-0.0329585224,
0.6259973645,
0.0143673308,
0.0547634661,
-0.4071561396,
-0.2678073943,
0.4698747993,
0.306907475,
-0.2341915965,
-0.4158830643,
-0.4240952134,
0.1417988986,
-0.0436885506,
0.01820492,
0.081879735,
-0.0191103928,
0.2180838883,
-0.3345587552,
-0.2262869626,
-0.2550740838,
-0.0848407298,
-0.4569258094,
0.1557011455,
-0.1581203043,
-0.0320847891,
0.208306551,
-0.1093469486,
-0.0570751093,
0.2332169116,
0.0770114958,
0.1242185533,
-0.1319331229,
-0.4667615592,
-0.2404339463,
0.2420444489,
0.0641128495,
0.0925941467,
-0.1018524915,
0.0364719816,
-0.1074582264,
0.1789063215,
-0.0019420646,
0.3197200298,
-0.0181515068,
0.0871048272,
0.2844574451,
-0.0984444097,
-0.0780217722,
0.1426818073,
0.1567529589,
-0.1871574968,
-0.1085608676,
-0.0477672517,
0.0716382414,
-0.12147291,
0.0511639416,
-0.3087020516,
0.2672422826,
0.1720950156,
-0.1121377274,
0.2878983021,
0.0153887235,
0.2037272453,
0.3953173161,
0.1793696731,
0.1763354093,
-0.1484648287,
-0.0825692266,
0.1802888215,
-0.0494107716,
-0.0196711011,
-0.0038545653,
-0.0378015079,
-0.0293676537,
0.0261388719,
-0.0889281183,
0.3310031593,
-0.0821668208,
-0.1042408496,
0.2652433217,
0.1671462953,
-0.2829814553,
-0.2588633597,
0.0745523274,
-0.1645919979,
-0.2382675409,
-0.0137227178,
-0.1708735228,
0.0797656626,
0.0186046455,
0.2774106562,
-0.0035125315,
-0.0864807218,
-0.2116568089,
0.4036309123,
-0.0128506087,
-0.0990921631,
0.0406688303,
-0.1735938787,
-0.194362551,
-0.0251165926,
0.0886335149,
-0.059914194,
-0.3292739987,
-0.4942748249,
0.1610181332,
-0.1373924613,
-0.0452831388,
0.2936731577,
-0.0389957093,
0.1977725029,
-0.0622101724,
-0.0802092999,
0.4939519167,
-0.1065553129,
-0.1814965308,
0.068139419,
-0.3399480581,
-0.018412102,
0.0083447844,
0.3178713918,
0.2948331237,
-0.0164957047,
-0.3483882248,
0.3703299165,
-0.0752104372,
0.1497976929,
0.1050369591,
-0.2864675224,
0.2458960712,
0.0629723445,
0.2355773896,
0.2537993193,
-0.0692674816,
0.1117847413,
-0.0753492266,
-0.4083533883,
0.2005535215,
0.0748430341,
0.2569254935,
-0.0320863277,
-0.1039826721,
-0.4349059165,
-0.117409423,
-0.105757162,
-0.1769854724,
0.2305082977,
0.2835944891,
-0.2835354507,
-0.0504569523,
-0.2405827492,
-0.1328187585,
-0.1575146317,
0.2584120035,
-0.2040451467,
0.2221157998,
-0.3294778168,
-0.106927,
0.4259645939,
0.1077915654,
0.2475832701,
-0.4918278754,
0.0894112289,
0.0432433486,
0.0613954999,
0.0378552824,
0.0642793626,
-0.1545030177,
-0.2567333579,
0.0715663359,
0.0709935129,
-0.0862857178,
0.0828544945,
-0.0011873278,
0.3227497637,
0.2609708309,
-0.078402251,
0.1439093202,
-0.052529797,
0.1788267195,
0.043389298,
-0.430552125,
0.6129766703,
0.0180024952,
0.1722465307,
-0.0484184623,
0.0495321155,
0.3008769751,
-0.3305993974,
-0.014369797,
-0.1949430853,
-0.1480186135,
-0.1301355213,
0.2936966121,
0.1075422019,
-0.2553981543,
-0.0235896595,
0.2760581374,
0.0384415686,
0.1950591952,
0.3294143081,
-0.2586317658,
0.2395888269,
-0.0654355735,
0.3712909222,
0.2040141225,
0.3569666743,
-0.1667204946,
0.239026159,
0.0320159271,
-0.0046142973,
0.188857317,
-0.0338226296,
0.2357213497,
0.078382194,
0.0489160083,
0.1945624202,
-0.227805689,
-0.2059038579,
-0.264570117,
0.0031590927,
-0.203365311,
0.0034470335,
-0.1967257112,
-0.1450362206,
-0.2393191904,
0.010017246,
-0.3171899915,
-0.0784669891,
0.1861800551,
0.1125213578,
-0.2316167951,
0.1188408956,
0.2403349131,
0.2831951082,
0.1986996531,
-0.0203864984,
-0.1275155097,
-0.1675503403,
0.1066239178,
0.2194829136,
-0.1370416731,
0.0977811068,
0.4182055295,
-0.4118686914,
0.1238674223,
-0.2679352164,
-0.4999004602,
0.2685491145,
-0.1570935696,
0.2256892771,
0.3385978639,
0.1490937471,
0.0294231996,
-0.0188315026,
0.0859246403,
-0.1540537626,
-0.2891170681,
-0.0687826499,
-0.2152635902,
0.0695159361,
-0.1339471936,
-0.1737845689,
-0.2338174731,
-0.3581328988,
0.3657941818,
0.1533705294,
0.0451713875,
0.0105710179,
0.0082778297,
-0.0310070384,
-0.2154483497,
0.3004662991,
-0.2189867347,
-0.1780744791,
0.2259610891,
-0.0719292089,
-0.1818495095,
-0.2360565662,
-0.179087922,
0.0673809201,
0.2620017827,
-0.1796704382,
-0.295206964,
-0.2022519559,
0.2044987679,
0.0763566941,
0.1147259772,
0.5687102675,
0.1093284115,
-0.1792214364,
-0.0555120111,
-0.0229507908,
0.1011578292,
0.1597188115,
0.0593479574,
-0.0260258317,
0.3684962094,
-0.0389977545,
0.3227411509,
-0.3008693755,
-0.4758775234,
-0.0619683154,
-0.0589893684,
0.2156083733,
0.0416006185,
-0.2979399562,
0.2278829515,
0.0441778526,
0.0191546082,
0.1481876671,
-0.0486995168,
0.0111458618,
-0.231093213,
-0.1589171588,
-0.2245371789,
-0.3170902133,
0.0428313985,
0.2425029576,
-0.0501592085,
-0.0710789636,
0.0184233338,
-0.0754574314,
0.0562102906,
0.199445799,
0.4151169658,
0.0847502872,
-0.0235053357,
-0.2109869421,
0.1167984828,
-0.0242338888,
0.24196738,
-0.0683323964,
-0.2246352136,
0.0057181194,
-0.258705467,
-0.1484925598,
-0.1356755495,
0.6416296959,
0.0848636627,
0.0767537951,
-0.0179060996,
-0.464627564,
-0.2970892787,
0.2067292631,
-0.3552083671,
-0.2220587581,
0.1504125446,
0.3458377719,
-0.3562292457,
-0.2923683524,
0.1644760817,
0.3387870491,
-0.3072398305,
-0.0829121023,
-0.0008131787,
-0.1263122857,
-0.3773186803,
0.2055279911,
0.0385525748,
-0.0771326646,
0.0005987398,
-0.0592509061,
-0.3329600096,
-0.1186065227,
0.2515355349,
0.3139454126,
0.0628117472,
-0.1446581036,
0.0171492547,
0.1051337719,
0.4406674802,
0.0418911725,
0.2494476736,
0.023510471,
-0.5702091455,
-0.0133866649,
0.0422748104,
0.1509065032,
-0.002107583,
0.1246788055,
-0.0105000623,
-0.0035682768,
0.3054662645,
-0.4406086206,
0.2906221449,
-0.0310881697,
0.1782279611,
-0.2548519373,
-0.1046054736,
0.4059156477,
0.1876246333,
-0.21159935,
-0.0006976402,
0.2190536559,
-0.4485890269,
0.2102268189,
0.337916106,
0.8208329678,
-0.0220725834,
0.1324446201,
0.2220871896,
-0.0561946556,
0.4963649809,
-0.1502446681,
0.032530956,
-0.2691507936,
-0.3934501708,
-0.1357685775,
-0.0652888343,
0.2102765143,
0.2437315881,
-0.3813429475,
0.3641529083,
-0.0496978536,
-0.1586466134,
-0.0765661225,
0.0328957066,
0.1487185806,
-0.5673127174,
-0.419462502,
0.2572652698,
-0.1618783474,
0.2847168446,
-0.0035601407,
-0.1318381429,
-0.0876581371,
0.0457289666,
0.0972324312,
-0.0441241972,
-0.325653255,
-0.2421277761,
0.0073956307,
-0.2083854079,
0.335038662,
0.2558933198,
0.3095930815,
0.1981582791,
-0.1272190958,
0.1192677394,
-0.2853119969,
0.3346180618,
-0.0915670246,
-0.1033792868,
0.5256100893,
-0.0308110677,
0.032118082,
-0.1150325313,
0.0819013715,
-0.1203014255,
0.4231547713,
-0.2049937099,
-0.0953174829,
-0.3909985125,
0.0488234237,
0.0800534189,
0.1095755994,
-0.1868069768,
0.2117661983,
0.1607625932,
-0.1171948165,
0.2752373517,
0.4020015597,
-0.2543521821,
-0.1254380196,
0.2494213283,
0.2224720269,
0.131501615,
0.0198791455,
-0.2210659683,
-0.2818225622,
-0.4306579232,
0.0707740486,
0.2052570879,
-0.4010016918,
0.3377910256,
0.0976735502,
-0.3812919557,
-0.1181262285,
0.1145380512,
0.3145775199,
0.0429111384,
-0.1349578798,
-0.3282353282,
-0.5083825588,
0.1449073404,
0.0421731211,
0.1967899203,
0.2256724089,
0.3546482027,
0.0495365411,
0.2430291474,
-0.4819772243,
-0.0826897621,
-0.2095015347,
0.1999913603,
0.2634357214,
-0.0171159375,
-0.0374913178,
0.0263988785,
0.1727620214,
-0.05960197,
-0.2150500715,
-0.366091609,
-0.3127804399,
0.0612799004,
-0.1453044116,
0.1823213547,
0.0940943509,
0.2562638223,
-0.0755432546,
-0.2365215421,
0.3544228971,
0.0906272233,
0.0280786175,
0.3455357552,
0.1791207939,
-0.2006537616,
-0.1870821416,
-0.0185306128,
0.0946881622,
-0.1102112234,
-0.2036915272,
0.1857884377,
-0.192277804,
-0.0072236881,
0.0166151635,
0.151456058,
0.3099434674,
-0.1421373188,
0.3326800466,
0.1762284338,
0.083045207,
0.5306996703,
0.2876533866,
-0.0343109071,
-0.0275180042,
0.1235411167,
0.2319224328,
0.3524506092,
-0.5596109629,
0.0930922627,
0.3111477494,
-0.1309545636,
0.3483592272,
0.3157457113,
0.0232931674,
0.1996724457,
-0.004885897,
-0.0649217144,
0.2668973804,
-0.3059863448,
0.1353482008,
0.3643882275,
-0.1511549801,
0.0086813793,
0.4588139355,
0.1298281848,
0.1662644744,
0.1535640806,
-0.0163844377,
0.4012466669,
-0.1160302684,
0.0245241225,
0.4541291893,
-0.0029643402,
0.0215494055,
0.3619542718,
0.0846556723,
0.0848781765,
0.1544634402,
0.164585188,
-0.1245509833,
-0.452375263,
-0.0846993849,
0.4605710208,
-0.2176187336,
0.0525099561,
-0.1512877643,
-0.1291843653,
0.0573184341,
-0.1781861186,
-0.0756376684,
-0.2884865701,
0.4399870634,
0.0605558567,
0.1538342237,
-0.0379772633,
-0.0289663114,
-0.0429914668,
0.2498963326,
-0.0769525617,
0.0208794978,
0.2935594916,
0.022123564,
0.2136038095,
0.6038637161,
0.1448430717,
-0.0849440098,
-0.1604555696,
0.1932694167,
-0.2475613207,
-0.2024956644,
-0.2125962079,
-0.0310603157,
-0.214527145,
-0.1687818468,
0.3770326376,
0.323058486,
-0.2493102401,
0.1287881136,
-0.1560343206,
0.2232077718,
-0.2034609914,
0.1954641789,
0.2016676664,
-0.1328810751,
-0.2870442271,
-0.0539055467,
-0.1211349368,
0.099836126,
0.1605129242,
-0.4364560544,
0.1686100662,
0.0124981366,
0.1488932073,
0.2313266546,
0.2973577678,
0.070131585,
-0.0600894876,
0.1038425267,
0.023330152,
-0.4550195336,
0.0580869354,
0.3359407187,
-0.1637788415,
-0.1979536712,
-0.1882536113,
0.077848725,
0.3184641302,
0.0243484601,
-0.2890489697,
0.0932428464,
-0.0799017772,
-0.2769652903,
-0.0069265156,
-0.0820762515,
0.1544284821,
0.2809630632,
-0.3392108083,
-0.0550969616,
0.1450466812,
0.1700154394,
0.0563490503,
0.466027081,
-0.2188389599,
-0.0072859144,
0.2061865032,
0.2529653609,
0.3293143213,
-0.340613097,
0.1847255975,
0.3814715147,
-0.1514120698,
-0.5562720299,
0.1668209136,
0.1318482161,
0.2287929058,
-0.0672120824,
-0.1191269308,
0.0181225911,
-0.0036667399,
0.1334285736,
0.0585378446,
-0.6600286961,
0.2794373631,
0.0282122791,
-0.1784803569,
0.1371929795,
0.311984688,
-0.0557684675,
-0.140550077,
-0.1189049631,
-0.3230000138,
0.4701816142,
-0.0320266187,
-0.2459298521,
-0.0723552555,
-0.0905002356,
0.0480108038,
-0.131629318,
-0.3248488605,
0.1184534132,
0.2089711726,
-0.0644033253,
0.0676755831,
0.1719878763,
-0.1898825765,
-0.2444029152,
-0.2252629846,
0.5100144148,
0.0994270816,
-0.2092746943,
-0.2593586147,
-0.2064966261
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Ok, sure.
Thanks for pointing on functional part.
My question is more
“Philosophical”/Design perspective.
There are 2 perspetive:
Add transformation methods to
Dataset Class
OR Create a Transformer Class
which operates on Dataset Class.
T(Dataset) —> Dataset
datasetnew = MyTransform.transform(dataset)
datasetNew.save(path)
What would be the difficulty
of implementing a Transformer Class
operating at dataset level ?
thanks
> On Jul 6, 2021, at 22:00, Quentin Lhoest ***@***.***> wrote:
>
>
> There are already a few transformations that you can apply on a dataset using methods like dataset.map().
> You can find examples in the documentation here:
> https://huggingface.co/docs/datasets/processing.html
>
> You can merge two datasets with concatenate_datasets() or do label extraction with dataset.map() for example
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 142 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Ok, sure.
Thanks for pointing on functional part.
My question is more
“Philosophical”/Design perspective.
There are 2 perspetive:
Add transformation methods to
Dataset Class
OR Create a Transformer Class
which operates on Dataset Class.
T(Dataset) —> Dataset
datasetnew = MyTransform.transform(dataset)
datasetNew.save(path)
What would be the difficulty
of implementing a Transformer Class
operating at dataset level ?
thanks
> On Jul 6, 2021, at 22:00, Quentin Lhoest ***@***.***> wrote:
>
>
> There are already a few transformations that you can apply on a dataset using methods like dataset.map().
> You can find examples in the documentation here:
> https://huggingface.co/docs/datasets/processing.html
>
> You can merge two datasets with concatenate_datasets() or do label extraction with dataset.map() for example
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| [
-0.1065417975,
-0.053838864,
0.0260536522,
0.1430312246,
0.3365958929,
-0.1399590522,
0.5725403428,
-0.033915922,
-0.052185595,
0.1631580591,
0.1168566793,
0.2448583543,
-0.4620172083,
0.4327046871,
0.2910212278,
-0.3197541237,
0.0604295693,
0.2110386044,
-0.5410814285,
-0.0536490753,
-0.3712558448,
-0.3355918229,
-0.0531562418,
0.0580876023,
-0.2199227959,
-0.1509216279,
-0.1271555573,
-0.1756850928,
-0.1485711038,
0.0726781115,
0.7325078845,
0.0547799915,
0.1794547141,
0.673066318,
-0.0001188061,
-0.0387486145,
-0.017558394,
-0.0500609316,
-0.0148860812,
-0.3987994194,
-0.2108453065,
-0.1249509677,
-0.0250345469,
-0.3303228617,
-0.19540748,
-0.015498165,
0.0561691672,
-0.0434546024,
0.3625749946,
-0.0595810376,
0.1046544015,
-0.2699896991,
-0.0658375323,
0.0467023142,
-0.1154842302,
0.3715503216,
-0.2796653211,
0.0010374263,
0.1731650829,
0.306355238,
-0.0288392417,
0.074166365,
0.0859451219,
-0.3187920451,
0.9122114182,
-0.0709176809,
-0.0384918749,
-0.3968646526,
-0.2046211064,
0.2444629669,
0.4599395692,
-0.2721914947,
-0.6343579292,
-0.2657698989,
0.070974201,
0.158929795,
0.2296383679,
-0.0058810581,
0.0921112001,
0.2785585821,
-0.3245721459,
-0.2360975444,
-0.4755643606,
0.0938366503,
-0.527667284,
0.0506127663,
-0.1485309452,
0.0155016501,
0.0621880107,
-0.0744669363,
0.1951576322,
0.0976156443,
0.2587229609,
0.2356425077,
-0.2632690668,
-0.3962754607,
-0.1543959826,
0.2665106356,
-0.039813105,
-0.0534416772,
-0.117839545,
-0.1095121205,
-0.1519870907,
0.1321215928,
0.2445406914,
0.3347286284,
-0.0678854734,
0.1746522486,
0.2386979461,
-0.3149808943,
0.0606370866,
0.0193095542,
0.0075842068,
-0.1074853539,
0.0635663569,
0.0290938579,
0.2385458499,
-0.0591092296,
0.2498932779,
-0.2912393808,
-0.1080683544,
-0.0159943663,
-0.1475114673,
0.0228481181,
0.2536225021,
0.3971217275,
0.3115749359,
0.0693930984,
0.3559368253,
-0.1371483505,
0.1234386116,
0.089629218,
-0.2077120543,
-0.008513907,
0.0254323035,
-0.0882945806,
-0.2700824142,
-0.0413116664,
-0.0517634191,
0.3604636192,
0.0132195652,
-0.435118407,
0.1218435019,
0.3219587207,
-0.4701116681,
-0.2149734199,
-0.1325142682,
-0.0192557648,
-0.1424984634,
0.407574892,
-0.1337511241,
-0.1032081097,
0.2736287117,
0.085500516,
0.0136811584,
0.0905924737,
-0.6206728816,
0.3858293593,
0.0393181406,
-0.1848634034,
0.0401020199,
-0.3431007266,
-0.1524260789,
-0.1820154637,
-0.1730381548,
-0.0275772065,
-0.4880176187,
-0.3247207999,
-0.0589679405,
-0.0078165662,
0.0338278934,
0.2875157595,
-0.3181764781,
0.5770639777,
-0.0649322718,
-0.1183063015,
0.7609322667,
-0.1623449326,
-0.3263242841,
0.1355405748,
-0.3932282329,
0.1056027561,
-0.0285584778,
0.3570361733,
0.393470645,
-0.3740150034,
-0.5503359437,
0.2517986,
-0.0503000021,
-0.0115069076,
0.1889351308,
-0.1970737278,
0.4973285794,
0.0133820698,
0.2665418684,
0.3399260044,
0.0465901271,
0.3440966606,
-0.2913908362,
-0.4086548984,
0.2489721924,
0.0150376298,
0.2712845802,
-0.0074663945,
-0.0214921031,
-0.4259055555,
-0.2000452131,
-0.0318091884,
-0.0618994907,
0.3268596828,
0.3026998639,
0.0083407015,
0.1577598453,
-0.1190225482,
-0.219133243,
-0.2704632282,
-0.0120441914,
-0.3185947835,
0.322578609,
-0.5568805337,
-0.3735568523,
0.4142183959,
-0.0540546551,
0.2334821075,
-0.5580813885,
0.1156938374,
0.0233747307,
0.2491554916,
-0.3481841087,
-0.0079239234,
-0.1335951835,
-0.2917015254,
-0.0953384936,
-0.0589292608,
-0.0261339583,
-0.1575659811,
-0.0720559955,
0.4762625396,
0.2876901329,
-0.2148325741,
0.318238169,
0.0622443035,
0.226141423,
-0.1458979398,
-0.3460886776,
0.2852137685,
-0.0535703003,
0.3659824431,
-0.0880965889,
-0.0648378804,
0.1404398382,
-0.2240232378,
-0.2181904614,
0.1399028599,
-0.1129797921,
-0.07260409,
0.3441026807,
0.127038002,
-0.032521151,
-0.1819433272,
0.2679165602,
-0.1034210622,
0.138266325,
0.4796473384,
-0.1408270597,
0.214240104,
-0.3483153582,
0.4952420592,
0.6219201088,
0.1169676259,
-0.2442899048,
0.3060924411,
0.2635379732,
-0.0524750613,
0.150460422,
0.1144996732,
0.2366330326,
-0.1106893867,
0.0115364827,
0.3551888764,
0.147672236,
-0.4427652061,
-0.1622825861,
-0.0296412297,
-0.1099243164,
0.0588960797,
-0.0287234075,
-0.2380893975,
-0.3307720423,
-0.0129870512,
-0.1074383706,
0.0961224884,
-0.0999435112,
-0.1937001944,
0.0738499463,
0.0243851766,
0.1707938612,
0.3343967795,
0.1304816157,
-0.1242380142,
0.023108229,
0.0867314339,
0.1082578599,
0.0292640105,
-0.0491123572,
0.038377665,
0.2854855657,
-0.3548640013,
0.1019784659,
-0.0494281054,
-0.6258032322,
0.2046300024,
0.0114046559,
0.1709540337,
0.3630703688,
0.0625500977,
0.0274034962,
0.0422574356,
0.1247979403,
-0.0741002336,
-0.233915478,
0.014663212,
-0.0686678588,
0.1758809388,
-0.0053665638,
-0.1026480272,
-0.1687107831,
-0.2311032712,
0.4608862996,
0.1201040372,
0.0761679113,
-0.0585084632,
-0.2050850987,
0.044560045,
0.0041251518,
0.2625157833,
-0.0093503892,
-0.1128633842,
0.2273569703,
0.0768130273,
-0.2224089205,
-0.2462586313,
-0.2503370941,
0.0341826715,
0.5150563717,
-0.2194656134,
-0.1157507524,
-0.097934328,
0.1770813465,
0.0443450846,
0.1360619366,
0.6754917502,
0.1972070932,
0.1080714464,
-0.0683111399,
-0.2257616222,
-0.0008919314,
0.2898744047,
0.1243862435,
0.4621848166,
0.5110163093,
-0.0024083108,
0.3339216709,
-0.1510577798,
-0.2582771778,
-0.2768114209,
0.1763474345,
0.0443197079,
0.0027489178,
-0.4018691182,
0.2987795174,
-0.0718970597,
-0.3413552344,
-0.0681768358,
0.034420263,
-0.1198186874,
-0.2663067579,
-0.2975162864,
-0.1594109833,
-0.2106072009,
0.1818181127,
0.0393161811,
0.1803301424,
-0.0807615444,
0.1164885014,
-0.088669911,
0.1549250335,
0.1667349935,
0.6605194211,
0.2578853667,
-0.0099291839,
-0.1072397232,
0.0872033462,
0.0400459282,
0.036687091,
-0.0373534039,
0.1151958928,
0.0354973972,
-0.0296960548,
-0.1387937069,
-0.077461198,
0.6734221578,
-0.1263865978,
-0.0538826697,
-0.0925462395,
-0.5396211147,
-0.2093903124,
0.2259623259,
-0.2650752962,
-0.2224704623,
0.1746711284,
0.299313724,
-0.1425950676,
-0.1577894092,
0.1220947206,
0.4064102769,
-0.3311169744,
-0.4063675702,
0.0549227372,
-0.2408882827,
-0.1778577268,
-0.131790176,
-0.0959739536,
-0.2433741093,
0.0306986198,
0.0425295532,
-0.3838760853,
0.0047157928,
0.1696366221,
-0.0302258469,
-0.2416414917,
-0.1622009128,
0.1318229735,
0.183480233,
0.2295386642,
0.1789849102,
0.1817315519,
0.1627096981,
-0.6273983121,
0.1278330833,
0.2292996496,
0.2480421364,
0.0156405345,
-0.0492786579,
-0.1301845908,
0.048332233,
0.1366273463,
-0.2756725848,
-0.0003734417,
-0.0455009416,
0.3221074641,
-0.352296412,
-0.5900353193,
0.3108605146,
0.2279369682,
-0.1028886363,
-0.1544235945,
0.1743732691,
-0.4822404683,
0.1340200603,
0.364726007,
0.955578506,
-0.017179111,
0.0775623992,
0.1308074594,
-0.0602584966,
0.427262038,
-0.2183826417,
0.0276527032,
-0.1985086948,
-0.3663853109,
-0.3195910752,
-0.2757729292,
0.4778460562,
0.403570205,
-0.3695997,
0.444770813,
-0.0268549994,
0.0830422491,
0.3783855736,
0.0587679595,
0.2714857459,
-0.5816076398,
-0.3119215369,
0.089259848,
-0.1057591662,
0.2805685103,
-0.1049876213,
-0.1866163313,
-0.2718269825,
0.0770044699,
0.0205396712,
-0.0427929163,
-0.3292385638,
-0.1995065659,
-0.0850666463,
-0.2173228264,
0.85100317,
0.3416751623,
0.2968756557,
0.2104678005,
-0.0236103237,
-0.1445989311,
-0.1945163906,
0.3003868759,
0.2033179253,
-0.1505183578,
0.5049753785,
-0.1062808484,
0.0509649664,
-0.0636289716,
-0.0944140404,
-0.2002097368,
0.2499518543,
-0.1495439112,
0.01992465,
-0.4891406596,
0.0657973811,
0.0772788227,
-0.0438062437,
-0.0220829658,
0.089304693,
0.1573814154,
0.0038472749,
0.3480000198,
0.2357845753,
-0.2018471658,
-0.0627063066,
0.0013764165,
0.3610284925,
0.1247053295,
0.042896539,
-0.3429124355,
-0.2802807689,
-0.1254491955,
0.2406890541,
0.095117256,
-0.421135962,
0.2090707123,
0.0677030087,
-0.0068521947,
-0.185026601,
0.0265447367,
0.2446225733,
-0.0467583686,
-0.4049017727,
-0.3855033815,
-0.500625968,
0.1083526015,
0.2817619145,
-0.0155725162,
0.0729669333,
0.4616707861,
0.1958021671,
0.1672315598,
-0.2731506824,
-0.1845597327,
0.0571257323,
0.1818386763,
0.3260119855,
-0.1249693036,
-0.1513390094,
0.0886023194,
-0.0421320871,
-0.082882762,
-0.1371412426,
-0.1382937431,
-0.1004505306,
0.1704817116,
0.1444212794,
0.0493481904,
-0.1290218234,
0.0181038678,
-0.0711752921,
-0.1099519208,
0.1145005524,
0.1153315827,
-0.1027354747,
0.2702432871,
0.1610774845,
-0.0335920677,
-0.5131679773,
0.296231091,
0.0904716328,
0.0359367318,
-0.2626497149,
0.1954118013,
-0.0403057411,
0.1127258986,
-0.4077842832,
0.2016229331,
0.2528674901,
0.0766580254,
0.4542484581,
-0.2142671347,
0.5300093889,
0.4562422633,
0.1906015575,
0.094262138,
-0.1394411623,
0.0893094838,
0.2137865275,
0.0539293326,
-0.3617954552,
0.2642565072,
0.3354157209,
-0.1211386919,
0.0393021107,
0.4257610142,
-0.0247114748,
0.1340172887,
-0.1607201844,
-0.1882658303,
0.2288957983,
-0.1902732104,
0.1538881212,
0.5479015708,
-0.1896895617,
0.3101466596,
0.5182444453,
0.2218761742,
-0.0831050575,
0.2689264119,
0.123496443,
0.2637134492,
0.0905305296,
-0.0205282662,
0.3966088593,
0.0287149101,
0.0679488257,
0.504247129,
0.0737646967,
-0.2143764496,
0.1243720949,
-0.0610741973,
-0.0991158858,
-0.3878371119,
0.1565184891,
0.22662054,
-0.1383500546,
0.441069901,
-0.0869601294,
-0.0259665325,
0.1422654986,
-0.2406665534,
-0.324413687,
-0.386664778,
0.3253192306,
0.1327977479,
0.1506993175,
0.041624032,
-0.0754023939,
-0.0516919456,
0.2463623434,
-0.0627190843,
-0.0002609398,
0.2278403342,
0.2276693583,
0.0929495245,
0.5396188498,
0.0761844814,
0.2316828221,
-0.0407466963,
0.1827042252,
-0.2275705934,
-0.1864678264,
0.039115198,
0.1910357624,
-0.193315044,
0.003874002,
0.2546106279,
0.0740203932,
-0.037405964,
0.2260043919,
-0.1073444933,
0.4486503601,
-0.3857943416,
0.3867212534,
0.082812503,
-0.1325124502,
-0.1683939099,
0.1630368233,
-0.1195955202,
-0.0303969327,
0.2465755641,
-0.3848778307,
0.0494269207,
-0.0104873627,
0.0293313414,
0.2443379909,
0.1756815612,
0.2190906703,
0.1514763534,
0.0247950144,
0.0265752524,
-0.3054022789,
-0.0843892917,
0.2060105205,
-0.1895982325,
-0.0302192383,
-0.3239156604,
0.0980098844,
0.4614946544,
0.0137514398,
-0.3440378606,
0.018950969,
0.0597929023,
-0.1077383459,
-0.0478476658,
0.0716331378,
0.3046369553,
0.0701382309,
-0.227385819,
-0.0252641775,
0.2907376289,
-0.0455555916,
0.0754396394,
0.4472025037,
-0.1230670437,
0.0623970106,
0.1387628466,
0.204600662,
0.3971922994,
-0.0604327247,
0.1115894541,
0.3480598629,
-0.0256992839,
-0.3430043757,
0.4000003636,
0.0863484815,
-0.0067720711,
-0.1952465773,
-0.1211523265,
-0.0640132204,
-0.2995353043,
-0.1213253662,
0.1604430526,
-0.7866068482,
0.1051193848,
-0.1982637942,
-0.2150483578,
0.153572008,
0.269084096,
-0.047440853,
-0.1647904813,
-0.1739926338,
0.0095409527,
0.4162623286,
-0.1712450385,
-0.2035200596,
-0.0616409406,
-0.2454260439,
-0.0794798136,
0.0124917571,
-0.388591826,
-0.0811213925,
0.2913820446,
-0.0351547003,
0.2398269773,
0.1916747689,
-0.204472661,
-0.2209125757,
-0.1321310252,
0.6106513143,
-0.3881570399,
-0.043425329,
-0.2438921034,
-0.0093146935
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.
I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :) | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 64 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.
I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :) | [
-0.490424931,
0.0872302353,
-0.1906812489,
-0.0839949846,
0.3473586738,
-0.1753202379,
0.3381086886,
0.2574362159,
0.0903775468,
0.0197904855,
0.2580311894,
0.3618625998,
-0.3850794137,
0.4767217934,
0.1930703521,
-0.2324407697,
-0.1511344463,
0.265183717,
-0.4250872731,
-0.0168540403,
-0.3289777637,
-0.153358832,
-0.0330886617,
0.1328707337,
0.0029008873,
-0.1466346085,
-0.0935134441,
-0.3280190825,
-0.0702162087,
-0.1045169309,
0.3167806268,
0.1368868947,
-0.0556031764,
0.4302742779,
-0.0001056647,
-0.1033561304,
0.1528601944,
0.0172444656,
0.0270980187,
-0.3660883904,
-0.2878667116,
-0.2310528457,
-0.0796362907,
-0.3515017331,
-0.272473067,
-0.1547866613,
0.1759619564,
-0.3427094817,
0.5134336352,
0.1626291722,
0.2492759228,
-0.2664007545,
-0.1245223284,
-0.0106898323,
-0.0541693456,
0.4239855111,
-0.3033710122,
-0.5247583389,
0.4609450996,
0.2306550741,
-0.1012282073,
0.1187339574,
-0.0994046926,
-0.1907213032,
0.630456388,
-0.1156991422,
-0.0931703299,
-0.5817267895,
-0.0784516335,
0.295892179,
0.4102665186,
-0.2705186903,
-0.4758315682,
-0.2998230755,
-0.0145637915,
0.1219540387,
-0.2259934843,
0.2029167861,
-0.0218978934,
0.327021867,
-0.2893725038,
-0.225489229,
-0.3472729623,
0.0120359501,
-0.2229365408,
0.1600911319,
-0.0978744924,
-0.0259849764,
0.0453671217,
0.0403651409,
0.237088874,
0.0952519476,
0.1654208302,
0.1429380774,
-0.0912426859,
-0.428411454,
-0.1221808493,
0.0104458835,
-0.2088414878,
0.2001114935,
0.0329002887,
0.1262460351,
-0.0182828978,
0.0492416136,
0.0054217745,
0.1322814524,
0.0045805871,
0.0382176824,
0.2880471945,
-0.3633046746,
-0.031348478,
0.1370048076,
0.0354358032,
0.0212803967,
-0.1402965933,
0.1661055982,
0.0147121549,
0.0149488449,
-0.0016044602,
-0.2726563811,
0.1066771001,
0.1336744279,
-0.1337663233,
0.0749790668,
0.1600474715,
0.3427146971,
0.4094097018,
0.0567140281,
0.2407180965,
-0.1985292137,
0.0100685321,
0.1717396975,
-0.2010188103,
-0.0314509794,
0.0899902433,
0.0984607786,
-0.1902891397,
-0.0857492536,
-0.1360106468,
0.403221488,
0.258665055,
-0.0103075914,
0.3266674876,
0.2876621187,
-0.3840346932,
-0.2247588634,
0.047836341,
-0.0214082003,
-0.2645700574,
0.1571625769,
-0.2843387723,
-0.0495865159,
0.1654488146,
0.2562444806,
0.0745677575,
-0.0825993717,
-0.2585093677,
0.4359449744,
0.0350625999,
-0.1288643479,
0.1879973412,
-0.2153199315,
-0.206160605,
-0.0929538161,
-0.1613590568,
-0.0855303854,
-0.5210266113,
-0.4330341518,
-0.292882055,
0.0670859218,
0.1855182797,
0.1258124858,
-0.0995189846,
0.2549536526,
-0.0540067218,
0.0176640451,
0.6603583694,
-0.1747205555,
-0.0979023874,
0.2688252926,
-0.3572137356,
-0.1598706245,
0.1279028356,
0.4035028517,
0.3632647693,
-0.2125306278,
-0.4146339297,
0.353454113,
-0.0909691006,
0.0054097697,
0.1527171433,
-0.2682517171,
0.2469785959,
0.2128082812,
0.3504936099,
0.2810118198,
0.1294330359,
0.1401319355,
-0.1105129346,
-0.4927364886,
0.353164047,
-0.0376639739,
0.1912442297,
0.0206496827,
0.0428726822,
-0.6312660575,
0.188138634,
-0.1162090003,
-0.2709842324,
0.1082688645,
0.2710979283,
-0.1145074368,
0.1172643378,
-0.1550060213,
0.0733626187,
-0.1630353034,
0.2363793999,
-0.3905516863,
0.1708758026,
-0.2011025548,
-0.2399892211,
0.3937873542,
0.0097547621,
0.0534661263,
-0.4360540211,
0.1432037652,
0.2297933549,
0.1855836362,
-0.164136678,
0.1989322007,
-0.3491072655,
-0.2043967247,
0.0468195826,
-0.2283369601,
0.0734597743,
0.0671370029,
0.0497843735,
0.5814137459,
0.2575737536,
-0.0738891363,
0.271572113,
0.0297427401,
0.151219517,
-0.0686642677,
-0.1690054238,
0.647995472,
-0.0027134058,
0.2556301653,
-0.139396131,
0.1753910333,
0.2669110596,
-0.318112433,
-0.265509814,
-0.030036822,
-0.0397093296,
-0.0646845549,
0.2421483994,
0.0481632277,
0.0189810246,
0.0462832786,
0.2515475452,
0.01541356,
0.2425542176,
0.3825643063,
-0.1510891318,
0.2011818886,
-0.1937963516,
0.5782845616,
0.4915003181,
0.2047153413,
-0.2291338444,
0.1965980232,
0.1805029809,
-0.0880013704,
0.2533913851,
0.1599666625,
0.3058576882,
0.0324335024,
-0.0279732682,
0.1396907866,
-0.0631875917,
-0.472979784,
-0.1748871356,
-0.0551557541,
-0.0589844957,
0.2467168272,
-0.2987347543,
-0.3389689326,
-0.1829382479,
-0.0542923696,
0.2892733812,
-0.0513311438,
0.2056132704,
-0.2524845004,
-0.1110306084,
0.1603518575,
-0.0294570252,
0.514957428,
0.1022285223,
-0.0487779714,
-0.2807582319,
-0.2141822875,
0.0795969814,
0.1924242675,
0.017154295,
0.0326935984,
0.4736204445,
-0.2052601874,
0.3556709588,
-0.2228472531,
-0.5828428268,
0.0999874324,
-0.0393816009,
0.1567540169,
0.3471786976,
-0.064084366,
0.1175072193,
-0.0812779069,
-0.0054267049,
-0.1949026287,
-0.288954556,
-0.0580738187,
-0.1537414789,
-0.0682870373,
-0.1009426042,
-0.1854181886,
-0.3057165742,
-0.3653064966,
0.3621488512,
0.0168429092,
0.1068325043,
-0.1464150101,
-0.0528573543,
0.0466543995,
0.120193243,
0.1184348539,
-0.0254241191,
-0.0544989072,
0.133117035,
-0.1406108439,
-0.1921081841,
-0.2421642542,
-0.3054256737,
0.1779669672,
0.359308213,
-0.1374821961,
-0.0864890069,
-0.1797845811,
0.0269062966,
0.1405416131,
-0.0950944275,
0.5606480837,
0.0580536276,
-0.1028714105,
-0.1430611461,
0.0960486978,
-0.1594544053,
0.140404582,
0.0622650348,
0.2014610916,
0.4887654185,
0.0573833957,
0.3966761231,
-0.2763513029,
-0.5605838299,
-0.1552892923,
0.0559179485,
-0.1592635363,
0.0357730687,
-0.4223346114,
0.1116606966,
-0.0961361229,
-0.1843740046,
0.0144017115,
-0.017721314,
-0.4235357642,
-0.0908083022,
0.0125067458,
-0.240386337,
-0.1080766916,
0.122537069,
-0.0586385131,
0.1271522194,
-0.0806815252,
-0.005404748,
-0.0942280218,
0.0064893924,
0.2501515746,
0.3186604679,
0.224458307,
-0.0671209991,
-0.0895247832,
-0.1313566417,
0.0592399202,
0.1989097297,
-0.0286227763,
-0.1292306185,
-0.0933876187,
-0.12763758,
-0.0605838522,
-0.0935156718,
0.6798672676,
-0.2585861683,
-0.1833594739,
0.115017578,
-0.5211292505,
-0.2116233408,
0.157216087,
-0.2936234474,
-0.1387547702,
0.1846013814,
0.2109839469,
-0.0040840656,
-0.0968305618,
-0.0436807573,
0.0557717606,
-0.2764883339,
-0.1382440329,
0.173291266,
-0.1675199568,
-0.404692173,
0.0434763543,
0.0667042956,
-0.1190935969,
-0.1624397337,
-0.2202870846,
-0.3782520294,
0.017927736,
0.2050934434,
-0.1187672913,
-0.3053461611,
-0.2115313411,
0.1628768593,
-0.0756174326,
0.2482206076,
0.1217733622,
0.01110401,
0.1771584004,
-0.4412097335,
0.2124975175,
0.0691915825,
0.2468555719,
-0.077030398,
0.0695589036,
0.0136769339,
0.0993141457,
0.1730926633,
-0.4768764377,
0.091090709,
-0.0490895323,
0.131081745,
-0.1700924188,
-0.5385859013,
0.4164546132,
0.362205863,
-0.1425333768,
0.1924143732,
-0.1396233588,
-0.458347559,
0.3108942509,
0.545819819,
0.8820567727,
0.0202462859,
0.1815937757,
-0.1626456976,
-0.25208956,
0.3659990728,
-0.3363490701,
0.1634486616,
-0.3765652776,
-0.3504269123,
-0.2777537107,
-0.1602728665,
0.3588180542,
0.3163312376,
-0.442145288,
0.2141090035,
0.1854149997,
-0.2774671912,
0.0927127376,
0.1222987622,
-0.0064118709,
-0.5177204609,
-0.0617266931,
0.2326448709,
0.0147149656,
0.2346645594,
-0.076712355,
-0.2186507583,
-0.0635325909,
0.2925379574,
-0.24108693,
-0.0898593888,
-0.1945821941,
0.0760050416,
-0.1570574641,
-0.1579391509,
0.5903680325,
0.2139988095,
0.1131557152,
0.1655707359,
-0.1522759795,
0.0286465734,
-0.1678531468,
0.2973018289,
0.0596076436,
-0.2248907387,
0.5294117332,
-0.0713268518,
0.0227725208,
-0.0500378273,
0.0985263586,
-0.2347022593,
0.056683898,
-0.0197725818,
0.014620183,
-0.2881884873,
0.0374421775,
0.0680971146,
-0.0847849622,
-0.0097793564,
0.2056278437,
0.1391355246,
0.1021846756,
0.4880704582,
0.247791186,
-0.2698327303,
-0.0187060311,
0.0485015363,
0.2433785945,
-0.0282655805,
0.107859984,
-0.247426644,
-0.3079799414,
-0.4038126171,
0.1936315298,
-0.0800648928,
-0.1402972341,
0.4241027236,
0.0560077317,
-0.2723397017,
0.0227897912,
-0.2902473807,
0.2731312811,
-0.0606277175,
-0.3673821092,
-0.4418160915,
-0.2765262425,
0.0984332189,
-0.0481786467,
0.1748620719,
-0.1195068806,
0.1579868793,
0.2233352363,
0.0192566458,
-0.4004312158,
-0.0206103008,
-0.0466723405,
0.07733538,
0.148011893,
-0.0119206868,
-0.3965806365,
0.1831102073,
0.0164040811,
0.0023938268,
-0.2839092016,
-0.2874855697,
-0.1735989004,
0.1151176244,
-0.0516750105,
0.2266323417,
0.0973277688,
0.1461659074,
-0.127687797,
-0.0839435458,
0.0175200477,
0.087750189,
-0.0657203496,
0.3965676725,
0.33931759,
-0.3135195971,
-0.1280069947,
0.132391572,
0.1197142974,
0.0109751038,
-0.1404138058,
0.4049523771,
0.2219871283,
0.0319914818,
-0.1367152035,
0.1751731485,
0.2696062028,
-0.043332234,
0.508050561,
0.0162173696,
0.3049814105,
0.5331389308,
0.0364386663,
0.1318990886,
-0.1432756335,
0.1320048571,
0.1662056446,
0.2966304421,
-0.2822292447,
0.0934453905,
0.2485659719,
0.0942153409,
0.0551357418,
0.2299283296,
0.1871544719,
0.0846949667,
0.1109359562,
-0.1304397583,
0.3049075902,
-0.4942302108,
0.2468265295,
0.3790168464,
-0.0694420487,
0.0271547399,
0.3060774803,
0.0716516823,
0.0685181767,
0.3909008801,
0.2271909714,
0.5443754196,
0.2785640359,
0.0679227114,
0.3333743811,
0.0951083452,
-0.0224442929,
0.3389112651,
-0.1312887371,
0.2181159556,
0.2518444359,
-0.0386550054,
0.1300686002,
-0.1997904629,
-0.1038373113,
0.4290378392,
-0.2054005563,
0.0887923613,
-0.2658658028,
-0.0644456893,
0.1366756409,
-0.2768557072,
-0.0632974207,
-0.1097516567,
0.4635697603,
0.0902048647,
0.0708068907,
0.1755948961,
0.2030889988,
-0.1322395205,
0.2248026729,
-0.1567336619,
-0.1942661554,
0.1774762124,
-0.0101632625,
0.1475270987,
0.4574741721,
0.2258292139,
0.173173666,
-0.4393771291,
0.2172538191,
-0.3352848887,
-0.2082686424,
-0.1618867517,
0.407125771,
-0.1332312822,
0.0322863199,
0.1816320717,
0.2737870216,
-0.1549272984,
0.1682001948,
-0.0191144366,
0.2027835548,
-0.2083943933,
0.584174931,
0.35287714,
-0.119103685,
-0.1195926517,
0.1830761135,
-0.1006726846,
-0.0353181809,
0.4973430932,
-0.5335724354,
-0.0101910159,
0.0372521654,
0.1149991527,
0.0839329138,
0.2910145223,
0.103457734,
0.1482541263,
0.1419586241,
-0.0377889127,
-0.156544432,
0.0021488219,
0.2513351142,
-0.042523656,
-0.1603264809,
-0.1410848349,
0.0675837025,
0.2708384991,
-0.0268762484,
-0.3874264359,
-0.174688369,
0.1546907127,
-0.1828954369,
0.1026939452,
0.111209169,
0.2961475849,
0.0896127671,
-0.254586637,
-0.0773447007,
0.2244995087,
0.1373786181,
-0.0403166562,
0.3328830004,
0.1304401755,
0.1238554865,
0.2548814118,
0.209106341,
0.4130348861,
-0.215466693,
0.3468510509,
0.2343660593,
-0.1899389327,
-0.2591223717,
0.2467823327,
0.1187877059,
-0.0343256257,
-0.21980685,
-0.2305338383,
0.0652121156,
-0.153087765,
0.0055774376,
0.1222298145,
-0.5944428444,
0.0167278722,
-0.2975139618,
-0.0941296667,
-0.007022135,
0.3109408915,
-0.0001742709,
-0.1021809876,
-0.0234924182,
-0.2513219416,
0.2158100903,
-0.1368374079,
-0.4659647346,
-0.0929827094,
-0.1370573789,
-0.3058812916,
0.1579547673,
-0.1381408423,
-0.1742242724,
0.3162983954,
-0.2496903241,
0.3183442056,
0.2175516039,
0.0222028121,
-0.2063115537,
-0.2627235055,
0.4805037677,
-0.1095903665,
-0.0933703929,
-0.2571106851,
-0.2390013784
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Thanks for reply.
What would be the constraints
to have
Dataset —> Dataset consistency ?
Main issue would be
larger than memory dataset and
serialization on disk.
Technically,
one still process at atomic level
and try to wrap the full results
into Dataset…. (!)
What would you think ?
> On Jul 7, 2021, at 16:51, Quentin Lhoest ***@***.***> wrote:
>
>
> I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.
>
> I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 155 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Thanks for reply.
What would be the constraints
to have
Dataset —> Dataset consistency ?
Main issue would be
larger than memory dataset and
serialization on disk.
Technically,
one still process at atomic level
and try to wrap the full results
into Dataset…. (!)
What would you think ?
> On Jul 7, 2021, at 16:51, Quentin Lhoest ***@***.***> wrote:
>
>
> I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.
>
> I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| [
-0.4273888469,
0.203823477,
-0.0892710984,
0.0677171573,
0.5223815441,
-0.1340120435,
0.3225386739,
0.1911118329,
0.0130916312,
0.0615376718,
0.2266186476,
0.3506035507,
-0.4103446305,
0.2984673977,
0.0133416988,
-0.0542734116,
-0.038885802,
0.2965451777,
-0.5386683941,
-0.0739861652,
-0.1674236357,
-0.2261763662,
-0.0746394843,
-0.1188812554,
-0.0701205209,
-0.0560869873,
-0.1632034481,
-0.4052654207,
-0.3135543764,
-0.0657363683,
0.5253242254,
0.2762768269,
0.0223159492,
0.4755659401,
-0.0001143179,
-0.1631055772,
0.2398658395,
0.0084740818,
-0.1145885959,
-0.4431597292,
-0.338858217,
-0.2092613876,
-0.0825241432,
-0.3510287404,
-0.2636527717,
0.0173989274,
0.053882584,
-0.310069412,
0.4917914271,
-0.0407066233,
0.1410671324,
-0.3664945364,
0.0061740875,
0.0395748429,
-0.2592401206,
0.4160126746,
-0.1895076036,
-0.2659280002,
0.2792956829,
0.2837550342,
-0.1073626876,
-0.0279849917,
-0.0470015034,
-0.2350812256,
0.6600618958,
-0.1943362504,
0.004330691,
-0.5277863145,
-0.0465320535,
0.3039246202,
0.6490061879,
-0.3981788754,
-0.4264178872,
-0.1945629567,
-0.0383274034,
0.1389343888,
-0.049860727,
0.2443585545,
0.0176552795,
0.3849681914,
-0.2907497585,
-0.2940436006,
-0.422282815,
0.0256697051,
-0.3817667365,
0.1451615393,
-0.0047396272,
-0.0499595962,
-0.0384323299,
0.130809024,
0.3123415411,
-0.112701416,
0.2272322029,
0.0686239451,
-0.1626560986,
-0.5328313112,
-0.3075405359,
0.0986939669,
0.034453325,
0.1020555198,
-0.0561500117,
0.0376791582,
-0.0647400096,
0.0121170618,
0.1377594173,
0.2655591965,
-0.017764613,
0.1145247072,
0.1995013654,
-0.3872466087,
0.0304760858,
0.2286772281,
0.008877106,
-0.0593659468,
0.1155700684,
0.1483320296,
0.0488786474,
-0.0583634749,
0.0696766898,
-0.1357873976,
0.0441752449,
-0.0455092378,
-0.2064179331,
-0.0037703328,
0.2102981806,
0.4288654625,
0.26722458,
0.1521555185,
0.2064171135,
-0.2488151938,
0.0779285356,
0.0225021876,
-0.3289785981,
-0.0778611898,
0.0461384356,
0.0587499961,
-0.310872376,
0.111193344,
-0.1636578143,
0.4183042645,
0.1364355981,
-0.2913190126,
0.1636848599,
0.1784061193,
-0.3646050692,
-0.0293231308,
-0.0457367152,
0.0250664204,
-0.2207814455,
0.4000895023,
0.0081140408,
0.0546798483,
0.173520714,
0.1761144549,
-0.0178797469,
0.1366657168,
-0.2848553061,
0.2927865982,
0.1620321572,
-0.0634125918,
0.1134388298,
-0.4430216551,
-0.1859665215,
-0.1998775899,
-0.1033181399,
0.0172008276,
-0.6279922128,
-0.2453714758,
-0.136282146,
0.1093936563,
0.0365385003,
0.2848488092,
-0.1213754117,
0.2252279967,
-0.1534103304,
-0.2330724448,
0.5798243284,
-0.0970400348,
-0.2454660237,
0.2289629579,
-0.3728943169,
-0.1394858211,
0.19574067,
0.2967513204,
0.4605459869,
-0.2393575013,
-0.4908558726,
0.2818577886,
-0.0648387894,
-0.1180448979,
0.0126640275,
-0.2541802526,
0.3696833849,
-0.0692065433,
0.2602418065,
0.1997291744,
0.0043156259,
0.3201087415,
-0.0260310806,
-0.4473752677,
0.3603178263,
-0.0066867946,
0.4549992681,
0.0567451306,
0.0585834794,
-0.3478055596,
-0.0341732912,
0.0530906916,
-0.0473658741,
0.2466875762,
0.3147386014,
-0.0091185793,
0.1841316819,
-0.1566164196,
0.0334213451,
-0.1146247163,
0.1116201431,
-0.3407636881,
0.2966468632,
-0.1415419579,
-0.2600742579,
0.5447853208,
0.0473795384,
0.12054912,
-0.5010403991,
0.332647711,
0.050078705,
0.1671908051,
-0.1501578242,
0.0597823933,
-0.3445494473,
-0.1923393905,
0.0210280232,
-0.1629344523,
0.1314260364,
0.0772697404,
-0.0494828038,
0.6066023111,
0.4095854759,
-0.1700628698,
0.4739148617,
0.0510798767,
0.1334011853,
-0.1194855496,
-0.1270042509,
0.4927963614,
-0.0984403715,
0.2128576636,
-0.0814321712,
-0.0044127554,
0.2524282336,
-0.2985364795,
-0.3720680475,
-0.0959756672,
0.1043317765,
-0.0137543492,
0.2253142297,
0.2128074616,
0.0153645873,
0.0124665424,
0.1573321819,
-0.0755052865,
0.1421438307,
0.3831191659,
-0.1746161133,
0.2205760032,
-0.2004303485,
0.4899604917,
0.5510009527,
0.1705226004,
-0.2451499999,
0.1599903256,
0.1105056107,
-0.0650862232,
0.2228178382,
0.0525742918,
0.3805496097,
0.224817872,
-0.0298500098,
0.1878752708,
0.0349262357,
-0.3846750259,
-0.0897412151,
-0.0698584467,
-0.0528349429,
0.0159653053,
-0.2960267067,
-0.222774744,
-0.4385722876,
-0.0818987787,
0.0492283404,
-0.0255586803,
-0.0404092297,
-0.0424439162,
0.2382255495,
0.1159825623,
-0.1045533195,
0.3931622505,
0.1140025929,
-0.1347834021,
-0.140297085,
-0.0884840116,
0.0053355843,
0.0395600423,
0.0950407237,
0.0166572481,
0.4365255237,
-0.1513851881,
0.1293431818,
-0.0760706291,
-0.5865777135,
0.0719243586,
0.072653316,
0.1306544095,
0.2849873006,
0.0718218237,
0.1427115947,
0.0545831621,
0.0340465456,
-0.1997931302,
-0.3182962239,
-0.068126075,
-0.0269996598,
-0.0561732315,
-0.0062386617,
-0.1270179898,
-0.3656999171,
-0.159049809,
0.2604339719,
-0.0370677225,
0.0225018263,
-0.1918986291,
0.0366404913,
-0.1675831974,
0.039267052,
0.1488782167,
-0.1130213588,
-0.0118306205,
0.2623637319,
0.0692795292,
-0.2676435113,
-0.2812873721,
-0.3509059548,
0.1491184384,
0.2953981757,
-0.2414921522,
0.0110007413,
-0.1852774024,
0.0474691838,
0.0062264428,
-0.0530404225,
0.6440249681,
0.135255143,
-0.0090845488,
-0.1666705608,
-0.0124000125,
-0.0724096447,
0.0961198211,
0.1759649515,
0.3626627922,
0.4776415527,
0.1353177726,
0.4528481066,
-0.0309903659,
-0.5186713934,
-0.2558555603,
0.242767632,
-0.010979265,
0.0309007205,
-0.4694470465,
0.2096978128,
-0.0902996212,
-0.4066227674,
-0.1012917683,
-0.088454403,
-0.2011139691,
-0.1499274224,
-0.0057666302,
-0.1017188951,
-0.1321049035,
0.172346577,
-0.1624357998,
0.1246376485,
-0.0637586266,
-0.0338144451,
0.0795984715,
-0.0344649479,
0.1725527942,
0.4323406518,
0.0813846067,
-0.0620549396,
-0.0586337931,
0.0310689919,
-0.0384061858,
0.0896896869,
-0.1239113957,
0.0169136934,
0.080316551,
0.0498193353,
-0.1409440637,
-0.0480196774,
0.9176004529,
-0.1054359525,
0.0751839355,
-0.0528627932,
-0.4078984261,
-0.1606278121,
0.0555228442,
-0.2564148307,
-0.2815264463,
0.12579377,
0.1607532203,
-0.1736695319,
-0.0467670672,
-0.1674884558,
0.1465184391,
-0.3606069386,
-0.3681034148,
0.1373230517,
0.0197043046,
-0.185151428,
-0.1351672113,
0.0603419691,
-0.093932502,
-0.3234593868,
-0.1602890491,
-0.3461585641,
-0.155946523,
0.3014026582,
-0.4090828896,
-0.1805352569,
-0.2664680779,
0.3182812035,
-0.0156428851,
0.2402197421,
0.3277977407,
0.0834523216,
0.0967350751,
-0.4447588325,
0.1128818691,
0.0916410238,
0.1580236852,
-0.0036630332,
0.1313506514,
-0.2520058453,
0.1054590568,
0.0537695736,
-0.560413599,
-0.0605427362,
-0.0197843164,
0.1837172508,
-0.4386498034,
-0.5073024631,
0.2810850143,
0.3722705245,
-0.0437571555,
0.1340917498,
-0.0883265361,
-0.5383079648,
0.3317031562,
0.5413065553,
1.0115054846,
0.0353089161,
0.0951092392,
-0.1618187428,
-0.2940163612,
0.4121868908,
-0.2551250756,
0.137466386,
-0.4025071859,
-0.3175677657,
-0.3263966739,
-0.3039838672,
0.426625818,
0.3661136031,
-0.469766438,
0.2520801127,
0.0660476536,
-0.1698084176,
0.1787822992,
0.3193556964,
-0.0130736204,
-0.4183337688,
0.0711160004,
0.1410792023,
-0.0415543579,
0.1963192672,
-0.0462233946,
-0.2723696232,
-0.2079683542,
0.2208786607,
-0.3255499899,
-0.1173690856,
-0.3221342564,
-0.0072343722,
-0.1927798688,
-0.2832837105,
0.5923352242,
0.1904495656,
0.2429212928,
0.2127529085,
-0.0905344561,
-0.1015584171,
-0.0485851578,
0.2503942847,
0.1308308244,
-0.2683895826,
0.5263620019,
0.0036334917,
0.05600667,
-0.1335296035,
0.0174610801,
-0.1048342884,
0.0918323696,
-0.3402467668,
0.0799731165,
-0.4458640516,
-0.0323549993,
0.0731361061,
0.0000032783,
0.0337570608,
0.1141242608,
0.2982453108,
-0.0053265132,
0.5414869189,
0.2411537915,
-0.1254361868,
-0.0880634487,
0.2546871901,
0.3291701078,
0.0857016519,
0.0439831987,
-0.2423387766,
-0.3445210755,
-0.2269330025,
0.2997028828,
-0.0933083519,
-0.1767574102,
0.2913909256,
-0.0491979681,
-0.0735464245,
-0.070788838,
-0.249779284,
0.3696149886,
0.1445181519,
-0.3072430491,
-0.4929693341,
-0.2234713137,
0.1468707025,
0.0272389073,
0.2472434044,
-0.0569984876,
0.2250384837,
0.1466002762,
0.0512821823,
-0.3249668479,
-0.1563583016,
0.1272401065,
0.0378689393,
0.0823530629,
-0.1206547022,
-0.4654297531,
0.0243740343,
-0.0410167016,
-0.0223770849,
-0.2515199482,
-0.179580614,
0.0025026798,
0.1760140061,
0.0290175974,
0.374807179,
-0.0623117909,
-0.0429195985,
0.0252821632,
0.0009237938,
-0.1133542061,
0.1886115074,
-0.1212604344,
0.3817113638,
0.3554998636,
-0.2482014,
-0.3381772935,
0.2174441814,
0.1194717214,
0.0722382367,
-0.0247968137,
0.435302496,
0.1737559587,
0.0868724883,
-0.4525137544,
0.1167609841,
0.1905510724,
-0.1261229068,
0.4027772546,
-0.1667662263,
0.3428404927,
0.5249500871,
0.3461031318,
0.3309944868,
-0.2420708239,
-0.0178685784,
0.1920127124,
0.1684709787,
-0.2243760228,
0.1829425693,
0.2487546951,
0.0333350413,
-0.0761646256,
0.3599677384,
0.1959186643,
-0.0136883482,
-0.0975947157,
-0.0059232488,
0.5347859859,
-0.5172247887,
0.2831365466,
0.4529383183,
-0.0578203946,
0.1300519109,
0.3954428732,
0.1173457131,
0.0406700931,
0.3292238116,
0.1746831387,
0.4738537669,
0.2645659745,
0.0243521482,
0.3100907207,
0.1382420957,
-0.0397077687,
0.546551168,
-0.0578758605,
-0.0461783707,
0.1481501907,
-0.0553204753,
0.1089119464,
-0.3581901491,
-0.0374863334,
0.2535927892,
-0.2680292726,
0.2417785525,
-0.2399576306,
-0.1268058866,
0.1208408624,
-0.2076498717,
-0.1561163068,
-0.184145242,
0.4952985644,
0.1778952479,
0.0020787679,
-0.0086863525,
0.2054049224,
-0.1518832296,
0.0813434049,
-0.135814175,
-0.047856614,
0.1461291611,
0.0562457852,
0.0846260786,
0.6115335822,
0.2377920151,
0.320487082,
-0.299259156,
0.1391637027,
-0.2391994745,
-0.2748883367,
0.0035140738,
0.4170589447,
-0.226209119,
-0.175784722,
0.2870971262,
0.1712303162,
-0.0557432845,
0.3106921911,
0.0455809943,
0.240136683,
-0.2947986722,
0.5732991099,
0.4169825912,
-0.001992926,
-0.0044028796,
0.1076352596,
-0.2917105556,
-0.0711557269,
0.5056444407,
-0.5531600118,
-0.0742897242,
0.0058250688,
0.0713660419,
0.0575753972,
0.1099345013,
0.1549500078,
0.055057209,
0.0522365496,
-0.0616670698,
-0.1931785494,
0.0594415925,
0.1810074449,
-0.0620460957,
-0.3174684942,
-0.0042769946,
0.1144713163,
0.3869263232,
0.0939159468,
-0.2907922268,
-0.2940660119,
0.3518129289,
-0.1116021872,
0.1389458925,
0.1381021589,
0.3081414104,
0.0559719056,
-0.247272715,
0.0599423014,
0.2529647052,
-0.0038803518,
0.0938820243,
0.3810409904,
0.1513931155,
0.1739979386,
0.1588207185,
0.2628676593,
0.4578670859,
-0.080337368,
0.2029056847,
0.3254691958,
0.0196895488,
-0.2989491522,
0.4337384105,
0.1688087732,
-0.0758024752,
-0.4323501289,
-0.2001511604,
0.0462300405,
-0.1567066014,
-0.0028268546,
0.0878178626,
-0.7870510817,
-0.107916899,
-0.2266782522,
-0.0185903907,
0.0197739489,
0.2365134507,
0.0901063532,
0.1004439145,
-0.1907733083,
-0.2095699161,
0.1808404624,
-0.1625895202,
-0.3482760191,
-0.2039559633,
-0.2373823822,
-0.3200110495,
0.0670424104,
-0.3271467686,
-0.0818443596,
0.3845259547,
-0.1479872465,
0.3348052502,
0.2760914862,
0.071719639,
-0.0876516104,
-0.2140065134,
0.5781518221,
-0.1806403399,
-0.097305648,
-0.2706849575,
-0.0791068226
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | We can be pretty flexible and not impose any constraints for transforms.
Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like `map` work in a batched fashion to not fill up your RAM. So this shouldn't be an issue | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 59 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
We can be pretty flexible and not impose any constraints for transforms.
Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like `map` work in a batched fashion to not fill up your RAM. So this shouldn't be an issue | [
-0.5401790142,
-0.0189925879,
-0.1440083534,
0.1232813969,
0.4372494221,
-0.2170050144,
0.2453127801,
0.1936609298,
0.2192272395,
0.1304916441,
0.0615159199,
0.1877675354,
-0.2603259683,
0.0723870844,
0.0481922068,
-0.0115978569,
-0.07829234,
0.2525766194,
-0.5557227135,
-0.0573626608,
-0.371393621,
-0.1573702246,
0.0135658979,
-0.1440853477,
-0.0328938439,
-0.242877394,
0.0715210065,
-0.0137666762,
-0.1378085762,
0.0672597215,
0.3069249988,
0.1395096481,
-0.1308076382,
0.3437945247,
-0.0000978967,
-0.0323356092,
0.0386955291,
-0.129363969,
0.0463971086,
0.1244557351,
-0.1310037076,
-0.1104855388,
-0.109508574,
-0.3612024188,
-0.2468072772,
0.042379491,
0.0283964481,
-0.3146080971,
0.2295787632,
0.1305738091,
0.3543733656,
-0.1699274778,
-0.1962250024,
-0.0539744198,
0.2161229551,
0.1079377532,
-0.089001514,
-0.1663478017,
0.2665727735,
0.2456255853,
-0.3121327758,
0.2356686294,
-0.0461949371,
0.0065837801,
0.5308226347,
-0.1477862448,
0.0746074766,
-0.1883718967,
-0.0439591631,
0.2111912966,
0.30240646,
-0.3585547805,
-0.1495786607,
-0.1898487955,
-0.0642793775,
0.1807122231,
0.1255577505,
0.0910862908,
-0.1162971035,
0.1236250624,
-0.2932365239,
-0.2158868164,
-0.1858689338,
0.024688242,
-0.3864738941,
0.0843881816,
0.0810549259,
-0.0198894143,
0.2320849895,
-0.1219940186,
0.0640957206,
0.2333987355,
0.0315569192,
0.0362048112,
-0.1075840443,
-0.4280066788,
-0.3164809346,
-0.0104849972,
0.140488416,
-0.0769900978,
0.0305276737,
0.2146951258,
0.068498984,
0.0404782034,
0.0683709681,
0.213299498,
-0.3577132523,
0.0629389584,
0.3471934795,
-0.2959288955,
-0.0947280973,
0.1421934962,
0.1777656078,
-0.1919907928,
-0.0374678597,
-0.1878680438,
-0.1458266377,
-0.1118825749,
0.039255999,
-0.1497555822,
0.2410176247,
0.2816525698,
-0.0548954383,
0.3797283769,
0.0164871961,
0.1225932986,
0.4158709049,
-0.0704301447,
-0.1016625315,
-0.0267894417,
-0.1234515235,
0.1682242155,
-0.2392304093,
-0.1178168878,
0.1755445004,
0.2547562122,
-0.0090133511,
-0.1393264234,
-0.0014684666,
0.4502189159,
0.145450294,
-0.1632994115,
0.3711447418,
0.3215204775,
-0.3073900342,
-0.2312167883,
-0.1824294329,
0.1355636716,
-0.224871695,
0.2574272454,
-0.0100252107,
-0.0601824075,
0.2163719088,
0.3365976512,
-0.0965411142,
0.0889814198,
-0.0164762996,
0.1412250549,
0.0578207411,
-0.2100097537,
0.0223716646,
-0.1844256818,
-0.1561107635,
-0.1307400167,
0.0042212084,
0.0234844983,
-0.3599258661,
-0.1965468377,
-0.016180411,
0.0299439579,
0.0393639877,
0.2355708927,
-0.2584236264,
-0.0666704625,
-0.1518523991,
-0.095984444,
0.5436254144,
-0.0873638242,
-0.510276258,
0.1716725528,
-0.3071722388,
-0.2066992968,
0.0392220616,
0.5570350885,
0.3030121624,
-0.0606620908,
-0.2779818773,
0.4389853477,
-0.012084106,
0.2393549383,
-0.1522182226,
-0.3807234168,
0.2241463661,
0.0999750346,
0.4358038604,
0.0695943385,
-0.0042078458,
0.4479363561,
0.0191992335,
-0.3247075677,
0.2287277579,
0.0903667659,
0.2029693723,
-0.1758001745,
0.0514800511,
-0.3881593645,
-0.029958006,
-0.019490812,
-0.1231636256,
0.1746487916,
0.3121491373,
-0.0633318871,
0.0939696953,
-0.2406128049,
0.0662422106,
0.0523943231,
0.3378175497,
-0.0506484024,
0.2560936213,
-0.3789428771,
0.0967582986,
0.3695113063,
-0.035923373,
0.0900141969,
-0.4097872376,
0.0930522382,
0.0395773947,
0.0411274545,
0.0174411908,
-0.085804835,
-0.159468472,
-0.1214015484,
0.0888801515,
0.0884445161,
0.1423339546,
-0.0831503868,
-0.2251527011,
0.3935475051,
0.296700269,
-0.086463809,
0.4523482621,
0.2250224054,
0.1164681911,
-0.0540586002,
-0.2326424718,
0.3532535136,
0.0675224513,
0.1176047623,
0.0894608051,
-0.0354506746,
0.3178419173,
-0.2105883658,
-0.0916877389,
-0.2391736954,
-0.0803820938,
0.1462731063,
0.2722609043,
0.2418061197,
-0.1434709132,
-0.1761648953,
0.2574056983,
0.0955721289,
0.2356152385,
0.2567687035,
-0.1985843629,
0.1687790602,
-0.0230587982,
0.3929038644,
0.4536697865,
0.3772835433,
-0.0321457535,
0.0570629686,
-0.0334799737,
-0.1285065562,
0.1743484288,
-0.0611710474,
0.2145085633,
-0.007575158,
0.0224812366,
-0.0848526061,
-0.3140357137,
-0.2202804089,
0.0788237974,
-0.0040890779,
-0.128569603,
-0.0825885683,
-0.2104411125,
-0.2082374096,
-0.1002784595,
0.1774027646,
-0.1065199524,
0.1337845027,
0.1469558775,
0.087012738,
-0.1986062676,
0.18122603,
0.0617287308,
0.3059973121,
0.1493960917,
-0.2343179286,
-0.0103398189,
0.0442343093,
-0.020934863,
0.2839321494,
0.0812603757,
0.03015415,
0.3573116362,
-0.0325138941,
0.0159159787,
-0.1075670198,
-0.4170718193,
0.0219913647,
0.0508671664,
0.13270998,
0.2242881209,
0.1550284475,
0.1264585257,
0.0545446314,
0.0223778002,
-0.2790862918,
-0.3149189353,
-0.0249223635,
-0.0592009686,
0.1274021119,
-0.283010602,
-0.2389218658,
-0.0929964334,
-0.505526185,
0.2309707701,
0.1451748908,
0.0573423505,
0.0028789639,
0.2555829585,
-0.1754459143,
0.1253504455,
0.1729647517,
-0.2668438852,
0.0231138915,
0.4328380227,
-0.0556157492,
-0.2987732589,
-0.1864281893,
-0.2419091016,
0.2163751423,
0.5209239125,
-0.4316139817,
-0.0116055906,
-0.287587136,
-0.0104509667,
0.0108657302,
-0.0455286503,
0.5706765056,
0.0471073613,
-0.2182016373,
-0.0778357014,
-0.1106932685,
0.0597552471,
0.1506639123,
0.0165266655,
-0.0133854803,
0.2726939023,
0.0209520832,
0.2372094393,
-0.4598434865,
-0.3791240752,
-0.0370534174,
0.175417915,
0.1323388517,
-0.0176743232,
-0.1120073795,
0.1540551782,
0.1146936715,
-0.1631688178,
0.1865585893,
-0.0414884686,
-0.4385229647,
-0.1449548304,
-0.1328934431,
0.002860494,
-0.2513261735,
0.3997885883,
0.0662710369,
-0.06507954,
-0.0767928287,
0.1190416664,
-0.1788247824,
-0.0431989506,
0.1782179773,
0.1142592579,
-0.008725673,
-0.073540926,
-0.0310927629,
0.1208598763,
-0.1072633117,
0.1333229244,
-0.160676524,
0.003568206,
-0.0728182346,
-0.2996202707,
-0.1183587015,
-0.1653678715,
0.5815539956,
0.0500493944,
0.0715659633,
0.151083231,
-0.3680043817,
-0.3692410886,
0.1909378916,
-0.295385778,
-0.1915870905,
0.0202094279,
0.2334668934,
-0.1936124563,
-0.0312031992,
-0.0504272059,
0.1912975162,
-0.3580100536,
-0.1948177814,
-0.0154852867,
-0.1780781448,
-0.3871999979,
0.1539219171,
0.1001417786,
-0.0908321068,
0.0161032304,
-0.2437740564,
-0.3259717226,
-0.3354436457,
0.2459118366,
0.0127383061,
0.0944810212,
-0.1280446947,
0.1640541852,
-0.1807053089,
0.3554740548,
0.2075030357,
0.0669780672,
0.1276006848,
-0.033171054,
0.1978536248,
0.0043813176,
0.0737058446,
0.1707678586,
0.0512657464,
-0.0757457316,
-0.1046156436,
0.2245438397,
-0.5025942922,
0.226936847,
-0.1176154837,
-0.0372036397,
-0.1397034824,
-0.3046919107,
0.3326460421,
0.1389252096,
-0.2194042653,
0.0952935219,
-0.112967819,
-0.5864385366,
0.2940364182,
0.6617203951,
0.9825023413,
-0.0968460292,
0.1830242276,
0.0236187875,
-0.0951497257,
0.2489516735,
-0.334143877,
0.1913650036,
-0.2713857591,
-0.3456100523,
0.0392464474,
-0.0726356655,
0.0903852731,
0.221827209,
-0.4011258483,
0.0230283067,
0.0346586555,
-0.2270580083,
-0.1472185552,
0.2260574996,
0.0816655606,
-0.5389624834,
-0.1904723644,
0.34006688,
0.0100837443,
-0.0979929119,
-0.0679820105,
-0.125221014,
-0.0838792846,
0.0722063035,
-0.0511196405,
-0.1457973421,
-0.3910180032,
-0.0269337613,
-0.4349456429,
-0.0961693749,
0.2528387308,
0.1495361179,
0.0102969445,
0.4106080234,
-0.081375137,
0.1445854604,
-0.1695800424,
0.2668822408,
-0.0444290042,
-0.0862691998,
0.4258619249,
-0.1075085551,
-0.0176087767,
-0.0891337171,
-0.0558733977,
-0.2663670182,
0.2118801922,
-0.1330445409,
0.1236127615,
-0.3339236677,
-0.0306278989,
0.0376901031,
-0.18584539,
0.0236257985,
0.2972595394,
0.0953725874,
-0.109494403,
0.4886615276,
0.3742896318,
-0.2671434879,
-0.2493671477,
0.3068590164,
0.4510113001,
0.1679680049,
0.0681992024,
-0.207933709,
-0.3289976716,
-0.4613375664,
-0.0386339575,
0.1475534886,
-0.1566037238,
0.3310769796,
0.017640911,
-0.4553512037,
-0.036294654,
-0.0112307314,
0.2609973252,
0.1042573601,
-0.2485151291,
-0.1195609346,
-0.5757895708,
0.1166740358,
0.0600398928,
0.3340650797,
-0.0717348158,
-0.029189745,
0.0409151241,
0.130984515,
-0.5081636906,
-0.0618288442,
-0.1701752841,
0.2392065823,
-0.0906189084,
0.0401865654,
-0.1995503604,
0.1164791137,
0.1786227226,
0.1987210214,
-0.3415722251,
-0.3561058044,
0.0265036449,
0.0729613975,
-0.0851015076,
0.038108632,
-0.0057899579,
-0.1136716008,
-0.1005756408,
-0.1748030484,
0.2322601825,
0.0757038519,
-0.1358757019,
0.1617116779,
0.3516887426,
-0.1904280186,
-0.106137991,
0.2564586103,
-0.0229886621,
0.1287885904,
-0.0762277544,
0.2248429954,
0.1289892793,
-0.0755504072,
-0.0370389484,
0.1613632292,
0.1092059314,
0.0161624774,
0.2429390848,
0.0872150362,
0.0296292454,
0.6459553838,
0.2213813812,
0.1402514875,
-0.0733434409,
-0.1104495674,
0.2113896906,
0.4208185375,
-0.310775131,
-0.1477649212,
0.1610413343,
-0.1849021763,
0.2987508476,
0.3614836335,
0.0597651303,
-0.1097075343,
0.1133997291,
0.0597115345,
0.2657985687,
-0.236961931,
0.1515232325,
0.2913591266,
-0.1258792132,
-0.1349882782,
0.3201213479,
0.2068946958,
0.2180113941,
0.4387917221,
0.0376219936,
0.3958039284,
0.0772475302,
0.0723351091,
0.0071842298,
-0.0593903586,
0.0840390846,
0.5973976851,
-0.0134152211,
0.1384303719,
0.1193291098,
-0.0774086192,
0.1104001105,
-0.2957305312,
-0.164155513,
-0.0149178468,
-0.4132998884,
0.2373103499,
0.0107656047,
-0.199717164,
-0.1087913141,
0.0860126764,
-0.0846301541,
-0.2840931714,
0.5777484179,
0.043637149,
0.06987077,
0.218725428,
0.2641713023,
-0.1287506372,
-0.095583275,
-0.2554259002,
0.0436865091,
0.1652057022,
0.0027945973,
0.2931784093,
0.3171941042,
0.0247331839,
0.2477007508,
-0.1783774793,
0.1587842107,
-0.0223438125,
-0.1473961771,
-0.4861270487,
0.1307815015,
0.0130428281,
0.1222269684,
0.3329809904,
0.3580688238,
-0.2723879218,
0.0573448949,
0.0822002441,
-0.0306330584,
-0.098712936,
0.1574561745,
0.3358227909,
-0.1905291975,
-0.1132156178,
-0.1025378853,
-0.1873042583,
-0.0711833015,
0.2527503073,
-0.6251532435,
0.1733268499,
0.1061772108,
0.1627587378,
0.0676862746,
0.5246924758,
-0.1559079289,
-0.069774732,
-0.03720171,
-0.2199511975,
-0.3036783934,
0.1621908545,
0.0176522415,
0.0907673687,
-0.2603811622,
0.1454749405,
0.1455656886,
0.0833839998,
-0.0279179215,
-0.2130621672,
-0.1423189491,
0.0992487669,
-0.1822215766,
0.0495417006,
0.0438818112,
0.1255907416,
0.2152689844,
-0.3644391894,
0.0570650548,
0.0120623782,
0.3014871776,
-0.0124865361,
0.2467902154,
-0.054457549,
0.3218400478,
0.467938602,
0.1505186409,
0.4137202203,
-0.1625351459,
0.1229261532,
0.1877684295,
0.0470764004,
-0.3208537698,
-0.0584468246,
0.3024860919,
0.0949108899,
-0.1568127275,
0.0238696355,
0.0055288747,
0.0495612659,
0.0280377045,
0.1776484996,
-0.3475266099,
0.1490113139,
-0.030827418,
-0.0213898588,
-0.0929821283,
0.2472130954,
0.0079183923,
-0.2108100206,
-0.1649528593,
-0.414364934,
0.2555776238,
0.0093732551,
-0.2656222582,
-0.1167657748,
0.0128656439,
-0.1665274203,
0.0643492639,
-0.4184451997,
0.0568228364,
0.1724011153,
-0.1445016861,
0.0484217927,
0.0856431946,
-0.1510889083,
-0.2606150508,
-0.312992543,
0.4690489173,
-0.0336307883,
-0.1514238119,
-0.2540900707,
-0.2887400389
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Ok thanks.
But, Dataset has various flavors.
In current design of Dataset,
how the serialization on disk is done (?)
The main issue is serialization
of newdataset= Transform(Dataset)
(ie thats why am referring to Out Of memory dataset…):
Should be part of Transform or part of dataset ?
Maybe, not, since the output is aimed to feed model in memory (?)
> On Jul 7, 2021, at 18:04, Quentin Lhoest ***@***.***> wrote:
>
>
> We can be pretty flexible and not impose any constraints for transforms.
>
> Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like map work in a batched fashion to not fill up your RAM. So this shouldn't be an issue
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 162 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Ok thanks.
But, Dataset has various flavors.
In current design of Dataset,
how the serialization on disk is done (?)
The main issue is serialization
of newdataset= Transform(Dataset)
(ie thats why am referring to Out Of memory dataset…):
Should be part of Transform or part of dataset ?
Maybe, not, since the output is aimed to feed model in memory (?)
> On Jul 7, 2021, at 18:04, Quentin Lhoest ***@***.***> wrote:
>
>
> We can be pretty flexible and not impose any constraints for transforms.
>
> Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like map work in a batched fashion to not fill up your RAM. So this shouldn't be an issue
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| [
-0.3028290272,
-0.0752468556,
-0.0520498976,
0.2568612397,
0.4963203371,
0.0333007723,
0.3464806378,
0.1359568834,
0.108469367,
-0.0489084125,
0.1433253437,
0.1807944626,
-0.2497084588,
0.0995198563,
0.1433493644,
0.0294339284,
-0.0367590636,
0.2082753032,
-0.6057531834,
-0.1103784889,
-0.2944287062,
-0.1542577446,
-0.1056888923,
-0.1136091352,
-0.0622637048,
-0.1996254176,
-0.1581869721,
-0.1262414157,
-0.2569140792,
-0.0750118792,
0.420137316,
0.0989704132,
0.1109470427,
0.5628955364,
-0.0001049531,
-0.1980092824,
0.0629668683,
-0.1417290568,
-0.0416417532,
-0.1271471232,
-0.1105907112,
-0.1241354719,
-0.0914636552,
-0.3788443208,
-0.2515883148,
-0.0126317348,
0.0426661894,
-0.1632641256,
0.2673308253,
0.1891236603,
0.2877259851,
-0.2571976781,
0.061315462,
-0.1159950048,
-0.090633586,
0.498059541,
-0.2132178247,
-0.1317692399,
0.1639421433,
0.2951175869,
-0.1768625975,
0.1194920018,
0.0316158757,
-0.0623986013,
0.6949882507,
-0.1144898534,
0.1647530943,
-0.3416481316,
-0.047490377,
0.1770275235,
0.685839355,
-0.4208055139,
-0.2926062047,
-0.197812736,
0.0413535126,
0.1125579104,
0.0736280233,
0.2918518782,
-0.102389738,
0.4228280187,
-0.2906357348,
-0.1578570157,
-0.2122656703,
-0.0273612104,
-0.3538391292,
-0.0272984579,
-0.0485694408,
0.0704351962,
-0.0280702189,
-0.0896414369,
0.1152460277,
0.0687424839,
0.0859414563,
0.0053372346,
-0.0471008532,
-0.4889362454,
-0.2492949069,
-0.1057616472,
0.1770295203,
0.0206167288,
-0.1055532545,
-0.0825048164,
0.0663287863,
-0.0880443305,
0.1752187908,
0.36546278,
-0.1550445855,
0.1602375805,
0.0713833719,
-0.3452309966,
-0.0499751233,
0.0044704266,
-0.0236580335,
0.0380211659,
0.2002758086,
-0.0101096788,
-0.0094334371,
-0.0741236955,
0.1005778462,
-0.2199300975,
0.1885888427,
0.1436045021,
-0.1644638479,
0.2562834024,
0.1343160868,
0.2364138812,
0.2878937125,
-0.0608224683,
0.0728543922,
-0.1835630834,
-0.092074886,
0.2097064704,
-0.3946241736,
-0.0316819213,
0.061486423,
0.2625041902,
-0.0984267816,
-0.1631221473,
-0.1027051508,
0.2932385206,
0.0450090393,
-0.2885056436,
0.3700774908,
0.2936201394,
-0.5175170302,
0.0034236535,
-0.0082310131,
0.0908263773,
-0.2388361692,
0.388786912,
-0.0808293819,
-0.056877967,
0.1232485175,
0.2654308081,
-0.056801945,
0.1304449141,
-0.2425490618,
0.2334429473,
0.235514313,
-0.1140493155,
0.052346047,
-0.2796917856,
-0.0145571902,
-0.2248252034,
0.0019179359,
0.1308253706,
-0.5505942106,
-0.1371419579,
-0.0929636136,
0.0054795351,
0.2257183194,
0.2538056374,
-0.2389269918,
0.2112422884,
-0.2781810164,
-0.1598564684,
0.5308232307,
-0.0717301369,
-0.3687421679,
0.2272962034,
-0.3469466567,
-0.2316667736,
0.1396827102,
0.3911376894,
0.3910190165,
-0.0739195198,
-0.3169715106,
0.3255685866,
-0.1547598541,
0.017296426,
-0.1826125383,
-0.2983472347,
0.4146893322,
0.0043987483,
0.3740957677,
0.3172220588,
-0.0899920315,
0.5544753671,
0.0361764655,
-0.1642748863,
0.2736383379,
0.0395087041,
0.3699332476,
-0.2187348604,
0.0669550449,
-0.389049381,
-0.13238208,
-0.0164718479,
0.0716956705,
0.2384108007,
0.1521544009,
0.0425670817,
-0.0351378955,
-0.1884235144,
0.1005936936,
-0.1441038847,
0.2575835586,
-0.0682224259,
0.2908599079,
-0.360898912,
-0.1201936305,
0.3291369975,
0.0169595107,
0.0997302979,
-0.4722499251,
0.1352902204,
-0.1037476286,
0.0637202933,
-0.1334819198,
-0.1195374727,
-0.1471015811,
-0.2059049457,
0.0276814811,
0.045600161,
0.1006960869,
-0.0727772415,
-0.1369664818,
0.440784514,
0.3833371103,
-0.2213459015,
0.4104961157,
0.1753509492,
0.197182104,
-0.1581739485,
-0.1563642621,
0.3226001859,
0.0591882989,
0.053962674,
-0.0045885295,
-0.044409968,
0.2749357224,
-0.1846644878,
-0.1495004296,
-0.2213106751,
-0.0930393338,
0.1528902799,
0.2064583302,
0.2672083974,
-0.0180215389,
-0.0872311071,
0.2759077847,
-0.0993305445,
0.1754233539,
0.2399028242,
-0.2363840342,
0.0967985988,
-0.1155927628,
0.3368810415,
0.451592803,
0.2688372731,
-0.0172093622,
0.0994061381,
0.2248302251,
-0.1374186873,
0.2106563598,
-0.0101234056,
0.3061111867,
0.0928651989,
-0.0435661972,
0.0148410313,
-0.1426318586,
-0.2731764317,
0.2011453807,
0.1052604094,
-0.0868094712,
-0.0827878714,
-0.0791176334,
-0.0586181805,
-0.3210164309,
0.1139515191,
0.0012529939,
0.1354950666,
-0.0451801158,
0.0133053372,
0.0678710938,
0.1548038721,
-0.0258904994,
0.2285892814,
0.1403194666,
-0.0222017094,
-0.0016008094,
0.0719157979,
-0.0129565857,
0.186007306,
0.0082578622,
-0.0523203835,
0.3632897139,
0.0237419605,
0.07232894,
-0.0993587673,
-0.3952199221,
0.100798741,
-0.0392053761,
0.1362582892,
0.2487017214,
0.1583067775,
0.0638480932,
0.0739586055,
0.1003379226,
-0.1901114583,
-0.2742716372,
0.0383125246,
-0.0836617053,
0.169539392,
-0.1737306714,
-0.3793554604,
-0.2794137001,
-0.3382387757,
0.1888039112,
0.0238645896,
0.003937915,
0.1018081009,
0.0851492137,
-0.1637769043,
0.1167968288,
0.1359991729,
-0.2013313919,
0.0089232177,
0.3245040774,
0.0960309356,
-0.3421609104,
-0.1381984353,
-0.1543827206,
0.010208332,
0.3889783025,
-0.3169549704,
-0.0313843712,
-0.2151267976,
-0.0285464041,
-0.0322706103,
-0.173795864,
0.625002265,
-0.0079118013,
-0.1444301307,
-0.0402280055,
-0.1125065386,
-0.0756176263,
0.1865361035,
0.127004683,
0.0539277606,
0.4150838256,
0.1548914611,
0.1784224808,
-0.2313499451,
-0.3481867611,
-0.1597623527,
0.2163899094,
0.0208490696,
-0.0015363246,
-0.2815898061,
0.2986257076,
0.0867763013,
-0.5257762671,
0.0635801703,
-0.1433750838,
-0.3126087785,
-0.0938734636,
0.041599609,
-0.0591739006,
-0.1023658887,
0.3085525334,
-0.0628909767,
-0.001625929,
-0.0956035629,
0.0832499415,
-0.0903695822,
-0.0007776916,
0.1365071535,
0.1792051196,
0.0448022038,
-0.0823964328,
-0.2790704668,
0.0333370492,
-0.1754750162,
-0.0688805729,
-0.2427606881,
0.1018718928,
-0.0368375778,
-0.2086673081,
-0.0448293723,
-0.0471710227,
0.8162038326,
0.1139854044,
0.0306036621,
0.0867246389,
-0.3628522456,
-0.3229177594,
0.0645706207,
-0.3020898104,
-0.2120196372,
-0.0534542799,
0.2099130154,
-0.2198082805,
-0.0817437619,
-0.0645162016,
0.3001187742,
-0.3440361023,
-0.308395952,
0.0877124071,
-0.2214545608,
-0.3976362348,
0.0095792152,
0.1840384305,
-0.0245557018,
0.0119084641,
-0.1444053054,
-0.2201029956,
-0.1155395508,
0.2485006452,
-0.1722964644,
0.0177517682,
-0.1120068133,
0.158695519,
-0.1353850067,
0.3628401756,
0.4106982946,
0.049474135,
0.1806000918,
-0.2303602248,
0.2115717232,
-0.0082222521,
0.128854081,
0.0311825201,
0.0427936576,
-0.2118961215,
0.0750580803,
0.1492682248,
-0.6959336996,
0.0593152381,
-0.1067283079,
-0.1500362903,
-0.2943802476,
-0.4452711642,
0.2117898464,
0.1246164218,
-0.1842980385,
-0.0401224941,
-0.0634939075,
-0.6139557958,
0.3886002898,
0.6128231287,
1.116922617,
-0.184289977,
0.1669412851,
-0.0168987829,
-0.0058912486,
0.3774903715,
-0.2371508479,
0.1998218894,
-0.3550822735,
-0.3183297813,
-0.100299105,
-0.1418188959,
0.1677476019,
0.349981308,
-0.4512493908,
0.0392487645,
-0.0306311399,
-0.0302707832,
-0.0552796684,
0.2415484935,
0.1953421086,
-0.5374814868,
-0.1339252591,
0.2882780731,
-0.1208220869,
-0.0347630903,
-0.0453360677,
-0.1534032375,
-0.0932941586,
0.1907479465,
-0.1508697271,
-0.0672849938,
-0.3210917413,
0.0556668676,
-0.463463366,
-0.1997616291,
0.3177559376,
0.2684037089,
0.150151208,
0.2492232621,
-0.0224041622,
0.0255253296,
-0.2658393085,
0.2352416217,
-0.0859217793,
-0.0709661767,
0.5328400135,
-0.0623405203,
-0.0518442094,
-0.0348502807,
-0.0688450858,
-0.1706680208,
0.1275119483,
-0.2459346652,
0.1342008412,
-0.5031855702,
-0.1402986497,
0.0312630422,
-0.1325481832,
0.01435256,
0.2422598302,
0.2745439112,
-0.1834602952,
0.4280768633,
0.2632656395,
-0.2569595873,
-0.2040157616,
0.2488782406,
0.5733263493,
0.1230106801,
0.2374247015,
-0.1156908125,
-0.3798986077,
-0.4102585316,
0.176921621,
0.2932388186,
-0.2035415173,
0.3463573456,
0.0076655596,
-0.1694405377,
-0.0017320961,
-0.0573736802,
0.3999810517,
0.0833485574,
-0.3539369106,
-0.1449836493,
-0.5922729969,
0.0875967145,
0.0081701791,
0.189102143,
-0.0583883822,
0.0969299525,
0.1270014197,
0.0552086458,
-0.4772728086,
-0.1786121577,
-0.1551104933,
0.2088939548,
-0.0917116478,
-0.0565587282,
-0.2293162644,
0.0196998529,
0.112101458,
0.0307322964,
-0.2857634425,
-0.2874866724,
0.1481778622,
0.1052133888,
0.1582012922,
0.1143800542,
-0.1988061965,
-0.1584181786,
-0.1051568091,
-0.1556755602,
0.1166794747,
0.1672085971,
-0.0269315131,
0.3737909198,
0.3921233416,
-0.1973208636,
-0.3632743955,
0.0381702371,
0.0736835748,
0.1335457563,
-0.0087960288,
0.2220732719,
0.2070564777,
0.0143722892,
-0.570587635,
0.2322946042,
0.146702528,
0.0700940341,
0.3555321395,
-0.0842882171,
0.215271771,
0.7550534606,
0.2347370535,
0.0145709366,
-0.0752273202,
-0.0008535013,
0.1678281724,
0.3209896088,
-0.2092951387,
0.0889707655,
0.145557344,
-0.2011819333,
0.0874315053,
0.2652134895,
-0.0376695842,
0.0738555342,
-0.0993818864,
-0.0216867626,
0.6841107011,
-0.3670737445,
0.1809158474,
0.4650238156,
-0.0427682176,
0.016201647,
0.4952471852,
0.2627803683,
0.1423286796,
0.454531461,
0.1572254598,
0.3794989586,
0.2466202378,
0.0828617886,
0.2041732073,
0.0437721834,
0.0797862634,
0.6636735201,
0.0379637294,
-0.0697573274,
0.0407790095,
-0.1790004075,
-0.0601509139,
-0.4161747098,
-0.1353780925,
-0.0135045126,
-0.4005989134,
0.2915461957,
-0.1124868542,
-0.0684108213,
0.0578970611,
-0.0972613543,
-0.1537033468,
-0.2673505843,
0.4747746289,
0.0462133065,
-0.1205840111,
0.1951801479,
0.1547543406,
-0.0755722523,
0.0101366565,
-0.2884207964,
-0.0650603324,
0.1735553294,
0.0605656952,
0.0986790881,
0.5237457156,
0.026367262,
0.2559468746,
-0.0822419897,
0.062913835,
-0.0508797318,
-0.2541757524,
-0.2453352064,
0.3532662988,
-0.1296032518,
0.1875942647,
0.130101651,
0.2976491749,
-0.1622905731,
0.1654860079,
0.2738924623,
0.0677082092,
-0.176102221,
0.2827882767,
0.1829781532,
-0.2444879115,
0.0175651386,
0.0409469679,
-0.3012636304,
0.1206572503,
0.4616491497,
-0.6105463505,
0.1043526381,
0.1044350713,
0.1269516796,
0.0615121126,
0.2328922302,
0.1164090335,
-0.1334688365,
-0.0879254192,
-0.001616478,
-0.213832736,
0.2222235799,
0.0722435415,
0.0310867727,
-0.2169958949,
0.230378136,
0.2244077921,
0.1264851242,
-0.2505664825,
-0.3092609048,
-0.297916919,
0.2071533203,
-0.0954661369,
-0.0076388894,
0.0572800301,
0.3779460192,
0.0538818315,
-0.2726297975,
0.1260619909,
0.193967849,
0.1159632951,
-0.0036791805,
0.2997324467,
0.0336137712,
0.2456905544,
0.3860701919,
0.181910336,
0.4176515341,
-0.0400888696,
-0.0088743158,
0.2440115809,
-0.0818879306,
-0.2122547626,
0.2055047601,
0.2114605457,
0.1955603957,
-0.282695204,
0.0230860487,
-0.0655234233,
-0.1057368889,
-0.1479047537,
-0.0403793193,
-0.6305207014,
0.0302141607,
-0.1264181882,
-0.2030180842,
0.0873140097,
0.2018502355,
0.0949387252,
-0.0717173368,
-0.1438317001,
-0.3844317794,
0.2091497332,
-0.0003153645,
-0.3548847735,
-0.1294166595,
-0.1019815281,
-0.1853732169,
0.0868704319,
-0.513361454,
0.1284310073,
0.3005837202,
-0.0106587745,
0.0992451906,
0.1067642719,
0.0080756396,
-0.1457769573,
-0.2062028348,
0.735855341,
-0.2172152102,
-0.1924631298,
-0.2694467902,
-0.1281163692
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | I'm not sure I understand, could you elaborate a bit more please ?
Each dataset is a wrapper of a PyArrow Table that contains all the data. The table is loaded from an arrow file on the disk.
We have an ArrowWriter and ArrowReader class to write/read arrow tables on disk or in in-memory buffers. | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 55 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
I'm not sure I understand, could you elaborate a bit more please ?
Each dataset is a wrapper of a PyArrow Table that contains all the data. The table is loaded from an arrow file on the disk.
We have an ArrowWriter and ArrowReader class to write/read arrow tables on disk or in in-memory buffers. | [
-0.3604477048,
-0.0561248064,
0.0116533488,
0.2704980075,
0.394608736,
-0.0971967801,
0.3508629203,
0.0482230373,
-0.1000288203,
-0.1611099839,
0.1317932606,
0.3815634847,
-0.3154995143,
-0.0833916143,
0.2542790771,
-0.2325903028,
0.0182952806,
0.443012327,
-0.3059174418,
-0.1537898481,
-0.2024310827,
-0.2975794077,
-0.1411009729,
0.156354025,
-0.108661525,
-0.1525425613,
-0.1539615989,
-0.3630872369,
-0.3081546128,
-0.156658113,
0.6911961436,
0.0511293411,
0.0235322639,
0.5484088063,
-0.0001298558,
-0.0235750601,
0.0727153048,
-0.1433798373,
0.1298895925,
-0.1923113763,
-0.2210622281,
-0.0338291079,
0.1811143756,
-0.3892241716,
-0.3804795742,
-0.2979852855,
-0.0040939879,
0.0515285134,
0.5385869145,
0.1942201257,
0.0866091102,
-0.3026255965,
0.055164367,
0.1068510562,
0.2160902768,
0.3861625195,
-0.2014035881,
0.0175134428,
0.1515754461,
0.2822315395,
-0.1515287906,
-0.1318753958,
-0.1761913598,
-0.0272742584,
0.8690387607,
0.0244410522,
0.1509447843,
-0.3632722199,
-0.2043597549,
0.2908258438,
0.7759713531,
-0.5236786604,
-0.1550634801,
-0.0679514408,
0.1838045567,
0.1550899148,
0.0083906949,
0.2853396833,
-0.106524989,
0.2195324898,
-0.1110390425,
-0.2602997124,
-0.5028030276,
0.1028026789,
-0.521472156,
0.145785898,
-0.0008758977,
0.1302548051,
-0.0523234047,
0.0741433948,
0.4201742411,
0.0259791352,
0.0769910961,
0.20101282,
-0.105970934,
-0.425758481,
-0.4286722541,
0.1216746569,
-0.0518273041,
0.0706448704,
-0.0520822629,
-0.2472424507,
0.1668995023,
0.0298986845,
-0.0434881821,
0.2679724991,
-0.0275979303,
0.3352456093,
0.0658628643,
-0.3162096143,
-0.1533959806,
0.138279587,
-0.0609804392,
-0.2558608353,
0.224851191,
0.0547070578,
0.1456772387,
-0.0902907699,
0.1242999807,
-0.2215959132,
-0.0831002444,
-0.1453956515,
-0.2076647878,
0.1542181969,
0.2172250748,
0.0267332233,
0.2401560247,
0.2879994512,
0.1310457289,
-0.2053763568,
0.0802455246,
0.2888296545,
-0.4228101969,
-0.1289694309,
0.0684532747,
0.1690242887,
-0.3287166059,
0.0584952794,
-0.2053342313,
0.2638603449,
0.0007685497,
-0.3211139739,
0.2513399124,
0.3396919966,
-0.4704185128,
-0.1540031135,
0.153881371,
-0.1303742975,
-0.2196123302,
0.6994736195,
-0.1940139085,
-0.0101559833,
0.0722470134,
0.0758103281,
-0.0002414063,
0.0676919967,
-0.2430969775,
0.1669622362,
0.2110144347,
-0.1898813695,
0.3288912177,
-0.3618781865,
0.1388191283,
-0.2993889749,
-0.0887862071,
0.1197601706,
-0.790707171,
-0.2019079328,
-0.0145817548,
-0.0888851732,
0.1847515553,
0.2106104195,
-0.3140335679,
0.3180659413,
-0.1191110611,
-0.055880852,
0.7501403093,
0.0790747032,
-0.3657935858,
0.1410095394,
-0.4655133784,
-0.3085186779,
0.265013814,
0.4832535684,
0.2425495088,
-0.0904030576,
-0.5927634239,
0.1744460464,
0.0494943485,
-0.1906796992,
0.0165510699,
-0.1602030993,
0.4672037661,
0.0275993273,
0.2890079021,
0.227774471,
0.1661889553,
0.1460764855,
-0.0301541314,
-0.3529474139,
0.2881470025,
0.0217049085,
0.3800840676,
-0.0008918829,
0.0429796614,
-0.2651743293,
-0.0465588234,
-0.1168550551,
-0.2143774331,
0.16267398,
0.1254602373,
-0.0859943628,
0.0401731059,
-0.2185029089,
-0.205340907,
-0.1495806873,
0.0275095776,
-0.376269877,
0.3453817964,
-0.3231987953,
-0.2045761049,
0.362332046,
0.0327498913,
0.2075289041,
-0.4299805462,
0.4497606158,
-0.0851843432,
0.0589444488,
-0.2049830556,
-0.1223999113,
-0.0487962589,
-0.1631946862,
-0.0185094774,
-0.075368464,
0.0226383507,
-0.2253183126,
-0.0744988173,
0.3795033991,
0.2443034202,
-0.6910707951,
0.6359951496,
-0.0714266151,
0.1448138952,
-0.2594785392,
-0.1614322066,
0.4715095758,
-0.0678141043,
0.2263817191,
-0.2780799568,
-0.0126202814,
0.1119964123,
-0.3335903883,
-0.106308572,
0.1066772789,
-0.0678895414,
0.1117893755,
0.23807697,
0.2574707568,
0.0649887472,
-0.186487332,
0.1255378127,
-0.1597723365,
0.2351239026,
0.4662556946,
-0.2535708845,
0.2055150568,
-0.1791688949,
0.3958257437,
0.6401335001,
0.171873346,
-0.3124701381,
0.2381341457,
0.0387584008,
-0.0405565724,
0.2972996533,
-0.0722027123,
0.3564674258,
0.0087075764,
-0.194299221,
0.132537514,
-0.0467175618,
-0.2978571653,
0.0913366675,
0.1649497598,
-0.2284641713,
0.0794567615,
-0.070831418,
-0.1709193885,
-0.4144054651,
-0.0693010986,
0.007885864,
0.2818383574,
-0.0862994939,
-0.1729286611,
0.3115225434,
0.0573586002,
-0.1573171318,
0.1988906711,
0.2325232923,
-0.1714350283,
-0.1934319735,
-0.1323368549,
-0.0262803659,
0.0499791019,
-0.0661574379,
0.0992845371,
0.2294833511,
-0.2976982594,
0.2404409796,
-0.0680986345,
-0.2947517633,
0.0200561993,
-0.0614586063,
0.0227622446,
0.2964046896,
0.2587544918,
-0.149428308,
-0.1004937068,
0.1512503624,
-0.1010407582,
-0.3608801663,
0.1753011346,
-0.2611687481,
0.0857438967,
0.1793055087,
-0.1949101985,
-0.2642942667,
-0.0162404962,
0.1638754159,
0.1531156301,
0.0431892425,
-0.1628797501,
0.1258716285,
-0.0752595961,
-0.0013595596,
0.1007432565,
0.0334939845,
0.1717408001,
0.3631781042,
0.1620597243,
-0.1893089563,
-0.0503243431,
-0.2994685769,
0.0299039148,
0.3481314778,
-0.4328604341,
0.0511916727,
-0.1269655079,
0.1268925369,
-0.147893697,
-0.0134339193,
0.6234856844,
0.1828053892,
0.0386357754,
-0.0361398235,
-0.0435905829,
-0.0636741742,
0.0167230517,
0.1787308455,
0.1327090114,
0.4253962636,
-0.1283372045,
0.4583355784,
-0.3325751722,
-0.3514337242,
-0.1117648482,
0.1025598422,
-0.0301402695,
0.1316378117,
-0.3031071126,
0.0468973294,
0.1495184302,
-0.3250488639,
-0.0367086343,
-0.230045557,
-0.3270390928,
-0.1254157424,
-0.1680469513,
-0.0972604454,
-0.0746329725,
0.2453251928,
-0.1871758401,
-0.041829735,
-0.3286371827,
-0.0422056019,
0.0985613763,
-0.0402648561,
0.0708339363,
0.4972975254,
-0.0194489919,
0.0159368329,
-0.0106007606,
-0.0361704938,
0.1508089006,
0.0118380114,
-0.251788497,
0.0891629755,
0.0207464248,
0.0858296752,
0.1704932004,
-0.0048481114,
0.7906423807,
0.1083035395,
0.1197152436,
0.2335704416,
-0.1213772595,
-0.4022603035,
-0.019828476,
-0.3051272035,
-0.1082736999,
-0.1983742118,
-0.1338702887,
-0.2571400702,
-0.080980964,
0.083443597,
0.2612777352,
-0.3665662706,
-0.4619600773,
-0.0363261923,
-0.1190260649,
-0.2458912879,
0.1944988668,
0.079997167,
-0.109336406,
-0.0393670909,
-0.0230133757,
-0.2647069693,
-0.1444283277,
0.1912234575,
-0.1442516893,
0.0128761493,
-0.1909678429,
0.0757483542,
-0.1049492061,
0.2207001448,
0.2764227092,
0.1894172132,
0.1228579879,
-0.4357860386,
-0.0072486326,
0.0178948753,
0.4148276746,
-0.1693422645,
-0.0173242409,
0.0359381661,
-0.0527616479,
0.116466701,
-0.1306701005,
-0.0785837471,
-0.0155793577,
-0.0330440849,
-0.2313091457,
-0.3976016939,
0.3808096349,
0.1818297952,
-0.1406659484,
0.1326079369,
0.1900205165,
-0.4119343758,
0.2964881659,
0.6284167171,
1.2970559597,
-0.0131906271,
0.1864271313,
0.0619841665,
-0.2102873921,
0.3373142183,
-0.1518901289,
-0.0384920835,
-0.4181610942,
-0.2754040956,
-0.2438247502,
-0.4449939132,
0.3696974516,
0.4542203546,
-0.5083644986,
0.1258342862,
-0.3970274925,
-0.189425081,
0.2302427292,
-0.0515985452,
0.3095282912,
-0.26070714,
-0.0556337684,
0.0093169697,
-0.176171869,
0.1614354849,
-0.0317941979,
-0.1821481586,
-0.2313048542,
0.1159124747,
-0.0707370117,
-0.1343583167,
-0.5251278877,
-0.1050069183,
-0.257415086,
-0.451754272,
0.6619152427,
0.3650529683,
0.0085170344,
0.0933764577,
-0.0914671943,
0.0136747435,
0.0320891589,
0.1699230373,
-0.0420559384,
-0.2248440087,
0.481806159,
-0.1197160929,
-0.1550886929,
0.1149728894,
-0.1105775014,
-0.1878624707,
0.3535495698,
-0.1395905316,
0.2810428143,
-0.4471855164,
-0.0013253689,
-0.055185128,
-0.0623596907,
0.0393941253,
0.0522320122,
0.3158760667,
-0.0062005408,
0.3939511478,
0.2616310418,
-0.3410561681,
0.0032761423,
0.114943251,
0.6427348256,
0.1686142832,
0.2632630169,
-0.2707573175,
-0.3766040802,
-0.2814811468,
0.1783769876,
0.2387975156,
-0.5504467487,
0.076540783,
0.1007903665,
0.1389280856,
-0.0252304543,
-0.2555324137,
0.4737343788,
0.3242426217,
-0.4022260308,
-0.4078062177,
-0.4356183112,
-0.0340485722,
0.1871990263,
0.0944367647,
0.0212512687,
0.2463051379,
0.4592217207,
0.1894712001,
-0.2077482492,
0.0023554079,
0.0191597119,
0.1419449002,
-0.0059985779,
0.076640293,
-0.3780397773,
0.1673591435,
-0.0596418567,
-0.074111402,
-0.1974339336,
-0.0940063447,
0.0293080509,
0.2297696024,
0.1479868591,
0.1731088758,
-0.2500619888,
-0.0883188918,
0.0347710624,
0.1502582431,
-0.0807120427,
0.1347408593,
-0.1625941843,
0.3228532076,
0.6502877474,
-0.2357774824,
-0.7550687194,
0.0738105923,
-0.034631107,
0.073226586,
-0.1203267425,
0.2173372805,
0.1160206795,
-0.0137328804,
-0.4053080976,
0.1018754393,
0.1381126791,
-0.0314448848,
0.3276546001,
-0.1083853394,
0.3197028041,
0.1807758659,
0.0796799511,
0.3073898554,
-0.1853260547,
-0.0103969723,
0.2037961632,
0.0623656213,
-0.3804179132,
0.088963747,
0.2093673348,
0.0341317989,
-0.1200722978,
0.2622240484,
-0.0607716739,
0.0368848294,
-0.1232182235,
-0.0107915066,
0.3770451844,
-0.2025351375,
0.0998256207,
0.7080125809,
-0.2438096106,
0.0200612824,
0.6556424499,
0.1976278126,
-0.1139339507,
0.1668044627,
0.0704856515,
0.3836415708,
0.1070641875,
-0.120911628,
0.251776278,
0.1935066581,
-0.0298950206,
0.5973750353,
0.1824343503,
-0.3034849465,
0.1653969586,
0.0709729865,
0.2092891484,
-0.3164493442,
0.0587989911,
0.083091259,
-0.2280348539,
0.413318485,
-0.3233688474,
-0.1060562804,
0.1456350386,
-0.2937209606,
-0.2135300934,
-0.2387190163,
0.3417323232,
0.2120059282,
0.0011812225,
0.1860434711,
0.3911283314,
0.0605414994,
0.0301330183,
-0.1463623047,
0.0761443228,
0.1960949898,
0.1521430612,
0.1496314704,
0.3942978978,
0.1632653177,
0.2761096358,
-0.1517461836,
0.072358191,
-0.084564805,
-0.2777260244,
0.0282796472,
0.2136630565,
-0.0870824456,
-0.0966922045,
0.2509813607,
0.1430813372,
-0.0689424723,
0.2980153561,
0.0975507796,
0.1908211857,
-0.041377034,
0.3700015843,
0.1667381674,
-0.4476439655,
-0.0104995184,
0.0961705968,
-0.1885863841,
0.0903825089,
0.4336327314,
-0.5003531575,
-0.0619829521,
-0.0532990098,
-0.0292841885,
0.2192306817,
0.3402998447,
0.1301077455,
0.3010831773,
-0.2303793728,
-0.0687953159,
-0.3981023729,
0.2100149095,
0.1048306078,
-0.1326292902,
-0.0165346637,
-0.1178205013,
0.1112501621,
0.2530872524,
0.1387648284,
-0.0464431792,
-0.2062135637,
0.3914129138,
-0.1201334,
0.0649347007,
0.2923527658,
0.4736351073,
-0.0678986982,
-0.2138278782,
0.0961942375,
0.3186489046,
-0.0526871495,
-0.0614870153,
0.2939700782,
0.182892561,
0.4395686686,
0.3321733177,
0.0050553586,
0.8048734665,
0.0074448958,
0.4048197865,
0.5635283589,
0.0819563419,
-0.2770859003,
0.3589552641,
0.2951972187,
-0.1419907212,
-0.229715243,
-0.1050804108,
-0.027240783,
-0.2122630179,
-0.0760067254,
0.2210278213,
-0.7341041565,
0.0497245938,
-0.1359989792,
-0.1535839587,
0.1058370322,
-0.0475434102,
0.1144971102,
-0.0552572049,
-0.2382291853,
-0.1923138499,
0.3582506478,
-0.0686095282,
-0.2909312248,
0.0617490076,
-0.0494966507,
-0.148058638,
0.1791731268,
-0.2567448914,
0.0507353842,
0.4911363125,
-0.0887823552,
0.2391617894,
-0.004498709,
-0.1032989472,
0.0113005787,
-0.1864333153,
0.8142260909,
-0.3296931386,
0.0203686357,
-0.4875223041,
-0.2599970698
] |
https://github.com/huggingface/datasets/issues/2595 | ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets | Hi @profsatwinder.
It looks like you are using an old version of `datasets`. Please update it with `pip install -U datasets` and indicate if the problem persists. | Error traceback:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-a7b592d3bca0> in <module>()
1 from datasets import load_dataset, load_metric
2
----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation")
4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test")
9 frames
/root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>()
19
20 import datasets
---> 21 from datasets.tasks import AutomaticSpeechRecognition
22
23
ModuleNotFoundError: No module named 'datasets.tasks' | 27 | ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets
Error traceback:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-a7b592d3bca0> in <module>()
1 from datasets import load_dataset, load_metric
2
----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation")
4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test")
9 frames
/root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>()
19
20 import datasets
---> 21 from datasets.tasks import AutomaticSpeechRecognition
22
23
ModuleNotFoundError: No module named 'datasets.tasks'
Hi @profsatwinder.
It looks like you are using an old version of `datasets`. Please update it with `pip install -U datasets` and indicate if the problem persists. | [
-0.4680479169,
-0.2621824741,
-0.0422594696,
-0.1249682531,
0.2041024715,
0.1450622976,
0.440243274,
0.2543094158,
0.2220353782,
0.1348179281,
-0.211019218,
0.2088873237,
-0.2797670066,
-0.0780611709,
0.0812449157,
-0.0557083301,
0.0423197225,
0.2207899243,
0.0042472444,
-0.191105485,
-0.031973999,
0.1782890111,
-0.3306013942,
0.2055011094,
-0.3548137844,
-0.2180953771,
0.077937372,
0.0423674956,
-0.0422454588,
-0.2438997924,
0.1500822902,
-0.0146507304,
0.0705005974,
0.4818689227,
-0.0001044994,
0.0464498997,
0.3543691635,
-0.050302837,
-0.3212524652,
-0.4222040176,
-0.3318475485,
0.034827739,
-0.0461380854,
-0.1579175144,
0.1033444852,
0.131906271,
0.1263465285,
-0.136825189,
0.5385987759,
0.348238349,
0.2840607166,
0.4131540656,
0.1567135006,
-0.1267149895,
0.0197896101,
0.2498226762,
-0.0403086692,
0.2972657084,
0.0895574838,
-0.1931069195,
0.3447548151,
0.2893811166,
-0.2390359342,
0.063666977,
0.0798237249,
-0.0465240255,
-0.0414965414,
-0.4952996671,
0.0744475424,
0.1321932524,
0.3183717132,
-0.4103884995,
-0.1930001974,
-0.2050783038,
0.1101315841,
-0.2723011374,
0.0004304741,
-0.018203266,
-0.1323793828,
0.1062287465,
0.1162841767,
-0.1884780228,
0.0229162723,
0.0268925931,
-0.0017302409,
-0.0327817053,
-0.0579355806,
-0.1311632842,
0.2440394461,
-0.1913585663,
-0.1221393794,
0.2369027734,
0.1770550311,
0.5055811405,
-0.4833751023,
-0.172385335,
0.2230121791,
-0.2537676096,
0.0828391761,
0.0121458489,
0.0260498226,
0.1074605435,
-0.1929781735,
0.2938081026,
0.1571600735,
0.2055590004,
0.2407596409,
0.3080773056,
0.2705408931,
0.1983293891,
-0.052923236,
0.1062482446,
-0.2731646895,
-0.1681413949,
0.2600201666,
-0.0516610965,
0.4945355654,
-0.17212376,
-0.5520046949,
0.064515911,
-0.1806007028,
-0.0973163396,
0.0437589251,
0.2725820839,
-0.0597685501,
0.2682125866,
0.0992677361,
0.098021552,
-0.3125717044,
-0.0839814842,
-0.2083455026,
0.1204673648,
-0.1339887679,
0.0375397056,
0.1968416721,
-0.1620703042,
0.161140725,
0.0262969621,
0.1254211366,
-0.0994552597,
0.0607766509,
-0.0804267377,
-0.331415534,
0.1653532982,
-0.0582631417,
-0.014087148,
0.0445940942,
0.0253964439,
-0.1504638493,
0.0868898779,
-0.328918606,
-0.1916425377,
0.0417405292,
0.264373064,
-0.0014751777,
-0.2592624426,
-0.1852258146,
0.019564569,
-0.0112827048,
-0.370994091,
-0.1309114844,
-0.3607836366,
0.0661486387,
0.1108473241,
0.303735137,
0.2592233717,
-0.0803735629,
-0.2542342246,
-0.1639969498,
-0.1825811416,
0.0133437291,
0.3237009645,
-0.0084946007,
0.1405987889,
-0.0637404472,
0.4380910993,
0.2472981513,
-0.4526942968,
-0.2491373867,
0.1340446472,
0.0961462185,
0.0678052604,
-0.1399042308,
-0.214760229,
0.1372886002,
-0.0111433528,
0.3468579352,
0.173313871,
-0.0133901685,
-0.1076783389,
-0.058913976,
-0.1439613104,
0.131951645,
0.2343854904,
0.0049605882,
-0.0483225919,
-0.0427679755,
0.1929651499,
0.126964882,
-0.1789567769,
0.0387045518,
0.2070473284,
0.4356287122,
0.0695722401,
-0.0890486985,
-0.4199828506,
-0.1745182872,
0.0376329422,
0.0212168023,
0.2585082054,
-0.2317060083,
-0.0989647806,
-0.4054161012,
-0.1051229239,
-0.3773020506,
0.1202743202,
0.1669740677,
0.0990828723,
-0.0610881075,
0.0066820383,
-0.299796164,
0.3757267296,
-0.1313781142,
0.0944234431,
-0.3323697746,
0.3736220002,
-0.2377085388,
-0.2670726776,
0.2409504205,
0.4113726616,
-0.0041605234,
0.0625161231,
-0.1170937121,
0.2125419527,
-0.0076910239,
0.1721980572,
-0.2736351192,
-0.0751658976,
0.065703012,
-0.3961910009,
0.0338858888,
0.1110473275,
0.0426311828,
-0.0886898935,
0.0285568498,
0.129645884,
0.1537569016,
0.1063358635,
0.1165110543,
0.0868429691,
0.1682522297,
-0.068310529,
-0.2281050384,
-0.0361748561,
0.2848304808,
-0.1852825135,
0.4031331539,
-0.0381331146,
-0.6622075438,
-0.3254398704,
0.493915081,
-0.0231649913,
0.2633922398,
0.0882818252,
-0.2232539952,
0.200433284,
0.1287858635,
-0.1824391186,
0.4371798635,
0.2529811859,
-0.1184101254,
0.2785459161,
-0.1213825941,
-0.014825128,
-0.0021355674,
0.0376372859,
0.0944891647,
0.1906543523,
0.053959135,
0.1309289485,
-0.443295747,
-0.2492171973,
-0.2248526216,
0.1723363847,
-0.3543303311,
-0.034155976,
-0.2780620158,
-0.0483873449,
-0.1897360384,
-0.0976617485,
-0.242244646,
-0.0885605365,
-0.0185892433,
0.1371498704,
0.1353914142,
0.4319052696,
-0.0441787615,
-0.0619513094,
0.046909824,
-0.4555498064,
-0.1673717797,
-0.1692592651,
-0.0982953757,
0.1030318886,
0.3574743569,
0.0153019838,
0.2674026191,
-0.2192237973,
-0.0046600476,
0.0495450869,
-0.3638137579,
-0.0044207424,
-0.2471050918,
0.1006780639,
0.0280971676,
0.1944646984,
-0.0877809227,
-0.2716490626,
0.2568015158,
-0.2902960777,
-0.3031884432,
0.008494027,
-0.0715100542,
-0.2179570049,
-0.1056061238,
-0.6792386174,
-0.4916087687,
-0.3824000657,
0.1891578436,
-0.0043237135,
-0.0504478589,
0.5760885477,
-0.0038487986,
0.1662246436,
-0.0396010876,
0.2001397014,
-0.1855200231,
-0.001417473,
0.3684049249,
-0.176225841,
-0.1984471828,
0.0650723726,
-0.2073297054,
0.6107490659,
-0.1771790683,
-0.1790091097,
-0.0992141664,
-0.1153991222,
0.2072141171,
-0.142656222,
0.1987737864,
0.2562194467,
0.2243707776,
-0.0665228665,
-0.0385429673,
-0.2290915251,
-0.089224413,
0.5440239906,
0.1236746535,
0.0299236402,
0.3696119785,
-0.2337697148,
0.7312174439,
0.254245162,
0.0529722534,
0.225073874,
-0.1787751317,
0.2573381364,
-0.2329881489,
-0.4067521691,
0.2250756323,
0.0523330495,
0.1240250468,
0.189037621,
-0.0755170882,
-0.1717133969,
-0.3085710704,
-0.1609125435,
-0.2336978763,
-0.2439302951,
-0.1122147292,
-0.2118363529,
0.3327999115,
0.1365735084,
0.0779007226,
-0.1717391759,
-0.0623185746,
0.1407049149,
0.1314400434,
-0.0679297075,
0.0676839948,
-0.3149288595,
-0.0949305594,
-0.2611027658,
0.1321662366,
-0.0671635643,
0.3845616579,
-0.3105469048,
-0.0053710639,
-0.0906090587,
0.1061191112,
-0.0268045142,
0.0510290191,
-0.1677806973,
0.1527024508,
0.2210833281,
-0.1567210555,
-0.0859280303,
-0.1342550665,
0.0122809932,
0.1434633434,
0.1530693918,
-0.2973596454,
0.0127238743,
0.3386219144,
0.3727749586,
0.0377484336,
-0.0941175148,
-0.2668102086,
-0.3024866581,
-0.4897356033,
0.1207359657,
0.1983537078,
0.0963837504,
-0.1993152201,
0.1669944376,
0.2083150148,
-0.1086242944,
0.4872303009,
0.1101526693,
0.1720111966,
-0.050176885,
0.3456842601,
0.5056830049,
0.134212777,
0.2906111777,
0.6657875776,
-0.0223070309,
-0.5903885365,
-0.1238749921,
-0.0629282668,
0.3958956003,
0.0872489661,
0.1059036404,
-0.0479561724,
0.3212255836,
-0.026496876,
-0.0484165624,
0.1525447518,
0.5146480799,
0.3927659988,
-0.3394790292,
-0.411845088,
0.0950059667,
0.185501501,
0.087561816,
0.0681454986,
-0.1043022498,
-0.1613096893,
-0.0356019512,
-0.4842156172,
0.7982997894,
0.3278928995,
0.044506263,
0.2252577245,
-0.0303709358,
0.0399945937,
-0.1018432751,
0.0884784609,
-0.1324900538,
0.058684554,
-0.0059456155,
-0.1115386933,
0.205611214,
0.088956289,
-0.4066593647,
0.4010355175,
0.0836593956,
-0.0207543466,
0.0382335708,
0.2802616358,
0.0214720797,
-0.1409971714,
-0.1178424805,
0.2391811907,
-0.1585396677,
0.5873625875,
0.0903311819,
-0.0947029591,
-0.0624561459,
-0.3076588213,
-0.1190493405,
0.236518532,
-0.176317513,
0.1899976134,
0.3196706474,
-0.0780479908,
0.3400166929,
0.0243679695,
0.0112000573,
-0.0196505822,
-0.2427955717,
0.0951934159,
0.1217558682,
0.0140335895,
-0.0462796502,
0.0185668841,
0.5849071145,
-0.1009638608,
-0.4325723052,
0.145503521,
-0.0550940633,
0.0390628725,
-0.2691910267,
0.0498390421,
0.2839339674,
-0.1750941128,
-0.2218397409,
0.1223256588,
0.2192092836,
-0.0271995142,
0.2155410051,
0.0649083406,
-0.1225232631,
0.375587821,
0.0395613536,
0.0722046942,
-0.0408567674,
0.2515900135,
-0.0187331568,
-0.3264918923,
0.612921834,
-0.075042218,
-0.1617054045,
-0.3027547598,
0.0731455982,
0.1165143102,
-0.2352833599,
-0.0564120822,
0.1171290353,
0.0903478563,
0.0291940793,
0.1955388039,
-0.0177136641,
-0.2486477494,
-0.0644362718,
-0.1412011981,
-0.39831236,
0.2289280891,
0.1119449735,
0.3001001477,
-0.1009245366,
0.3502108753,
0.247061193,
-0.0204847734,
-0.408629775,
-0.0172805544,
-0.1506144106,
0.2297730446,
0.3867767453,
-0.2138603479,
0.0795578063,
0.0045471638,
0.2706663013,
0.0681108162,
-0.154139027,
-0.2902037799,
-0.1380580366,
0.0749274269,
0.1081202254,
-0.0461760163,
0.1655640155,
0.0306892917,
-0.0927982703,
-0.1629673243,
-0.0240250565,
0.0706080273,
-0.1004460603,
0.2611727417,
0.0199563932,
-0.0094589666,
0.246232897,
0.1467527896,
-0.0240726955,
0.155442521,
-0.0228901822,
0.0898326263,
0.1484559178,
0.0780455247,
-0.2269874811,
0.0927137211,
0.3652599752,
-0.2079778761,
0.0919524059,
-0.4146077931,
-0.1869241297,
0.0035456531,
0.2747446299,
0.2939593196,
-0.2162154913,
0.0663706288,
0.3228002489,
0.2919088006,
-0.4339708686,
0.2176024914,
0.3344874382,
0.0039232485,
0.1013887525,
-0.0108272359,
0.0384639204,
0.0470235348,
0.1753736734,
0.1658093929,
0.1026387438,
-0.3446685076,
0.3764193952,
0.0506737158,
0.0758726597,
-0.1463963389,
0.382057488,
-0.0301786885,
0.1045024842,
0.5094952583,
-0.441491276,
0.1682894677,
0.0115655251,
0.154297173,
0.2767113745,
-0.323361814,
-0.2022304535,
-0.1139014065,
-0.0536590703,
0.0028552208,
-0.0626459196,
0.6269549727,
-0.3885323107,
-0.1094070524,
-0.1444593668,
0.1354538351,
-0.3061709404,
0.0700818896,
0.034069486,
-0.1839967668,
-0.179185912,
-0.2247752398,
0.1355300844,
-0.0824573934,
0.4152857959,
0.0984391943,
-0.1780037582,
-0.2696002126,
-0.1987649947,
0.2105157375,
0.0625382066,
-0.085209541,
0.3057460785,
-0.0383058526,
-0.1322035789,
0.0668963939,
0.5210747719,
0.5806879997,
0.1711710393,
-0.07287094,
0.1826122254,
-0.0855730325,
-0.0793716758,
0.0943480283,
0.1167584658,
0.0382121354,
0.3208304942,
0.123548761,
0.2243593782,
-0.2264110595,
-0.0492910184,
-0.1167297959,
-0.2444067448,
-0.4465119541,
0.3851089478,
-0.2668535709,
-0.1144589186,
-0.3867427707,
-0.0310379975,
-0.5898923278,
-0.0372404195,
0.4932128787,
0.2721068561,
-0.1028742641,
-0.3833263218,
0.1120100841,
-0.2403332144,
0.1437899023,
0.3910238743,
0.2161831707,
0.0266757086,
0.0195013285,
-0.6945978403,
0.120617114,
-0.0724867955,
-0.0154801868,
-0.0486517027,
-0.0889656991,
0.0467395298,
0.1318781823,
0.118208915,
-0.2654313445,
-0.2165035009,
-0.2908386886,
-0.304194212,
0.0143067315,
0.0956118405,
0.0445634052,
0.164317891,
-0.2925543189,
-0.0871800929,
-0.3029637337,
0.0716291741,
-0.1985856742,
0.0138235241,
-0.0220374241,
0.1548386812,
0.3778556585,
0.0707519576,
0.7247417569,
-0.1219093949,
-0.0149170049,
0.0884631053,
-0.3524927497,
-0.1980545223,
0.1428396851,
0.0400929078,
0.486587286,
-0.1656808555,
-0.1466164291,
-0.286622256,
0.0134920292,
0.0952575728,
-0.3367998004,
-0.0814711079,
0.1075758934,
-0.0959663019,
0.2380136847,
-0.0568128154,
0.0383796766,
-0.1823731959,
-0.0006933883,
-0.3166335225,
-0.4183668196,
0.6252815723,
-0.0994776487,
-0.4117878675,
-0.4622049928,
0.2439307868,
-0.1391501427,
-0.2128486931,
-0.4571860731,
0.1743618846,
0.3370924592,
-0.0477893986,
-0.0868128315,
0.2577056587,
0.0695326924,
-0.0047335029,
0.0295039117,
0.2987218201,
0.0493529662,
-0.0268673189,
0.2987108827,
-0.1521716416
] |
https://github.com/huggingface/datasets/issues/2595 | ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets | @albertvillanova Thanks for the information. I updated it to 1.9.0 and the issue is resolved. Thanks again. | Error traceback:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-a7b592d3bca0> in <module>()
1 from datasets import load_dataset, load_metric
2
----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation")
4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test")
9 frames
/root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>()
19
20 import datasets
---> 21 from datasets.tasks import AutomaticSpeechRecognition
22
23
ModuleNotFoundError: No module named 'datasets.tasks' | 17 | ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets
Error traceback:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-a7b592d3bca0> in <module>()
1 from datasets import load_dataset, load_metric
2
----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation")
4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test")
9 frames
/root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>()
19
20 import datasets
---> 21 from datasets.tasks import AutomaticSpeechRecognition
22
23
ModuleNotFoundError: No module named 'datasets.tasks'
@albertvillanova Thanks for the information. I updated it to 1.9.0 and the issue is resolved. Thanks again. | [
-0.3636057973,
-0.3833414614,
-0.0181183554,
-0.1324388087,
0.1585254669,
0.1734298766,
0.4083130956,
0.2774200141,
0.19420138,
0.0959576741,
-0.1962039322,
0.2137219161,
-0.2857518792,
-0.030767601,
0.1209337562,
0.0243298709,
0.0525845662,
0.1785370111,
0.0639962107,
-0.2289385051,
-0.0830181167,
0.1798966527,
-0.3790596128,
0.23350209,
-0.3515878022,
-0.1942124963,
0.0089906529,
0.0472991131,
-0.0594282486,
-0.2619593441,
0.1584797204,
-0.0244396422,
0.0247923657,
0.5354665518,
-0.0001072219,
0.0130809397,
0.3887678385,
-0.0951575786,
-0.3423604667,
-0.4812252223,
-0.5180741549,
-0.0198784135,
-0.037889868,
-0.1568297148,
0.1432608962,
0.0931807831,
0.1367633045,
-0.0211389214,
0.5184742808,
0.323417604,
0.276093334,
0.4396753311,
0.1758445203,
-0.1285548508,
-0.0919888169,
0.3200477064,
-0.0312033184,
0.3851703703,
0.0718944818,
-0.2481864095,
0.3491159081,
0.3169423938,
-0.2483986765,
-0.0398038104,
0.2099718004,
-0.0704431906,
-0.0864190683,
-0.5517335534,
0.1612676382,
0.1745323092,
0.3149973154,
-0.4002383351,
-0.244560197,
-0.1867612004,
0.145068571,
-0.2974835336,
0.0211211629,
0.0581534281,
-0.1166368201,
0.0485456027,
0.0884919465,
-0.2153847516,
0.0324990004,
-0.0098938458,
0.0379461795,
0.0695415586,
-0.0714510828,
-0.124416329,
0.2239093184,
-0.172911644,
-0.2198528498,
0.1894758344,
0.1876294613,
0.5041465759,
-0.4748544693,
-0.1837354749,
0.2259813547,
-0.2747801244,
0.059249416,
-0.1257462502,
0.0696838051,
0.0972488001,
-0.1417375356,
0.259814918,
0.2328958511,
0.2657306492,
0.3367697895,
0.3275891244,
0.3152908087,
0.3205072582,
-0.0319150947,
0.096183978,
-0.2667919993,
-0.1119740903,
0.274302423,
-0.0072114524,
0.515747726,
-0.1445226669,
-0.4783942997,
0.0268438943,
-0.1586011946,
-0.0491167642,
0.0459221229,
0.3150607347,
-0.0719004944,
0.2049202472,
0.1140738502,
0.070788011,
-0.3394894004,
-0.0207244828,
-0.2056518942,
0.143972218,
-0.1351425946,
0.0390930697,
0.1669228822,
-0.2369959652,
0.2426794469,
-0.038448438,
0.1271665692,
-0.1646114588,
-0.0026619323,
0.0350432843,
-0.285361737,
0.2188853323,
-0.057758376,
-0.0250665843,
-0.006532521,
0.0594038814,
-0.1507555246,
0.148841992,
-0.3855994046,
-0.2488825023,
0.0353924111,
0.2451746762,
0.0019517839,
-0.2012860775,
-0.2043666244,
0.1103082597,
-0.0199952908,
-0.3280107975,
-0.1137687415,
-0.3114472628,
-0.0183947459,
0.0832228512,
0.314004004,
0.2145242989,
-0.0957232863,
-0.2608373761,
-0.1386355311,
-0.1814469695,
-0.0146554075,
0.2992722392,
-0.0283235256,
0.1103682145,
-0.0679045096,
0.5170897245,
0.1305841953,
-0.4023427665,
-0.2130296528,
0.0811730176,
0.0615918115,
0.0784979686,
-0.1494666487,
-0.2262279391,
0.1217363253,
-0.0053586401,
0.2895028591,
0.2189672589,
0.023290826,
-0.0666877106,
-0.0701265186,
-0.1601058096,
0.0731839389,
0.1477268636,
0.0437989347,
-0.0165529251,
-0.0837945938,
0.1944780797,
0.1807451546,
-0.201295346,
0.0373747349,
0.2082429379,
0.4772289991,
0.0610020719,
0.0018084235,
-0.2899802625,
-0.2439674288,
0.0906844661,
-0.0490239263,
0.3566192389,
-0.3079186976,
-0.1824966073,
-0.386679858,
-0.0527750514,
-0.3918938637,
0.0559835136,
0.1665537059,
0.0353789926,
-0.1400140822,
0.0161964446,
-0.3451237679,
0.2648698986,
-0.0309730023,
0.1227004826,
-0.3519032001,
0.3853034973,
-0.1914645731,
-0.308624357,
0.2147636116,
0.4524842799,
-0.0079537313,
0.0620539635,
-0.136879608,
0.164560467,
-0.0686159879,
0.208302483,
-0.2534756064,
-0.1135928035,
0.1204178408,
-0.3686174154,
-0.0335521623,
0.1560338587,
0.1338923275,
-0.1023146436,
0.0601930432,
0.1925479472,
0.2630729973,
0.0872491002,
0.162752077,
0.0740890503,
0.0583264083,
-0.0703035891,
-0.1851863563,
-0.0571809895,
0.2701917291,
-0.1746157259,
0.3756133318,
-0.0258410163,
-0.6040571332,
-0.3535892665,
0.4849469066,
-0.0782645121,
0.2236103117,
0.0556299724,
-0.2568136454,
0.1159279943,
0.1705578566,
-0.3374946713,
0.3594591618,
0.1739275604,
-0.108381018,
0.3482664824,
-0.0841785222,
0.0032748915,
-0.0126492828,
0.110114485,
0.0521430336,
0.17742984,
0.0945812762,
0.050332997,
-0.4496418834,
-0.2656072378,
-0.1863159686,
0.1864308268,
-0.3769987822,
-0.0612784587,
-0.2536340356,
-0.0062751547,
-0.1210897863,
-0.1308912486,
-0.2910751402,
-0.1262823641,
-0.0285303071,
0.1420174241,
0.1164865196,
0.411904037,
0.0562698692,
-0.0428690612,
0.0566486344,
-0.3579313755,
-0.2157427371,
-0.2365887314,
-0.0544140898,
0.0616883114,
0.3786766827,
0.0383743122,
0.1699182242,
-0.1812995672,
-0.0000642315,
0.1045469493,
-0.4350383878,
-0.0063258223,
-0.2335228324,
0.0633963123,
0.0017649755,
0.1968348324,
-0.0975242108,
-0.3132129312,
0.2633443773,
-0.272087574,
-0.2986529469,
0.0646649301,
-0.0801601261,
-0.2136177272,
-0.1200267822,
-0.5569186211,
-0.4403803945,
-0.3566885591,
0.1819928288,
-0.0772863179,
-0.0431811288,
0.6514207125,
0.0293713175,
0.2377748489,
-0.1074318662,
0.1617144197,
-0.1048826426,
0.0539458096,
0.337630868,
-0.17017892,
-0.1958736926,
0.1166850328,
-0.2572163343,
0.6778262854,
-0.1940078437,
-0.201284796,
-0.0728155971,
-0.0509071201,
0.2408657074,
-0.1346974373,
0.1593545079,
0.2059504837,
0.156620875,
-0.0554305278,
-0.012773037,
-0.2480049133,
-0.0972876102,
0.5820996165,
0.094418779,
0.0600191765,
0.3471994698,
-0.2486725301,
0.7864297628,
0.230869934,
0.1107454896,
0.2190029174,
-0.0982875749,
0.2674397528,
-0.2108425498,
-0.4376782775,
0.2226889729,
0.0914872959,
0.1118221581,
0.2504207194,
-0.032657329,
-0.121368438,
-0.3556516171,
-0.3254823387,
-0.1687036008,
-0.2966778278,
-0.1167398095,
-0.0817810297,
0.3221664131,
0.1697289944,
0.1055975705,
-0.2187430859,
-0.0654274523,
0.1467367411,
0.2421662062,
-0.0970550105,
0.0653824359,
-0.3066465259,
-0.1483699083,
-0.3405385315,
0.1368671656,
-0.0517595597,
0.4558200836,
-0.2143548429,
0.0210492089,
-0.0781612694,
0.1187462732,
0.0026037209,
0.1094014347,
-0.17142573,
0.1266741902,
0.0890686512,
-0.1200416833,
-0.1046279222,
-0.0660478398,
0.0593854785,
0.1450900733,
0.2695625722,
-0.3026837409,
0.0177185498,
0.3039086461,
0.376062125,
0.0805391967,
-0.1350093633,
-0.3770292997,
-0.3506782949,
-0.4728809595,
0.1429028511,
0.1724355519,
0.097022295,
-0.1271732748,
0.1632333398,
0.219670862,
-0.1573040336,
0.4420222342,
0.1218703538,
0.1329140961,
-0.0286291093,
0.3401711583,
0.476810962,
0.0664624944,
0.2375130802,
0.6372559071,
-0.0236762092,
-0.7577483654,
-0.1979635507,
-0.1201225296,
0.3438262045,
0.112163499,
0.0901919901,
0.0276927333,
0.4193375111,
-0.0080799125,
-0.0076424666,
0.1131890118,
0.4846417904,
0.4113264978,
-0.4018977582,
-0.3383568823,
0.0783464387,
0.1432867944,
0.1592214406,
0.1371789277,
-0.096087411,
-0.221495986,
-0.0248498321,
-0.5586664677,
0.7840058804,
0.3227557242,
0.0612403415,
0.2629367709,
-0.0033959374,
0.0799392909,
0.045301564,
0.1685221195,
-0.1381040663,
-0.0160072912,
0.0119672418,
-0.0974416733,
0.2206214815,
0.0779652074,
-0.4101415575,
0.4231620431,
0.0714923739,
0.0468712263,
0.0075261183,
0.2793136835,
0.1080202833,
-0.1398213208,
-0.1461079568,
0.1999603808,
-0.1303397119,
0.6326059699,
0.101559639,
-0.1258403659,
-0.0305486172,
-0.3149100542,
-0.1065029055,
0.2004968822,
-0.2200039774,
0.2250457555,
0.3635547459,
-0.0740770474,
0.3070268631,
-0.0908038914,
-0.0672450066,
0.01243807,
-0.2876226008,
0.0829654783,
0.1172920465,
0.0674092099,
-0.096006304,
0.0318055153,
0.611160934,
-0.1110402793,
-0.4229339063,
0.1673190296,
-0.0954173952,
0.1045299098,
-0.2354664207,
0.026772853,
0.2249740064,
-0.0980886146,
-0.2255709469,
0.1045556217,
0.2335184067,
-0.0608014055,
0.1946657449,
0.048396498,
-0.1451739967,
0.3375959992,
0.0521151125,
0.0055141449,
-0.0695341453,
0.2893534601,
-0.0004024822,
-0.3251863718,
0.6093983054,
-0.0939882845,
-0.1770116091,
-0.2521190941,
0.0321931243,
0.2130115628,
-0.2881562114,
0.0263942555,
0.1457318664,
0.0958660394,
0.0091586187,
0.2715732157,
-0.0357919186,
-0.2337738872,
-0.0870273262,
-0.114575848,
-0.4128246307,
0.2796647251,
0.1166092753,
0.2642892599,
-0.1291114092,
0.4132297635,
0.3312870562,
-0.0469710231,
-0.3769036531,
-0.0129259005,
-0.1994541585,
0.16772075,
0.3669531345,
-0.1935516447,
0.0903576314,
0.0834858567,
0.2580675185,
0.0866546929,
-0.129978165,
-0.2424422503,
-0.1228833124,
0.0876505077,
0.1171842441,
-0.0328589082,
0.1796572208,
0.0119786188,
-0.1475056708,
-0.1580752283,
0.0210803524,
0.0714743733,
-0.1193958819,
0.1821639985,
0.0764138773,
-0.0071995314,
0.2596052587,
0.2125119269,
0.0411072485,
0.1299160421,
0.0073170252,
0.025597468,
0.1358452439,
0.1108724326,
-0.1450425982,
0.0927247107,
0.253020227,
-0.2015183717,
0.0851776153,
-0.3775855899,
-0.1525239795,
0.0016041175,
0.2083034515,
0.3257995546,
-0.1462607831,
0.0995499715,
0.3164531589,
0.2548804879,
-0.4426316023,
0.2402202487,
0.3323373497,
0.0445715487,
0.0907237381,
-0.0140097886,
0.0340851843,
0.0505933166,
0.192944631,
0.1450362056,
0.0011353679,
-0.2689984441,
0.3850501776,
-0.0095106643,
0.0465698913,
-0.0808149725,
0.3681238294,
-0.0208932422,
0.0974604338,
0.382058382,
-0.4378885031,
0.2419492453,
0.0315869264,
0.1459216624,
0.2872112095,
-0.3768298626,
-0.2674656212,
-0.112954028,
-0.0158966407,
0.0211886708,
-0.0738535523,
0.6236786842,
-0.4865302742,
-0.0626910254,
-0.0776230022,
0.1505672336,
-0.3340907693,
0.1247662604,
0.0412310585,
-0.1665501893,
-0.1529593766,
-0.2408025414,
0.1342777014,
-0.0620059595,
0.3735055029,
0.0824026465,
-0.1566253901,
-0.2083681524,
-0.2844170928,
0.2198252529,
0.0288597029,
-0.0974246189,
0.2185841948,
-0.0091726668,
-0.0740260482,
0.0873245969,
0.5061691403,
0.5795964003,
0.2384860218,
-0.0331305899,
0.1049510911,
-0.0168666802,
-0.0602553636,
0.1299703866,
0.0700257719,
0.1368561089,
0.4141388237,
0.0976888314,
0.1724711061,
-0.1997911632,
-0.0529920645,
-0.0429134965,
-0.2157279402,
-0.4559637606,
0.2976957858,
-0.3128182292,
-0.1389410794,
-0.3822698891,
-0.0345835648,
-0.5582606196,
0.0663023219,
0.467236191,
0.2679563165,
-0.1678643078,
-0.3979561031,
0.0895159319,
-0.2667343318,
0.1480166614,
0.401930362,
0.1818224937,
-0.0192096382,
0.0471449941,
-0.6798259616,
0.1862459183,
-0.0133902505,
-0.0708917156,
-0.0427571982,
-0.1561950445,
-0.0245063975,
0.0166962743,
0.087714456,
-0.3457699418,
-0.1732074469,
-0.3885889947,
-0.340788871,
-0.0383819938,
0.0890558064,
-0.0284406636,
0.1961669326,
-0.2559448183,
-0.0215818062,
-0.2670932114,
0.039714992,
-0.1974107474,
-0.0096197873,
-0.0293373689,
0.236226216,
0.3201613724,
-0.0436137021,
0.6852192283,
-0.097971864,
-0.0632763356,
0.0546018817,
-0.2957472205,
-0.2335704714,
0.1820385307,
0.0998796895,
0.4836896658,
-0.1316229701,
-0.0821449459,
-0.2838931084,
-0.0038028248,
0.0510099083,
-0.3323507309,
-0.0647726506,
0.1963785589,
-0.0617845878,
0.2327574342,
0.000085026,
0.0397842638,
-0.2082761824,
-0.0568772182,
-0.3205321431,
-0.4250096679,
0.6887369156,
-0.1174828857,
-0.4332190156,
-0.4882306755,
0.2215624154,
-0.1690745056,
-0.2508114278,
-0.4525444806,
0.1826770008,
0.3078407049,
-0.0280827861,
-0.1032516062,
0.2085328698,
0.0283306502,
0.0559327528,
-0.020306062,
0.2545563281,
0.1018199921,
-0.0872143432,
0.2926309407,
-0.1661281884
] |
https://github.com/huggingface/datasets/issues/2591 | Cached dataset overflowing disk space | I'm using the datasets concatenate dataset to combine the datasets and then train.
train_dataset = concatenate_datasets([dataset1, dataset2, common_voice_train])
| I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
| 18 | Cached dataset overflowing disk space
I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
I'm using the datasets concatenate dataset to combine the datasets and then train.
train_dataset = concatenate_datasets([dataset1, dataset2, common_voice_train])
| [
0.0375591516,
-0.4222128391,
0.0985902846,
0.4514760971,
0.1011741981,
0.205056265,
0.074486047,
0.1419045627,
0.144528836,
0.0556367561,
0.4010794163,
-0.2280426919,
-0.1242992729,
0.1127195805,
0.1466888636,
0.0686898679,
0.2591464221,
-0.2458593696,
-0.0610487983,
0.1060897261,
-0.1954932362,
0.2656944394,
0.0236383229,
-0.1252899617,
-0.2641810477,
-0.1312527061,
0.1114908755,
0.0915549099,
0.1169937104,
-0.221520856,
0.6455172896,
-0.0375429988,
0.2969842553,
0.3342038393,
-0.0001271115,
-0.2188407481,
0.0915406495,
-0.1815932244,
-0.0922587216,
0.550489068,
0.1914407909,
-0.3445687294,
-0.052295398,
0.0128890127,
-0.1940166056,
0.1352999657,
-0.0969077423,
-0.4302129745,
0.2448512912,
0.0724847019,
0.0480298549,
-0.0077623464,
-0.1181682199,
0.170801118,
-0.1092362851,
-0.004405586,
-0.2483727634,
0.1998683214,
0.2498452067,
-0.1698943377,
-0.1137219518,
0.5557485819,
-0.0590145811,
-0.0844291747,
0.5253403187,
0.0833816081,
-0.35629794,
-0.1106624082,
0.3813788295,
-0.0801355243,
0.3144634962,
-0.4211864769,
-0.0359758921,
-0.5416687131,
0.1242919117,
-0.4084815383,
0.4917798638,
0.1439298987,
-0.3081751168,
0.2055081278,
-0.2643952966,
-0.4621686935,
-0.2639661431,
-0.1211517155,
-0.0510150082,
-0.1692600697,
-0.1779299676,
0.0038871057,
0.498188585,
-0.1243524402,
-0.0180545337,
-0.1148283929,
-0.1485928297,
0.166488573,
-0.4704053998,
-0.1601628065,
-0.1597560942,
0.4838790596,
0.1778157949,
0.0343688615,
0.0580156073,
-0.2219773233,
0.0135493502,
-0.0545081086,
0.0384911858,
0.6338204145,
-0.430200845,
0.1479857713,
0.0260616839,
-0.1004756093,
-0.0664960295,
-0.0840655714,
-0.0061185434,
-0.388866663,
0.2431182265,
-0.3094466031,
0.0366064012,
-0.266004324,
-0.1329784393,
0.109599866,
0.1877570152,
0.1407827437,
0.2514515519,
0.3864439428,
0.182106033,
0.3051150441,
-0.3228459954,
0.2218101323,
-0.2443424165,
-0.1192896813,
-0.0440738276,
-0.0846641511,
0.0494984239,
0.3295778632,
0.3280157149,
-0.1158239543,
-0.0438293591,
-0.16687271,
0.2368198484,
-0.0264208987,
0.0309989303,
-0.2585932016,
0.2868453264,
0.1123237014,
-0.3598536551,
0.2251691371,
0.2425775826,
0.3989655972,
-0.2411044836,
0.1247826517,
-0.355045557,
-0.2518388033,
0.148078844,
-0.0142697021,
-0.1831807792,
-0.0969635919,
-0.4297462404,
0.2190827727,
0.4013516307,
-0.2894100547,
0.0460614376,
0.0167299155,
-0.4555118084,
-0.12716721,
0.2183410227,
0.3905502558,
-0.1844457388,
-0.0037564933,
0.0871428549,
0.4355637729,
0.0485230125,
0.623354435,
-0.1413374245,
0.0224385783,
-0.3221299648,
-0.2130480409,
-0.0346538052,
-0.5695790648,
-0.7795042396,
0.0159559324,
0.0507360846,
0.2829304636,
0.346426338,
0.1854579896,
0.0370457098,
-0.1173866093,
-0.1299518645,
0.2160577923,
-0.0045058476,
-0.0558643341,
-0.3231565952,
-0.5304923058,
0.285346359,
-0.1147802323,
0.046649985,
0.100603804,
-0.2822224498,
0.0011680499,
0.1973251104,
-0.0316380821,
0.2541678846,
0.3844375014,
0.293066293,
-0.3115617037,
-0.0663590133,
0.0042587295,
-0.4575059414,
0.195095256,
0.1783737838,
-0.3753207326,
0.124583602,
-0.1003919691,
0.0144068375,
-0.2264461815,
-0.133951813,
-0.2168266624,
-0.1374632269,
-0.0339444652,
0.4003780186,
-0.1763289422,
-0.2991104424,
0.3400561213,
0.0025759861,
-0.0406325534,
-0.325986594,
-0.0154326856,
0.1447564363,
-0.0170681719,
-0.2598407567,
0.1888254285,
0.0648190975,
-0.0355281308,
0.0368640982,
0.233570382,
0.02266692,
0.3187165558,
0.3493317664,
0.3796353936,
0.2128700465,
-0.0915225521,
0.2820822895,
0.2902055681,
-0.0620260872,
0.0524617434,
-0.3751505911,
0.2003804296,
0.0710655302,
0.195061937,
-0.1139812246,
-0.2368826717,
0.2514108717,
0.1360598058,
0.0944544747,
-0.1216270626,
0.2244891524,
0.0017586034,
0.3925086856,
0.0476583466,
-0.041611217,
0.2306888402,
0.3817817271,
0.2312815189,
0.0795114785,
0.3927399814,
-0.1257767826,
-0.2583569884,
0.10781537,
0.3400514126,
0.5201388001,
0.1659973264,
0.1927117258,
-0.0825792179,
0.0334073119,
-0.0248671174,
0.1405937821,
-0.2922540009,
-0.1662438661,
0.0999910086,
0.1785676926,
-0.170333758,
-0.115101099,
0.2065088749,
-0.0072104894,
0.0374705195,
-0.1230289713,
0.2915501595,
-0.0051884651,
0.0669605136,
-0.3004221022,
0.2018046528,
-0.4009775519,
-0.0063933656,
0.1357571781,
0.5235959291,
0.0959124416,
0.0231753774,
-0.1968864352,
0.7337743044,
-0.0781154856,
-0.2568982542,
0.0806486607,
-0.0120088309,
-0.1814782768,
-0.1487003118,
0.309396714,
-0.5017923713,
0.0971777663,
0.1724738479,
-0.0851733685,
-0.29793787,
0.1057202369,
-0.07112813,
0.1724737585,
0.0262167063,
-0.3023269773,
0.317168653,
0.0086359903,
-0.0908929035,
-0.0860919803,
-0.1090200394,
-0.0805501416,
-0.1161439866,
0.0500084497,
0.4038140178,
0.1403172314,
0.0388042144,
-0.2606482804,
-0.2303477675,
0.2758385539,
-0.153694123,
-0.0432944894,
0.0811395571,
0.0112991631,
-0.1315150559,
-0.1234190017,
-0.2881758809,
-0.2525758147,
-0.76704216,
0.3175763488,
0.065981023,
-0.0736875683,
0.1482878476,
0.2214991152,
0.35197258,
0.1975898445,
-0.5262953639,
-0.108043626,
-0.1927303225,
0.2778543234,
-0.204267472,
-0.2437516153,
0.3360222876,
-0.1253869087,
0.1910074055,
0.0439110994,
-0.1972727925,
0.2947357595,
0.2608200908,
0.3492497802,
-0.075724557,
-0.0599260479,
0.0863767788,
0.9180578589,
0.0366468132,
0.1179879755,
0.2343272567,
0.2871669531,
0.448636055,
-0.1861971915,
-0.246479243,
0.0511525236,
-0.1345723718,
-0.2713451982,
0.1046251208,
0.3082743585,
0.146626085,
0.1631295383,
-0.0689218044,
0.2187522948,
-0.2138774544,
0.3311524987,
-0.1401930749,
0.3264654577,
0.0280977711,
0.0892386287,
-0.3383798003,
-0.2278051525,
0.0030131079,
0.1278016567,
0.3850556612,
0.2612067163,
-0.2789202332,
-0.2433245033,
-0.4827177227,
0.1956559867,
-0.0384939611,
0.0403399989,
-0.3785454035,
-0.2253634483,
0.1297895163,
0.0203344896,
0.9234861135,
0.0464556366,
0.1821257472,
-0.2568493187,
-0.0968072116,
-0.0758297145,
0.0022399873,
0.2907461822,
-0.2174906731,
-0.1467928737,
0.4098928869,
0.0378759503,
-0.0872069448,
-0.3201646507,
0.3639973402,
-0.4575735331,
0.0065996796,
-0.2253907621,
-0.0537637547,
-0.0625001639,
0.1516192853,
0.1337887645,
0.1230590791,
0.0934423655,
0.1320100725,
-0.1702726334,
-0.0427673012,
-0.0555934235,
0.0200952329,
0.5271495581,
0.1192735434,
0.0408747867,
0.2363301516,
0.2522955239,
0.1998600215,
0.2740612626,
0.0932862237,
-0.0258029252,
-0.0214493945,
0.0511360206,
0.1186632365,
0.4327246845,
-0.2288735211,
0.2974845767,
0.099958986,
0.1264849454,
-0.764298737,
0.0768657997,
0.2269201726,
0.3894958198,
-0.0471373387,
-0.3855695128,
0.3176099062,
0.0167662427,
-0.0140858144,
0.2437089086,
0.1186744571,
-0.5224872828,
0.0029736832,
0.0166977774,
1.0220948458,
-0.0052736141,
0.5250900984,
0.0106057227,
0.0838321894,
0.4028090835,
-0.5466377735,
0.3585669398,
0.0577717572,
-0.255886972,
-0.0354823545,
0.0891322345,
-0.0084904488,
-0.0728913769,
-0.1517246962,
0.3895682991,
-0.094648473,
0.2141801268,
-0.4183893204,
-0.0863081068,
-0.0117627587,
-0.2253906727,
-0.5132775307,
0.054548759,
-0.2742120326,
0.1035264954,
-0.0508341268,
0.0319063962,
0.1635921448,
-0.0210021883,
-0.3381101489,
-0.2094534934,
-0.2528521717,
-0.0258972496,
-0.0363922976,
-0.3285660744,
-0.016561415,
0.2719002068,
0.3318611085,
0.0905137584,
-0.3641144931,
0.1196019351,
-0.1798488498,
0.062812008,
-0.2151514292,
-0.0983469337,
-0.1674997807,
-0.0548017211,
0.017499283,
0.0707683712,
0.0337857716,
-0.4108782411,
0.0175113827,
0.0322571211,
-0.1330733001,
-0.0900964588,
-0.2087692171,
0.1424432695,
0.0319384262,
-0.0690166429,
0.0454460755,
0.2176924348,
-0.3402987421,
0.1204394177,
-0.2136465162,
-0.2409315407,
-0.0380487479,
0.4774671197,
0.0289596841,
-0.2921250165,
0.5220631361,
-0.0114155412,
0.0539455265,
-0.1883496046,
0.1402014792,
0.1701514423,
-0.1835627258,
-0.0535126776,
0.0281142816,
-0.2855755091,
-0.205735445,
-0.2029028833,
0.4924883246,
-0.2519823313,
-0.3050519824,
-0.1449884027,
-0.4076446295,
-0.0208896697,
-0.2762921453,
-0.0257768519,
-0.0961908773,
-0.2987640202,
-0.0198849328,
0.1916415989,
-0.1431707889,
0.0142277144,
-0.0001216084,
-0.1673363298,
0.1038814783,
0.0274555422,
0.4854634404,
-0.0634694993,
-0.1909932196,
-0.1595242172,
-0.0006296225,
-0.0392893553,
-0.0618138909,
0.154068768,
-0.1610925496,
-0.0124186464,
-0.0185572021,
-0.2299518287,
0.0444079824,
-0.329654634,
0.1573792994,
0.2143021971,
0.2089239061,
-0.0216311999,
-0.3265134096,
0.000211224,
0.003243871,
0.1196157262,
0.2825598717,
-0.1058223993,
0.0820925832,
0.1894636154,
-0.0195171945,
-0.0718134046,
-0.108203128,
0.2400289476,
0.0303458869,
-0.1075600982,
0.0023844894,
-0.037465468,
-0.0143929422,
0.348585099,
0.1381257474,
0.1901236922,
-0.0317514949,
-0.0102057159,
0.3290893435,
0.0324434415,
-0.0629226714,
-0.3029327691,
0.1396772265,
-0.1079891473,
-0.0974478796,
0.3520597219,
0.0270169824,
-0.2138871849,
0.0861032456,
0.1473429352,
0.4955664575,
-0.2976684868,
0.3628250062,
0.1930972934,
0.2126585394,
0.1036960334,
0.2905106843,
0.3293462098,
0.2367108911,
0.5512294173,
-0.03360641,
0.155339241,
0.2877412438,
0.0097719599,
-0.206942305,
-0.399399817,
-0.4862812757,
0.2589113116,
-0.2133094072,
0.2273600698,
-0.133609429,
0.1467942297,
-0.0414487161,
-0.6776142716,
-0.3064133525,
-0.0712348968,
-0.2433966696,
-0.3478884697,
0.2802799642,
-0.0567441955,
0.2844325304,
0.2872739136,
0.0796921849,
-0.2331490964,
0.4815824032,
-0.0546669476,
-0.0180180296,
0.1753603965,
0.0876789689,
0.2863029838,
0.1103289723,
-0.1547989249,
0.2614772618,
-0.0174217448,
-0.1297915578,
0.0276955441,
0.1919708401,
0.2432420552,
0.1001451463,
-0.042350471,
0.2072943449,
0.0817163214,
0.1787056923,
-0.3429945111,
0.1529133767,
-0.1525604129,
0.0753109008,
0.0337522514,
-0.0319901332,
0.1195743605,
0.2038128376,
-0.1108589694,
0.2348308116,
-0.4639111161,
-0.0497004278,
-0.2446760684,
0.076530531,
-0.2179709673,
0.2800678611,
-0.2816491723,
0.1942258179,
0.5648449063,
-0.0442582294,
0.3497542739,
0.1905335486,
-0.0117879733,
-0.0112691252,
0.7627524734,
0.1087862402,
-0.3031584918,
-0.3050417304,
0.0308542997,
-0.4886029959,
0.0807436332,
-0.3152812719,
0.2396725714,
-0.2080786079,
0.1056506857,
0.0669879615,
-0.0189327039,
-0.0772992969,
-0.0975535586,
0.0512744263,
0.0465319902,
-0.3450728059,
-0.0946511179,
0.1758096218,
0.228064701,
0.0866626874,
-0.3995474279,
0.2115195841,
0.1642516553,
-0.1586642265,
0.4196973443,
0.1869820058,
-0.4918374419,
0.2579592466,
-0.1285670847,
0.1905246079,
0.1110506654,
0.2345271707,
0.0312416479,
-0.4896030128,
-0.0348943397,
-0.2327325344,
-0.0441683158,
-0.1201230809,
0.2055237442,
-0.5847110748,
0.0387656428,
-0.3769590259,
0.2036790103,
0.3197948337,
-0.1638125777,
0.0926558375,
-0.0125316381,
0.1860570312,
0.0903332233,
0.4170556068,
0.4198198318,
-0.0685716346,
0.0642156452,
-0.3439030945,
0.1352638006,
0.2230734825,
-0.3471211791,
-0.360099256,
0.2570812106,
0.3946215212,
0.5234395266,
-0.3522132933,
-0.3459507227,
0.1152447462,
0.0333079696,
0.0821379349,
-0.14483805,
0.20114398,
-0.2863763869,
-0.2533283532,
0.1424972862,
0.3100413978,
0.3002066612,
-0.1675546765,
0.2714890242,
-0.3209956884
] |
https://github.com/huggingface/datasets/issues/2591 | Cached dataset overflowing disk space | Hi @BirgerMoell.
You have several options:
- to set caching to be stored on a different path location, other than the default one (`~/.cache/huggingface/datasets`):
- either setting the environment variable `HF_DATASETS_CACHE` with the path to the new cache location
- or by passing it with the parameter `cache_dir` when loading each of the datasets: `dataset = load_dataset(..., cache_dir=your_new_location)`
You can get all the information in the docs: https://huggingface.co/docs/datasets/loading_datasets.html#cache-directory
- I wouldn't recommend disabling caching, because current implementation generates cache files anyway, although in a temporary directory and they are deleted when the session closes. See details here: https://huggingface.co/docs/datasets/processing.html#enable-or-disable-caching
- You could alternatively load the datasets in streaming mode. This is a new feature which allows loading the datasets without downloading the entire files. More information here: https://huggingface.co/docs/datasets/dataset_streaming.html | I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
| 127 | Cached dataset overflowing disk space
I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
Hi @BirgerMoell.
You have several options:
- to set caching to be stored on a different path location, other than the default one (`~/.cache/huggingface/datasets`):
- either setting the environment variable `HF_DATASETS_CACHE` with the path to the new cache location
- or by passing it with the parameter `cache_dir` when loading each of the datasets: `dataset = load_dataset(..., cache_dir=your_new_location)`
You can get all the information in the docs: https://huggingface.co/docs/datasets/loading_datasets.html#cache-directory
- I wouldn't recommend disabling caching, because current implementation generates cache files anyway, although in a temporary directory and they are deleted when the session closes. See details here: https://huggingface.co/docs/datasets/processing.html#enable-or-disable-caching
- You could alternatively load the datasets in streaming mode. This is a new feature which allows loading the datasets without downloading the entire files. More information here: https://huggingface.co/docs/datasets/dataset_streaming.html | [
0.0375591516,
-0.4222128391,
0.0985902846,
0.4514760971,
0.1011741981,
0.205056265,
0.074486047,
0.1419045627,
0.144528836,
0.0556367561,
0.4010794163,
-0.2280426919,
-0.1242992729,
0.1127195805,
0.1466888636,
0.0686898679,
0.2591464221,
-0.2458593696,
-0.0610487983,
0.1060897261,
-0.1954932362,
0.2656944394,
0.0236383229,
-0.1252899617,
-0.2641810477,
-0.1312527061,
0.1114908755,
0.0915549099,
0.1169937104,
-0.221520856,
0.6455172896,
-0.0375429988,
0.2969842553,
0.3342038393,
-0.0001271115,
-0.2188407481,
0.0915406495,
-0.1815932244,
-0.0922587216,
0.550489068,
0.1914407909,
-0.3445687294,
-0.052295398,
0.0128890127,
-0.1940166056,
0.1352999657,
-0.0969077423,
-0.4302129745,
0.2448512912,
0.0724847019,
0.0480298549,
-0.0077623464,
-0.1181682199,
0.170801118,
-0.1092362851,
-0.004405586,
-0.2483727634,
0.1998683214,
0.2498452067,
-0.1698943377,
-0.1137219518,
0.5557485819,
-0.0590145811,
-0.0844291747,
0.5253403187,
0.0833816081,
-0.35629794,
-0.1106624082,
0.3813788295,
-0.0801355243,
0.3144634962,
-0.4211864769,
-0.0359758921,
-0.5416687131,
0.1242919117,
-0.4084815383,
0.4917798638,
0.1439298987,
-0.3081751168,
0.2055081278,
-0.2643952966,
-0.4621686935,
-0.2639661431,
-0.1211517155,
-0.0510150082,
-0.1692600697,
-0.1779299676,
0.0038871057,
0.498188585,
-0.1243524402,
-0.0180545337,
-0.1148283929,
-0.1485928297,
0.166488573,
-0.4704053998,
-0.1601628065,
-0.1597560942,
0.4838790596,
0.1778157949,
0.0343688615,
0.0580156073,
-0.2219773233,
0.0135493502,
-0.0545081086,
0.0384911858,
0.6338204145,
-0.430200845,
0.1479857713,
0.0260616839,
-0.1004756093,
-0.0664960295,
-0.0840655714,
-0.0061185434,
-0.388866663,
0.2431182265,
-0.3094466031,
0.0366064012,
-0.266004324,
-0.1329784393,
0.109599866,
0.1877570152,
0.1407827437,
0.2514515519,
0.3864439428,
0.182106033,
0.3051150441,
-0.3228459954,
0.2218101323,
-0.2443424165,
-0.1192896813,
-0.0440738276,
-0.0846641511,
0.0494984239,
0.3295778632,
0.3280157149,
-0.1158239543,
-0.0438293591,
-0.16687271,
0.2368198484,
-0.0264208987,
0.0309989303,
-0.2585932016,
0.2868453264,
0.1123237014,
-0.3598536551,
0.2251691371,
0.2425775826,
0.3989655972,
-0.2411044836,
0.1247826517,
-0.355045557,
-0.2518388033,
0.148078844,
-0.0142697021,
-0.1831807792,
-0.0969635919,
-0.4297462404,
0.2190827727,
0.4013516307,
-0.2894100547,
0.0460614376,
0.0167299155,
-0.4555118084,
-0.12716721,
0.2183410227,
0.3905502558,
-0.1844457388,
-0.0037564933,
0.0871428549,
0.4355637729,
0.0485230125,
0.623354435,
-0.1413374245,
0.0224385783,
-0.3221299648,
-0.2130480409,
-0.0346538052,
-0.5695790648,
-0.7795042396,
0.0159559324,
0.0507360846,
0.2829304636,
0.346426338,
0.1854579896,
0.0370457098,
-0.1173866093,
-0.1299518645,
0.2160577923,
-0.0045058476,
-0.0558643341,
-0.3231565952,
-0.5304923058,
0.285346359,
-0.1147802323,
0.046649985,
0.100603804,
-0.2822224498,
0.0011680499,
0.1973251104,
-0.0316380821,
0.2541678846,
0.3844375014,
0.293066293,
-0.3115617037,
-0.0663590133,
0.0042587295,
-0.4575059414,
0.195095256,
0.1783737838,
-0.3753207326,
0.124583602,
-0.1003919691,
0.0144068375,
-0.2264461815,
-0.133951813,
-0.2168266624,
-0.1374632269,
-0.0339444652,
0.4003780186,
-0.1763289422,
-0.2991104424,
0.3400561213,
0.0025759861,
-0.0406325534,
-0.325986594,
-0.0154326856,
0.1447564363,
-0.0170681719,
-0.2598407567,
0.1888254285,
0.0648190975,
-0.0355281308,
0.0368640982,
0.233570382,
0.02266692,
0.3187165558,
0.3493317664,
0.3796353936,
0.2128700465,
-0.0915225521,
0.2820822895,
0.2902055681,
-0.0620260872,
0.0524617434,
-0.3751505911,
0.2003804296,
0.0710655302,
0.195061937,
-0.1139812246,
-0.2368826717,
0.2514108717,
0.1360598058,
0.0944544747,
-0.1216270626,
0.2244891524,
0.0017586034,
0.3925086856,
0.0476583466,
-0.041611217,
0.2306888402,
0.3817817271,
0.2312815189,
0.0795114785,
0.3927399814,
-0.1257767826,
-0.2583569884,
0.10781537,
0.3400514126,
0.5201388001,
0.1659973264,
0.1927117258,
-0.0825792179,
0.0334073119,
-0.0248671174,
0.1405937821,
-0.2922540009,
-0.1662438661,
0.0999910086,
0.1785676926,
-0.170333758,
-0.115101099,
0.2065088749,
-0.0072104894,
0.0374705195,
-0.1230289713,
0.2915501595,
-0.0051884651,
0.0669605136,
-0.3004221022,
0.2018046528,
-0.4009775519,
-0.0063933656,
0.1357571781,
0.5235959291,
0.0959124416,
0.0231753774,
-0.1968864352,
0.7337743044,
-0.0781154856,
-0.2568982542,
0.0806486607,
-0.0120088309,
-0.1814782768,
-0.1487003118,
0.309396714,
-0.5017923713,
0.0971777663,
0.1724738479,
-0.0851733685,
-0.29793787,
0.1057202369,
-0.07112813,
0.1724737585,
0.0262167063,
-0.3023269773,
0.317168653,
0.0086359903,
-0.0908929035,
-0.0860919803,
-0.1090200394,
-0.0805501416,
-0.1161439866,
0.0500084497,
0.4038140178,
0.1403172314,
0.0388042144,
-0.2606482804,
-0.2303477675,
0.2758385539,
-0.153694123,
-0.0432944894,
0.0811395571,
0.0112991631,
-0.1315150559,
-0.1234190017,
-0.2881758809,
-0.2525758147,
-0.76704216,
0.3175763488,
0.065981023,
-0.0736875683,
0.1482878476,
0.2214991152,
0.35197258,
0.1975898445,
-0.5262953639,
-0.108043626,
-0.1927303225,
0.2778543234,
-0.204267472,
-0.2437516153,
0.3360222876,
-0.1253869087,
0.1910074055,
0.0439110994,
-0.1972727925,
0.2947357595,
0.2608200908,
0.3492497802,
-0.075724557,
-0.0599260479,
0.0863767788,
0.9180578589,
0.0366468132,
0.1179879755,
0.2343272567,
0.2871669531,
0.448636055,
-0.1861971915,
-0.246479243,
0.0511525236,
-0.1345723718,
-0.2713451982,
0.1046251208,
0.3082743585,
0.146626085,
0.1631295383,
-0.0689218044,
0.2187522948,
-0.2138774544,
0.3311524987,
-0.1401930749,
0.3264654577,
0.0280977711,
0.0892386287,
-0.3383798003,
-0.2278051525,
0.0030131079,
0.1278016567,
0.3850556612,
0.2612067163,
-0.2789202332,
-0.2433245033,
-0.4827177227,
0.1956559867,
-0.0384939611,
0.0403399989,
-0.3785454035,
-0.2253634483,
0.1297895163,
0.0203344896,
0.9234861135,
0.0464556366,
0.1821257472,
-0.2568493187,
-0.0968072116,
-0.0758297145,
0.0022399873,
0.2907461822,
-0.2174906731,
-0.1467928737,
0.4098928869,
0.0378759503,
-0.0872069448,
-0.3201646507,
0.3639973402,
-0.4575735331,
0.0065996796,
-0.2253907621,
-0.0537637547,
-0.0625001639,
0.1516192853,
0.1337887645,
0.1230590791,
0.0934423655,
0.1320100725,
-0.1702726334,
-0.0427673012,
-0.0555934235,
0.0200952329,
0.5271495581,
0.1192735434,
0.0408747867,
0.2363301516,
0.2522955239,
0.1998600215,
0.2740612626,
0.0932862237,
-0.0258029252,
-0.0214493945,
0.0511360206,
0.1186632365,
0.4327246845,
-0.2288735211,
0.2974845767,
0.099958986,
0.1264849454,
-0.764298737,
0.0768657997,
0.2269201726,
0.3894958198,
-0.0471373387,
-0.3855695128,
0.3176099062,
0.0167662427,
-0.0140858144,
0.2437089086,
0.1186744571,
-0.5224872828,
0.0029736832,
0.0166977774,
1.0220948458,
-0.0052736141,
0.5250900984,
0.0106057227,
0.0838321894,
0.4028090835,
-0.5466377735,
0.3585669398,
0.0577717572,
-0.255886972,
-0.0354823545,
0.0891322345,
-0.0084904488,
-0.0728913769,
-0.1517246962,
0.3895682991,
-0.094648473,
0.2141801268,
-0.4183893204,
-0.0863081068,
-0.0117627587,
-0.2253906727,
-0.5132775307,
0.054548759,
-0.2742120326,
0.1035264954,
-0.0508341268,
0.0319063962,
0.1635921448,
-0.0210021883,
-0.3381101489,
-0.2094534934,
-0.2528521717,
-0.0258972496,
-0.0363922976,
-0.3285660744,
-0.016561415,
0.2719002068,
0.3318611085,
0.0905137584,
-0.3641144931,
0.1196019351,
-0.1798488498,
0.062812008,
-0.2151514292,
-0.0983469337,
-0.1674997807,
-0.0548017211,
0.017499283,
0.0707683712,
0.0337857716,
-0.4108782411,
0.0175113827,
0.0322571211,
-0.1330733001,
-0.0900964588,
-0.2087692171,
0.1424432695,
0.0319384262,
-0.0690166429,
0.0454460755,
0.2176924348,
-0.3402987421,
0.1204394177,
-0.2136465162,
-0.2409315407,
-0.0380487479,
0.4774671197,
0.0289596841,
-0.2921250165,
0.5220631361,
-0.0114155412,
0.0539455265,
-0.1883496046,
0.1402014792,
0.1701514423,
-0.1835627258,
-0.0535126776,
0.0281142816,
-0.2855755091,
-0.205735445,
-0.2029028833,
0.4924883246,
-0.2519823313,
-0.3050519824,
-0.1449884027,
-0.4076446295,
-0.0208896697,
-0.2762921453,
-0.0257768519,
-0.0961908773,
-0.2987640202,
-0.0198849328,
0.1916415989,
-0.1431707889,
0.0142277144,
-0.0001216084,
-0.1673363298,
0.1038814783,
0.0274555422,
0.4854634404,
-0.0634694993,
-0.1909932196,
-0.1595242172,
-0.0006296225,
-0.0392893553,
-0.0618138909,
0.154068768,
-0.1610925496,
-0.0124186464,
-0.0185572021,
-0.2299518287,
0.0444079824,
-0.329654634,
0.1573792994,
0.2143021971,
0.2089239061,
-0.0216311999,
-0.3265134096,
0.000211224,
0.003243871,
0.1196157262,
0.2825598717,
-0.1058223993,
0.0820925832,
0.1894636154,
-0.0195171945,
-0.0718134046,
-0.108203128,
0.2400289476,
0.0303458869,
-0.1075600982,
0.0023844894,
-0.037465468,
-0.0143929422,
0.348585099,
0.1381257474,
0.1901236922,
-0.0317514949,
-0.0102057159,
0.3290893435,
0.0324434415,
-0.0629226714,
-0.3029327691,
0.1396772265,
-0.1079891473,
-0.0974478796,
0.3520597219,
0.0270169824,
-0.2138871849,
0.0861032456,
0.1473429352,
0.4955664575,
-0.2976684868,
0.3628250062,
0.1930972934,
0.2126585394,
0.1036960334,
0.2905106843,
0.3293462098,
0.2367108911,
0.5512294173,
-0.03360641,
0.155339241,
0.2877412438,
0.0097719599,
-0.206942305,
-0.399399817,
-0.4862812757,
0.2589113116,
-0.2133094072,
0.2273600698,
-0.133609429,
0.1467942297,
-0.0414487161,
-0.6776142716,
-0.3064133525,
-0.0712348968,
-0.2433966696,
-0.3478884697,
0.2802799642,
-0.0567441955,
0.2844325304,
0.2872739136,
0.0796921849,
-0.2331490964,
0.4815824032,
-0.0546669476,
-0.0180180296,
0.1753603965,
0.0876789689,
0.2863029838,
0.1103289723,
-0.1547989249,
0.2614772618,
-0.0174217448,
-0.1297915578,
0.0276955441,
0.1919708401,
0.2432420552,
0.1001451463,
-0.042350471,
0.2072943449,
0.0817163214,
0.1787056923,
-0.3429945111,
0.1529133767,
-0.1525604129,
0.0753109008,
0.0337522514,
-0.0319901332,
0.1195743605,
0.2038128376,
-0.1108589694,
0.2348308116,
-0.4639111161,
-0.0497004278,
-0.2446760684,
0.076530531,
-0.2179709673,
0.2800678611,
-0.2816491723,
0.1942258179,
0.5648449063,
-0.0442582294,
0.3497542739,
0.1905335486,
-0.0117879733,
-0.0112691252,
0.7627524734,
0.1087862402,
-0.3031584918,
-0.3050417304,
0.0308542997,
-0.4886029959,
0.0807436332,
-0.3152812719,
0.2396725714,
-0.2080786079,
0.1056506857,
0.0669879615,
-0.0189327039,
-0.0772992969,
-0.0975535586,
0.0512744263,
0.0465319902,
-0.3450728059,
-0.0946511179,
0.1758096218,
0.228064701,
0.0866626874,
-0.3995474279,
0.2115195841,
0.1642516553,
-0.1586642265,
0.4196973443,
0.1869820058,
-0.4918374419,
0.2579592466,
-0.1285670847,
0.1905246079,
0.1110506654,
0.2345271707,
0.0312416479,
-0.4896030128,
-0.0348943397,
-0.2327325344,
-0.0441683158,
-0.1201230809,
0.2055237442,
-0.5847110748,
0.0387656428,
-0.3769590259,
0.2036790103,
0.3197948337,
-0.1638125777,
0.0926558375,
-0.0125316381,
0.1860570312,
0.0903332233,
0.4170556068,
0.4198198318,
-0.0685716346,
0.0642156452,
-0.3439030945,
0.1352638006,
0.2230734825,
-0.3471211791,
-0.360099256,
0.2570812106,
0.3946215212,
0.5234395266,
-0.3522132933,
-0.3459507227,
0.1152447462,
0.0333079696,
0.0821379349,
-0.14483805,
0.20114398,
-0.2863763869,
-0.2533283532,
0.1424972862,
0.3100413978,
0.3002066612,
-0.1675546765,
0.2714890242,
-0.3209956884
] |
https://github.com/huggingface/datasets/issues/2591 | Cached dataset overflowing disk space | Hi @BirgerMoell,
We are planning to add a new feature to datasets, which could be interesting in your case: Add the option to delete temporary files (decompressed files) from the cache directory (see: #2481, #2604).
We will ping you once this feature is implemented, so that the size of your cache directory will be considerably reduced. | I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
| 56 | Cached dataset overflowing disk space
I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
Hi @BirgerMoell,
We are planning to add a new feature to datasets, which could be interesting in your case: Add the option to delete temporary files (decompressed files) from the cache directory (see: #2481, #2604).
We will ping you once this feature is implemented, so that the size of your cache directory will be considerably reduced. | [
0.0375591516,
-0.4222128391,
0.0985902846,
0.4514760971,
0.1011741981,
0.205056265,
0.074486047,
0.1419045627,
0.144528836,
0.0556367561,
0.4010794163,
-0.2280426919,
-0.1242992729,
0.1127195805,
0.1466888636,
0.0686898679,
0.2591464221,
-0.2458593696,
-0.0610487983,
0.1060897261,
-0.1954932362,
0.2656944394,
0.0236383229,
-0.1252899617,
-0.2641810477,
-0.1312527061,
0.1114908755,
0.0915549099,
0.1169937104,
-0.221520856,
0.6455172896,
-0.0375429988,
0.2969842553,
0.3342038393,
-0.0001271115,
-0.2188407481,
0.0915406495,
-0.1815932244,
-0.0922587216,
0.550489068,
0.1914407909,
-0.3445687294,
-0.052295398,
0.0128890127,
-0.1940166056,
0.1352999657,
-0.0969077423,
-0.4302129745,
0.2448512912,
0.0724847019,
0.0480298549,
-0.0077623464,
-0.1181682199,
0.170801118,
-0.1092362851,
-0.004405586,
-0.2483727634,
0.1998683214,
0.2498452067,
-0.1698943377,
-0.1137219518,
0.5557485819,
-0.0590145811,
-0.0844291747,
0.5253403187,
0.0833816081,
-0.35629794,
-0.1106624082,
0.3813788295,
-0.0801355243,
0.3144634962,
-0.4211864769,
-0.0359758921,
-0.5416687131,
0.1242919117,
-0.4084815383,
0.4917798638,
0.1439298987,
-0.3081751168,
0.2055081278,
-0.2643952966,
-0.4621686935,
-0.2639661431,
-0.1211517155,
-0.0510150082,
-0.1692600697,
-0.1779299676,
0.0038871057,
0.498188585,
-0.1243524402,
-0.0180545337,
-0.1148283929,
-0.1485928297,
0.166488573,
-0.4704053998,
-0.1601628065,
-0.1597560942,
0.4838790596,
0.1778157949,
0.0343688615,
0.0580156073,
-0.2219773233,
0.0135493502,
-0.0545081086,
0.0384911858,
0.6338204145,
-0.430200845,
0.1479857713,
0.0260616839,
-0.1004756093,
-0.0664960295,
-0.0840655714,
-0.0061185434,
-0.388866663,
0.2431182265,
-0.3094466031,
0.0366064012,
-0.266004324,
-0.1329784393,
0.109599866,
0.1877570152,
0.1407827437,
0.2514515519,
0.3864439428,
0.182106033,
0.3051150441,
-0.3228459954,
0.2218101323,
-0.2443424165,
-0.1192896813,
-0.0440738276,
-0.0846641511,
0.0494984239,
0.3295778632,
0.3280157149,
-0.1158239543,
-0.0438293591,
-0.16687271,
0.2368198484,
-0.0264208987,
0.0309989303,
-0.2585932016,
0.2868453264,
0.1123237014,
-0.3598536551,
0.2251691371,
0.2425775826,
0.3989655972,
-0.2411044836,
0.1247826517,
-0.355045557,
-0.2518388033,
0.148078844,
-0.0142697021,
-0.1831807792,
-0.0969635919,
-0.4297462404,
0.2190827727,
0.4013516307,
-0.2894100547,
0.0460614376,
0.0167299155,
-0.4555118084,
-0.12716721,
0.2183410227,
0.3905502558,
-0.1844457388,
-0.0037564933,
0.0871428549,
0.4355637729,
0.0485230125,
0.623354435,
-0.1413374245,
0.0224385783,
-0.3221299648,
-0.2130480409,
-0.0346538052,
-0.5695790648,
-0.7795042396,
0.0159559324,
0.0507360846,
0.2829304636,
0.346426338,
0.1854579896,
0.0370457098,
-0.1173866093,
-0.1299518645,
0.2160577923,
-0.0045058476,
-0.0558643341,
-0.3231565952,
-0.5304923058,
0.285346359,
-0.1147802323,
0.046649985,
0.100603804,
-0.2822224498,
0.0011680499,
0.1973251104,
-0.0316380821,
0.2541678846,
0.3844375014,
0.293066293,
-0.3115617037,
-0.0663590133,
0.0042587295,
-0.4575059414,
0.195095256,
0.1783737838,
-0.3753207326,
0.124583602,
-0.1003919691,
0.0144068375,
-0.2264461815,
-0.133951813,
-0.2168266624,
-0.1374632269,
-0.0339444652,
0.4003780186,
-0.1763289422,
-0.2991104424,
0.3400561213,
0.0025759861,
-0.0406325534,
-0.325986594,
-0.0154326856,
0.1447564363,
-0.0170681719,
-0.2598407567,
0.1888254285,
0.0648190975,
-0.0355281308,
0.0368640982,
0.233570382,
0.02266692,
0.3187165558,
0.3493317664,
0.3796353936,
0.2128700465,
-0.0915225521,
0.2820822895,
0.2902055681,
-0.0620260872,
0.0524617434,
-0.3751505911,
0.2003804296,
0.0710655302,
0.195061937,
-0.1139812246,
-0.2368826717,
0.2514108717,
0.1360598058,
0.0944544747,
-0.1216270626,
0.2244891524,
0.0017586034,
0.3925086856,
0.0476583466,
-0.041611217,
0.2306888402,
0.3817817271,
0.2312815189,
0.0795114785,
0.3927399814,
-0.1257767826,
-0.2583569884,
0.10781537,
0.3400514126,
0.5201388001,
0.1659973264,
0.1927117258,
-0.0825792179,
0.0334073119,
-0.0248671174,
0.1405937821,
-0.2922540009,
-0.1662438661,
0.0999910086,
0.1785676926,
-0.170333758,
-0.115101099,
0.2065088749,
-0.0072104894,
0.0374705195,
-0.1230289713,
0.2915501595,
-0.0051884651,
0.0669605136,
-0.3004221022,
0.2018046528,
-0.4009775519,
-0.0063933656,
0.1357571781,
0.5235959291,
0.0959124416,
0.0231753774,
-0.1968864352,
0.7337743044,
-0.0781154856,
-0.2568982542,
0.0806486607,
-0.0120088309,
-0.1814782768,
-0.1487003118,
0.309396714,
-0.5017923713,
0.0971777663,
0.1724738479,
-0.0851733685,
-0.29793787,
0.1057202369,
-0.07112813,
0.1724737585,
0.0262167063,
-0.3023269773,
0.317168653,
0.0086359903,
-0.0908929035,
-0.0860919803,
-0.1090200394,
-0.0805501416,
-0.1161439866,
0.0500084497,
0.4038140178,
0.1403172314,
0.0388042144,
-0.2606482804,
-0.2303477675,
0.2758385539,
-0.153694123,
-0.0432944894,
0.0811395571,
0.0112991631,
-0.1315150559,
-0.1234190017,
-0.2881758809,
-0.2525758147,
-0.76704216,
0.3175763488,
0.065981023,
-0.0736875683,
0.1482878476,
0.2214991152,
0.35197258,
0.1975898445,
-0.5262953639,
-0.108043626,
-0.1927303225,
0.2778543234,
-0.204267472,
-0.2437516153,
0.3360222876,
-0.1253869087,
0.1910074055,
0.0439110994,
-0.1972727925,
0.2947357595,
0.2608200908,
0.3492497802,
-0.075724557,
-0.0599260479,
0.0863767788,
0.9180578589,
0.0366468132,
0.1179879755,
0.2343272567,
0.2871669531,
0.448636055,
-0.1861971915,
-0.246479243,
0.0511525236,
-0.1345723718,
-0.2713451982,
0.1046251208,
0.3082743585,
0.146626085,
0.1631295383,
-0.0689218044,
0.2187522948,
-0.2138774544,
0.3311524987,
-0.1401930749,
0.3264654577,
0.0280977711,
0.0892386287,
-0.3383798003,
-0.2278051525,
0.0030131079,
0.1278016567,
0.3850556612,
0.2612067163,
-0.2789202332,
-0.2433245033,
-0.4827177227,
0.1956559867,
-0.0384939611,
0.0403399989,
-0.3785454035,
-0.2253634483,
0.1297895163,
0.0203344896,
0.9234861135,
0.0464556366,
0.1821257472,
-0.2568493187,
-0.0968072116,
-0.0758297145,
0.0022399873,
0.2907461822,
-0.2174906731,
-0.1467928737,
0.4098928869,
0.0378759503,
-0.0872069448,
-0.3201646507,
0.3639973402,
-0.4575735331,
0.0065996796,
-0.2253907621,
-0.0537637547,
-0.0625001639,
0.1516192853,
0.1337887645,
0.1230590791,
0.0934423655,
0.1320100725,
-0.1702726334,
-0.0427673012,
-0.0555934235,
0.0200952329,
0.5271495581,
0.1192735434,
0.0408747867,
0.2363301516,
0.2522955239,
0.1998600215,
0.2740612626,
0.0932862237,
-0.0258029252,
-0.0214493945,
0.0511360206,
0.1186632365,
0.4327246845,
-0.2288735211,
0.2974845767,
0.099958986,
0.1264849454,
-0.764298737,
0.0768657997,
0.2269201726,
0.3894958198,
-0.0471373387,
-0.3855695128,
0.3176099062,
0.0167662427,
-0.0140858144,
0.2437089086,
0.1186744571,
-0.5224872828,
0.0029736832,
0.0166977774,
1.0220948458,
-0.0052736141,
0.5250900984,
0.0106057227,
0.0838321894,
0.4028090835,
-0.5466377735,
0.3585669398,
0.0577717572,
-0.255886972,
-0.0354823545,
0.0891322345,
-0.0084904488,
-0.0728913769,
-0.1517246962,
0.3895682991,
-0.094648473,
0.2141801268,
-0.4183893204,
-0.0863081068,
-0.0117627587,
-0.2253906727,
-0.5132775307,
0.054548759,
-0.2742120326,
0.1035264954,
-0.0508341268,
0.0319063962,
0.1635921448,
-0.0210021883,
-0.3381101489,
-0.2094534934,
-0.2528521717,
-0.0258972496,
-0.0363922976,
-0.3285660744,
-0.016561415,
0.2719002068,
0.3318611085,
0.0905137584,
-0.3641144931,
0.1196019351,
-0.1798488498,
0.062812008,
-0.2151514292,
-0.0983469337,
-0.1674997807,
-0.0548017211,
0.017499283,
0.0707683712,
0.0337857716,
-0.4108782411,
0.0175113827,
0.0322571211,
-0.1330733001,
-0.0900964588,
-0.2087692171,
0.1424432695,
0.0319384262,
-0.0690166429,
0.0454460755,
0.2176924348,
-0.3402987421,
0.1204394177,
-0.2136465162,
-0.2409315407,
-0.0380487479,
0.4774671197,
0.0289596841,
-0.2921250165,
0.5220631361,
-0.0114155412,
0.0539455265,
-0.1883496046,
0.1402014792,
0.1701514423,
-0.1835627258,
-0.0535126776,
0.0281142816,
-0.2855755091,
-0.205735445,
-0.2029028833,
0.4924883246,
-0.2519823313,
-0.3050519824,
-0.1449884027,
-0.4076446295,
-0.0208896697,
-0.2762921453,
-0.0257768519,
-0.0961908773,
-0.2987640202,
-0.0198849328,
0.1916415989,
-0.1431707889,
0.0142277144,
-0.0001216084,
-0.1673363298,
0.1038814783,
0.0274555422,
0.4854634404,
-0.0634694993,
-0.1909932196,
-0.1595242172,
-0.0006296225,
-0.0392893553,
-0.0618138909,
0.154068768,
-0.1610925496,
-0.0124186464,
-0.0185572021,
-0.2299518287,
0.0444079824,
-0.329654634,
0.1573792994,
0.2143021971,
0.2089239061,
-0.0216311999,
-0.3265134096,
0.000211224,
0.003243871,
0.1196157262,
0.2825598717,
-0.1058223993,
0.0820925832,
0.1894636154,
-0.0195171945,
-0.0718134046,
-0.108203128,
0.2400289476,
0.0303458869,
-0.1075600982,
0.0023844894,
-0.037465468,
-0.0143929422,
0.348585099,
0.1381257474,
0.1901236922,
-0.0317514949,
-0.0102057159,
0.3290893435,
0.0324434415,
-0.0629226714,
-0.3029327691,
0.1396772265,
-0.1079891473,
-0.0974478796,
0.3520597219,
0.0270169824,
-0.2138871849,
0.0861032456,
0.1473429352,
0.4955664575,
-0.2976684868,
0.3628250062,
0.1930972934,
0.2126585394,
0.1036960334,
0.2905106843,
0.3293462098,
0.2367108911,
0.5512294173,
-0.03360641,
0.155339241,
0.2877412438,
0.0097719599,
-0.206942305,
-0.399399817,
-0.4862812757,
0.2589113116,
-0.2133094072,
0.2273600698,
-0.133609429,
0.1467942297,
-0.0414487161,
-0.6776142716,
-0.3064133525,
-0.0712348968,
-0.2433966696,
-0.3478884697,
0.2802799642,
-0.0567441955,
0.2844325304,
0.2872739136,
0.0796921849,
-0.2331490964,
0.4815824032,
-0.0546669476,
-0.0180180296,
0.1753603965,
0.0876789689,
0.2863029838,
0.1103289723,
-0.1547989249,
0.2614772618,
-0.0174217448,
-0.1297915578,
0.0276955441,
0.1919708401,
0.2432420552,
0.1001451463,
-0.042350471,
0.2072943449,
0.0817163214,
0.1787056923,
-0.3429945111,
0.1529133767,
-0.1525604129,
0.0753109008,
0.0337522514,
-0.0319901332,
0.1195743605,
0.2038128376,
-0.1108589694,
0.2348308116,
-0.4639111161,
-0.0497004278,
-0.2446760684,
0.076530531,
-0.2179709673,
0.2800678611,
-0.2816491723,
0.1942258179,
0.5648449063,
-0.0442582294,
0.3497542739,
0.1905335486,
-0.0117879733,
-0.0112691252,
0.7627524734,
0.1087862402,
-0.3031584918,
-0.3050417304,
0.0308542997,
-0.4886029959,
0.0807436332,
-0.3152812719,
0.2396725714,
-0.2080786079,
0.1056506857,
0.0669879615,
-0.0189327039,
-0.0772992969,
-0.0975535586,
0.0512744263,
0.0465319902,
-0.3450728059,
-0.0946511179,
0.1758096218,
0.228064701,
0.0866626874,
-0.3995474279,
0.2115195841,
0.1642516553,
-0.1586642265,
0.4196973443,
0.1869820058,
-0.4918374419,
0.2579592466,
-0.1285670847,
0.1905246079,
0.1110506654,
0.2345271707,
0.0312416479,
-0.4896030128,
-0.0348943397,
-0.2327325344,
-0.0441683158,
-0.1201230809,
0.2055237442,
-0.5847110748,
0.0387656428,
-0.3769590259,
0.2036790103,
0.3197948337,
-0.1638125777,
0.0926558375,
-0.0125316381,
0.1860570312,
0.0903332233,
0.4170556068,
0.4198198318,
-0.0685716346,
0.0642156452,
-0.3439030945,
0.1352638006,
0.2230734825,
-0.3471211791,
-0.360099256,
0.2570812106,
0.3946215212,
0.5234395266,
-0.3522132933,
-0.3459507227,
0.1152447462,
0.0333079696,
0.0821379349,
-0.14483805,
0.20114398,
-0.2863763869,
-0.2533283532,
0.1424972862,
0.3100413978,
0.3002066612,
-0.1675546765,
0.2714890242,
-0.3209956884
] |
https://github.com/huggingface/datasets/issues/2585 | sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index | Hi @mmajurski, thanks for reporting this issue.
Indeed this misalignment arises because the source dataset context field contains leading blank spaces (and these are counted within the answer_start), while our datasets loading script removes these leading blank spaces.
I'm going to fix our script so that all leading blank spaces in the source dataset are kept, and there is no misalignment between the answer text and the answer_start within the context. | ## Describe the bug
The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start'].
For example:
id = '56d1f453e7d4791d009025bd'
answers = {'text': ['Pure Land'], 'answer_start': [146]}
However the actual text in context at location 146 is 'ure Land,'
Which is an off-by-one error from the correct answer.
## Steps to reproduce the bug
```python
import datasets
def check_context_answer_alignment(example):
for a_idx in range(len(example['answers']['text'])):
# check raw dataset for answer consistency between context and answer
answer_text = example['answers']['text'][a_idx]
a_st_idx = example['answers']['answer_start'][a_idx]
a_end_idx = a_st_idx + len(example['answers']['text'][a_idx])
answer_text_from_context = example['context'][a_st_idx:a_end_idx]
if answer_text != answer_text_from_context:
#print(example['id'])
return False
return True
dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True)
start_len = len(dataset)
dataset = dataset.filter(check_context_answer_alignment,
num_proc=1,
keep_in_memory=True)
end_len = len(dataset)
print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len))
```
## Expected results
This code should result in 0 rows being filtered out from the dataset.
## Actual results
This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location.
This code will reproduce the problem and produce the following count:
"258 instances contain mis-alignment between the answer text and answer index."
## Environment info
Steps to rebuilt the Conda environment:
```
# create a virtual environment to stuff all these packages into
conda create -n round8 python=3.8 -y
# activate the virtual environment
conda activate round8
# install pytorch (best done through conda to handle cuda dependencies)
conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install jsonpickle transformers datasets matplotlib
```
OS: Ubuntu 20.04
Python 3.8
Result of `conda env export`:
```
name: round8
channels:
- pytorch-lts
- nvidia
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=4.5=1_gnu
- blas=1.0=mkl
- brotlipy=0.7.0=py38h27cfd23_1003
- bzip2=1.0.8=h7b6447c_0
- ca-certificates=2021.5.25=h06a4308_1
- certifi=2021.5.30=py38h06a4308_0
- cffi=1.14.5=py38h261ae71_0
- chardet=4.0.0=py38h06a4308_1003
- cryptography=3.4.7=py38hd23ed53_0
- cudatoolkit=11.1.74=h6bb024c_0
- ffmpeg=4.2.2=h20bf706_0
- freetype=2.10.4=h5ab3b9f_0
- gmp=6.2.1=h2531618_2
- gnutls=3.6.15=he1e5248_0
- idna=2.10=pyhd3eb1b0_0
- intel-openmp=2021.2.0=h06a4308_610
- jpeg=9b=h024ee3a_2
- lame=3.100=h7b6447c_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.35.1=h7274673_9
- libffi=3.3=he6710b0_2
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libidn2=2.3.1=h27cfd23_0
- libopus=1.3.1=h7b6447c_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=9.3.0=hd4cf53a_17
- libtasn1=4.16.0=h27cfd23_0
- libtiff=4.2.0=h85742a9_0
- libunistring=0.9.10=h27cfd23_0
- libuv=1.40.0=h7b6447c_0
- libvpx=1.7.0=h439df22_0
- libwebp-base=1.2.0=h27cfd23_0
- lz4-c=1.9.3=h2531618_0
- mkl=2021.2.0=h06a4308_296
- mkl-service=2.3.0=py38h27cfd23_1
- mkl_fft=1.3.0=py38h42c9631_2
- mkl_random=1.2.1=py38ha9443f7_2
- ncurses=6.2=he6710b0_1
- nettle=3.7.3=hbbd107a_1
- ninja=1.10.2=hff7bd54_1
- numpy=1.20.2=py38h2d18471_0
- numpy-base=1.20.2=py38hfae3a4d_0
- olefile=0.46=py_0
- openh264=2.1.0=hd408876_0
- openssl=1.1.1k=h27cfd23_0
- pillow=8.2.0=py38he98fc37_0
- pip=21.1.2=py38h06a4308_0
- pycparser=2.20=py_2
- pyopenssl=20.0.1=pyhd3eb1b0_1
- pysocks=1.7.1=py38h06a4308_0
- python=3.8.10=h12debd9_8
- pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0
- readline=8.1=h27cfd23_0
- requests=2.25.1=pyhd3eb1b0_0
- setuptools=52.0.0=py38h06a4308_0
- six=1.16.0=pyhd3eb1b0_0
- sqlite=3.35.4=hdfb4753_0
- tk=8.6.10=hbc83047_0
- torchtext=0.9.1=py38
- torchvision=0.9.1=py38_cu111
- typing_extensions=3.7.4.3=pyha847dfd_0
- urllib3=1.26.4=pyhd3eb1b0_0
- wheel=0.36.2=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- zstd=1.4.9=haebb681_0
- pip:
- click==8.0.1
- cycler==0.10.0
- datasets==1.8.0
- dill==0.3.4
- filelock==3.0.12
- fsspec==2021.6.0
- huggingface-hub==0.0.8
- joblib==1.0.1
- jsonpickle==2.0.0
- kiwisolver==1.3.1
- matplotlib==3.4.2
- multiprocess==0.70.12.2
- packaging==20.9
- pandas==1.2.4
- pyarrow==3.0.0
- pyparsing==2.4.7
- python-dateutil==2.8.1
- pytz==2021.1
- regex==2021.4.4
- sacremoses==0.0.45
- tokenizers==0.10.3
- tqdm==4.49.0
- transformers==4.6.1
- xxhash==2.0.2
prefix: /home/mmajurski/anaconda3/envs/round8
```
| 71 | sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index
## Describe the bug
The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start'].
For example:
id = '56d1f453e7d4791d009025bd'
answers = {'text': ['Pure Land'], 'answer_start': [146]}
However the actual text in context at location 146 is 'ure Land,'
Which is an off-by-one error from the correct answer.
## Steps to reproduce the bug
```python
import datasets
def check_context_answer_alignment(example):
for a_idx in range(len(example['answers']['text'])):
# check raw dataset for answer consistency between context and answer
answer_text = example['answers']['text'][a_idx]
a_st_idx = example['answers']['answer_start'][a_idx]
a_end_idx = a_st_idx + len(example['answers']['text'][a_idx])
answer_text_from_context = example['context'][a_st_idx:a_end_idx]
if answer_text != answer_text_from_context:
#print(example['id'])
return False
return True
dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True)
start_len = len(dataset)
dataset = dataset.filter(check_context_answer_alignment,
num_proc=1,
keep_in_memory=True)
end_len = len(dataset)
print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len))
```
## Expected results
This code should result in 0 rows being filtered out from the dataset.
## Actual results
This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location.
This code will reproduce the problem and produce the following count:
"258 instances contain mis-alignment between the answer text and answer index."
## Environment info
Steps to rebuilt the Conda environment:
```
# create a virtual environment to stuff all these packages into
conda create -n round8 python=3.8 -y
# activate the virtual environment
conda activate round8
# install pytorch (best done through conda to handle cuda dependencies)
conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install jsonpickle transformers datasets matplotlib
```
OS: Ubuntu 20.04
Python 3.8
Result of `conda env export`:
```
name: round8
channels:
- pytorch-lts
- nvidia
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=4.5=1_gnu
- blas=1.0=mkl
- brotlipy=0.7.0=py38h27cfd23_1003
- bzip2=1.0.8=h7b6447c_0
- ca-certificates=2021.5.25=h06a4308_1
- certifi=2021.5.30=py38h06a4308_0
- cffi=1.14.5=py38h261ae71_0
- chardet=4.0.0=py38h06a4308_1003
- cryptography=3.4.7=py38hd23ed53_0
- cudatoolkit=11.1.74=h6bb024c_0
- ffmpeg=4.2.2=h20bf706_0
- freetype=2.10.4=h5ab3b9f_0
- gmp=6.2.1=h2531618_2
- gnutls=3.6.15=he1e5248_0
- idna=2.10=pyhd3eb1b0_0
- intel-openmp=2021.2.0=h06a4308_610
- jpeg=9b=h024ee3a_2
- lame=3.100=h7b6447c_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.35.1=h7274673_9
- libffi=3.3=he6710b0_2
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libidn2=2.3.1=h27cfd23_0
- libopus=1.3.1=h7b6447c_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=9.3.0=hd4cf53a_17
- libtasn1=4.16.0=h27cfd23_0
- libtiff=4.2.0=h85742a9_0
- libunistring=0.9.10=h27cfd23_0
- libuv=1.40.0=h7b6447c_0
- libvpx=1.7.0=h439df22_0
- libwebp-base=1.2.0=h27cfd23_0
- lz4-c=1.9.3=h2531618_0
- mkl=2021.2.0=h06a4308_296
- mkl-service=2.3.0=py38h27cfd23_1
- mkl_fft=1.3.0=py38h42c9631_2
- mkl_random=1.2.1=py38ha9443f7_2
- ncurses=6.2=he6710b0_1
- nettle=3.7.3=hbbd107a_1
- ninja=1.10.2=hff7bd54_1
- numpy=1.20.2=py38h2d18471_0
- numpy-base=1.20.2=py38hfae3a4d_0
- olefile=0.46=py_0
- openh264=2.1.0=hd408876_0
- openssl=1.1.1k=h27cfd23_0
- pillow=8.2.0=py38he98fc37_0
- pip=21.1.2=py38h06a4308_0
- pycparser=2.20=py_2
- pyopenssl=20.0.1=pyhd3eb1b0_1
- pysocks=1.7.1=py38h06a4308_0
- python=3.8.10=h12debd9_8
- pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0
- readline=8.1=h27cfd23_0
- requests=2.25.1=pyhd3eb1b0_0
- setuptools=52.0.0=py38h06a4308_0
- six=1.16.0=pyhd3eb1b0_0
- sqlite=3.35.4=hdfb4753_0
- tk=8.6.10=hbc83047_0
- torchtext=0.9.1=py38
- torchvision=0.9.1=py38_cu111
- typing_extensions=3.7.4.3=pyha847dfd_0
- urllib3=1.26.4=pyhd3eb1b0_0
- wheel=0.36.2=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- zstd=1.4.9=haebb681_0
- pip:
- click==8.0.1
- cycler==0.10.0
- datasets==1.8.0
- dill==0.3.4
- filelock==3.0.12
- fsspec==2021.6.0
- huggingface-hub==0.0.8
- joblib==1.0.1
- jsonpickle==2.0.0
- kiwisolver==1.3.1
- matplotlib==3.4.2
- multiprocess==0.70.12.2
- packaging==20.9
- pandas==1.2.4
- pyarrow==3.0.0
- pyparsing==2.4.7
- python-dateutil==2.8.1
- pytz==2021.1
- regex==2021.4.4
- sacremoses==0.0.45
- tokenizers==0.10.3
- tqdm==4.49.0
- transformers==4.6.1
- xxhash==2.0.2
prefix: /home/mmajurski/anaconda3/envs/round8
```
Hi @mmajurski, thanks for reporting this issue.
Indeed this misalignment arises because the source dataset context field contains leading blank spaces (and these are counted within the answer_start), while our datasets loading script removes these leading blank spaces.
I'm going to fix our script so that all leading blank spaces in the source dataset are kept, and there is no misalignment between the answer text and the answer_start within the context. | [
-0.2330300063,
-0.3295374513,
-0.0441098735,
0.3749362826,
0.0878227949,
-0.0763420239,
0.1057568267,
0.2279033363,
-0.2927471995,
0.1577830911,
-0.084162876,
0.0450686142,
0.3250353336,
0.0685451701,
-0.0926085413,
0.1523640454,
0.1756329238,
0.0104243718,
0.0099454597,
-0.1725040972,
-0.2248982042,
0.2991382182,
-0.2980325222,
0.0300303139,
-0.3425644934,
-0.0102490606,
0.0364248082,
0.113183409,
-0.1175082475,
-0.415938735,
0.2125021517,
-0.0936785936,
0.007711269,
0.2638640106,
-0.000116531,
-0.1706254184,
0.0728384107,
-0.0973288715,
-0.2682838738,
0.0041923672,
-0.0435586832,
-0.121691294,
-0.1298899502,
-0.1058418155,
-0.2390315831,
0.271756649,
-0.067323111,
-0.2866250873,
0.6096698046,
0.2443223298,
0.1451372653,
0.2883636355,
0.0109262839,
-0.064737685,
0.1786868274,
-0.1235734001,
0.07569471,
0.1191267371,
0.1456331015,
0.1079364344,
-0.0346998721,
0.4713858962,
-0.1343526244,
-0.0318909138,
-0.0061442684,
0.2904495001,
0.2066179663,
-0.1278316975,
0.0998568833,
0.131174624,
0.2598811388,
-0.2484468818,
-0.4248088598,
-0.4569476247,
-0.0358276889,
-0.1224058121,
0.3317507505,
0.0394537523,
-0.0311523322,
0.3647890389,
-0.136532709,
0.0710277408,
-0.0857498795,
0.1271401346,
-0.0876930058,
0.2383427322,
-0.1219489872,
0.1492214948,
-0.2677043378,
-0.1386348307,
-0.0631168485,
-0.1375989169,
-0.1052336693,
0.417185694,
-0.5139368773,
-0.1013479754,
-0.167937696,
0.0907933563,
0.2361780405,
0.0694945455,
-0.0699167699,
0.001525051,
0.2659205496,
0.0613521338,
0.3417299092,
0.2773301601,
-0.1180536002,
0.2556292415,
0.1020578444,
0.1474458873,
0.0414643139,
0.1034675092,
0.1996171772,
-0.1841568053,
-0.1082463712,
-0.1547535062,
0.1684665978,
-0.1887483001,
-0.5222853422,
0.4338440597,
-0.6319302917,
0.2756714821,
-0.0214353129,
0.3482973874,
-0.2216847241,
0.2669169903,
0.3325074613,
0.2442838848,
-0.0650027543,
-0.1851681918,
-0.1330846846,
-0.0969802514,
-0.0144067109,
-0.0344588757,
0.0072187856,
-0.1293736398,
0.2271304429,
0.2961052954,
0.2128196955,
-0.2205923349,
-0.3132042289,
-0.1648734361,
0.1410583854,
0.0306853354,
0.027104944,
0.1876548827,
0.1873008013,
-0.2884296179,
0.0731953233,
0.0930058882,
-0.2383060753,
0.0768731758,
-0.0992043763,
0.2245201766,
-0.1660036147,
-0.0564259253,
0.0465994328,
0.245663926,
0.2966583967,
-0.2863130569,
0.2683804631,
-0.2038263232,
-0.3300072551,
-0.0881246328,
0.3650221229,
0.2920380235,
-0.198545903,
-0.065925926,
-0.056140624,
0.1563177258,
0.0265870858,
0.2375262231,
0.2730121315,
0.2942619026,
-0.4212448597,
0.2674051821,
0.1037337333,
-0.8540114164,
-0.5590247512,
-0.1742199957,
-0.1163509712,
0.2251104563,
-0.1036159694,
0.0728596151,
0.4342781305,
0.1543433666,
0.2735285163,
0.5391796827,
0.0679246858,
0.1189374253,
-0.3740175664,
0.0432914644,
-0.0926680863,
0.1235258505,
-0.2477574348,
-0.1743771136,
0.0530981943,
-0.1834743172,
0.1845172942,
0.1049055159,
0.0700076669,
0.2424078882,
0.3292449117,
0.1207572222,
0.1795453727,
-0.5024949312,
-0.484028995,
0.0933748633,
-0.0992039144,
0.0597216897,
-0.062496122,
-0.1360670626,
-0.3975330591,
-0.0361761153,
-0.3520286083,
-0.3007716238,
0.0909300297,
0.0083293803,
0.1742568761,
0.1125236899,
-0.1105443016,
0.627450943,
-0.2027088106,
0.2574425042,
-0.0648541152,
0.1838027686,
-0.0369919948,
0.0197876543,
0.0257436559,
0.4265460372,
-0.0366345979,
0.0865878761,
-0.2453000844,
0.5439850688,
0.2354305685,
0.1975180358,
-0.2265353948,
-0.0887752771,
0.2265448868,
-0.4291588664,
-0.2648876607,
0.2957108021,
0.1549059153,
0.1138921306,
-0.3117318749,
0.5959982872,
0.0686127245,
0.0849597007,
-0.2245444953,
-0.0018043444,
0.2800175548,
-0.1242723167,
-0.1135766953,
-0.2309003174,
0.290532738,
0.1432121694,
0.5214194655,
0.1039448157,
-0.3891155124,
0.1001305282,
0.267216295,
-0.1695471406,
0.0794452131,
0.1168768927,
0.0412759222,
-0.0822436959,
0.0247648228,
0.2209537923,
0.2899646163,
0.2044535428,
-0.3409020305,
0.3199860454,
-0.0366528928,
0.1461655051,
0.2144389451,
-0.1729849726,
-0.040036913,
0.4994864166,
0.3725071847,
0.2427579612,
-0.1843068302,
0.1724183261,
-0.3970789015,
0.1525238156,
-0.555044651,
-0.0213523433,
-0.1496846378,
-0.0735900998,
-0.1993008405,
-0.0192139912,
-0.2774996161,
-0.112437591,
0.2484332472,
0.1559060663,
-0.0537629277,
0.2769263685,
0.0002655163,
0.4594180584,
0.0978773236,
-0.1988539696,
-0.0586241446,
-0.0650392249,
-0.1624027193,
-0.0090980195,
0.0156266391,
0.1998774111,
0.1458059698,
-0.4826639891,
-0.3008003533,
-0.2854555845,
-0.3453063369,
0.2101686597,
-0.068636179,
0.361321032,
0.1664169431,
-0.0186989792,
-0.3620541096,
-0.2030521631,
0.1645017862,
-0.0291347355,
-0.4773871601,
-0.0524757095,
0.0556923263,
-0.2053312957,
-0.0412879288,
-0.4563171566,
-0.0989390537,
-0.2709364295,
0.0162286162,
-0.1817272007,
0.082378827,
0.2436570823,
-0.1389112473,
0.0348107703,
-0.2918561101,
0.1260593981,
-0.5039399266,
-0.0472879782,
0.0939139724,
0.0430194177,
-0.3436331451,
-0.2887289524,
-0.2320242822,
-0.1749061495,
-0.0350875519,
-0.1375845075,
-0.2258416265,
-0.1793825775,
0.2166628093,
-0.2268264592,
0.243519634,
0.2265462875,
-0.1808743179,
0.0880100131,
-0.2281242311,
-0.4454984665,
0.1523828954,
0.3971562982,
0.235344857,
-0.1117965728,
0.3300127983,
-0.0246537253,
0.6546523571,
0.4053245783,
0.2266177237,
0.1022698879,
-0.2168852389,
0.3332626224,
-0.2054527849,
-0.2187944353,
0.3126907051,
0.1287731826,
-0.3271479607,
0.3284797668,
0.0397980921,
0.1749128103,
0.0155104473,
0.1942849606,
-0.5804228783,
-0.1875115335,
-0.216632545,
0.049892962,
0.1647058129,
0.0902880728,
-0.0723395124,
0.1494954824,
-0.1061440706,
-0.0524446517,
0.1069308594,
-0.0442451537,
0.2364699543,
-0.8369113207,
-0.2997894883,
0.0433075875,
0.2258635014,
0.3995070755,
0.3815810978,
-0.013444826,
-0.0939931124,
0.196837008,
0.0923823714,
0.7246229053,
0.0159391928,
0.0829528347,
-0.289978385,
0.185327217,
-0.4381757975,
-0.2349050045,
-0.1948947906,
0.1377695948,
0.2811782062,
0.1698482484,
-0.2208505571,
-0.0408705324,
0.1911014467,
0.0646318197,
-0.0984827876,
-0.0093898177,
-0.2653484643,
-0.1490733176,
-0.3438105881,
0.2851323783,
0.4409757853,
0.2931802273,
0.4785471857,
-0.0608854815,
0.1911564022,
0.1568409353,
-0.1183879972,
0.2444163412,
0.5145235658,
-0.1394736469,
0.0202316493,
0.2098541707,
-0.0472854972,
0.0350847989,
0.5318823457,
-0.0985554606,
-0.3209650517,
-0.0355940014,
-0.042349726,
0.3858831227,
0.3409571052,
0.0271564461,
0.0072180964,
-0.0423273668,
0.1705225408,
-0.2394716293,
-0.1145947576,
0.3838068247,
0.5305989981,
-0.0723311231,
-0.2432466149,
0.2269948274,
-0.1459891796,
0.0304385126,
0.0929575041,
0.5290966034,
-0.2636905909,
0.4520532191,
-0.1095874086,
1.0020313263,
0.3281888068,
0.1134257019,
0.49788481,
-0.0472013578,
0.3578611612,
-0.0754103735,
0.2748137414,
-0.4139468074,
0.3110221326,
-0.0377650671,
-0.1198739558,
-0.1178154796,
-0.1698682904,
-0.2265703082,
0.2860625982,
-0.15264678,
0.2311638594,
-0.0626615137,
-0.0085223168,
-0.2034144253,
-0.0335301608,
-0.4369696379,
0.0932307243,
0.0146778524,
0.2703950405,
-0.1487718225,
0.1750008911,
-0.3390993178,
-0.3742336631,
-0.6190103292,
-0.0299752988,
-0.4763567746,
0.0047965348,
0.4499206245,
-0.0897761136,
-0.0364159085,
0.4331647456,
0.3017063141,
0.0679340512,
-0.0369106345,
0.1858624965,
-0.0765427947,
0.3762845695,
0.4295198917,
-0.0519074537,
0.1574105769,
-0.0374896526,
-0.3992099762,
-0.1864605546,
0.014256984,
-0.2147547156,
0.0705937445,
0.1132239997,
0.0116751213,
-0.1806562841,
-0.3797227144,
-0.1218566597,
0.2888595164,
-0.2152140439,
0.1218224913,
-0.1044649333,
-0.1833921373,
0.1680887341,
0.2302088439,
-0.3828320801,
-0.029355932,
0.4591565728,
-0.2447420359,
0.0446335971,
0.4361587167,
0.0126489624,
-0.1020919904,
-0.1210552454,
0.1857442111,
-0.0898657441,
-0.1195793673,
0.020980794,
-0.1442864984,
-0.3595219254,
-0.2137380242,
0.338399291,
0.3839166462,
-0.1161914468,
-0.0502927341,
-0.695736289,
-0.0235520713,
0.2530729473,
0.0438779108,
-0.0451186858,
0.3628295362,
0.0801642016,
-0.1754005104,
-0.0703572929,
-0.3165868223,
-0.0696845576,
-0.2544338703,
0.1378874481,
-0.0004855581,
-0.0549048558,
0.2277369797,
-0.2508429885,
0.0973830372,
-0.0025260085,
-0.1287062615,
-0.2157400548,
-0.1059362143,
0.151647985,
0.0958362073,
-0.2368227541,
-0.1105898023,
-0.0767657235,
0.1523084641,
-0.1904771775,
0.1285656393,
0.4913201928,
0.1518163383,
0.1998495758,
-0.5185204148,
-0.1265325844,
0.0309706107,
0.0234832615,
-0.0831898451,
-0.346021831,
0.1145583466,
0.28577438,
-0.2541634142,
-0.056822136,
0.2504390776,
0.1971276253,
0.1563527584,
0.1079917625,
0.191599071,
-0.0982197821,
-0.0190185457,
0.1833930016,
0.2271948755,
0.3787543774,
-0.400013864,
-0.0452515967,
-0.0354742669,
0.198386699,
-0.3783814907,
-0.0351040363,
0.2172057182,
-0.1882689595,
-0.0205087513,
0.2156240642,
0.1364913583,
-0.264878124,
-0.0650718212,
0.2325163484,
0.5807173252,
-0.0888285041,
0.0113575347,
0.1476522684,
0.0274069458,
0.2149520516,
0.3176787198,
-0.1152957231,
0.202183634,
0.1865380853,
-0.152035445,
0.0439825356,
-0.2052263767,
0.1520628184,
0.1444453597,
0.0466857627,
0.3828476965,
0.3497185111,
-0.4396210313,
0.0111204321,
0.131723091,
0.4576255083,
-0.1160482541,
-0.2384147495,
-0.2936192453,
-0.0883243829,
-0.2381865084,
-0.0578629673,
-0.080703713,
-0.1052348614,
-0.1390683651,
-0.0989653617,
-0.0628813207,
-0.2211410403,
0.1579808891,
0.1681920886,
-0.218273297,
-0.3492712677,
-0.2746627927,
0.2447256893,
0.1839179248,
-0.1713454723,
0.341062665,
0.0664090961,
0.0094085988,
0.3050121665,
0.5498547554,
0.5111487508,
0.2144200504,
-0.1568036228,
0.1962304115,
-0.1739758849,
-0.0277864784,
0.0112489387,
0.1102143303,
-0.2986119688,
-0.494799912,
0.0919374824,
0.2147874683,
-0.1876723468,
0.0139150377,
0.0613698997,
0.1129162386,
-0.3813640177,
-0.2247826457,
-0.3311121464,
0.3151144385,
-0.1817768514,
0.1097349077,
-0.1495824307,
-0.0258891303,
0.1415273249,
-0.1616251618,
0.2025580406,
0.078684926,
0.0715653151,
0.1909435391,
0.044528041,
0.6243498325,
-0.2013415992,
-0.0681901872,
-0.0578785911,
-0.5805677772,
0.1312071979,
0.0310451612,
-0.115497075,
0.2015237361,
0.2146642208,
-0.1598931104,
0.2209583968,
0.4334925711,
0.0617079362,
-0.1903526634,
0.0112974811,
-0.2144547105,
0.0767378956,
-0.2031751424,
0.1104445234,
-0.0068176351,
-0.2531499267,
0.2053181231,
0.1481134892,
-0.0577718876,
0.1885320395,
0.1527105272,
-0.0800266489,
-0.4327376783,
-0.129435569,
0.3209772706,
0.2201796472,
-0.2354950011,
0.1969351172,
-0.0664645657,
-0.1612055451,
-0.5237140656,
0.1405877024,
-0.3926341832,
0.2938770354,
-0.0463227779,
-0.3050651252,
0.0475320965,
0.2376044691,
0.3541373014,
-0.2929817736,
-0.4807341695,
0.1937259734,
-0.1500298977,
0.2315478921,
-0.0873754174,
0.1933843791,
-0.0801390558,
0.4570730627,
-0.3387343287,
-0.3580102324,
0.3238233328,
-0.3490353525,
-0.1189628839,
0.014101956,
0.3399591148,
0.2818256021,
-0.148527652,
-0.5054003,
-0.1532176882,
0.2660459876,
-0.000435451,
-0.2164423019,
0.111603938,
-0.0506296381,
-0.0587325618,
0.0299290121,
0.0477239266,
0.3681153059,
-0.1083867922,
0.288988471,
-0.3507984877
] |
https://github.com/huggingface/datasets/issues/2585 | sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index | If you are going to be altering the data cleaning from the source Squad dataset, here is one thing to consider.
There are occasional double spaces separating words which it might be nice to get rid of.
Either way, thank you. | ## Describe the bug
The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start'].
For example:
id = '56d1f453e7d4791d009025bd'
answers = {'text': ['Pure Land'], 'answer_start': [146]}
However the actual text in context at location 146 is 'ure Land,'
Which is an off-by-one error from the correct answer.
## Steps to reproduce the bug
```python
import datasets
def check_context_answer_alignment(example):
for a_idx in range(len(example['answers']['text'])):
# check raw dataset for answer consistency between context and answer
answer_text = example['answers']['text'][a_idx]
a_st_idx = example['answers']['answer_start'][a_idx]
a_end_idx = a_st_idx + len(example['answers']['text'][a_idx])
answer_text_from_context = example['context'][a_st_idx:a_end_idx]
if answer_text != answer_text_from_context:
#print(example['id'])
return False
return True
dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True)
start_len = len(dataset)
dataset = dataset.filter(check_context_answer_alignment,
num_proc=1,
keep_in_memory=True)
end_len = len(dataset)
print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len))
```
## Expected results
This code should result in 0 rows being filtered out from the dataset.
## Actual results
This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location.
This code will reproduce the problem and produce the following count:
"258 instances contain mis-alignment between the answer text and answer index."
## Environment info
Steps to rebuilt the Conda environment:
```
# create a virtual environment to stuff all these packages into
conda create -n round8 python=3.8 -y
# activate the virtual environment
conda activate round8
# install pytorch (best done through conda to handle cuda dependencies)
conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install jsonpickle transformers datasets matplotlib
```
OS: Ubuntu 20.04
Python 3.8
Result of `conda env export`:
```
name: round8
channels:
- pytorch-lts
- nvidia
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=4.5=1_gnu
- blas=1.0=mkl
- brotlipy=0.7.0=py38h27cfd23_1003
- bzip2=1.0.8=h7b6447c_0
- ca-certificates=2021.5.25=h06a4308_1
- certifi=2021.5.30=py38h06a4308_0
- cffi=1.14.5=py38h261ae71_0
- chardet=4.0.0=py38h06a4308_1003
- cryptography=3.4.7=py38hd23ed53_0
- cudatoolkit=11.1.74=h6bb024c_0
- ffmpeg=4.2.2=h20bf706_0
- freetype=2.10.4=h5ab3b9f_0
- gmp=6.2.1=h2531618_2
- gnutls=3.6.15=he1e5248_0
- idna=2.10=pyhd3eb1b0_0
- intel-openmp=2021.2.0=h06a4308_610
- jpeg=9b=h024ee3a_2
- lame=3.100=h7b6447c_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.35.1=h7274673_9
- libffi=3.3=he6710b0_2
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libidn2=2.3.1=h27cfd23_0
- libopus=1.3.1=h7b6447c_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=9.3.0=hd4cf53a_17
- libtasn1=4.16.0=h27cfd23_0
- libtiff=4.2.0=h85742a9_0
- libunistring=0.9.10=h27cfd23_0
- libuv=1.40.0=h7b6447c_0
- libvpx=1.7.0=h439df22_0
- libwebp-base=1.2.0=h27cfd23_0
- lz4-c=1.9.3=h2531618_0
- mkl=2021.2.0=h06a4308_296
- mkl-service=2.3.0=py38h27cfd23_1
- mkl_fft=1.3.0=py38h42c9631_2
- mkl_random=1.2.1=py38ha9443f7_2
- ncurses=6.2=he6710b0_1
- nettle=3.7.3=hbbd107a_1
- ninja=1.10.2=hff7bd54_1
- numpy=1.20.2=py38h2d18471_0
- numpy-base=1.20.2=py38hfae3a4d_0
- olefile=0.46=py_0
- openh264=2.1.0=hd408876_0
- openssl=1.1.1k=h27cfd23_0
- pillow=8.2.0=py38he98fc37_0
- pip=21.1.2=py38h06a4308_0
- pycparser=2.20=py_2
- pyopenssl=20.0.1=pyhd3eb1b0_1
- pysocks=1.7.1=py38h06a4308_0
- python=3.8.10=h12debd9_8
- pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0
- readline=8.1=h27cfd23_0
- requests=2.25.1=pyhd3eb1b0_0
- setuptools=52.0.0=py38h06a4308_0
- six=1.16.0=pyhd3eb1b0_0
- sqlite=3.35.4=hdfb4753_0
- tk=8.6.10=hbc83047_0
- torchtext=0.9.1=py38
- torchvision=0.9.1=py38_cu111
- typing_extensions=3.7.4.3=pyha847dfd_0
- urllib3=1.26.4=pyhd3eb1b0_0
- wheel=0.36.2=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- zstd=1.4.9=haebb681_0
- pip:
- click==8.0.1
- cycler==0.10.0
- datasets==1.8.0
- dill==0.3.4
- filelock==3.0.12
- fsspec==2021.6.0
- huggingface-hub==0.0.8
- joblib==1.0.1
- jsonpickle==2.0.0
- kiwisolver==1.3.1
- matplotlib==3.4.2
- multiprocess==0.70.12.2
- packaging==20.9
- pandas==1.2.4
- pyarrow==3.0.0
- pyparsing==2.4.7
- python-dateutil==2.8.1
- pytz==2021.1
- regex==2021.4.4
- sacremoses==0.0.45
- tokenizers==0.10.3
- tqdm==4.49.0
- transformers==4.6.1
- xxhash==2.0.2
prefix: /home/mmajurski/anaconda3/envs/round8
```
| 41 | sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index
## Describe the bug
The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start'].
For example:
id = '56d1f453e7d4791d009025bd'
answers = {'text': ['Pure Land'], 'answer_start': [146]}
However the actual text in context at location 146 is 'ure Land,'
Which is an off-by-one error from the correct answer.
## Steps to reproduce the bug
```python
import datasets
def check_context_answer_alignment(example):
for a_idx in range(len(example['answers']['text'])):
# check raw dataset for answer consistency between context and answer
answer_text = example['answers']['text'][a_idx]
a_st_idx = example['answers']['answer_start'][a_idx]
a_end_idx = a_st_idx + len(example['answers']['text'][a_idx])
answer_text_from_context = example['context'][a_st_idx:a_end_idx]
if answer_text != answer_text_from_context:
#print(example['id'])
return False
return True
dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True)
start_len = len(dataset)
dataset = dataset.filter(check_context_answer_alignment,
num_proc=1,
keep_in_memory=True)
end_len = len(dataset)
print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len))
```
## Expected results
This code should result in 0 rows being filtered out from the dataset.
## Actual results
This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location.
This code will reproduce the problem and produce the following count:
"258 instances contain mis-alignment between the answer text and answer index."
## Environment info
Steps to rebuilt the Conda environment:
```
# create a virtual environment to stuff all these packages into
conda create -n round8 python=3.8 -y
# activate the virtual environment
conda activate round8
# install pytorch (best done through conda to handle cuda dependencies)
conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install jsonpickle transformers datasets matplotlib
```
OS: Ubuntu 20.04
Python 3.8
Result of `conda env export`:
```
name: round8
channels:
- pytorch-lts
- nvidia
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=4.5=1_gnu
- blas=1.0=mkl
- brotlipy=0.7.0=py38h27cfd23_1003
- bzip2=1.0.8=h7b6447c_0
- ca-certificates=2021.5.25=h06a4308_1
- certifi=2021.5.30=py38h06a4308_0
- cffi=1.14.5=py38h261ae71_0
- chardet=4.0.0=py38h06a4308_1003
- cryptography=3.4.7=py38hd23ed53_0
- cudatoolkit=11.1.74=h6bb024c_0
- ffmpeg=4.2.2=h20bf706_0
- freetype=2.10.4=h5ab3b9f_0
- gmp=6.2.1=h2531618_2
- gnutls=3.6.15=he1e5248_0
- idna=2.10=pyhd3eb1b0_0
- intel-openmp=2021.2.0=h06a4308_610
- jpeg=9b=h024ee3a_2
- lame=3.100=h7b6447c_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.35.1=h7274673_9
- libffi=3.3=he6710b0_2
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libidn2=2.3.1=h27cfd23_0
- libopus=1.3.1=h7b6447c_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=9.3.0=hd4cf53a_17
- libtasn1=4.16.0=h27cfd23_0
- libtiff=4.2.0=h85742a9_0
- libunistring=0.9.10=h27cfd23_0
- libuv=1.40.0=h7b6447c_0
- libvpx=1.7.0=h439df22_0
- libwebp-base=1.2.0=h27cfd23_0
- lz4-c=1.9.3=h2531618_0
- mkl=2021.2.0=h06a4308_296
- mkl-service=2.3.0=py38h27cfd23_1
- mkl_fft=1.3.0=py38h42c9631_2
- mkl_random=1.2.1=py38ha9443f7_2
- ncurses=6.2=he6710b0_1
- nettle=3.7.3=hbbd107a_1
- ninja=1.10.2=hff7bd54_1
- numpy=1.20.2=py38h2d18471_0
- numpy-base=1.20.2=py38hfae3a4d_0
- olefile=0.46=py_0
- openh264=2.1.0=hd408876_0
- openssl=1.1.1k=h27cfd23_0
- pillow=8.2.0=py38he98fc37_0
- pip=21.1.2=py38h06a4308_0
- pycparser=2.20=py_2
- pyopenssl=20.0.1=pyhd3eb1b0_1
- pysocks=1.7.1=py38h06a4308_0
- python=3.8.10=h12debd9_8
- pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0
- readline=8.1=h27cfd23_0
- requests=2.25.1=pyhd3eb1b0_0
- setuptools=52.0.0=py38h06a4308_0
- six=1.16.0=pyhd3eb1b0_0
- sqlite=3.35.4=hdfb4753_0
- tk=8.6.10=hbc83047_0
- torchtext=0.9.1=py38
- torchvision=0.9.1=py38_cu111
- typing_extensions=3.7.4.3=pyha847dfd_0
- urllib3=1.26.4=pyhd3eb1b0_0
- wheel=0.36.2=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- zstd=1.4.9=haebb681_0
- pip:
- click==8.0.1
- cycler==0.10.0
- datasets==1.8.0
- dill==0.3.4
- filelock==3.0.12
- fsspec==2021.6.0
- huggingface-hub==0.0.8
- joblib==1.0.1
- jsonpickle==2.0.0
- kiwisolver==1.3.1
- matplotlib==3.4.2
- multiprocess==0.70.12.2
- packaging==20.9
- pandas==1.2.4
- pyarrow==3.0.0
- pyparsing==2.4.7
- python-dateutil==2.8.1
- pytz==2021.1
- regex==2021.4.4
- sacremoses==0.0.45
- tokenizers==0.10.3
- tqdm==4.49.0
- transformers==4.6.1
- xxhash==2.0.2
prefix: /home/mmajurski/anaconda3/envs/round8
```
If you are going to be altering the data cleaning from the source Squad dataset, here is one thing to consider.
There are occasional double spaces separating words which it might be nice to get rid of.
Either way, thank you. | [
-0.2330300063,
-0.3295374513,
-0.0441098735,
0.3749362826,
0.0878227949,
-0.0763420239,
0.1057568267,
0.2279033363,
-0.2927471995,
0.1577830911,
-0.084162876,
0.0450686142,
0.3250353336,
0.0685451701,
-0.0926085413,
0.1523640454,
0.1756329238,
0.0104243718,
0.0099454597,
-0.1725040972,
-0.2248982042,
0.2991382182,
-0.2980325222,
0.0300303139,
-0.3425644934,
-0.0102490606,
0.0364248082,
0.113183409,
-0.1175082475,
-0.415938735,
0.2125021517,
-0.0936785936,
0.007711269,
0.2638640106,
-0.000116531,
-0.1706254184,
0.0728384107,
-0.0973288715,
-0.2682838738,
0.0041923672,
-0.0435586832,
-0.121691294,
-0.1298899502,
-0.1058418155,
-0.2390315831,
0.271756649,
-0.067323111,
-0.2866250873,
0.6096698046,
0.2443223298,
0.1451372653,
0.2883636355,
0.0109262839,
-0.064737685,
0.1786868274,
-0.1235734001,
0.07569471,
0.1191267371,
0.1456331015,
0.1079364344,
-0.0346998721,
0.4713858962,
-0.1343526244,
-0.0318909138,
-0.0061442684,
0.2904495001,
0.2066179663,
-0.1278316975,
0.0998568833,
0.131174624,
0.2598811388,
-0.2484468818,
-0.4248088598,
-0.4569476247,
-0.0358276889,
-0.1224058121,
0.3317507505,
0.0394537523,
-0.0311523322,
0.3647890389,
-0.136532709,
0.0710277408,
-0.0857498795,
0.1271401346,
-0.0876930058,
0.2383427322,
-0.1219489872,
0.1492214948,
-0.2677043378,
-0.1386348307,
-0.0631168485,
-0.1375989169,
-0.1052336693,
0.417185694,
-0.5139368773,
-0.1013479754,
-0.167937696,
0.0907933563,
0.2361780405,
0.0694945455,
-0.0699167699,
0.001525051,
0.2659205496,
0.0613521338,
0.3417299092,
0.2773301601,
-0.1180536002,
0.2556292415,
0.1020578444,
0.1474458873,
0.0414643139,
0.1034675092,
0.1996171772,
-0.1841568053,
-0.1082463712,
-0.1547535062,
0.1684665978,
-0.1887483001,
-0.5222853422,
0.4338440597,
-0.6319302917,
0.2756714821,
-0.0214353129,
0.3482973874,
-0.2216847241,
0.2669169903,
0.3325074613,
0.2442838848,
-0.0650027543,
-0.1851681918,
-0.1330846846,
-0.0969802514,
-0.0144067109,
-0.0344588757,
0.0072187856,
-0.1293736398,
0.2271304429,
0.2961052954,
0.2128196955,
-0.2205923349,
-0.3132042289,
-0.1648734361,
0.1410583854,
0.0306853354,
0.027104944,
0.1876548827,
0.1873008013,
-0.2884296179,
0.0731953233,
0.0930058882,
-0.2383060753,
0.0768731758,
-0.0992043763,
0.2245201766,
-0.1660036147,
-0.0564259253,
0.0465994328,
0.245663926,
0.2966583967,
-0.2863130569,
0.2683804631,
-0.2038263232,
-0.3300072551,
-0.0881246328,
0.3650221229,
0.2920380235,
-0.198545903,
-0.065925926,
-0.056140624,
0.1563177258,
0.0265870858,
0.2375262231,
0.2730121315,
0.2942619026,
-0.4212448597,
0.2674051821,
0.1037337333,
-0.8540114164,
-0.5590247512,
-0.1742199957,
-0.1163509712,
0.2251104563,
-0.1036159694,
0.0728596151,
0.4342781305,
0.1543433666,
0.2735285163,
0.5391796827,
0.0679246858,
0.1189374253,
-0.3740175664,
0.0432914644,
-0.0926680863,
0.1235258505,
-0.2477574348,
-0.1743771136,
0.0530981943,
-0.1834743172,
0.1845172942,
0.1049055159,
0.0700076669,
0.2424078882,
0.3292449117,
0.1207572222,
0.1795453727,
-0.5024949312,
-0.484028995,
0.0933748633,
-0.0992039144,
0.0597216897,
-0.062496122,
-0.1360670626,
-0.3975330591,
-0.0361761153,
-0.3520286083,
-0.3007716238,
0.0909300297,
0.0083293803,
0.1742568761,
0.1125236899,
-0.1105443016,
0.627450943,
-0.2027088106,
0.2574425042,
-0.0648541152,
0.1838027686,
-0.0369919948,
0.0197876543,
0.0257436559,
0.4265460372,
-0.0366345979,
0.0865878761,
-0.2453000844,
0.5439850688,
0.2354305685,
0.1975180358,
-0.2265353948,
-0.0887752771,
0.2265448868,
-0.4291588664,
-0.2648876607,
0.2957108021,
0.1549059153,
0.1138921306,
-0.3117318749,
0.5959982872,
0.0686127245,
0.0849597007,
-0.2245444953,
-0.0018043444,
0.2800175548,
-0.1242723167,
-0.1135766953,
-0.2309003174,
0.290532738,
0.1432121694,
0.5214194655,
0.1039448157,
-0.3891155124,
0.1001305282,
0.267216295,
-0.1695471406,
0.0794452131,
0.1168768927,
0.0412759222,
-0.0822436959,
0.0247648228,
0.2209537923,
0.2899646163,
0.2044535428,
-0.3409020305,
0.3199860454,
-0.0366528928,
0.1461655051,
0.2144389451,
-0.1729849726,
-0.040036913,
0.4994864166,
0.3725071847,
0.2427579612,
-0.1843068302,
0.1724183261,
-0.3970789015,
0.1525238156,
-0.555044651,
-0.0213523433,
-0.1496846378,
-0.0735900998,
-0.1993008405,
-0.0192139912,
-0.2774996161,
-0.112437591,
0.2484332472,
0.1559060663,
-0.0537629277,
0.2769263685,
0.0002655163,
0.4594180584,
0.0978773236,
-0.1988539696,
-0.0586241446,
-0.0650392249,
-0.1624027193,
-0.0090980195,
0.0156266391,
0.1998774111,
0.1458059698,
-0.4826639891,
-0.3008003533,
-0.2854555845,
-0.3453063369,
0.2101686597,
-0.068636179,
0.361321032,
0.1664169431,
-0.0186989792,
-0.3620541096,
-0.2030521631,
0.1645017862,
-0.0291347355,
-0.4773871601,
-0.0524757095,
0.0556923263,
-0.2053312957,
-0.0412879288,
-0.4563171566,
-0.0989390537,
-0.2709364295,
0.0162286162,
-0.1817272007,
0.082378827,
0.2436570823,
-0.1389112473,
0.0348107703,
-0.2918561101,
0.1260593981,
-0.5039399266,
-0.0472879782,
0.0939139724,
0.0430194177,
-0.3436331451,
-0.2887289524,
-0.2320242822,
-0.1749061495,
-0.0350875519,
-0.1375845075,
-0.2258416265,
-0.1793825775,
0.2166628093,
-0.2268264592,
0.243519634,
0.2265462875,
-0.1808743179,
0.0880100131,
-0.2281242311,
-0.4454984665,
0.1523828954,
0.3971562982,
0.235344857,
-0.1117965728,
0.3300127983,
-0.0246537253,
0.6546523571,
0.4053245783,
0.2266177237,
0.1022698879,
-0.2168852389,
0.3332626224,
-0.2054527849,
-0.2187944353,
0.3126907051,
0.1287731826,
-0.3271479607,
0.3284797668,
0.0397980921,
0.1749128103,
0.0155104473,
0.1942849606,
-0.5804228783,
-0.1875115335,
-0.216632545,
0.049892962,
0.1647058129,
0.0902880728,
-0.0723395124,
0.1494954824,
-0.1061440706,
-0.0524446517,
0.1069308594,
-0.0442451537,
0.2364699543,
-0.8369113207,
-0.2997894883,
0.0433075875,
0.2258635014,
0.3995070755,
0.3815810978,
-0.013444826,
-0.0939931124,
0.196837008,
0.0923823714,
0.7246229053,
0.0159391928,
0.0829528347,
-0.289978385,
0.185327217,
-0.4381757975,
-0.2349050045,
-0.1948947906,
0.1377695948,
0.2811782062,
0.1698482484,
-0.2208505571,
-0.0408705324,
0.1911014467,
0.0646318197,
-0.0984827876,
-0.0093898177,
-0.2653484643,
-0.1490733176,
-0.3438105881,
0.2851323783,
0.4409757853,
0.2931802273,
0.4785471857,
-0.0608854815,
0.1911564022,
0.1568409353,
-0.1183879972,
0.2444163412,
0.5145235658,
-0.1394736469,
0.0202316493,
0.2098541707,
-0.0472854972,
0.0350847989,
0.5318823457,
-0.0985554606,
-0.3209650517,
-0.0355940014,
-0.042349726,
0.3858831227,
0.3409571052,
0.0271564461,
0.0072180964,
-0.0423273668,
0.1705225408,
-0.2394716293,
-0.1145947576,
0.3838068247,
0.5305989981,
-0.0723311231,
-0.2432466149,
0.2269948274,
-0.1459891796,
0.0304385126,
0.0929575041,
0.5290966034,
-0.2636905909,
0.4520532191,
-0.1095874086,
1.0020313263,
0.3281888068,
0.1134257019,
0.49788481,
-0.0472013578,
0.3578611612,
-0.0754103735,
0.2748137414,
-0.4139468074,
0.3110221326,
-0.0377650671,
-0.1198739558,
-0.1178154796,
-0.1698682904,
-0.2265703082,
0.2860625982,
-0.15264678,
0.2311638594,
-0.0626615137,
-0.0085223168,
-0.2034144253,
-0.0335301608,
-0.4369696379,
0.0932307243,
0.0146778524,
0.2703950405,
-0.1487718225,
0.1750008911,
-0.3390993178,
-0.3742336631,
-0.6190103292,
-0.0299752988,
-0.4763567746,
0.0047965348,
0.4499206245,
-0.0897761136,
-0.0364159085,
0.4331647456,
0.3017063141,
0.0679340512,
-0.0369106345,
0.1858624965,
-0.0765427947,
0.3762845695,
0.4295198917,
-0.0519074537,
0.1574105769,
-0.0374896526,
-0.3992099762,
-0.1864605546,
0.014256984,
-0.2147547156,
0.0705937445,
0.1132239997,
0.0116751213,
-0.1806562841,
-0.3797227144,
-0.1218566597,
0.2888595164,
-0.2152140439,
0.1218224913,
-0.1044649333,
-0.1833921373,
0.1680887341,
0.2302088439,
-0.3828320801,
-0.029355932,
0.4591565728,
-0.2447420359,
0.0446335971,
0.4361587167,
0.0126489624,
-0.1020919904,
-0.1210552454,
0.1857442111,
-0.0898657441,
-0.1195793673,
0.020980794,
-0.1442864984,
-0.3595219254,
-0.2137380242,
0.338399291,
0.3839166462,
-0.1161914468,
-0.0502927341,
-0.695736289,
-0.0235520713,
0.2530729473,
0.0438779108,
-0.0451186858,
0.3628295362,
0.0801642016,
-0.1754005104,
-0.0703572929,
-0.3165868223,
-0.0696845576,
-0.2544338703,
0.1378874481,
-0.0004855581,
-0.0549048558,
0.2277369797,
-0.2508429885,
0.0973830372,
-0.0025260085,
-0.1287062615,
-0.2157400548,
-0.1059362143,
0.151647985,
0.0958362073,
-0.2368227541,
-0.1105898023,
-0.0767657235,
0.1523084641,
-0.1904771775,
0.1285656393,
0.4913201928,
0.1518163383,
0.1998495758,
-0.5185204148,
-0.1265325844,
0.0309706107,
0.0234832615,
-0.0831898451,
-0.346021831,
0.1145583466,
0.28577438,
-0.2541634142,
-0.056822136,
0.2504390776,
0.1971276253,
0.1563527584,
0.1079917625,
0.191599071,
-0.0982197821,
-0.0190185457,
0.1833930016,
0.2271948755,
0.3787543774,
-0.400013864,
-0.0452515967,
-0.0354742669,
0.198386699,
-0.3783814907,
-0.0351040363,
0.2172057182,
-0.1882689595,
-0.0205087513,
0.2156240642,
0.1364913583,
-0.264878124,
-0.0650718212,
0.2325163484,
0.5807173252,
-0.0888285041,
0.0113575347,
0.1476522684,
0.0274069458,
0.2149520516,
0.3176787198,
-0.1152957231,
0.202183634,
0.1865380853,
-0.152035445,
0.0439825356,
-0.2052263767,
0.1520628184,
0.1444453597,
0.0466857627,
0.3828476965,
0.3497185111,
-0.4396210313,
0.0111204321,
0.131723091,
0.4576255083,
-0.1160482541,
-0.2384147495,
-0.2936192453,
-0.0883243829,
-0.2381865084,
-0.0578629673,
-0.080703713,
-0.1052348614,
-0.1390683651,
-0.0989653617,
-0.0628813207,
-0.2211410403,
0.1579808891,
0.1681920886,
-0.218273297,
-0.3492712677,
-0.2746627927,
0.2447256893,
0.1839179248,
-0.1713454723,
0.341062665,
0.0664090961,
0.0094085988,
0.3050121665,
0.5498547554,
0.5111487508,
0.2144200504,
-0.1568036228,
0.1962304115,
-0.1739758849,
-0.0277864784,
0.0112489387,
0.1102143303,
-0.2986119688,
-0.494799912,
0.0919374824,
0.2147874683,
-0.1876723468,
0.0139150377,
0.0613698997,
0.1129162386,
-0.3813640177,
-0.2247826457,
-0.3311121464,
0.3151144385,
-0.1817768514,
0.1097349077,
-0.1495824307,
-0.0258891303,
0.1415273249,
-0.1616251618,
0.2025580406,
0.078684926,
0.0715653151,
0.1909435391,
0.044528041,
0.6243498325,
-0.2013415992,
-0.0681901872,
-0.0578785911,
-0.5805677772,
0.1312071979,
0.0310451612,
-0.115497075,
0.2015237361,
0.2146642208,
-0.1598931104,
0.2209583968,
0.4334925711,
0.0617079362,
-0.1903526634,
0.0112974811,
-0.2144547105,
0.0767378956,
-0.2031751424,
0.1104445234,
-0.0068176351,
-0.2531499267,
0.2053181231,
0.1481134892,
-0.0577718876,
0.1885320395,
0.1527105272,
-0.0800266489,
-0.4327376783,
-0.129435569,
0.3209772706,
0.2201796472,
-0.2354950011,
0.1969351172,
-0.0664645657,
-0.1612055451,
-0.5237140656,
0.1405877024,
-0.3926341832,
0.2938770354,
-0.0463227779,
-0.3050651252,
0.0475320965,
0.2376044691,
0.3541373014,
-0.2929817736,
-0.4807341695,
0.1937259734,
-0.1500298977,
0.2315478921,
-0.0873754174,
0.1933843791,
-0.0801390558,
0.4570730627,
-0.3387343287,
-0.3580102324,
0.3238233328,
-0.3490353525,
-0.1189628839,
0.014101956,
0.3399591148,
0.2818256021,
-0.148527652,
-0.5054003,
-0.1532176882,
0.2660459876,
-0.000435451,
-0.2164423019,
0.111603938,
-0.0506296381,
-0.0587325618,
0.0299290121,
0.0477239266,
0.3681153059,
-0.1083867922,
0.288988471,
-0.3507984877
] |
https://github.com/huggingface/datasets/issues/2583 | Error iteration over IterableDataset using Torch DataLoader | Hi ! This is because you first need to format the dataset for pytorch:
```python
>>> import torch
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> torch_iterable_dataset = dataset.with_format("torch")
>>> assert isinstance(torch_iterable_dataset, torch.utils.data.IterableDataset)
>>> dataloader = torch.utils.data.DataLoader(torch_iterable_dataset, batch_size=4)
>>> next(iter(dataloader))
{'id': tensor([0, 1, 2, 3]), 'text': ['Mtendere Village was inspired...]}
```
This is because the pytorch dataloader expects a subclass of `torch.utils.data.IterableDataset`. Since you can't pass an arbitrary iterable to a pytorch dataloader, you first need to build an object that inherits from `torch.utils.data.IterableDataset` using `with_format("torch")` for example.
| ## Describe the bug
I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler.
I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me.
## Steps to reproduce the bug
1. Does not work.
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4)
>>> dataloader.sampler
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
>>> for batch in dataloader:
... print(batch)
```
2. Works.
```python
import torch
from torch.utils.data import Dataset, IterableDataset, DataLoader
class CustomIterableDataset(IterableDataset):
'Characterizes a dataset for PyTorch'
def __init__(self, data):
'Initialization'
self.data = data
def __iter__(self):
return iter(self.data)
data = list(range(12))
dataset = CustomIterableDataset(data)
dataloader = DataLoader(dataset, batch_size=4)
print("dataloader: ", dataloader.sampler)
for batch in dataloader:
print(batch)
```
## Expected results
To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different.
dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50>
tensor([0, 1, 2, 3])
tensor([4, 5, 6, 7])
tensor([ 8, 9, 10, 11])
## Actual results
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data
index = self._next_index() # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__
for idx in self.sampler:
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__
return iter(range(len(self.data_source)))
TypeError: object of type 'IterableDataset' has no len()
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: '1.8.1.dev0'
- Platform: Linux
- Python version: Python 3.6.8
- PyArrow version: '3.0.0'
| 93 | Error iteration over IterableDataset using Torch DataLoader
## Describe the bug
I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler.
I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me.
## Steps to reproduce the bug
1. Does not work.
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4)
>>> dataloader.sampler
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
>>> for batch in dataloader:
... print(batch)
```
2. Works.
```python
import torch
from torch.utils.data import Dataset, IterableDataset, DataLoader
class CustomIterableDataset(IterableDataset):
'Characterizes a dataset for PyTorch'
def __init__(self, data):
'Initialization'
self.data = data
def __iter__(self):
return iter(self.data)
data = list(range(12))
dataset = CustomIterableDataset(data)
dataloader = DataLoader(dataset, batch_size=4)
print("dataloader: ", dataloader.sampler)
for batch in dataloader:
print(batch)
```
## Expected results
To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different.
dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50>
tensor([0, 1, 2, 3])
tensor([4, 5, 6, 7])
tensor([ 8, 9, 10, 11])
## Actual results
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data
index = self._next_index() # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__
for idx in self.sampler:
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__
return iter(range(len(self.data_source)))
TypeError: object of type 'IterableDataset' has no len()
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: '1.8.1.dev0'
- Platform: Linux
- Python version: Python 3.6.8
- PyArrow version: '3.0.0'
Hi ! This is because you first need to format the dataset for pytorch:
```python
>>> import torch
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> torch_iterable_dataset = dataset.with_format("torch")
>>> assert isinstance(torch_iterable_dataset, torch.utils.data.IterableDataset)
>>> dataloader = torch.utils.data.DataLoader(torch_iterable_dataset, batch_size=4)
>>> next(iter(dataloader))
{'id': tensor([0, 1, 2, 3]), 'text': ['Mtendere Village was inspired...]}
```
This is because the pytorch dataloader expects a subclass of `torch.utils.data.IterableDataset`. Since you can't pass an arbitrary iterable to a pytorch dataloader, you first need to build an object that inherits from `torch.utils.data.IterableDataset` using `with_format("torch")` for example.
| [
-0.1759884655,
-0.332582742,
-0.0121409893,
0.2365850508,
0.1552751809,
0.0204122066,
0.4311745167,
0.0018048864,
-0.1689609438,
0.2460097671,
0.0963450745,
0.2442094088,
-0.3354811072,
-0.4065968692,
-0.2495774925,
-0.2147274762,
0.0861799121,
-0.2172201425,
-0.2279188335,
-0.0843941122,
-0.1583955139,
-0.0314956829,
-0.238176465,
-0.0334472209,
-0.0213508736,
-0.0244186297,
-0.1205983236,
0.0094268257,
0.0826327354,
-0.5168218613,
0.4132376313,
0.0784673095,
0.5836471319,
0.5928801298,
-0.0001213014,
0.0804408342,
0.5695521235,
-0.1488479674,
-0.340675354,
0.0339829847,
0.1853102446,
0.1231121421,
0.1892296672,
-0.2503038645,
0.0085637867,
-0.1373455524,
0.0413328111,
-0.4429119229,
0.0277452134,
0.0911382884,
0.127350986,
0.1404463798,
-0.2152101398,
-0.1551948488,
0.0873392224,
0.083843641,
-0.066005677,
0.3676381707,
0.6034707427,
0.1462023258,
-0.2805480659,
0.1023531258,
-0.0515719466,
0.1446328908,
0.2025338858,
-0.2065145522,
-0.1518071294,
-0.1411313713,
0.016584944,
0.1377263963,
0.4296509027,
-0.3647226691,
-0.2566862702,
-0.2134338915,
-0.0908373296,
-0.0081763566,
-0.0515620448,
0.2455939949,
-0.251760304,
-0.1019133031,
-0.105352208,
0.2945756018,
-0.2935188711,
0.150604859,
0.1208927035,
0.0607558377,
-0.0605423301,
0.4181459546,
-0.0258092545,
-0.0496776588,
0.4104275107,
-0.1466063708,
0.1139801592,
0.1791275442,
-0.4098131061,
0.1215737462,
-0.0745931715,
0.0343863294,
0.1090586782,
0.2285431921,
0.1912997961,
-0.0721806213,
0.2148059905,
-0.0758833513,
0.2809827924,
0.2104016095,
0.1607043743,
0.1309028715,
-0.0484362021,
0.1294629872,
0.1207150072,
-0.0431572944,
-0.0131196007,
-0.2782547772,
0.3315113187,
0.2297445238,
0.2427380383,
0.0218726248,
-0.2630299628,
-0.0671554059,
-0.3772152662,
-0.0464772284,
0.0921516269,
0.0312093012,
-0.0663537681,
-0.0182396788,
0.0260313749,
0.2194152176,
0.0019600466,
-0.1363485754,
-0.0449673459,
-0.0634315014,
-0.236984387,
0.1653114855,
0.013812758,
-0.5259138346,
0.2178765535,
0.0743200183,
0.1240425408,
0.0981905907,
0.1407573074,
-0.1538313925,
0.0876519457,
-0.1886788011,
0.1085833162,
0.2937153578,
0.0909667462,
0.3701994717,
0.1703477949,
0.3358136117,
-0.2139511108,
-0.4311693907,
-0.0041144919,
0.131505549,
-0.1349409819,
0.148401022,
-0.1661925465,
0.0139728561,
0.3592302799,
-0.086299479,
0.2563605011,
-0.3309458494,
0.0854894668,
-0.307410121,
-0.1566836536,
0.3201506734,
-0.5023247004,
-0.0094211772,
0.0944094658,
-0.124231182,
0.4520847201,
0.1644668728,
-0.3807598948,
0.3596852422,
-0.4563367963,
-0.0022496432,
0.0037130341,
-0.4484593272,
-0.4353868663,
0.2547228038,
0.0600686967,
0.2916577756,
0.1757151932,
0.0443593897,
0.4281604886,
-0.3241613805,
0.1788841337,
0.018160779,
-0.2364028543,
-0.1766928285,
-0.3059002757,
0.0654295906,
0.3222926557,
0.1215377972,
0.0787644237,
0.2113110423,
-0.0018347055,
0.0364535935,
0.2559022903,
-0.1622607112,
0.1733243167,
0.2712681293,
-0.0221527051,
0.1062511206,
0.1877066791,
-0.0639052838,
-0.3826923966,
0.1902541518,
-0.03414407,
0.0252883639,
0.0248266198,
-0.0357974656,
0.0746428147,
0.1515570134,
-0.4089159369,
-0.1956709921,
0.0207004026,
0.3267152309,
0.2401633263,
-0.3410866261,
0.0510258377,
0.1779325455,
-0.3679127097,
-0.0905416757,
-0.65303725,
-0.0157553777,
0.1605355442,
-0.2572538853,
0.0066904724,
0.0078655519,
0.2089660764,
-0.2063675672,
-0.0949184299,
0.2147934735,
-0.1238060743,
-0.1281570345,
-0.17848818,
-0.0105121285,
0.06133347,
-0.2036594152,
-0.0033434043,
0.38118577,
0.220655784,
-0.1643150598,
0.1571409553,
0.4330126047,
-0.1378976256,
0.483874321,
-0.0734656826,
-0.0011859387,
0.0547131971,
0.2082166374,
-0.4597417712,
0.1447860152,
0.2501414418,
-0.0622137152,
0.4288069606,
-0.1978160292,
-0.3633214235,
0.0964462087,
-0.065123871,
-0.016503498,
-0.1332327574,
0.1762126088,
-0.2831245959,
0.0837610215,
0.137537092,
-0.0159250125,
0.6980896592,
0.0048870035,
0.0211556181,
-0.1067588478,
0.1212170273,
-0.0663994029,
0.0172512569,
0.2396637797,
0.0811800212,
0.1726079285,
0.0910499617,
-0.1229047105,
-0.0504768007,
-0.4383983016,
-0.1312050372,
0.1998896897,
-0.0802581012,
0.3007241488,
0.0954555199,
-0.1390554309,
-0.3806459904,
-0.5877687931,
0.0185131729,
-0.2711994946,
-0.2329486012,
0.5140380859,
0.0763323903,
0.1100408807,
0.0438054949,
0.1240863651,
0.3323760629,
-0.1041977853,
-0.0159292966,
-0.0392115936,
-0.3659597039,
-0.0314607993,
-0.0236697346,
-0.6017325521,
0.3704042137,
0.1343913972,
0.0404743403,
-0.4792012274,
0.1423618197,
0.0473594517,
-0.0661915168,
0.0706466287,
0.4086329043,
-0.0504629388,
0.2938432395,
-0.2023870647,
0.3072181642,
-0.0948520005,
0.0008259863,
0.0853472501,
-0.0931670442,
-0.0026090965,
0.1463581622,
-0.0368867032,
-0.2398696393,
-0.2074588835,
-0.0861337483,
0.0731801242,
-0.0081963502,
0.1651799828,
0.0242371373,
0.0953033417,
0.4552521706,
-0.1504248977,
-0.0639602318,
-0.4166636765,
0.193869099,
-0.3335471749,
-0.2859092653,
-0.2267334461,
-0.2294799685,
0.2497809976,
0.3717752099,
-0.3056230247,
-0.1961061209,
-0.0602118149,
0.2252773046,
-0.0817712545,
-0.0425032079,
0.2050270736,
-0.1281115711,
0.0889527127,
-0.1457213759,
-0.1033763885,
0.0690962225,
-0.242573157,
0.3543994725,
0.2895655632,
0.5595615506,
0.1378501505,
0.9526196718,
0.4625447392,
-0.1511878073,
0.2041901201,
0.0080108568,
-0.1384087801,
-0.0857748389,
-0.3842644095,
0.2152826935,
-0.2100381851,
-0.3123048842,
0.1660801172,
-0.2149702013,
-0.1047036275,
0.082731843,
0.097254023,
-0.0089915246,
-0.1037501097,
0.1755975932,
-0.5570783019,
0.1904159784,
-0.1468600631,
0.242672801,
-0.2869228125,
-0.125882864,
-0.0369661748,
0.0424438007,
0.2459215075,
0.0515735112,
-0.1893104017,
0.0190865658,
-0.612787962,
0.3754479885,
0.1767864525,
0.6406633258,
0.1874256134,
-0.1155641899,
0.1879217178,
0.0049157962,
0.7799475789,
-0.1074885502,
-0.2398391068,
-0.0036273897,
-0.1669650078,
-0.7163996696,
-0.4133670926,
-0.1469400823,
0.7751927376,
0.1555387676,
-0.0751458779,
-0.1394628882,
-0.0331800878,
0.1941220611,
0.0733933002,
-0.2068859339,
-0.1690137535,
-0.1187551469,
-0.3793282509,
-0.0894919187,
-0.284098655,
0.051700078,
0.1906179786,
-0.0854410231,
0.061272949,
-0.2614085078,
-0.0143884942,
0.0583548732,
-0.0894984454,
0.1643390656,
-0.213730514,
0.21244362,
-0.012210954,
0.2840588391,
0.4879257381,
0.2832310498,
-0.0035641342,
-0.5100496411,
0.2887408435,
-0.1830690354,
0.0378486142,
0.2061844766,
-0.1886099875,
0.0803613365,
-0.1013225764,
-0.0213963091,
-0.2109727263,
-0.093489334,
0.3020631075,
0.0530126952,
-0.6308022141,
-0.5626425743,
0.1728119254,
0.2680610716,
0.0526801497,
0.6681531668,
-0.3985096812,
-0.2715952992,
0.2776997685,
0.0838840678,
0.7267509699,
0.1485251784,
-0.0557478257,
0.2326149344,
0.2090160549,
0.0186766014,
0.3115620613,
0.2369673401,
-0.3453316987,
-0.2272445858,
-0.026991643,
-0.1897986531,
0.1221774369,
0.182643488,
-0.0632820278,
0.3318238258,
-0.1436600536,
0.0459794626,
0.1270072758,
-0.1268929243,
-0.2129749954,
-0.1338790804,
0.0956513882,
0.0851188302,
0.0057661925,
0.2564904094,
-0.1728529632,
-0.0926574618,
0.0668791458,
-0.1555244476,
-0.2618393004,
0.044389993,
-0.2230004966,
0.0985851362,
0.2456181645,
-0.5232537985,
0.0501230285,
0.2158945054,
0.3522298038,
-0.3627727032,
-0.002662681,
-0.0294202045,
0.1182428747,
-0.0233423337,
-0.2029041052,
-0.2077226937,
0.4870974422,
0.0405511186,
0.0995511711,
0.3205989003,
0.0713343173,
-0.468100369,
-0.2282392234,
0.2966569662,
0.4771988988,
-0.5392913222,
-0.2319697738,
-0.2508274019,
-0.2199192345,
-0.2363426387,
0.0104449149,
0.0206888504,
-0.2876823843,
0.1941116154,
-0.1743819714,
-0.1259074807,
0.091926612,
0.524477005,
0.3316214085,
-0.0492080338,
0.461022079,
0.1272780299,
-0.0780188069,
0.0172996297,
-0.0337953568,
0.2742296457,
-0.6039993763,
0.3320974112,
-0.3019654751,
0.5657223463,
-0.0477753021,
0.3233405948,
0.014581684,
0.064534612,
-0.3575258851,
-0.2525316775,
-0.2616004646,
-0.1055723578,
0.0183100458,
0.2605783343,
0.0524432138,
0.1213142127,
0.0727652907,
-0.0829663798,
-0.195993349,
-0.1801849008,
-0.0205957256,
0.1617284119,
0.150817886,
0.0620183311,
-0.1045728326,
0.3312746584,
-0.0536825135,
0.4063278139,
0.0199252144,
-0.1504730433,
-0.0276323631,
0.1699349284,
0.0605211556,
-0.1047079265,
-0.1692231894,
-0.20600155,
0.0063545369,
-0.0602119789,
0.2894998193,
0.2464597821,
0.0399106443,
0.1423617601,
0.3173554838,
0.0431839749,
-0.0860952213,
0.0958948806,
0.101561904,
0.3374266326,
0.1774800569,
0.1356684268,
0.1120506376,
-0.1733809263,
-0.320132941,
0.1238113642,
0.2855204344,
0.2208070159,
-0.0624334849,
-0.5807868838,
0.1231828332,
0.0236729421,
0.1875419766,
0.3630837798,
-0.3631701767,
-0.1094985157,
0.0990888178,
0.0556391589,
0.0512084812,
-0.0702481419,
-0.1832478642,
0.0333971605,
0.0226570442,
0.2685618997,
-0.0871396363,
-0.2271841317,
0.1649127454,
-0.0110575669,
0.3474287391,
-0.1377611458,
0.1077494249,
0.3673086762,
0.1531879902,
0.0195034444,
0.3287825882,
0.0738376826,
0.0621764474,
0.4536162317,
0.0433849506,
0.6263990402,
0.3133953214,
-0.2698844373,
0.1048175395,
-0.3597236872,
-0.1315759271,
-0.0644460693,
0.1428935081,
0.2984361947,
0.0719244182,
0.4628481567,
-0.17626445,
-0.3152383268,
0.0487586558,
-0.2423636764,
-0.0856386796,
-0.1142398939,
-0.393078208,
-0.1982115656,
0.2366156727,
-0.0277265795,
-0.0908589959,
-0.0120656937,
0.1886203885,
-0.1014314219,
-0.2059572786,
-0.5857435465,
-0.1734374464,
0.2839125097,
-0.0624017715,
-0.1222303584,
0.1527831405,
0.1245498955,
0.1562816352,
0.1507202834,
0.3055031598,
0.4985908568,
0.5325031877,
-0.1081288531,
0.1050314456,
-0.1505072713,
-0.0687114745,
-0.0157817826,
0.175681904,
-0.1252217591,
-0.1440995932,
0.4051366746,
0.0661146268,
-0.0606725365,
0.3941461146,
0.322177738,
0.0434569567,
-0.234154135,
0.1143152043,
-0.127859354,
0.0654474571,
-0.1382031292,
0.0156581681,
-0.3902927041,
-0.0595421121,
0.3030414581,
-0.3966249526,
0.1129760295,
-0.0389323272,
0.0263054259,
-0.419669956,
0.3758590817,
0.3221402466,
0.1738785803,
-0.2213013917,
-0.1402682513,
-0.1009961143,
0.179258436,
-0.2492880374,
0.1136269942,
-0.0460796952,
0.3102742434,
-0.1072594374,
0.1317005455,
0.1980300844,
0.0027527884,
-0.0639496818,
0.7769204974,
-0.2023664117,
-0.4061402977,
0.0042585507,
0.0891184956,
0.0659045577,
-0.4869768023,
-0.0633902103,
-0.0967299044,
0.0390017852,
-0.1039437205,
-0.2570982575,
0.2701438665,
-0.0108228065,
0.3218631148,
0.175992012,
0.0821825564,
0.0472046286,
-0.0393468291,
-0.4764399827,
-0.0358137563,
-0.0921205431,
0.1186224371,
0.0973650217,
0.2948977947,
0.0137289986,
-0.1338669956,
-0.2598081231,
0.3552681506,
0.3722302318,
0.06365107,
-0.3439749777,
0.2925575972,
-0.4009211063,
0.1828525513,
0.0169193782,
0.3256892264,
0.2241051495,
0.3691231906,
-0.2892660499,
-0.3230033517,
0.5461324453,
-0.8041621447,
-0.3581658602,
0.0187152438,
-0.1205215752,
-0.0071668401,
-0.0818938911,
-0.3705402613,
0.0837900192,
0.3755957484,
-0.1093962044,
0.0316317156,
0.0740495175,
0.0892176181,
0.1829012781,
-0.0885551423,
0.1710423827,
0.2066063583,
-0.0825921595,
0.2809370756,
-0.3231045604
] |
https://github.com/huggingface/datasets/issues/2583 | Error iteration over IterableDataset using Torch DataLoader | Thank you for that and the example!
What you said makes total sense; I just somehow missed that and assumed HF IterableDataset was a subclass of Torch IterableDataset. | ## Describe the bug
I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler.
I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me.
## Steps to reproduce the bug
1. Does not work.
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4)
>>> dataloader.sampler
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
>>> for batch in dataloader:
... print(batch)
```
2. Works.
```python
import torch
from torch.utils.data import Dataset, IterableDataset, DataLoader
class CustomIterableDataset(IterableDataset):
'Characterizes a dataset for PyTorch'
def __init__(self, data):
'Initialization'
self.data = data
def __iter__(self):
return iter(self.data)
data = list(range(12))
dataset = CustomIterableDataset(data)
dataloader = DataLoader(dataset, batch_size=4)
print("dataloader: ", dataloader.sampler)
for batch in dataloader:
print(batch)
```
## Expected results
To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different.
dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50>
tensor([0, 1, 2, 3])
tensor([4, 5, 6, 7])
tensor([ 8, 9, 10, 11])
## Actual results
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data
index = self._next_index() # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__
for idx in self.sampler:
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__
return iter(range(len(self.data_source)))
TypeError: object of type 'IterableDataset' has no len()
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: '1.8.1.dev0'
- Platform: Linux
- Python version: Python 3.6.8
- PyArrow version: '3.0.0'
| 28 | Error iteration over IterableDataset using Torch DataLoader
## Describe the bug
I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler.
I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me.
## Steps to reproduce the bug
1. Does not work.
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4)
>>> dataloader.sampler
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
>>> for batch in dataloader:
... print(batch)
```
2. Works.
```python
import torch
from torch.utils.data import Dataset, IterableDataset, DataLoader
class CustomIterableDataset(IterableDataset):
'Characterizes a dataset for PyTorch'
def __init__(self, data):
'Initialization'
self.data = data
def __iter__(self):
return iter(self.data)
data = list(range(12))
dataset = CustomIterableDataset(data)
dataloader = DataLoader(dataset, batch_size=4)
print("dataloader: ", dataloader.sampler)
for batch in dataloader:
print(batch)
```
## Expected results
To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different.
dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50>
tensor([0, 1, 2, 3])
tensor([4, 5, 6, 7])
tensor([ 8, 9, 10, 11])
## Actual results
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data
index = self._next_index() # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__
for idx in self.sampler:
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__
return iter(range(len(self.data_source)))
TypeError: object of type 'IterableDataset' has no len()
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: '1.8.1.dev0'
- Platform: Linux
- Python version: Python 3.6.8
- PyArrow version: '3.0.0'
Thank you for that and the example!
What you said makes total sense; I just somehow missed that and assumed HF IterableDataset was a subclass of Torch IterableDataset. | [
-0.1759884655,
-0.332582742,
-0.0121409893,
0.2365850508,
0.1552751809,
0.0204122066,
0.4311745167,
0.0018048864,
-0.1689609438,
0.2460097671,
0.0963450745,
0.2442094088,
-0.3354811072,
-0.4065968692,
-0.2495774925,
-0.2147274762,
0.0861799121,
-0.2172201425,
-0.2279188335,
-0.0843941122,
-0.1583955139,
-0.0314956829,
-0.238176465,
-0.0334472209,
-0.0213508736,
-0.0244186297,
-0.1205983236,
0.0094268257,
0.0826327354,
-0.5168218613,
0.4132376313,
0.0784673095,
0.5836471319,
0.5928801298,
-0.0001213014,
0.0804408342,
0.5695521235,
-0.1488479674,
-0.340675354,
0.0339829847,
0.1853102446,
0.1231121421,
0.1892296672,
-0.2503038645,
0.0085637867,
-0.1373455524,
0.0413328111,
-0.4429119229,
0.0277452134,
0.0911382884,
0.127350986,
0.1404463798,
-0.2152101398,
-0.1551948488,
0.0873392224,
0.083843641,
-0.066005677,
0.3676381707,
0.6034707427,
0.1462023258,
-0.2805480659,
0.1023531258,
-0.0515719466,
0.1446328908,
0.2025338858,
-0.2065145522,
-0.1518071294,
-0.1411313713,
0.016584944,
0.1377263963,
0.4296509027,
-0.3647226691,
-0.2566862702,
-0.2134338915,
-0.0908373296,
-0.0081763566,
-0.0515620448,
0.2455939949,
-0.251760304,
-0.1019133031,
-0.105352208,
0.2945756018,
-0.2935188711,
0.150604859,
0.1208927035,
0.0607558377,
-0.0605423301,
0.4181459546,
-0.0258092545,
-0.0496776588,
0.4104275107,
-0.1466063708,
0.1139801592,
0.1791275442,
-0.4098131061,
0.1215737462,
-0.0745931715,
0.0343863294,
0.1090586782,
0.2285431921,
0.1912997961,
-0.0721806213,
0.2148059905,
-0.0758833513,
0.2809827924,
0.2104016095,
0.1607043743,
0.1309028715,
-0.0484362021,
0.1294629872,
0.1207150072,
-0.0431572944,
-0.0131196007,
-0.2782547772,
0.3315113187,
0.2297445238,
0.2427380383,
0.0218726248,
-0.2630299628,
-0.0671554059,
-0.3772152662,
-0.0464772284,
0.0921516269,
0.0312093012,
-0.0663537681,
-0.0182396788,
0.0260313749,
0.2194152176,
0.0019600466,
-0.1363485754,
-0.0449673459,
-0.0634315014,
-0.236984387,
0.1653114855,
0.013812758,
-0.5259138346,
0.2178765535,
0.0743200183,
0.1240425408,
0.0981905907,
0.1407573074,
-0.1538313925,
0.0876519457,
-0.1886788011,
0.1085833162,
0.2937153578,
0.0909667462,
0.3701994717,
0.1703477949,
0.3358136117,
-0.2139511108,
-0.4311693907,
-0.0041144919,
0.131505549,
-0.1349409819,
0.148401022,
-0.1661925465,
0.0139728561,
0.3592302799,
-0.086299479,
0.2563605011,
-0.3309458494,
0.0854894668,
-0.307410121,
-0.1566836536,
0.3201506734,
-0.5023247004,
-0.0094211772,
0.0944094658,
-0.124231182,
0.4520847201,
0.1644668728,
-0.3807598948,
0.3596852422,
-0.4563367963,
-0.0022496432,
0.0037130341,
-0.4484593272,
-0.4353868663,
0.2547228038,
0.0600686967,
0.2916577756,
0.1757151932,
0.0443593897,
0.4281604886,
-0.3241613805,
0.1788841337,
0.018160779,
-0.2364028543,
-0.1766928285,
-0.3059002757,
0.0654295906,
0.3222926557,
0.1215377972,
0.0787644237,
0.2113110423,
-0.0018347055,
0.0364535935,
0.2559022903,
-0.1622607112,
0.1733243167,
0.2712681293,
-0.0221527051,
0.1062511206,
0.1877066791,
-0.0639052838,
-0.3826923966,
0.1902541518,
-0.03414407,
0.0252883639,
0.0248266198,
-0.0357974656,
0.0746428147,
0.1515570134,
-0.4089159369,
-0.1956709921,
0.0207004026,
0.3267152309,
0.2401633263,
-0.3410866261,
0.0510258377,
0.1779325455,
-0.3679127097,
-0.0905416757,
-0.65303725,
-0.0157553777,
0.1605355442,
-0.2572538853,
0.0066904724,
0.0078655519,
0.2089660764,
-0.2063675672,
-0.0949184299,
0.2147934735,
-0.1238060743,
-0.1281570345,
-0.17848818,
-0.0105121285,
0.06133347,
-0.2036594152,
-0.0033434043,
0.38118577,
0.220655784,
-0.1643150598,
0.1571409553,
0.4330126047,
-0.1378976256,
0.483874321,
-0.0734656826,
-0.0011859387,
0.0547131971,
0.2082166374,
-0.4597417712,
0.1447860152,
0.2501414418,
-0.0622137152,
0.4288069606,
-0.1978160292,
-0.3633214235,
0.0964462087,
-0.065123871,
-0.016503498,
-0.1332327574,
0.1762126088,
-0.2831245959,
0.0837610215,
0.137537092,
-0.0159250125,
0.6980896592,
0.0048870035,
0.0211556181,
-0.1067588478,
0.1212170273,
-0.0663994029,
0.0172512569,
0.2396637797,
0.0811800212,
0.1726079285,
0.0910499617,
-0.1229047105,
-0.0504768007,
-0.4383983016,
-0.1312050372,
0.1998896897,
-0.0802581012,
0.3007241488,
0.0954555199,
-0.1390554309,
-0.3806459904,
-0.5877687931,
0.0185131729,
-0.2711994946,
-0.2329486012,
0.5140380859,
0.0763323903,
0.1100408807,
0.0438054949,
0.1240863651,
0.3323760629,
-0.1041977853,
-0.0159292966,
-0.0392115936,
-0.3659597039,
-0.0314607993,
-0.0236697346,
-0.6017325521,
0.3704042137,
0.1343913972,
0.0404743403,
-0.4792012274,
0.1423618197,
0.0473594517,
-0.0661915168,
0.0706466287,
0.4086329043,
-0.0504629388,
0.2938432395,
-0.2023870647,
0.3072181642,
-0.0948520005,
0.0008259863,
0.0853472501,
-0.0931670442,
-0.0026090965,
0.1463581622,
-0.0368867032,
-0.2398696393,
-0.2074588835,
-0.0861337483,
0.0731801242,
-0.0081963502,
0.1651799828,
0.0242371373,
0.0953033417,
0.4552521706,
-0.1504248977,
-0.0639602318,
-0.4166636765,
0.193869099,
-0.3335471749,
-0.2859092653,
-0.2267334461,
-0.2294799685,
0.2497809976,
0.3717752099,
-0.3056230247,
-0.1961061209,
-0.0602118149,
0.2252773046,
-0.0817712545,
-0.0425032079,
0.2050270736,
-0.1281115711,
0.0889527127,
-0.1457213759,
-0.1033763885,
0.0690962225,
-0.242573157,
0.3543994725,
0.2895655632,
0.5595615506,
0.1378501505,
0.9526196718,
0.4625447392,
-0.1511878073,
0.2041901201,
0.0080108568,
-0.1384087801,
-0.0857748389,
-0.3842644095,
0.2152826935,
-0.2100381851,
-0.3123048842,
0.1660801172,
-0.2149702013,
-0.1047036275,
0.082731843,
0.097254023,
-0.0089915246,
-0.1037501097,
0.1755975932,
-0.5570783019,
0.1904159784,
-0.1468600631,
0.242672801,
-0.2869228125,
-0.125882864,
-0.0369661748,
0.0424438007,
0.2459215075,
0.0515735112,
-0.1893104017,
0.0190865658,
-0.612787962,
0.3754479885,
0.1767864525,
0.6406633258,
0.1874256134,
-0.1155641899,
0.1879217178,
0.0049157962,
0.7799475789,
-0.1074885502,
-0.2398391068,
-0.0036273897,
-0.1669650078,
-0.7163996696,
-0.4133670926,
-0.1469400823,
0.7751927376,
0.1555387676,
-0.0751458779,
-0.1394628882,
-0.0331800878,
0.1941220611,
0.0733933002,
-0.2068859339,
-0.1690137535,
-0.1187551469,
-0.3793282509,
-0.0894919187,
-0.284098655,
0.051700078,
0.1906179786,
-0.0854410231,
0.061272949,
-0.2614085078,
-0.0143884942,
0.0583548732,
-0.0894984454,
0.1643390656,
-0.213730514,
0.21244362,
-0.012210954,
0.2840588391,
0.4879257381,
0.2832310498,
-0.0035641342,
-0.5100496411,
0.2887408435,
-0.1830690354,
0.0378486142,
0.2061844766,
-0.1886099875,
0.0803613365,
-0.1013225764,
-0.0213963091,
-0.2109727263,
-0.093489334,
0.3020631075,
0.0530126952,
-0.6308022141,
-0.5626425743,
0.1728119254,
0.2680610716,
0.0526801497,
0.6681531668,
-0.3985096812,
-0.2715952992,
0.2776997685,
0.0838840678,
0.7267509699,
0.1485251784,
-0.0557478257,
0.2326149344,
0.2090160549,
0.0186766014,
0.3115620613,
0.2369673401,
-0.3453316987,
-0.2272445858,
-0.026991643,
-0.1897986531,
0.1221774369,
0.182643488,
-0.0632820278,
0.3318238258,
-0.1436600536,
0.0459794626,
0.1270072758,
-0.1268929243,
-0.2129749954,
-0.1338790804,
0.0956513882,
0.0851188302,
0.0057661925,
0.2564904094,
-0.1728529632,
-0.0926574618,
0.0668791458,
-0.1555244476,
-0.2618393004,
0.044389993,
-0.2230004966,
0.0985851362,
0.2456181645,
-0.5232537985,
0.0501230285,
0.2158945054,
0.3522298038,
-0.3627727032,
-0.002662681,
-0.0294202045,
0.1182428747,
-0.0233423337,
-0.2029041052,
-0.2077226937,
0.4870974422,
0.0405511186,
0.0995511711,
0.3205989003,
0.0713343173,
-0.468100369,
-0.2282392234,
0.2966569662,
0.4771988988,
-0.5392913222,
-0.2319697738,
-0.2508274019,
-0.2199192345,
-0.2363426387,
0.0104449149,
0.0206888504,
-0.2876823843,
0.1941116154,
-0.1743819714,
-0.1259074807,
0.091926612,
0.524477005,
0.3316214085,
-0.0492080338,
0.461022079,
0.1272780299,
-0.0780188069,
0.0172996297,
-0.0337953568,
0.2742296457,
-0.6039993763,
0.3320974112,
-0.3019654751,
0.5657223463,
-0.0477753021,
0.3233405948,
0.014581684,
0.064534612,
-0.3575258851,
-0.2525316775,
-0.2616004646,
-0.1055723578,
0.0183100458,
0.2605783343,
0.0524432138,
0.1213142127,
0.0727652907,
-0.0829663798,
-0.195993349,
-0.1801849008,
-0.0205957256,
0.1617284119,
0.150817886,
0.0620183311,
-0.1045728326,
0.3312746584,
-0.0536825135,
0.4063278139,
0.0199252144,
-0.1504730433,
-0.0276323631,
0.1699349284,
0.0605211556,
-0.1047079265,
-0.1692231894,
-0.20600155,
0.0063545369,
-0.0602119789,
0.2894998193,
0.2464597821,
0.0399106443,
0.1423617601,
0.3173554838,
0.0431839749,
-0.0860952213,
0.0958948806,
0.101561904,
0.3374266326,
0.1774800569,
0.1356684268,
0.1120506376,
-0.1733809263,
-0.320132941,
0.1238113642,
0.2855204344,
0.2208070159,
-0.0624334849,
-0.5807868838,
0.1231828332,
0.0236729421,
0.1875419766,
0.3630837798,
-0.3631701767,
-0.1094985157,
0.0990888178,
0.0556391589,
0.0512084812,
-0.0702481419,
-0.1832478642,
0.0333971605,
0.0226570442,
0.2685618997,
-0.0871396363,
-0.2271841317,
0.1649127454,
-0.0110575669,
0.3474287391,
-0.1377611458,
0.1077494249,
0.3673086762,
0.1531879902,
0.0195034444,
0.3287825882,
0.0738376826,
0.0621764474,
0.4536162317,
0.0433849506,
0.6263990402,
0.3133953214,
-0.2698844373,
0.1048175395,
-0.3597236872,
-0.1315759271,
-0.0644460693,
0.1428935081,
0.2984361947,
0.0719244182,
0.4628481567,
-0.17626445,
-0.3152383268,
0.0487586558,
-0.2423636764,
-0.0856386796,
-0.1142398939,
-0.393078208,
-0.1982115656,
0.2366156727,
-0.0277265795,
-0.0908589959,
-0.0120656937,
0.1886203885,
-0.1014314219,
-0.2059572786,
-0.5857435465,
-0.1734374464,
0.2839125097,
-0.0624017715,
-0.1222303584,
0.1527831405,
0.1245498955,
0.1562816352,
0.1507202834,
0.3055031598,
0.4985908568,
0.5325031877,
-0.1081288531,
0.1050314456,
-0.1505072713,
-0.0687114745,
-0.0157817826,
0.175681904,
-0.1252217591,
-0.1440995932,
0.4051366746,
0.0661146268,
-0.0606725365,
0.3941461146,
0.322177738,
0.0434569567,
-0.234154135,
0.1143152043,
-0.127859354,
0.0654474571,
-0.1382031292,
0.0156581681,
-0.3902927041,
-0.0595421121,
0.3030414581,
-0.3966249526,
0.1129760295,
-0.0389323272,
0.0263054259,
-0.419669956,
0.3758590817,
0.3221402466,
0.1738785803,
-0.2213013917,
-0.1402682513,
-0.1009961143,
0.179258436,
-0.2492880374,
0.1136269942,
-0.0460796952,
0.3102742434,
-0.1072594374,
0.1317005455,
0.1980300844,
0.0027527884,
-0.0639496818,
0.7769204974,
-0.2023664117,
-0.4061402977,
0.0042585507,
0.0891184956,
0.0659045577,
-0.4869768023,
-0.0633902103,
-0.0967299044,
0.0390017852,
-0.1039437205,
-0.2570982575,
0.2701438665,
-0.0108228065,
0.3218631148,
0.175992012,
0.0821825564,
0.0472046286,
-0.0393468291,
-0.4764399827,
-0.0358137563,
-0.0921205431,
0.1186224371,
0.0973650217,
0.2948977947,
0.0137289986,
-0.1338669956,
-0.2598081231,
0.3552681506,
0.3722302318,
0.06365107,
-0.3439749777,
0.2925575972,
-0.4009211063,
0.1828525513,
0.0169193782,
0.3256892264,
0.2241051495,
0.3691231906,
-0.2892660499,
-0.3230033517,
0.5461324453,
-0.8041621447,
-0.3581658602,
0.0187152438,
-0.1205215752,
-0.0071668401,
-0.0818938911,
-0.3705402613,
0.0837900192,
0.3755957484,
-0.1093962044,
0.0316317156,
0.0740495175,
0.0892176181,
0.1829012781,
-0.0885551423,
0.1710423827,
0.2066063583,
-0.0825921595,
0.2809370756,
-0.3231045604
] |
https://github.com/huggingface/datasets/issues/2573 | Finding right block-size with JSON loading difficult for user | This was actually a second error arising from a too small block-size in the json reader.
Finding the right block size is difficult for the layman user | As reported by @thomwolf, while loading a JSON Lines file with "json" loading script, he gets
> json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 383)
| 27 | Finding right block-size with JSON loading difficult for user
As reported by @thomwolf, while loading a JSON Lines file with "json" loading script, he gets
> json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 383)
This was actually a second error arising from a too small block-size in the json reader.
Finding the right block size is difficult for the layman user | [
0.095607087,
0.0020217896,
-0.2247489542,
0.4068728983,
0.134133324,
-0.0870383233,
0.3515782952,
0.3959693313,
0.5053703785,
0.4565081298,
0.2659341991,
-0.0984665304,
0.0224604011,
-0.0638385713,
-0.0379773639,
-0.2568934262,
-0.261859715,
0.2319744676,
0.1568871588,
0.3039900661,
-0.199761942,
0.2665425539,
0.1062275618,
-0.1609103233,
0.2236231565,
0.0587515682,
0.091431886,
0.0959857255,
-0.0711930692,
-0.4359495044,
-0.0447097234,
-0.1151686832,
-0.0743277818,
0.4498322606,
-0.0000995917,
0.0249895453,
0.3473542333,
-0.0728501081,
-0.4421043992,
-0.1200120226,
-0.0604005009,
-0.5030120015,
0.2035161853,
-0.1993365139,
-0.021843683,
-0.1310324967,
-0.066841349,
-0.1065115407,
0.462911129,
0.1220874414,
0.3715200722,
-0.2377005666,
0.0456446707,
0.0361532792,
0.2381216586,
0.0637213588,
0.0411676615,
0.3781585693,
0.3516419828,
0.5234594345,
0.1095335856,
0.0675432533,
-0.071168974,
-0.0298219062,
0.0829157159,
-0.3186948597,
0.2817248702,
-0.0485038497,
0.1941675544,
0.2429831624,
0.486590147,
0.41661641,
-0.0474563092,
-0.3242160678,
0.0322853476,
0.1813374609,
0.3077040315,
0.0795375928,
-0.2536921501,
-0.0226426516,
-0.2651891708,
-0.0648074895,
-0.0264156908,
-0.0369260982,
-0.0485681668,
-0.0989518017,
-0.1725888252,
-0.0340949222,
0.1524478495,
-0.1861771941,
-0.0281529743,
-0.1080389693,
-0.3090917766,
-0.063866511,
0.0473018661,
-0.1721325517,
0.1723933071,
-0.4616983235,
0.0737603605,
0.0164622124,
0.5296996236,
0.1309638917,
0.124232702,
0.0838951468,
0.1776369363,
-0.0081730038,
-0.0359090567,
-0.1953773648,
0.1494318843,
0.27632761,
0.1767872125,
-0.0923809558,
-0.2731758356,
-0.2625055015,
-0.2382463515,
0.0424292497,
-0.0853553712,
-0.132330358,
-0.0086919665,
0.220021531,
-0.4293973744,
-0.0551881343,
0.0649294704,
0.1727652848,
0.0687273294,
0.2640408874,
0.2109945267,
-0.0350076072,
-0.1069792658,
-0.0796667933,
-0.1454557627,
0.0986790806,
0.1120592877,
-0.1924843937,
0.217440635,
0.1487835348,
0.1483709514,
-0.1516090333,
-0.3099974096,
-0.342323184,
0.1462390721,
0.0635308698,
-0.1348581612,
0.2650139332,
0.1864120513,
-0.1065844521,
-0.2369071692,
-0.1228933334,
-0.1800565571,
0.2556235194,
-0.220795244,
-0.1268770397,
0.0242799055,
0.3463029265,
0.0242343098,
0.1429314613,
-0.1664888561,
-0.0688213408,
0.0027222484,
-0.1732435822,
0.0776586235,
-0.2282052636,
0.0448118821,
-0.2076374888,
-0.1221615821,
0.163441211,
-0.3751146793,
-0.1120072976,
0.1969165355,
-0.0536477678,
0.0594987683,
0.3059164584,
-0.2070638239,
0.2804149091,
-0.0869016871,
-0.1196016073,
0.2914659083,
0.1173439845,
-0.2984390557,
0.5185747147,
-0.129973188,
0.2412536442,
0.2093470842,
-0.029225342,
0.1271213591,
0.0056954622,
0.3884541988,
0.2863799334,
0.1438800991,
0.2596036196,
-0.3090475202,
-0.1199651062,
0.0019171746,
0.1428797692,
-0.0248800777,
-0.2754833996,
-0.0984633341,
-0.0076828226,
0.1241574511,
-0.2261895835,
-0.0808176994,
0.2229840606,
-0.0063510528,
-0.1971469969,
0.1822518408,
0.2619439363,
-0.1677092612,
0.024206683,
-0.0506115332,
-0.2076396346,
0.0557607934,
0.0121826977,
-0.0724802241,
-0.1452800333,
0.1470715404,
0.2062344551,
0.301597476,
0.1180320978,
0.1232231557,
-0.2187986821,
0.10078381,
0.0669476539,
0.0789798498,
0.046017874,
-0.2172987461,
0.0409305543,
-0.0568747744,
-0.0933201462,
0.2606040835,
-0.081258826,
-0.0284129716,
-0.3079865575,
-0.2069390565,
0.0034057046,
0.1463597715,
-0.0012323149,
-0.1660546362,
-0.1716947258,
-0.0142641552,
0.4521522224,
0.164097324,
0.3425680101,
0.0488319658,
-0.1035276055,
-0.0192080028,
0.3329326212,
-0.1527857035,
0.0934555829,
-0.0145508125,
-0.2997949123,
0.4019195437,
0.0413826704,
0.1222535968,
-0.0321630165,
0.3996909261,
0.5543019772,
-0.0444616564,
-0.0262638256,
-0.1600778103,
-0.0489269681,
0.4573382437,
-0.2258948088,
0.0071740299,
0.3564727604,
0.1343527734,
-0.1963521689,
-0.1052223295,
0.1182253882,
0.1299023628,
0.1888305247,
-0.0610680878,
-0.1487725526,
0.4033783376,
-0.4765149355,
0.1759025604,
-0.0582787991,
0.1923298836,
0.2282368392,
0.1666170359,
-0.1296430826,
-0.1703409553,
-0.2919538617,
-0.1598016471,
0.1414597481,
-0.216011554,
-0.0383911319,
-0.1749048382,
0.0171436146,
0.1160073876,
-0.1941160113,
0.0634472072,
-0.2764542103,
0.1864841878,
0.0858001485,
-0.3864558935,
-0.231462121,
-0.134224683,
0.4629589319,
-0.1204372197,
0.3889080584,
-0.2953086495,
-0.0841376483,
-0.2262496054,
0.2532869577,
0.4552177787,
-0.0919122919,
0.0816133469,
-0.274921149,
0.0461798348,
0.347112,
-0.0816962719,
-0.0107901692,
0.0228415411,
-0.0600496009,
0.0560305044,
0.4496857524,
0.0836108774,
0.0302209929,
-0.1500127316,
-0.0744830519,
-0.2961722612,
0.2650219798,
-0.0021035895,
-0.1048987731,
-0.3383951187,
-0.2061032653,
0.1078685373,
-0.3975125551,
0.4412339032,
0.232157737,
0.2120520175,
-0.386246711,
0.219859004,
0.1508170664,
0.1889527887,
0.3159148097,
-0.2085716277,
-0.4334500134,
0.1112232134,
-0.2329666615,
-0.4228050113,
0.1300272793,
0.1339904368,
0.0498611853,
-0.2667622864,
-0.4891365469,
0.3003758788,
-0.0521568358,
-0.2767089605,
-0.1889617741,
-0.1978447288,
0.2448018789,
0.0081733502,
-0.1918315887,
0.0152293071,
-0.2356633842,
0.006149739,
0.1423395276,
0.1480261683,
-0.1886840612,
0.6826387048,
-0.0103880018,
0.0446235687,
0.1303073466,
0.0706444085,
0.0657465309,
0.315647006,
0.0240767058,
-0.2853401005,
0.3214401007,
0.1970464289,
0.1434585154,
-0.081700623,
0.2895278931,
0.0371529162,
-0.2142820656,
-0.1410539448,
-0.4289240241,
-0.2734737396,
-0.2403487265,
0.3684607446,
-0.0589792281,
-0.3968169093,
-0.2104891092,
0.2031517625,
-0.1731848419,
0.0008151792,
-0.1152250618,
0.1386917979,
0.192549929,
-0.0058937259,
-0.1709819734,
-0.0764890909,
-0.2906215787,
0.5571377277,
0.085389331,
0.0533542261,
-0.0164598897,
-0.068513602,
0.1735539436,
-0.3187834024,
0.3556576967,
0.0575479493,
-0.0762584955,
0.0424538106,
0.0448652357,
-0.2691233158,
-0.073423788,
0.071450524,
0.0639279038,
0.3373165429,
0.0944463238,
-0.3351975679,
0.0434359685,
0.0778742582,
0.0335209221,
-0.0920764878,
-0.4355366826,
-0.1980988979,
-0.3307765722,
-0.3583378196,
0.0288313348,
-0.115227282,
0.1873096973,
0.0975569487,
-0.4058392048,
0.2624620199,
-0.1972244531,
-0.0597406216,
0.2077491581,
-0.0900271088,
-0.1461898834,
0.0606457442,
0.0556652658,
0.2191549093,
0.4232971966,
0.5937588215,
0.3618925512,
0.1425872743,
0.3213866949,
-0.2036596686,
0.2121597826,
0.2889626026,
0.1237674654,
-0.0542609505,
-0.0253477506,
0.3709650338,
0.1296093762,
-0.2740953863,
0.0858496279,
-0.0309423842,
-0.1193366349,
-0.1653837264,
0.2441497743,
-0.2641584873,
0.1816567183,
0.1978209317,
-0.2616368532,
-0.139380306,
0.392016232,
0.0121425856,
0.9516813755,
0.0117815174,
-0.0407243781,
0.2059562504,
-0.6339950562,
0.2703415453,
-0.5762804747,
0.0921204984,
-0.2677559257,
0.403120935,
0.0943104029,
-0.1034549922,
0.0441920906,
0.0501290075,
-0.2925863862,
-0.0953400135,
-0.2573273182,
-0.1921388507,
-0.319734782,
0.3754503727,
-0.3018939793,
-0.0932729691,
-0.2033957094,
0.2914939523,
-0.1313428879,
0.0059479726,
-0.1016756743,
-0.0961298347,
-0.2755256891,
-0.300834924,
-0.2541137636,
0.1800950766,
0.0781226456,
0.0260453969,
0.1926258802,
-0.0724618062,
-0.0118425153,
-0.3353953362,
-0.0861084014,
0.1424121112,
-0.0768291056,
0.2569778264,
-0.2475292683,
-0.1077869013,
0.0033481494,
0.2006387264,
0.161588043,
-0.3208277225,
-0.1810966134,
0.0709886178,
-0.1186239868,
-0.1217616349,
-0.1446332633,
-0.0039852634,
-0.4416049421,
-0.3048273623,
-0.3690398037,
-0.1454228163,
-0.067666173,
0.0177948624,
0.3172254264,
0.1601398438,
0.0666755438,
-0.2374668568,
0.1774483472,
-0.2549625337,
-0.2523486316,
-0.0809459537,
0.2365005314,
-0.0279065073,
0.3630593717,
0.013112016,
-0.2868367732,
-0.3017169833,
0.0583485067,
0.3081488609,
-0.0034953281,
0.1487830579,
-0.084728688,
-0.160341084,
0.0976042002,
0.0924249068,
0.1385641098,
0.0612399876,
0.2169467509,
-0.3212394714,
-0.2478015423,
0.2087909877,
0.0137164053,
0.2162073851,
0.0073690116,
-0.0463712588,
-0.0944188684,
0.2117327601,
-0.4128861427,
-0.0015192851,
-0.1317282319,
-0.0568888672,
-0.3676459193,
-0.0979966372,
-0.1211702824,
0.0854508132,
0.2758598328,
0.3163309097,
-0.1931319833,
-0.3425486088,
-0.0458514839,
0.0235786736,
0.0598581433,
0.0199143291,
-0.0880568177,
0.004693158,
-0.0312832221,
-0.0007757582,
0.1649954915,
-0.2054681629,
-0.0788374394,
-0.0732973218,
0.0996499062,
0.0162740909,
-0.0511499681,
0.2448521852,
-0.1358738244,
0.6824111342,
-0.086157009,
0.0478588305,
-0.0614262447,
0.1209921539,
-0.2335136384,
0.2943439782,
0.0573895723,
0.2390204072,
0.3425365686,
-0.0867348313,
0.299798727,
-0.1794267595,
-0.1363950968,
0.3500249386,
-0.2331955433,
0.1883663833,
-0.1489787847,
0.3308045268,
0.0368778333,
-0.0338604152,
0.0600361824,
-0.0045372415,
-0.1960621029,
0.086902231,
-0.046310544,
-0.2042615265,
-0.0384363756,
0.1573483497,
0.1158953905,
-0.0035348199,
-0.2411170304,
0.0361592546,
-0.3862703443,
-0.1831170022,
0.1398926377,
-0.0815114751,
0.3740172088,
0.0527295358,
-0.0417466834,
-0.1409885138,
0.1649290919,
0.3472919464,
-0.2207559198,
-0.338963747,
0.3110890388,
0.3915056288,
-0.1116965264,
0.2904827297,
0.3967681825,
-0.2645715773,
0.0052973516,
0.3095878363,
-0.4420289993,
0.0661101714,
-0.296710968,
-0.0467391014,
-0.3116157949,
-0.1224612594,
-0.2448617816,
0.1646091342,
-0.0635074973,
-0.0268444605,
-0.2367589921,
0.2867298424,
-0.2356088758,
0.0839222819,
0.0872334912,
-0.3086819649,
0.098669529,
-0.38152349,
0.1971346438,
0.2708276212,
-0.1181470603,
0.2543818653,
-0.1871210486,
0.3644881546,
0.2129336596,
-0.0197815131,
-0.0783834532,
-0.0713373348,
-0.1270234585,
-0.1773280501,
0.4721390605,
0.409412235,
0.0881331265,
0.1295311898,
0.3142966926,
-0.3490210474,
0.1909382194,
0.1290357262,
0.0187680647,
-0.1486465186,
0.0549853183,
-0.253521204,
-0.1547026038,
-0.2582300603,
-0.3317994475,
-0.3616251945,
-0.3557002842,
-0.2150495648,
0.0240759887,
0.0756879151,
-0.0565701537,
0.1521946043,
-0.011786974,
0.4091023505,
0.085217528,
-0.1188730225,
0.1934009343,
-0.0815608427,
-0.0450489074,
0.1781629324,
-0.3505960703,
0.0393822715,
-0.0146678854,
0.1155027002,
0.1772555113,
-0.0137808435,
0.1960995495,
0.3159481585,
-0.0588479154,
-0.0466034785,
-0.2327636629,
0.0024328604,
0.4833304882,
-0.153535217,
-0.0513484329,
-0.0887596458,
0.2628226876,
-0.2804349065,
0.2732723057,
-0.0750522017,
0.0209094137,
0.0570631772,
0.2809637487,
0.2937182784,
0.0545736924,
0.3408741951,
-0.1181642711,
-0.2074312121,
0.0148196286,
-0.0482555628,
0.0912161469,
0.3455092907,
0.1185510084,
0.3530784845,
-0.01129416,
0.0972542912,
-0.0652898327,
0.1041337028,
-0.5952874422,
0.076231882,
-0.1569373608,
-0.1008725911,
-0.1479345411,
0.2144840658,
0.189266786,
0.0780685395,
0.0398855768,
-0.225081712,
-0.2369150221,
0.1293316931,
0.2331683934,
0.1052923054,
-0.1817366481,
0.249472782,
0.0162263811,
-0.2458002716,
-0.0074243266,
-0.4358262122,
0.233484894,
0.2724749744,
-0.0710912719,
0.0312000811,
0.252340734,
0.0391328558,
-0.0248587653,
-0.1025633588,
0.3251880705,
0.1013377085,
0.0339280292,
-0.1910832524,
-0.1868949234
] |
https://github.com/huggingface/datasets/issues/2569 | Weights of model checkpoint not initialized for RobertaModel for Bertscore | Hi @suzyahyah, thanks for reporting.
The message you get is indeed not an error message, but a warning coming from Hugging Face `transformers`. The complete warning message is:
```
Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.dense.weight', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.bias', 'lm_head.layer_norm.weight']
- This IS expected if you are initializing RobertaModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing RobertaModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
```
In this case, this behavior IS expected and you can safely ignore the warning message.
The reason is that you are just using RoBERTa to get the contextual embeddings of the input sentences/tokens, thus leaving away its head layer, whose weights are ignored.
Feel free to reopen this issue if you need further explanations. | When applying bertscore out of the box,
```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']```
Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html
```
from datasets import load_metric
metric = load_metric('bertscore')
# Example of typical usage
for batch in dataset:
inputs, references = batch
predictions = model(inputs)
metric.add_batch(predictions=predictions, references=references)
score = metric.compute(lang="en")
#score = metric.compute(model_type="roberta-large") # gives the same error
```
I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo....
## Environment info
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27
- Python version: 3.9.5
- PyArrow version: 3.0.0
| 167 | Weights of model checkpoint not initialized for RobertaModel for Bertscore
When applying bertscore out of the box,
```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']```
Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html
```
from datasets import load_metric
metric = load_metric('bertscore')
# Example of typical usage
for batch in dataset:
inputs, references = batch
predictions = model(inputs)
metric.add_batch(predictions=predictions, references=references)
score = metric.compute(lang="en")
#score = metric.compute(model_type="roberta-large") # gives the same error
```
I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo....
## Environment info
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27
- Python version: 3.9.5
- PyArrow version: 3.0.0
Hi @suzyahyah, thanks for reporting.
The message you get is indeed not an error message, but a warning coming from Hugging Face `transformers`. The complete warning message is:
```
Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.dense.weight', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.bias', 'lm_head.layer_norm.weight']
- This IS expected if you are initializing RobertaModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing RobertaModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
```
In this case, this behavior IS expected and you can safely ignore the warning message.
The reason is that you are just using RoBERTa to get the contextual embeddings of the input sentences/tokens, thus leaving away its head layer, whose weights are ignored.
Feel free to reopen this issue if you need further explanations. | [
-0.0595504828,
-0.3645301461,
0.0901099592,
0.1289703548,
0.4273765385,
0.0748272836,
0.2718203664,
0.1242346764,
0.1251109838,
0.1333974153,
-0.1491387486,
0.217213273,
-0.1455290616,
-0.0643485785,
-0.0716612041,
-0.2196492255,
0.1432189047,
-0.049943991,
-0.2094152868,
-0.1764126718,
-0.1302691251,
0.1864646524,
-0.2054327428,
0.1243989021,
-0.3585759103,
0.1707725674,
0.0284245312,
0.3952338994,
0.0566760972,
-0.4421780407,
0.4252819419,
-0.0705896318,
0.1829731464,
0.4877987504,
-0.0001228714,
0.0064605027,
0.2213189751,
-0.0540872365,
-0.0313100778,
-0.1773594618,
0.091628179,
-0.2407542765,
0.129938215,
-0.0846756697,
0.0850726515,
0.109849304,
-0.0971312299,
-0.0917770416,
0.4431143999,
-0.0203821249,
0.0755341947,
0.6024700999,
0.0763728321,
-0.1494726539,
0.0460663736,
-0.1314280927,
0.0313533172,
0.7358218431,
-0.1531441659,
-0.020854421,
-0.0985681266,
0.3127397001,
0.1029275507,
0.3258489966,
0.2433317304,
-0.0050745513,
0.0890490115,
-0.0216683038,
-0.317309469,
0.3472049832,
-0.098171629,
-0.1046686769,
-0.218824774,
-0.2243634462,
0.0887016952,
-0.2474700511,
0.1257458627,
-0.0246986412,
0.0381260291,
0.1720040441,
-0.2667009532,
-0.0669073388,
0.0676951334,
-0.0849526227,
0.1294219047,
-0.1038844734,
-0.3312368989,
0.0494496152,
0.559543848,
0.0194065589,
-0.4946097732,
-0.0332817584,
0.0093517657,
0.1292148829,
-0.1981738955,
0.0252225325,
0.2562126219,
0.3080791235,
0.2015604675,
-0.0441700667,
0.0902203843,
0.0475655571,
-0.1666268706,
0.0227410756,
0.0656782091,
0.370882839,
-0.1095080376,
-0.0424449407,
0.1951084137,
0.4521812201,
0.2514280975,
-0.1259822845,
-0.2047224045,
-0.1200860739,
0.078265138,
-0.1153680831,
0.0622204393,
-0.1527000964,
-0.4366090298,
-0.0243246816,
-0.0479731634,
-0.2746987343,
0.4581758976,
0.2476866543,
-0.0365001261,
0.2026104182,
-0.1451321691,
0.325863719,
-0.1985163391,
0.0236697383,
-0.1916702837,
0.0359918959,
-0.5499860048,
0.1129406393,
0.1525399536,
-0.5149908662,
0.3871522248,
0.0121976882,
0.4898632467,
0.0477316752,
-0.1363251507,
-0.0647761375,
0.0756388456,
0.3032776713,
-0.055582203,
0.3049114645,
0.3483040035,
0.248379752,
-0.1436173767,
-0.1127422303,
-0.3222936392,
-0.4240387976,
0.3303536177,
-0.0249221083,
-0.2013019621,
-0.0021151113,
-0.6301626563,
0.1443105638,
0.0616414808,
0.0386333391,
-0.0829504803,
0.137228623,
-0.1097319275,
0.0338978283,
0.4619483352,
0.5912771821,
-0.4559364617,
-0.3831556141,
0.0175583176,
-0.0373060293,
0.2624931931,
0.5404410958,
-0.266296804,
0.249076575,
-0.1183155328,
-0.1341702044,
-0.0909343511,
-0.2990626097,
-0.1987123191,
-0.1149459407,
0.1860007048,
0.0329381153,
0.1031882912,
-0.3880259991,
-0.5773236156,
-0.1748374999,
0.0777936578,
-0.1614884436,
0.058086589,
0.0355187505,
-0.2055670172,
-0.2308667004,
0.0268766582,
0.2811305821,
-0.1402850598,
0.0905100033,
-0.2136240602,
0.1375389993,
-0.0884084851,
-0.1537054926,
-0.0406616479,
-0.0437058285,
0.1233559549,
-0.1413984299,
0.0559835546,
0.1983401775,
-0.0795102194,
0.21824117,
0.0872280002,
0.0330901481,
0.1745310724,
0.0800559148,
-0.2793904543,
-0.0999713838,
-0.050696481,
-0.0824541226,
-0.0876184106,
0.0734469891,
0.0435825661,
-0.0325287059,
-0.4597765803,
-0.1559243798,
-0.3609873056,
0.1635394245,
-0.1609193385,
0.0514069945,
-0.0361128673,
0.0468639545,
0.0299033821,
0.3188658357,
-0.068162322,
-0.2337533236,
-0.0063475706,
0.3686246276,
0.0399778187,
-0.0959600136,
0.2741057873,
-0.0035357177,
0.1728623062,
-0.1739947498,
-0.1187925264,
-0.1149658561,
0.0476637036,
0.0078629628,
-0.1623605937,
0.3741191924,
-0.0398695543,
0.1298765242,
0.1223521829,
-0.0840317905,
0.1379922032,
0.0420227051,
-0.0950799212,
-0.2151755095,
0.1294485927,
0.1283429116,
0.5055884719,
-0.1493335217,
-0.1057032645,
-0.5590144396,
-0.0101490123,
0.0239323974,
-0.0259494521,
0.2220363021,
-0.2602644265,
0.0751151964,
-0.1623806953,
-0.3754822612,
0.3970047235,
0.0489643328,
0.0447651669,
-0.0641907454,
0.0965386406,
-0.1662310213,
-0.1341757923,
0.4033741653,
-0.1383149326,
0.0557986125,
-0.0470864214,
0.0068545192,
-0.2336544394,
0.0577768907,
-0.010368973,
0.048116684,
-0.5006850958,
0.2451440394,
0.0958235189,
0.2131482214,
-0.2310560644,
-0.6032781005,
-0.2174275219,
-0.1217873544,
0.0403479971,
-0.0738128871,
0.0724716038,
0.275985837,
0.3919840157,
0.6198573112,
-0.0538354591,
0.1658964008,
-0.3506984413,
0.0307397097,
-0.0841738284,
0.0006196648,
0.0281954966,
-0.204559505,
-0.1048335955,
-0.3925682306,
-0.0318238139,
0.1536331177,
-0.3445516527,
0.1895875335,
-0.3401429951,
0.3981799185,
0.3173833489,
-0.06080373,
-0.1456560642,
-0.2803345025,
0.3773912191,
-0.1592200994,
-0.0017577708,
-0.0181133412,
-0.1346401572,
-0.0219187494,
-0.0361186936,
0.0024106279,
-0.0466624908,
-0.1200050116,
0.2488232255,
0.2780737281,
-0.1349145174,
-0.0081027187,
0.1877330989,
0.3090735972,
-0.2970645726,
-0.1022000536,
-0.1530168504,
-0.6735310555,
0.4321500063,
-0.100626111,
-0.2623506784,
-0.1679244637,
0.0318276882,
0.3910512924,
-0.4273376763,
-0.2776671052,
-0.3598838747,
-0.1445210129,
-0.067840308,
0.1398444325,
0.3970987499,
-0.0778832287,
-0.1432483792,
0.0223995745,
-0.0999998897,
-0.1330248117,
0.097260341,
-0.1907607615,
0.3079791963,
-0.3312960267,
0.2309681177,
-0.3256835938,
0.9833396077,
0.2083688825,
-0.2381804287,
0.5505982637,
0.1054871157,
0.3776521087,
-0.1789007336,
-0.1699360311,
0.0257000104,
-0.0011687577,
0.277156949,
0.1856428832,
0.1174833551,
0.252686739,
-0.1581130326,
-0.2227058262,
-0.0586997941,
-0.1845897734,
-0.0922751278,
0.1744083017,
0.040452335,
0.0434067026,
-0.1081395894,
-0.1012129635,
-0.0601811334,
0.2614683807,
0.339165628,
0.2163944244,
-0.1530731171,
-0.1500343978,
0.0009446666,
-0.5353900194,
0.2343062162,
-0.165389359,
-0.1055977792,
0.2081578672,
-0.3411148787,
0.148287341,
0.1174768955,
0.4149768651,
0.2935395837,
0.0004640145,
-0.2337070405,
-0.0740331113,
-0.2577540874,
-0.0245777071,
-0.2915292978,
-0.1611655951,
0.525794208,
0.4730910063,
-0.4316532016,
-0.0833311975,
0.150749892,
-0.0110321417,
-0.0640363768,
-0.1930381954,
-0.5834460258,
0.0240986124,
-0.1810366511,
0.1633040905,
-0.0103390887,
0.1443922818,
-0.0586336926,
0.3244633079,
-0.0369302519,
-0.2063412517,
0.2530874014,
0.3682604134,
0.1876194924,
0.0778899491,
0.2066578865,
0.5539929867,
-0.000088186,
0.5046102405,
0.6657985449,
-0.1601136774,
-0.3793659806,
0.1752096117,
0.2613639832,
0.1779566556,
0.2454207093,
-0.0718365461,
-0.1452244818,
0.21862939,
0.3847093582,
-0.4183935225,
0.2498675585,
0.3549109399,
0.1509605944,
-0.1904464662,
-0.1720646024,
0.4522168636,
0.0433945209,
-0.0110084116,
-0.0559039786,
0.3944799006,
0.0250470042,
0.1934129298,
0.1315056086,
0.9412794709,
-0.1404449046,
0.2894340158,
0.2644696534,
0.3819971085,
0.4347300828,
0.0780264139,
-0.0474181995,
-0.1110302359,
0.0099815316,
0.0039278865,
-0.0804314911,
0.1772285998,
0.0330030397,
-0.1441050172,
0.3068507314,
-0.1944562197,
0.0006026872,
-0.2966684401,
-0.0225428641,
-0.0508290976,
-0.2607227564,
-0.3046506941,
-0.0399432108,
0.2054136693,
0.4303844571,
-0.0403818041,
-0.0531850643,
0.0336151272,
-0.3173625171,
-0.0423045978,
0.1069532186,
-0.0235017948,
-0.1178588271,
0.4349119663,
0.0037765503,
0.2492846996,
0.0636050254,
0.6500436068,
0.0548424125,
-0.2759638727,
0.3410854638,
-0.0260587037,
-0.0271997098,
-0.1503069699,
0.0005939417,
0.2195639014,
0.0923213363,
-0.1672543585,
-0.00310692,
-0.0732174516,
-0.00344228,
-0.2601659894,
0.0199466795,
0.1987619549,
-0.3643712401,
0.0852138773,
0.1690535992,
0.1256231964,
-0.0979286879,
0.0158786699,
0.0073376214,
-0.0804220214,
0.0851541907,
0.1413451433,
-0.2557506859,
-0.1532667279,
0.4424974024,
-0.3505534232,
0.0770263746,
0.4665474296,
-0.1539023221,
-0.1273454279,
0.0990455598,
-0.271866262,
0.7606892586,
-0.8098621368,
-0.0061644241,
0.4467020631,
0.1676994264,
0.158751592,
0.4820001721,
0.4868232012,
-0.1703995168,
-0.092732057,
-0.1318472326,
-0.2867135704,
0.1372986436,
-0.131038636,
0.0091235563,
-0.0741154701,
0.1504416168,
0.0757748261,
0.3769187331,
-0.1660312116,
0.131423071,
0.0432725698,
-0.1004367992,
-0.0626355559,
-0.0242756791,
0.5027931333,
0.0748708099,
-0.0275894422,
0.0237129107,
-0.2135196179,
-0.0519273654,
-0.389652431,
0.1608541012,
0.0143397748,
-0.2431519926,
0.0314342678,
0.0987003446,
-0.0299402606,
-0.2585272193,
-0.0159454457,
-0.0764776245,
0.0971187577,
-0.1120957732,
0.5111287832,
0.0089679146,
-0.0662014857,
-0.1408338547,
0.1427725852,
0.0031546317,
0.2334936857,
-0.1755474061,
-0.1201871186,
-0.0454079211,
0.1187154502,
0.0554705188,
0.3773249388,
0.0398187637,
-0.0046974076,
0.0470227487,
-0.0108902305,
-0.1105001718,
0.3558958173,
0.3031350672,
-0.0842778087,
-0.2095174342,
0.2264946103,
0.0445752591,
-0.2369076312,
-0.093270123,
-0.161983043,
0.2636480331,
-0.0085691959,
0.2554130554,
0.1725536883,
0.3013777435,
0.0927805752,
-0.0370462611,
0.0561466329,
0.0379340462,
-0.0654735416,
0.2098348141,
-0.1669712961,
0.2181405574,
0.7928680778,
0.2075890899,
0.2908721268,
0.180337131,
-0.1650339514,
0.4212488234,
-0.4339535832,
0.1494483948,
-0.2449099123,
-0.5602255464,
-0.0903788358,
0.1666405797,
0.1425827891,
-0.1524408758,
-0.1933710724,
0.7876700163,
-0.084846437,
0.0509206615,
-0.181694895,
0.2001522481,
0.0781917572,
-0.5429595709,
-0.0651722029,
-0.1270938367,
0.023090452,
-0.0550477132,
0.0252033956,
-0.1196325868,
0.3264278471,
-0.0505130328,
-0.0569643043,
-0.1790412962,
-0.697185576,
0.2321913987,
0.2278519273,
-0.0520916246,
0.0736198574,
0.349247694,
-0.1455153376,
0.268640697,
0.4473618865,
0.4319785833,
0.128859058,
0.22525841,
-0.0570144989,
0.0503857397,
0.1868863553,
-0.1474190056,
0.4391913116,
0.2323347032,
0.165716663,
0.0475358218,
0.0522569902,
-0.1726900786,
0.144165203,
-0.3620405495,
0.4175057411,
-0.2680934668,
0.4726897776,
-0.272277236,
0.1367376447,
-0.3582396209,
0.1517601311,
-0.3563918471,
0.6355631948,
0.1526316702,
-0.0697697103,
-0.0993389934,
-0.1545824707,
-0.0141338445,
0.1526903659,
0.5158994198,
0.3221861124,
-0.1246200278,
-0.560133338,
-0.0678569898,
-0.5862088203,
0.1026225612,
-0.039340049,
0.3152086735,
-0.0407279171,
0.0282729641,
-0.0719601512,
0.1520361751,
-0.0168857351,
-0.390032202,
-0.2657375336,
-0.1565981805,
-0.1269956976,
0.0841122717,
-0.5294066072,
-0.0348447002,
-0.0058974065,
0.0617948771,
0.0942768902,
0.0456383675,
-0.1566915512,
-0.0166817233,
-0.0648739412,
-0.0705242008,
0.357888937,
0.1826931536,
0.0087098423,
0.318000406,
0.0148989782,
-0.0370210297,
-0.1153952926,
-0.2476247549,
-0.1400771588,
-0.0810341984,
-0.1806667298,
0.0882509202,
-0.3646002412,
-0.2100071609,
-0.4426749647,
0.0865500122,
0.2546905279,
-0.2744082808,
-0.3757107556,
0.0107777417,
-0.0295321494,
-0.13683258,
0.0929704383,
0.3709930778,
0.0407094844,
0.3060774505,
-0.2777655721,
0.0099570304,
0.7441989779,
-0.5834296346,
0.0964181572,
-0.11243999,
0.0488061458,
0.2738869786,
-0.4745757282,
-0.9858580232,
0.238035202,
0.2644092441,
0.1279468834,
-0.440033704,
0.1439383328,
-0.2524217367,
0.0990392268,
-0.1626116633,
0.2319538593,
-0.0170271192,
-0.2271023691,
0.0310434476,
-0.1964700818
] |
https://github.com/huggingface/datasets/issues/2569 | Weights of model checkpoint not initialized for RobertaModel for Bertscore | Hi @suzyahyah, I have created a Pull Request to filter out that warning message in this specific case, since the behavior is as expected and the warning message can only cause confusion for users (as in your case). | When applying bertscore out of the box,
```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']```
Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html
```
from datasets import load_metric
metric = load_metric('bertscore')
# Example of typical usage
for batch in dataset:
inputs, references = batch
predictions = model(inputs)
metric.add_batch(predictions=predictions, references=references)
score = metric.compute(lang="en")
#score = metric.compute(model_type="roberta-large") # gives the same error
```
I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo....
## Environment info
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27
- Python version: 3.9.5
- PyArrow version: 3.0.0
| 38 | Weights of model checkpoint not initialized for RobertaModel for Bertscore
When applying bertscore out of the box,
```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']```
Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html
```
from datasets import load_metric
metric = load_metric('bertscore')
# Example of typical usage
for batch in dataset:
inputs, references = batch
predictions = model(inputs)
metric.add_batch(predictions=predictions, references=references)
score = metric.compute(lang="en")
#score = metric.compute(model_type="roberta-large") # gives the same error
```
I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo....
## Environment info
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27
- Python version: 3.9.5
- PyArrow version: 3.0.0
Hi @suzyahyah, I have created a Pull Request to filter out that warning message in this specific case, since the behavior is as expected and the warning message can only cause confusion for users (as in your case). | [
-0.1506311893,
-0.2975345552,
0.0790532678,
0.0513517,
0.4647551775,
0.0405768007,
0.19793576,
0.1907867938,
0.138585493,
0.2084493935,
-0.1303773671,
0.2869915068,
-0.1275679469,
-0.0866207033,
-0.1238220185,
-0.194999218,
0.112931475,
-0.0918191373,
-0.2066622376,
-0.1772621572,
-0.1680729091,
0.1075783074,
-0.2270768583,
0.0877471864,
-0.264754951,
0.118023932,
0.1158169731,
0.3999868631,
-0.0279442482,
-0.549696207,
0.4129524827,
-0.1024811864,
0.1832324117,
0.4321974814,
-0.000118405,
-0.0350616574,
0.2312026918,
-0.0642958954,
-0.027250085,
-0.1799430698,
0.0714153275,
-0.2153263837,
0.1907907426,
-0.0851066932,
0.0962508991,
0.1106522754,
-0.0638512075,
-0.0977278575,
0.2969879508,
0.0147005953,
0.106096141,
0.5801302791,
0.0915249735,
-0.2033589482,
0.0562142357,
-0.2434058934,
-0.0107168555,
0.7996890545,
-0.1194133684,
0.0211139694,
-0.1755490303,
0.3603535295,
0.0470003486,
0.4131556153,
0.231497854,
-0.04505492,
0.1458599865,
-0.0140759554,
-0.2861912847,
0.3633507788,
-0.0495932698,
-0.0992543995,
-0.1434774399,
-0.1704609692,
0.1701109111,
-0.3235532641,
0.1518208683,
-0.0207378045,
-0.0049411319,
0.176766783,
-0.1856805384,
-0.0096385852,
0.0392068699,
-0.0255858898,
0.1122342497,
-0.1080651656,
-0.3088822663,
0.0715797171,
0.5233256221,
0.0219153687,
-0.5161139369,
0.0442516021,
-0.0158391148,
0.1050250083,
-0.2215555459,
0.0371880829,
0.2768484354,
0.3556408286,
0.2921357751,
-0.0516097695,
0.1328833401,
0.0495799109,
-0.1677491814,
0.0735968947,
0.0619305484,
0.3298571706,
-0.0936577469,
-0.1504181027,
0.1854510307,
0.4818686545,
0.2026163787,
-0.1468578279,
-0.1522709727,
-0.1516358405,
0.1331297755,
-0.0134102982,
0.0515865982,
-0.1503574848,
-0.4884825647,
0.0293978229,
-0.0861960724,
-0.2325775027,
0.4540865421,
0.2400123775,
-0.0287971459,
0.1914058775,
-0.2195283771,
0.3667713404,
-0.167524308,
-0.0024103895,
-0.2121833861,
0.0200953335,
-0.5994925499,
0.0451914147,
0.1670409739,
-0.5211141109,
0.4407986104,
0.0861024261,
0.4616357088,
0.0439059064,
-0.1134122461,
-0.1241904199,
0.1050329879,
0.3450680375,
0.0275234506,
0.2916055024,
0.3321644068,
0.2506281734,
-0.1550835073,
-0.0865119994,
-0.3208601177,
-0.4442725182,
0.3166169226,
0.0127651701,
-0.1209733337,
-0.0538566411,
-0.6307353973,
0.1684769839,
0.0612265579,
0.0587099046,
-0.0680132806,
0.1115412489,
-0.186716035,
-0.0145881679,
0.371406287,
0.5238426328,
-0.5235712528,
-0.2953400314,
0.0224867091,
-0.0566582195,
0.3146736026,
0.4856598377,
-0.2403754294,
0.2253065705,
-0.1106555834,
-0.1308024526,
-0.0051894188,
-0.3240641356,
-0.1994786412,
-0.0552032441,
0.1629430503,
0.0029752553,
0.1301808804,
-0.4134735465,
-0.558442831,
-0.1973028779,
0.158621788,
-0.1974615008,
0.0787227079,
0.0256366134,
-0.2331428975,
-0.2044692934,
0.0141702555,
0.2407871336,
-0.1170871928,
0.0346448198,
-0.1564636081,
0.0461314507,
-0.057832256,
-0.1170396507,
-0.0120323654,
-0.1053552553,
0.1301750541,
-0.1696342528,
0.015213836,
0.1239436045,
-0.0621880218,
0.2335905731,
0.1463430673,
0.0846135542,
0.2386507094,
0.0692476779,
-0.2949135005,
-0.0895645618,
-0.0579355694,
-0.0117455032,
-0.0491658933,
0.009605512,
0.0147500113,
0.0431580991,
-0.4249895215,
-0.2600963116,
-0.4469790459,
0.1492615342,
-0.0618762374,
-0.0507430881,
-0.0595063195,
0.0249605514,
0.0614041239,
0.2770498395,
-0.0201048106,
-0.1134727895,
-0.0162947401,
0.3425476849,
0.0704261363,
-0.1281542033,
0.2877136767,
-0.0041895211,
0.1435244232,
-0.0778612345,
-0.089088656,
-0.1550529748,
0.0574503429,
0.0166231692,
-0.1131712794,
0.3734732866,
0.0200650822,
0.0996996611,
0.0735729188,
-0.0686984658,
0.1884987652,
0.0305557102,
0.009034507,
-0.2739718854,
0.1552573144,
0.1375314444,
0.4346504211,
-0.1644024402,
-0.1481812894,
-0.4836679101,
0.0090098334,
0.0718987212,
0.0309540872,
0.2066997588,
-0.2137857229,
0.032279253,
-0.1540063173,
-0.3394294381,
0.4418452978,
0.0757387131,
0.1317078769,
-0.0668469742,
0.0565900952,
-0.2283737659,
-0.0916006416,
0.3643069565,
-0.0837100521,
0.1223224849,
-0.0144600086,
0.0050253086,
-0.2743746638,
0.1103993952,
0.0533313751,
0.1116015837,
-0.4886288345,
0.2111948133,
0.0160643384,
0.2075067014,
-0.2277431488,
-0.5473068357,
-0.1978654414,
-0.1674135923,
0.1108877808,
0.0035507064,
0.0155515894,
0.245834887,
0.3519876599,
0.5763660073,
-0.0105393156,
0.1820795834,
-0.3252356648,
0.0379516594,
-0.0824352875,
0.03481552,
0.0212812908,
-0.1395522803,
-0.036986541,
-0.2842597961,
-0.0685695633,
0.1353873014,
-0.3167823851,
0.1629512012,
-0.3225495517,
0.4349204004,
0.3414091468,
-0.07392665,
-0.1379301995,
-0.2412783802,
0.3552577496,
-0.1737668812,
-0.0142196901,
-0.0459677614,
-0.1685474515,
-0.0038150512,
-0.0415974669,
-0.0552916378,
-0.048706349,
-0.1575493813,
0.1859256625,
0.289116621,
-0.105207026,
-0.1152038872,
0.1889695227,
0.2362822145,
-0.3005896211,
-0.100172922,
-0.2634638548,
-0.711925149,
0.3826667666,
-0.1397302747,
-0.2567564845,
-0.1022109464,
0.0898854733,
0.412345916,
-0.4059276283,
-0.3205483556,
-0.4146136045,
-0.0838827342,
-0.0104267448,
0.1121118218,
0.3206906021,
-0.1259182394,
-0.1657733619,
-0.0424435325,
-0.1663165092,
-0.0597807616,
0.0870642215,
-0.2837341726,
0.314317286,
-0.3372661173,
0.2276599109,
-0.2759482861,
0.9847339392,
0.2884802222,
-0.2326092571,
0.6071637273,
0.1287952363,
0.3356273174,
-0.2486673743,
-0.1645042747,
0.0805718899,
-0.0062944666,
0.3026953042,
0.2106635422,
0.0329563841,
0.2064093351,
-0.1247751713,
-0.2830566764,
-0.0179491639,
-0.2100506127,
-0.0514959246,
0.1163406149,
-0.0407660753,
0.0494885221,
-0.1192303896,
-0.0830015317,
-0.0948126018,
0.2419171035,
0.3854704499,
0.1510193348,
-0.1535049975,
-0.1704184413,
0.0412965007,
-0.6059462428,
0.230250597,
-0.1467321664,
-0.0699240118,
0.1800375283,
-0.2958261967,
0.1627700627,
0.1540587693,
0.3248287439,
0.1494270861,
0.0431981198,
-0.2296823412,
0.0439066589,
-0.1999871582,
-0.0090322718,
-0.2797452211,
-0.0904323608,
0.5518618822,
0.3548372686,
-0.4318066537,
-0.1261868477,
0.1528725028,
-0.0610853583,
-0.0218941793,
-0.2179817259,
-0.5934867859,
0.0278050676,
-0.1854319274,
0.2032896578,
0.0351574644,
0.1893445551,
-0.096071355,
0.2732439041,
-0.018780183,
-0.1408814192,
0.261677444,
0.2927851677,
0.1352365315,
0.1493745148,
0.2491377592,
0.4505405128,
0.0821148679,
0.5949646831,
0.6329047084,
-0.1401257813,
-0.3148520291,
0.1595424116,
0.2627013028,
0.1785631627,
0.2328165919,
-0.0730757192,
-0.0564229339,
0.1428257227,
0.3662604094,
-0.3818347156,
0.2371982336,
0.3204715848,
0.1241929159,
-0.1649454236,
-0.1584485471,
0.4748923481,
0.0454470143,
-0.0617036596,
0.0083017852,
0.3129757047,
-0.008951826,
0.1839715093,
0.1459769607,
0.8244400024,
-0.0699427724,
0.2399156839,
0.3293840587,
0.4202501774,
0.3364493251,
0.0560558066,
-0.0588702708,
-0.1274721324,
0.0277730562,
0.0196380168,
-0.0679952949,
0.1738187671,
0.0013342253,
-0.1454502791,
0.3617593348,
-0.2176558226,
-0.0577367917,
-0.2969801426,
-0.0312656611,
-0.175634414,
-0.2734864354,
-0.3289922774,
-0.0107204057,
0.1990985721,
0.4005932212,
-0.0305471774,
-0.0526187345,
0.0823786631,
-0.2989165783,
-0.0793271065,
0.0563018471,
-0.0462611243,
-0.1133680791,
0.3503371477,
0.0046778768,
0.285546124,
0.0208187588,
0.6671981215,
0.0981374532,
-0.260171026,
0.3924070001,
0.05117945,
-0.045767244,
-0.1384092271,
-0.0449974984,
0.2247894257,
0.0273372531,
-0.1969133019,
-0.0282544941,
-0.0863888413,
0.007013984,
-0.220592916,
-0.0307060294,
0.2182721496,
-0.4100443125,
0.0399591886,
0.1802454591,
0.2025479674,
-0.1137858406,
0.0380155966,
0.0732399151,
-0.0505747125,
0.1269160062,
0.1035781354,
-0.2443880588,
-0.1462872326,
0.4675121903,
-0.3212060928,
0.0544718802,
0.4901284575,
-0.1703801751,
-0.1374823749,
0.0577413142,
-0.2169572711,
0.7585763931,
-0.7254889011,
-0.0097938422,
0.4498122036,
0.1767358482,
0.2023481131,
0.4736377895,
0.4459121227,
-0.142287299,
-0.0326177925,
-0.2269623429,
-0.2666093409,
0.1268620044,
-0.175266996,
-0.0224276148,
-0.1089373976,
0.159759745,
0.0577916056,
0.3241811991,
-0.2059388757,
0.1709910929,
0.0463718176,
-0.0893219635,
-0.1259394288,
-0.0153221078,
0.5025229454,
0.1386447251,
0.0006159544,
0.0289896391,
-0.2684349418,
-0.0892341137,
-0.4054855108,
0.1571566761,
-0.0036496706,
-0.2023525983,
0.025734961,
0.0387170091,
-0.0907380581,
-0.2082269192,
-0.0270167999,
-0.1116171479,
0.0785923079,
-0.1236192062,
0.5146752596,
0.0623300225,
0.0086636692,
-0.1430713683,
0.0994514823,
0.0090996735,
0.1324452907,
-0.2453327626,
-0.1330105811,
-0.0814002752,
0.1160521358,
0.0345558524,
0.2790310085,
0.0890145302,
-0.0414736494,
0.075766474,
-0.0428218767,
-0.1139971465,
0.331784606,
0.2764270604,
-0.1133792251,
-0.2586685717,
0.2536017299,
0.094028987,
-0.2695655525,
-0.0959029272,
-0.1607609838,
0.3303249478,
0.0078529641,
0.1831623018,
0.1774291992,
0.2701613605,
0.0747516602,
-0.0377349555,
-0.0785820037,
-0.0005337186,
-0.0852169394,
0.1470088959,
-0.1624280363,
0.1945867538,
0.7594560385,
0.202912122,
0.3006827831,
0.2762669325,
-0.148109287,
0.4754818976,
-0.3361105323,
0.0757346302,
-0.2649820447,
-0.6027315259,
-0.0962198377,
0.2004272342,
0.0449580103,
-0.1512368172,
-0.0951131061,
0.7941796184,
-0.1164690182,
0.0091474243,
-0.2164342701,
0.1690707803,
0.0232784152,
-0.5665178895,
-0.1921995282,
-0.1465444267,
0.0981667638,
-0.0266948864,
0.0336825065,
-0.0354319699,
0.3262625337,
-0.0325413495,
-0.070008859,
-0.2572222352,
-0.6853573918,
0.2440318018,
0.241266638,
-0.0417252257,
0.0630858019,
0.3763279617,
-0.1548973471,
0.24609828,
0.4070384204,
0.4606927335,
0.1535181105,
0.2155490071,
-0.1659932435,
0.0658783615,
0.1538672149,
-0.1654475629,
0.4261156023,
0.3403890431,
0.1815125346,
0.1295980215,
0.0511618629,
-0.1931252182,
0.1973881871,
-0.2678559721,
0.4426291585,
-0.2131013274,
0.4483057857,
-0.2437186986,
0.1948981732,
-0.3682034016,
0.1679106504,
-0.3469513059,
0.6887558103,
0.1995066106,
-0.0317158625,
-0.0457602218,
-0.2536661327,
0.0153081007,
0.1602551639,
0.5332733393,
0.2655243278,
-0.1902429461,
-0.6655278802,
-0.0283838063,
-0.6237753034,
0.1466348171,
-0.0807163492,
0.3106874824,
-0.0688112974,
0.0719400942,
-0.0749487802,
0.2002550364,
0.0032365844,
-0.4071137607,
-0.1927723587,
-0.0897803605,
-0.204093039,
0.0571960695,
-0.5257989168,
-0.0884628594,
0.0108543858,
0.0079263896,
0.1253989935,
-0.0568903387,
-0.0977347642,
-0.05926897,
-0.0506397933,
-0.0246363394,
0.413061738,
0.2529038787,
0.0334224701,
0.3423549235,
0.0045938641,
-0.0214176215,
-0.1209858507,
-0.2568951845,
-0.1487036198,
-0.059331432,
-0.1564585716,
0.0970751792,
-0.2969245315,
-0.1412884742,
-0.4015668929,
0.1055996865,
0.1789360344,
-0.2523510456,
-0.3688320518,
0.0523614287,
0.0418278128,
-0.0956953689,
0.0365742706,
0.3607117832,
0.0672345608,
0.3435563445,
-0.3030104041,
-0.0911934674,
0.7570112944,
-0.5725848079,
0.0790632293,
-0.1314100623,
0.0740842894,
0.2822541296,
-0.4676654637,
-1.083158493,
0.2719725966,
0.2745971978,
0.1263019443,
-0.452111572,
0.1626846939,
-0.2787547708,
0.1043326408,
-0.1492418647,
0.2096951753,
-0.0098476093,
-0.352124542,
0.0244111717,
-0.2266330123
] |
https://github.com/huggingface/datasets/issues/2561 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` | Hi ! I just tried to reproduce what you said:
- create a local builder class
- use `load_dataset`
- update the builder class code
- use `load_dataset` again (with or without `ignore_verifications=True`)
And it creates a new cache, as expected.
What modifications did you do to your builder's code ? | ## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
| 51 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
Hi ! I just tried to reproduce what you said:
- create a local builder class
- use `load_dataset`
- update the builder class code
- use `load_dataset` again (with or without `ignore_verifications=True`)
And it creates a new cache, as expected.
What modifications did you do to your builder's code ? | [
-0.3804820776,
0.4886575043,
0.0326324739,
0.1935643852,
0.1446636021,
0.1507259607,
0.3192701936,
0.374884963,
0.1290488988,
0.2183319479,
0.2149604708,
0.363037318,
0.1198910177,
-0.2817022204,
0.0510923378,
0.2790058255,
0.1163431928,
0.1434955746,
0.2144535184,
-0.0771562681,
-0.0282794014,
-0.0800597295,
-0.0401380733,
-0.2102089822,
-0.4505549073,
0.1976113021,
0.052869007,
0.0853831321,
-0.0405515954,
-0.4662296176,
0.3908794522,
0.2441874743,
-0.0562270135,
0.2653215528,
-0.0001090661,
0.1760650873,
0.3208664656,
0.0526439026,
-0.3978689611,
0.138908729,
-0.3474238515,
-0.4606623054,
0.0223902687,
-0.0884898305,
-0.216471836,
-0.2490847707,
-0.140726164,
-0.191591084,
0.3035666347,
0.0564861149,
0.2780433893,
0.0750867426,
-0.1023398712,
-0.0168683119,
0.119954966,
-0.050775703,
-0.0536150932,
0.160992831,
0.2253709435,
0.0361660421,
-0.430483073,
0.3174602687,
-0.1896671951,
0.2203765661,
0.4303051531,
-0.0973285437,
0.1611029357,
-0.0093296561,
0.3773486018,
0.0414986014,
0.5871434212,
-0.32999143,
-0.2986130714,
-0.2611526251,
-0.1944368184,
-0.0155705363,
0.2321199477,
-0.1832693219,
-0.299241513,
0.1735042334,
-0.4138678312,
-0.2707407176,
0.0678334385,
-0.1559708416,
0.0528806001,
-0.2511188984,
0.0992154181,
-0.0926117152,
-0.0893776566,
0.1688515544,
0.4349327385,
-0.4686088562,
-0.0739732087,
0.2702961266,
-0.4989156723,
0.0219633356,
0.3845902085,
0.3972645998,
0.2384097278,
0.3022897243,
-0.1899262667,
0.2409279794,
0.1860508919,
0.0968386233,
-0.0826028213,
0.3067311049,
0.0410079472,
-0.0109666176,
0.2831628025,
0.2031200528,
-0.5477038622,
-0.0137985079,
0.0638633743,
-0.2574613988,
0.5983973145,
-0.0898956507,
0.0680670887,
-0.3288722038,
-0.0316497535,
0.188981086,
-0.0006036386,
-0.1473226398,
0.2239468992,
0.2570383847,
-0.1294848472,
0.0850458592,
-0.2500113845,
-0.2127594501,
-0.3465072513,
-0.3544661999,
-0.3988959789,
-0.2386137396,
0.0201399103,
0.3679386377,
0.4855267406,
-0.5491020083,
0.3118239939,
0.2401130497,
-0.0615109205,
0.0796842724,
0.1753483415,
-0.136171639,
0.1791891158,
0.2202348411,
-0.288944602,
0.0660591498,
-0.0249982532,
-0.1994284093,
-0.072106652,
0.3408293128,
-0.1144276708,
-0.7981067896,
0.0093577914,
0.1745111495,
-0.234095782,
0.0518297404,
0.2836399078,
0.1155550778,
0.4194813371,
-0.306529969,
-0.1302640736,
-0.0479082391,
-0.2993503213,
-0.1270207167,
0.4868234992,
0.671358943,
-0.4300764799,
0.0946415365,
-0.124225527,
0.0880808234,
0.0045687892,
0.1541886628,
-0.3215009868,
0.4164041281,
-0.2850263715,
-0.4484737515,
0.2019231319,
-0.2974616587,
-0.8293768167,
0.2752148211,
0.178665489,
0.214106679,
0.1349743158,
0.0399037823,
-0.0856214091,
-0.1601605415,
0.0979911387,
0.2460226268,
-0.2004426718,
0.0236591697,
-0.4308620095,
-0.1939272881,
0.0640483797,
0.0740331039,
0.0089767072,
0.2423091084,
0.0550841875,
0.113243103,
0.0285037141,
0.0087899677,
0.1342495084,
0.3834664226,
0.1400851309,
-0.1290519983,
0.205185324,
-0.1118593216,
-0.454425782,
0.4190020561,
-0.2235327661,
-0.1305979192,
0.0498481169,
-0.2996340394,
-0.1256818622,
-0.0823091567,
-0.4173097014,
-0.2251388431,
0.137779817,
0.1733628809,
0.454521507,
-0.0684813634,
-0.134321034,
0.27442801,
-0.1714830697,
0.1598849446,
-0.0228321441,
-0.069982715,
-0.0787652656,
-0.0692961216,
-0.313826263,
0.0410867147,
0.1141753197,
-0.0592817403,
-0.2225727588,
0.2792675197,
0.0170241818,
0.0943572819,
0.0013861523,
0.1983226836,
0.0460144803,
0.165213123,
0.1288755983,
-0.1250753701,
0.0781465471,
-0.098377876,
-0.0527028143,
0.072659187,
0.2021350712,
0.1724301428,
-0.2249979824,
-0.3149550855,
0.251109302,
-0.1476520747,
0.0871009231,
-0.088452436,
-0.0426744744,
0.0656266734,
0.4767366052,
0.2285359651,
-0.0164816305,
0.1682707071,
0.4884266853,
0.2000712454,
-0.2914830744,
0.0221243426,
-0.1331481785,
-0.2133837342,
0.1711708158,
0.3344318867,
0.3634788394,
0.1734693944,
0.209932372,
0.0661089793,
-0.0327123925,
-0.1634074897,
0.0613574721,
-0.1118583977,
-0.1488315612,
0.4112389088,
0.3244158626,
0.1536158025,
-0.3777526915,
0.2912766933,
0.1497383714,
0.1518628746,
-0.0133896321,
0.1734289676,
-0.4750729799,
-0.111807555,
-0.1549556255,
0.1557515264,
-0.3087693751,
-0.1850287318,
0.1412914842,
0.102434203,
-0.0044619069,
0.2299690247,
-0.059631329,
0.3149347901,
0.0060208216,
-0.5304801464,
-0.3073922992,
-0.0541436672,
-0.4707733989,
-0.0123458989,
0.4609992206,
-0.2426989377,
0.2919666469,
-0.2242351025,
-0.0838990137,
-0.202625826,
-0.2120321244,
0.0953062102,
0.106636703,
0.412383765,
-0.1788085997,
-0.008273419,
-0.0438164584,
0.0297021568,
0.2912223637,
-0.1716904342,
-0.1785908937,
-0.11133001,
-0.0883524567,
0.1494502425,
-0.2810599804,
-0.2027478516,
0.0114696566,
-0.3783388734,
-0.1207698882,
0.1415111125,
0.0631860644,
0.1967853755,
-0.0582331307,
0.1748850793,
0.0205827393,
0.1483391523,
-0.2669382691,
-0.6465249062,
0.2283110768,
-0.2430549115,
-0.066888243,
0.0384102911,
-0.301587075,
0.1177913398,
-0.0815821365,
-0.4913434982,
-0.0105528198,
-0.4558913112,
0.3086248934,
-0.0715982392,
0.0444756821,
0.4206597805,
-0.0024626553,
-0.0336009115,
-0.1908631623,
-0.3150302768,
0.1238766462,
-0.1581401527,
0.3299716413,
0.0541929118,
-0.0427864976,
0.1322249919,
0.5684075952,
0.1453552693,
-0.0803415477,
0.315959692,
0.1188291833,
0.4034344554,
-0.3024224043,
-0.2068282664,
0.0561797582,
-0.0480522811,
-0.2586322725,
0.0179702863,
0.0922228545,
0.0153530519,
-0.1323778778,
-0.0241401531,
0.0221357569,
-0.2735553384,
0.002521703,
-0.3864328563,
0.2015068233,
0.4415508509,
0.1765925288,
-0.1888556778,
-0.1416998953,
0.1498924941,
0.2254765034,
0.1601370871,
-0.0456880368,
0.0659563094,
0.2351461649,
-0.3701854348,
0.1026783735,
0.0984811634,
-0.0682749152,
0.0720150769,
0.0008161813,
0.274597913,
-0.0770791024,
0.2790738344,
-0.4338412285,
0.0234022792,
0.2077311277,
-0.0449022092,
0.0446939617,
-0.2526710033,
0.2096978277,
0.2986282408,
-0.1504014283,
0.2786416709,
-0.040071629,
-0.2590216696,
0.0644096583,
0.3787699938,
-0.1512274593,
-0.4095373154,
-0.2608661056,
0.008098729,
-0.1622662246,
0.0933756232,
-0.1808727682,
0.2914338708,
-0.0097647458,
-0.0358065143,
-0.1010073572,
0.3268054724,
-0.1703634858,
0.0109592229,
0.2811038494,
-0.1458041966,
0.3419134617,
0.0604261905,
0.0640218407,
0.1709909588,
0.475625366,
-0.0876847655,
-0.2081736028,
-0.1658856273,
-0.0252956171,
-0.0827367902,
0.2340687364,
-0.0805179924,
-0.1607117504,
0.2102656364,
-0.0868856087,
-0.0937162042,
-0.0870414078,
0.0128916688,
-0.023686735,
0.0838644505,
-0.4713275433,
0.1676436961,
0.1242040321,
-0.0518048629,
0.3790418506,
-0.218728736,
0.0275239237,
0.200624451,
0.1142490804,
0.6171651483,
0.1221160218,
-0.0726753771,
0.0029370487,
-0.2452913672,
0.341504842,
-0.3462285399,
0.246889174,
-0.281681329,
-0.2803462148,
0.1727062464,
-0.1924580336,
0.2364639789,
0.0897733942,
-0.07016702,
0.1336214542,
-0.0885072798,
0.2817082107,
-0.0107067879,
0.2285521924,
-0.1176191419,
-0.1444791704,
-0.0195713378,
0.2138469964,
0.012485248,
0.335318327,
-0.0582601279,
0.0159009062,
0.1801529229,
-0.0808223262,
-0.1948034465,
-0.1231332421,
-0.1186830997,
0.0012881421,
0.2840403318,
-0.2037244141,
0.0151564255,
0.0649264082,
0.2296742201,
0.1114735529,
-0.187133193,
0.1602967829,
0.1367705613,
0.3419643641,
-0.1230105609,
-0.2972230613,
0.3527775705,
-0.0682598352,
-0.1647281647,
-0.1953940094,
-0.5220222473,
-0.413898617,
0.2600610852,
0.1896181852,
0.3121988177,
0.0780325755,
0.1004079133,
-0.0140931979,
0.2869425416,
-0.2069869041,
0.2122658938,
0.1076694801,
-0.16703704,
0.1476467252,
-0.3399032056,
-0.2350500226,
-0.0520666577,
0.3169324398,
0.2246972769,
-0.1340262443,
0.4436526895,
-0.2458903193,
-0.095860146,
-0.1339604706,
-0.0281455815,
0.1562257111,
-0.2629679143,
-0.035755232,
0.0425797589,
0.0624866188,
0.1657256335,
-0.0400658771,
0.0600911453,
0.0544877015,
-0.326921761,
-0.1526605338,
-0.3810039759,
-0.2966789603,
-0.1081870645,
0.0335303247,
0.0041414276,
-0.0133241359,
0.2901390195,
0.3709749281,
-0.3479486704,
-0.0777553469,
-0.2537520528,
0.1006594747,
-0.3202536702,
0.1699166298,
0.0737236142,
-0.0583093874,
-0.0165357534,
0.0942822099,
-0.3026219904,
-0.2772940397,
-0.012969736,
0.1127234325,
0.0548069887,
0.2695969939,
-0.1076486036,
0.0404742807,
0.0232928954,
-0.0481974557,
0.2192640454,
-0.1349799037,
-0.1380729973,
0.2205071598,
0.1599506438,
0.3212192655,
-0.0997262746,
-0.0877703875,
-0.1191570908,
0.2350643277,
0.0335854292,
0.0239466392,
0.0368629359,
-0.0175103098,
0.1461347044,
-0.0298809744,
-0.1513526142,
0.1505281776,
0.2623204887,
-0.2599433362,
0.0070400164,
0.3197337091,
0.2233689278,
0.1086499542,
0.0006463863,
-0.1364181042,
0.3405464888,
0.2584250569,
-0.1966732591,
-0.2378261983,
0.3885470629,
-0.0508064404,
0.0853364542,
-0.014569141,
0.4374084473,
-0.211165458,
0.2243071496,
0.1498712897,
0.2936811745,
-0.4318629205,
0.0127436183,
0.3747751117,
0.1390731335,
0.0621829331,
0.2875870466,
0.0014000814,
0.0061585568,
0.5597172379,
-0.0744695663,
0.1425116658,
0.0042765141,
0.2571486831,
-0.181298539,
-0.5544177294,
0.4394110143,
0.1259934306,
-0.1168914959,
-0.1993807107,
-0.2302350849,
0.2791205943,
0.1457984447,
-0.231958732,
-0.1967093945,
0.1830403507,
-0.3216516078,
0.0736052841,
0.067325443,
-0.0609898567,
0.1429521143,
0.1117721647,
0.169110164,
0.1647928506,
0.2556160986,
-0.1488611847,
-0.1340926439,
-0.2487914562,
0.1285080314,
-0.0155015932,
0.016144529,
-0.0873766541,
0.2900001705,
0.0014362745,
-0.1904773563,
0.0177702587,
0.4018318653,
0.2471947372,
0.2909376919,
-0.0528567135,
0.1229542792,
-0.2008675039,
0.0174716413,
-0.4287211597,
0.3778694868,
-0.2583732903,
-0.2916315794,
0.2562726438,
0.0682009831,
-0.1824136823,
-0.00735645,
-0.142147541,
0.1414720565,
-0.5035197139,
0.3143914938,
0.3248208463,
-0.0379740074,
-0.0030623111,
0.1779227555,
-0.1650941372,
-0.1860361695,
0.457202971,
-0.0709722787,
0.0209458172,
-0.3190405369,
0.1192361265,
-0.2245956659,
0.5049155951,
0.266060859,
0.0646055415,
-0.2951211333,
-0.1944384277,
-0.7159308791,
0.218359977,
-0.0852490067,
0.2858003676,
0.1396152973,
0.2323766947,
-0.1937196702,
0.16791825,
0.0035756677,
-0.0542436093,
0.2418111712,
0.0408345759,
-0.262648046,
0.1586983651,
-0.0982363448,
-0.2893234491,
-0.0120389275,
-0.3866193593,
0.4166208506,
-0.174698472,
0.122031346,
0.238195017,
-0.1944961846,
0.4156765342,
0.2763546705,
0.3132999837,
0.2699009478,
0.0833805799,
0.1488392651,
0.0722178221,
-0.1836621016,
0.2596637011,
-0.2895091176,
0.1402838528,
-0.2510016859,
0.096306026,
-0.4065718055,
-0.1825558692,
-0.3155363202,
0.3408100009,
0.098194398,
-0.044746872,
-0.0821549445,
-0.1506190896,
-0.2725711763,
0.3956178725,
0.2849608362,
0.0411715023,
0.0760043189,
0.099949345,
-0.4842993617,
-0.0423129722,
0.3631963134,
-0.3208840191,
-0.2423744947,
-0.2733337283,
0.3320650458,
-0.0275915973,
-0.321302861,
-0.1497492939,
0.0142921805,
0.3661473095,
-0.0442024879,
0.0851753652,
0.2846247554,
-0.1038481519,
0.4637130499,
-0.0950279757,
-0.1761485189,
0.0414662361,
0.1291504949,
-0.0996753573,
-0.1462931186
] |
https://github.com/huggingface/datasets/issues/2561 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` | Hi @lhoestq. Thanks for your reply. I just did minor modifications for which it should not regenerate cache (for e.g. Adding a print statement). Overall, regardless of cache miss, there should be an explicit option to allow reuse of existing cache if author knows cache shouldn't be affected. | ## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
| 48 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
Hi @lhoestq. Thanks for your reply. I just did minor modifications for which it should not regenerate cache (for e.g. Adding a print statement). Overall, regardless of cache miss, there should be an explicit option to allow reuse of existing cache if author knows cache shouldn't be affected. | [
-0.2966100872,
0.4845602512,
0.0497075841,
0.1848860979,
0.0803920925,
0.2186555564,
0.2824612558,
0.3745070994,
0.1949127018,
0.1779463887,
0.2753897607,
0.3544698954,
0.0864099041,
-0.2514212132,
-0.0044405349,
0.2905792594,
0.058053311,
0.145352155,
0.1856718808,
-0.006389536,
-0.061895676,
-0.0590821132,
-0.0472506955,
-0.265509516,
-0.4217760861,
0.1886299103,
0.0811306834,
-0.0028489958,
-0.039752923,
-0.4942772388,
0.4173817933,
0.2595972121,
0.0410104245,
0.1719835252,
-0.000109742,
0.1775735319,
0.2939723432,
0.0204252005,
-0.3915855885,
0.1280863434,
-0.3183546066,
-0.3609192073,
-0.0150635391,
-0.1168083549,
-0.1470688581,
-0.2058142424,
-0.0759647936,
-0.3138148785,
0.343876183,
0.0339677297,
0.2579466105,
0.0727291778,
-0.1777897477,
0.0051543005,
0.0632823408,
-0.060098134,
-0.0318004303,
0.1550072581,
0.3051301241,
0.046208173,
-0.3910078108,
0.4045750499,
-0.2028278112,
0.1022234857,
0.4206958413,
-0.2342664897,
0.1239167601,
-0.0326368622,
0.3514981866,
0.0883090496,
0.6280642152,
-0.3615947366,
-0.2906777263,
-0.2804446816,
-0.1889220327,
0.0089403242,
0.1707499921,
-0.247025609,
-0.1697722375,
0.2825196981,
-0.4102951884,
-0.3994599283,
0.0205437243,
-0.1617594361,
0.2046761215,
-0.2736333609,
0.0841638446,
-0.0900347978,
-0.1739298105,
0.2221588492,
0.4534495473,
-0.4566786289,
-0.0571205877,
0.2458969355,
-0.4898162484,
0.0414768606,
0.3280726969,
0.395619154,
0.2704196274,
0.339501828,
-0.0873379111,
0.2306834757,
0.1428929567,
0.1323715746,
-0.0760939419,
0.3461060524,
0.0449288934,
-0.0047855154,
0.2342403829,
0.2124477029,
-0.4609405994,
-0.0363114476,
0.0972766727,
-0.2108420134,
0.5844721794,
-0.0553591773,
0.0181643143,
-0.3203704953,
-0.0643921643,
0.2362919897,
-0.035234876,
-0.1552271545,
0.1838336885,
0.1808867902,
-0.0278261174,
0.2197251916,
-0.1585139334,
-0.18719697,
-0.2385388315,
-0.4174998105,
-0.3815183043,
-0.2056737989,
0.0255203471,
0.3334381878,
0.4631288052,
-0.4986812472,
0.3289692104,
0.2453932762,
-0.0809455141,
0.0382736847,
0.2030310035,
-0.0675651357,
0.1907201707,
0.2264155596,
-0.3242379427,
0.0466674566,
0.0138497166,
-0.1422073692,
-0.0683885813,
0.3774853647,
-0.105540067,
-0.7720669508,
0.0577215552,
0.1467434317,
-0.2308308333,
0.059777122,
0.295068264,
0.0941423103,
0.4354888797,
-0.3047127128,
-0.0714978129,
-0.0399286896,
-0.2986981869,
-0.171107769,
0.4547198713,
0.7276176214,
-0.4251801372,
0.0580197051,
-0.0966187939,
0.0903699249,
-0.004741203,
0.1897814274,
-0.2760145962,
0.3597525358,
-0.3368421793,
-0.4499465823,
0.1937786341,
-0.3304953277,
-0.7936916947,
0.2364366651,
0.2361170053,
0.2683824897,
0.1507766545,
0.0912843272,
-0.1303575337,
-0.1721946001,
0.0760543123,
0.2031330317,
-0.2156373858,
-0.0670440048,
-0.4511632323,
-0.288977921,
0.053578902,
0.0131587312,
0.0885531455,
0.3096221089,
0.0585948676,
0.1182932332,
0.0537009612,
-0.0029381718,
0.1418866217,
0.2921988666,
0.1424275935,
-0.1862851381,
0.1863690913,
-0.1150949374,
-0.4901276231,
0.4268353581,
-0.2512300611,
-0.2352858484,
0.042051997,
-0.3022153378,
-0.1098714322,
-0.1406945586,
-0.3829507828,
-0.2034126222,
0.123507835,
0.2031828612,
0.4170445204,
-0.0460985191,
-0.1830385327,
0.3019635677,
-0.274703294,
0.1761452258,
-0.0656107366,
-0.1344091892,
-0.0913844407,
0.0057708174,
-0.3230371773,
0.0396359488,
0.1474549621,
-0.0976058692,
-0.1709592193,
0.2789709866,
0.0086256005,
0.1368511021,
-0.0129127242,
0.2477176189,
0.0481237546,
0.1332280487,
0.0803828165,
-0.1950085163,
0.0764135122,
-0.0752485096,
-0.0221908055,
0.05554308,
0.1095237285,
0.0519844331,
-0.2265176922,
-0.3205171227,
0.2170549929,
-0.2078904212,
0.0622810274,
-0.1489881873,
-0.0719796866,
0.0899279714,
0.4432957172,
0.1769192517,
-0.0288112089,
0.1514400244,
0.3761359453,
0.2306367159,
-0.2651820481,
-0.0584280267,
-0.032497745,
-0.2006669641,
0.2052027583,
0.4338605106,
0.2664699554,
0.1773048937,
0.2373423725,
0.0573744476,
0.0024195127,
-0.1575556099,
0.0431733131,
-0.1791934967,
-0.1714891791,
0.4472455084,
0.2646684647,
0.225684166,
-0.3657456636,
0.3604893684,
0.1917817295,
0.1741560847,
0.0068331584,
0.144246161,
-0.4783358276,
-0.1179983616,
-0.1782152355,
0.2390928566,
-0.2455631047,
-0.2018035352,
0.1303867549,
0.1122718304,
-0.0641458035,
0.1965551674,
-0.1686370671,
0.3677164316,
-0.0814802349,
-0.558373332,
-0.3459394574,
0.0020713583,
-0.4155193567,
0.0044741929,
0.4792737961,
-0.3283117712,
0.3057931662,
-0.2684012353,
-0.1086742505,
-0.2305947393,
-0.2436310351,
0.0833078027,
0.1805214882,
0.3112435043,
-0.2669359148,
-0.056993112,
-0.0704197809,
0.1075666994,
0.1130452156,
-0.1787520647,
-0.1501227468,
-0.1828027368,
-0.0643630177,
0.1532535851,
-0.3532606363,
-0.2649862468,
0.020895401,
-0.3403115869,
-0.0538649261,
0.0546617806,
0.0128821163,
0.2154655308,
-0.1387060285,
0.1285959929,
0.0274694711,
0.1715714931,
-0.3066548705,
-0.6944128871,
0.2179214954,
-0.1704295427,
-0.0264715832,
0.0731138438,
-0.2889472246,
0.1435309649,
0.0199487507,
-0.550586164,
-0.0304021146,
-0.3796718419,
0.2839166522,
-0.1302032471,
-0.0076427907,
0.4433667064,
0.0021884926,
0.013910871,
-0.2255669832,
-0.2300460637,
0.1580525935,
-0.1709074527,
0.33431229,
0.0929654241,
-0.1266643852,
0.2586101294,
0.5497049689,
0.2341136634,
-0.0189247653,
0.3620268106,
0.2053526938,
0.5025868416,
-0.243524909,
-0.1163853854,
0.0630784035,
-0.1085822359,
-0.2857515812,
-0.0677750856,
0.0894800052,
0.0560046136,
-0.1363673806,
0.0104679465,
-0.0187591165,
-0.2934157848,
-0.0642723218,
-0.4409804344,
0.2686774433,
0.4563598037,
0.1301659942,
-0.1031797826,
-0.1059153527,
0.1789330393,
0.316036433,
0.2749326825,
0.0554619692,
0.0449786633,
0.2654491961,
-0.3704787493,
0.1303278506,
0.0983077362,
0.0600289479,
0.0849119574,
0.0311318412,
0.1852440238,
-0.0033049211,
0.2500499785,
-0.5590526462,
0.0235621668,
0.1375412047,
0.0043955073,
0.1834597886,
-0.2239947915,
0.2630489469,
0.2345829308,
-0.1239515543,
0.2270337641,
0.0529052317,
-0.1990067363,
0.0187146477,
0.3892875016,
-0.1164693162,
-0.4054344594,
-0.1874205768,
0.0491076261,
-0.1712284684,
0.0784707814,
-0.0590010136,
0.1518259645,
-0.0021441542,
0.0228619277,
-0.1453222632,
0.3600177169,
-0.1597718149,
-0.01997618,
0.2620857358,
-0.0905335099,
0.3267651796,
0.0706419051,
0.0305500682,
0.2073298395,
0.5026633739,
-0.2005050033,
-0.1789023727,
-0.1821708083,
-0.0325578228,
-0.0892442912,
0.2249559015,
-0.097375676,
-0.1954542696,
0.2267182618,
-0.1740563661,
-0.0846357346,
-0.1170168668,
-0.0445941053,
-0.0284847133,
0.0423106365,
-0.4739633799,
0.1151128262,
0.1791705787,
-0.0562358871,
0.3488112986,
-0.2945683599,
-0.0199164692,
0.1836631894,
0.0458039232,
0.5849217176,
0.0938150734,
-0.1063086092,
-0.1129328385,
-0.2617772818,
0.3956878185,
-0.3350912333,
0.2682984173,
-0.2448900789,
-0.2729746401,
0.1506206691,
-0.1687280536,
0.2396328747,
0.1026625335,
-0.0605539344,
0.2022615969,
-0.0745359585,
0.2639937103,
0.0382416621,
0.2278758734,
-0.1351743788,
-0.0660478845,
0.0956498981,
0.1695219725,
-0.0046301531,
0.3136821687,
-0.1343435049,
0.0260593854,
0.2740041316,
-0.0983226746,
-0.2454526424,
-0.1350776553,
-0.1413996518,
0.0108639114,
0.1976473927,
-0.1424390972,
0.0825931877,
0.1155971438,
0.2736484706,
0.1074545234,
-0.161409542,
0.1261476129,
0.1274571419,
0.2821274102,
-0.1728491783,
-0.2204596847,
0.3994207978,
-0.0048009977,
-0.1251101494,
-0.2156904787,
-0.5188757181,
-0.4346000552,
0.2353596985,
0.1876210123,
0.3133314252,
0.0822433606,
0.0446390063,
0.0506643131,
0.2856610417,
-0.2207335532,
0.1887082756,
0.1294854432,
-0.1102918088,
0.1852194965,
-0.4093117416,
-0.2512067556,
-0.058250986,
0.2818201184,
0.2550120354,
-0.2335414439,
0.3360429406,
-0.2673618793,
-0.0726703629,
-0.1185966879,
-0.0566904135,
0.064812474,
-0.2145406008,
-0.0365524031,
0.0350258797,
0.0648185909,
0.1371728182,
-0.089034088,
0.1072420329,
0.0626244619,
-0.3028649092,
-0.1994231343,
-0.3694555163,
-0.2732175589,
-0.1160044074,
0.1117705256,
0.0155841932,
-0.0442191064,
0.2239627838,
0.2931730747,
-0.326852113,
-0.0356397778,
-0.2011873126,
0.0778628215,
-0.3165006638,
0.2115911543,
0.0781905502,
-0.1265774518,
-0.0621048361,
0.1234075874,
-0.3284884095,
-0.2365285158,
-0.0045443363,
0.1296792775,
0.1019270569,
0.26762712,
-0.1630533338,
-0.0343164653,
0.0506562814,
0.0170911215,
0.1799690127,
-0.0315657072,
-0.086981222,
0.3448062539,
0.0950805768,
0.3468886614,
-0.0890009999,
-0.0734967068,
-0.120330438,
0.1932710707,
0.0215044878,
0.0928597748,
0.0224203095,
0.0153671876,
0.1091337204,
-0.0546686761,
-0.1389505267,
0.1786766946,
0.1755828261,
-0.2113982439,
-0.0071103573,
0.3065181375,
0.1843283176,
0.0751412511,
-0.0144773088,
-0.1549145579,
0.3658694923,
0.2336481959,
-0.2562910914,
-0.2456648052,
0.381750375,
0.0460431539,
0.0581055731,
0.0672456548,
0.5152270794,
-0.2925961316,
0.3185659051,
0.1348699182,
0.273368448,
-0.4803122878,
0.1180777997,
0.3190515637,
0.178473413,
0.014569412,
0.240475446,
0.0797083974,
0.0531541333,
0.4855409563,
-0.0829697922,
0.1410016865,
-0.0101913363,
0.3159424067,
-0.1835173965,
-0.5806638598,
0.4861355424,
0.1387702823,
-0.1531380415,
-0.057571169,
-0.2067171037,
0.2538539469,
0.1792437434,
-0.2217086256,
-0.1657071561,
0.1109393388,
-0.3387534618,
0.0691981465,
0.1441846192,
-0.1334665418,
0.1394823194,
0.0860456601,
0.1933050752,
0.199703604,
0.3072153628,
-0.1525801122,
-0.1720910668,
-0.175791502,
0.1346708238,
0.023248449,
0.0733007342,
-0.1188505813,
0.2348506898,
-0.030356463,
-0.2272111773,
0.0028517665,
0.4154126346,
0.1996845305,
0.1992000043,
0.0122233778,
0.1301175207,
-0.2028801441,
0.1017635614,
-0.4308283925,
0.4320875108,
-0.250279665,
-0.3689311743,
0.2801717818,
0.0266977027,
-0.1133447587,
0.0911172107,
-0.1685045213,
0.1127073914,
-0.5603573322,
0.3034968376,
0.3499677777,
-0.0123248547,
0.0487853922,
0.223031953,
-0.1427254975,
-0.1782524884,
0.4750251472,
-0.1103387624,
0.0264913216,
-0.2779116929,
0.125962466,
-0.1848774403,
0.3783935905,
0.3177625239,
-0.0603679232,
-0.2719249725,
-0.1675004065,
-0.7562369108,
0.2122109681,
-0.0488380119,
0.33288607,
0.2007851005,
0.1593890786,
-0.1959916055,
0.1406609267,
-0.0518375933,
-0.0379985049,
0.2316825986,
0.0111094117,
-0.2035102844,
0.1085805595,
-0.0687361211,
-0.3280591667,
0.0358976796,
-0.3965866566,
0.3446265161,
-0.1365158856,
0.0843564197,
0.2075682729,
-0.1935440898,
0.3796266913,
0.2734095156,
0.3378597498,
0.3590852022,
0.0153122991,
0.1303503513,
0.0188465267,
-0.1475566626,
0.2175383866,
-0.252864331,
0.1426427662,
-0.2502276599,
0.0500823855,
-0.5288495421,
-0.2059168369,
-0.3160489202,
0.3023280203,
0.1304205954,
-0.0567554161,
-0.1321529299,
-0.1284249127,
-0.3266018033,
0.4613105059,
0.2988038063,
0.0799176022,
0.0740532726,
0.1341239959,
-0.4689103067,
-0.0401119292,
0.3417388797,
-0.3154910207,
-0.1534039527,
-0.306591779,
0.3315876126,
-0.0630788654,
-0.3281747103,
-0.2368659824,
0.0108549446,
0.373757422,
-0.0634253994,
0.1217782795,
0.303576827,
-0.1761276722,
0.4700825214,
-0.0523520559,
-0.0707977116,
0.1152306795,
0.0913199708,
-0.0554487966,
-0.1846041083
] |
https://github.com/huggingface/datasets/issues/2561 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` | The cache is based on the hash of the dataset builder's code, so changing the code makes it recompute the cache.
You could still rename the cache directory of your previous computation to the new expected cache directory if you want to avoid having to recompute it and if you're sure that it would generate the exact same result.
The verifications are data integrity verifications: it checks the checksums of the downloaded files, as well as the size of the generated splits. | ## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
| 82 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
The cache is based on the hash of the dataset builder's code, so changing the code makes it recompute the cache.
You could still rename the cache directory of your previous computation to the new expected cache directory if you want to avoid having to recompute it and if you're sure that it would generate the exact same result.
The verifications are data integrity verifications: it checks the checksums of the downloaded files, as well as the size of the generated splits. | [
-0.3809877038,
0.438659519,
-0.0031961501,
0.1750698239,
0.0950202271,
0.1552425772,
0.231751591,
0.4199698567,
0.1590617448,
0.3092050552,
0.1621156037,
0.2830117345,
0.1100007445,
-0.2082077265,
-0.0321415924,
0.2218121886,
0.0682657436,
0.1848930717,
0.1504186988,
-0.0182193443,
-0.1042756885,
-0.0340705626,
-0.0095533431,
-0.2419546694,
-0.4294947088,
0.0829603523,
0.0635565519,
0.1601960808,
-0.0879584551,
-0.4699015021,
0.3021022677,
0.2475573272,
-0.1526565403,
0.2725527287,
-0.0001049965,
0.1780285388,
0.3562342525,
0.0568509176,
-0.4711806774,
0.2416318953,
-0.3674045503,
-0.4435736537,
-0.1549162567,
-0.1537542045,
-0.0183799081,
-0.1941014975,
-0.1145720854,
-0.2818766534,
0.3508929014,
0.0716104656,
0.2827042043,
0.1405942738,
-0.2049487829,
-0.0155735239,
0.1999704838,
-0.0148219429,
-0.028133437,
0.1525065303,
0.1852067262,
0.0982398242,
-0.4011555016,
0.3540207446,
-0.2052347511,
0.1669311821,
0.3523952365,
-0.1947118342,
0.0473335758,
-0.0936718136,
0.3847612739,
0.1260737628,
0.536821723,
-0.2587720454,
-0.3534724712,
-0.2496429533,
-0.2884819508,
-0.0149809122,
0.283867538,
-0.1221735626,
-0.194598034,
0.1572085172,
-0.4552614093,
-0.2325947583,
0.0808339864,
-0.2229064405,
0.0629751533,
-0.2296007574,
0.1435917467,
-0.0874813497,
0.0441175252,
0.2234882712,
0.3453530073,
-0.472461015,
-0.0402999781,
0.2510862947,
-0.4561101794,
-0.0766494051,
0.2587413788,
0.3883616626,
0.2604284883,
0.3886116445,
-0.1932554692,
0.245634079,
0.180190146,
0.0984622091,
-0.1247395277,
0.3354094028,
-0.0490096547,
0.0047540069,
0.3091171086,
0.2427244186,
-0.3884593844,
0.0066369949,
0.1257506013,
-0.2951214612,
0.4921706319,
0.0260523483,
-0.0578257963,
-0.3234986365,
-0.0804760978,
0.1806788743,
0.0233981088,
-0.1273875833,
0.166769132,
0.1957850605,
-0.0826733261,
0.136542514,
-0.3365087807,
-0.2401609123,
-0.3418678939,
-0.3335374594,
-0.3955494761,
-0.1528069228,
0.025593847,
0.3271662593,
0.4925564528,
-0.5260611176,
0.3480467796,
0.1541675031,
-0.0543542318,
0.0998492092,
0.2237305343,
-0.2249775827,
0.2071833611,
0.3538980484,
-0.2637625039,
-0.0269213878,
-0.0084565356,
-0.0912473649,
-0.1013357192,
0.2589484751,
-0.1230046004,
-0.7289391756,
0.1184712723,
0.2128462493,
-0.277256906,
0.085433051,
0.278601408,
0.0754414052,
0.3407643735,
-0.3217763901,
-0.0556519367,
-0.082049787,
-0.2780359685,
-0.1290549934,
0.4463098943,
0.7053079009,
-0.4558098316,
0.1331189424,
-0.1671928316,
-0.0553619638,
0.0092205815,
0.2276037037,
-0.2356605679,
0.3070384264,
-0.3199962378,
-0.2536692619,
0.187854439,
-0.2249672413,
-0.825517714,
0.268666923,
0.1492616981,
0.1901010573,
0.2113611996,
0.0449058302,
0.0253550671,
-0.2250095755,
0.0002093688,
0.2408089042,
-0.2048731148,
0.0776338577,
-0.471550107,
-0.2308916599,
0.0494503863,
0.0304166302,
0.0650145411,
0.1332589388,
0.1275087297,
0.1479830891,
0.0028199293,
-0.02823494,
0.127925694,
0.2897246778,
0.0725994557,
-0.1606550515,
0.2341435105,
-0.1299555451,
-0.4772045612,
0.4268708527,
-0.24302046,
-0.1612716466,
-0.0033576265,
-0.3678757548,
-0.1315851659,
-0.0959358737,
-0.3227362335,
-0.1761831343,
0.162699461,
0.221737206,
0.4972626865,
-0.0863663554,
-0.0921613872,
0.2364339381,
-0.2325900495,
0.1563907862,
-0.0437477529,
-0.0619530827,
-0.0965529829,
-0.0037325192,
-0.2672519386,
0.063713491,
0.0612827502,
-0.1438022256,
-0.2119126618,
0.3813098073,
0.1824183315,
0.1483061463,
0.1038817167,
0.2073604316,
0.0454354286,
0.0915351212,
0.2094066292,
-0.138699159,
0.0882935822,
-0.0692195296,
-0.1016848236,
0.09413445,
-0.0026222328,
0.1150359735,
-0.0974114463,
-0.3273006678,
0.2436907291,
-0.0979227945,
0.0482174009,
-0.1521125138,
-0.022417292,
0.1089243442,
0.4705242515,
0.2494597286,
0.0959344506,
0.1308138669,
0.5666046143,
0.0951125994,
-0.3063999116,
0.0084784394,
-0.0920882523,
-0.2652548552,
0.0858353823,
0.4567349255,
0.370562017,
0.1872844994,
0.2971366942,
0.0433769152,
0.0250684395,
-0.198180452,
0.0852611363,
-0.0498647057,
-0.2039027065,
0.3712654114,
0.2285540104,
0.1648545563,
-0.4026491046,
0.2453198731,
0.1885005236,
0.1817784756,
0.0076123551,
0.2101496756,
-0.4117989838,
-0.1393774301,
-0.1930425018,
0.1558937877,
-0.3065186739,
-0.2943997979,
0.1703383029,
-0.0018875112,
-0.1134919524,
0.2163659483,
-0.0438541025,
0.3727186322,
-0.0144589022,
-0.510604322,
-0.3518972695,
-0.0204888396,
-0.4219542742,
0.0638473555,
0.4755041897,
-0.2497109175,
0.3643747568,
-0.330158174,
-0.1467279494,
-0.1775907278,
-0.2530388832,
0.0571764335,
0.0023788661,
0.2441036403,
-0.1194609851,
0.0094945654,
0.0901728123,
0.0731133148,
0.1342107058,
-0.1966598034,
-0.2162162513,
-0.1232858151,
0.0012072586,
0.1617398858,
-0.4055030048,
-0.2719634771,
0.0034308247,
-0.3567608595,
0.0014949832,
0.1071014106,
0.0538732111,
0.1546713263,
-0.1395680308,
0.2075216174,
0.0358734392,
0.0946290791,
-0.3371970356,
-0.5732303858,
0.1985996515,
-0.1797296405,
-0.0840431005,
0.0857978761,
-0.2623577118,
0.0923823863,
0.0246695951,
-0.5293712616,
0.0089810714,
-0.5315980315,
0.2878866196,
-0.1223091185,
0.0137546938,
0.4414841533,
0.0198046863,
-0.103004396,
-0.2068895996,
-0.2004308254,
0.0841566473,
-0.2701405883,
0.2128930092,
-0.0614320636,
-0.0904943198,
0.1922163218,
0.6441384554,
0.1705701351,
-0.0261241291,
0.2631527185,
0.2355028391,
0.5081672668,
-0.3046404123,
-0.1536638141,
0.1751735657,
-0.1124340147,
-0.2807420492,
0.0942908823,
0.0032021999,
-0.0760573074,
-0.1071787104,
0.0054233298,
0.0717362463,
-0.2113442868,
0.0174797494,
-0.377081871,
0.1748270392,
0.3805963993,
0.216280207,
-0.1443030983,
-0.1160824299,
0.1850568652,
0.2957296073,
0.1747502387,
0.0181110874,
0.0132107213,
0.2020644397,
-0.3103519678,
0.1260381043,
0.1875202954,
-0.0421076044,
0.0342039317,
-0.0716049895,
0.2343113422,
-0.0502522662,
0.3109576106,
-0.469904989,
0.0396348834,
0.1316848546,
0.0003005192,
0.1948228478,
-0.2603047192,
0.0965255946,
0.2191574872,
-0.0178054068,
0.328148663,
-0.061430648,
-0.1760919243,
0.0945458561,
0.3984561563,
-0.0820435435,
-0.325415045,
-0.3235059381,
0.0369306803,
-0.1915463805,
0.1425372362,
-0.1091927886,
0.181209743,
-0.1364024878,
-0.0018453151,
-0.0889679268,
0.2300608158,
-0.1454862207,
0.039368663,
0.2379763573,
-0.1225234866,
0.2264850587,
0.066690959,
0.0999517292,
0.2287297845,
0.4857911766,
-0.1969264597,
-0.1524715424,
-0.1413666159,
-0.0593841821,
-0.1390202492,
0.2855292261,
-0.0680384785,
-0.263918817,
0.2175979614,
-0.0047130398,
-0.1272703558,
-0.0137207024,
0.0422125533,
-0.0254557934,
0.0349456817,
-0.4442014396,
0.1618107408,
0.186846897,
-0.033509925,
0.2781071663,
-0.1521115452,
0.0795830935,
0.1330115199,
0.1249538884,
0.6822167039,
0.1362114847,
-0.1145956218,
0.0002068784,
-0.271042794,
0.3784739673,
-0.3629118204,
0.244056195,
-0.1973895729,
-0.3495341837,
0.133646369,
-0.1639499813,
0.2852561474,
0.0307869203,
-0.1436573714,
0.1867616773,
-0.0287957937,
0.1945047975,
0.009616442,
0.3009592891,
-0.1734448671,
-0.1199179366,
0.1038737893,
0.2350697666,
0.0205893405,
0.2723826766,
-0.077769734,
0.0324533246,
0.1645319164,
-0.069159098,
-0.2880913913,
-0.154504329,
-0.0871583149,
0.0442415513,
0.1170278192,
-0.1048890054,
-0.0277322643,
0.0329479091,
0.2732409537,
0.1882367432,
-0.169550091,
0.19028458,
0.1060741842,
0.3167856932,
-0.0597582236,
-0.2441652715,
0.4073331058,
-0.0808279738,
-0.1148025915,
-0.2614192367,
-0.5250527263,
-0.3327232003,
0.3132183552,
0.1088079363,
0.2869951725,
0.043615032,
0.1405777335,
-0.0438862853,
0.1577402353,
-0.217431426,
0.2091279775,
0.0427463017,
-0.1072451919,
0.1430872977,
-0.3217619956,
-0.3278846741,
-0.1194731668,
0.2778668404,
0.1766341627,
-0.1231903136,
0.3894489706,
-0.2933329642,
-0.1793524921,
-0.1765351593,
-0.0402751118,
-0.041162502,
-0.2697419822,
0.0075386725,
-0.040174298,
0.005067572,
0.1045180857,
-0.0712547451,
0.1229320019,
0.1439369619,
-0.3369544148,
-0.246767506,
-0.3537614346,
-0.2653899789,
-0.1480854899,
0.1309173107,
-0.0345486365,
-0.0122089423,
0.2249912471,
0.3829750717,
-0.3870069981,
-0.0468673483,
-0.2649413347,
0.0812325925,
-0.3280063272,
0.0506658778,
0.0909307525,
-0.0747461468,
0.0090028718,
0.1508879364,
-0.3463099003,
-0.2939869761,
0.0540275648,
0.1059438437,
-0.0469066352,
0.1963615119,
-0.1199757233,
0.1190240979,
-0.0014979932,
-0.0491349548,
0.2123951614,
-0.2160634995,
-0.156372726,
0.2548015118,
0.1707797348,
0.3533981442,
-0.0799337327,
-0.027465703,
-0.1830377877,
0.193613857,
-0.0437573045,
0.1320661753,
-0.0450859144,
-0.0873601362,
0.1132310182,
-0.0314983018,
-0.0336392261,
0.1384854466,
0.2454379797,
-0.163651973,
-0.0036879778,
0.2253752351,
0.221075505,
0.1636663824,
0.0717785358,
-0.2607776523,
0.3172481656,
0.2696536183,
-0.1820484698,
-0.2011015117,
0.3371921778,
-0.0247247312,
0.1318010092,
0.0341986939,
0.4432097077,
-0.1671994776,
0.2255147696,
0.1544447541,
0.3434153199,
-0.3536659181,
0.0417472571,
0.4806298614,
0.1429193318,
0.0976358131,
0.218634963,
-0.0359707251,
0.056215059,
0.4986132085,
-0.1254047751,
0.3106616139,
-0.0686787814,
0.2836296558,
-0.2062562406,
-0.5564457774,
0.4018724859,
0.1693210304,
-0.1316092759,
-0.1121613681,
-0.1634998173,
0.2880299687,
0.0292416848,
-0.217613548,
-0.2586458921,
0.1524281502,
-0.2848617136,
0.0762706324,
0.082142815,
-0.0851984173,
0.0554181039,
0.132616818,
0.1994864643,
0.226562351,
0.3473985493,
-0.0989749581,
-0.1429736912,
-0.0877809823,
0.1233609766,
-0.0985961929,
0.0712052509,
-0.1479970217,
0.1824069917,
0.0958581567,
-0.1535415202,
0.0640586466,
0.3616479635,
0.2506945729,
0.2123777121,
-0.0989349484,
0.0259600691,
-0.1711537838,
0.018798165,
-0.3725167215,
0.4313399494,
-0.2985083759,
-0.2817286253,
0.3423573077,
0.0857558995,
-0.1949165761,
0.0019102797,
-0.220426932,
0.0274497755,
-0.4845624268,
0.3101215363,
0.3515855074,
-0.0309317932,
-0.0904951841,
0.2066891789,
-0.20653148,
-0.2010108978,
0.2995294034,
-0.1196036488,
0.0717513859,
-0.2509053946,
0.1303448826,
-0.2079918087,
0.6261110306,
0.351813972,
0.0281963926,
-0.2392152697,
-0.1770211458,
-0.6708555222,
0.2010463327,
-0.0954008624,
0.1895967871,
0.0860060751,
0.2077535987,
-0.1447224021,
0.159095645,
-0.003762491,
0.0648977458,
0.2173775882,
-0.0050049173,
-0.2826894522,
0.1956050098,
-0.1473676115,
-0.3527965248,
0.0055217296,
-0.4427979589,
0.4373823702,
-0.1514990628,
0.1282619834,
0.3331020772,
-0.1716022789,
0.4262594581,
0.2726683617,
0.2524735034,
0.3181022704,
0.1200247109,
0.0899263918,
0.0215411931,
-0.1689336896,
0.3327596784,
-0.2900877595,
0.146585241,
-0.2002494633,
0.069402568,
-0.3555559218,
-0.0972991139,
-0.2597145736,
0.4706436694,
0.1652922183,
0.0576935895,
-0.0976824313,
-0.206250906,
-0.278698504,
0.4057395458,
0.3590344489,
0.0832563788,
0.1341120154,
0.0653555915,
-0.4515416026,
-0.1034889966,
0.3416598737,
-0.2379944921,
-0.1830807924,
-0.3390716612,
0.3901358247,
0.0657897517,
-0.2984904349,
-0.1949419081,
0.039974913,
0.331171304,
-0.0626843125,
0.0069867074,
0.311278075,
-0.1424307376,
0.3858709931,
-0.0999678746,
-0.1195298731,
0.0070808977,
0.0974019095,
-0.0177121684,
-0.1525210738
] |
https://github.com/huggingface/datasets/issues/2561 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` | Hi @apsdehal,
If you decide to follow @lhoestq's suggestion to rename the cache directory of your previous computation to the new expected cache directory, you can do the following to get the name of the new expected cache directory once #2500 is merged:
```python
from datasets import load_dataset_builder
dataset_builder = load_dataset_builder("path/to/your/dataset")
print(dataset_builder.cache_dir)
```
This way, you don't have to recompute the hash of the dataset script yourself each time you modify the script. | ## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
| 73 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
Hi @apsdehal,
If you decide to follow @lhoestq's suggestion to rename the cache directory of your previous computation to the new expected cache directory, you can do the following to get the name of the new expected cache directory once #2500 is merged:
```python
from datasets import load_dataset_builder
dataset_builder = load_dataset_builder("path/to/your/dataset")
print(dataset_builder.cache_dir)
```
This way, you don't have to recompute the hash of the dataset script yourself each time you modify the script. | [
-0.4378629029,
0.4782147408,
-0.0076683462,
0.1180529669,
0.1569268703,
0.1881316751,
0.2960322499,
0.4827198088,
0.1750375479,
0.3437815905,
0.2252854109,
0.3112469912,
0.0643950999,
-0.1951673925,
0.0266976841,
0.3226767778,
0.0457070991,
0.1662352979,
0.0950701535,
0.0056098849,
-0.1577255428,
-0.0480542704,
-0.0432752594,
-0.2891954482,
-0.3779670894,
0.1461429596,
0.128899157,
0.1029425263,
0.0418604538,
-0.5005038977,
0.3477990627,
0.2545363307,
-0.0790348947,
0.3221058547,
-0.0001039051,
0.145093888,
0.3499031961,
0.0292265117,
-0.450845778,
0.1350850761,
-0.3023415804,
-0.3922792971,
-0.0445115939,
-0.1520196944,
-0.1497523189,
-0.1942986101,
-0.0928565636,
-0.3335602283,
0.2368958145,
0.0695877299,
0.3009344637,
0.1146357954,
-0.1748269051,
-0.0558503456,
0.1333579272,
-0.0726912171,
-0.0339045823,
0.152584523,
0.1715849787,
-0.0266665071,
-0.3792467117,
0.4052734077,
-0.2034496069,
0.1334887147,
0.3996663094,
-0.1477892101,
0.0812318698,
-0.0307954531,
0.3842012882,
0.0088951755,
0.5154060125,
-0.3620009124,
-0.3648876846,
-0.2112908661,
-0.2311093509,
-0.1044780761,
0.2209355682,
-0.1983424127,
-0.2347518206,
0.1736161113,
-0.3927211761,
-0.2276477218,
0.0417953432,
-0.1809526086,
0.0880760252,
-0.22500211,
0.1053648889,
-0.1372446567,
-0.1254766583,
0.1452204585,
0.367477715,
-0.3948549032,
-0.0215285253,
0.2289691716,
-0.4612696171,
-0.0239969566,
0.3944354057,
0.3140066862,
0.2373761237,
0.3474125564,
-0.1095320433,
0.2829093337,
0.1750381589,
0.0915096253,
-0.1357050836,
0.3506705463,
-0.0340686999,
-0.0527874604,
0.3768592477,
0.2751902342,
-0.4690761268,
0.0056923572,
0.1060253233,
-0.325963676,
0.5800097585,
0.0720465779,
0.0524249673,
-0.3129971027,
-0.0475729257,
0.2453951985,
0.063641794,
-0.0961807519,
0.2122595012,
0.2610957026,
-0.1054356322,
0.2311410904,
-0.1733351946,
-0.2153013498,
-0.3223359883,
-0.2802627981,
-0.4096826315,
-0.1537310183,
0.0119258016,
0.305617094,
0.4829466343,
-0.4689618647,
0.3161233664,
0.1618569642,
0.0118941432,
0.1007127091,
0.1903781593,
-0.1322098672,
0.2143111676,
0.2632399499,
-0.2132685184,
0.0102519467,
0.0313113146,
-0.1175558791,
-0.1058415696,
0.223121807,
-0.0317616537,
-0.7341607213,
0.088907823,
0.2330440581,
-0.2381563485,
0.0474885702,
0.2636316717,
0.0336059369,
0.3829753995,
-0.2503568828,
-0.1222591847,
-0.0942950249,
-0.3573614359,
-0.1759209037,
0.4980240166,
0.7052151561,
-0.3996893167,
0.1528283507,
-0.1156627238,
0.0775152892,
-0.0665535629,
0.1591839343,
-0.2795011401,
0.3339782953,
-0.2976712584,
-0.4289458394,
0.1798466444,
-0.3847132325,
-0.7887801528,
0.2251588255,
0.1457597613,
0.1491381526,
0.1818512231,
0.0396105126,
-0.0169461183,
-0.2184166908,
0.1615032107,
0.2312604189,
-0.1634502709,
0.098347947,
-0.4349820614,
-0.2086126208,
0.0089623351,
0.0688340217,
0.0870124176,
0.1695849746,
0.056815438,
0.0829611272,
0.0267869588,
-0.0496539213,
0.1402307451,
0.3736858666,
0.1132957414,
-0.1159348264,
0.2203413099,
-0.1655065417,
-0.4990052879,
0.4117001593,
-0.1820967942,
-0.1447316408,
-0.0531153195,
-0.3227123022,
-0.1338288039,
-0.0875149742,
-0.3375994563,
-0.1391991526,
0.1884563565,
0.2496448606,
0.4460932016,
-0.0771124437,
-0.1581667811,
0.2838538289,
-0.1640734375,
0.0899734944,
-0.132698983,
-0.1409479082,
-0.0700128824,
-0.0991643369,
-0.1954042017,
0.0574334115,
0.1353020221,
-0.0667099506,
-0.2608097494,
0.3024923503,
0.0793657824,
0.1147839129,
0.0711159557,
0.279029429,
-0.0350752063,
0.1858082563,
0.1745347232,
-0.07905709,
0.1426223218,
-0.0384484455,
-0.0413478799,
0.1354288757,
0.0463985316,
0.1125913188,
-0.1388840973,
-0.3127244711,
0.295371145,
-0.1245715171,
0.0633457452,
-0.1481837034,
-0.0057839379,
0.0748842359,
0.4566467404,
0.1771675944,
0.0018894225,
0.2123999894,
0.4804142714,
0.1649553329,
-0.2486857772,
-0.0117339641,
-0.0944047123,
-0.2098720968,
0.0730078518,
0.3972232938,
0.3072850704,
0.221635133,
0.2192886472,
0.0572422445,
-0.0068488289,
-0.1589208394,
0.0911511108,
-0.0753751695,
-0.1550500989,
0.3534370065,
0.2896511853,
0.1620253175,
-0.3402824402,
0.1717146188,
0.1014906317,
0.1774211228,
-0.019941479,
0.1480083168,
-0.437425524,
-0.1086441129,
-0.1747343242,
0.2059915662,
-0.181238696,
-0.2643586397,
0.0996615291,
0.1013826281,
-0.118542634,
0.2166803777,
-0.122530356,
0.3018141985,
0.0229897946,
-0.495626688,
-0.2863644958,
-0.0362149552,
-0.3606926501,
0.0316582769,
0.4571744204,
-0.2570876479,
0.3414333463,
-0.2753066719,
-0.1161042079,
-0.2035598308,
-0.2270613015,
0.0009948248,
0.0311386324,
0.3004502952,
-0.1247742027,
0.0048389584,
0.054515928,
0.0616223849,
0.1966442168,
-0.210159272,
-0.1613975167,
-0.0959526971,
-0.0007321574,
0.0984196812,
-0.3548959494,
-0.3140829206,
0.0166349802,
-0.432418853,
-0.0886580572,
0.1247781962,
0.0167994387,
0.1820455045,
-0.1176901832,
0.1404748857,
0.0436921865,
0.1650145948,
-0.2781704366,
-0.6232037544,
0.270996958,
-0.2506585717,
-0.0944468379,
0.0615546256,
-0.328815639,
0.1137558818,
-0.0210147854,
-0.4772717059,
-0.0800592452,
-0.5147487521,
0.2753631175,
-0.1654993147,
0.0315678418,
0.4313965738,
0.079246901,
-0.1137079448,
-0.2364393622,
-0.2883406281,
0.0790761858,
-0.2812060714,
0.1944600344,
0.005679084,
0.0140722021,
0.1872330457,
0.5367396474,
0.195055753,
-0.0902496576,
0.294139117,
0.163942337,
0.454267025,
-0.3149471581,
-0.2042660564,
0.0530163571,
-0.0757598653,
-0.2786770463,
0.0489870571,
0.0071323514,
0.0000146348,
-0.1413306892,
-0.0413518772,
-0.0463013537,
-0.3057073951,
0.0590569153,
-0.4534636736,
0.1954779923,
0.3803458214,
0.1741367579,
-0.2321107984,
-0.1006532907,
0.1646797061,
0.24630633,
0.168264538,
-0.0457253456,
0.035136044,
0.2795373499,
-0.4036785662,
0.1620372534,
0.1288983226,
-0.008364182,
0.0930652767,
-0.057228066,
0.1177355051,
-0.0911325589,
0.2825434208,
-0.5072577,
0.0911325663,
0.2038346529,
-0.1125687435,
0.0627756417,
-0.1989264786,
0.1504736841,
0.2622155547,
-0.0879829526,
0.2507502139,
-0.0011111647,
-0.2351130694,
0.1253534555,
0.3870460093,
-0.1197638363,
-0.3344693184,
-0.2623527646,
-0.0277381949,
-0.1591910273,
0.0565852821,
-0.081254676,
0.2400639653,
-0.0308116525,
-0.0278973617,
-0.1352310777,
0.2370300293,
-0.1084023714,
0.0180767402,
0.2628671825,
-0.0844261348,
0.3803783655,
0.0252022929,
0.0302186757,
0.2365127951,
0.4647636712,
-0.1250588894,
-0.2326640338,
-0.1947995871,
0.053040158,
-0.0449091941,
0.2518128455,
-0.1161489785,
-0.2082093954,
0.1460895389,
-0.0102911741,
-0.147439003,
-0.0304770302,
-0.0205703527,
-0.0034660175,
0.0006032772,
-0.4913096428,
0.204158023,
0.1895586699,
-0.0449841321,
0.3198821843,
-0.2744069695,
-0.0281307604,
0.2554372251,
0.1006880924,
0.6605780125,
0.0964939445,
-0.0353503861,
-0.0036208164,
-0.2316714823,
0.325982064,
-0.308095634,
0.2457037866,
-0.2795043588,
-0.3074896038,
0.173580572,
-0.1925346851,
0.1891009361,
0.0348288156,
-0.1240573451,
0.2253085077,
-0.1151041761,
0.1912561655,
-0.0458403751,
0.3150485456,
-0.186862424,
-0.1745788008,
-0.0274510011,
0.2539722025,
0.0469784476,
0.2461561263,
-0.0815269351,
0.0187768675,
0.1505828053,
-0.0808519572,
-0.237986058,
-0.0665981993,
-0.1074815765,
0.060202796,
0.1213903949,
-0.1067698449,
-0.0436117649,
0.0576339327,
0.3026904464,
0.2505255044,
-0.1588268131,
0.1485430896,
0.0560748503,
0.3196147084,
-0.0658431798,
-0.2128133476,
0.4055594504,
-0.0617625527,
-0.1589685827,
-0.259493053,
-0.4273689091,
-0.3726550937,
0.2680479884,
0.1460204124,
0.2779166996,
0.0533105358,
0.077103734,
-0.0018371567,
0.1734861135,
-0.230604589,
0.2520277202,
0.1348027289,
-0.1515694559,
0.1891328692,
-0.3363292217,
-0.2991268933,
-0.0673698485,
0.3114566803,
0.1595467627,
-0.1517669261,
0.4051165879,
-0.2084002495,
-0.1419316828,
-0.1853005886,
-0.0475520343,
0.0767189264,
-0.2326751053,
0.0687841326,
0.0404998064,
0.0431035608,
0.1582069546,
-0.0608674474,
0.0395644158,
0.0245331191,
-0.3133842945,
-0.2225448191,
-0.4285660386,
-0.2193319052,
-0.0632850155,
0.1223852485,
-0.001228556,
-0.0267291479,
0.1503129601,
0.2760213017,
-0.4142199159,
-0.0566008128,
-0.279168129,
0.1024122462,
-0.2881473899,
0.0984876007,
0.1146463677,
-0.076655373,
0.0632295758,
0.130502075,
-0.3284519017,
-0.3228771687,
0.0242009386,
0.0945782363,
-0.0166070424,
0.2232037038,
-0.1147039458,
0.0794672891,
0.0184373371,
-0.0887311697,
0.2097736448,
-0.0178426281,
-0.1104141176,
0.2679867148,
0.122122556,
0.3223761618,
-0.0099018887,
-0.0430624448,
-0.1550919265,
0.2193195671,
-0.0433367267,
0.1086946055,
-0.0544869006,
-0.0705573037,
0.1329297125,
-0.0570239462,
-0.1508284509,
0.1923974752,
0.222335726,
-0.1864930838,
-0.0602303371,
0.3218354583,
0.2400192469,
0.0907400772,
-0.0054480955,
-0.1957659423,
0.3003567755,
0.2832585871,
-0.2194084972,
-0.1706600487,
0.2801480591,
-0.0132267792,
0.1595284343,
0.0650127754,
0.3555437624,
-0.1990945786,
0.2337106764,
0.1321996748,
0.3232168555,
-0.4168415964,
0.0862705112,
0.2853973508,
0.1657531559,
0.0082565956,
0.2053153068,
0.067194894,
0.0971905142,
0.6143581271,
-0.0283517838,
0.2189553678,
-0.0285650473,
0.21014902,
-0.2261809707,
-0.5105990767,
0.4365903437,
0.1550195217,
-0.1180956364,
-0.1057626754,
-0.1610129178,
0.2295514643,
0.1073055342,
-0.1292931885,
-0.1949423999,
0.1497917026,
-0.2843471467,
0.034376964,
0.1221880168,
-0.0241439641,
0.1386815012,
0.1023367643,
0.2187939286,
0.1756783128,
0.2815099657,
-0.0567289107,
-0.1032154113,
-0.095015645,
0.1916716546,
-0.0450918898,
0.1194565669,
-0.1141228676,
0.1823383868,
0.1099844277,
-0.1482104659,
-0.007616248,
0.3853508234,
0.3195370734,
0.2789934874,
-0.0787196606,
0.1248613521,
-0.1749559343,
-0.0083578043,
-0.4222158492,
0.3339469135,
-0.3401623964,
-0.2274764776,
0.3249013424,
0.1272553951,
-0.2051459998,
0.0182346553,
-0.1452873647,
0.0690737143,
-0.405177474,
0.3360978961,
0.3596473932,
-0.0155953318,
-0.1013650149,
0.2376695275,
-0.232616812,
-0.2524326444,
0.4349990487,
-0.060438253,
0.0878379866,
-0.3028022945,
0.1456752121,
-0.1554858088,
0.4844500422,
0.2788091898,
-0.0002209824,
-0.2452314794,
-0.1420567632,
-0.6544247866,
0.2114128917,
-0.0518946573,
0.2111927569,
0.0496993363,
0.2326919734,
-0.1671120375,
0.1167375147,
0.0590447709,
-0.0167418867,
0.1796305925,
0.0328868553,
-0.2991632819,
0.1567016989,
-0.159565568,
-0.3394168913,
0.0894538909,
-0.4561434686,
0.3197131753,
-0.2177820504,
0.1850192845,
0.2190606892,
-0.1568611264,
0.3673098683,
0.2313754708,
0.3429594636,
0.2560586333,
0.1062693,
0.0294541121,
-0.0163917392,
-0.2015937567,
0.217856288,
-0.3097857237,
0.198126629,
-0.2201925814,
0.0975879729,
-0.4092788398,
-0.1760573387,
-0.2828541696,
0.3462893963,
0.087938793,
-0.005146347,
-0.065286018,
-0.0974265933,
-0.228477791,
0.4050363898,
0.2715634108,
0.0712458938,
0.0581016429,
0.1829339713,
-0.4816669822,
-0.1742371023,
0.4195163846,
-0.2215426117,
-0.2811939716,
-0.2682036459,
0.3721109927,
-0.0936371908,
-0.267952472,
-0.2221825868,
0.0980303586,
0.3129081428,
-0.0035393741,
0.0003505722,
0.3377863765,
-0.1532361358,
0.3676830828,
-0.067065835,
-0.1377291381,
0.0599401258,
0.1395842433,
-0.1061303765,
-0.1550706476
] |
https://github.com/huggingface/datasets/issues/2559 | Memory usage consistently increases when processing a dataset with `.map` | Hi ! Can you share the function you pass to `map` ?
I know you mentioned it would be hard to share some code but this would really help to understand what happened | ## Describe the bug
I have a HF dataset with image paths stored in it and I am trying to load those image paths using `.map` with `num_proc=80`. I am noticing that the memory usage consistently keeps on increasing with time. I tried using `DEFAULT_WRITER_BATCH_SIZE=10` in the builder to decrease arrow writer's batch size but that doesn't seem to help.
## Steps to reproduce the bug
Providing code as it is would be hard. I can provide a MVP if that helps.
## Expected results
Memory usage should become consistent after some time following the launch of processing.
## Actual results
Memory usage keeps on increasing.
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0 | 33 | Memory usage consistently increases when processing a dataset with `.map`
## Describe the bug
I have a HF dataset with image paths stored in it and I am trying to load those image paths using `.map` with `num_proc=80`. I am noticing that the memory usage consistently keeps on increasing with time. I tried using `DEFAULT_WRITER_BATCH_SIZE=10` in the builder to decrease arrow writer's batch size but that doesn't seem to help.
## Steps to reproduce the bug
Providing code as it is would be hard. I can provide a MVP if that helps.
## Expected results
Memory usage should become consistent after some time following the launch of processing.
## Actual results
Memory usage keeps on increasing.
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
Hi ! Can you share the function you pass to `map` ?
I know you mentioned it would be hard to share some code but this would really help to understand what happened | [
-0.1570351422,
-0.129114002,
0.0070894435,
0.4211393595,
0.1809350401,
-0.0064080432,
0.0589692369,
0.1185611635,
0.2151498199,
0.1314367652,
0.4036094844,
0.5179603696,
-0.1873750091,
-0.0342995152,
-0.0775480717,
0.0739516094,
0.1007090211,
0.0621852949,
-0.0024837386,
0.0814321935,
-0.2891270518,
0.1485365033,
-0.2638913393,
-0.0169579871,
-0.3848561645,
-0.2375299931,
0.0283594057,
0.1595098823,
0.2712177038,
-0.4738773108,
-0.1240215972,
-0.0056956499,
0.1005657613,
0.522536695,
-0.0001255529,
-0.0305606797,
0.4019308984,
-0.0119664147,
-0.0148506165,
0.1246172935,
-0.3412507772,
-0.1495828331,
0.0193182379,
-0.0983852968,
0.234502852,
-0.0282177478,
-0.0144426851,
-0.4091300666,
0.287730664,
0.0745108575,
0.1072862446,
-0.040500544,
0.0402129889,
0.2015888691,
0.3487724364,
0.3877719045,
0.0770822316,
0.1127609909,
0.0478497036,
-0.2627835572,
-0.4136323631,
0.2883911133,
-0.0236981288,
0.1897913814,
0.5099982023,
-0.0134920683,
0.3311570585,
-0.3816516697,
0.452960223,
-0.1067861989,
0.1417180449,
-0.2396410257,
0.230925858,
-0.2007990479,
-0.3240593374,
-0.0723849013,
0.2577688098,
0.1840464473,
-0.3346030116,
-0.0982151851,
-0.2691873908,
-0.237099275,
-0.1393746585,
0.1706346422,
0.1292566508,
-0.3141850829,
-0.0201007109,
0.251958698,
0.3842785358,
-0.143848151,
0.0455064885,
-0.3902651072,
-0.0603139922,
0.2051589489,
-0.2177034765,
0.3616621792,
0.1598578393,
-0.1390428394,
0.1860153675,
-0.4799715877,
0.0471167825,
0.0493898056,
-0.0707271397,
0.3078665733,
0.5049361587,
0.0071351789,
0.0339404792,
0.3567738533,
0.1445607394,
0.0739021301,
-0.4335693419,
-0.0968730301,
-0.0254749656,
-0.1504212618,
0.5621683002,
-0.4341062009,
-0.0089523047,
-0.0162019357,
0.0838856176,
0.144040823,
-0.247445181,
-0.1192664281,
-0.1069318354,
0.2773066461,
0.1608291566,
0.2124887407,
0.0798254162,
-0.1200265139,
-0.2981453836,
0.1034974754,
-0.0617957115,
-0.2247254848,
-0.4726650119,
0.2819332778,
-0.113793537,
-0.0237242058,
0.0799850002,
0.0839322954,
-0.1809538603,
-0.431140691,
0.2190316021,
-0.3097910285,
0.3081332743,
0.1337937862,
-0.2712444067,
0.1661079824,
-0.2565069199,
0.2414969504,
0.001533255,
0.6213241816,
-0.4938788414,
-0.2463741302,
0.0666981488,
-0.0554472283,
0.1610039771,
0.237299189,
-0.2890396118,
0.0802728236,
0.413513124,
-0.1228783131,
-0.054127004,
-0.1508702487,
-0.3637881577,
-0.3568011224,
0.0744891986,
0.5120195746,
-0.242115885,
-0.0570951141,
-0.0698021799,
0.1361996233,
0.3940270841,
0.33940804,
-0.1452195793,
0.2179704756,
-0.2710810602,
-0.0092690438,
0.0535810962,
-0.1353996247,
-0.4603149891,
0.1626194119,
0.0354250744,
0.0441171154,
-0.1676273346,
0.0917236805,
0.1136217788,
-0.0206125118,
0.0810670853,
0.2399550676,
0.0672843754,
0.2178072929,
-0.3566507399,
-0.3306135833,
-0.1602680534,
-0.0686364695,
0.0161735341,
-0.1525756568,
0.0998774692,
-0.3316318393,
0.4156734943,
-0.172618717,
0.1996032298,
0.3873458207,
0.328089416,
0.0715709776,
0.0820141435,
-0.037120387,
0.0218246374,
0.0685923919,
-0.5524809361,
-0.4697282612,
-0.0892870352,
0.0595289618,
0.1769145578,
0.2053640485,
-0.095445469,
-0.0883558989,
-0.0736559108,
-0.117929101,
-0.3036298156,
-0.0247293189,
0.1444121748,
0.1526735872,
0.0656355396,
-0.0442602448,
0.027166348,
0.2399704307,
0.0752367824,
-0.2047433853,
-0.2014560699,
0.0656851083,
0.066133678,
0.0654203296,
-0.2618905604,
0.1513354927,
0.2842336297,
0.1063963771,
-0.0741832107,
0.0739029348,
0.3849380016,
-0.1497890502,
0.2134182751,
-0.0641801357,
0.105747655,
-0.0667209253,
0.1213311404,
-0.2330111116,
0.3269655108,
0.3512521088,
-0.0582071468,
-0.1533297598,
-0.0210707299,
-0.0199612379,
0.438690871,
-0.1539623141,
-0.1473775059,
0.0873582959,
0.2650527358,
0.288436234,
0.0570367426,
0.0676866025,
0.4835444093,
0.1863621026,
-0.0907858387,
0.4215970039,
-0.4808895886,
-0.138215512,
0.240339905,
-0.0141240507,
0.199300617,
0.0344422795,
-0.1749191582,
0.0550535843,
0.0971419811,
-0.0127404779,
0.1064735651,
0.2050013393,
0.5473663211,
0.1184343994,
0.2693423927,
-0.0106129777,
-0.1087221801,
-0.0634397194,
0.0204942226,
0.0222308319,
-0.2989657521,
0.2088726908,
-0.245842427,
0.1614697725,
-0.1152485311,
0.165980041,
-0.2664532065,
-0.0865113214,
-0.194799915,
0.2522459924,
-0.0238516182,
0.0529239103,
0.0373384356,
0.1334958971,
0.2425187379,
-0.2201696336,
-0.1335165352,
-0.2635025978,
-0.3734343052,
-0.1866773069,
0.3813975453,
-0.1852742434,
0.3777762353,
0.1496836841,
0.1176152825,
-0.2089564502,
-0.1244720146,
-0.0028927075,
0.3083291054,
0.2173018008,
-0.0969917327,
0.1768708825,
-0.1049770117,
0.097058028,
0.1864475608,
-0.4787375927,
0.0666562468,
0.1396716833,
-0.1192361861,
-0.2064534128,
-0.0172839984,
0.0637787357,
0.0498527884,
-0.220995754,
0.2391793281,
0.0881537944,
0.3557165265,
0.2330055088,
0.423399955,
0.225534454,
-0.22169438,
-0.2498882413,
-0.1388602108,
-0.0541367605,
0.0314730518,
-0.0852678046,
-0.0235588644,
0.0020439103,
-0.0498107001,
0.1298582256,
0.3587277532,
-0.6982622147,
0.0301656872,
-0.2623221874,
0.2872709632,
-0.1540242434,
0.2327872813,
0.190048784,
0.2522500455,
0.0068762302,
-0.1199146658,
-0.3412650824,
0.2269458175,
0.1021324247,
0.2622030973,
0.4573041499,
0.2340849936,
0.1723797619,
0.6430397034,
0.3681117296,
-0.1270595789,
0.509768188,
-0.1093708053,
0.1468432546,
-0.1853077263,
-0.080295004,
-0.146750316,
-0.3551239073,
-0.1013458148,
0.0564735495,
0.1598130912,
-0.3769491613,
0.3007537723,
-0.2385723144,
-0.0146848187,
-0.3792772591,
0.3319389522,
-0.0886366963,
0.4131892323,
0.0318727419,
-0.0961548388,
-0.4214274287,
-0.4405427575,
0.13516137,
-0.4002672732,
0.1780539304,
-0.0396988094,
-0.0401158333,
-0.0138433576,
-0.5272116661,
0.3067457974,
0.0390463583,
0.2621273398,
-0.0297250971,
0.0491982698,
0.2986946702,
-0.0760300756,
0.55041641,
-0.0347137488,
0.0523167886,
-0.0892779306,
0.0212841555,
-0.475646615,
0.055217512,
-0.0031108856,
0.3808131516,
0.0940499827,
0.3508790433,
0.0697247535,
-0.1875790507,
0.0132519938,
0.0421577431,
-0.2354724854,
-0.4961804152,
-0.1325454265,
-0.1841091365,
-0.4304437637,
0.0109232776,
-0.0465678126,
0.033602234,
0.3165079355,
-0.3026176393,
0.1214011684,
0.1358112842,
0.0017414764,
-0.2351053208,
0.5520071983,
-0.0232511237,
0.0332290605,
0.3382863402,
-0.198038578,
0.2834863067,
0.4085794389,
-0.2060971111,
0.1184654534,
-0.1302346885,
-0.1976930499,
0.268609345,
0.2723291218,
0.0560338795,
-0.0271526352,
-0.0440823846,
0.2403118312,
-0.3981291652,
0.0236620679,
0.4464376569,
0.1539869308,
-0.1511220932,
-0.4074269831,
0.3398568332,
0.3760683239,
-0.1697610915,
0.8557538986,
-0.3192207217,
-0.2748619914,
0.4450092316,
0.4598814845,
0.7785286903,
-0.3535767794,
0.3509236872,
-0.1129693389,
-0.4027540088,
-0.3458396494,
-0.1995658427,
0.081823051,
-0.4845448732,
0.033341717,
0.0910126418,
-0.2487889081,
0.2100743204,
0.3734500408,
-0.0257139131,
0.0497203879,
-0.1206619889,
0.1924781054,
0.0493357629,
0.0023937374,
0.2156999409,
-0.2018445134,
0.1236748248,
0.0153348073,
0.0675121173,
-0.1863375157,
-0.0363622755,
0.0534426942,
0.2349958569,
-0.1699991077,
-0.2345429957,
-0.1118466705,
-0.5601987839,
0.276753813,
-0.0396713354,
0.2962335944,
0.0277380571,
0.0559032336,
-0.4646371603,
0.1299650073,
0.0435671508,
0.0832821056,
0.4669638574,
0.2642527223,
0.150646165,
0.0136834122,
0.0841359645,
-0.0185431838,
-0.3130717278,
0.1003364772,
-0.2381835431,
-0.2365968674,
-0.4385219812,
0.3223329484,
0.2301786393,
0.079980351,
-0.2859729826,
-0.0877585784,
-0.1497966945,
0.1472653449,
0.0254738256,
0.1634954214,
0.0104219057,
0.7786631584,
-0.2151992619,
-0.3480200768,
0.0423698761,
0.1496226192,
-0.027683666,
0.1380491108,
0.2621843517,
0.0268457755,
-0.1049384922,
-0.0378299616,
0.2424715757,
0.0739661232,
-0.2794209719,
0.1698549986,
0.042032823,
-0.1616179943,
-0.0963289738,
-0.1669202149,
-0.1237557009,
-0.2514387369,
-0.2342484891,
-0.113955304,
-0.5196933746,
-0.1651578099,
-0.2643459737,
0.2441366315,
0.0532662868,
-0.4230466485,
0.1131860018,
0.4644655585,
-0.1100268215,
0.1683980972,
0.1339190602,
0.1894156635,
-0.024443876,
0.0971354395,
0.1988369823,
-0.1879514605,
-0.1095892787,
0.2368981391,
-0.253247112,
-0.0861604065,
-0.2198059261,
0.2332850397,
-0.1953472048,
-0.21726197,
0.0440844893,
-0.2931399345,
0.135625571,
-0.3491420448,
0.2578802705,
0.0838897079,
-0.2328199148,
0.0373017304,
0.2388154417,
-0.3311470747,
0.2201012969,
0.4545749724,
-0.0425611436,
0.4388764799,
0.1643182337,
0.1744069457,
0.1810051203,
-0.0832993388,
-0.1607128084,
-0.0558805615,
0.1491000652,
0.0030748229,
0.2341904491,
-0.274584949,
0.0132633299,
0.0800808966,
0.0003392175,
0.1882117987,
-0.2667373419,
-0.1475634277,
0.049292732,
0.0782809705,
0.0134434029,
-0.252812922,
0.4869853258,
0.1127321795,
-0.2317195684,
0.1365438402,
0.2346688509,
-0.122377865,
-0.209334299,
0.2005380541,
0.0721568093,
-0.5397242308,
0.028128054,
0.1619892418,
0.0147949979,
0.0210543834,
0.2359563857,
0.2058273256,
0.2101638615,
0.5615086555,
0.3088635206,
0.0974675268,
0.3279831409,
0.0873564333,
-0.1292037666,
-0.5117127299,
-0.0755153447,
0.6525540352,
-0.2939629853,
0.3701234758,
0.0529409535,
0.3967394531,
0.3359200954,
-0.5242993236,
-0.0725553185,
0.3195095956,
-0.1616057307,
-0.1643822491,
0.2400982678,
0.0061773062,
-0.109700121,
0.1531411558,
0.1216988489,
-0.1237888858,
0.7778649926,
0.2835394144,
-0.0875753239,
-0.1889850497,
-0.1279658377,
0.2420135289,
0.3362988532,
-0.2656769156,
0.2335508466,
-0.2037665546,
0.0624333508,
-0.1059371382,
-0.0529252663,
0.4486574531,
0.442936331,
-0.2017532736,
0.1336963475,
-0.0450442135,
0.1585483998,
-0.1356236637,
0.2330150902,
-0.0345747024,
0.1134561151,
-0.0394148901,
-0.0856286362,
0.0248609819,
-0.2527592778,
0.2364505231,
0.446454674,
-0.1928071082,
0.2965648174,
0.0010084677,
-0.2750465274,
0.1302561909,
-0.2167001665,
-0.1702965498,
-0.0253259316,
0.6866877079,
-0.6103771925,
0.1735484749,
-0.2439730763,
-0.0195740201,
-0.2057755738,
0.5154134631,
0.0212632269,
0.118321687,
-0.2750027776,
-0.0961363316,
-0.4455813766,
0.0383727141,
-0.4475417435,
0.0241200104,
0.22090891,
-0.0205835104,
-0.4118448794,
-0.1685492694,
0.4470592141,
-0.1555502862,
0.1067607552,
0.2095531225,
-0.4646930695,
0.1016205326,
-0.1060339063,
0.0645980611,
0.0489250347,
-0.5800878406,
0.3102745116,
-0.2063926458,
-0.07242883,
-0.2161650509,
-0.1279753,
0.0831954777,
0.1493739933,
0.7480972409,
0.1544766873,
0.0933579952,
-0.1013717428,
-0.1662062705,
-0.2386661768,
-0.009287972,
-0.1082658768,
-0.300763309,
0.0482403301,
0.2131526768,
-0.4186709225,
-0.3162446618,
-0.0958472788,
-0.0973262042,
-0.012664251,
-0.101790756,
-0.0313049629,
-0.037661016,
-0.0718607754,
0.258525461,
-0.047258947,
0.4419742227,
0.0065752417,
0.1275048405,
-0.2060887218,
-0.1701952815,
0.3051476181,
-0.5047954917,
-0.5666652918,
0.2486847043,
0.2222002,
-0.2913553119,
-0.4132840037,
-0.4088248909,
-0.3057345748,
0.3120823801,
0.1108763665,
-0.3098550439,
0.0957601368,
-0.2816903293,
0.0954846442,
-0.055178389,
0.3852953911,
0.0510677807,
-0.1665997505,
0.2219673693,
-0.1396970749
] |
https://github.com/huggingface/datasets/issues/2554 | Multilabel metrics not supported | Hi @GuillemGSubies, thanks for reporting.
I have made a PR to fix this issue and allow metrics to be computed also for multilabel classification problems. | When I try to use a metric like F1 macro I get the following error:
```
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'
```
There is an explicit casting here:
https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/src/datasets/features.py#L274
And looks like this is because here
https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/metrics/f1/f1.py#L88
the features can only be integers, so we cannot use that F1 for multilabel. Instead, if I create the following F1 (ints replaced with sequence of ints), it will work:
```python
class F1(datasets.Metric):
def _info(self):
return datasets.MetricInfo(
description=_DESCRIPTION,
citation=_CITATION,
inputs_description=_KWARGS_DESCRIPTION,
features=datasets.Features(
{
"predictions": datasets.Sequence(datasets.Value("int32")),
"references": datasets.Sequence(datasets.Value("int32")),
}
),
reference_urls=["https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html"],
)
def _compute(self, predictions, references, labels=None, pos_label=1, average="binary", sample_weight=None):
return {
"f1": f1_score(
references,
predictions,
labels=labels,
pos_label=pos_label,
average=average,
sample_weight=sample_weight,
),
}
```
| 25 | Multilabel metrics not supported
When I try to use a metric like F1 macro I get the following error:
```
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'
```
There is an explicit casting here:
https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/src/datasets/features.py#L274
And looks like this is because here
https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/metrics/f1/f1.py#L88
the features can only be integers, so we cannot use that F1 for multilabel. Instead, if I create the following F1 (ints replaced with sequence of ints), it will work:
```python
class F1(datasets.Metric):
def _info(self):
return datasets.MetricInfo(
description=_DESCRIPTION,
citation=_CITATION,
inputs_description=_KWARGS_DESCRIPTION,
features=datasets.Features(
{
"predictions": datasets.Sequence(datasets.Value("int32")),
"references": datasets.Sequence(datasets.Value("int32")),
}
),
reference_urls=["https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html"],
)
def _compute(self, predictions, references, labels=None, pos_label=1, average="binary", sample_weight=None):
return {
"f1": f1_score(
references,
predictions,
labels=labels,
pos_label=pos_label,
average=average,
sample_weight=sample_weight,
),
}
```
Hi @GuillemGSubies, thanks for reporting.
I have made a PR to fix this issue and allow metrics to be computed also for multilabel classification problems. | [
-0.2212652564,
-0.1788478643,
0.0044774525,
0.300899148,
0.6725276709,
-0.1359904259,
0.4806862175,
-0.1023351625,
0.2283086926,
0.3166794479,
-0.1240748242,
0.2981927693,
-0.2808500826,
0.4046334624,
-0.2508817315,
-0.1761211753,
-0.216973871,
-0.3327276111,
-0.0599903613,
0.1059187576,
-0.4245599508,
0.0359553099,
-0.392898649,
-0.0474174134,
-0.2053829879,
0.068215467,
0.1161154881,
-0.1135554612,
-0.2787646651,
-0.3295218945,
0.0360863805,
-0.0185578316,
-0.006459441,
0.4338573217,
-0.0001161838,
-0.1123571619,
0.2313466817,
0.0006337613,
-0.12151061,
-0.2388669699,
0.1006874666,
-0.1241764724,
0.0392227471,
-0.2491006553,
0.0151845068,
0.063478902,
-0.3937757015,
-0.1104589254,
-0.0291238092,
0.3288378417,
0.1258651316,
-0.062961638,
0.4294288158,
-0.0971219316,
-0.1565203667,
-0.0151517354,
-0.2259763777,
0.2436191887,
0.0067116916,
0.1893276572,
0.1993248016,
0.3678984046,
0.05517295,
0.0967104137,
0.3370931447,
-0.0944951102,
0.1595985442,
-0.1680666208,
-0.1602084041,
0.2209851593,
-0.0616233572,
-0.0668190718,
-0.5924569964,
-0.0729387254,
0.0992548317,
-0.8592528105,
0.1026920378,
-0.1433411837,
-0.0054160058,
-0.1943720579,
-0.4583283961,
-0.1244822219,
-0.1109635755,
0.2019527406,
-0.1810647845,
0.440616101,
-0.1584266424,
0.2374358326,
0.3454504609,
-0.1518543661,
-0.2052838057,
0.0081736669,
0.0583261885,
0.2056107968,
-0.356854707,
0.109311007,
-0.1768295467,
0.0013986789,
0.1842877865,
-0.1633954495,
-0.2385579944,
0.1422112584,
-0.3320729434,
0.0641796738,
0.1225535721,
0.3998176455,
0.2546085119,
0.1608309448,
0.0720791519,
0.1423229873,
-0.1401436031,
-0.1567821652,
-0.0698928088,
-0.365604043,
0.256716907,
0.3489766121,
-0.2015085518,
0.0135226324,
-0.3946034312,
-0.0448181443,
-0.0712452307,
0.008279711,
0.6896386743,
0.0917186812,
-0.03180838,
0.221433714,
0.1153472215,
0.4436764419,
0.0687962919,
-0.2091438472,
-0.0214125216,
0.0479799397,
-0.3339828849,
0.0482684448,
0.1806907058,
-0.0014866926,
0.0539553761,
0.1387741566,
0.4493708014,
-0.2276752442,
-0.1483097076,
-0.2939902842,
-0.2085355818,
0.1655086875,
-0.0190413594,
0.1512503922,
0.3160665035,
-0.2302960753,
0.0357704759,
0.066923514,
-0.4116388261,
0.0382436886,
-0.0666186363,
0.0712283626,
0.0483757481,
0.1025641784,
-0.254299432,
0.2213602513,
-0.1325971186,
-0.066576086,
-0.00361415,
-0.4038882256,
-0.2503189445,
-0.1125377342,
0.2882921994,
-0.1103662252,
0.2029674798,
-0.1416214257,
0.0057295784,
0.1887963414,
0.0668101907,
0.1195798069,
-0.0640975386,
0.0359415002,
0.0520433038,
-0.0502254739,
0.5578495264,
-0.772462368,
0.0221549757,
-0.1110543907,
0.1622599959,
-0.1910859346,
0.1772529781,
0.0577876382,
-0.0404194258,
-0.2197520584,
0.4865657687,
0.0727671459,
0.0616688207,
-0.1428972632,
-0.0895668268,
-0.156912446,
-0.0444322042,
0.0377983525,
0.3760764003,
-0.0571965873,
0.1041150242,
0.3804464638,
-0.1173128262,
-0.2153510302,
0.0217815042,
0.2393888086,
-0.1084285527,
-0.2037581354,
-0.0217313655,
-0.5195296407,
-0.2728663087,
0.2056164593,
0.0130415931,
0.1000802368,
0.3230245709,
-0.105426237,
-0.2257855535,
0.1438708901,
0.0650467649,
0.1493526995,
0.0401069745,
-0.0796520859,
-0.0936165154,
-0.0056916922,
-0.1318433434,
-0.0627464205,
0.1535236835,
0.1577181071,
0.351640135,
-0.0704770163,
-0.0087626725,
-0.0825979337,
0.0973035321,
0.3517901599,
0.4347659349,
0.1407413185,
-0.0306354705,
0.3947172463,
0.2970744073,
-0.5094217062,
0.1806080341,
0.3879391551,
0.3607360125,
-0.0730338991,
-0.1506703794,
-0.0504653417,
0.2503888309,
-0.2185510695,
-0.1461928636,
0.3504965603,
-0.311526835,
0.3024225533,
0.1430209875,
0.3508876562,
0.2961010933,
0.1546095014,
-0.2565426826,
-0.3138023019,
0.1629927754,
-0.2991595268,
-0.1005359516,
-0.1096762046,
-0.3435277343,
-0.0732407868,
0.4491714239,
0.2249613404,
0.3339295983,
0.1307247877,
-0.0456685424,
0.1011582911,
-0.2851279676,
-0.4623362124,
0.3690939546,
0.0325325243,
-0.0324041024,
-0.0058947382,
-0.2700991035,
-0.1267910898,
0.321500808,
0.0240245089,
0.0201604292,
0.0583685711,
0.0777409971,
0.0127551854,
0.0487492681,
-0.0738750473,
0.1537624002,
0.0149452183,
-0.3629772365,
0.0582908243,
-0.2453487813,
-0.0463336445,
-0.0935082808,
-0.7585225105,
-0.1761826426,
-0.3346894383,
-0.0403058417,
0.2386612594,
0.2290698588,
0.2197220325,
0.1551396102,
0.2061390579,
0.1241325736,
0.1301220357,
-0.0368102714,
-0.1414494812,
-0.1046105027,
-0.0305020362,
0.1273279935,
-0.0723793656,
0.0829009563,
0.1874417067,
0.2402454168,
-0.2738409638,
-0.5661293864,
-0.0316679999,
-0.0450726151,
0.6306039095,
0.2490512431,
-0.3593469858,
-0.3242051899,
0.231318891,
0.5897346735,
-0.0427170098,
0.225486815,
0.3594717085,
-0.0859734416,
-0.2206722349,
-0.3616173267,
0.309379369,
-0.0327620357,
-0.2078435272,
0.2410563231,
0.2146816403,
-0.1038078368,
0.3323223889,
0.0637742132,
0.1596955806,
0.33333534,
-0.0583833531,
-0.2203376889,
0.11703448,
0.1210969836,
-0.2581453323,
-0.2353102118,
-0.0685079992,
0.2108469009,
0.1027470678,
0.0835007429,
-0.0877120122,
-0.6157521605,
0.0433086604,
-0.1099517047,
0.0962612405,
0.35325104,
-0.0236949474,
-0.0236149579,
-0.0050310828,
-0.29542467,
-0.2439958751,
0.1375763416,
-0.2149137408,
0.1514296085,
-0.0051488783,
0.124748081,
0.1719858795,
0.1946258545,
0.3539065123,
0.0950793773,
0.4159368873,
0.0176345315,
0.2028154284,
-0.1227413043,
-0.4960139394,
0.2217462063,
-0.0935747996,
0.0730176494,
0.0644239932,
0.0248819962,
0.2972832918,
-0.2300758958,
0.4053128958,
-0.4326804876,
-0.2399401367,
-0.1216045916,
-0.0679211766,
-0.0599616319,
0.0068514198,
-0.068679221,
-0.4538890123,
-0.0174992234,
-0.0197699219,
0.0618203878,
-0.0652202368,
-0.0690511987,
-0.1912249029,
-0.5020270944,
-0.0877894312,
0.3013488054,
0.1033228189,
0.3473798931,
-0.0139065161,
0.460322082,
-0.0922819898,
0.0699031353,
0.4486810863,
-0.3780314028,
-0.1648923904,
0.4228253961,
0.0128898174,
-0.3764900565,
-0.0492268912,
-0.3481477499,
0.1504311562,
0.2173476964,
0.5315405726,
-0.3542802036,
-0.101385951,
0.2975426316,
0.0651198253,
-0.0705222487,
0.0410904288,
-0.1671098471,
-0.2446785867,
-0.0693639219,
-0.1013949439,
0.1543730944,
0.4377833009,
0.1157249212,
0.2029926181,
-0.4573970139,
-0.1873928756,
0.1859020591,
-0.1936884522,
0.0104944929,
0.1093761474,
0.0429961234,
-0.1465336084,
-0.2478698492,
-0.0152929639,
0.321135819,
-0.0384488106,
-0.6306097507,
0.0358043537,
-0.2560369074,
0.3225228786,
0.0526948497,
-0.2152550519,
0.0528170355,
-0.3137716949,
0.4578754902,
-0.0779878944,
0.0748888478,
0.4235396981,
0.0654162318,
-0.1905529052,
-0.1197463423,
0.4245311022,
0.2586817741,
-0.1111520231,
0.5211783648,
0.0430516377,
-0.3598250747,
-0.0759662539,
0.5890727639,
0.6975995898,
-0.2226118147,
-0.2586010695,
0.1672003716,
0.0823533088,
0.5033921003,
0.193038255,
0.1268892586,
-0.0474993698,
-0.142663002,
-0.0115388073,
0.0176427215,
0.0291981548,
-0.0812455565,
-0.272131741,
0.4355117977,
-0.3233121634,
-0.1192599013,
-0.0509027913,
0.0212957859,
0.1017357707,
-0.331838131,
0.0844052657,
0.1085778251,
-0.0523182862,
-0.0902348682,
-0.1292124689,
-0.0444773585,
0.0880721509,
-0.078350082,
-0.3915766478,
-0.2225100249,
-0.2379126549,
-0.0229873974,
0.1737507135,
0.2766940594,
-0.0461668819,
0.3717233837,
0.8833090663,
-0.0897016078,
-0.2677651048,
0.0498957112,
-0.4189761579,
0.1067226902,
-0.1613911986,
-0.0561747067,
0.3169290125,
0.0474150032,
0.1192993522,
0.131415993,
0.1853278279,
-0.0921995789,
0.0002037734,
0.0091380607,
-0.1528536379,
-0.0397047773,
0.1344160438,
-0.1465822905,
0.1696136892,
-0.2701956332,
0.0309948884,
-0.042093385,
0.0146139301,
0.3356790543,
-0.1573169529,
0.0131879896,
0.1277574599,
0.0560103729,
-0.0134671088,
-0.1197612733,
-0.0039820089,
0.1132159978,
-0.009625867,
-0.0553261489,
0.0066842735,
-0.1056758389,
-0.2056482434,
0.4466662705,
0.2419055104,
-0.1288340986,
0.2151127607,
0.7306459546,
0.0171225909,
0.1984631866,
0.0083932132,
-0.4410927594,
0.0696250573,
0.2799541354,
-0.3629094958,
-0.267287761,
-0.3785533011,
0.2672263682,
0.0635078549,
0.0819192454,
-0.2287498116,
-0.0512530059,
-0.3522159755,
-0.0120716412,
0.0662601143,
-0.1235132068,
-0.0876623467,
0.2427787781,
0.0234480351,
-0.0590096116,
-0.1183171272,
-0.0645193234,
-0.3597303629,
0.1503219754,
0.19567132,
0.0865002275,
-0.0612367392,
-0.1852580905,
-0.2648677528,
-0.2953038812,
-0.2420810461,
0.3174173236,
-0.1273348182,
0.1342583001,
-0.208667174,
0.4146329165,
0.2062971294,
0.0100607239,
0.2734766006,
0.2579460144,
-0.1087880284,
0.1787582487,
0.2047466338,
0.0324225649,
-0.3954741955,
-0.0599183738,
-0.012458615,
-0.0995981842,
0.2261799127,
-0.1581045836,
0.2550154924,
0.303235352,
0.2987623811,
0.0989709944,
-0.1419447511,
0.0377798602,
-0.0452911146,
0.0828033984,
-0.0907505006,
-0.3420125246,
-0.1665190011,
0.1157024279,
0.1041974947,
0.4284947515,
0.2192293704,
0.1410690397,
0.1890287399,
-0.2953190804,
0.2003721893,
-0.1582854092,
-0.1535172462,
0.2303366959,
0.2160969377,
0.1102141663,
0.5138716698,
0.0970057398,
0.331156522,
0.5222995281,
-0.2508502603,
0.1869081557,
-0.0841611326,
0.0725288913,
0.0303892381,
0.0947313458,
0.1601169407,
0.0957944095,
-0.2019712627,
-0.0214735754,
-0.4733522236,
0.0767653808,
-0.7301220894,
-0.2037563026,
-0.3301917613,
0.4148740172,
0.0914106518,
-0.2277123034,
-0.3952120543,
-0.1649127007,
-0.1175167337,
-0.140096724,
-0.1764771342,
0.2861176133,
0.3323249519,
-0.0380243249,
0.1797471941,
-0.2377056777,
-0.7110531926,
0.4802886844,
0.2804579735,
-0.1638115942,
0.2355113477,
0.2511025369,
0.1285535395,
0.1014561504,
0.6210409403,
0.4934691191,
0.3399622142,
-0.1255111396,
-0.2191705853,
-0.2566691041,
-0.1811934114,
-0.0969045237,
0.1962876916,
0.448663801,
0.0767921656,
0.1382712126,
0.0415118672,
-0.1604162604,
0.3234142959,
-0.3106702864,
0.1860598922,
-0.288533479,
0.2526659071,
-0.091608569,
0.0181873739,
0.0682783425,
-0.1238180697,
-0.3758450449,
-0.0621207543,
0.2017791718,
-0.0491468422,
0.2422333956,
-0.061436031,
0.0370758325,
0.2704457939,
0.2974849641,
0.0136607233,
-0.0163825769,
-0.2051002979,
0.0752962679,
-0.5276017189,
-0.1579041928,
0.1876160353,
-0.0403054543,
0.268257916,
0.0356174707,
-0.0518562384,
0.2787482142,
0.2536308169,
-0.0934765115,
0.3922421038,
0.1186252087,
-0.3982810974,
0.1605595201,
0.1794388294,
-0.1133189201,
0.0604969859,
-0.2399595976,
0.1822283417,
-0.3501202762,
0.0218924806,
-0.2242319286,
0.2188231498,
0.0837771371,
0.2790902555,
0.2434476614,
0.2892826498,
0.460046351,
0.1918537915,
-0.0273396634,
0.0433668494,
0.0758348554,
0.1163826883,
0.091314815,
-0.1747366786,
0.3008783162,
-0.3320214152,
0.0073985662,
-0.198424533,
0.0825695843,
0.0664648488,
-0.1721778363,
-0.2462130338,
0.2692368329,
-0.3208705783,
-0.0951892659,
0.3345552981,
0.4876782298,
-0.0352368876,
0.4263416231,
0.0300742388,
-0.3520095348,
0.3873305917,
-0.2040196508,
-0.3546741009,
-0.1390376687,
0.2584778666,
0.0670105517,
-0.1050571129,
-0.6502360106,
-0.1225926727,
0.2604496777,
0.2896444499,
-0.5856113434,
0.294988513,
-0.1904968023,
-0.1474586427,
0.013612397,
-0.3887821734,
-0.0953037441,
0.0316898152,
0.1335058212,
0.2647956014
] |
https://github.com/huggingface/datasets/issues/2553 | load_dataset("web_nlg") NonMatchingChecksumError | Hi ! Thanks for reporting. This is due to the WebNLG repository that got updated today.
I just pushed a fix at #2558 - this shouldn't happen anymore in the future. | Hi! It seems the WebNLG dataset gives a NonMatchingChecksumError.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('web_nlg', name="release_v3.0_en", split="dev")
```
Gives
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://gitlab.com/shimorina/webnlg-dataset/-/archive/master/webnlg-dataset-master.zip']
```
## Environment info
- `datasets` version: 1.8.0
- Platform: macOS-11.3.1-x86_64-i386-64bit
- Python version: 3.9.4
- PyArrow version: 3.0.0
Also tested on Linux, with python 3.6.8 | 31 | load_dataset("web_nlg") NonMatchingChecksumError
Hi! It seems the WebNLG dataset gives a NonMatchingChecksumError.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('web_nlg', name="release_v3.0_en", split="dev")
```
Gives
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://gitlab.com/shimorina/webnlg-dataset/-/archive/master/webnlg-dataset-master.zip']
```
## Environment info
- `datasets` version: 1.8.0
- Platform: macOS-11.3.1-x86_64-i386-64bit
- Python version: 3.9.4
- PyArrow version: 3.0.0
Also tested on Linux, with python 3.6.8
Hi ! Thanks for reporting. This is due to the WebNLG repository that got updated today.
I just pushed a fix at #2558 - this shouldn't happen anymore in the future. | [
-0.1927950233,
0.1298392266,
-0.1363760978,
0.0406424664,
0.2651571929,
0.0086787939,
0.1319975704,
0.4511447549,
0.2963726819,
0.0861964822,
-0.0655134991,
0.2723964453,
0.0220884494,
-0.0255219638,
-0.2154659033,
0.5214448571,
0.0755516589,
0.0162445791,
-0.109369427,
-0.1461786032,
-0.2066717297,
0.1184714288,
-0.0733740628,
-0.1003214791,
0.0636146069,
0.2236550897,
0.2499175519,
0.2134230435,
-0.1248323694,
-0.262831986,
0.3232800961,
-0.0495467409,
-0.085111253,
0.2211037576,
-0.0001071248,
0.1515760571,
0.3256530762,
-0.0256444216,
-0.4283015728,
0.0641527176,
-0.5148385763,
-0.5065796971,
-0.0188269708,
-0.2006544769,
-0.0035357848,
0.2438145578,
0.0948676094,
-0.1746025532,
0.1221947074,
0.1583403498,
0.2839369476,
0.5558203459,
-0.0055376589,
0.1301894784,
0.0390268117,
-0.1125153378,
-0.1401673257,
0.2185909152,
0.0809826404,
-0.1305689216,
-0.3386834562,
0.1725432426,
-0.2540832758,
0.2696691453,
0.1147567704,
-0.0982421488,
0.2315459549,
-0.0817005634,
0.1634392589,
0.3882211745,
0.161482513,
-0.2111610919,
-0.211198613,
-0.141582042,
-0.0977411196,
-0.0648081452,
0.2398226261,
0.3723760545,
-0.2639215887,
-0.0806600899,
-0.3824216127,
0.2406362742,
0.1303240657,
0.1618116945,
0.0931687057,
0.2458065152,
0.0526400991,
-0.0170342438,
-0.0117073897,
-0.201550737,
0.1708226651,
-0.4176907539,
-0.1616996229,
0.0688043535,
-0.5657454133,
-0.1234652847,
0.2419983596,
0.5164669156,
0.3947960734,
0.445156455,
0.2517745495,
0.2448198199,
-0.2092460096,
0.1271484047,
-0.0440326184,
0.1494941562,
0.2171939909,
-0.083760649,
0.3254150748,
0.0024216101,
0.0263355672,
0.2340878844,
0.1602005959,
-0.1498557925,
0.5749759674,
0.0011795051,
0.1858931333,
-0.158882767,
-0.2398216724,
0.2297265977,
0.1152856648,
-0.1611860245,
0.0508991927,
0.3672366142,
-0.157346189,
0.2044909894,
-0.0839354619,
0.1732859015,
-0.1468554735,
-0.2998722792,
-0.2878329754,
-0.2022191584,
-0.0596314482,
-0.0296897069,
0.2052136809,
-0.0602189004,
0.3227383792,
0.1260931343,
0.0152073186,
-0.0398380794,
0.170598343,
0.1035450101,
-0.0805900767,
0.2938561738,
0.0489571542,
0.1108819842,
0.2325152457,
0.0842917264,
-0.151392132,
0.0721647739,
-0.1199172661,
-0.2106702328,
0.0581687316,
0.2775704563,
-0.3827543855,
-0.1413072646,
-0.0195724331,
-0.4089501798,
0.2865952849,
-0.0916859284,
0.0641916394,
-0.2404455245,
-0.1441320777,
-0.2984173298,
-0.1050306633,
0.1696689427,
0.2377001196,
-0.0296221301,
-0.1784472913,
-0.1316383332,
0.3148431778,
0.3782692254,
-0.1069782972,
-0.1547902673,
-0.2393767089,
0.13313061,
0.5495226383,
-0.1487932205,
-0.4355503023,
0.145746991,
-0.012283057,
0.2730146646,
-0.1001158059,
0.2468241751,
-0.4284119606,
0.0206718966,
-0.2852039933,
0.2863255739,
0.0123604741,
0.2956213057,
-0.2442985922,
-0.2357428372,
0.5397988558,
0.0765881315,
-0.0410943553,
-0.0127480477,
0.1415345818,
-0.2447985709,
0.3284389675,
-0.2872792184,
-0.0617065802,
0.0739207417,
0.2371890843,
0.0206660982,
0.0100721903,
-0.0122237802,
-0.5249137878,
0.2644128203,
-0.1044163182,
0.0427523293,
-0.02492873,
-0.0707205832,
-0.1582020223,
0.0300225914,
-0.1433978379,
0.0346075483,
0.1706937104,
0.5151422024,
0.2642631233,
0.044559069,
0.0240483135,
0.283556819,
-0.369910717,
0.0000205338,
-0.5306885242,
0.2723830938,
-0.0884007886,
-0.0901311338,
0.0843476132,
-0.0441489108,
-0.0575294495,
0.104135558,
-0.2234270871,
0.3572004437,
0.0527741872,
-0.0378874205,
0.0728341863,
0.3291752338,
-0.1157857925,
-0.2637717128,
-0.0720945224,
0.6472373605,
0.1213912442,
-0.107888855,
-0.1684261411,
0.5147513151,
-0.1285653412,
0.1689170003,
-0.0175980404,
0.1398557723,
0.2636688352,
-0.1620628089,
-0.2084147334,
-0.1159801856,
0.2796032429,
-0.1819344461,
0.2042544633,
0.1351904273,
-0.2331166267,
0.0146669932,
0.4084136188,
-0.1645732075,
0.2219511569,
0.1339522153,
0.2364457846,
-0.245429337,
-0.0098472778,
0.1951208562,
0.3664529026,
0.1531025767,
0.0423472002,
0.0599133298,
-0.2892876565,
-0.2328205705,
0.0300007574,
0.0216759741,
0.2292784005,
0.2969280183,
0.2905500531,
-0.2966411412,
-0.4513900876,
-0.1066412777,
-0.0866573378,
0.2381998748,
-0.3005836606,
-0.0691238791,
-0.3129400015,
-0.2774089575,
-0.2933869064,
-0.3166303933,
-0.4951161444,
-0.5132746696,
-0.0091081671,
0.0563073494,
-0.1829122305,
0.3383723199,
-0.4450574219,
0.0377307385,
0.1850382388,
0.0869438052,
-0.0377460718,
-0.1209626496,
-0.0876409709,
0.0553466342,
0.3775407374,
0.0115626231,
0.3231646717,
-0.3149309158,
-0.075811483,
-0.3380954266,
-0.2287265658,
0.026402751,
-0.0950909927,
0.0999894291,
0.2130420953,
0.2359594256,
-0.0065542832,
-0.1909572333,
0.3453706503,
-0.2321028411,
-0.406172663,
0.3326815367,
-0.0245838109,
-0.0256824177,
0.0126291886,
-0.0888281837,
-0.0977616385,
-0.271551609,
-0.0555884317,
0.1748377681,
0.2174035311,
0.2924057841,
-0.0828535482,
-0.0749795139,
0.1126661897,
0.4408068955,
-0.3611868918,
-0.522300005,
0.4244416356,
0.0466346629,
-0.3514764011,
-0.1904102713,
-0.0677133277,
0.2386673987,
-0.0087468401,
-0.4237615466,
-0.157984063,
-0.3770033717,
0.2211372554,
0.1855119318,
-0.0317661315,
0.1636944413,
0.0585966967,
-0.1209819317,
-0.3027125895,
-0.0790317282,
0.1829792261,
-0.265840739,
0.2607698441,
-0.1361593157,
0.282014817,
-0.0035263672,
0.2051796168,
0.4078883529,
0.0132673429,
0.0129670147,
-0.0036061648,
0.3086513281,
-0.0445418023,
-0.2472734749,
-0.1389977336,
0.0274225101,
0.0640769005,
0.2704856098,
-0.0137383137,
-0.1399647593,
-0.057654012,
0.0702784732,
-0.137827307,
-0.2034450769,
0.0669690818,
-0.0615941025,
0.1262952983,
0.1868984401,
0.1167984307,
-0.2275164425,
-0.3898288906,
0.0272279941,
0.2789314091,
-0.2099243999,
-0.0508675873,
-0.3776345849,
0.0720059797,
-0.0977069363,
0.3176906407,
0.1439625174,
0.4831464291,
0.217576012,
-0.4104099274,
-0.0094877966,
-0.1612325013,
0.1295087337,
-0.4809759259,
0.3939147294,
0.0182960331,
0.1202988774,
-0.4662637115,
-0.1257722378,
0.0240088254,
-0.2370336801,
0.5430123806,
0.0031229872,
-0.1567394137,
0.006920442,
0.0016439147,
0.3630625308,
-0.1951063871,
-0.2624639869,
-0.4572245479,
-0.0425183922,
-0.3031874895,
-0.0849628374,
-0.2918835282,
0.1151710898,
-0.0952507406,
0.1547554582,
-0.0363610759,
-0.0599312633,
0.2802998722,
0.1140880883,
0.0919067636,
0.0681539699,
0.2160037309,
-0.3673733473,
0.1742976308,
-0.0950672105,
0.6290801764,
-0.0904103518,
-0.4050774276,
-0.020079948,
-0.1138671339,
-0.2192773819,
0.1024191156,
0.0712339282,
-0.0211345479,
0.3180245757,
-0.0292251259,
-0.132137835,
-0.0529642813,
-0.0654845238,
0.0568434,
-0.3134825826,
-0.2322528362,
0.2438935637,
0.0249275938,
-0.0923279673,
0.3096948862,
-0.3169839382,
0.0038189478,
0.1991739869,
0.2315116227,
0.8551763892,
0.0946295336,
0.0524025671,
0.2603977323,
-0.2381094247,
0.0461070724,
-0.2218384147,
0.1222625822,
-0.384721905,
-0.1620905399,
0.0296292529,
-0.2397547513,
0.1104676947,
0.1308331341,
0.0456583202,
0.3157445788,
0.0824448317,
0.2654357553,
0.0267858393,
0.2626694441,
-0.1982166618,
-0.0077395923,
-0.1783954203,
0.2799905539,
-0.1096335649,
0.2839098275,
-0.024587892,
-0.0027102754,
-0.0680270568,
-0.1203389764,
-0.308773309,
0.3578497469,
0.2986805141,
0.3499223888,
0.310975939,
-0.0301481709,
-0.4435336292,
0.2308915555,
0.3204564452,
0.1709214449,
-0.2796055079,
0.10427472,
0.3298264146,
0.3211561441,
-0.056929972,
0.036034774,
0.2986279428,
-0.0342517532,
-0.1673175246,
-0.0113267805,
-0.0020907111,
-0.4932834506,
-0.0464102328,
-0.0454820357,
-0.3058385253,
-0.2540877759,
0.0605032034,
0.0196042191,
0.1603307724,
-0.202675283,
0.1930449903,
0.2711467743,
-0.1588139236,
0.2549832463,
0.0608974136,
-0.3740057945,
-0.2073375434,
0.5218607187,
0.1486143172,
0.0697738081,
0.3076371551,
0.0654314458,
-0.2238655984,
-0.2767476141,
0.0103028938,
0.081759423,
-0.2700173557,
0.0866529197,
-0.2723053396,
0.1638425589,
0.0175201148,
0.4179404378,
0.198093459,
0.283411175,
0.130113855,
-0.4619598389,
-0.1199919581,
-0.1962399334,
0.2207472473,
0.2335413992,
-0.3102976084,
0.0291038007,
-0.0688466951,
-0.0642738864,
-0.4017803967,
-0.1179602817,
-0.3063414097,
0.0454382375,
-0.0378149152,
-0.0823218077,
0.0140702277,
0.0197724849,
0.2036686391,
-0.1700206101,
-0.315656215,
-0.2876890302,
0.0085888058,
0.0834122226,
0.0585625768,
-0.1869752556,
0.0615145192,
-0.0504393429,
-0.037277624,
-0.1653632969,
-0.0062807538,
0.0559807345,
-0.124554798,
0.2315864712,
0.0302837566,
-0.0545865707,
0.1691435874,
-0.1704312265,
-0.4853292406,
0.0937885419,
0.0261775367,
0.0188590568,
0.1663450301,
0.0416226238,
0.2209571153,
0.1370638609,
-0.0457315147,
-0.0730073079,
0.3050607145,
-0.3060207367,
-0.0913373232,
0.3514892757,
0.2890302539,
0.2422015667,
-0.3309823871,
-0.0974547714,
0.1171245873,
0.3108783066,
-0.3707127273,
-0.0434042588,
0.2625827789,
0.1552301347,
0.1360215098,
0.0985783935,
0.0700101331,
-0.3690331578,
0.5197041035,
0.0253090262,
0.1697223037,
-0.4504549503,
0.1651876569,
0.3777583539,
-0.0752392262,
-0.1158110052,
0.1755262166,
-0.2276332676,
-0.0030604936,
-0.0224712845,
-0.0467965007,
0.3226108253,
-0.1982212514,
0.1586284339,
-0.2886129022,
-0.4204320908,
0.4601887167,
0.2164719403,
-0.1307117194,
0.0211131163,
0.3001400828,
0.2406681776,
0.0003143102,
0.2337664068,
-0.5237199068,
0.2197771817,
-0.166095376,
-0.1239841059,
-0.1766878068,
-0.1308230758,
0.0225969404,
0.3250639141,
-0.039841786,
0.0951619595,
0.0081484057,
0.1755938977,
-0.1504281461,
-0.6300575137,
0.0377605818,
-0.0301662739,
-0.0750699341,
-0.2521838844,
0.127486065,
0.3072913587,
-0.1701801419,
0.0424120277,
0.3488595486,
0.3462338448,
0.3489648104,
0.2465879619,
0.0129707791,
-0.0232698601,
-0.0298773609,
-0.3037688434,
0.7039054632,
0.0558110476,
0.0164373796,
0.365220964,
0.1872574389,
-0.1858241111,
0.0569776483,
-0.120712176,
-0.1957031488,
-0.028100621,
0.501901567,
0.0237712376,
0.1474240422,
-0.3337136805,
0.2036661506,
-0.3072109222,
0.0872114301,
0.104113251,
0.2170725912,
0.1662150919,
-0.2520649731,
0.1290138662,
-0.127219364,
0.4657264352,
0.1348125488,
-0.0919345021,
-0.0446530804,
-0.3844291568,
-0.5979170203,
0.2705077529,
-0.2651816905,
-0.0466284752,
-0.0824068636,
0.2728164792,
-0.051435791,
0.1950718015,
0.1734675467,
-0.0461842157,
-0.1869149804,
0.0627998635,
-0.2228789628,
0.0221344791,
0.0849630088,
-0.2045164853,
-0.0453158692,
-0.2967480421,
0.2486696839,
0.0341975093,
0.2029131502,
-0.090388447,
-0.0434539765,
-0.0509297401,
0.277199477,
0.2398992479,
0.3135382235,
0.5241898894,
-0.0809629485,
-0.1597723663,
-0.2426404208,
-0.1934989393,
-0.1248017401,
0.3427432775,
-0.1332730055,
0.2896221876,
-0.0487708785,
-0.1610382944,
-0.2663969994,
0.2788796723,
0.1420765817,
-0.224394232,
-0.125995934,
0.0790789276,
-0.2387905419,
0.0993521288,
-0.2077051848,
-0.0864707828,
0.1735782027,
0.4444508553,
-0.1318270117,
-0.222605288,
0.4384515584,
-0.0963422358,
-0.2203109264,
-0.2880277336,
0.1975809932,
-0.1742269099,
-0.2328075618,
-0.6331067085,
0.0692531765,
0.3489447832,
0.1409206837,
-0.093942523,
0.2052642107,
-0.17683734,
0.2215215862,
-0.0507070571,
0.208463043,
0.1035978943,
-0.3344600201,
0.0540774763,
-0.1685056686
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | Two questions:
- with `datasets-cli env` we don't have any information on the dataset script version used. Should we give access to this somehow? Either as a note in the Error message or as an argument with the name of the dataset to `datasets-cli env`?
- I don't really understand why the id is duplicated in the code of `code_search_net`, how can I debug this actually? | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 66 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
Two questions:
- with `datasets-cli env` we don't have any information on the dataset script version used. Should we give access to this somehow? Either as a note in the Error message or as an argument with the name of the dataset to `datasets-cli env`?
- I don't really understand why the id is duplicated in the code of `code_search_net`, how can I debug this actually? | [
-0.0094919801,
0.0049083382,
-0.1037804782,
0.3735048473,
0.0469306298,
-0.0595816746,
0.2355327606,
0.237676546,
0.0580708459,
0.0420987532,
-0.0894133151,
0.4072094262,
-0.1577005684,
0.104338333,
0.1628592163,
0.0670310333,
0.0143383071,
0.1504511982,
0.1202021167,
-0.128898859,
-0.3279082179,
0.2217665762,
-0.2497897297,
0.0505495816,
-0.2336092889,
-0.1389331669,
-0.2191095352,
0.2946092486,
-0.1718127131,
-0.6023651361,
0.2365141809,
0.2469081134,
-0.3047544658,
0.3485268354,
-0.0001129588,
0.1454988271,
0.3868985474,
-0.0112753436,
-0.2460677326,
-0.1964258701,
-0.1086817756,
-0.1141099036,
0.0937171206,
-0.3164000511,
0.0184593946,
-0.1501700133,
-0.1131841391,
-0.5023266673,
0.8769927025,
0.2101982683,
0.2571645379,
0.2303174287,
0.312125504,
-0.2214269787,
0.2857810557,
-0.144980967,
-0.0408080742,
0.4033091962,
0.1780677587,
-0.0504532494,
-0.0015696175,
0.2535582483,
0.1491451859,
-0.0922283381,
0.4889209867,
0.004278779,
0.0523608923,
-0.3802723587,
0.1833045483,
0.0842175186,
0.1399861425,
-0.2937670946,
-0.2534077168,
-0.2852418423,
-0.0006017946,
-0.2383116782,
0.3581798375,
0.1130280346,
-0.1832090914,
0.1009693295,
-0.0234329719,
-0.2443881929,
-0.0209398046,
-0.0669793636,
-0.002475962,
0.0001441203,
-0.0406801775,
0.1741481423,
0.1436637938,
-0.0309496671,
0.2942075729,
-0.13356933,
0.1088616103,
0.2196425796,
-0.4874308407,
0.1088527143,
-0.0417375341,
-0.0666240007,
0.2526280582,
0.0501063541,
0.1586542726,
-0.1383238882,
0.0582779907,
0.0365455225,
0.136211738,
0.1176390201,
0.0247382633,
0.2395916581,
0.1972185075,
-0.2188268155,
-0.2711264491,
-0.0564667843,
-0.1785915792,
-0.1516628265,
0.4401810765,
0.0809083804,
0.5045517683,
0.0516367108,
-0.1957731545,
0.1798706651,
-0.1808781922,
-0.1719257385,
0.0739718825,
0.3315836191,
0.1826921999,
-0.3608224392,
0.0812147185,
0.2304952294,
-0.1570225507,
-0.2011749446,
-0.3156380653,
-0.1495872587,
-0.0772536099,
-0.126766324,
0.2154263705,
-0.5755318403,
0.2917330861,
0.2776084542,
-0.0764897317,
-0.4185133278,
-0.0106020048,
0.0661277771,
-0.2115840465,
0.1040805876,
-0.0396965966,
0.092964299,
-0.0853247792,
-0.2381432354,
-0.0866201073,
0.2018010616,
-0.2155348957,
-0.3841585815,
-0.0113810711,
0.2700185478,
0.046058476,
0.127324149,
0.0172670856,
0.0344305895,
0.22378245,
0.1911879182,
0.0374222696,
-0.033689633,
-0.0244738087,
-0.3202981949,
0.2307139039,
0.6258887649,
-0.1388694048,
-0.0994995087,
-0.166160956,
-0.033791095,
0.086695753,
0.3992447555,
-0.2378604412,
0.4269874394,
-0.3161393106,
0.2103261054,
0.7068002224,
-0.2062662542,
-0.3250543773,
0.1362057924,
-0.2523131967,
-0.1497696191,
0.1035355628,
0.0269969292,
0.1862992942,
0.0956461579,
0.1519937813,
-0.0751009807,
0.0733929798,
-0.0979358107,
-0.3846914768,
-0.3182412982,
0.1399687827,
-0.0788119957,
0.1862505525,
-0.1908336729,
0.2699960172,
-0.1556685269,
0.0582119711,
-0.1312348992,
-0.120560199,
0.0026751971,
0.2714606822,
0.0408044159,
0.0887511894,
-0.0086454302,
-0.4823824763,
0.3747639656,
-0.3360304236,
-0.2697579265,
-0.195929423,
-0.3034655452,
-0.351529479,
0.1438823342,
-0.5467951298,
0.0142954215,
0.2060531974,
-0.0663146898,
0.2171555758,
0.1020638347,
-0.1769399047,
0.1594810635,
0.0542388037,
0.1100348383,
-0.2068198025,
0.2509877086,
-0.4732955396,
-0.042825371,
0.0588915497,
0.2304444611,
0.3486607075,
-0.1266706288,
-0.1688674539,
0.4440195858,
-0.2193269879,
0.0511579737,
-0.0163347088,
-0.0888501406,
0.1398421675,
-0.3815079331,
0.2165362537,
0.2500265539,
0.1734208167,
-0.1731624007,
-0.0787189454,
0.3603439331,
-0.1116793156,
0.09486413,
-0.0413667969,
-0.0870466083,
0.0792675093,
-0.1197791323,
0.1631210744,
-0.104184933,
0.2782208622,
-0.3106934428,
0.3890620172,
0.1747397631,
-0.2443795502,
0.1206963807,
0.2313816398,
-0.0408060923,
0.105294466,
0.0120356707,
0.0323845819,
-0.1912028342,
-0.2877429724,
0.2358515561,
0.3477754295,
0.1541771293,
-0.058474455,
0.2757793963,
-0.0113031156,
-0.2352378517,
0.3930316865,
-0.1218940541,
-0.1429181695,
0.3976444006,
0.1085422933,
0.0489772521,
-0.3879252374,
-0.121701315,
0.1714469194,
0.0767203867,
-0.2829784751,
0.0125737786,
-0.1297802329,
-0.0831945315,
-0.4565388858,
0.5397939682,
-0.115873538,
-0.1127378345,
0.2520347536,
0.0170569774,
0.0975921005,
0.1204390228,
-0.2307253331,
0.1806777269,
-0.0148850232,
0.1146529391,
-0.2355741411,
-0.1124269366,
-0.0771904215,
0.0374281928,
0.3936968446,
-0.060551472,
0.5720289946,
-0.1889272928,
0.1064836979,
-0.1775658876,
-0.3476794362,
-0.0131596588,
-0.00410394,
0.1664581448,
0.0505313314,
-0.1058805957,
-0.0353348888,
-0.3789180815,
0.2900121808,
-0.3102479577,
-0.4068108499,
-0.0542964675,
0.0398771726,
-0.0646371394,
-0.2149249464,
-0.5273547769,
-0.2650467157,
-0.2430538684,
0.3169803917,
-0.096215412,
0.1279307902,
0.3379569054,
-0.1227714568,
-0.0101923496,
-0.0059260912,
0.2016514093,
-0.3594239354,
0.0480576083,
0.0874655768,
-0.050900884,
-0.3533072472,
-0.0688931495,
-0.1448613703,
0.1514540315,
-0.0905497894,
-0.38254565,
0.2584380209,
-0.2310799211,
0.4560709596,
-0.1607945263,
0.3305143118,
0.2242966741,
0.2599558532,
-0.1505048722,
-0.185819447,
-0.0531727299,
0.1141132712,
-0.1253997833,
0.068593733,
0.1404926628,
0.2881907225,
-0.3000927269,
0.8568350077,
0.6044369936,
0.0024757949,
0.2031871676,
-0.1734142303,
0.3541773558,
-0.2369026095,
-0.4189775586,
-0.24875018,
0.074031435,
0.0248239711,
0.11660368,
-0.0740135387,
-0.0949571207,
0.1337455511,
-0.1691587567,
-0.6246012449,
-0.310615778,
0.0508953854,
-0.2232757211,
0.1503928453,
0.0552002341,
0.0079761818,
0.0529072918,
0.0654389709,
-0.0247861948,
0.238634631,
0.0278173853,
0.0320967771,
-0.1855982393,
-0.1713018715,
-0.3948460519,
0.1087287366,
-0.1418867409,
0.1687642783,
-0.0074771494,
0.1403222978,
0.4162753522,
-0.1948325634,
0.6553743482,
-0.0820545182,
0.1187014207,
0.1139194593,
0.1600473523,
-0.0918413252,
-0.1216060072,
-0.0004835427,
0.4200727642,
0.1214305311,
0.0828678459,
-0.2863496542,
0.0328857228,
-0.0618461408,
0.2935725152,
-0.3494211137,
-0.4181871116,
-0.1062090024,
-0.3285911679,
-0.5123423934,
-0.0003707148,
-0.0332545303,
0.2004805505,
-0.0638972074,
-0.0373939201,
-0.1862743646,
-0.215871051,
0.0450354367,
0.2135526538,
0.2768930793,
0.0540168434,
0.5974950194,
0.4390270412,
-0.1527078152,
0.0138945673,
0.7316986322,
-0.0312716216,
0.0088352039,
-0.360229224,
-0.2145641148,
-0.1516322345,
0.3003145158,
-0.1722508073,
0.1454562545,
0.0643099397,
-0.0055786408,
0.0442820974,
-0.2298397869,
0.1667325199,
-0.2030821145,
-0.1967429519,
-0.3953808844,
0.2921684384,
-0.1211484745,
-0.3467518687,
0.2700577676,
0.1420121044,
-0.1910458356,
0.3929699659,
-0.2961894274,
0.9225986004,
-0.2770524025,
-0.0354177654,
-0.1204792112,
-0.3473198414,
0.2588879466,
-0.0852125287,
-0.0664183348,
-0.5006071329,
0.0952880532,
0.1400972307,
-0.0975074992,
-0.0751617774,
-0.0089120511,
-0.3079704344,
0.1783439517,
-0.053248778,
0.0315937363,
-0.1495841444,
0.3273096085,
-0.0030506104,
0.2265326679,
-0.0421691649,
0.1000895426,
0.1819885969,
0.2940020263,
-0.0690355748,
-0.0146774612,
0.1485508382,
-0.578879118,
-0.2620585561,
0.0455853567,
-0.3623944521,
0.491086334,
0.0204074159,
-0.2879945636,
0.203971833,
0.0256684776,
0.2825469971,
0.155126974,
-0.0330337286,
0.0975018665,
0.311963141,
0.1528389007,
-0.1907722801,
-0.0541856736,
-0.066879645,
-0.0191119909,
-0.3339545727,
-0.0638494492,
-0.0981529802,
-0.3854925036,
-0.1896459311,
0.2295136303,
-0.2025193274,
-0.0292346142,
0.1831754744,
-0.0261085071,
-0.1139786094,
-0.2872946262,
0.1506654322,
0.193777144,
0.0281571597,
0.1674930602,
-0.1279284209,
-0.15945898,
0.0427716151,
0.1584786177,
0.3779700994,
0.0691798106,
0.4716698825,
-0.2742198706,
-0.0576698966,
-0.2229478657,
0.0907727778,
0.0751188397,
-0.6839030981,
0.2268489599,
-0.3302607536,
0.221680671,
0.0492406152,
0.4456788301,
0.3728166223,
0.2641694546,
0.0447096229,
-0.1884462982,
-0.1231536046,
-0.0249406435,
0.0557023585,
0.2507337332,
0.0327636823,
0.1545561254,
-0.0578997806,
0.2285489589,
-0.3535399735,
0.2854165435,
-0.0628054291,
0.1187648624,
-0.0041628331,
-0.1193922386,
-0.1067290902,
-0.0584331602,
0.1639816165,
0.0769251436,
-0.202390641,
-0.2468736172,
-0.0515814647,
0.1313583553,
-0.0056433277,
0.0820990652,
-0.2349617779,
-0.2209155262,
0.2747099102,
-0.0153558608,
0.2010290623,
-0.1215079278,
0.1296389997,
0.0371450633,
0.1333370209,
0.1274616271,
-0.2856587768,
0.2258196473,
-0.2711216807,
0.3647972643,
-0.0204243213,
0.1812970191,
-0.055941157,
-0.0842083693,
-0.300937593,
0.0659644902,
-0.1919427961,
0.1232490838,
0.1786117405,
-0.2007999122,
-0.1515878737,
0.3735955656,
0.1895245165,
0.5776081085,
-0.3747796416,
0.1233211085,
0.001604449,
0.234248966,
-0.3270576596,
-0.1232973784,
0.0141035803,
0.0219933763,
0.2465512007,
0.4026120901,
0.3325181007,
-0.2041251659,
-0.1000595391,
0.0773332268,
0.4145541489,
0.0431955755,
0.3692274988,
0.421574086,
0.2249729633,
-0.1458381414,
0.3178178966,
-0.0088571301,
0.053254962,
0.5327892303,
-0.5467885733,
0.1335885525,
0.0073114242,
0.2482732385,
0.2667935789,
-0.1006901115,
0.4065021276,
0.0637445301,
-0.0616154522,
0.0232217126,
0.0591034591,
0.1641822457,
-0.1535850763,
-0.0986172557,
-0.0675119534,
0.0940411091,
-0.142542243,
-0.1154044718,
-0.122136429,
-0.2859402895,
-0.2399973869,
0.1165320352,
-0.0442249998,
0.0304309539,
0.1857386082,
-0.0055711158,
-0.3209534585,
-0.395937711,
0.2486815006,
0.247792393,
0.3603604436,
-0.3663315773,
0.3189528286,
0.5262146592,
-0.0918750167,
0.1858086288,
0.5166121125,
0.6797173023,
0.229729712,
-0.1870814562,
0.2632654607,
0.1030771807,
-0.1497942209,
-0.1714255512,
0.1048000306,
-0.0949586481,
0.1528458148,
0.1419483721,
0.0963759348,
-0.125453487,
-0.055563502,
0.223854512,
0.0978107229,
-0.099918142,
0.2334599644,
-0.1785319895,
-0.1811485738,
0.0959306508,
0.1979929507,
-0.3587416708,
-0.0058032125,
0.3178542554,
0.2464195788,
0.1359603852,
-0.1989140511,
0.1301409602,
0.0504275523,
0.3355686069,
0.2014835477,
0.0995328277,
-0.265370965,
-0.0299461931,
-0.7278297544,
0.0578822829,
-0.4435492456,
-0.0309021845,
0.2030546516,
0.3628492951,
-0.2993822992,
0.0497818179,
0.371684283,
0.0444041416,
0.014873337,
0.2185641825,
-0.1705695987,
-0.000478399,
0.4338774085,
-0.2329910547,
0.0971012414,
-0.3571489751,
0.367385745,
-0.374714911,
0.0223204345,
-0.1711809635,
0.0642180741,
0.1893090606,
-0.2624620199,
0.422439754,
0.126491785,
0.3507635891,
0.0014029294,
-0.1700943708,
-0.2035344541,
-0.1124193519,
-0.2247007042,
0.2866602242,
0.4753935635,
0.1072761044,
-0.0141487531,
-0.4560536742,
-0.1325496137,
0.2371393442,
0.0571240708,
-0.0928514451,
-0.0732208937,
0.0577737987,
-0.1940237284,
0.1142315269,
0.0330924727,
0.2063195705,
-0.1023553908,
0.1780996621,
-0.2683041096,
-0.6693450212,
0.4163754284,
-0.1604195088,
-0.069210425,
-0.1580539346,
0.3268052936,
0.2550387383,
0.1188755631,
-0.6650726795,
0.18001917,
0.5570533276,
-0.2718786895,
-0.0380279087,
0.1505858898,
-0.1034703404,
-0.023336485,
-0.008343026,
-0.0389361009,
-0.016971061,
-0.2956867516,
0.2166409642,
-0.3160578907
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | Thanks for reporting. There was indeed an issue with the keys. The key was the addition of the file id and row id, which resulted in collisions. I just opened a PR to fix this at https://github.com/huggingface/datasets/pull/2555
To help users debug this kind of errors we could try to show a message like this
```python
DuplicateKeysError: both 42th and 1337th examples have the same keys `48`.
Please fix the dataset script at <path/to/the/dataset/script>
```
This way users who what to look for if they want to debug this issue. I opened an issue to track this: https://github.com/huggingface/datasets/issues/2556 | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 97 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
Thanks for reporting. There was indeed an issue with the keys. The key was the addition of the file id and row id, which resulted in collisions. I just opened a PR to fix this at https://github.com/huggingface/datasets/pull/2555
To help users debug this kind of errors we could try to show a message like this
```python
DuplicateKeysError: both 42th and 1337th examples have the same keys `48`.
Please fix the dataset script at <path/to/the/dataset/script>
```
This way users who what to look for if they want to debug this issue. I opened an issue to track this: https://github.com/huggingface/datasets/issues/2556 | [
-0.0393900275,
-0.0147920251,
-0.0928235352,
0.3366982937,
0.0873194039,
-0.013939701,
0.2003906071,
0.2712211013,
0.0882733613,
0.0667397827,
-0.0861996561,
0.3934500515,
-0.1623922437,
0.1329391599,
0.1347279251,
0.0915054828,
-0.0428926572,
0.189869225,
0.1181892455,
-0.0561208203,
-0.3183745444,
0.2934968472,
-0.2228164971,
0.0328288525,
-0.2074047923,
-0.1297894865,
-0.1850281209,
0.239402324,
-0.1695128232,
-0.6275754571,
0.2506463528,
0.2204241604,
-0.3045648932,
0.3702609241,
-0.0001118734,
0.1776437759,
0.389007479,
-0.0119134188,
-0.2631488144,
-0.189460665,
-0.0932736769,
-0.0726642013,
0.0986744687,
-0.2597334683,
-0.0612498745,
-0.1425026357,
-0.1062147096,
-0.5259362459,
0.8551868796,
0.2249428183,
0.2614649236,
0.1924869865,
0.3430315256,
-0.2581971586,
0.2435851395,
-0.1772044003,
-0.0567808598,
0.3766360581,
0.2065403163,
-0.0528299883,
0.0148357339,
0.2883765996,
0.1508666128,
-0.1099836528,
0.4550983608,
-0.0461317748,
0.0562950224,
-0.3445612192,
0.2029423267,
0.0850433558,
0.0933939964,
-0.2972280383,
-0.2118204236,
-0.2630231977,
0.0436525643,
-0.2451478392,
0.3421131968,
0.1394783556,
-0.2177513987,
0.164950937,
-0.0173710398,
-0.2581020296,
0.0044235811,
-0.0469906777,
-0.0124232471,
-0.0174255818,
-0.0472720414,
0.1445005238,
0.1904306412,
-0.0294545572,
0.2612521052,
-0.0770368949,
0.0319692604,
0.1867050529,
-0.5232820511,
0.1069348305,
-0.0528018698,
-0.1080394536,
0.2210677415,
0.0415582247,
0.1781444252,
-0.0987890661,
0.063077651,
0.004615969,
0.1186115444,
0.1113323569,
0.0510713011,
0.2479468882,
0.2089863122,
-0.179934904,
-0.2521626651,
-0.0465331152,
-0.2012174428,
-0.1685852259,
0.3703462183,
0.0584278852,
0.5287949443,
0.0775722414,
-0.2316820174,
0.1241976619,
-0.1455934048,
-0.1006388441,
0.061097309,
0.3620434403,
0.1859446615,
-0.3567810953,
0.1096723601,
0.2256824374,
-0.1423760355,
-0.1941257715,
-0.3171716034,
-0.1063594073,
-0.0811322927,
-0.1568125039,
0.2419344336,
-0.613378942,
0.2899114192,
0.2416547388,
-0.1092533618,
-0.4836315513,
0.0230334699,
0.1235139519,
-0.1988666654,
0.0956890583,
0.0101648867,
0.0778536275,
-0.0203278828,
-0.2386648357,
-0.0512514785,
0.1840786338,
-0.2536867261,
-0.3633140326,
-0.0695418864,
0.2863248885,
0.0670307577,
0.0897066295,
0.0178212896,
0.0369764008,
0.2047010958,
0.1793237776,
0.0022220276,
-0.0245709829,
-0.0792568401,
-0.2655107677,
0.2568257451,
0.6351632476,
-0.0922877267,
-0.1067956164,
-0.1737159044,
-0.0022586584,
0.0813440382,
0.3821579516,
-0.2429333776,
0.3917117715,
-0.3513788879,
0.1783625484,
0.7134479284,
-0.1958878338,
-0.3543925881,
0.1866780221,
-0.2593115568,
-0.2182947695,
0.0873140842,
0.0251205899,
0.1783081591,
0.1153896078,
0.157443732,
-0.0760308802,
0.0586169735,
-0.0519530885,
-0.3551417887,
-0.3531222045,
0.1054894328,
-0.0788372979,
0.172931537,
-0.1593490094,
0.2709895968,
-0.1526418477,
0.118068926,
-0.1213864237,
-0.0849593729,
0.0823326334,
0.2390114367,
0.0496873185,
0.0824488774,
-0.0632931739,
-0.4461560547,
0.3696320057,
-0.2972282171,
-0.2668589652,
-0.2390245944,
-0.2505205274,
-0.4130324125,
0.1440361887,
-0.5862919688,
-0.0180850402,
0.2047822475,
-0.034615241,
0.2092177719,
0.1034077704,
-0.1269438267,
0.1520017833,
0.0593994036,
0.083433494,
-0.1985914111,
0.2522063851,
-0.4453632832,
-0.0550454184,
0.0948074386,
0.2252965868,
0.3252192736,
-0.0994668305,
-0.1627309471,
0.4175095558,
-0.2410899699,
0.0180141442,
-0.0007238905,
-0.1209465265,
0.0787324831,
-0.3930571675,
0.1947412491,
0.2712779343,
0.1783772111,
-0.1665648073,
-0.0573372692,
0.3320146203,
-0.0891045481,
0.0955384672,
-0.0527458526,
-0.0315743536,
0.1117779389,
-0.1201965213,
0.2202437073,
-0.1167669743,
0.2911605835,
-0.316444248,
0.3656365275,
0.1319549084,
-0.2356604934,
0.1314296573,
0.3060259819,
0.0220878869,
0.188243717,
0.0140608838,
0.0087793525,
-0.1550995409,
-0.3161091506,
0.2443335056,
0.3074199557,
0.1628215909,
-0.1048357263,
0.271297276,
0.0289767943,
-0.2005148381,
0.3751116991,
-0.1769655645,
-0.1046677083,
0.3829627037,
0.1048191637,
0.0200043283,
-0.4195501506,
-0.1060772464,
0.1665901542,
0.0904480368,
-0.2432653904,
0.0245897248,
-0.157323271,
-0.055003833,
-0.4926803708,
0.5171214342,
-0.1103610992,
-0.1431571841,
0.2413247675,
0.0723624304,
0.1362356544,
0.1244722232,
-0.2315512896,
0.1443307847,
0.0402569026,
0.0933434069,
-0.2083083242,
-0.113893874,
-0.0725763589,
0.0338539109,
0.3783899844,
-0.077085264,
0.5647823811,
-0.162493825,
0.116463393,
-0.2422075272,
-0.3452758789,
-0.0178847034,
0.0072643822,
0.1485370696,
0.0805482268,
-0.0375988334,
-0.0214284286,
-0.3726306856,
0.2817128301,
-0.3179251552,
-0.4135045409,
-0.0009350926,
0.0158010945,
-0.03573291,
-0.212942034,
-0.5386607647,
-0.2469632328,
-0.2665462792,
0.317668438,
-0.1062416434,
0.0821354538,
0.3633770943,
-0.0593879148,
-0.0168305337,
-0.0493376479,
0.1703395694,
-0.3394083977,
0.0450251698,
0.0460498594,
-0.063104257,
-0.3325830698,
-0.0430325568,
-0.1231541038,
0.1562624276,
-0.1182265878,
-0.349081248,
0.2830146551,
-0.2649716437,
0.416703254,
-0.2116274536,
0.2905670404,
0.2058410496,
0.2561262846,
-0.1482192576,
-0.1712090373,
-0.0290906802,
0.1058603227,
-0.1715942919,
0.0603613891,
0.0947435573,
0.2958512008,
-0.2571827173,
0.8182134628,
0.5736106634,
-0.0000042402,
0.1971291453,
-0.2320546657,
0.3561853766,
-0.2597361803,
-0.4400472045,
-0.2620583773,
0.1012614518,
0.0823968425,
0.1012617797,
-0.0890701488,
-0.1051113009,
0.148072809,
-0.1535301656,
-0.5878965855,
-0.3327072263,
0.0677498132,
-0.2154905349,
0.1211411282,
0.064984031,
0.0236837715,
0.0236723609,
0.0156505182,
-0.0114403553,
0.2244053632,
-0.0429969281,
0.0903419554,
-0.1426972896,
-0.1601072401,
-0.3927225769,
0.1269595921,
-0.1455417871,
0.1879532635,
-0.0046166107,
0.1819082499,
0.3899122775,
-0.203921482,
0.6486159563,
-0.0842430964,
0.147160992,
0.116316393,
0.1549593508,
-0.1054674536,
-0.1031059325,
0.0434397757,
0.4334647655,
0.110453628,
0.1101816073,
-0.2643682361,
0.0120885037,
-0.0417413935,
0.2710543871,
-0.3562951088,
-0.3989875317,
-0.1732007563,
-0.3362304568,
-0.5221702456,
0.0070489645,
0.013235718,
0.2334473878,
-0.0566031486,
-0.0964119732,
-0.2230380774,
-0.2034578174,
0.0082273148,
0.2019335628,
0.2648090124,
0.1155603677,
0.573764503,
0.3952609301,
-0.1276339144,
-0.0011027046,
0.7134283185,
0.0046015894,
-0.0141343288,
-0.3018510342,
-0.2454431355,
-0.1719882637,
0.2688553929,
-0.1816079021,
0.1681397557,
0.0785091594,
0.0219371058,
0.0292038135,
-0.1947406977,
0.1829774678,
-0.1791466475,
-0.218418777,
-0.3810109198,
0.2849348187,
-0.1403223127,
-0.2812666893,
0.2780412138,
0.1590034366,
-0.1447201371,
0.3344264627,
-0.3454681337,
0.8578019738,
-0.3358389437,
-0.0549020804,
-0.1418079585,
-0.3329260051,
0.2424281836,
-0.0555235222,
0.0201004632,
-0.5142735243,
0.0449105687,
0.1704357564,
-0.0552186705,
-0.0848081261,
-0.0177538339,
-0.3104016185,
0.1720507592,
-0.0476495251,
0.0248287488,
-0.1602255404,
0.3458874226,
-0.0029213857,
0.2451020479,
-0.0235069115,
0.1250653416,
0.1515770704,
0.281994313,
-0.036674995,
-0.0448584594,
0.1928784847,
-0.5627149343,
-0.274625957,
0.1214069873,
-0.3507394493,
0.5328578949,
0.0126898829,
-0.2584881783,
0.2454964817,
0.026130734,
0.248675257,
0.1919758916,
-0.0656967759,
0.1184824556,
0.2866916358,
0.073758468,
-0.2213354111,
-0.0155503601,
-0.0890036002,
-0.0279262215,
-0.3782756031,
-0.0527392365,
-0.051793009,
-0.4121173024,
-0.1450529248,
0.2573259473,
-0.1829820275,
-0.0394038744,
0.1902215779,
-0.0515703112,
-0.1065127701,
-0.3105295897,
0.1581816822,
0.1754857451,
0.0420292877,
0.0981865376,
-0.0494142622,
-0.1876265109,
0.0787868947,
0.167709887,
0.3655773103,
0.0784647167,
0.5398335457,
-0.2415942401,
-0.0110984445,
-0.2637152672,
0.0708357841,
0.091492027,
-0.6893438101,
0.2305620611,
-0.2692231834,
0.2263798267,
0.1349015534,
0.4542607069,
0.3118366599,
0.207422778,
0.0682089776,
-0.1899858117,
-0.0834035724,
-0.0749869943,
0.007905703,
0.2383567691,
0.0170304105,
0.1854346097,
-0.0320167765,
0.2138062418,
-0.3605462313,
0.2981468737,
-0.0902479663,
0.087920934,
-0.0235437285,
-0.1306428164,
-0.0351336151,
-0.0144161731,
0.1685692668,
0.1006680876,
-0.2077367306,
-0.2502124906,
-0.0640064925,
0.1244712546,
-0.0424428247,
0.1501916945,
-0.2243756801,
-0.2086769193,
0.2310708314,
-0.0412697047,
0.2202371657,
-0.1125031263,
0.1427198946,
0.0607991517,
0.148304075,
0.1030613407,
-0.2411943674,
0.1918826699,
-0.2597796023,
0.323228687,
-0.060883645,
0.1569916308,
-0.0297606774,
-0.0701463968,
-0.3087395132,
0.0846203864,
-0.1682213545,
0.0943560377,
0.1549281776,
-0.2569448948,
-0.1614759266,
0.4119186401,
0.172302857,
0.5156671405,
-0.3425474167,
0.1220132038,
-0.0314581692,
0.249345839,
-0.346460104,
-0.1409692317,
0.0218812525,
0.0230218358,
0.25206545,
0.3462915421,
0.2895451784,
-0.2067201436,
-0.0891881585,
0.0885488838,
0.403072834,
-0.0098055629,
0.3582560718,
0.3623288274,
0.2651082873,
-0.217871666,
0.3288598359,
-0.0276888795,
0.0573130772,
0.5360887647,
-0.5569239855,
0.1019917801,
-0.0197683536,
0.2291835845,
0.2144481689,
-0.1321156919,
0.3921255171,
0.0536375381,
-0.1071606129,
-0.0169932507,
-0.0008157156,
0.1937873811,
-0.1850800514,
-0.0418529212,
-0.1078156084,
0.0945615321,
-0.1713006943,
-0.0954019576,
-0.1070970893,
-0.2283355296,
-0.2598008811,
0.1113853902,
0.0088824779,
0.0650788099,
0.1844661385,
0.0013827514,
-0.3270091712,
-0.3965139985,
0.2018180788,
0.286968708,
0.3742623329,
-0.4109545052,
0.2661158144,
0.4641637802,
-0.0921060294,
0.1796157509,
0.5124385357,
0.6277316213,
0.2143343836,
-0.1546016037,
0.2471618503,
0.0746888742,
-0.1664490104,
-0.1776013076,
0.0789962262,
-0.0969249606,
0.1750378013,
0.1689580381,
0.1014590636,
-0.1353828013,
-0.101767242,
0.2639499605,
0.1437012404,
-0.1057985201,
0.1999000758,
-0.1909978539,
-0.1376960874,
-0.0063632312,
0.2526304126,
-0.3743944168,
0.0232565962,
0.3362024426,
0.215295732,
0.1036931425,
-0.2392005324,
0.138779521,
0.0469930284,
0.3233956397,
0.1746045798,
0.0572605208,
-0.2274858356,
-0.0484920517,
-0.6852201819,
0.1117907763,
-0.4422993958,
-0.0206722394,
0.1845692396,
0.3831758201,
-0.3131610751,
0.0189339239,
0.3542639911,
0.0676850677,
0.0086916387,
0.2228711545,
-0.2159972042,
0.0082056895,
0.4384152889,
-0.2551454604,
0.130337745,
-0.4026129842,
0.3538030088,
-0.3760167658,
0.0528253466,
-0.1228258163,
0.051591821,
0.1246992797,
-0.2892442942,
0.415718019,
0.0977642015,
0.3264960647,
-0.0135346279,
-0.2033666074,
-0.229859218,
-0.184199959,
-0.223692894,
0.2773225605,
0.5202602744,
0.1267426312,
-0.0173212253,
-0.4276800454,
-0.1936794817,
0.2420178354,
0.0435464308,
-0.0591899417,
-0.0666083395,
0.0637035221,
-0.1687977761,
0.1529017389,
0.0310583636,
0.202929154,
-0.0835387707,
0.1606070399,
-0.2491608858,
-0.6767690778,
0.3949702978,
-0.1588923186,
-0.1128198281,
-0.1074144244,
0.3577100635,
0.236858964,
0.0830922052,
-0.6305250525,
0.2515727878,
0.5428171158,
-0.2058783323,
-0.020153068,
0.148961395,
-0.1389390677,
0.0323461071,
0.0318879336,
-0.0470928513,
0.038237121,
-0.2773477733,
0.2415046394,
-0.3176978528
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | and are we sure there are not a lot of datasets which are now broken with this change? | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 18 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
and are we sure there are not a lot of datasets which are now broken with this change? | [
-0.0469084494,
-0.0271533728,
-0.1106120199,
0.3490996361,
0.0812767074,
-0.0156192333,
0.1811805964,
0.2770841122,
0.081591621,
0.0544186644,
-0.0599073395,
0.3916928172,
-0.184661299,
0.1166160852,
0.1564043015,
0.0785152167,
-0.031284526,
0.1728185266,
0.1106827855,
-0.0542455539,
-0.3256244957,
0.2887382507,
-0.2328310907,
0.0389521681,
-0.1848243326,
-0.1620797068,
-0.1911862791,
0.2588770986,
-0.184510082,
-0.6111862063,
0.2418146878,
0.2137487233,
-0.3018577099,
0.3558096886,
-0.0001112483,
0.1782945096,
0.3963312209,
-0.0183049254,
-0.2428979278,
-0.1785933822,
-0.097683616,
-0.0869019777,
0.078290537,
-0.2927314639,
-0.0522991382,
-0.131193459,
-0.1020007804,
-0.5351580381,
0.8553100824,
0.2324268818,
0.2680365741,
0.1950212568,
0.3377572596,
-0.2356914729,
0.2538097501,
-0.1840533763,
-0.0478937477,
0.3911311626,
0.2176294923,
-0.0469382443,
-0.0018592291,
0.3106982112,
0.1507787406,
-0.1226943433,
0.4385914207,
-0.0377841815,
0.0561734065,
-0.3310023546,
0.1806349903,
0.0725950152,
0.1040765271,
-0.3062260151,
-0.2338498235,
-0.2663580775,
0.0390655324,
-0.2513278723,
0.3439498842,
0.1335713565,
-0.2220118344,
0.1639821827,
-0.0111539587,
-0.2648171484,
0.0115648732,
-0.0475302115,
-0.0154279545,
0.0178867094,
-0.0589892119,
0.1368975937,
0.1607930958,
-0.0466828868,
0.2724991143,
-0.0896120816,
0.0467301905,
0.1941231787,
-0.5073844194,
0.1113420874,
-0.0263008028,
-0.0870058239,
0.2304596007,
0.0269333012,
0.1648990512,
-0.1091130823,
0.0596223585,
0.0060262918,
0.1255844086,
0.1220994666,
0.0224411041,
0.2442173958,
0.2085753977,
-0.1591237783,
-0.2433694005,
-0.0350924358,
-0.1751272678,
-0.1918126792,
0.3740757406,
0.0837450475,
0.5239517689,
0.0817942023,
-0.239669323,
0.1370772719,
-0.1299023032,
-0.1012646556,
0.0700322017,
0.3665412664,
0.1608087271,
-0.3450776041,
0.1160738617,
0.1853384674,
-0.139510572,
-0.1890875399,
-0.3252248466,
-0.0816785395,
-0.0858613849,
-0.1678930372,
0.218451485,
-0.5809814334,
0.2865790129,
0.2305636555,
-0.0979512334,
-0.4757298827,
0.0076660886,
0.1049677432,
-0.2080144584,
0.084054485,
0.0011775419,
0.0592632443,
-0.0231825262,
-0.223098129,
-0.0681594536,
0.1733561009,
-0.2561255991,
-0.3439769447,
-0.0812846273,
0.2983010411,
0.0687769353,
0.094039008,
0.0188800618,
0.0360046513,
0.2115166336,
0.1689543128,
0.019319687,
-0.0201481413,
-0.0689404607,
-0.2622357905,
0.2715477347,
0.6408417821,
-0.0851996467,
-0.1143703833,
-0.1630573869,
-0.0119727878,
0.082022205,
0.3735701442,
-0.219525069,
0.4098963439,
-0.370193243,
0.1702484637,
0.715852499,
-0.2098326236,
-0.3514035344,
0.1768586785,
-0.2566373348,
-0.1927756667,
0.1062856093,
0.0177451223,
0.1717718989,
0.1271532476,
0.1919955909,
-0.0745010823,
0.0496412739,
-0.0505868979,
-0.3718304038,
-0.353053838,
0.103001222,
-0.0865592808,
0.1955661327,
-0.1717542708,
0.2626264095,
-0.1302559227,
0.117092669,
-0.1145149842,
-0.0960907564,
0.0849804208,
0.2491381019,
0.0279338304,
0.0814495161,
-0.0725878477,
-0.4511610568,
0.3614915907,
-0.2994679809,
-0.2637138069,
-0.2208358347,
-0.2707114518,
-0.3951713741,
0.1444455981,
-0.5617753863,
-0.0219097082,
0.2265325487,
-0.0335860364,
0.2018055469,
0.0893618986,
-0.1509432197,
0.1715619713,
0.0490317643,
0.0780372471,
-0.2100777924,
0.2596828341,
-0.4771120846,
-0.0632254034,
0.0932603031,
0.2274792939,
0.3199899793,
-0.1160645634,
-0.1683140397,
0.4271498322,
-0.2329928726,
0.0158183873,
-0.0029282509,
-0.1300107539,
0.0871502087,
-0.3934368789,
0.1725027412,
0.2751097977,
0.1673904955,
-0.1346251369,
-0.069799751,
0.3326279819,
-0.0988813564,
0.0816602409,
-0.0342426635,
-0.0534675047,
0.1030968949,
-0.1120852232,
0.2092014849,
-0.1217364743,
0.280826956,
-0.3323275745,
0.3956883848,
0.1194215864,
-0.2414900959,
0.1092136055,
0.2924526036,
0.0013846532,
0.1975157559,
0.0097058294,
0.0288970061,
-0.1784738898,
-0.2953673303,
0.2325137109,
0.2991615236,
0.1731814444,
-0.1086347103,
0.2740418315,
0.0366741158,
-0.1799518168,
0.3811585307,
-0.1649851203,
-0.1044400632,
0.3941545188,
0.0818233564,
0.0342091061,
-0.4060644507,
-0.1442296505,
0.1447807252,
0.1074561253,
-0.2713997364,
0.004004024,
-0.1440770626,
-0.0816542357,
-0.4855395257,
0.5519648194,
-0.0967326388,
-0.1340056211,
0.2336677015,
0.0417366773,
0.1260758042,
0.1139726341,
-0.2359862924,
0.1488277912,
0.0432490706,
0.1060621589,
-0.2104987204,
-0.104380995,
-0.0720648319,
0.044764623,
0.3772627413,
-0.0930299908,
0.5541763902,
-0.1986333877,
0.0996912867,
-0.2164834142,
-0.357909441,
-0.0040378496,
0.020813182,
0.1498838365,
0.1100703776,
-0.0402450264,
-0.0256815031,
-0.3755349815,
0.2560066283,
-0.3044044375,
-0.4428147972,
-0.0225436576,
0.0187571868,
-0.039533779,
-0.2074314952,
-0.5418488383,
-0.2662753463,
-0.2766751349,
0.2926629186,
-0.0981774777,
0.0814603716,
0.3725584149,
-0.0679176301,
0.0038494095,
-0.0269732811,
0.1974372566,
-0.3267027736,
0.031248495,
0.0353543311,
-0.0529343151,
-0.3246123195,
-0.0578349158,
-0.1475159228,
0.1737258881,
-0.1259878874,
-0.3620151877,
0.2623093128,
-0.2389130294,
0.4267002642,
-0.2036777437,
0.3028888404,
0.212947607,
0.2573755383,
-0.1596048027,
-0.1698618829,
-0.0314722918,
0.0892742425,
-0.1677891463,
0.0556726754,
0.1018415838,
0.3043362498,
-0.2619751394,
0.82168293,
0.5829089284,
-0.0059690671,
0.2016521245,
-0.2118436247,
0.3733597398,
-0.2440514565,
-0.4355398417,
-0.2459854335,
0.1285448372,
0.0407846645,
0.0970508754,
-0.0921052694,
-0.0974656716,
0.1396707594,
-0.1615277827,
-0.6219163537,
-0.3212404847,
0.050934352,
-0.2273288071,
0.1179318279,
0.0508580804,
0.0089771152,
0.0335711986,
0.0444791876,
0.0025209859,
0.2345266044,
-0.0114629231,
0.0759300888,
-0.1530276835,
-0.1533862948,
-0.3725165725,
0.1175914481,
-0.1397173703,
0.1931039989,
-0.0105240941,
0.1913716942,
0.3669937551,
-0.2281318903,
0.6453694701,
-0.0840138793,
0.1381124109,
0.1138137728,
0.1591110677,
-0.0830505863,
-0.1050432771,
0.0388185382,
0.4268302321,
0.1269040108,
0.1294594109,
-0.2729386687,
0.0242647976,
-0.0232016109,
0.2627457082,
-0.3573331535,
-0.3812641501,
-0.1662816852,
-0.3246186972,
-0.4989025891,
0.0290861223,
0.0064901561,
0.2311414182,
-0.02172089,
-0.0889580175,
-0.2271213084,
-0.2112899572,
0.0111824833,
0.2008689642,
0.2838079631,
0.0930746794,
0.5682291985,
0.3745243251,
-0.1244234592,
-0.0145367039,
0.7123062611,
-0.0103467107,
-0.0092321485,
-0.3011119962,
-0.2046627551,
-0.1842927933,
0.2573681772,
-0.1949712783,
0.1513121277,
0.0869636238,
0.0218752548,
0.0457167588,
-0.1883663535,
0.1670676172,
-0.1628593504,
-0.2159622461,
-0.3804619908,
0.2882482409,
-0.1184283346,
-0.2861640751,
0.2685064375,
0.158197403,
-0.1777518392,
0.3684623837,
-0.3176833987,
0.8326916695,
-0.3146329522,
-0.0523456223,
-0.1263725609,
-0.3259542882,
0.255350709,
-0.0859478712,
0.0067329891,
-0.4939079285,
0.0464633964,
0.1598237455,
-0.0380563289,
-0.0747024566,
-0.026272472,
-0.3291626573,
0.1905131936,
-0.0592302978,
0.026452532,
-0.163008064,
0.3300625086,
-0.0007657167,
0.2471739054,
-0.0477951877,
0.1346664727,
0.1436000466,
0.2798322737,
-0.0514157601,
-0.0307501014,
0.1794310957,
-0.5663868785,
-0.2774447799,
0.1091912389,
-0.3608014584,
0.5221954584,
0.018358428,
-0.2535376847,
0.2114664614,
0.0314418115,
0.232899785,
0.2051721513,
-0.0495856553,
0.1088982224,
0.2894088328,
0.0992840827,
-0.2045164555,
-0.0102029629,
-0.0519629568,
-0.0296652392,
-0.3613168597,
-0.0470947139,
-0.0622568652,
-0.4015721381,
-0.150197506,
0.2481305152,
-0.1729174256,
-0.0350114107,
0.1649696082,
-0.0270376131,
-0.1076019481,
-0.3131226897,
0.1662443429,
0.186230436,
0.0298589803,
0.1124023944,
-0.0546167232,
-0.169259578,
0.0750194639,
0.1694584638,
0.3665228486,
0.0696553811,
0.5085340738,
-0.2613406777,
-0.0337563865,
-0.2612470388,
0.0800456181,
0.1148148924,
-0.6623119116,
0.2191942036,
-0.2941146791,
0.2200985104,
0.1073092669,
0.4256072044,
0.3321915269,
0.2134764791,
0.0559269935,
-0.205626756,
-0.1126113459,
-0.0481788442,
0.027910497,
0.2362508625,
0.0393018648,
0.16070126,
-0.0426158085,
0.1991033703,
-0.3712841868,
0.2617738843,
-0.1110309139,
0.0789095908,
-0.0156825669,
-0.1059616357,
-0.0660710633,
-0.0290738493,
0.1858229339,
0.0987494588,
-0.186119318,
-0.2591013014,
-0.0545432232,
0.1198961139,
-0.0358445756,
0.1415402889,
-0.2157306969,
-0.1956245601,
0.2309212089,
-0.0465358347,
0.1875671446,
-0.1173269749,
0.1464105248,
0.0604630522,
0.1159073412,
0.1060187072,
-0.2493312657,
0.1973869205,
-0.2469545901,
0.3111076057,
-0.0572777987,
0.1815195084,
-0.0298760887,
-0.0798527896,
-0.3063935339,
0.0847238675,
-0.1822785437,
0.1095406413,
0.155523479,
-0.2479230464,
-0.1675857157,
0.4212432802,
0.1682534367,
0.5145014524,
-0.3406193852,
0.1270990819,
-0.0219482407,
0.2609176636,
-0.3668576479,
-0.1234401539,
0.0033120587,
0.0253488459,
0.2622595727,
0.3413490653,
0.2693052888,
-0.191019848,
-0.0815276951,
0.0918129385,
0.4002241492,
0.002199471,
0.3656619191,
0.3726800978,
0.265409708,
-0.2072131187,
0.2973614633,
-0.0409239233,
0.0624074265,
0.5390810966,
-0.539899826,
0.128463462,
-0.0205060728,
0.2541929483,
0.2257818133,
-0.1200046986,
0.3996990025,
0.0580266155,
-0.0998472571,
0.0097591951,
0.0137672517,
0.1629026532,
-0.1720844209,
-0.0554950573,
-0.0719698444,
0.084627986,
-0.1727141738,
-0.1010473222,
-0.1095769852,
-0.2272497118,
-0.254155457,
0.0966636539,
0.0138641316,
0.0599566698,
0.1649870425,
0.0004623756,
-0.33332479,
-0.3664299548,
0.2015644908,
0.2978006005,
0.3739055395,
-0.408154428,
0.300057888,
0.4755453467,
-0.0917495191,
0.1509279907,
0.5318714976,
0.6291671395,
0.228799209,
-0.1557601094,
0.2267468721,
0.1105191559,
-0.1611614227,
-0.1954074502,
0.0614202321,
-0.1154325902,
0.1707048714,
0.1617058814,
0.114713639,
-0.1398624331,
-0.0747308135,
0.2652660012,
0.1053483933,
-0.0900572389,
0.2006717622,
-0.1858331263,
-0.1396441013,
0.0156244282,
0.2502360642,
-0.3926051855,
0.0097750649,
0.3296542168,
0.2164009809,
0.1218211204,
-0.224247992,
0.1425648332,
0.0673693419,
0.318163842,
0.1936116964,
0.0830999166,
-0.2443353981,
-0.0321587548,
-0.6895317435,
0.0927470326,
-0.4029480219,
-0.0554421917,
0.1859171391,
0.3722108006,
-0.3159905076,
0.0117315054,
0.3509388566,
0.0610805117,
0.0317477845,
0.2196605206,
-0.23211734,
-0.0093794456,
0.4260524511,
-0.2580839097,
0.1416172087,
-0.4072992206,
0.3420375288,
-0.3757022023,
0.0564767122,
-0.1472163647,
0.0422156379,
0.1315654367,
-0.2852277458,
0.4117790163,
0.0977902636,
0.3219891489,
-0.0438531637,
-0.2032980323,
-0.2257694602,
-0.1698815972,
-0.2365559638,
0.274715811,
0.5092765689,
0.1163095012,
-0.004694771,
-0.4373764992,
-0.1929319501,
0.2320551276,
0.0616869554,
-0.0785892159,
-0.0752975494,
0.072267279,
-0.1834450662,
0.1228624433,
0.0518225692,
0.2025107443,
-0.0910455585,
0.1757322401,
-0.2520789802,
-0.6924313903,
0.3932869434,
-0.1511264443,
-0.0783274472,
-0.1192815229,
0.3561943173,
0.2467123568,
0.0758874118,
-0.6449913383,
0.2416941524,
0.5567662716,
-0.1992719769,
-0.0071391463,
0.1507196426,
-0.1236562133,
0.0373368859,
0.0260227621,
-0.0416056737,
0.0341906622,
-0.2745583653,
0.2524395585,
-0.3236226439
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | Thanks to the dummy data, we know for sure that most of them work as expected.
`code_search_net` wasn't caught because the dummy data only have one dummy data file while the dataset script can actually load several of them using `os.listdir`. Let me take a look at all the other datasets that use `os.listdir` to see if the keys are alright | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 61 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
Thanks to the dummy data, we know for sure that most of them work as expected.
`code_search_net` wasn't caught because the dummy data only have one dummy data file while the dataset script can actually load several of them using `os.listdir`. Let me take a look at all the other datasets that use `os.listdir` to see if the keys are alright | [
-0.036426805,
-0.020195514,
-0.0964383855,
0.3276666701,
0.0761769116,
-0.0132120177,
0.2080998868,
0.2912018299,
0.0984994993,
0.071184963,
-0.0670369789,
0.3835591674,
-0.1711660475,
0.1363996267,
0.1288101226,
0.0837999061,
-0.0438017622,
0.1780878305,
0.119966507,
-0.0594821237,
-0.31798774,
0.2856626809,
-0.2349057198,
0.0165574718,
-0.2090522945,
-0.1376467049,
-0.1760062873,
0.250734657,
-0.1824115664,
-0.5908306837,
0.271193862,
0.2093390673,
-0.2992365956,
0.3508662879,
-0.0001107919,
0.1900059581,
0.3981905282,
-0.0256015323,
-0.2827828526,
-0.1791189611,
-0.0728081167,
-0.061218366,
0.0831815153,
-0.2482593954,
-0.0818562135,
-0.122497879,
-0.1049755216,
-0.5397648811,
0.8384172916,
0.2460181713,
0.2726715803,
0.2112667114,
0.3223753572,
-0.259875387,
0.242028594,
-0.1614326835,
-0.0639909878,
0.3828731775,
0.1833218336,
-0.0479908213,
0.0057223253,
0.298196584,
0.1404444575,
-0.0875041336,
0.4186808169,
-0.0323038101,
0.0468770526,
-0.3087765574,
0.2146267295,
0.1028237045,
0.0884275883,
-0.3128264546,
-0.2070397437,
-0.2669892907,
0.0362551473,
-0.2407443523,
0.3180388808,
0.1313277185,
-0.202814728,
0.1684758365,
0.0087362751,
-0.2333392352,
0.0168726668,
-0.0356826261,
-0.0120587125,
0.0075639449,
-0.0477771014,
0.1442213207,
0.1870474815,
-0.0301870853,
0.2658226788,
-0.1093939617,
0.0195278022,
0.1790449023,
-0.5136675239,
0.1230203211,
-0.0518564135,
-0.098472625,
0.2277047038,
0.0287171528,
0.1698814332,
-0.068713814,
0.0624925494,
0.0053727776,
0.0905158371,
0.1125336438,
0.0269699525,
0.2809763253,
0.2035718262,
-0.1502017379,
-0.2411464602,
-0.0358258598,
-0.1814638972,
-0.1567700058,
0.3382403255,
0.0708147585,
0.5329920053,
0.0759851784,
-0.2476928234,
0.1277488321,
-0.1235774383,
-0.0753640234,
0.0569915175,
0.3604098558,
0.1586511284,
-0.338224709,
0.1139069945,
0.2257106006,
-0.159073621,
-0.2025010437,
-0.3317085803,
-0.119950369,
-0.0704322085,
-0.1687158942,
0.2553774118,
-0.5790082216,
0.3142926693,
0.2457669228,
-0.1194906235,
-0.4515376091,
0.078360498,
0.1040028557,
-0.1953112334,
0.0890586227,
0.0208359137,
0.0583035201,
0.0076983077,
-0.2369562685,
-0.0453377664,
0.1677509397,
-0.253195703,
-0.3557934761,
-0.0943063423,
0.3007487953,
0.0646657795,
0.0803304911,
0.0169260278,
0.0554004647,
0.1994580925,
0.156881392,
-0.0127063394,
-0.0332552157,
-0.1019221991,
-0.2483243048,
0.2735364437,
0.6290325522,
-0.1159736365,
-0.0979006365,
-0.1622076333,
-0.0023756288,
0.0797296613,
0.3462893367,
-0.2412420362,
0.3902708292,
-0.3654874265,
0.1659932137,
0.6817964315,
-0.2055111825,
-0.3552483916,
0.1524266452,
-0.247733593,
-0.1710254997,
0.0933935195,
0.0315538235,
0.162676692,
0.1522601694,
0.1557520032,
-0.0667625666,
0.0570320413,
-0.0515628308,
-0.3554733992,
-0.3471825719,
0.1130476967,
-0.0670959353,
0.1661298275,
-0.1674633622,
0.2417473793,
-0.1381933093,
0.1254564226,
-0.112406671,
-0.0802562833,
0.090733707,
0.2145914435,
0.0272684973,
0.0985971838,
-0.0643676072,
-0.4726125002,
0.3678176999,
-0.2958659828,
-0.2371388674,
-0.2157185227,
-0.2840786576,
-0.4142510295,
0.1149868593,
-0.5730292201,
-0.0325941592,
0.2200723886,
-0.0267935283,
0.2193908095,
0.0880646557,
-0.1207317486,
0.1589352041,
0.0497189686,
0.0876837075,
-0.2432180643,
0.2517297566,
-0.458370775,
-0.0632469729,
0.1095041186,
0.2277160138,
0.3038505316,
-0.1221484989,
-0.1701617837,
0.421949327,
-0.2227298766,
0.0020727143,
-0.0018699048,
-0.1487245858,
0.0674978495,
-0.3830084801,
0.1845067888,
0.29937011,
0.1757297069,
-0.1566671431,
-0.0986902937,
0.3583342135,
-0.0740239471,
0.0907488763,
-0.0510713719,
-0.0368811078,
0.1225300804,
-0.1088035107,
0.2126482427,
-0.1271823049,
0.2830674648,
-0.3175023198,
0.40243873,
0.1329594702,
-0.2321518362,
0.1211525872,
0.2946243584,
0.0163622871,
0.1883888841,
-0.002434114,
-0.0214984119,
-0.1830296665,
-0.2807161212,
0.2342669517,
0.2953341603,
0.1781709343,
-0.1118415222,
0.2570240498,
0.0040007904,
-0.1871971786,
0.3797666132,
-0.1941542476,
-0.1340707541,
0.3846866488,
0.0899586976,
-0.0086618066,
-0.4447202682,
-0.1110007316,
0.1650650054,
0.1223475114,
-0.2493939102,
0.0003660321,
-0.1639932394,
-0.0636470169,
-0.4797676802,
0.5345817804,
-0.0994896963,
-0.148879081,
0.2435331494,
0.0811948627,
0.1193657368,
0.127897352,
-0.2404330671,
0.1499005109,
0.0576750264,
0.0818657726,
-0.2238828838,
-0.1108081341,
-0.0923989639,
0.0561682358,
0.3637706041,
-0.0652654618,
0.5341527462,
-0.1901934892,
0.0905747712,
-0.2226316929,
-0.3574887514,
-0.0129974484,
0.0026214505,
0.1580308229,
0.1113691106,
-0.0347029977,
-0.0118293762,
-0.3635372519,
0.2709293664,
-0.3152556419,
-0.427922368,
0.014068976,
0.0075031854,
-0.0309334882,
-0.2294651121,
-0.5562417507,
-0.2520561218,
-0.2643299997,
0.2726469934,
-0.0757410005,
0.0702347308,
0.385976404,
-0.0329323709,
-0.0093220919,
-0.0285109133,
0.1671646684,
-0.3440155983,
0.0109194517,
0.0526411235,
-0.0584130734,
-0.3240551353,
-0.0440943725,
-0.1682160199,
0.1607693881,
-0.13155967,
-0.3624715209,
0.2376158535,
-0.2448980957,
0.4199643135,
-0.2150039673,
0.2762876451,
0.2194640189,
0.2579503059,
-0.1546112448,
-0.1946179867,
-0.0431080163,
0.1191187426,
-0.1772720218,
0.0579534099,
0.0751887411,
0.2850073874,
-0.2456806302,
0.8134371042,
0.5724949241,
-0.0077528907,
0.1956249475,
-0.2384262234,
0.3781945109,
-0.2580961287,
-0.4343475699,
-0.2718247175,
0.1200621575,
0.0793166012,
0.1062155366,
-0.0888001174,
-0.0725794882,
0.169348672,
-0.1328795254,
-0.5772474408,
-0.322095871,
0.0516161621,
-0.219501704,
0.093585223,
0.0843146369,
0.0302753747,
0.0016910471,
0.0297222883,
-0.0056099892,
0.1969576776,
-0.040183682,
0.0871122479,
-0.1645722091,
-0.1121440232,
-0.3914949596,
0.1428778768,
-0.1441079676,
0.1839492917,
0.0162560865,
0.1846572459,
0.3610927463,
-0.1915575862,
0.6522552967,
-0.0972909108,
0.1387353987,
0.1152113453,
0.1727876365,
-0.137770921,
-0.1088002399,
0.0332590342,
0.4142427146,
0.111490652,
0.1376127005,
-0.2753407955,
0.013142053,
-0.0005718628,
0.277002573,
-0.3481082916,
-0.3533652127,
-0.1978776157,
-0.3296111226,
-0.5215111971,
0.0043430179,
-0.0022248551,
0.2339482158,
-0.0310415886,
-0.098644264,
-0.2354492992,
-0.2289232612,
0.0203460157,
0.2096413523,
0.285069257,
0.125857383,
0.5712017417,
0.3908027112,
-0.1034237891,
-0.0132419039,
0.7329346538,
0.0072244294,
-0.0141442344,
-0.3090281785,
-0.226270169,
-0.1921977103,
0.2538833618,
-0.1747229397,
0.1761264801,
0.0652291328,
0.020186495,
0.0349424146,
-0.1436333805,
0.164427191,
-0.1691852361,
-0.2057056129,
-0.3801516294,
0.272916019,
-0.1259980798,
-0.2761527896,
0.2663393617,
0.1311992705,
-0.1692611426,
0.3703282475,
-0.3384571671,
0.8030841351,
-0.3222215176,
-0.0323642381,
-0.1175398827,
-0.3198095262,
0.2389767915,
-0.0710937381,
0.0164572448,
-0.4927274585,
0.0529790521,
0.1650753021,
-0.0380419418,
-0.0772076398,
-0.0188326407,
-0.3268427849,
0.1943095177,
-0.0445221588,
0.0551320016,
-0.177285403,
0.3472308517,
-0.0141337132,
0.2519337833,
0.0079934597,
0.1487937868,
0.1591981798,
0.2623223066,
-0.0231429935,
-0.0313844979,
0.1624127775,
-0.5612021685,
-0.2426978648,
0.1193091944,
-0.38168782,
0.5089935064,
-0.0113084009,
-0.2430346161,
0.1899623275,
0.0247276351,
0.2385045737,
0.2175935358,
-0.0599931553,
0.1229247898,
0.2727582753,
0.0899910778,
-0.2118237019,
-0.0277950205,
-0.0924524069,
-0.0050216988,
-0.3614403009,
-0.0488176346,
-0.0599453337,
-0.4107630849,
-0.146483317,
0.2362817228,
-0.1562004536,
-0.0623807386,
0.1588267386,
-0.0425825231,
-0.10807845,
-0.3281365335,
0.1703135669,
0.1556911469,
0.0344360247,
0.0936869383,
-0.0587181151,
-0.2066201717,
0.0575105995,
0.1759092361,
0.3556886911,
0.0973457098,
0.5280069709,
-0.2695706189,
-0.0025809854,
-0.2692106366,
0.0659108311,
0.1300943047,
-0.6778998375,
0.2404313684,
-0.2633764744,
0.1785430759,
0.1193557009,
0.4354134798,
0.3073656857,
0.2008406371,
0.0557545722,
-0.1955750883,
-0.1281789243,
-0.0845308229,
0.0431711189,
0.2558169961,
0.0304472372,
0.1719133556,
-0.0592599586,
0.2200323194,
-0.3742520213,
0.2876404524,
-0.0920177698,
0.1150860935,
-0.0360314623,
-0.1365342736,
-0.043934647,
-0.0217161737,
0.1914597899,
0.1017003953,
-0.2022999972,
-0.2717782259,
-0.0802880973,
0.1136823744,
-0.039036084,
0.1121332645,
-0.2161175162,
-0.1972956955,
0.1972079724,
-0.0550851598,
0.204624325,
-0.1175459921,
0.1393635273,
0.0641287863,
0.1185411513,
0.1053303778,
-0.2349283099,
0.1644868702,
-0.2630439103,
0.3048258126,
-0.0665518418,
0.1540905535,
-0.0324406177,
-0.0691730529,
-0.2817692459,
0.0859373808,
-0.1532094777,
0.0907228738,
0.1475835443,
-0.2426228076,
-0.1706992239,
0.41718328,
0.1768937409,
0.4963462353,
-0.3218607008,
0.1213966683,
-0.0222583264,
0.2640509903,
-0.3719105124,
-0.1372205615,
0.0454550795,
0.0078018941,
0.2777581215,
0.3237071037,
0.2908852696,
-0.1721039712,
-0.0758730322,
0.0758377016,
0.3826348782,
0.0070853028,
0.3628192544,
0.3571460247,
0.2445201874,
-0.2220558524,
0.3068503141,
-0.0539519936,
0.0639209002,
0.5503356457,
-0.5318267345,
0.1365040094,
-0.0347368047,
0.2305371165,
0.2037722915,
-0.1257788241,
0.4079794586,
0.0730621666,
-0.1164213046,
0.0158993062,
0.0352269448,
0.1720739901,
-0.2178196907,
-0.0557480864,
-0.1123491824,
0.0730846226,
-0.1755263507,
-0.1190880537,
-0.1176807135,
-0.2050517797,
-0.2649654746,
0.1112106889,
0.0344492048,
0.0620380901,
0.16560781,
0.0011817142,
-0.3356291652,
-0.3886713982,
0.1887100041,
0.3114575744,
0.3505725563,
-0.3815403283,
0.2776067555,
0.4696750641,
-0.1024904996,
0.1744853407,
0.5233428478,
0.604681313,
0.2045621723,
-0.1610851437,
0.2307294011,
0.0859479383,
-0.1587415338,
-0.2143247277,
0.0859884918,
-0.1125601232,
0.1508614868,
0.1863925755,
0.1192656308,
-0.1523853838,
-0.1243504733,
0.2570671439,
0.0892341137,
-0.1157789007,
0.2096571028,
-0.1934624612,
-0.1191295534,
-0.0106683839,
0.2577624321,
-0.3703104854,
0.0087715499,
0.3382305801,
0.1999277323,
0.121442467,
-0.2532487512,
0.1432628036,
0.0362459607,
0.320644021,
0.167452842,
0.0708226711,
-0.2496787608,
-0.0344960093,
-0.6907968521,
0.1137468219,
-0.43485865,
-0.0502485074,
0.1779344231,
0.3789182305,
-0.2952189445,
0.0249813795,
0.3320697546,
0.0711954683,
0.0678385869,
0.2166438997,
-0.2155786455,
0.0088598412,
0.4026428759,
-0.2635599375,
0.1491954029,
-0.4507479668,
0.3349403143,
-0.347217679,
0.0670801327,
-0.1321838498,
0.0437039882,
0.146381557,
-0.2922663391,
0.4322302341,
0.0993866473,
0.324154675,
-0.031781178,
-0.1804345697,
-0.218867451,
-0.148695752,
-0.2408019304,
0.2581400275,
0.5101237297,
0.1396812499,
-0.0000910684,
-0.4157195687,
-0.1875609308,
0.2462855577,
0.089205265,
-0.0388059765,
-0.0925742388,
0.0967669263,
-0.2200210392,
0.1512513161,
0.0268627629,
0.2260271609,
-0.0823857337,
0.1834836006,
-0.2212614119,
-0.6726046205,
0.3810139894,
-0.1573602557,
-0.0951679498,
-0.1255325675,
0.3582264781,
0.2455355227,
0.0702353343,
-0.6323137879,
0.258146584,
0.5377967358,
-0.2006969303,
-0.0005392358,
0.1608230323,
-0.1072047949,
0.051450491,
0.0228126794,
0.0017287675,
0.0554153323,
-0.2744814157,
0.262024194,
-0.3209925592
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | I found one issue on `fever` (PR here: https://github.com/huggingface/datasets/pull/2557)
All the other ones seem fine :) | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 16 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
I found one issue on `fever` (PR here: https://github.com/huggingface/datasets/pull/2557)
All the other ones seem fine :) | [
-0.0202085599,
0.0007682592,
-0.0907566994,
0.3496338129,
0.0851366594,
-0.0248720646,
0.1991798878,
0.2581068575,
0.0932299048,
0.0736750141,
-0.092786938,
0.3846126795,
-0.1742852479,
0.1145089716,
0.157997936,
0.0978716016,
-0.0322049931,
0.1860355735,
0.114663437,
-0.0663527846,
-0.3220598698,
0.2716597617,
-0.2497789562,
0.0057932027,
-0.2198530734,
-0.1277945936,
-0.1814607084,
0.232720077,
-0.1582825631,
-0.6227062941,
0.2830569446,
0.2367788851,
-0.3231885731,
0.3545231223,
-0.0001138885,
0.1849656701,
0.3915032446,
-0.0082438961,
-0.2720442116,
-0.1919542253,
-0.0973865315,
-0.0876457021,
0.1220967099,
-0.2598314285,
-0.0403411947,
-0.1267458498,
-0.1003252193,
-0.5317749977,
0.8246199489,
0.193642959,
0.2487319559,
0.1887021363,
0.3378746212,
-0.2372307628,
0.2439078838,
-0.1666712314,
-0.055227533,
0.3877436519,
0.198595494,
-0.0504909977,
0.0121909678,
0.2858551145,
0.1549566388,
-0.1102306843,
0.4621379375,
-0.0525856465,
0.0763137266,
-0.3710741699,
0.2049999833,
0.0892787352,
0.0974370539,
-0.2761586308,
-0.2324384451,
-0.2789844573,
0.056044884,
-0.2132116854,
0.359341979,
0.1221938059,
-0.2076242566,
0.1624031514,
-0.0172565244,
-0.257753104,
0.0126819164,
-0.0440758094,
0.0079855621,
-0.0301993862,
-0.0491083972,
0.1541400254,
0.1662728786,
-0.0320538208,
0.2796736956,
-0.0996795446,
0.0411550328,
0.2203779072,
-0.5572585464,
0.1509337872,
-0.0677145496,
-0.097979337,
0.2128642648,
0.0290230215,
0.1994987279,
-0.0848771483,
0.0650743246,
0.0161666963,
0.103439644,
0.0965401828,
0.034240447,
0.2327068597,
0.21909073,
-0.1835647821,
-0.2517266273,
-0.0357226431,
-0.2129188776,
-0.1737252772,
0.4017065167,
0.0611097552,
0.5241867304,
0.0679924861,
-0.2271729708,
0.1321722567,
-0.1534136683,
-0.1008549184,
0.0860633478,
0.341001302,
0.1949201822,
-0.3373980522,
0.1137648374,
0.2290328592,
-0.1387766898,
-0.2006437182,
-0.310211122,
-0.121383518,
-0.0552543737,
-0.1454881728,
0.2526147962,
-0.6270564795,
0.2642528117,
0.260543108,
-0.102076441,
-0.4912846386,
0.0038112327,
0.1023696214,
-0.2192969024,
0.0943132788,
0.0159662813,
0.0795726329,
-0.0476265661,
-0.2335377038,
-0.0544430837,
0.1780003905,
-0.2537406981,
-0.3525574803,
-0.0227047838,
0.2670419216,
0.0590400398,
0.1252040565,
-0.0038164183,
0.0386781767,
0.2306306064,
0.1851243228,
-0.0123236999,
-0.0314190872,
-0.088888593,
-0.2552243471,
0.2687976956,
0.6540946364,
-0.0965852961,
-0.1106151864,
-0.1760230064,
-0.0000577476,
0.1063130349,
0.37059322,
-0.2221120298,
0.4160011709,
-0.3452947736,
0.159789443,
0.7105056643,
-0.1933839768,
-0.3874003887,
0.1839336008,
-0.2476290464,
-0.1824144423,
0.1065881848,
0.0144340433,
0.1848348975,
0.1223946586,
0.163444072,
-0.0733877867,
0.081307888,
-0.0535244085,
-0.3427562714,
-0.3470589519,
0.1212372035,
-0.0639003813,
0.1830681264,
-0.1579374373,
0.2726066411,
-0.137343809,
0.0896513611,
-0.1177650318,
-0.0631601959,
0.0818890482,
0.2199140042,
0.0230336804,
0.1041528657,
-0.057609126,
-0.4630145431,
0.3818477094,
-0.2959957123,
-0.2730378807,
-0.249900192,
-0.246673286,
-0.3670991659,
0.1595123559,
-0.5803841352,
0.0287359916,
0.1856032312,
-0.0443431996,
0.2221629024,
0.1019118428,
-0.1063280478,
0.1741609126,
0.0609683767,
0.0783873945,
-0.2048069984,
0.260923177,
-0.4255303741,
-0.0561136156,
0.1025157273,
0.2394190729,
0.3366998136,
-0.1111951768,
-0.1904087067,
0.4078956842,
-0.2392884344,
0.0221075378,
-0.034824647,
-0.1301354468,
0.0792380795,
-0.3870621324,
0.1635848135,
0.2781237662,
0.1803106964,
-0.155077666,
-0.0412188061,
0.3161664009,
-0.1122284383,
0.1176384836,
-0.0673278272,
-0.0462842435,
0.1096148044,
-0.1085917652,
0.2148879468,
-0.1273213029,
0.3092453778,
-0.3220947087,
0.4101285338,
0.1456074864,
-0.2284378707,
0.1148159653,
0.2885638475,
0.0129625574,
0.1708483398,
0.0142392451,
0.0231229253,
-0.1852748096,
-0.309905231,
0.2503822446,
0.3074392676,
0.1368938982,
-0.1100535542,
0.2577154636,
0.0272051729,
-0.2018004507,
0.3694402575,
-0.1471650749,
-0.1145036221,
0.4094091356,
0.1236054599,
0.0418063439,
-0.4395468235,
-0.1031290591,
0.2066830695,
0.0979182422,
-0.2481190562,
0.0145446658,
-0.1656814218,
-0.0346913897,
-0.4692346454,
0.5736932158,
-0.1025877893,
-0.1179143488,
0.2339112163,
0.0687986612,
0.153528139,
0.1181849539,
-0.2238681614,
0.147969842,
0.0400189236,
0.0913882777,
-0.2332363129,
-0.0914765,
-0.0854195505,
0.0043805726,
0.4014088511,
-0.1010475233,
0.5399113894,
-0.1814330518,
0.0794087425,
-0.213098824,
-0.3361154199,
-0.0237547681,
0.0386974514,
0.1665663421,
0.0658398271,
-0.0652714074,
-0.0287217088,
-0.3721289337,
0.2697653174,
-0.3284952044,
-0.4169462323,
0.0101506636,
0.0055706687,
-0.0413727723,
-0.2417518348,
-0.5231004357,
-0.245837599,
-0.2457344532,
0.3262640834,
-0.1252704859,
0.0861843675,
0.3265454471,
-0.0873573199,
-0.0341759138,
-0.037580505,
0.1786943674,
-0.3457051516,
0.0466417819,
0.0505952761,
-0.0377123952,
-0.342171073,
-0.0582421534,
-0.1246190667,
0.1684558392,
-0.0901197344,
-0.364964962,
0.3040499985,
-0.2496060133,
0.4348332882,
-0.2169640511,
0.2921919525,
0.1888553053,
0.2523486614,
-0.1235341132,
-0.178401053,
-0.0185370371,
0.1148377657,
-0.1724197567,
0.0444513708,
0.1156710386,
0.2916902602,
-0.2708286345,
0.8078588843,
0.5670901537,
0.0105673727,
0.2099636495,
-0.2143363804,
0.3573080897,
-0.2475782484,
-0.4330513477,
-0.2656172216,
0.1070934981,
0.0813836604,
0.0956931934,
-0.0795382112,
-0.0807897076,
0.1657530963,
-0.1809011102,
-0.5866478086,
-0.3168032169,
0.0558158755,
-0.24452582,
0.1324726194,
0.0851007402,
0.026823014,
0.0293134265,
-0.0095795617,
-0.0265901666,
0.2357901931,
-0.0056334957,
0.079482086,
-0.1579551548,
-0.164999187,
-0.3975369036,
0.1181501001,
-0.1273110211,
0.2269962579,
0.0055988356,
0.2317030579,
0.4163600802,
-0.2022296786,
0.6757405996,
-0.067979686,
0.156073004,
0.0936869979,
0.1393203735,
-0.1231687665,
-0.1203202233,
0.073318176,
0.4453844428,
0.1178602427,
0.1218144894,
-0.2651016712,
0.0125442222,
-0.0674533844,
0.2935516536,
-0.3799760342,
-0.409884721,
-0.1448251456,
-0.3187565207,
-0.510240674,
-0.0192870535,
-0.0145013221,
0.2496228814,
-0.0626727343,
-0.0809312984,
-0.2437488586,
-0.2154947966,
0.014571391,
0.2108634263,
0.2731422484,
0.1007199883,
0.6041333675,
0.4393434823,
-0.1413891464,
-0.0042282734,
0.7062291503,
-0.0068031931,
-0.0212429874,
-0.2818033397,
-0.2356343865,
-0.1919904053,
0.2679479718,
-0.2039372772,
0.177736789,
0.0793218613,
-0.0019132495,
0.0330986232,
-0.1960717887,
0.1702937186,
-0.1882787645,
-0.2366939783,
-0.3877385259,
0.3027289808,
-0.127183035,
-0.2844856977,
0.2639064491,
0.1304770708,
-0.1688387394,
0.3598026037,
-0.343887955,
0.8287068009,
-0.354568392,
-0.0525074676,
-0.1525409371,
-0.3235087395,
0.2501275837,
-0.0668519884,
0.022803843,
-0.5010048151,
0.0630500913,
0.1640282273,
-0.0611054264,
-0.1104051173,
0.0001883865,
-0.2942346036,
0.1739929169,
-0.0544595495,
0.0204802454,
-0.1534421444,
0.354931891,
0.009145366,
0.2188322544,
-0.0245844163,
0.1050480008,
0.158753708,
0.2887303233,
-0.0325887948,
-0.0355950519,
0.1833782792,
-0.5770733356,
-0.2792323828,
0.1072815955,
-0.3708566427,
0.5369706154,
0.0195549652,
-0.2575701773,
0.2425424755,
0.0130721088,
0.2327264547,
0.2016301602,
-0.0526869446,
0.1224903613,
0.3005026877,
0.1007064432,
-0.2253257185,
-0.0210917331,
-0.1039733067,
-0.0016897246,
-0.3443885744,
-0.0773523897,
-0.0794811025,
-0.4005851746,
-0.1658961326,
0.2631049752,
-0.1736076474,
-0.0105281211,
0.1767033637,
-0.0521220267,
-0.089038305,
-0.3136581481,
0.1497512311,
0.1800009906,
0.0409671329,
0.1119863987,
-0.077473864,
-0.1747511625,
0.0859684199,
0.1816871464,
0.3723409176,
0.0833174139,
0.5415465832,
-0.274107635,
-0.010431841,
-0.2523806393,
0.0836678892,
0.091859661,
-0.7165340185,
0.2361986935,
-0.3014402986,
0.2387851179,
0.1011595726,
0.4325395226,
0.3051664233,
0.2136662155,
0.040687643,
-0.2169869244,
-0.0858245194,
-0.096907258,
0.0304515734,
0.2258673459,
0.0072453171,
0.167685166,
-0.0845436826,
0.2230579555,
-0.3288600743,
0.2706346512,
-0.081136182,
0.0841264278,
-0.0047697835,
-0.1192709953,
-0.0520375669,
-0.0461235158,
0.1594184935,
0.0948784351,
-0.1736589521,
-0.2326162457,
-0.0896768644,
0.1331890076,
-0.0400189236,
0.1329045296,
-0.232537955,
-0.2018631995,
0.2211351097,
-0.0618868992,
0.1928775311,
-0.1243792176,
0.1366806179,
0.0372683629,
0.1535413265,
0.099937886,
-0.2555323243,
0.2024779171,
-0.2809892297,
0.3246925473,
-0.0434046648,
0.1691110134,
-0.0195344277,
-0.0407930091,
-0.3310748041,
0.0457024835,
-0.2060305178,
0.0893422514,
0.152474463,
-0.2731483281,
-0.1586351991,
0.406278491,
0.1589535922,
0.5390265584,
-0.3238691688,
0.1248405948,
-0.0324667804,
0.2207845002,
-0.3509296775,
-0.1509008855,
0.0421090946,
0.0099143125,
0.2370733619,
0.3453677297,
0.3118667006,
-0.2216418684,
-0.1029441804,
0.0660705864,
0.4031573534,
0.0129866172,
0.3764741421,
0.3809970021,
0.2930631042,
-0.202640146,
0.2937023938,
-0.0405770019,
0.0268592015,
0.564730525,
-0.571675837,
0.0970175266,
-0.0100531429,
0.258464694,
0.2096128166,
-0.1318118423,
0.3875587583,
0.0626460463,
-0.1136689186,
0.0254146121,
-0.0024647973,
0.1681885123,
-0.2009141594,
-0.0553319715,
-0.0887984335,
0.0949236751,
-0.1822155565,
-0.1194702089,
-0.1094761863,
-0.2381825447,
-0.2414563596,
0.1266983151,
0.0207604337,
0.0668729693,
0.1796784848,
0.0243959296,
-0.3266169429,
-0.3924656212,
0.2119555473,
0.3055472374,
0.3821728528,
-0.4020875692,
0.2971868217,
0.46878016,
-0.1085189283,
0.1810614169,
0.4946080446,
0.6445357203,
0.236723125,
-0.1513956487,
0.214429155,
0.0908138007,
-0.154537946,
-0.1945608258,
0.1061466783,
-0.1023360342,
0.181447506,
0.1494655907,
0.0785036236,
-0.114947781,
-0.1056779251,
0.2771041393,
0.1448200345,
-0.0929142088,
0.2185653299,
-0.1976521313,
-0.1344172508,
0.0211390629,
0.2508803606,
-0.3458341956,
0.0088225938,
0.3492434025,
0.2417681813,
0.1199213266,
-0.2315488011,
0.1283792853,
0.0345708504,
0.3339750767,
0.1753883809,
0.0514894128,
-0.2477040291,
-0.0324749127,
-0.6966257095,
0.0962714106,
-0.4398217201,
-0.0247144103,
0.2195525467,
0.3855263889,
-0.3456204534,
-0.0091129756,
0.3729903698,
0.0727440342,
0.0275597349,
0.2396110594,
-0.2225520909,
-0.0010232588,
0.4384168983,
-0.255438298,
0.1187905148,
-0.4289162457,
0.3651639223,
-0.3669345379,
0.0287135765,
-0.1510293484,
0.0678251088,
0.102013126,
-0.2757466435,
0.415866226,
0.0889695659,
0.3340983093,
-0.0057510063,
-0.2017382085,
-0.2366868407,
-0.1630809754,
-0.2188817114,
0.2959425747,
0.5006558299,
0.1152564734,
-0.0208941735,
-0.4221181571,
-0.1788976789,
0.2249130309,
0.0389953852,
-0.0718411431,
-0.0791553482,
0.0578774214,
-0.2015525699,
0.1607157588,
0.0240393132,
0.2076045573,
-0.0899776965,
0.165241614,
-0.2389789373,
-0.6555593014,
0.3939447403,
-0.1794789582,
-0.0907585174,
-0.1361941844,
0.3525636792,
0.2518313825,
0.0771786571,
-0.6191430092,
0.238917917,
0.5750243664,
-0.2288495004,
-0.0097289681,
0.153352946,
-0.1298982501,
0.047292456,
0.0175556615,
-0.0761200041,
0.0305066817,
-0.2946878374,
0.2548615932,
-0.3082234263
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | Hi! Got same error when loading other dataset:
```python3
load_dataset('wikicorpus', 'raw_en')
```
tb:
```pytb
---------------------------------------------------------------------------
DuplicatedKeysError Traceback (most recent call last)
/opt/conda/lib/python3.8/site-packages/datasets/builder.py in _prepare_split(self, split_generator)
1109 example = self.info.features.encode_example(record)
-> 1110 writer.write(example, key)
1111 finally:
/opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in write(self, example, key, writer_batch_size)
341 if self._check_duplicates:
--> 342 self.check_duplicate_keys()
343 # Re-intializing to empty list for next batch
/opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in check_duplicate_keys(self)
352 if hash in tmp_record:
--> 353 raise DuplicatedKeysError(key)
354 else:
DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 519
Keys should be unique and deterministic in nature
```
Version: datasets==1.11.0 | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 91 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
Hi! Got same error when loading other dataset:
```python3
load_dataset('wikicorpus', 'raw_en')
```
tb:
```pytb
---------------------------------------------------------------------------
DuplicatedKeysError Traceback (most recent call last)
/opt/conda/lib/python3.8/site-packages/datasets/builder.py in _prepare_split(self, split_generator)
1109 example = self.info.features.encode_example(record)
-> 1110 writer.write(example, key)
1111 finally:
/opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in write(self, example, key, writer_batch_size)
341 if self._check_duplicates:
--> 342 self.check_duplicate_keys()
343 # Re-intializing to empty list for next batch
/opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in check_duplicate_keys(self)
352 if hash in tmp_record:
--> 353 raise DuplicatedKeysError(key)
354 else:
DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 519
Keys should be unique and deterministic in nature
```
Version: datasets==1.11.0 | [
-0.0506565943,
-0.0265309215,
-0.0967086703,
0.3376674354,
0.0938270837,
-0.0051847622,
0.2096368074,
0.2723228037,
0.0978669971,
0.0846781135,
-0.0767666698,
0.3797585666,
-0.1855773628,
0.131249845,
0.1376767606,
0.0704791397,
-0.0451735482,
0.1832595468,
0.1311879754,
-0.0342162177,
-0.3247796297,
0.2772047818,
-0.225661546,
0.0105906185,
-0.2162511349,
-0.1412387937,
-0.185213536,
0.2377096266,
-0.1705393046,
-0.6306675076,
0.2620755434,
0.2049673796,
-0.2932026982,
0.3494946361,
-0.0001131814,
0.1847910434,
0.386631012,
-0.0220921226,
-0.2522618175,
-0.1984634995,
-0.0995157063,
-0.0947170258,
0.0844926387,
-0.2655925155,
-0.0616115741,
-0.1218319088,
-0.0980846137,
-0.5638545156,
0.838365674,
0.2186895311,
0.2488027215,
0.1780720949,
0.3565168083,
-0.2654958367,
0.233343333,
-0.1770567894,
-0.0573635735,
0.3910862207,
0.2137889862,
-0.0461803675,
0.0189007055,
0.2944654822,
0.1549507976,
-0.094559595,
0.4434224665,
-0.0574332327,
0.074862808,
-0.3529262245,
0.2176123708,
0.0829746723,
0.1021129712,
-0.2907668352,
-0.2244519293,
-0.2823086977,
0.0506777242,
-0.2336991429,
0.3289040029,
0.1434264183,
-0.2258556485,
0.1656321436,
-0.0085748769,
-0.2514269948,
0.0117152929,
-0.0579375997,
0.0218852088,
-0.0263175145,
-0.0522210337,
0.1410629898,
0.1878550947,
-0.0514881052,
0.2746837139,
-0.0666025579,
0.0352338627,
0.1945724338,
-0.5258197784,
0.1267574579,
-0.044437103,
-0.1213003695,
0.2348860502,
0.0344486646,
0.1818595231,
-0.1160667762,
0.0746418387,
0.0022265315,
0.0957321227,
0.1307919472,
0.0141503066,
0.2462750673,
0.1825143397,
-0.1548224986,
-0.2489558309,
-0.0559686944,
-0.1899850219,
-0.1946253031,
0.3649507463,
0.0828334093,
0.5289826989,
0.0861613154,
-0.2361945659,
0.133789584,
-0.1345013082,
-0.0975797698,
0.0642863065,
0.3334594965,
0.1980133206,
-0.3291807473,
0.1161270887,
0.2278709561,
-0.1273084581,
-0.1955413818,
-0.3080866635,
-0.0857727975,
-0.0730132386,
-0.1487105191,
0.2354018837,
-0.615136385,
0.2906033397,
0.247657001,
-0.1106656939,
-0.5036482215,
0.0178253949,
0.1039809883,
-0.2419444025,
0.0784961283,
0.0232205465,
0.0666553676,
-0.0222960897,
-0.2303780466,
-0.0598929524,
0.1667027771,
-0.2588889897,
-0.3754637837,
-0.0666588023,
0.2756345272,
0.0991149172,
0.1002612561,
0.0241974648,
0.0435336679,
0.2254666686,
0.1764665544,
-0.0194032975,
-0.031491477,
-0.0847402513,
-0.256047368,
0.2619624734,
0.6545100808,
-0.0967012271,
-0.0910337567,
-0.1727348566,
0.0162480436,
0.097843416,
0.3790156245,
-0.2228413969,
0.4225223064,
-0.3517400026,
0.1507118642,
0.7040376067,
-0.1903830022,
-0.3690505922,
0.1839620024,
-0.2506257892,
-0.2029009461,
0.1125370711,
0.0112543553,
0.1669314504,
0.1460942626,
0.1736397445,
-0.0832222253,
0.0437687114,
-0.0466865897,
-0.3396584392,
-0.3785649538,
0.1158135161,
-0.0809864104,
0.1927714646,
-0.1396755576,
0.2820677459,
-0.1008894295,
0.1065190881,
-0.13113451,
-0.0840882957,
0.0852605104,
0.2358701825,
0.037979573,
0.0610436238,
-0.094191961,
-0.4492216408,
0.375195086,
-0.2969658375,
-0.2601021528,
-0.2236416638,
-0.2457154244,
-0.4040381908,
0.130481869,
-0.5598601103,
-0.0123330466,
0.1953622401,
-0.0263782069,
0.2334782481,
0.0946783423,
-0.1328271925,
0.1824875176,
0.0621088818,
0.0786603838,
-0.2175978571,
0.2431553006,
-0.4592074752,
-0.0629116446,
0.0995282903,
0.2300845981,
0.3229331076,
-0.0937635899,
-0.1757677197,
0.4119698405,
-0.2277360409,
-0.0013413541,
-0.0000538309,
-0.1339234412,
0.0696878731,
-0.3773818314,
0.188181594,
0.2873411775,
0.1758790016,
-0.1463002563,
-0.0467564687,
0.308958292,
-0.0962029323,
0.0982418135,
-0.0553946197,
-0.0379569307,
0.1037114635,
-0.1151414216,
0.2339859903,
-0.128282547,
0.3135379553,
-0.3360982239,
0.3928043842,
0.1252304465,
-0.2248099744,
0.1092216522,
0.2842068374,
0.022660315,
0.1894482225,
0.0273583233,
0.0480378605,
-0.1708834916,
-0.322943747,
0.2553574443,
0.302467525,
0.1463907808,
-0.1326415092,
0.2653284669,
0.0214546919,
-0.183032155,
0.3622651696,
-0.1740482748,
-0.1003459692,
0.4041176438,
0.0908250585,
0.0271128379,
-0.4047188759,
-0.1392024904,
0.1715621203,
0.1138502061,
-0.2378465235,
0.0071048588,
-0.1528920233,
-0.0564407967,
-0.4925175607,
0.5608200431,
-0.1072301865,
-0.1246386543,
0.2069612294,
0.0719944537,
0.1526007205,
0.1005072594,
-0.235383302,
0.1593103707,
0.0551270619,
0.1080128178,
-0.197078824,
-0.0866709054,
-0.0614468642,
0.0214706324,
0.3701879382,
-0.1035163105,
0.5540129542,
-0.1882573217,
0.1039417088,
-0.2396974266,
-0.3182741404,
-0.0383767411,
0.030101683,
0.160273701,
0.0871214047,
-0.027178742,
-0.0237958431,
-0.3870372474,
0.2663694322,
-0.2896524966,
-0.4052240252,
-0.0074305274,
-0.0020917654,
-0.0275115706,
-0.2106697857,
-0.5379371643,
-0.2609391809,
-0.2703045011,
0.3130000234,
-0.1199059188,
0.0880824476,
0.3569857776,
-0.0480919331,
-0.0172876231,
-0.0212363582,
0.1838796437,
-0.3261017501,
0.0197958499,
0.0338792056,
-0.058576107,
-0.3170382082,
-0.0742269456,
-0.1409897506,
0.1756735295,
-0.1075959355,
-0.3542790413,
0.2863631546,
-0.27759552,
0.4044706225,
-0.2260825932,
0.3047443032,
0.1968451887,
0.256400615,
-0.1357320845,
-0.1624037325,
-0.0287834927,
0.1043876559,
-0.1742867678,
0.0744478256,
0.123403281,
0.3143493533,
-0.2439941466,
0.8015072346,
0.6011494398,
0.0021506464,
0.2192443758,
-0.2171153426,
0.3666770458,
-0.2702764869,
-0.4478714764,
-0.2633078098,
0.1035988033,
0.0686425716,
0.0786149055,
-0.0901967138,
-0.0777265653,
0.1561604738,
-0.1707780063,
-0.5983709097,
-0.3052637875,
0.0630597696,
-0.2540408373,
0.1322247982,
0.0592924654,
0.0095058531,
0.0147971846,
0.019925084,
-0.0247454941,
0.2436977476,
-0.0160876773,
0.0968079269,
-0.1489836723,
-0.161885947,
-0.3931613863,
0.1312757432,
-0.1290554404,
0.2116868049,
-0.0039113015,
0.2356931716,
0.3793330193,
-0.2040456384,
0.6450530887,
-0.0790480524,
0.1470452547,
0.1092163473,
0.1435653865,
-0.0940996408,
-0.1058790237,
0.0680076182,
0.4331173003,
0.11259453,
0.1072052941,
-0.2608774006,
0.0433255173,
-0.0442139655,
0.2962648273,
-0.356161356,
-0.3749856353,
-0.1564510167,
-0.3320350647,
-0.5376144052,
-0.0113803968,
0.0059255511,
0.2577069998,
-0.0122775957,
-0.0873328447,
-0.243415162,
-0.2121434212,
0.0184213109,
0.1975050867,
0.2777836323,
0.1220581532,
0.5724921823,
0.4022453427,
-0.1494083852,
0.0039842296,
0.703237772,
-0.0181905273,
-0.0268693753,
-0.3009825349,
-0.2183615267,
-0.1841008514,
0.2520706356,
-0.1820369959,
0.1687924266,
0.0891663581,
0.0256712027,
0.0215670913,
-0.1831193566,
0.1712029576,
-0.1753461957,
-0.2259697616,
-0.4079322219,
0.2826689184,
-0.1292393059,
-0.251524657,
0.2798961401,
0.1300745755,
-0.1542228758,
0.3632353842,
-0.3352126479,
0.8218473196,
-0.3532817364,
-0.0676455274,
-0.1762687117,
-0.3206601441,
0.2579030991,
-0.071961455,
0.0293070376,
-0.4959402084,
0.0541867986,
0.1736235321,
-0.0599408261,
-0.0763891116,
-0.0104468279,
-0.3085423708,
0.1903413534,
-0.0599967912,
0.001293322,
-0.1672785282,
0.3595795631,
-0.0123129711,
0.2399487644,
-0.0135558685,
0.1152837873,
0.1341268122,
0.2973422706,
-0.0504017994,
-0.0284442864,
0.1919242293,
-0.5713024139,
-0.3050014377,
0.1107298583,
-0.3681265712,
0.5553810596,
-0.0081702843,
-0.2508476377,
0.237780571,
0.0325039327,
0.2473186404,
0.2280907333,
-0.0505331159,
0.1029121429,
0.2869990468,
0.0714266449,
-0.2414245307,
-0.0139440708,
-0.080418691,
-0.0125869811,
-0.3690925241,
-0.0620403811,
-0.0703921616,
-0.4344570637,
-0.167141214,
0.2464847118,
-0.1694502383,
-0.0364786983,
0.172252968,
-0.0551464893,
-0.0988622531,
-0.3119078577,
0.1464176029,
0.1796562076,
0.0623883605,
0.1058058739,
-0.0682819933,
-0.1866519004,
0.0805722624,
0.1547396183,
0.3759059012,
0.0633021891,
0.5445218086,
-0.2628657222,
-0.0072234794,
-0.2490155697,
0.0811502561,
0.0862505585,
-0.6860790849,
0.2478180975,
-0.2962570786,
0.2240408659,
0.1087721437,
0.4142889082,
0.3356960416,
0.2232790291,
0.0819597691,
-0.215094924,
-0.1209504977,
-0.0753170103,
0.0127272271,
0.2521208823,
0.0051374063,
0.1877118349,
-0.0497152545,
0.211605072,
-0.3393206596,
0.2870151997,
-0.0936996117,
0.0792337507,
-0.0118987393,
-0.1192261279,
-0.0605761446,
-0.0137036555,
0.1599116623,
0.1208096445,
-0.1890534163,
-0.231738776,
-0.0821922421,
0.1298319995,
-0.0272761043,
0.1483591795,
-0.2258437574,
-0.2204294801,
0.2216610759,
-0.057471551,
0.1928474754,
-0.0927039161,
0.1492185295,
0.0430963598,
0.1456861347,
0.0988438129,
-0.2510835528,
0.1975169331,
-0.2540414333,
0.3194799423,
-0.0578661561,
0.1743398905,
0.0008015074,
-0.0530410707,
-0.3475049734,
0.0611160398,
-0.1615912914,
0.0822992101,
0.1322800815,
-0.2498302013,
-0.1537819058,
0.4204132855,
0.1611456573,
0.502595067,
-0.3153914511,
0.1437793672,
-0.0237631388,
0.2335669398,
-0.355311811,
-0.1331447661,
0.0018794723,
0.0134977549,
0.2440268844,
0.3504210114,
0.2872248888,
-0.1826778054,
-0.1038488299,
0.0704805851,
0.4004674256,
0.0077833738,
0.3844708204,
0.3722213507,
0.2784242332,
-0.2335224301,
0.2874755561,
-0.0431612805,
0.0500263274,
0.5659121275,
-0.5653172731,
0.1077283248,
-0.0338050127,
0.2446527332,
0.2079356909,
-0.1193798631,
0.3859621882,
0.0576404892,
-0.1204967201,
0.0073301103,
-0.0034063235,
0.1665774137,
-0.2071655989,
-0.0567430742,
-0.0929065049,
0.0841622502,
-0.1766604483,
-0.1067892313,
-0.0823222175,
-0.2316906452,
-0.2621317506,
0.1127239391,
0.0305348244,
0.0736296028,
0.1796393991,
-0.0074663945,
-0.3481133282,
-0.3785907924,
0.2002187371,
0.3214325905,
0.3671281636,
-0.4137482643,
0.2705953717,
0.4744776487,
-0.1166891605,
0.170509249,
0.5382392406,
0.6460698843,
0.2355012894,
-0.1561447531,
0.2338994741,
0.0935709029,
-0.151833415,
-0.1770097613,
0.0792704523,
-0.1090332419,
0.1749891937,
0.1633066833,
0.0851402059,
-0.1243621707,
-0.1141827703,
0.2625716925,
0.1380039304,
-0.1096433774,
0.2217369378,
-0.1939566582,
-0.1094134524,
0.0232875533,
0.2653509974,
-0.3807305694,
0.0055838935,
0.3437031209,
0.2179346383,
0.1009060889,
-0.2297044098,
0.131010294,
0.0447447263,
0.3138361275,
0.1847366244,
0.045094464,
-0.2534658611,
-0.0394295081,
-0.7021536231,
0.0885076374,
-0.4366103709,
-0.0163161941,
0.1816156209,
0.3796532154,
-0.338712126,
0.0108204633,
0.3618086278,
0.0711824,
0.0239166804,
0.2403924763,
-0.2153800726,
-0.008412919,
0.4215873182,
-0.257401377,
0.1407986283,
-0.4249763787,
0.3416323662,
-0.3546769321,
0.0405435562,
-0.1433152258,
0.0585681945,
0.1231765002,
-0.3012666106,
0.3987601697,
0.1030939743,
0.3309642076,
-0.0177953802,
-0.2310410738,
-0.2394164056,
-0.1723140776,
-0.2147089839,
0.2892090082,
0.5318427086,
0.1468502879,
-0.0255863499,
-0.4306860566,
-0.2093371153,
0.2462718487,
0.0495484844,
-0.0583306104,
-0.0740986243,
0.0639468506,
-0.1839037836,
0.1469752342,
0.0575049035,
0.2097402513,
-0.0927491412,
0.1925728023,
-0.2331938893,
-0.6767180562,
0.3900066614,
-0.1394376457,
-0.1063907593,
-0.1198496893,
0.3468547165,
0.2457020283,
0.0856786743,
-0.632153213,
0.2525626421,
0.5547976494,
-0.2041352093,
-0.0026268065,
0.1426165253,
-0.1399859637,
0.0241545215,
0.0314401984,
-0.0570403561,
0.0354683399,
-0.2795387208,
0.2724459767,
-0.3017100394
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | The wikicorpus issue has been fixed by https://github.com/huggingface/datasets/pull/2844
We'll do a new release of `datasets` soon :) | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 17 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
The wikicorpus issue has been fixed by https://github.com/huggingface/datasets/pull/2844
We'll do a new release of `datasets` soon :) | [
-0.0742808729,
-0.0351794362,
-0.0866822004,
0.3581603467,
0.062326137,
-0.0354923382,
0.1684752703,
0.2639018893,
0.0927658156,
0.1236142218,
-0.0445140488,
0.3784415126,
-0.1519159377,
0.1347225904,
0.1137829274,
0.0393821783,
-0.0278353244,
0.1998659819,
0.1008102298,
-0.0348954946,
-0.3487109542,
0.3278390765,
-0.2847043574,
0.0620546974,
-0.2731281221,
-0.1773474514,
-0.1778876185,
0.200719893,
-0.2140284032,
-0.6042183638,
0.2684113681,
0.2027057707,
-0.2295343429,
0.3793142438,
-0.0001112176,
0.1849375218,
0.396728009,
-0.0099954531,
-0.252894938,
-0.1352212578,
-0.0593604147,
-0.0799270198,
0.1142253429,
-0.3115119338,
-0.0552829653,
-0.1050354838,
-0.0662937835,
-0.4870352745,
0.84158355,
0.2476686984,
0.2632396519,
0.2291175276,
0.3477337956,
-0.2014203966,
0.2588488162,
-0.2904582918,
-0.0824054554,
0.3073558807,
0.188003391,
-0.0712197945,
-0.0259935074,
0.3081964254,
0.1307697892,
-0.0733630955,
0.3915859461,
-0.0154976826,
0.0570187867,
-0.3279982209,
0.2298206538,
0.1004075557,
0.1076007932,
-0.2757331431,
-0.183067739,
-0.2352993488,
0.0456516221,
-0.2553207874,
0.3790768385,
0.1081376374,
-0.1849620491,
0.1618367285,
0.0184583664,
-0.1499606371,
0.0437141806,
-0.0016608238,
-0.0511762239,
0.1737131625,
-0.032306686,
0.1444084942,
0.1939402819,
-0.0547875427,
0.3041888475,
-0.0899316072,
0.0066323406,
0.1831384301,
-0.5206642151,
0.1190481782,
-0.055835411,
-0.0297688581,
0.1882431209,
-0.0209249742,
0.162571311,
-0.0958016962,
0.099909246,
0.0181387737,
0.1590435207,
0.0995518565,
0.0560124367,
0.2626481652,
0.2037766725,
-0.1440711468,
-0.2874127626,
-0.0467576943,
-0.15676108,
-0.1744732261,
0.3424733877,
0.0209650211,
0.4984280169,
0.0877821296,
-0.1772675365,
0.0851961821,
-0.1482087672,
-0.1240125746,
0.0419481732,
0.3618210554,
0.1723602712,
-0.2316878438,
0.1341061294,
0.2210865021,
-0.1648886502,
-0.0792284086,
-0.3258474469,
-0.0771098435,
-0.0448645875,
-0.1508930027,
0.2584304214,
-0.5565133691,
0.3257263303,
0.2164273858,
-0.0575946569,
-0.505226016,
0.0662637353,
0.1426428556,
-0.2543683648,
0.1114750803,
0.0145562068,
0.0953841135,
-0.0699028224,
-0.268869251,
-0.0334522724,
0.1893268079,
-0.2687194943,
-0.3343837559,
-0.1201074943,
0.2900274396,
0.0964326784,
0.0909279287,
-0.0038088188,
-0.006024437,
0.1928692907,
0.1217826605,
0.0052763037,
-0.0563435666,
-0.0965556949,
-0.247722283,
0.2557835877,
0.5845031142,
-0.034692619,
-0.1073499769,
-0.1453457326,
-0.0471225753,
0.0978607461,
0.325771302,
-0.2567551732,
0.447272718,
-0.3528085947,
0.2633312345,
0.6881004572,
-0.244620651,
-0.380499661,
0.0933755934,
-0.2463257611,
-0.1834533364,
0.0795576274,
0.0523538701,
0.1828669161,
0.1490886807,
0.114357613,
-0.044278428,
0.1039805859,
-0.0017022714,
-0.3555274904,
-0.4046012759,
0.1209371835,
-0.0609734356,
0.157406196,
-0.1855023801,
0.2923001945,
-0.0762469172,
0.1631138623,
-0.1323104352,
-0.1166698709,
0.0497564673,
0.1757785678,
0.0060179643,
0.0691933036,
-0.0537211262,
-0.4638301134,
0.3711786568,
-0.3174015284,
-0.2441735864,
-0.2198591679,
-0.2543004751,
-0.4006930292,
0.1687959135,
-0.5710158944,
-0.0822553262,
0.2377774864,
-0.014065858,
0.1930302978,
0.0721660107,
-0.1365030855,
0.1315037459,
0.0369372293,
0.0550390482,
-0.2035370767,
0.2733278573,
-0.4755395651,
-0.0901230872,
0.1020119488,
0.2486848533,
0.3709593117,
-0.0731650442,
-0.1867815256,
0.3989816606,
-0.1945805997,
0.0200652815,
0.0209247004,
-0.1216244251,
0.0585951209,
-0.3596252203,
0.1598381549,
0.2624948323,
0.1872989982,
-0.2088919282,
-0.0540270172,
0.3151096702,
-0.0689158589,
0.1212316006,
-0.0756697878,
-0.0245239064,
0.1108408198,
-0.1342619061,
0.2704893053,
-0.1226506159,
0.2525312603,
-0.3048865199,
0.2955523729,
0.1302851886,
-0.1617016047,
0.1204010919,
0.2963655293,
-0.0164509453,
0.1959623992,
-0.0138482489,
0.017793525,
-0.1833082289,
-0.2783831954,
0.2625534534,
0.2929568887,
0.1389881223,
-0.0898684114,
0.2467439324,
0.0580504909,
-0.1775529981,
0.3787803948,
-0.1610396802,
-0.1312911212,
0.371098876,
0.0966158509,
-0.0010817423,
-0.3934864402,
-0.0888891295,
0.1221458465,
0.1192339659,
-0.1838065386,
-0.0478311181,
-0.1479789615,
-0.0141879842,
-0.4854326844,
0.5594310164,
-0.1174692661,
-0.2091076374,
0.2476031035,
0.1138995886,
0.147559166,
0.1345303953,
-0.2055600286,
0.1488525867,
0.0309205055,
0.0777809694,
-0.2433759272,
-0.1421606541,
-0.0806781948,
0.043435771,
0.372238785,
-0.0059758388,
0.5033734441,
-0.1726590693,
0.111056231,
-0.2709145248,
-0.3622725606,
-0.0112482477,
0.0630451888,
0.1775151044,
0.1069367379,
0.0299362633,
-0.0499962494,
-0.4720451236,
0.2490348816,
-0.3231656253,
-0.4180160761,
-0.047934588,
0.0075525902,
-0.0420717001,
-0.208527863,
-0.5222277045,
-0.2750417292,
-0.257362783,
0.2600232363,
-0.0206882991,
0.0890496969,
0.2367381305,
-0.0245255083,
0.0394693688,
-0.0720374435,
0.1314703524,
-0.3177735507,
0.0144971684,
0.086697787,
-0.0611511692,
-0.3245946169,
-0.0370558351,
-0.1435471177,
0.2085479498,
-0.1518796384,
-0.4038960636,
0.2215217948,
-0.269988507,
0.4851068556,
-0.1768900752,
0.3683382571,
0.2399503291,
0.2866686285,
-0.1356308609,
-0.1880395412,
-0.0889881551,
0.0879557356,
-0.2125378251,
0.0945472568,
0.0932354331,
0.2151426226,
-0.3133166134,
0.8754816055,
0.5419552326,
0.010315544,
0.1690272391,
-0.2494798452,
0.3023969531,
-0.2638947368,
-0.4015094042,
-0.1732810885,
0.0919195637,
0.1000396758,
0.1628784984,
-0.0817173868,
-0.1143440604,
0.129156962,
-0.1651423872,
-0.644528985,
-0.3470391035,
0.0457326397,
-0.0895171762,
0.0543886833,
0.0552175269,
0.0347840339,
-0.0177382492,
-0.0084581822,
0.0148497522,
0.1984947622,
-0.0989723951,
0.0816222131,
-0.1183472425,
-0.0773094669,
-0.4334522784,
0.1488147974,
-0.1107251495,
0.2057377994,
0.0669468492,
0.1918520033,
0.3870506287,
-0.2534909248,
0.5979359746,
-0.0948835835,
0.1620703936,
0.1102633178,
0.1533285975,
-0.0196095929,
-0.094264932,
0.0241727158,
0.3204047084,
0.1508574039,
0.0656294525,
-0.2999213636,
0.0080906786,
-0.0079523446,
0.2704362273,
-0.3470425606,
-0.3830893338,
-0.1817531288,
-0.3612961173,
-0.567955792,
-0.0388950147,
-0.0180032142,
0.290886879,
-0.0397790708,
-0.0919552594,
-0.2838909924,
-0.2085042745,
-0.0233909376,
0.2433042228,
0.2719500363,
0.130328387,
0.5048883557,
0.375433743,
-0.1317442358,
-0.1215369031,
0.6549915671,
0.0130133964,
0.0737066865,
-0.3199548125,
-0.2183618546,
-0.1777396202,
0.2366464138,
-0.2096503377,
0.2116485089,
0.0596794412,
0.0354302712,
0.0525260828,
-0.1354887635,
0.2041813433,
-0.152179122,
-0.1811763197,
-0.3168832362,
0.3276800215,
-0.0797861069,
-0.2935817242,
0.3204474151,
0.18301934,
-0.1361525059,
0.3454621434,
-0.2941661179,
0.8646492958,
-0.36229527,
-0.0112603232,
-0.0950298607,
-0.361468792,
0.2783359885,
-0.0859618336,
0.0235064104,
-0.4701198041,
0.0890575722,
0.1547516435,
-0.0065728128,
-0.0736727118,
-0.0190723818,
-0.3405537009,
0.1603786349,
-0.0125333592,
0.0628310516,
-0.186136052,
0.3396658897,
0.0210425947,
0.2069727927,
-0.0783227235,
0.1233536825,
0.1063622087,
0.2603189647,
-0.0611042455,
-0.0262381528,
0.2197209299,
-0.6053753495,
-0.2562443018,
0.141590029,
-0.4317051768,
0.5209036469,
-0.0354222953,
-0.1900561005,
0.1860742122,
0.1064291894,
0.2052592784,
0.2176427245,
-0.0729292333,
0.1493115872,
0.2258954942,
0.0472840853,
-0.2381491214,
0.0004402399,
-0.1366214156,
-0.0497530773,
-0.3872919083,
-0.0726490468,
-0.0593211614,
-0.4390926361,
-0.0948911533,
0.3235536218,
-0.1323817819,
-0.0263050795,
0.150913924,
0.0208660979,
-0.1581372172,
-0.328189522,
0.1640161276,
0.1439602971,
-0.0019017011,
0.1028023511,
-0.0573717095,
-0.1600800008,
0.0399426483,
0.2016284615,
0.3525448442,
-0.0204144716,
0.5597217679,
-0.2238451838,
-0.022203438,
-0.2568180859,
0.0505395979,
0.0784839392,
-0.6631223559,
0.1979608685,
-0.2169672549,
0.1372676939,
0.0952704549,
0.5443472862,
0.2849122584,
0.2319774628,
0.089134261,
-0.2373344153,
-0.1445603371,
-0.1138237417,
0.0212966762,
0.2813126743,
0.0177842453,
0.1847893298,
-0.0796055347,
0.2442846298,
-0.3585906923,
0.2909461856,
-0.1517929286,
0.1126167327,
0.0235840231,
-0.1157477796,
-0.0475161299,
0.0386177897,
0.204290092,
0.1302142143,
-0.1892316341,
-0.2583056688,
-0.1250486821,
0.1193684936,
0.0197285637,
0.1022295952,
-0.1927413195,
-0.1939717084,
0.2376620471,
-0.0976803452,
0.2315526307,
-0.1262791306,
0.121645838,
0.0351066217,
0.1617295444,
0.1328460127,
-0.3004212976,
0.1358694583,
-0.2406536043,
0.3165050149,
-0.0506896377,
0.1333662719,
-0.0060610399,
-0.045996055,
-0.1634324193,
0.0433416516,
-0.1613443047,
0.1562698334,
0.1328203678,
-0.2350573391,
-0.2607907951,
0.4305788279,
0.0915815309,
0.5241199732,
-0.3124519587,
0.0793467611,
0.007780306,
0.2575986087,
-0.356453836,
-0.1353178024,
0.1281307042,
-0.0129004885,
0.2492408752,
0.3392430544,
0.2372635305,
-0.2636077106,
-0.1254517138,
0.0786133558,
0.2940695286,
-0.1136121303,
0.3886996806,
0.3554520011,
0.2433122098,
-0.2754882872,
0.2628872097,
-0.054276228,
0.0325673521,
0.561367929,
-0.5922802091,
0.2081760317,
-0.0940596908,
0.2554305196,
0.2358901799,
-0.0976407528,
0.4575893879,
0.0953566805,
-0.0775237232,
0.0187963732,
-0.0119832084,
0.0684343874,
-0.2077810764,
-0.0152341276,
-0.1346883178,
0.0715187937,
-0.1995580494,
-0.1121548265,
-0.0987805948,
-0.2226356119,
-0.235494256,
0.1105639711,
0.0322936997,
0.0883143246,
0.1989619732,
0.0262333918,
-0.3541197181,
-0.3746518493,
0.1173276454,
0.2755418718,
0.4009860754,
-0.3965550959,
0.260845989,
0.4996072054,
-0.1016848981,
0.1175333261,
0.5371186733,
0.6057385802,
0.2470072508,
-0.1342762411,
0.2150327861,
0.0629092008,
-0.1497747749,
-0.1834000945,
0.1092465967,
-0.1083953157,
0.1856259406,
0.1824517548,
0.1080616117,
-0.1529094279,
-0.1572520435,
0.2447271198,
0.0984146893,
-0.1011580825,
0.1219461709,
-0.1924873292,
-0.135200128,
-0.0399502404,
0.2947037816,
-0.3455329835,
0.0732991844,
0.2401661426,
0.2233256251,
0.1486765742,
-0.2627128661,
0.1377590001,
0.088755846,
0.3642178774,
0.1823175848,
0.0794753432,
-0.2567429543,
-0.066251047,
-0.722730279,
0.1154727489,
-0.4371536672,
-0.0587759614,
0.169063434,
0.3498440981,
-0.3532670736,
0.045092687,
0.3578532338,
0.1252623796,
0.113629818,
0.2033281028,
-0.2470277697,
-0.0464198887,
0.4598299861,
-0.2959708273,
0.1475210935,
-0.4268780649,
0.319393903,
-0.3618766665,
0.0644193217,
-0.1150153428,
0.0719147176,
0.0668064207,
-0.3483562469,
0.3682031929,
0.1753945798,
0.3102428317,
-0.074249275,
-0.1854368448,
-0.2399973273,
-0.1463768929,
-0.2306626737,
0.1734176725,
0.5155044794,
0.1801415831,
0.0183063298,
-0.3433957398,
-0.2121745646,
0.1965492666,
0.0684011281,
-0.0055207945,
-0.0196542256,
0.0597813725,
-0.1644995213,
0.147326082,
0.0969857723,
0.2417078614,
-0.0878681242,
0.1769557297,
-0.2219191194,
-0.6492442489,
0.3964174986,
-0.2278425395,
-0.1365830898,
-0.1280934215,
0.3268312216,
0.2046230882,
0.1002065018,
-0.6723279357,
0.2960057557,
0.5039243698,
-0.1620290577,
-0.0190109313,
0.1430851817,
-0.1236352921,
0.0088827237,
0.010875158,
-0.0222049505,
0.0805402547,
-0.2500540316,
0.2628281116,
-0.3124882579
] |
https://github.com/huggingface/datasets/issues/2549 | Handling unlabeled datasets | Hi @nelson-liu,
You can pass the parameter `features` to `load_dataset`: https://huggingface.co/docs/datasets/_modules/datasets/load.html#load_dataset
If you look at the code of the MNLI script you referred in your question (https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py#L62-L77), you can see how the Features were originally specified.
Feel free to use it as a template, customize it and pass it to `load_dataset` using the parameter `features`. | Hi!
Is there a way for datasets to produce unlabeled instances (e.g., the `ClassLabel` can be nullable).
For example, I want to use the MNLI dataset reader ( https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py ) on a file that doesn't have the `gold_label` field. I tried setting `"label": data.get("gold_label")`, but got the following error:
```
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/load.py", line 748, in load_dataset
use_auth_token=use_auth_token,
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 989, in _prepare_split
example = self.info.features.encode_example(record)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 953, in encode_example
return encode_nested_example(self, example)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in encode_nested_example
k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in <dictcomp>
k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 875, in encode_nested_example
return schema.encode_example(obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 653, in encode_example
if not -1 <= example_data < self.num_classes:
TypeError: '<=' not supported between instances of 'int' and 'NoneType'
```
What's the proper way to handle reading unlabeled datasets, especially for downstream usage with Transformers? | 55 | Handling unlabeled datasets
Hi!
Is there a way for datasets to produce unlabeled instances (e.g., the `ClassLabel` can be nullable).
For example, I want to use the MNLI dataset reader ( https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py ) on a file that doesn't have the `gold_label` field. I tried setting `"label": data.get("gold_label")`, but got the following error:
```
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/load.py", line 748, in load_dataset
use_auth_token=use_auth_token,
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 989, in _prepare_split
example = self.info.features.encode_example(record)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 953, in encode_example
return encode_nested_example(self, example)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in encode_nested_example
k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in <dictcomp>
k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 875, in encode_nested_example
return schema.encode_example(obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 653, in encode_example
if not -1 <= example_data < self.num_classes:
TypeError: '<=' not supported between instances of 'int' and 'NoneType'
```
What's the proper way to handle reading unlabeled datasets, especially for downstream usage with Transformers?
Hi @nelson-liu,
You can pass the parameter `features` to `load_dataset`: https://huggingface.co/docs/datasets/_modules/datasets/load.html#load_dataset
If you look at the code of the MNLI script you referred in your question (https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py#L62-L77), you can see how the Features were originally specified.
Feel free to use it as a template, customize it and pass it to `load_dataset` using the parameter `features`. | [
0.0588129014,
0.0781009495,
0.1316253245,
0.3273363113,
0.250351429,
0.1380115598,
0.7898845077,
-0.1512293369,
0.0572318807,
0.1499076188,
-0.2000780404,
0.5356729627,
-0.2677469254,
0.2440222502,
-0.1644505858,
0.4176734686,
-0.1134415716,
0.2267286181,
0.2766291499,
-0.2599212229,
-0.3965281844,
-0.1135898232,
-0.3251734972,
-0.0457840599,
-0.4231286049,
-0.2310273349,
0.1210811883,
-0.0139457732,
-0.197075218,
-0.4348156154,
0.2606197596,
0.2651961148,
0.0579358712,
0.2684319615,
-0.000120314,
0.005063951,
-0.048615858,
-0.1119300872,
-0.4111919999,
-0.1604848653,
-0.1799220145,
-0.1166343093,
-0.0756472722,
-0.3255846202,
-0.1712770015,
-0.2064839005,
-0.0073193619,
-0.5275917053,
-0.2369641364,
0.1300069392,
0.0282529332,
0.12987867,
-0.2276053727,
0.18042472,
0.0662299395,
0.1123865396,
-0.0983035788,
0.0424691625,
-0.0031263828,
0.1706983745,
0.176170826,
0.4569055736,
-0.1983843446,
0.0251811258,
0.2305650264,
0.1658897847,
-0.2503346205,
-0.1352572441,
0.0453837626,
0.5727472305,
0.489533484,
-0.5312578082,
-0.8156597018,
-0.5682113171,
0.5466715693,
-0.4145794511,
0.0094723608,
0.1875491142,
0.0612981766,
0.2065875232,
-0.2948109806,
-0.0639902577,
-0.153510794,
-0.1351514608,
-0.2159393728,
0.4090185761,
0.0057899915,
0.0830676481,
0.0186885968,
-0.1346998215,
0.1350486279,
-0.1382624656,
-0.0474889614,
0.4597662687,
-0.1665139794,
-0.3662477434,
-0.1840957105,
0.0842083544,
0.237144798,
0.1862980723,
0.214230895,
-0.1185083389,
-0.3950502872,
0.2288525403,
0.4656938314,
-0.1114892215,
0.2576126158,
0.2515031099,
0.4025674462,
-0.1563064158,
-0.1025377363,
-0.0510966033,
-0.3554551601,
0.1981924176,
0.3089802563,
0.0072207786,
0.0130516663,
-0.2379136235,
-0.3461010754,
0.0540752113,
-0.2671499848,
0.1201149151,
0.0662337393,
0.1098263711,
0.1551243961,
0.1306738257,
0.0043764859,
0.0855145454,
-0.097548157,
-0.5176506639,
0.0880838856,
-0.0377780572,
0.0948993117,
0.019528877,
0.1188476235,
0.1252908111,
0.2857356966,
-0.0127969719,
0.007733101,
-0.0752633959,
0.1977366656,
-0.1479912698,
0.1000808403,
0.1078643277,
0.1397910267,
0.2605170012,
-0.0957131088,
-0.5286994576,
-0.0942174718,
0.20753178,
-0.0390458591,
0.0118885338,
-0.1286030114,
0.0225012377,
-0.4288029075,
-0.2167244554,
-0.0375318862,
0.0427327827,
-0.0249348767,
-0.0478492863,
0.1455183774,
-0.2070305645,
0.1521821618,
-0.1765886396,
0.17796278,
0.393835783,
-0.5988762379,
-0.3255691826,
-0.0107925832,
-0.0681711063,
-0.2921357453,
-0.0235868935,
-0.0219931155,
0.1814172268,
-0.1385185719,
-0.0577693582,
0.1128368452,
-0.4254539609,
-0.2444218546,
0.0326567851,
0.0170042664,
0.0275672004,
0.1215593964,
0.4517726898,
-0.1504070163,
0.0214289203,
-0.0560306422,
0.0455522276,
-0.0517207533,
-0.3628421724,
-0.0019084588,
-0.1636174768,
0.0268485248,
0.1302968115,
0.0897683203,
0.2137247622,
0.0989583433,
0.2463673949,
0.0110981753,
-0.385405153,
0.174238354,
0.361204505,
0.3009291887,
0.0771797299,
0.082664825,
-0.2592613697,
-0.5924975872,
0.3575682342,
-0.3484352231,
0.154369086,
0.0791183487,
-0.5093026161,
0.1660780311,
-0.1975694001,
-0.2076834738,
-0.0491876006,
-0.0308531411,
-0.0516691618,
-0.0010146275,
-0.0134301111,
-0.4805209637,
-0.223959133,
-0.0684632957,
0.1867067516,
-0.2691113055,
-0.1177118272,
0.4422514141,
-0.0155847445,
-0.2933370769,
0.3634035587,
0.0749584734,
-0.0475975201,
0.2478734851,
0.1806419939,
0.0792776048,
-0.0156232379,
0.1070776135,
0.2868718505,
0.0241858903,
0.1035675108,
-0.101862289,
0.0068806633,
0.0740688145,
-0.0478817038,
-0.3704846501,
0.7585386634,
-0.0143596437,
0.2423820943,
0.0692149624,
-0.03607364,
0.2637819052,
-0.1088460982,
0.0059201494,
-0.3193674684,
-0.151145786,
-0.09762308,
0.2514326572,
0.2600204945,
-0.4639050961,
0.0723712221,
0.1971778274,
-0.0341644771,
0.193220377,
-0.2416766435,
-0.4811051488,
0.423358798,
0.0534695014,
0.2950209081,
0.2030081004,
0.2268398255,
0.1559763551,
0.0888147876,
0.1586724818,
-0.0207644925,
0.2215024233,
0.0650206879,
0.1606154293,
0.2593624592,
-0.0705104917,
-0.2032635361,
0.0245895386,
-0.0898441151,
0.1240273267,
0.130662024,
-0.3001923859,
0.0432796925,
-0.4224675894,
-0.2937406003,
-0.2737027407,
0.1452573538,
-0.3171308041,
0.0007476248,
0.1456412971,
0.1495459378,
-0.0781782642,
0.0361939222,
-0.2981950939,
0.297169745,
-0.1557239741,
-0.2295412272,
0.1275842935,
-0.1776759475,
-0.1574129462,
0.010998968,
0.0959334522,
-0.223883912,
0.2040945441,
0.1271136254,
-0.1750091612,
-0.0877171904,
-0.0940774754,
0.1397818327,
0.1698423624,
0.4188263714,
0.3386101127,
-0.235150665,
-0.0136966333,
0.4573941231,
0.1609256566,
0.1649490297,
0.0267144516,
-0.2706840932,
-0.065153867,
0.4000677764,
-0.1524949074,
-0.2732073367,
-0.0821762532,
-0.1039796174,
0.1600449681,
0.1093071923,
0.1493680477,
0.1068681329,
-0.3497601151,
0.1359652281,
0.0897209793,
-0.2319133878,
0.2457120717,
-0.387440145,
0.4512012601,
-0.1277276874,
0.0841625035,
0.2434750497,
-0.1037123576,
0.1409980953,
0.111242272,
-0.1557965726,
0.0534104928,
0.4583174288,
-0.2154122889,
0.1566192657,
-0.0838332772,
0.0185860749,
0.2560111284,
0.1351923347,
-0.2604408264,
0.088198632,
0.1130201742,
-0.3000994921,
0.016252663,
0.232488364,
-0.2371094972,
0.3170671463,
0.2986522615,
0.2956097424,
-0.058411777,
0.0348767675,
-0.1211847067,
0.3143196702,
0.3201854825,
0.0934146047,
-0.1946061999,
0.2961839437,
-0.1129746884,
0.3518058658,
0.1224237755,
0.1934313178,
-0.0892663151,
0.2257012129,
-0.3296516538,
-0.1333011687,
-0.1614064872,
-0.0904647037,
0.0884625763,
-0.0092329755,
0.1853937954,
-0.1236326993,
-0.1474443972,
-0.0547950789,
-0.0228389166,
0.3190747797,
0.0961966664,
-0.5007609129,
-0.3644490242,
0.0005036257,
0.1805497259,
0.0882218033,
0.1723240465,
0.1141864508,
0.1356214732,
0.2444731593,
0.2311144173,
0.3968505263,
-0.8019368052,
0.0440772586,
0.3882575929,
0.0623445362,
-0.129864797,
0.1688719541,
-0.3431435227,
0.0576101355,
-0.0860665515,
0.3440915048,
-0.2848514915,
-0.0774757043,
0.2539089918,
0.110614568,
-0.3914369941,
-0.2414443195,
-0.0032641068,
-0.0086059868,
-0.0926105827,
-0.0796569884,
-0.1077553034,
0.22462897,
-0.214397788,
-0.0325560942,
-0.4636361003,
0.38664487,
0.3230821788,
0.0573855937,
0.0829208344,
-0.0989323631,
0.2488311231,
0.4137302041,
0.2953957021,
0.5238576531,
0.5176036358,
-0.1507749557,
-0.3284546435,
-0.2257455885,
-0.0502107479,
0.4424328804,
-0.0907631218,
0.1496495605,
0.2319214344,
0.1023854315,
-0.1536358893,
-0.0959238186,
-0.1006707996,
0.043470636,
-0.0950621814,
-0.435095638,
-0.5098012686,
0.3801498711,
0.1362254471,
-0.0567054003,
0.2898113132,
0.2649097741,
-0.426186651,
0.0274885893,
0.3192897737,
0.7659414411,
-0.1236862242,
0.0004805506,
-0.2136629671,
0.0164643303,
0.8572257161,
-0.1948136389,
0.1371893585,
-0.527118206,
0.1272503138,
-0.0830029547,
0.0584128499,
0.2789561152,
0.690321207,
0.3886293173,
0.3688077331,
-0.1227857992,
0.1099550352,
-0.0724984482,
-0.0127378702,
-0.0276429858,
-0.2911460102,
-0.0317769088,
-0.054518085,
0.028933838,
0.0718031377,
-0.1977014393,
-0.0207403619,
0.038690187,
0.1972530484,
0.1341837049,
-0.1853780448,
-0.2127625197,
-0.2364002764,
-0.0999080464,
-0.2412444651,
0.0070268735,
0.5078387856,
0.4107723534,
0.2300403714,
-0.1023252308,
0.1562464237,
-0.0384853818,
0.2010703683,
0.0804535449,
0.1842308342,
0.4358699918,
0.195438996,
-0.2531308234,
-0.0107194223,
0.0484080538,
0.1301896274,
0.2571739554,
-0.1982816607,
0.2211610824,
-0.0484378003,
0.1967830211,
-0.2618724704,
0.2173195332,
-0.1928609461,
0.0032553035,
0.153971985,
-0.2409615815,
0.0861350447,
-0.2422809899,
-0.2054117918,
-0.1147633791,
0.3811562955,
0.2263904214,
0.0708864182,
0.2734777629,
-0.066419214,
-0.0972516611,
-0.1872229576,
0.4704649448,
0.2158828974,
-0.2648009062,
0.364474088,
0.5038284063,
0.1376712322,
-0.028563628,
-0.0027728658,
-0.1975709498,
0.0543684103,
-0.2784398496,
-0.2706347108,
-0.1602124274,
0.0887567103,
-0.0236793943,
0.1900788844,
0.185568437,
-0.0134278722,
-0.1325757354,
-0.2978616357,
-0.1617359668,
-0.0599073321,
-0.4192727804,
0.0981313661,
0.2057623714,
0.6343887448,
-0.0262718368,
0.0019221939,
0.0125626102,
-0.0380645543,
0.2053105682,
-0.0335738957,
-0.336045146,
0.2107452899,
0.2821723223,
0.1085625142,
0.3158657551,
-0.2067908198,
-0.1548735797,
-0.3689012229,
0.2481535226,
0.2495820522,
0.1385822445,
0.4728964865,
-0.1120224595,
0.2298373878,
-0.649451375,
0.1717784107,
0.140832141,
-0.0035498291,
0.1042633951,
0.2618665695,
0.2079252303,
0.1574041545,
0.0363413505,
-0.0172385164,
0.0367368199,
-0.1150878146,
0.2508651614,
-0.4141448736,
0.2339372337,
0.3280201554,
0.3937593997,
-0.0550213344,
-0.1032537073,
0.0485830382,
0.5089657903,
0.0508138761,
-0.3674022555,
-0.1784175038,
0.2600317597,
-0.1713801026,
0.2319702655,
0.5777539611,
0.2352403998,
0.1841717809,
-0.2669290304,
-0.2425088584,
0.1080285758,
-0.1819590032,
0.2189180553,
0.5804854631,
0.0595465526,
0.0142010897,
0.153759554,
0.2075564265,
0.3028895855,
0.6620522738,
0.0744499415,
0.5605962873,
0.1112168804,
-0.2377564609,
0.0142708458,
-0.4676464796,
0.1025346667,
0.0133353248,
0.1929288656,
0.2917953432,
-0.2008612007,
0.0400886759,
-0.5066407919,
-0.1107308418,
0.0842198282,
0.0371949263,
-0.2296023518,
-0.1390461922,
-0.4124973118,
-0.1178520322,
0.1028666943,
0.0536000133,
-0.0389870331,
-0.3978669047,
-0.2143852562,
-0.1525273472,
0.0840244293,
-0.4460496902,
0.1257649958,
0.2423608452,
0.338894099,
-0.2475621849,
-0.1468480229,
0.0446666442,
0.161361143,
0.3350239396,
0.3214457929,
-0.1634106785,
0.0659051836,
0.0908107609,
-0.0273042843,
-0.3406306505,
0.0065461472,
-0.0965167433,
0.0053175427,
-0.2625387907,
-0.0256569106,
0.2166795582,
-0.0608713999,
-0.0266125277,
-0.2695067525,
0.3386760056,
0.050965175,
-0.3194708228,
0.3265931904,
-0.0815226734,
-0.3562276959,
-0.1618673652,
-0.0343674012,
-0.0326834023,
-0.1692187041,
0.2405826896,
0.1130358428,
0.0635594279,
0.1748881042,
0.0292497948,
-0.0438843146,
0.1595610976,
-0.0691293627,
-0.1020603031,
-0.0972218513,
0.1864405572,
-0.7694786787,
0.0722596124,
-0.0406233333,
-0.2358603179,
-0.0514596179,
0.0480815545,
-0.0759261996,
-0.1725052893,
0.0312293805,
0.1307892054,
0.3904403448,
0.4553701878,
-0.1930676848,
-0.4410224259,
-0.229839623,
-0.1280014664,
-0.1229814515,
-0.4427226782,
-0.1242488474,
-0.1068348587,
-0.2093497813,
0.1240682527,
0.2093602866,
0.1191808432,
-0.0332777686,
0.3878779709,
0.0790838972,
0.4218622744,
0.1751773059,
0.0334287137,
-0.0418241769,
0.1080197617,
-0.3931536078,
0.1997749358,
0.0557201765,
0.1888759881,
-0.3027554154,
-0.1966563016,
-0.197038278,
-0.0015007779,
-0.1153636277,
0.1205091029,
-0.4037127197,
0.1716374755,
-0.538505733,
0.2350150943,
0.2344379276,
0.0084133409,
-0.0264047869,
0.056474179,
-0.3050247133,
-0.1013593003,
0.3029189706,
-0.44553262,
-0.0240370259,
-0.1198958233,
0.4738292098,
0.3564071059,
-0.2060014158,
-0.5122570992,
0.1980583072,
0.6573615074,
0.071935609,
0.0762585551,
-0.1705795079,
-0.3097851574,
-0.0885076299,
-0.1510896534,
-0.2408011705,
0.024432227,
0.0103714615,
0.2113198936,
-0.1359471232
] |
https://github.com/huggingface/datasets/issues/2548 | Field order issue in loading json | Hi @luyug, thanks for reporting.
The good news is that we fixed this issue only 9 days ago: #2507.
The patch is already in the master branch of our repository and it will be included in our next `datasets` release version 1.9.0.
Feel free to reopen the issue if the problem persists. | ## Describe the bug
The `load_dataset` function expects columns in alphabetical order when loading json files.
Similar bug was previously reported for csv in #623 and fixed in #684.
## Steps to reproduce the bug
For a json file `j.json`,
```
{"c":321, "a": 1, "b": 2}
```
Running the following,
```
f= datasets.Features({'a': Value('int32'), 'b': Value('int32'), 'c': Value('int32')})
json_data = datasets.load_dataset('json', data_files='j.json', features=f)
```
## Expected results
A successful load.
## Actual results
```
File "pyarrow/table.pxi", line 1409, in pyarrow.lib.Table.cast
ValueError: Target schema's field names are not matching the table's field names: ['c', 'a', 'b'], ['a', 'b', 'c']
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyArrow version: 3.0.0
| 52 | Field order issue in loading json
## Describe the bug
The `load_dataset` function expects columns in alphabetical order when loading json files.
Similar bug was previously reported for csv in #623 and fixed in #684.
## Steps to reproduce the bug
For a json file `j.json`,
```
{"c":321, "a": 1, "b": 2}
```
Running the following,
```
f= datasets.Features({'a': Value('int32'), 'b': Value('int32'), 'c': Value('int32')})
json_data = datasets.load_dataset('json', data_files='j.json', features=f)
```
## Expected results
A successful load.
## Actual results
```
File "pyarrow/table.pxi", line 1409, in pyarrow.lib.Table.cast
ValueError: Target schema's field names are not matching the table's field names: ['c', 'a', 'b'], ['a', 'b', 'c']
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyArrow version: 3.0.0
Hi @luyug, thanks for reporting.
The good news is that we fixed this issue only 9 days ago: #2507.
The patch is already in the master branch of our repository and it will be included in our next `datasets` release version 1.9.0.
Feel free to reopen the issue if the problem persists. | [
0.1825091541,
0.2316934764,
-0.0159275457,
0.2105988562,
0.3290201426,
-0.0630035847,
0.2235180885,
0.428853631,
0.0090346262,
0.0226682089,
0.0754537508,
0.6574710608,
0.3253486156,
-0.0124662295,
-0.0245096721,
-0.1077708825,
-0.0028559007,
0.240413934,
-0.0928328186,
0.0957932919,
-0.3594990373,
0.0710980892,
-0.1695305705,
0.184368819,
0.1127446741,
0.2050049752,
0.1421492845,
0.168893218,
-0.1974492669,
-0.4280342162,
-0.116316177,
0.1603665501,
0.0409126207,
0.1538210511,
-0.0001129423,
-0.0930029303,
0.2057092041,
0.0440963954,
-0.161720112,
-0.4524682164,
-0.187180683,
-0.2486563027,
0.1546480805,
-0.2271186709,
-0.0396731049,
-0.2239814103,
-0.0603114218,
0.0555176437,
0.1781317145,
0.0954674631,
0.1913652569,
0.1215382814,
0.1931034327,
0.1893147677,
0.5152664781,
-0.0020204857,
-0.1111090109,
0.2756313682,
0.184699893,
-0.0094246268,
-0.0758254975,
0.0324883088,
-0.1814016104,
0.0318688042,
0.1560174376,
0.148338303,
-0.04252721,
0.0874132663,
-0.0994678363,
0.0486952439,
0.5981539488,
-0.4596161246,
-0.2934255004,
-0.2007398903,
0.1998677105,
-0.2957477868,
0.5075793862,
0.1562163234,
0.2286591977,
0.0513667278,
0.0142117105,
0.2856672406,
-0.1850441396,
0.1023254097,
-0.1568433493,
0.1329456121,
0.0515414774,
-0.0219508,
-0.1376309097,
-0.2529476881,
0.3639651239,
-0.227331683,
-0.1900891364,
0.1349723935,
-0.3493432403,
0.0503968373,
0.1358200908,
-0.0709701926,
0.1523932815,
0.1112180278,
-0.0516665727,
0.0156823657,
0.022255823,
0.1730183661,
0.2025149763,
0.1798479557,
0.0475174896,
-0.0730149895,
0.1967940331,
0.0729971826,
-0.0629586577,
-0.0940547884,
-0.0123664588,
-0.1951015592,
-0.010318622,
0.0408961475,
0.0609145612,
-0.0840105191,
-0.2918558717,
0.0429290682,
-0.1245473996,
-0.1908008605,
-0.0035287626,
0.3132718801,
-0.0751942322,
0.0949023962,
0.0929290503,
0.2363104522,
0.0139913112,
-0.007100936,
-0.0657400265,
-0.1489697397,
-0.022936888,
0.1151484847,
0.2163840383,
0.1122140363,
0.13066414,
0.3509095311,
0.0715357661,
-0.0543667115,
-0.0478826165,
-0.1265523136,
-0.1324496567,
0.415749222,
0.0547995195,
0.1828191578,
-0.0814387351,
-0.1750667989,
-0.2666809559,
0.3741872311,
-0.4962203801,
-0.1093588322,
-0.0579979271,
0.2085764706,
-0.1713589132,
-0.1254499555,
-0.6543217897,
-0.1421355903,
0.0294261333,
-0.2914305329,
-0.067193985,
-0.1449345648,
0.1742370874,
-0.2461763322,
-0.1334020793,
0.0312422104,
-0.5555412769,
0.0891385674,
0.0902373791,
0.0520498157,
-0.0067548901,
-0.0432030782,
-0.1329811513,
0.1114548296,
-0.072855942,
0.4425644279,
0.0826909617,
-0.2095859051,
-0.3545517325,
0.1003124267,
-0.1832899451,
0.156461373,
0.0873681307,
0.0080047548,
0.1473622918,
0.0594873354,
0.0862397254,
0.3296460509,
0.1209140196,
0.38407287,
-0.1493304074,
-0.1144721657,
0.1772037596,
0.2748942375,
-0.3706638813,
0.0561121963,
0.1017419025,
-0.368366152,
0.1644266397,
-0.2329897135,
-0.297611475,
0.265100807,
0.1385197937,
0.1046691462,
0.2926071584,
0.0249062702,
-0.4560882449,
0.2608806491,
0.0239527002,
-0.0398318134,
-0.5410385728,
-0.1111303121,
-0.0221226104,
0.0373544469,
-0.2153448164,
0.4330093861,
0.1082403958,
0.0037270933,
-0.2064831108,
-0.0993740782,
-0.0000995919,
0.0159664061,
-0.1661822796,
0.0472489037,
-0.3866336048,
0.454411447,
-0.2604219019,
-0.1414029598,
0.1588271856,
0.0324662291,
0.2302992791,
-0.2600083053,
-0.145140931,
0.2956561446,
0.2853768766,
0.0675242245,
-0.2429708391,
0.0512438938,
-0.0149854142,
0.051747784,
-0.1420663446,
0.1324093789,
0.0144061334,
-0.0093701482,
-0.0859901235,
0.7995305061,
-0.0237492584,
0.2128822953,
0.003328532,
-0.3676091433,
0.3820777535,
0.0352012366,
0.0164428726,
-0.069415912,
0.3017966151,
0.564979732,
-0.1108656228,
0.257488817,
-0.3607688248,
0.1042413488,
0.9411554933,
-0.1253242642,
-0.105605334,
0.0731296465,
0.2090287805,
0.0162600428,
0.0963967517,
-0.1628758162,
0.3760442734,
0.1892888695,
-0.6180866957,
-0.0649495348,
0.0113623254,
-0.1525393873,
0.0734227598,
-0.0244074166,
0.2099509984,
0.3989826441,
0.4225431681,
0.0975215286,
-0.389383316,
-0.173316136,
0.1060145646,
0.0876101777,
-0.601772964,
0.0633966923,
-0.3623116016,
0.0237794742,
-0.1168356687,
-0.2730721235,
-0.202742517,
-0.0075552277,
0.0238273218,
0.265352875,
-0.1859910637,
0.2071102858,
0.1384095997,
0.0389130265,
0.0704560503,
-0.3349533081,
-0.5142766237,
-0.0779049397,
-0.1777462661,
0.0132323243,
0.1084139943,
0.0567988455,
0.0161677692,
-0.1116782874,
-0.0580409095,
0.0624618381,
-0.5082748532,
-0.0208231993,
-0.2801716924,
0.0598617941,
0.0490931906,
0.2172631919,
0.0719870627,
-0.3592017591,
0.2828601003,
0.1679742634,
-0.4280128181,
0.5928490758,
-0.1754601151,
-0.2120301276,
-0.1437626481,
-0.4086633027,
0.1344609708,
-0.183544755,
0.2575660348,
0.2847778797,
0.1752563715,
-0.1098787487,
-0.1036997586,
-0.3340309858,
-0.0910993516,
0.0293777362,
-0.0326460674,
-0.0653818697,
0.330537647,
-0.141441986,
-0.2782588601,
-0.0305187032,
-0.0579182953,
-0.3105295002,
0.0535402894,
-0.3014822006,
-0.0857229531,
-0.0933254659,
0.4113365412,
0.0618273243,
-0.171805501,
0.1675986052,
0.1254289597,
-0.0224112011,
-0.0237897858,
-0.085790813,
-0.0717321783,
0.3714417219,
0.1108716205,
-0.1400424987,
0.6356082559,
-0.0889730155,
0.289028585,
-0.2067594826,
0.0643243045,
0.2238405645,
-0.148294121,
-0.0879816115,
-0.2037140876,
0.1653650552,
-0.0510774516,
-0.0864716768,
0.2216323316,
0.2641668022,
-0.0263780244,
-0.05382194,
0.141845122,
0.2738386989,
-0.4508641362,
-0.0728435889,
0.1599714011,
-0.0060575576,
-0.0755461454,
0.1250871718,
0.0617546663,
-0.1885139942,
-0.2236436307,
0.0674151927,
-0.0334341787,
-0.1557302028,
-0.2595059574,
-0.3962621391,
-0.3487423062,
0.0122310407,
0.006135799,
0.1084260195,
0.1493602991,
0.2657661438,
0.1275406778,
0.2514954805,
-0.2238465548,
0.724719286,
0.1659285277,
0.2741282582,
0.1798033863,
0.2624097168,
-0.2966654897,
-0.1868922412,
-0.1661118269,
0.0253558122,
0.0108435154,
0.5456571579,
-0.4508352876,
-0.0624199361,
0.0905571282,
0.1579536796,
-0.1082995012,
-0.4663447738,
-0.4540722668,
-0.1535979807,
-0.0223282203,
-0.1013707072,
-0.1307666302,
0.2807711065,
-0.5067601204,
-0.1119934767,
0.2080164701,
-0.0572813898,
-0.1946270019,
0.2885277867,
0.2971037328,
-0.0922505409,
0.1950147748,
0.0013477318,
-0.0363154374,
0.2976647317,
0.4970467091,
0.1947046816,
-0.5289742947,
-0.116600655,
-0.2787715793,
-0.0588416383,
-0.0205579847,
-0.1162030995,
0.1930958182,
-0.2420474738,
-0.0785327405,
0.0164958239,
-0.3432072997,
0.6345766187,
-0.2099702805,
-0.1358882189,
-0.3663295507,
0.6602267027,
-0.1212867796,
-0.0563300103,
0.1938368827,
0.3561741412,
-0.3036476672,
0.4781929851,
0.0364379473,
0.681208849,
-0.1965673417,
0.0833839998,
0.6457625031,
-0.2965191007,
0.2771170437,
-0.5008103251,
0.2874607146,
-0.7126539946,
-0.2874291241,
-0.0656851009,
-0.1931162477,
0.0727455765,
0.5663926601,
0.0660877675,
0.0732793286,
-0.234520793,
0.2931252122,
0.0699238032,
0.1652543098,
0.0377012938,
-0.0289710723,
-0.5482337475,
0.0373547971,
-0.0810941905,
-0.2535057068,
-0.076695323,
0.0609587915,
-0.111784324,
-0.2436926067,
0.1308030784,
0.3869267702,
0.0226175226,
0.0508018285,
0.285556674,
0.0385331064,
0.0888002962,
0.2166151255,
-0.215896979,
-0.001329886,
0.0236452129,
0.2722306848,
0.3553790748,
0.2548779845,
0.0919458568,
0.1086065993,
0.0612000227,
-0.0214268938,
-0.1499883085,
-0.1036268771,
0.0034809411,
-0.2005114704,
-0.0909920633,
0.2189017385,
-0.1750910431,
-0.2435914576,
-0.1304229796,
-0.0996213108,
0.3487399817,
-0.139878884,
0.1851750612,
-0.151770696,
0.1083838046,
0.3658823669,
-0.3383456767,
-0.2280914634,
-0.0779543743,
0.4607668519,
0.0233237147,
0.2834366858,
0.449966073,
0.28910923,
-0.2189537734,
-0.0851857141,
-0.0400452465,
0.3467142582,
-0.5800536871,
-0.0313583463,
0.0554743186,
0.1587131768,
0.1733555645,
0.3075584471,
-0.0680433139,
-0.224625513,
0.0093907565,
-0.3348069787,
0.2595433891,
0.2816801369,
0.3085288405,
-0.2114733756,
0.3378100991,
0.225336954,
-0.2173422724,
-0.0767681748,
-0.2654394209,
0.0477249473,
-0.0196579471,
0.2062468231,
-0.0972460955,
0.1512369365,
0.093584761,
0.0041227676,
0.3094446957,
0.0137110688,
-0.0044118818,
-0.2657623887,
-0.0569330379,
0.0078866929,
0.083340019,
0.1785649955,
-0.25872913,
-0.4149526954,
-0.1024869531,
-0.0685175508,
0.0444544479,
0.1058641672,
0.099686861,
0.1753335595,
0.2332049608,
0.1407749504,
-0.0602738708,
0.1024985015,
-0.4341537654,
0.0901336819,
0.1616142988,
0.3027605116,
-0.3599029779,
0.2037090957,
-0.4562955201,
0.0721854866,
-0.1324936152,
0.2397702187,
0.5103180408,
-0.5786807537,
0.1536405683,
-0.0345996805,
0.4610269368,
0.3679776788,
-0.3090325594,
-0.3603271842,
-0.0108075216,
0.2446335405,
-0.2465852797,
-0.4968977869,
-0.0314645916,
0.0577025823,
-0.1892632246,
-0.1650170982,
0.1161845177,
0.0026957542,
0.0129013415,
-0.0198731385,
0.4421185851,
0.0950344652,
0.0347700864,
0.4580201507,
0.033754915,
0.1267142892,
0.3582773507,
0.2588683963,
-0.1064043939,
0.1960484982,
0.3231471777,
-0.1048640087,
-0.0939709842,
0.0039251018,
-0.1641117036,
-0.4030664861,
0.0611234158,
0.1473833621,
0.0829800814,
-0.0616881438,
0.4316123426,
0.0788904727,
0.1544597149,
-0.0432288088,
-0.2516340613,
-0.0408384167,
0.0137429591,
0.0829189718,
-0.1507075578,
-0.1326123774,
-0.0189150646,
-0.0031863153,
-0.36239326,
0.0942897275,
0.0717236251,
0.178676337,
-0.0735445172,
-0.6868670583,
0.4297245145,
-0.0577263162,
0.3208506703,
-0.0260377303,
0.3736403584,
-0.0392370969,
-0.1635451466,
0.2002718002,
-0.2996743321,
0.1698546112,
0.3468168676,
0.1554800868,
-0.3312589824,
-0.2791925371,
-0.1221404448,
0.0515564159,
0.2727754712,
-0.09425506,
0.1196741462,
0.1257960498,
0.2250459194,
-0.1804127693,
-0.0053909793,
0.4681789279,
0.1990911216,
0.0463553742,
0.177240029,
-0.1658030897,
-0.4063178599,
0.0908674598,
-0.2096222788,
-0.0249379501,
-0.1211011708,
0.0041881613,
0.3609235585,
-0.0596133173,
-0.1571270823,
0.1015830189,
0.1396051645,
0.2515594661,
0.1618891954,
-0.0134947877,
-0.2031969726,
-0.1123997197,
-0.3537179828,
0.2708966136,
-0.0409104563,
-0.0233565457,
0.516107738,
0.1403436959,
0.0534570329,
-0.1625390351,
0.0083470792,
0.0214833282,
-0.2109864354,
0.2904020846,
-0.2972911894,
-0.1069241315,
-0.058204554,
0.0654289797,
-0.4646750093,
-0.13394472,
0.1110643968,
0.0387887731,
0.0987860858,
-0.4376762211,
0.1262197942,
0.1070034802,
-0.03427976,
0.2831783295,
-0.1299280077,
0.3202367425,
-0.0308631472,
0.0992103145,
0.0209309813,
-0.339314878,
-0.1914260536,
0.3711224496,
0.0069419313,
0.2236996889,
0.2191454768,
0.0719180256,
-0.2390633672,
0.0160303637,
-0.3385499418,
-0.1205540895,
-0.2732463181,
0.1303788871,
-0.0079320669,
0.0492311865,
-0.3172141016,
-0.0412334539,
0.1546377242,
0.1962883174,
-0.0877082944,
-0.2779089808,
0.1896757483,
-0.1386563331,
-0.1206432432,
0.2642488778,
0.2381527722,
-0.2384244353,
0.0134235043,
-0.2246547639,
0.0950937122,
0.3887329698,
-0.0772807971,
-0.1293905228,
0.2517742515,
0.1122354269,
0.1122590899,
-0.1991974115,
0.1574221253,
0.1900289208,
-0.2249361575,
-0.1681824923,
-0.0726453736
] |
https://github.com/huggingface/datasets/issues/2547 | Dataset load_from_disk is too slow | Hi ! It looks like an issue with the virtual disk you are using.
We load datasets using memory mapping. In general it makes it possible to load very big files instantaneously since it doesn't have to read the file (it just assigns virtual memory to the file on disk).
However there happens to be issues with virtual disks (for example on spot instances), for which memory mapping does a pass over the entire file, and this takes a while. We are discussing about this issue here: #2252
Memory mapping is something handled by the OS so we can't do much about it, though we're still trying to figure out what's causing this behavior exactly to see what we can do. | @lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model. | 121 | Dataset load_from_disk is too slow
@lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model.
Hi ! It looks like an issue with the virtual disk you are using.
We load datasets using memory mapping. In general it makes it possible to load very big files instantaneously since it doesn't have to read the file (it just assigns virtual memory to the file on disk).
However there happens to be issues with virtual disks (for example on spot instances), for which memory mapping does a pass over the entire file, and this takes a while. We are discussing about this issue here: #2252
Memory mapping is something handled by the OS so we can't do much about it, though we're still trying to figure out what's causing this behavior exactly to see what we can do. | [
-0.4744633436,
-0.3652111888,
-0.091032058,
0.5078074336,
0.2949646711,
0.0777809322,
0.0872956514,
0.2941162288,
0.5636074543,
0.113716349,
0.1030271798,
0.3100515604,
-0.0364943482,
-0.1310187876,
-0.0510294586,
0.0120532373,
0.2169392109,
0.0340657681,
0.1016839743,
-0.1622142494,
-0.1679640561,
0.1942936927,
-0.1397534162,
-0.2468276322,
-0.2608515918,
-0.1675218493,
0.0360904932,
0.1326749325,
0.0141114295,
-0.2319368422,
0.082776092,
-0.023467239,
0.1747192889,
0.4756506979,
-0.0001066134,
-0.0308670476,
0.1014186144,
0.0678355619,
-0.3980646729,
-0.059161,
0.2369135767,
-0.2943415046,
0.0769656673,
-0.1994227022,
-0.0850723386,
-0.0845535398,
-0.104538843,
-0.4806060493,
0.3054250181,
0.0995370448,
0.2420825511,
0.2846263051,
-0.2973233759,
-0.0019263737,
-0.0428479277,
0.0577615649,
-0.2270343304,
0.2517680526,
0.478702575,
0.1249554157,
-0.1382649243,
0.3056687713,
-0.0878100768,
0.1649825722,
0.4531140924,
0.0637821853,
0.0809571072,
-0.2099034041,
-0.016360065,
0.1667418778,
0.4594857693,
0.00031662,
-0.2677716613,
-0.2758031785,
0.0870445222,
-0.2303050309,
0.3020724952,
0.2804104388,
-0.173268497,
0.1456237286,
-0.0725261569,
-0.1091921404,
-0.0347354561,
0.1206024289,
0.2601843178,
0.022049496,
-0.1033076569,
0.0419220105,
0.3998858333,
0.103106387,
0.1836707145,
-0.2756838799,
0.1813416183,
0.4096224308,
-0.4817186892,
0.0225810483,
-0.0420284905,
0.1797647327,
-0.0553695448,
0.1661654264,
0.2575044334,
0.1878591776,
-0.1930663586,
0.1321931779,
0.1726061553,
0.2541689873,
-0.2310459763,
0.0664095134,
0.2779102027,
0.1457005143,
-0.2281664014,
-0.0095430221,
-0.2658998072,
-0.1400369257,
0.3268370926,
-0.2910884917,
-0.1571614295,
-0.1417410374,
-0.0625432208,
0.0716490597,
0.1459767967,
-0.1332923323,
0.2146692574,
0.300241828,
-0.2892739773,
0.5329865217,
0.0812342986,
-0.1594092995,
-0.3561358452,
-0.0713704079,
-0.1798522323,
0.0125496238,
-0.2574570477,
0.1822364628,
0.2045732439,
-0.1747210622,
0.1689614952,
0.1271794736,
0.1787886918,
-0.2528988719,
0.2386087775,
-0.5147583485,
-0.0775189847,
0.1764651686,
-0.0012885481,
0.2229482383,
0.0669554621,
0.0101849288,
-0.3426542878,
0.1036736667,
-0.3803787827,
-0.4763145447,
-0.1604784131,
0.2296299189,
0.0005405471,
0.064345181,
-0.529605329,
0.0633987635,
-0.0359071419,
0.0567388013,
-0.2487528324,
-0.0802192912,
-0.3271102309,
0.004392948,
0.3452151716,
0.3170844316,
-0.4786151648,
0.1088671684,
-0.2045882493,
0.1125849783,
0.3233202398,
0.6517831087,
-0.3402388692,
0.2586214244,
-0.2039432228,
-0.0241451412,
0.1526992768,
-0.208801955,
-0.3435871005,
0.6806857586,
0.0049904585,
0.0012139902,
0.0986384898,
0.3005006909,
0.0809621215,
-0.0457399338,
0.1633225679,
0.5188063383,
0.1197435632,
0.3266190588,
-0.3972658515,
-0.2258612067,
0.0233356245,
0.504181385,
-0.3286643326,
-0.1150424629,
-0.0572325811,
0.3690587878,
0.3817799985,
-0.1068834215,
-0.0421327688,
0.3159359992,
0.0826604813,
0.0314600915,
0.0057274029,
-0.0402593128,
-0.2135917544,
0.3690969646,
0.2848339081,
0.052323889,
0.1105625033,
-0.0959373638,
-0.1257336587,
-0.0045077391,
-0.2928824425,
0.1405546665,
0.0251154155,
0.0356316902,
0.0581365377,
-0.1244743168,
-0.2283878326,
0.2344728857,
-0.3492322564,
-0.1504373699,
-0.2534068823,
0.0683862716,
-0.0063447058,
0.0837814212,
-0.0515196249,
-0.0774428695,
-0.0224778168,
-0.0123393051,
-0.250048399,
0.3335140646,
0.1480025351,
0.4500728548,
0.1707651913,
0.0197046921,
0.1539160311,
0.1502096504,
0.2900156677,
0.0290655121,
0.3547214866,
-0.2086052895,
-0.1581659168,
0.3160481453,
-0.0086464109,
0.345816195,
0.1937658042,
-0.2984398007,
0.304243505,
0.1253895164,
-0.0200541243,
-0.0765720606,
0.4769963622,
0.1933382004,
0.6596892476,
0.1480722725,
-0.2960383892,
-0.1503720284,
0.4899025261,
0.0065295324,
-0.0681880414,
0.2815352976,
-0.0161945187,
-0.2959463298,
-0.0236282721,
0.1372419596,
0.4383113384,
0.2162737101,
0.0200214628,
-0.0095433518,
-0.0210164059,
-0.1808340549,
0.2527480423,
-0.0400846228,
0.5054357052,
0.1015428901,
-0.0506689474,
-0.0109919813,
-0.4174700379,
-0.2598709762,
-0.0033298954,
0.163012892,
-0.1468356401,
0.2073656917,
-0.0957698151,
0.1224526316,
-0.3151166439,
0.2789248824,
-0.0359257534,
-0.0728959516,
-0.1824890226,
0.265986383,
0.1074791551,
-0.0019791536,
-0.0894385874,
0.2249300629,
-0.0581274778,
-0.2849126756,
-0.273542583,
-0.0603674129,
-0.3348502815,
0.0103034489,
0.3252154589,
0.074182868,
0.3003819883,
-0.0823542103,
-0.2148214877,
-0.1328997761,
0.0521083772,
0.0171449371,
-0.0165993255,
0.2699775398,
-0.1210677028,
0.1912132204,
-0.0505458601,
-0.0959269106,
0.204147771,
-0.253837347,
-0.0389259085,
-0.010283269,
-0.0735552534,
-0.0037472583,
-0.020795282,
-0.4478418827,
-0.3565230966,
-0.3237346113,
0.0292118676,
-0.0933988541,
0.1269901246,
-0.1361836344,
0.104757145,
0.0641792864,
0.1965304613,
0.144386664,
-0.2523112893,
-0.5606964827,
0.3110784292,
0.020332031,
-0.2803839147,
0.0262684077,
0.2196988463,
0.235721156,
0.0345377736,
-0.6052533388,
-0.0271212235,
-0.3552590311,
0.0219313204,
-0.349078089,
0.0371206626,
0.0630600154,
-0.0853776336,
-0.0792649388,
0.1527559161,
-0.1620278805,
-0.0691515803,
-0.0767726153,
0.0774831474,
-0.190605849,
0.2672795057,
0.0426363871,
0.5003498197,
0.1409885734,
0.1045723259,
0.3580860198,
0.1680101752,
0.1199369133,
-0.3736137748,
-0.1304304451,
0.0154232904,
-0.3150402308,
-0.3742134571,
0.2172493339,
0.076782167,
-0.395435065,
-0.1745835245,
-0.0863420144,
-0.1705094278,
-0.1927300394,
0.1544845104,
-0.2539516687,
0.1625984609,
-0.0412332453,
0.1380117387,
-0.0679568276,
-0.0923268497,
-0.0335168466,
-0.030600179,
0.0900250971,
-0.1337503791,
-0.3750220537,
0.0986417979,
-0.4460466802,
0.1425751746,
-0.2722062767,
0.1862041652,
-0.0156179816,
0.0157717019,
0.2318138778,
-0.0727583095,
0.7050460577,
0.1026794761,
0.1966913491,
0.0261170939,
-0.2520486116,
-0.4085822701,
0.0178830251,
-0.1041608527,
-0.0642230213,
0.0086270701,
0.5170794725,
-0.1452533305,
-0.2341353297,
-0.2064347863,
0.421788156,
-0.1872285455,
-0.3244763315,
-0.232175976,
-0.2543638051,
-0.3492271304,
0.1607444882,
0.0668265149,
0.3056793809,
0.10281571,
-0.0273498856,
-0.0050514285,
0.2019692808,
0.2199250311,
0.0266656056,
0.2480993569,
-0.0263266545,
0.4335158765,
-0.0052599432,
0.0647028536,
-0.066495277,
0.5060542226,
-0.1639939249,
-0.2544704676,
0.0545274802,
-0.0748030618,
0.1697998047,
0.4769685864,
0.0424269997,
-0.0674121678,
0.2645460069,
0.2375970185,
-0.3703551292,
0.0503730923,
0.3129150271,
0.1920323372,
-0.1302804649,
-0.6680113673,
0.3885314465,
0.2552742362,
0.0441929996,
0.1103968173,
-0.2265155613,
-0.1272187084,
0.5779409409,
0.2083392739,
0.9637525082,
-0.1362688541,
0.2553076446,
-0.02215687,
0.1892081201,
0.1544011384,
-0.4441034794,
-0.0409281589,
-0.3033842444,
-0.2010831535,
0.0773729309,
-0.0669564754,
0.1298739314,
0.4100772738,
-0.0162325352,
0.3677226007,
-0.0204638988,
-0.3300694823,
-0.316806227,
0.52137357,
-0.3694126606,
-0.628269136,
-0.6542038321,
0.164936319,
-0.1258341819,
0.0604868755,
-0.027284598,
0.2898997664,
0.1325594634,
-0.1572099924,
-0.1678629518,
0.1088905409,
-0.1719561964,
0.188880533,
-0.3077002168,
-0.205318898,
0.0581100136,
0.1794907153,
0.0225232989,
0.1846447289,
-0.0376793221,
0.4627090096,
-0.1927571446,
0.2538876832,
0.1208067983,
-0.3102426231,
0.3044309318,
-0.2151001692,
-0.138736248,
-0.2026305348,
-0.2663208842,
-0.2066638172,
0.1957399398,
0.0361478403,
0.1257944405,
0.0684805661,
-0.6111651063,
0.1892088652,
-0.0238640681,
-0.2318453342,
0.1828300059,
0.245236367,
-0.0773872584,
0.393201828,
0.0544845946,
-0.321369648,
-0.0695636347,
0.3503506184,
0.1853966415,
-0.1453485787,
0.4302148223,
0.2795010507,
-0.2068382353,
-0.2503647506,
0.1676179767,
0.0483137444,
-0.4503317475,
0.2712938786,
0.1372842193,
-0.048242718,
0.0251617283,
0.0064538745,
0.2230453044,
-0.1812037677,
-0.1374008805,
-0.3095383942,
-0.1729567647,
-0.0386961438,
0.2079719305,
0.0943126976,
0.1608488709,
-0.2859982848,
-0.0956857353,
0.0522898138,
-0.3249441385,
0.084916234,
-0.2763909996,
-0.0223493893,
-0.1640484035,
-0.0449340381,
0.3319894075,
-0.0107505694,
0.154473722,
0.0064227283,
-0.1199090332,
-0.2420114279,
-0.2305974513,
0.122505337,
-0.134748593,
0.000366766,
0.136435017,
-0.4455793798,
-0.1300947666,
-0.3052486777,
-0.0121416748,
0.0698813051,
0.0120546995,
-0.1074535921,
-0.0372406803,
0.0851492733,
-0.1263145655,
0.1323616505,
-0.1252922714,
0.3132648766,
0.1154135764,
0.010453877,
0.3787942231,
-0.210146457,
-0.4721022844,
-0.1458453685,
0.0856336355,
0.3004270196,
0.2204201072,
-0.0682261288,
0.1085129157,
0.3402155042,
0.3384624124,
0.2613999546,
-0.0121018365,
-0.1884234697,
0.0401677601,
0.240388155,
-0.1858048737,
-0.326736927,
-0.1238299608,
-0.2268267572,
-0.0059492067,
0.0884686038,
0.0675783157,
0.4614363015,
-0.2952951789,
0.0183460042,
0.3483887017,
-0.3196531236,
0.0307651237,
0.234043926,
0.1609742641,
0.1844974756,
0.137490958,
0.0627418235,
0.118893221,
0.794100523,
-0.1557661444,
0.3140954077,
0.1635063738,
0.531699121,
-0.2107441425,
-0.3584111631,
0.1603102237,
0.2819751501,
-0.2023051232,
0.1567440927,
-0.0790772885,
0.1474897861,
-0.3605521023,
-0.2502915561,
-0.184107393,
0.0501416475,
-0.1614356488,
-0.0824109614,
-0.0344977044,
0.0899180323,
-0.1224069968,
0.326842308,
-0.246145159,
0.0680854097,
0.0277384538,
0.3039017916,
0.0580046624,
-0.1363677084,
-0.0264326073,
-0.1593111306,
0.2774825692,
-0.2918613553,
0.0870017782,
-0.081756413,
-0.1345006824,
-0.1333435476,
0.0755709335,
0.2274031043,
0.4301583171,
0.0833783746,
0.1108024716,
-0.0322152786,
0.0555051863,
-0.1291929483,
0.2067601979,
0.1577793807,
0.50268507,
0.308470577,
0.0885602981,
-0.203322947,
-0.0085544866,
-0.1716053486,
0.3376583457,
-0.3392178416,
0.3443556428,
0.0564852208,
-0.1245845184,
-0.4495332837,
0.3309651017,
-0.2590315044,
0.0737506151,
0.3909420967,
-0.0353817679,
-0.0522631221,
-0.2203855515,
0.091304332,
-0.0858970582,
0.7191553712,
0.2900612652,
0.0001210142,
-0.3954749107,
-0.0362265185,
-0.7739747167,
-0.0307827592,
-0.1820882857,
0.2303029895,
0.0497661829,
0.3654822111,
0.1856743246,
0.2261641324,
-0.0912746489,
-0.1180471107,
-0.1717390567,
0.1461450011,
-0.1976799369,
-0.0900549144,
-0.1394364089,
0.1651573926,
-0.1136923283,
-0.5302269459,
0.1717645526,
0.0819090754,
-0.0673016682,
-0.1615780294,
-0.1335854232,
-0.0131777413,
0.2143162638,
0.4995813668,
0.0544264689,
0.0735203922,
-0.1049977243,
-0.1087204516,
-0.0519077256,
-0.0537874475,
-0.0982231498,
0.1696148068,
0.0841466188,
0.2834581137,
-0.0939562768,
0.2206944376,
-0.3580943644,
0.2006822526,
-0.2234626561,
-0.3017808199,
-0.2503539324,
-0.1162721291,
0.1512672901,
0.0865323693,
0.1971610039,
0.3609007299,
0.0298657306,
-0.1782892644,
-0.392626971,
-0.15957883,
0.2519139647,
0.016789075,
-0.2076326013,
-0.0553052016,
0.2613338828,
0.1508578211,
-0.068516314,
-0.5005115867,
0.0650297254,
0.2177362144,
-0.0242246725,
-0.1970943362,
0.3102474511,
-0.0516870916,
0.0360897332,
-0.1081530154,
0.3465842009,
-0.1472851932,
-0.378430903,
0.0138743073,
-0.3208796382
] |
https://github.com/huggingface/datasets/issues/2547 | Dataset load_from_disk is too slow | Okay, that's exactly my case, with spot instances... Therefore this isn't something we can change in any way to be able to load the dataset faster? I mean, what do you do internally at huggingface for being able to use spot instances with datasets efficiently? | @lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model. | 45 | Dataset load_from_disk is too slow
@lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model.
Okay, that's exactly my case, with spot instances... Therefore this isn't something we can change in any way to be able to load the dataset faster? I mean, what do you do internally at huggingface for being able to use spot instances with datasets efficiently? | [
-0.3196369112,
-0.5587565899,
-0.0620264709,
0.5160352588,
0.2328602672,
0.020379059,
0.1246296242,
0.1379354,
0.5566675663,
0.112706244,
-0.0614801571,
0.3583337069,
-0.0153430086,
0.2113304734,
0.0768193007,
-0.0829385221,
0.2018542439,
0.0174788795,
0.0967760533,
-0.033470951,
-0.0602661148,
0.1847726703,
-0.177721858,
-0.1801539212,
-0.3432549834,
-0.1481816173,
0.0169770867,
0.1757046133,
-0.0911734402,
-0.3421687484,
0.1743239164,
0.077976346,
0.1314019859,
0.571747601,
-0.0001136536,
-0.0459836051,
0.1177241877,
0.0748289973,
-0.3427474201,
0.0368381403,
0.0366965979,
-0.279442966,
0.1525130868,
-0.1323546767,
-0.1332794726,
0.1293531209,
-0.0407345667,
-0.3339375257,
0.3590658009,
-0.015728049,
0.1833484173,
0.5802413821,
-0.3182554245,
-0.0626384392,
-0.0680632889,
0.0878694132,
-0.2041867971,
0.2897658348,
0.428268671,
0.137508899,
-0.1503995657,
0.4081255794,
-0.0401743799,
0.129054144,
0.5548253655,
0.1066801697,
-0.0909828395,
-0.1906512231,
-0.1276057959,
0.2746151984,
0.4216811657,
-0.0359466337,
-0.3770565391,
-0.4575643837,
0.08068005,
-0.3198558986,
0.2432202101,
0.1389406174,
-0.0813619494,
0.1238142699,
-0.1747923344,
-0.1454373896,
-0.0106415376,
0.0115344869,
0.3172798157,
0.0720942318,
-0.1995427608,
0.0143462773,
0.4727319181,
0.1806201339,
-0.1624884754,
-0.1308173835,
0.181079179,
0.2825067341,
-0.5777142644,
0.0114670023,
0.001085151,
0.4125038683,
0.0518387705,
0.2784288228,
0.3223169446,
0.2358657718,
-0.3069177866,
0.091134429,
0.2339556813,
0.3614220023,
-0.056424737,
-0.1345001161,
0.3064210117,
0.3840130866,
-0.1135771871,
0.0095590614,
-0.2387743145,
-0.1069196761,
0.1238985583,
-0.3129689693,
0.0145296976,
-0.1244757399,
-0.0202006102,
-0.1086964011,
0.1678444594,
-0.157746166,
0.2461663187,
0.37666291,
-0.2775832713,
0.5177398324,
0.1202464104,
-0.1425701976,
-0.433054179,
-0.1303916872,
-0.1732847393,
0.0804431513,
-0.1950099468,
0.2662882805,
0.0701354295,
-0.466599822,
0.2580043077,
0.1210592389,
0.2060397267,
-0.242033124,
0.0148701072,
-0.3456922472,
-0.2548388243,
0.1120525599,
-0.0221584365,
0.2393349707,
0.0031181891,
0.0291967839,
-0.3391520381,
-0.1242929175,
-0.3038777411,
-0.5340563059,
-0.1559811831,
0.1528093219,
-0.033318352,
0.0070495335,
-0.6708772779,
0.1752402037,
-0.030953303,
0.1613243818,
-0.0681560114,
0.0349205211,
-0.4282568097,
0.0129328147,
0.4087434411,
0.4829123318,
-0.3364723325,
-0.0092633143,
-0.1738155484,
0.0008566082,
0.2438303232,
0.6055168509,
-0.2631825209,
0.3598332703,
-0.196041435,
0.0458977073,
0.0975215659,
-0.3626183569,
-0.1896520555,
0.4016987085,
-0.0491989926,
0.0704117045,
0.1953025013,
0.2154712677,
0.0499426313,
-0.0069145337,
0.0264247023,
0.4943827987,
0.1099170223,
0.3077590168,
-0.327524811,
-0.2363768518,
-0.0106484285,
0.4756225646,
-0.4628457725,
-0.1358230412,
-0.1892005205,
0.4367304444,
0.349382937,
-0.0706920922,
-0.0973176658,
0.214666158,
0.0543628708,
0.1839343905,
-0.0258471556,
-0.0392578542,
-0.3798592985,
0.3749342263,
0.2192984223,
0.2074834406,
0.06837143,
-0.1953059286,
-0.2741435766,
0.0775461122,
-0.3143349588,
0.0152478125,
-0.0685912147,
0.0763565823,
0.1691776365,
-0.0933395401,
-0.3474590182,
0.2462813258,
-0.3357878625,
0.0676222146,
-0.4804137051,
0.0079300255,
0.0789150894,
0.079426989,
-0.1203794926,
0.0181697458,
-0.0685079843,
-0.0977362096,
-0.0915657803,
0.3952661157,
0.0936062858,
0.4953526556,
0.1984577179,
0.1474680305,
0.283660382,
0.1705907285,
0.1966604888,
-0.1005666554,
0.332821846,
-0.1249452978,
-0.2328209132,
0.333798945,
-0.111613214,
0.2934542298,
0.1485083699,
-0.2852827311,
0.1642889082,
0.1510000825,
-0.058369711,
-0.0630398691,
0.4609428346,
0.0204655118,
0.6008420587,
0.2153660655,
-0.4440368414,
-0.043703068,
0.4861670434,
-0.01507264,
-0.0587382875,
0.2730799317,
0.0624165609,
-0.35256356,
0.0695388466,
-0.161084488,
0.2996738255,
0.136142537,
-0.0543623976,
0.0600379035,
0.0870235562,
-0.1404524148,
0.203068167,
-0.0107665472,
0.3830640018,
-0.0683271512,
0.0322458073,
-0.0401493087,
-0.4450123906,
-0.17550762,
-0.1217238083,
0.1107885391,
-0.2857529819,
0.1456924081,
-0.0557507202,
-0.0033407807,
-0.2302479446,
0.3559330702,
-0.0930292159,
-0.0899566486,
-0.1406047493,
0.3619554043,
0.121461466,
0.0018907897,
-0.0435348861,
0.4041737318,
-0.0342100486,
-0.1786132455,
-0.3652997613,
-0.0047923513,
-0.1858632267,
-0.0485283881,
0.2934470475,
0.1590782702,
0.2970314622,
-0.2010053992,
-0.1913919598,
-0.2566903532,
-0.0117398351,
0.0041496847,
-0.05881311,
0.3551352024,
0.0871947706,
0.2114962935,
-0.2618365586,
-0.0664917454,
0.2615097165,
-0.2949219346,
-0.1493816972,
-0.1307644844,
-0.1245446652,
0.1220936626,
0.0281822309,
-0.2825681567,
-0.2752524614,
-0.305575788,
0.3190360367,
-0.0953014418,
0.0536933616,
-0.1447350383,
-0.0529215969,
0.1388356835,
-0.0915213972,
0.1111415625,
-0.1933531016,
-0.607004106,
0.2168898731,
0.0247756727,
-0.2385850996,
-0.1031485125,
0.2235168368,
0.1149052531,
-0.1313179582,
-0.5084906816,
-0.3393254578,
-0.3350625634,
0.0989805236,
-0.2253898084,
0.1528255194,
0.1881374419,
-0.1391517222,
-0.0249837562,
0.1779854596,
-0.2847420573,
-0.0286920182,
0.0348594114,
-0.0209887475,
-0.0396116823,
0.2691698074,
-0.0004037023,
0.4684158564,
0.1950827241,
0.1571453065,
0.4356398284,
0.1224709153,
0.1987568736,
-0.4039034247,
-0.197437495,
0.0201038383,
-0.2473002821,
-0.2876940072,
0.2333061099,
0.1174999624,
0.032277748,
-0.1820490807,
-0.0895074308,
-0.2380465716,
-0.183657065,
0.0752684399,
0.026931921,
0.0589256398,
-0.0642209202,
0.0812673569,
0.0206644088,
-0.058369115,
0.088646628,
0.06639871,
0.1828168035,
-0.1110027209,
-0.5808106065,
0.1746715009,
-0.606972456,
0.2017237544,
-0.2025547177,
0.0624963045,
0.0504116416,
0.0110517517,
0.4005094171,
0.0054565631,
0.7247171402,
0.0903055519,
0.1827915162,
-0.0531370863,
-0.4591611624,
-0.4324056506,
0.1206625924,
-0.0946580768,
-0.1170939356,
0.0451914892,
0.5109401345,
-0.3123775125,
-0.3635506332,
-0.1208662465,
0.3289901614,
-0.1704082489,
-0.16021806,
-0.2254455835,
-0.3087471724,
-0.2820455134,
0.1915449947,
0.0622889176,
0.3389368057,
0.2983129919,
0.0704509169,
0.0111542922,
0.2225704342,
0.1877045035,
0.0558675043,
0.2207467407,
0.0630621687,
0.2699103355,
0.1948711723,
-0.0403415672,
-0.1628277004,
0.5641953945,
-0.2501836419,
-0.4906095862,
-0.0146966567,
0.1262729466,
0.2365373969,
0.5669201612,
0.0421110094,
0.1197960973,
0.1443804353,
0.3374321461,
-0.4358740151,
0.0840513855,
0.2717903256,
0.2514382601,
-0.1345536858,
-0.5810296535,
0.456617713,
0.190507099,
0.0488358289,
0.0569092035,
0.0513388142,
-0.0842371583,
0.6181398034,
0.0686986595,
1.0370107889,
-0.2821859419,
0.2254855484,
0.1522789896,
0.2190825641,
0.5381292105,
-0.4257052541,
0.0011361092,
-0.2776857615,
-0.1213343367,
0.0625816435,
-0.0462398604,
0.0946656018,
0.2631702721,
0.0226855502,
0.459528476,
-0.1524493247,
-0.2197597772,
-0.3194173872,
0.4795186818,
-0.2825461924,
-0.7124124169,
-0.9103111029,
0.0863135308,
-0.0807750225,
0.229945749,
-0.0965874791,
0.2374045849,
0.180993557,
-0.0895970091,
-0.1275954396,
-0.0315458141,
-0.2507607937,
0.0424582399,
-0.1638721973,
-0.1292312592,
0.0311029255,
0.3478126824,
0.1300774813,
0.0361168757,
-0.0443167239,
0.3795784414,
-0.3030953705,
0.2124036402,
0.0925704166,
-0.254206866,
0.2649160326,
-0.1542869806,
-0.0823563114,
-0.175585866,
-0.1746192276,
-0.373575747,
0.2857707143,
0.0387682244,
0.0392814949,
-0.0304137655,
-0.5706743002,
0.1415370703,
0.131459862,
-0.2844035625,
0.098065421,
0.2616694272,
-0.0888563991,
0.2768678367,
0.1133855134,
-0.2748232186,
-0.0678264722,
0.3945201337,
-0.0038807904,
-0.192715615,
0.3684563637,
0.3933857679,
-0.203161478,
-0.1406018287,
0.135420993,
0.1984259933,
-0.6394310594,
0.3688587546,
0.2252012491,
-0.0853411332,
-0.0321914889,
0.2528887689,
0.2513150573,
-0.153139025,
-0.0675503314,
-0.2945723534,
-0.1395421475,
0.1295032352,
0.1711529791,
-0.0087235747,
0.23671332,
-0.2157867253,
-0.0892508999,
0.0814831406,
-0.2553876638,
0.0630019009,
-0.3963885307,
-0.0154436566,
0.136857748,
-0.0703492537,
0.4796366394,
-0.0704574659,
0.0749924034,
0.0268759802,
-0.2657931149,
-0.1725010872,
-0.1794165671,
0.1676753461,
-0.1823350936,
-0.0706502721,
0.165553242,
-0.1704596579,
-0.1135936603,
-0.3698253632,
0.179892838,
0.199098736,
0.0540252253,
-0.1933409274,
-0.0070026331,
0.0685854182,
-0.230734393,
0.1076776385,
0.0636103973,
0.1913839132,
0.125613451,
-0.090294756,
0.183661297,
-0.2086755186,
-0.0562756173,
-0.042978812,
0.2864099741,
0.1725783646,
0.1507645249,
-0.0274279714,
-0.0452591293,
0.332791537,
0.3738414645,
0.2403503656,
-0.0165242795,
-0.1362866312,
0.0115445182,
0.1501932144,
-0.1640738845,
-0.2457485199,
-0.0173645206,
-0.1074974537,
-0.0516958386,
0.1891138554,
0.1765632927,
0.5343306065,
-0.4159370959,
0.0900051743,
0.2786037028,
-0.2512699664,
0.0952276289,
0.1014289707,
0.0517053157,
0.0592836849,
0.2839731276,
0.1568903625,
0.1252664924,
0.466327548,
-0.124837406,
0.4365475476,
-0.0518170074,
0.6817248464,
-0.0378545411,
-0.4280994236,
0.1009421647,
0.4241502881,
-0.0978157222,
0.054826051,
-0.1713285744,
0.3906828761,
-0.3606956899,
-0.3087564707,
-0.1585167944,
0.1802537292,
-0.1367848516,
-0.1669905037,
0.0572695211,
0.0247288346,
-0.1000589356,
0.3391206264,
-0.2464724183,
-0.0384187959,
0.152542606,
0.1303633749,
0.0312282685,
-0.2246227264,
-0.2486135662,
-0.1329122186,
0.4031761885,
-0.1926606297,
0.132158637,
-0.1036322862,
-0.1441439688,
-0.1213672012,
0.3481113017,
0.1797877252,
0.2219310403,
0.205488354,
0.1745472252,
-0.1545775384,
0.1652442813,
-0.0052416138,
0.1515232623,
0.0699847341,
0.307549715,
0.1711008698,
0.038439285,
-0.1586201191,
-0.035583999,
-0.2871453166,
0.311809063,
-0.4168593287,
0.2328249812,
-0.0707159787,
-0.0420554131,
-0.4076865017,
0.3572511077,
-0.1667421758,
0.13074857,
0.3537979722,
-0.0285260119,
-0.1019278467,
-0.2110535502,
0.0544466488,
0.022533495,
0.6195695996,
0.3593435884,
-0.099686116,
-0.3158843815,
-0.034531936,
-0.7715905905,
-0.0830786452,
0.0270681344,
0.182120949,
0.2142472714,
0.303353101,
0.0685293674,
0.2734250128,
-0.002445817,
-0.1144329756,
-0.0322491005,
-0.0043262495,
-0.1468900591,
0.0715842843,
-0.2752620876,
0.0167885963,
-0.05203823,
-0.4649932384,
0.2568730116,
-0.0127400309,
-0.1827228665,
-0.0955052972,
0.0389735848,
-0.0595954135,
0.0259901993,
0.4170564711,
0.0598114133,
-0.0962148309,
-0.0336413458,
-0.1641094089,
-0.1254543215,
-0.1693587899,
-0.1114807278,
0.1880919486,
-0.0811497122,
0.2960054278,
-0.1214583665,
0.2103294134,
-0.4020768106,
0.3637865782,
-0.1327585578,
-0.3278028369,
-0.2649255693,
-0.0511693023,
-0.0675086081,
-0.0144010484,
0.2698027194,
0.3055672348,
-0.0117312912,
-0.2194472551,
-0.3290023208,
-0.1330347359,
0.4405806065,
-0.0863298625,
-0.1167691275,
-0.0473911725,
0.2936119437,
0.3169218004,
-0.2588174939,
-0.6736826301,
0.0697590858,
0.0982680693,
0.123898223,
-0.1412495375,
0.3487513959,
-0.1722726524,
-0.0608770847,
-0.1790950447,
0.2636466622,
-0.1334083676,
-0.2623075247,
0.1287029535,
-0.3133034706
] |
https://github.com/huggingface/datasets/issues/2547 | Dataset load_from_disk is too slow | There are no solutions yet unfortunately.
We're still trying to figure out a way to make the loading instantaneous on such disks, I'll keep you posted | @lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model. | 26 | Dataset load_from_disk is too slow
@lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model.
There are no solutions yet unfortunately.
We're still trying to figure out a way to make the loading instantaneous on such disks, I'll keep you posted | [
-0.4694788456,
-0.2423015982,
-0.1178940758,
0.3941159844,
0.2421811223,
0.0529480651,
0.1993058473,
0.265770793,
0.4733240306,
0.1050992087,
0.0533880442,
0.4494890273,
-0.0244760811,
0.0135967508,
-0.0266763903,
-0.013558222,
0.2004588395,
0.0515529476,
0.2093932778,
-0.1210183501,
-0.1660778224,
0.2531618178,
-0.17681925,
-0.2215417325,
-0.2757842541,
-0.1387379915,
-0.0035656542,
0.0403212532,
-0.0686634555,
-0.3196171224,
0.1828830838,
0.1244311035,
0.2284584343,
0.4482245445,
-0.00010555,
-0.1314771771,
0.1336106062,
0.0169424415,
-0.3660500646,
-0.1134863645,
0.2358430326,
-0.2445042431,
0.137178123,
-0.2250013053,
-0.0972654372,
0.0251808688,
-0.0460047275,
-0.4642717242,
0.2052052766,
0.1093907654,
0.257561177,
0.3051843643,
-0.3067194223,
-0.0636642799,
-0.005110275,
0.0161650795,
-0.2343575656,
0.2038811445,
0.4900562167,
0.1526576877,
-0.1329111606,
0.3433522582,
-0.0540959239,
0.0930556804,
0.4101566672,
0.0071678795,
0.0953571498,
-0.2674489319,
-0.0116265835,
0.2036073506,
0.4939621389,
-0.0521094501,
-0.3432076871,
-0.3028453588,
0.1475216448,
-0.2496154606,
0.2738334239,
0.241363436,
-0.1156349182,
0.1319806576,
-0.053760834,
-0.1877798289,
-0.0633383021,
0.068101272,
0.2679542601,
0.2253516316,
-0.0873983204,
0.0108181685,
0.4163219929,
0.1147833318,
0.2195017785,
-0.243281424,
0.1509137452,
0.3744632602,
-0.5127291679,
-0.012459904,
-0.0313438103,
0.2573702037,
-0.0977263078,
0.2290548235,
0.1536368877,
0.2092104405,
-0.1661462486,
0.1606682539,
0.1446458548,
0.2459537089,
-0.0865710899,
-0.0402123518,
0.2442097515,
0.1976844966,
-0.1823554635,
-0.0017858958,
-0.2736597657,
-0.1554442942,
0.2644675672,
-0.2677517235,
-0.135528937,
-0.1284793913,
-0.0555534959,
0.0388843678,
0.1759006679,
-0.1476338655,
0.1911533177,
0.3013444245,
-0.2921018004,
0.572860837,
0.0260148123,
-0.0990995765,
-0.3289969563,
-0.0375297777,
-0.1681727469,
0.0735850036,
-0.2496556044,
0.1538657397,
0.1731602848,
-0.261128813,
0.2046500295,
0.0870453268,
0.1814052761,
-0.2219468355,
0.2221281677,
-0.4922523201,
-0.1150704473,
0.1565223783,
0.0439559147,
0.2417899072,
0.0218332484,
-0.0940542817,
-0.3755872846,
0.106002897,
-0.3327481747,
-0.4518420696,
-0.2468840331,
0.2598526776,
0.0015021265,
-0.0400486961,
-0.5704132318,
0.1138265431,
0.0026697479,
0.0800514966,
-0.1564574391,
-0.0796248317,
-0.2967770994,
-0.0024336539,
0.3181240857,
0.3346177042,
-0.4551333785,
0.1021754891,
-0.2604036629,
0.0749708042,
0.3448602855,
0.5159243345,
-0.3132815659,
0.2919721007,
-0.1433939338,
0.0827734917,
0.220912993,
-0.2219849527,
-0.2678496838,
0.6216789484,
0.0714554042,
-0.0712872893,
0.1130911335,
0.2571852207,
0.1772367954,
-0.0366676338,
0.1337172687,
0.5584760308,
0.1512367427,
0.2853977084,
-0.3553659916,
-0.2408137619,
0.022847645,
0.5096573234,
-0.2727358639,
-0.1557222903,
-0.1301404834,
0.3853494823,
0.3681557477,
-0.1020008177,
-0.0429257378,
0.2448922694,
0.1422254294,
0.0588853583,
-0.0217139702,
-0.0522180945,
-0.209491238,
0.3154988587,
0.340278089,
0.105509907,
0.0518875271,
-0.149933219,
-0.2064654529,
0.0269757882,
-0.3376529813,
0.0885745883,
0.0651175827,
0.0703165382,
0.0686206594,
-0.0590331405,
-0.2992324233,
0.2201518565,
-0.3418136537,
-0.1120351255,
-0.2888448834,
0.0647160113,
-0.0210965779,
0.0440994948,
-0.0066615939,
-0.1089290679,
-0.0150617957,
-0.0243870579,
-0.2034516931,
0.378691107,
0.0924975723,
0.5323038697,
0.1840376258,
-0.0338036418,
0.1784891039,
0.185782522,
0.1977801472,
0.0105076991,
0.3661214709,
-0.1660589576,
-0.1404555738,
0.3742796183,
-0.0605219938,
0.2691720724,
0.2077658325,
-0.2657873929,
0.3263541162,
0.1359152198,
-0.0913007706,
-0.1102435589,
0.4074087739,
0.0894587636,
0.6007940173,
0.1311145127,
-0.3572584987,
-0.076250717,
0.5789567232,
0.0450010598,
-0.0418992005,
0.3076451123,
0.0911244601,
-0.3170955479,
0.0501957238,
0.1875695437,
0.4310148954,
0.1976149976,
-0.0040009748,
-0.032899633,
-0.005691018,
-0.2190224081,
0.2751497626,
-0.0797051638,
0.4988174736,
0.0467041992,
-0.0254614893,
-0.0060016997,
-0.4627442956,
-0.3295349479,
-0.0532216989,
0.176809147,
-0.0895209908,
0.2188509107,
-0.0753614828,
0.0838564187,
-0.25351578,
0.212068975,
-0.0295273587,
-0.1037034839,
-0.119830355,
0.2843451798,
0.1204029992,
0.0475348756,
-0.1557543874,
0.1716061682,
-0.1020782813,
-0.220012486,
-0.3387373388,
-0.093430385,
-0.286870718,
0.0351009704,
0.2899346352,
0.064791806,
0.3139713705,
-0.1468577534,
-0.1171029434,
-0.160142377,
-0.0196715072,
-0.0257332213,
-0.0159381181,
0.1736110449,
-0.0721043348,
0.1581277251,
-0.1802785397,
-0.1895719469,
0.1762481332,
-0.2932652235,
0.0095897615,
-0.0883766711,
-0.0860166103,
-0.0133090764,
-0.0503961444,
-0.4648726881,
-0.3632450402,
-0.2891047597,
0.0190054085,
-0.0670996085,
0.1013488993,
-0.26160869,
0.00976016,
0.061943952,
0.1845130622,
0.1032931879,
-0.2362323999,
-0.5854779482,
0.3226017058,
0.0049837418,
-0.2712001503,
0.0211333334,
0.1947810948,
0.2655994892,
-0.0799175054,
-0.5386179686,
-0.0461721122,
-0.302778244,
0.0212117881,
-0.3066811264,
0.0181142408,
0.1055009738,
-0.007771492,
-0.0813886151,
0.0991657674,
-0.1694831252,
-0.0149222389,
-0.0797679722,
0.0836158916,
-0.2301034331,
0.2255464196,
0.0100930408,
0.417573303,
0.0553578287,
0.0708941817,
0.4242657125,
0.2432632595,
0.124062635,
-0.3561912775,
-0.1205058694,
0.0345835425,
-0.2498476505,
-0.2961779535,
0.2965630889,
0.039026428,
-0.4405571818,
-0.2313324958,
-0.035748601,
-0.2201545537,
-0.1747714579,
0.0717259347,
-0.20131284,
0.057128977,
-0.0484477989,
0.1518858224,
-0.0060726106,
-0.049081251,
-0.0065012872,
0.0212810915,
0.0920039937,
-0.1481695026,
-0.3790255189,
0.0960953906,
-0.5191190839,
0.1156716049,
-0.260797292,
0.1470320225,
0.0420127213,
0.0311341584,
0.3150844574,
-0.1063320935,
0.628659904,
0.0305872951,
0.1294416636,
0.0650366545,
-0.2170046419,
-0.4151458442,
0.0074853003,
-0.1542780697,
-0.0826802477,
0.1175873131,
0.5377978086,
-0.2096420228,
-0.2062815726,
-0.2187012285,
0.2994832098,
-0.204304114,
-0.3161749542,
-0.2104469985,
-0.349750936,
-0.3888543546,
0.1937901676,
0.0499513596,
0.3467879295,
0.0920251161,
-0.0125943273,
-0.0598890781,
0.2289758474,
0.2043620646,
0.078837797,
0.2240426242,
0.0071835928,
0.3724559844,
-0.0922077596,
0.0635764301,
0.0013741944,
0.4416353405,
-0.1714120805,
-0.2881593108,
0.07083188,
-0.0826337636,
0.225885272,
0.4218278229,
0.0237921402,
-0.0086860806,
0.1257959604,
0.2253556848,
-0.29265818,
0.0639967993,
0.2721915841,
0.1781926155,
-0.1965343803,
-0.6573073864,
0.3948164582,
0.2069482803,
0.0046932399,
0.0570727959,
-0.1848084033,
-0.1417865455,
0.6890679598,
0.2015158236,
1.0291239023,
-0.1868835986,
0.2222973853,
-0.0363857746,
0.1555668414,
0.2503237724,
-0.4073495269,
-0.0044396222,
-0.3594460487,
-0.1366783082,
0.0878594592,
0.0014561266,
0.1326106191,
0.4059734941,
-0.1406877041,
0.3619869649,
-0.0185151473,
-0.382573694,
-0.2977781296,
0.5117340088,
-0.3943452835,
-0.6922771335,
-0.8247357011,
0.1677990854,
-0.0810492337,
0.1186974347,
-0.0903275311,
0.2641169429,
0.2134919614,
-0.1382888705,
-0.1650548726,
0.1232708097,
-0.1168852746,
0.1214122623,
-0.3188133836,
-0.2166327238,
0.0729501545,
0.2318353951,
0.1302154958,
0.1892755926,
-0.0041626571,
0.4877098501,
-0.2195077091,
0.21186544,
0.1033783555,
-0.2827648818,
0.308196485,
-0.2601311803,
-0.1553421617,
-0.2089236081,
-0.1640532017,
-0.2361535132,
0.3037736118,
0.0139227007,
0.1338055879,
0.0698401779,
-0.5948092937,
0.1890896261,
0.0155132264,
-0.2636430264,
0.2033051848,
0.2456427813,
-0.153534025,
0.3958008289,
0.0596806593,
-0.3271467686,
-0.0964700431,
0.3515590429,
0.1941080689,
-0.1444524825,
0.3934569359,
0.3167483211,
-0.2243394852,
-0.2559331656,
0.1372371316,
-0.0305804349,
-0.5054115653,
0.2752222717,
0.1805752367,
-0.0334490091,
-0.0006365255,
0.0063777817,
0.1991871148,
-0.1418989152,
-0.1174497232,
-0.3069977164,
-0.1299626082,
-0.0863471031,
0.1642919481,
0.0839917958,
0.2119126469,
-0.3602120578,
-0.0737629235,
0.0395039171,
-0.3430845737,
0.1233986989,
-0.3643562198,
0.0190977752,
-0.1297378689,
-0.0280149803,
0.2609645128,
-0.0176786482,
0.1585830748,
0.0504699126,
-0.0842272118,
-0.259721607,
-0.1886475235,
0.1182470322,
-0.1186014637,
0.0447763428,
0.15618819,
-0.3250780106,
-0.217220366,
-0.2890645266,
0.0348472893,
0.0980562419,
0.0104703549,
-0.0939080268,
0.0520678088,
0.1179300174,
-0.1605365574,
0.0660488307,
-0.0870734751,
0.3416156173,
0.0650926232,
0.0499585234,
0.355399996,
-0.1964924186,
-0.289740175,
-0.1704970598,
0.0735917911,
0.3466834426,
0.1583279967,
-0.084670864,
0.089661628,
0.3591158986,
0.3362048268,
0.25768134,
0.0216138139,
-0.2313485891,
0.0998941362,
0.2502579689,
-0.2334997505,
-0.2964687049,
-0.1021900773,
-0.1455087662,
-0.0343764275,
0.0510737896,
0.0636561215,
0.4499308467,
-0.2592739165,
0.0849271715,
0.2981085181,
-0.2808159888,
0.1106245369,
0.2647836208,
0.1184216514,
0.1860949695,
0.1724981666,
0.0764958113,
0.0882383287,
0.7180646658,
-0.1674937606,
0.4605651796,
0.1990515888,
0.5430527329,
-0.1301976293,
-0.2953588068,
0.1088939756,
0.2278899103,
-0.1638668627,
0.1211449951,
0.0229619294,
0.2102439702,
-0.2791337371,
-0.2531220019,
-0.2078094631,
0.0798736513,
-0.1857958436,
-0.1577618271,
-0.0551922247,
0.0685928613,
-0.1077866107,
0.3235854506,
-0.2514156401,
0.150301367,
0.0585513413,
0.2984160781,
0.1284311116,
-0.1307540387,
-0.0483750626,
-0.2393859029,
0.3301277161,
-0.2393916845,
0.1104546636,
-0.0595017485,
-0.1310567558,
-0.1504599452,
0.1248566657,
0.24951455,
0.3417236507,
0.0862356573,
0.126365602,
-0.1184464097,
0.0892464444,
-0.0592329912,
0.2225811481,
0.249021858,
0.4293943942,
0.3248230517,
0.1182187945,
-0.2089404464,
0.0747364238,
-0.1469836533,
0.2920446992,
-0.2994969189,
0.4099964499,
0.1020159423,
-0.116900973,
-0.4516200423,
0.355976373,
-0.2491373122,
0.0635453835,
0.3920060992,
-0.0215292051,
-0.0770395622,
-0.3009454012,
0.1012689844,
-0.0411054567,
0.6939361691,
0.2713722289,
-0.0689364672,
-0.2933215201,
-0.0515941307,
-0.783836782,
-0.0110740289,
-0.0357750133,
0.2923114896,
0.0586510077,
0.3379095495,
0.1290601194,
0.2557677627,
-0.0540652424,
-0.0681856722,
-0.1145163178,
0.1603102982,
-0.2366976291,
0.0467104539,
-0.1564763188,
0.0683111921,
-0.135794729,
-0.4821787477,
0.1385384947,
-0.0724942908,
-0.0485454872,
-0.1844356656,
-0.1335465461,
0.0081032813,
0.1373852193,
0.4866030812,
0.0385473669,
0.0232348815,
-0.1470887661,
-0.0542538762,
0.0028939499,
-0.0420573987,
-0.0661671907,
0.1356506348,
0.0847150385,
0.2798971534,
-0.0646762848,
0.2580757737,
-0.337531805,
0.2599018514,
-0.2294942737,
-0.3023747504,
-0.2581328154,
-0.1102364063,
0.1125590056,
0.0064157285,
0.1501610577,
0.326965034,
0.0328191519,
-0.1675229371,
-0.3837409019,
-0.211330995,
0.3055426478,
-0.0138699934,
-0.2495283484,
-0.1542969495,
0.206795916,
0.2052091211,
-0.0726259947,
-0.5406599045,
0.1536534429,
0.1638727039,
0.0282975957,
-0.1740399599,
0.3224802911,
-0.0978928506,
0.0442291796,
-0.1590592563,
0.2737867832,
-0.1268523782,
-0.3126341105,
-0.0827793479,
-0.3731065691
] |
https://github.com/huggingface/datasets/issues/2543 | switching some low-level log.info's to log.debug? | Hi @stas00, thanks for pointing out this issue with logging.
I agree that `datasets` can sometimes be too verbose... I can create a PR and we could discuss there the choice of the log levels for different parts of the code. | In https://github.com/huggingface/transformers/pull/12276 we are now changing the examples to have `datasets` on the same log level as `transformers`, so that one setting can do a consistent logging across all involved components.
The trouble is that now we get a ton of these:
```
06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 acquired on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock
06/23/2021 12:15:31 - INFO - datasets.arrow_writer - Done writing 50 examples in 12280 bytes /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.
06/23/2021 12:15:31 - INFO - datasets.arrow_dataset - Set __getitem__(key) output type to python objects for no columns (when key is int or slice) and don't output other (un-formatted) columns.
06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 released on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock
```
May I suggest that these can be `log.debug` as it's no informative to the user.
More examples: these are not informative - too much information:
```
06/23/2021 12:14:26 - INFO - datasets.load - Checking /home/stas/.cache/huggingface/datasets/downloads/459933f1fe47711fad2f6ff8110014ff189120b45ad159ef5b8e90ea43a174fa.e23e7d1259a8c6274a82a42a8936dd1b87225302c6dc9b7261beb3bc2daac640.py for additional imports.
06/23/2021 12:14:27 - INFO - datasets.builder - Constructing Dataset for split train, validation, test, from /home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a
```
While these are:
```
06/23/2021 12:14:27 - INFO - datasets.info - Loading Dataset Infos from /home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt16/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a
06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a)
```
I also realize that `transformers` examples don't have do use `info` for `datasets` to let the default `warning` keep logging to less noisy.
But I think currently the log levels are slightly misused and skewed by 1 level. Many `warnings` will better be `info`s and most `info`s be `debug`.
e.g.:
```
06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a)
```
why is this a warning? it is informing me that the cache is used, there is nothing to be worried about. I'd have it as `info`.
Warnings are typically something that's bordering error or the first thing to check when things don't work as expected.
infrequent info is there to inform of the different stages or important events.
Everything else is debug.
At least the way I understand things.
| 41 | switching some low-level log.info's to log.debug?
In https://github.com/huggingface/transformers/pull/12276 we are now changing the examples to have `datasets` on the same log level as `transformers`, so that one setting can do a consistent logging across all involved components.
The trouble is that now we get a ton of these:
```
06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 acquired on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock
06/23/2021 12:15:31 - INFO - datasets.arrow_writer - Done writing 50 examples in 12280 bytes /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.
06/23/2021 12:15:31 - INFO - datasets.arrow_dataset - Set __getitem__(key) output type to python objects for no columns (when key is int or slice) and don't output other (un-formatted) columns.
06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 released on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock
```
May I suggest that these can be `log.debug` as it's no informative to the user.
More examples: these are not informative - too much information:
```
06/23/2021 12:14:26 - INFO - datasets.load - Checking /home/stas/.cache/huggingface/datasets/downloads/459933f1fe47711fad2f6ff8110014ff189120b45ad159ef5b8e90ea43a174fa.e23e7d1259a8c6274a82a42a8936dd1b87225302c6dc9b7261beb3bc2daac640.py for additional imports.
06/23/2021 12:14:27 - INFO - datasets.builder - Constructing Dataset for split train, validation, test, from /home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a
```
While these are:
```
06/23/2021 12:14:27 - INFO - datasets.info - Loading Dataset Infos from /home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt16/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a
06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a)
```
I also realize that `transformers` examples don't have do use `info` for `datasets` to let the default `warning` keep logging to less noisy.
But I think currently the log levels are slightly misused and skewed by 1 level. Many `warnings` will better be `info`s and most `info`s be `debug`.
e.g.:
```
06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a)
```
why is this a warning? it is informing me that the cache is used, there is nothing to be worried about. I'd have it as `info`.
Warnings are typically something that's bordering error or the first thing to check when things don't work as expected.
infrequent info is there to inform of the different stages or important events.
Everything else is debug.
At least the way I understand things.
Hi @stas00, thanks for pointing out this issue with logging.
I agree that `datasets` can sometimes be too verbose... I can create a PR and we could discuss there the choice of the log levels for different parts of the code. | [
0.1725227833,
-0.3411972523,
0.0871563256,
0.2024415433,
0.2560844421,
0.1124867126,
0.5520288348,
0.3101124763,
-0.0718617737,
-0.3018712997,
-0.041637443,
0.1757284701,
-0.2178722024,
0.280829221,
0.0503806546,
-0.1635196209,
-0.0827340037,
-0.0110472962,
-0.2270589322,
-0.0930727422,
-0.0216767043,
0.2245504409,
-0.0460355654,
0.282222271,
-0.4451559782,
-0.2340549231,
0.1867845803,
0.141461879,
0.2126890123,
-0.4743226767,
0.0037434772,
-0.0164438933,
0.0430154949,
-0.02905697,
-0.000123391,
0.1806587577,
0.3962737918,
-0.0402112752,
-0.4393555522,
0.0913483053,
-0.4999396801,
-0.4355217814,
0.2987115681,
-0.1670990139,
0.2413560748,
-0.6675630808,
0.355973959,
-0.3311719894,
0.22117275,
0.2089207172,
0.1022919789,
0.1760014296,
-0.3780122101,
0.0249666348,
0.4033831358,
0.4810090959,
-0.1526447535,
0.1070233434,
0.2368959785,
0.0921345055,
-0.156244114,
0.3786007166,
0.0120768994,
-0.1597695202,
0.3421989977,
0.1947603375,
0.428532362,
0.0483222194,
0.2384688556,
0.3680716455,
0.0961680114,
-0.3306327164,
-0.4083089828,
-0.6607731581,
0.0907098055,
-0.1062855199,
-0.09579961,
-0.0971787125,
-0.1848101467,
0.2638140619,
-0.1493397951,
-0.1274099499,
0.0364532098,
-0.2127592415,
0.2145821005,
-0.088704586,
-0.3330809772,
0.085909903,
-0.0800950527,
-0.2473694682,
0.0023987144,
-0.0961467251,
-0.1939751506,
-0.1913673133,
-0.0224670842,
-0.1187928319,
0.1438104957,
0.0872294605,
-0.0508306287,
0.2879405916,
0.0360641181,
0.0421624668,
0.2165590227,
-0.0343361534,
0.1342566162,
0.1307464242,
0.5509583354,
0.2441018373,
0.2075186521,
-0.008192759,
0.3790486753,
-0.110081479,
-0.0771011561,
-0.054614462,
0.0875650048,
0.1399329603,
0.4767222703,
-0.2333271503,
-0.1709544361,
-0.0430920683,
-0.054312367,
0.0099580698,
0.0024803542,
0.2184967101,
0.459628433,
0.1707854271,
0.1712559164,
0.1859496385,
0.2098779082,
0.114803344,
-0.0688315108,
-0.218357563,
-0.1541652679,
0.2162981182,
0.0351495966,
-0.0420308076,
0.2268219143,
0.0731886253,
0.188726902,
-0.1175667346,
0.0699679479,
0.2732225358,
0.1356362998,
0.2352598906,
-0.5406373739,
0.247304827,
0.1558994651,
-0.3606776595,
-0.353820771,
0.0626210049,
-0.100223273,
-0.3030183613,
-0.0439281315,
-0.0210315585,
-0.3015879989,
0.1510031819,
-0.0315898806,
0.3249507546,
0.0678390265,
0.2703396678,
0.398005724,
0.0139180981,
0.2147997171,
0.0231183171,
0.0114352256,
0.4221025109,
-0.038552016,
-0.6235334873,
-0.4271843433,
-0.0567949563,
0.0983284116,
0.0723429099,
-0.0330574922,
0.2198314816,
-0.1125571877,
-0.0502586886,
0.191644311,
-0.3836286664,
0.2618422508,
0.4828169048,
-0.2888580263,
0.1380440593,
0.4421451986,
0.0850281119,
-0.0783962756,
-0.0749431849,
0.1810777634,
-0.1197179556,
0.0337333754,
-0.0326992273,
-0.1435079724,
-0.3740644157,
-0.1517741084,
0.0044643357,
-0.0677141845,
0.2607992887,
-0.1733946651,
0.3144971132,
0.1797531843,
-0.1150381193,
0.0127916858,
0.0781217441,
0.2459311634,
-0.2255868018,
0.0905505419,
0.0810733587,
-0.5876047611,
0.0058918372,
-0.3214451373,
0.041677285,
-0.1873556823,
-0.4808942676,
-0.1556638479,
-0.1422926784,
0.1597000211,
-0.4150122702,
-0.0192603543,
0.1258565187,
-0.207333833,
-0.1992817521,
-0.4069609642,
0.0109966323,
-0.0986958519,
0.27725178,
-0.3563071489,
0.1548284292,
0.344370991,
0.1146947294,
-0.1531073302,
0.076346904,
0.1397607476,
-0.0651040897,
0.1548535973,
0.3248720169,
0.0179693624,
0.6038201451,
0.1306495517,
0.416624248,
0.0582293198,
0.0767299756,
0.1445853561,
0.0760669708,
-0.1495210379,
0.15238069,
-0.0657391101,
0.416195333,
0.0636915714,
0.281101644,
0.0199384689,
0.1184127629,
-0.2317801416,
-0.171087563,
-0.4485033751,
-0.3369158804,
0.1558884978,
-0.0243386813,
0.1225607246,
0.1830336899,
-0.2320762575,
0.1382437944,
0.4867061377,
-0.3173247576,
0.0239932723,
0.1297967732,
-0.2656705678,
0.1580068171,
0.2322458476,
0.323104918,
0.28673774,
0.239469856,
0.0687383711,
0.198101446,
0.1802076995,
0.0239493512,
0.2909256816,
0.2072955966,
-0.0971032977,
0.1177339107,
-0.1308974326,
-0.1448408812,
0.1288963854,
0.0378819108,
-0.2107937038,
0.0132203717,
-0.4229549468,
0.2986921668,
-0.2806165218,
-0.2747742236,
-0.5732252002,
0.1672846079,
-0.2866938114,
-0.4487183094,
0.1492958665,
-0.3464494646,
-0.3457984328,
0.3194854558,
-0.0344769135,
0.5397184491,
-0.1021584347,
0.1989433169,
-0.4335125983,
-0.068637304,
-0.0341501385,
-0.0356619209,
0.1388121396,
0.1156103015,
0.0614188761,
-0.2835662365,
-0.1546470225,
-0.2253977656,
-0.3233309388,
0.1690951437,
-0.2062088847,
0.2027804404,
0.2550831139,
-0.022731185,
0.0622034073,
-0.3148317039,
-0.1103443503,
-0.0673676804,
-0.0574808829,
0.0171100423,
-0.072609663,
0.351128906,
-0.288099885,
-0.0399903469,
0.1052840725,
-0.3069505394,
0.7045111656,
-0.3959383965,
0.1219856218,
0.650703907,
-0.2035207152,
0.4366972744,
-0.0826171935,
0.3348896205,
0.1882425547,
-0.0518541373,
0.0956456885,
-0.0461847037,
0.2713854015,
-0.5008633733,
-0.101902321,
-0.2713529468,
-0.139153868,
-0.5069950223,
-0.2255196869,
-0.430229485,
-0.460437119,
0.2304775566,
0.0909763351,
-0.0586979575,
0.1700609028,
-0.0421852171,
0.1322054863,
-0.2719260156,
0.1550212801,
-0.1330128312,
-0.0089531206,
0.0638807043,
0.1364891082,
0.1463652104,
0.4343572259,
0.3973286152,
0.0051057478,
-0.5073903203,
0.0641242415,
0.3171854615,
0.0283215046,
-0.244028762,
-0.1385980994,
0.020797126,
-0.3648210764,
-0.0674669594,
0.1058593988,
0.1766316593,
0.1004242897,
0.231042847,
0.0112018809,
-0.4799422026,
0.07504379,
-0.2151436657,
-0.1199964136,
-0.2261415869,
0.3898005486,
-0.0957807899,
0.0540860742,
0.1418316662,
0.3962549269,
-0.0332378559,
-0.0589783713,
-0.3074731827,
-0.1890878677,
-0.5284599662,
0.4252342284,
-0.0845706016,
0.0548269674,
-0.1712550074,
-0.6365632415,
0.0225231703,
0.2913701236,
-0.0731277764,
-0.0352563113,
0.065909937,
0.2296971232,
0.032777831,
-0.2901079059,
-0.0954053998,
-0.4920994937,
0.4512873888,
0.457624495,
0.5969652534,
-0.4474855661,
-0.3959896564,
0.1912864149,
-0.2400593907,
-0.0076183155,
0.2011221945,
-0.218529135,
-0.0769000351,
-0.1053548604,
-0.3052061796,
0.1202377528,
-0.0721467361,
-0.4518233538,
0.1842971146,
0.0454412624,
0.1027006209,
0.3930849135,
0.1082367599,
0.0826001093,
-0.0221834034,
0.0595441908,
0.2480271757,
0.1985568404,
0.0272423457,
0.5696777105,
0.0346869193,
-0.355832845,
0.010420952,
0.0990781635,
0.2703762054,
0.6357893348,
-0.162993148,
0.3763466179,
0.2563647032,
0.306286186,
-0.3317089379,
0.1575778723,
0.3540697396,
0.2253121883,
-0.3683911264,
0.0830773562,
0.6284778118,
0.1544094086,
-0.1889298856,
0.5192851424,
0.5616212487,
-0.4118131399,
0.26867342,
-0.0577190891,
1.0515260696,
-0.078727603,
0.2243225127,
-0.1575530767,
-0.480335772,
0.6950417757,
0.24165757,
0.1644829065,
-0.3481081724,
-0.1683150679,
0.1125306487,
-0.1930375099,
0.2504823506,
0.0173902921,
-0.2088647187,
-0.1195112914,
-0.2981644273,
0.2147113383,
-0.1959158629,
0.1088661402,
-0.2928400636,
-0.2047686279,
-0.5198538303,
-0.0758501291,
-0.0310845934,
0.1096590161,
-0.0427429006,
-0.1458023041,
-0.0122351497,
-0.1332192123,
-0.4343959689,
-0.4371863008,
0.3731705844,
0.0117541254,
0.416328311,
-0.381723702,
0.0303491727,
0.10533759,
0.3178354502,
0.0770623833,
-0.0895016193,
-0.0941722915,
-0.1707302779,
0.1812680066,
0.1049095318,
-0.006800238,
0.2435861826,
0.2293704748,
-0.0794020221,
0.155142203,
0.0602947101,
-0.1993075609,
0.0233043432,
-0.2982431054,
-0.3991324604,
-0.2535714209,
0.4907604754,
0.2858040631,
-0.0144476295,
0.0263370946,
0.0096714413,
0.1196758896,
-0.0478092618,
-0.0264440961,
0.1351393908,
-0.5101803541,
-0.0065174457,
0.2070389837,
-0.0250482,
-0.0228495002,
0.2854439914,
-0.0648546368,
-0.1146360561,
-0.0353613012,
0.4134578407,
0.3352816701,
-0.4740403593,
0.3915546238,
-0.0885800049,
-0.2742889225,
-0.1122127771,
0.0194243491,
0.2273575217,
0.1004938632,
-0.3486245275,
0.0035256743,
-0.5281158686,
0.6595488191,
-0.0181860197,
0.3323071599,
-0.4016899168,
0.0708378255,
-0.1490450799,
-0.0903485268,
-0.1915857345,
-0.061983522,
-0.2875704765,
0.0550512411,
0.0313848034,
-0.0612780266,
0.3700457513,
0.1234830171,
0.0375284553,
-0.2259987593,
-0.0690294132,
0.0227399468,
-0.0792108998,
0.1676867306,
-0.2555174828,
-0.2914047241,
0.1479952633,
0.0130969733,
0.0895103067,
-0.1912074983,
0.4658157229,
0.4780663252,
0.1995006353,
0.4964575768,
-0.3006249666,
0.2692774832,
0.0070000663,
-0.1602910608,
0.2643516958,
0.2556016147,
-0.0178002045,
0.1772619188,
-0.3485270143,
0.0726410747,
0.2780471444,
0.4325284958,
0.0382561237,
0.0531348586,
0.0897493958,
0.1792063117,
-0.2310961038,
0.1210644841,
0.0841104463,
0.4048546553,
-0.1895453334,
0.1114738956,
-0.2315520644,
0.0273106527,
0.0749088079,
0.1155578792,
-0.1632496715,
-0.0315433145,
0.0055295229,
0.4606440365,
-0.1514135301,
-0.1861303747,
0.5105667114,
0.027987428,
-0.1761784703,
-0.0367702693,
0.3669158518,
0.2180603743,
-0.1518859416,
-0.0931126475,
0.3715482354,
0.1189191639,
0.3561666012,
-0.1837507635,
0.0892956406,
0.1574730277,
-0.3492947817,
0.0968263298,
0.1640324593,
-0.0351880118,
-0.0019462289,
0.3601384163,
-0.3140518069,
0.0749962404,
0.0771069303,
0.2259922624,
0.0786421746,
0.0234903395,
-0.0648906305,
-0.2727425694,
-0.1009083912,
-0.3651108444,
0.3515726328,
-0.043048583,
-0.2642075419,
-0.2607118189,
-0.0327245221,
-0.3277742565,
0.1657453775,
-0.1916967332,
-0.0087692961,
-0.0123801436,
0.0968670547,
0.0728984922,
0.6242209077,
-0.2267071307,
-0.1102113277,
0.2185063064,
0.2157105207,
0.4750938714,
0.5750281811,
0.4337749779,
0.0192053393,
-0.065425396,
0.1829199493,
0.1801280528,
0.0772900134,
0.1416484714,
0.4321018159,
-0.2179043293,
0.0185501724,
0.1032304913,
0.0475986227,
0.0534622297,
-0.1279208809,
-0.243478924,
-0.0033831466,
-0.3434659541,
0.7594910264,
-0.1995000392,
-0.1174684912,
0.1308293045,
-0.1452648193,
-0.3394360244,
-0.5112400651,
0.4027397633,
0.1448567063,
0.0304179415,
0.0709595606,
0.0536246672,
-0.2660652101,
0.1413360834,
0.3206526637,
0.2523707449,
-0.0082950182,
0.0624708533,
-0.0955490768,
0.0539701991,
0.251924932,
-0.1733427048,
0.0429264158,
-0.1633803546,
0.1606699675,
0.1417632848,
0.148182869,
-0.265647769,
-0.0633656606,
-0.1437987387,
-0.2084690034,
-0.123207882,
0.0342567563,
-0.10477072,
0.115014784,
-0.075430043,
0.1405268312,
0.1080743223,
-0.1116308048,
-0.1077927351,
-0.0374136269,
0.2306875288,
0.2661677301,
0.2055823505,
0.1215527505,
-0.1538722664,
0.0611889139,
-0.602891326,
-0.1888505369,
-0.3893945217,
-0.163214609,
0.1578998268,
-0.2710797191,
-0.030938182,
-0.2790285051,
-0.1647613794,
-0.2068664879,
0.1150202155,
0.1234326288,
-0.1767786443,
-0.2039230466,
0.1764039993,
-0.212860465,
-0.1381820738,
0.0512239188,
0.3176153898,
0.09698686,
0.0999710038,
-0.1503223181,
-0.249514401,
0.5768630505,
-0.2938457131,
-0.096803695,
0.2487761229,
0.5207476616,
0.1378052235,
-0.1285884678,
-0.666039288,
-0.1548405439,
0.2529760599,
-0.3253513575,
0.1031191945,
0.0039319023,
-0.3482115865,
-0.1231613681,
-0.1825651079,
0.2663154006,
0.0733966231,
0.0431317613,
-0.0564294271,
-0.3381453454
] |
https://github.com/huggingface/datasets/issues/2542 | `datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA` | Hi @VictorSanh, thank you for reporting this issue with duplicated keys.
- The issue with "adversarial_qa" was fixed 23 days ago: #2433. Current version of `datasets` (1.8.0) includes the patch.
- I am investigating the issue with `drop`. I'll ping you to keep you informed. | ## Describe the bug
Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("drop")
load_dataset("adversarial_qa", "adversarialQA")
```
## Expected results
The examples keys should be unique.
## Actual results
```bash
>>> load_dataset("drop")
Using custom data configuration default
Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset
use_auth_token=use_auth_token,
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.10
- PyArrow version: 3.0.0
| 45 | `datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA`
## Describe the bug
Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("drop")
load_dataset("adversarial_qa", "adversarialQA")
```
## Expected results
The examples keys should be unique.
## Actual results
```bash
>>> load_dataset("drop")
Using custom data configuration default
Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset
use_auth_token=use_auth_token,
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.10
- PyArrow version: 3.0.0
Hi @VictorSanh, thank you for reporting this issue with duplicated keys.
- The issue with "adversarial_qa" was fixed 23 days ago: #2433. Current version of `datasets` (1.8.0) includes the patch.
- I am investigating the issue with `drop`. I'll ping you to keep you informed. | [
-0.0905085057,
-0.1160065979,
0.0094552375,
0.4709077477,
0.0840873718,
0.0286583155,
0.3028097153,
0.2397654206,
0.127797246,
0.1814352572,
-0.1439216137,
0.5057469606,
-0.0482955873,
0.1198931113,
0.0266699828,
-0.0327854939,
0.001284916,
0.0136726275,
-0.2982802093,
-0.0762100518,
-0.242640391,
0.3870503008,
-0.2559150457,
0.1033535749,
0.0598409884,
-0.1042754799,
-0.157246992,
0.3131026626,
-0.0433671065,
-0.2897952497,
0.1407249272,
0.0112544149,
-0.2836559713,
0.4620526433,
-0.0001087736,
-0.0179602653,
0.1347589642,
0.0638110042,
-0.4384643435,
-0.1568868458,
-0.2514856458,
-0.0515591055,
-0.08784879,
-0.2769972086,
0.1303327084,
-0.2024022788,
-0.3193137646,
-0.376553297,
0.7059348822,
0.0964305624,
0.2584538162,
0.2994431853,
0.0578671694,
-0.2653633058,
0.1903437376,
0.0376450531,
-0.199479416,
0.2062620372,
-0.0147559308,
-0.0670089126,
0.3541853726,
0.1603686512,
-0.0145847276,
-0.0506398529,
0.2040349245,
0.0678951442,
0.0129833436,
-0.1696084589,
0.3404414058,
0.3239117563,
0.2472786009,
-0.5006279349,
-0.2000302076,
-0.2800827026,
0.2844665647,
-0.089553833,
0.1983647645,
0.041196309,
-0.2488077283,
0.1426335871,
0.0665476397,
0.1313625425,
0.0587465465,
-0.0792370886,
0.1552489847,
-0.0006449297,
0.0497322716,
0.0894898772,
0.1573434174,
-0.1723115593,
-0.018509157,
-0.3647036254,
0.0199674703,
-0.1255143881,
-0.5385664105,
0.0129773095,
-0.0629283488,
0.0256691985,
0.4364520013,
0.0741026253,
0.2214870602,
-0.0984070152,
-0.0482477546,
0.0024114978,
0.0399043895,
0.3961122036,
0.1762891412,
0.0912110209,
0.1504673064,
0.1907205582,
-0.2307083011,
0.1641298831,
0.0568991676,
-0.1409792602,
0.2863471508,
0.1551884115,
0.6009869576,
-0.0693051368,
-0.4248116016,
0.2033165693,
-0.1676326692,
-0.124566704,
-0.2327314019,
0.1176539361,
0.0935676768,
-0.0219019204,
-0.1256782264,
0.2016175389,
-0.3297652602,
-0.1748312861,
-0.2609867752,
-0.0125089753,
-0.0085713789,
-0.0722295344,
0.0838417783,
-0.1811974347,
0.2779160738,
0.3087562919,
-0.0046126451,
-0.1379151046,
0.2745800912,
0.0929097533,
-0.2666789591,
0.03983403,
0.1705011427,
0.0668969229,
0.1879293174,
-0.3602024913,
0.060028255,
0.1122215241,
-0.0289518125,
-0.1286868602,
-0.117690675,
0.3158140481,
0.0256929919,
0.0972318649,
-0.1766064465,
0.1494120359,
0.1119308025,
0.0906807259,
-0.004402332,
0.0390728377,
-0.1598898917,
-0.4287464023,
0.2847686708,
0.7104178071,
-0.3256115317,
-0.1319527328,
-0.143119961,
0.0301798321,
0.1442248523,
0.2293823361,
-0.1759797335,
0.2083808035,
-0.3001041412,
0.1173928082,
0.0831042081,
-0.3428851664,
-0.491733849,
0.2908810675,
-0.3543905616,
0.1900272965,
0.1736859083,
-0.0551675074,
0.2153705359,
-0.0025119185,
0.0116512701,
-0.0165485628,
-0.0907609388,
-0.135310635,
-0.3101505041,
-0.3366243243,
0.174913615,
-0.2637748718,
0.0284839701,
0.0655981898,
0.3573909998,
-0.0704979822,
0.2868717611,
-0.0610243939,
0.04679019,
0.0863298252,
0.25373438,
-0.0603282377,
0.2205082476,
-0.0193941221,
-0.5272818208,
0.3890168965,
-0.285618186,
0.0389644913,
-0.1500827372,
-0.2936634719,
-0.5489763021,
0.054138273,
-0.4572041035,
-0.250184387,
0.2487701029,
0.1914097369,
-0.0284579098,
0.1142125428,
-0.0647343099,
0.2220263332,
0.0449404046,
0.0490150154,
-0.4242558479,
0.2599346042,
-0.3817820251,
0.0526821613,
0.0838972479,
0.2135800421,
0.4154091179,
-0.0532194339,
-0.1252100021,
0.3929847479,
-0.0362854749,
0.0151392855,
0.2010872364,
-0.1390541494,
0.212239936,
-0.135364607,
0.266281575,
0.1070592925,
0.1830840707,
-0.139824152,
-0.0121196527,
0.2761811316,
-0.1850380599,
0.1524389684,
-0.0569086857,
-0.005315043,
0.1371268034,
-0.230172351,
0.1511038244,
-0.2182910591,
0.0741775185,
-0.106757924,
0.1758690774,
-0.0325053111,
-0.1456292272,
0.177807793,
0.1834480613,
-0.1542735398,
0.1718084812,
-0.0479232892,
0.0327790976,
-0.0946388394,
0.0258921776,
0.5896529555,
0.6832956076,
0.1840274334,
0.0930984914,
0.1825769991,
0.0101522394,
-0.1736517251,
0.4018147588,
-0.2306769341,
-0.1879463792,
0.3399558067,
0.1338032484,
0.0912760049,
-0.37791273,
-0.0704190657,
0.1394078434,
0.2234370261,
-0.2576570511,
-0.0136112981,
-0.4151091576,
-0.0433586538,
-0.1474149972,
0.2553113103,
-0.0163312927,
-0.328887403,
0.1003980339,
-0.1701000035,
0.0378062055,
0.2827535868,
-0.0802973434,
0.219317466,
-0.0255134106,
0.3116762638,
-0.1784823239,
0.0661216974,
-0.2623887658,
0.1238635555,
0.0868651569,
0.1311300099,
0.4407126307,
-0.1406989694,
-0.3182706535,
-0.3026197851,
-0.2035524845,
0.1379108131,
-0.0104993712,
0.3564635813,
0.3850198984,
0.01861245,
-0.192981571,
-0.3572027981,
0.2555488944,
-0.0953961238,
-0.4541634917,
0.0896261856,
-0.0987126604,
0.0308773629,
-0.1922011375,
-0.5104907751,
-0.1726350337,
-0.2520095706,
0.0773614869,
-0.1438834071,
0.1406254768,
0.3311221004,
-0.0303111617,
0.1407975852,
0.0260427929,
0.098814182,
-0.4347648323,
-0.1841466427,
0.0602045245,
-0.2762187123,
-0.297478348,
-0.0169336945,
-0.1227034479,
0.3157137632,
-0.1157889515,
-0.4564089477,
-0.3070780635,
-0.249256283,
0.3409289122,
-0.1840696633,
0.2868568897,
0.1675692499,
0.1474983841,
-0.1426559985,
-0.241671741,
-0.0538783148,
0.280436486,
-0.2117326856,
0.0400799885,
0.1509509087,
0.5182061791,
0.0724675208,
0.6133500934,
0.5002939105,
0.088274315,
0.279117465,
-0.0928220227,
0.2891703844,
-0.1708507985,
-0.4779528677,
-0.2943907082,
0.1661695838,
0.206133008,
0.2267426848,
-0.1307823956,
0.126014933,
0.0918804035,
-0.0914259776,
-0.4983184934,
-0.280993104,
-0.2584247291,
-0.2079370469,
0.0594165139,
0.0559902042,
0.0944303721,
-0.0589041151,
0.1520701051,
0.1882858425,
0.1523129046,
0.0250053406,
0.0236910805,
-0.328214258,
0.0291184969,
-0.4109378457,
0.2250788808,
-0.2089008987,
0.3213146031,
-0.1174955368,
0.1202064455,
0.0278091133,
-0.010815464,
0.6370674372,
-0.3670236468,
0.1646799743,
0.084231101,
-0.1588382274,
-0.121183157,
-0.0301569253,
-0.0135968029,
0.1148913354,
-0.0315828472,
0.2285148203,
-0.5454474688,
0.1311468631,
0.2034051269,
0.271673739,
-0.1741940081,
-0.2394860536,
-0.0387505032,
-0.4927271008,
-0.498588711,
-0.1477439106,
0.0117496774,
0.2282521278,
-0.1652648747,
-0.0506203026,
0.0157091934,
-0.1714574248,
0.1775357276,
0.1479468793,
0.2621706724,
0.2157788575,
0.6348121762,
0.1356798261,
-0.1521138102,
0.1617397219,
0.6787909865,
-0.1573693901,
-0.2183034569,
-0.2806075215,
-0.172932595,
-0.224773109,
0.2754724622,
-0.1484751403,
0.3007210195,
-0.1415907592,
0.0204611607,
0.2139417529,
-0.3148278594,
0.2035318911,
-0.1699670553,
0.0089356378,
-0.3534319401,
0.0157120675,
-0.0586178266,
-0.2973247468,
0.1694924831,
0.1423404664,
-0.2212100923,
0.3661331832,
-0.1916655004,
0.877738595,
-0.0657744855,
0.0092349816,
0.1628193557,
-0.2247974724,
0.3618405163,
0.0900776908,
-0.1640423685,
-0.4612333179,
-0.3005611897,
0.1581873149,
0.0517322123,
0.1566578448,
0.1095852405,
-0.2995366454,
0.20863913,
-0.118192561,
0.0969923586,
-0.0475664362,
0.2875967324,
-0.2880062461,
0.0701050162,
-0.1188700199,
0.1461496204,
0.0694422126,
0.0494908616,
0.0489635356,
-0.1171792448,
0.1988665909,
-0.4868974984,
-0.2058997005,
0.0336262435,
-0.3923664391,
0.3286433518,
-0.1180855185,
-0.3370566964,
0.2058613896,
0.4307637811,
0.4622984827,
0.2482504845,
0.0187582765,
0.0546284392,
-0.0069999769,
0.2869395614,
-0.1258174777,
-0.2343725413,
-0.0116666555,
-0.1105601788,
-0.3548018932,
-0.1090685576,
0.1537509114,
-0.0820784569,
-0.2488623857,
0.1152268797,
-0.0675450265,
-0.124665983,
0.0234343894,
-0.1411093473,
-0.1776533723,
-0.4434711933,
0.1303863078,
0.1312361658,
-0.175439775,
0.2219365388,
-0.1883816421,
-0.1558761597,
-0.0415970422,
0.3397011757,
0.1883186698,
0.2474417686,
0.5482301116,
0.0551552176,
0.0425939932,
-0.2531750798,
-0.0076903999,
0.0406288765,
-0.4769058824,
0.1915145814,
-0.2640394866,
0.1442857534,
0.1088687778,
0.3577144444,
0.2171236873,
0.1366255879,
0.1687985063,
-0.3037642837,
-0.1269868612,
0.0299507957,
0.1908327341,
0.2174737453,
0.1731235385,
-0.0191916265,
-0.1452842951,
0.3274480402,
-0.3689515591,
0.2378380001,
-0.0046651289,
-0.0102386195,
0.000704838,
-0.1199512184,
0.0396755598,
0.1199862733,
0.202909559,
0.2261535227,
-0.0559355691,
-0.2679729164,
-0.2521992326,
0.1316016465,
-0.2184980661,
-0.1682141423,
-0.0694027022,
-0.2364602387,
-0.058673311,
-0.0839180574,
0.4266133904,
0.137183249,
0.0029951502,
0.1578781605,
0.1529670209,
0.1456464827,
-0.1631800532,
0.1880169213,
-0.2690668702,
0.0163337737,
0.1415005028,
0.0948353484,
-0.0189502817,
-0.1715522707,
-0.3372677565,
0.0826948956,
-0.0560488068,
0.1779658496,
0.2785223722,
-0.2052520663,
-0.2647079229,
0.4296861291,
0.2974286079,
0.0996679366,
-0.1986871809,
0.0051001683,
0.0335957259,
0.2705051303,
-0.3992034197,
-0.4369935393,
0.1719175577,
-0.1399968714,
0.1139139161,
0.3059455156,
0.2254581749,
-0.3515102863,
-0.2786740065,
0.1173190922,
0.3834747076,
-0.0804789215,
0.2226230502,
0.4485848546,
-0.0854706392,
-0.0763477534,
0.0265164878,
-0.1229588464,
-0.026119858,
0.3270572126,
-0.235809058,
0.3113100231,
-0.1389686763,
0.0790471584,
0.2696993351,
-0.3729178309,
0.4485180378,
0.1381930709,
-0.2525948286,
0.0229353178,
0.153645426,
0.1603440493,
-0.0875268951,
0.080473423,
-0.217544049,
0.1058720648,
-0.1773340702,
-0.0396666266,
-0.1882717609,
-0.2591829896,
-0.18296583,
-0.0938079357,
-0.0120981485,
-0.1587509066,
0.3571465611,
-0.0653851032,
-0.2649567425,
-0.2993309498,
0.0447380841,
0.2955609858,
0.1373045146,
-0.4245441854,
0.0067301001,
0.5594318509,
-0.0806821138,
-0.0790802985,
0.2808080614,
0.5457741618,
0.1270320266,
-0.0827854574,
0.1383130848,
0.1929415762,
-0.063737601,
-0.1260758042,
0.2143978179,
-0.0173142478,
0.1705466807,
0.2234162241,
0.1514258385,
-0.2110046893,
-0.2321828455,
0.4559076428,
-0.1453309357,
-0.3635571897,
0.1920876503,
-0.2378397435,
-0.03235697,
-0.0969724655,
0.3651043773,
-0.2949543595,
-0.1943059564,
0.1872399747,
0.234721452,
0.1408712715,
-0.427559793,
0.1380084157,
-0.1543762833,
0.1261256635,
0.2467406988,
-0.1832294464,
-0.3851377666,
-0.0157499015,
-0.7335857153,
0.2009658068,
-0.1504069269,
-0.0707663745,
0.0706767514,
0.2328766137,
-0.0135099478,
0.0742940605,
0.2322017848,
0.2283026427,
-0.0936848,
0.4965486825,
-0.4009828568,
-0.225074634,
0.113750957,
-0.1236985624,
0.0905502439,
-0.4316610694,
0.2643920779,
-0.0150295384,
0.0841799527,
-0.0555540323,
0.0026558489,
0.3295315504,
-0.2390794754,
0.2479808629,
0.3015715778,
0.4559419155,
-0.1107433364,
-0.280184716,
0.0129054748,
-0.0368631594,
-0.0411266387,
0.2801690102,
0.321718812,
0.2556380332,
0.1058467478,
-0.2885211706,
-0.22451967,
0.3387835324,
0.2152881622,
0.0428715125,
-0.3165061474,
0.404150784,
-0.0445989743,
0.0526791587,
0.1392771602,
0.3226177096,
-0.0196400471,
0.2745648026,
-0.3327929974,
-0.6344323754,
0.3417710662,
-0.3225762546,
-0.1796860546,
-0.2740093172,
0.3677445352,
-0.083162494,
-0.1276745796,
-0.2130843103,
0.1397540867,
0.4295461476,
-0.24910146,
0.0651855767,
0.3638624847,
-0.0633860454,
0.1249611527,
0.2045359612,
0.1447394192,
0.1241830811,
-0.2364502847,
0.5228367448,
-0.1628025323
] |
https://github.com/huggingface/datasets/issues/2542 | `datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA` | Hi @VictorSanh, the issue is already fixed and merged into master branch and will be included in our next release version 1.9.0. | ## Describe the bug
Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("drop")
load_dataset("adversarial_qa", "adversarialQA")
```
## Expected results
The examples keys should be unique.
## Actual results
```bash
>>> load_dataset("drop")
Using custom data configuration default
Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset
use_auth_token=use_auth_token,
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.10
- PyArrow version: 3.0.0
| 22 | `datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA`
## Describe the bug
Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("drop")
load_dataset("adversarial_qa", "adversarialQA")
```
## Expected results
The examples keys should be unique.
## Actual results
```bash
>>> load_dataset("drop")
Using custom data configuration default
Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset
use_auth_token=use_auth_token,
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.10
- PyArrow version: 3.0.0
Hi @VictorSanh, the issue is already fixed and merged into master branch and will be included in our next release version 1.9.0. | [
-0.0905085057,
-0.1160065979,
0.0094552375,
0.4709077477,
0.0840873718,
0.0286583155,
0.3028097153,
0.2397654206,
0.127797246,
0.1814352572,
-0.1439216137,
0.5057469606,
-0.0482955873,
0.1198931113,
0.0266699828,
-0.0327854939,
0.001284916,
0.0136726275,
-0.2982802093,
-0.0762100518,
-0.242640391,
0.3870503008,
-0.2559150457,
0.1033535749,
0.0598409884,
-0.1042754799,
-0.157246992,
0.3131026626,
-0.0433671065,
-0.2897952497,
0.1407249272,
0.0112544149,
-0.2836559713,
0.4620526433,
-0.0001087736,
-0.0179602653,
0.1347589642,
0.0638110042,
-0.4384643435,
-0.1568868458,
-0.2514856458,
-0.0515591055,
-0.08784879,
-0.2769972086,
0.1303327084,
-0.2024022788,
-0.3193137646,
-0.376553297,
0.7059348822,
0.0964305624,
0.2584538162,
0.2994431853,
0.0578671694,
-0.2653633058,
0.1903437376,
0.0376450531,
-0.199479416,
0.2062620372,
-0.0147559308,
-0.0670089126,
0.3541853726,
0.1603686512,
-0.0145847276,
-0.0506398529,
0.2040349245,
0.0678951442,
0.0129833436,
-0.1696084589,
0.3404414058,
0.3239117563,
0.2472786009,
-0.5006279349,
-0.2000302076,
-0.2800827026,
0.2844665647,
-0.089553833,
0.1983647645,
0.041196309,
-0.2488077283,
0.1426335871,
0.0665476397,
0.1313625425,
0.0587465465,
-0.0792370886,
0.1552489847,
-0.0006449297,
0.0497322716,
0.0894898772,
0.1573434174,
-0.1723115593,
-0.018509157,
-0.3647036254,
0.0199674703,
-0.1255143881,
-0.5385664105,
0.0129773095,
-0.0629283488,
0.0256691985,
0.4364520013,
0.0741026253,
0.2214870602,
-0.0984070152,
-0.0482477546,
0.0024114978,
0.0399043895,
0.3961122036,
0.1762891412,
0.0912110209,
0.1504673064,
0.1907205582,
-0.2307083011,
0.1641298831,
0.0568991676,
-0.1409792602,
0.2863471508,
0.1551884115,
0.6009869576,
-0.0693051368,
-0.4248116016,
0.2033165693,
-0.1676326692,
-0.124566704,
-0.2327314019,
0.1176539361,
0.0935676768,
-0.0219019204,
-0.1256782264,
0.2016175389,
-0.3297652602,
-0.1748312861,
-0.2609867752,
-0.0125089753,
-0.0085713789,
-0.0722295344,
0.0838417783,
-0.1811974347,
0.2779160738,
0.3087562919,
-0.0046126451,
-0.1379151046,
0.2745800912,
0.0929097533,
-0.2666789591,
0.03983403,
0.1705011427,
0.0668969229,
0.1879293174,
-0.3602024913,
0.060028255,
0.1122215241,
-0.0289518125,
-0.1286868602,
-0.117690675,
0.3158140481,
0.0256929919,
0.0972318649,
-0.1766064465,
0.1494120359,
0.1119308025,
0.0906807259,
-0.004402332,
0.0390728377,
-0.1598898917,
-0.4287464023,
0.2847686708,
0.7104178071,
-0.3256115317,
-0.1319527328,
-0.143119961,
0.0301798321,
0.1442248523,
0.2293823361,
-0.1759797335,
0.2083808035,
-0.3001041412,
0.1173928082,
0.0831042081,
-0.3428851664,
-0.491733849,
0.2908810675,
-0.3543905616,
0.1900272965,
0.1736859083,
-0.0551675074,
0.2153705359,
-0.0025119185,
0.0116512701,
-0.0165485628,
-0.0907609388,
-0.135310635,
-0.3101505041,
-0.3366243243,
0.174913615,
-0.2637748718,
0.0284839701,
0.0655981898,
0.3573909998,
-0.0704979822,
0.2868717611,
-0.0610243939,
0.04679019,
0.0863298252,
0.25373438,
-0.0603282377,
0.2205082476,
-0.0193941221,
-0.5272818208,
0.3890168965,
-0.285618186,
0.0389644913,
-0.1500827372,
-0.2936634719,
-0.5489763021,
0.054138273,
-0.4572041035,
-0.250184387,
0.2487701029,
0.1914097369,
-0.0284579098,
0.1142125428,
-0.0647343099,
0.2220263332,
0.0449404046,
0.0490150154,
-0.4242558479,
0.2599346042,
-0.3817820251,
0.0526821613,
0.0838972479,
0.2135800421,
0.4154091179,
-0.0532194339,
-0.1252100021,
0.3929847479,
-0.0362854749,
0.0151392855,
0.2010872364,
-0.1390541494,
0.212239936,
-0.135364607,
0.266281575,
0.1070592925,
0.1830840707,
-0.139824152,
-0.0121196527,
0.2761811316,
-0.1850380599,
0.1524389684,
-0.0569086857,
-0.005315043,
0.1371268034,
-0.230172351,
0.1511038244,
-0.2182910591,
0.0741775185,
-0.106757924,
0.1758690774,
-0.0325053111,
-0.1456292272,
0.177807793,
0.1834480613,
-0.1542735398,
0.1718084812,
-0.0479232892,
0.0327790976,
-0.0946388394,
0.0258921776,
0.5896529555,
0.6832956076,
0.1840274334,
0.0930984914,
0.1825769991,
0.0101522394,
-0.1736517251,
0.4018147588,
-0.2306769341,
-0.1879463792,
0.3399558067,
0.1338032484,
0.0912760049,
-0.37791273,
-0.0704190657,
0.1394078434,
0.2234370261,
-0.2576570511,
-0.0136112981,
-0.4151091576,
-0.0433586538,
-0.1474149972,
0.2553113103,
-0.0163312927,
-0.328887403,
0.1003980339,
-0.1701000035,
0.0378062055,
0.2827535868,
-0.0802973434,
0.219317466,
-0.0255134106,
0.3116762638,
-0.1784823239,
0.0661216974,
-0.2623887658,
0.1238635555,
0.0868651569,
0.1311300099,
0.4407126307,
-0.1406989694,
-0.3182706535,
-0.3026197851,
-0.2035524845,
0.1379108131,
-0.0104993712,
0.3564635813,
0.3850198984,
0.01861245,
-0.192981571,
-0.3572027981,
0.2555488944,
-0.0953961238,
-0.4541634917,
0.0896261856,
-0.0987126604,
0.0308773629,
-0.1922011375,
-0.5104907751,
-0.1726350337,
-0.2520095706,
0.0773614869,
-0.1438834071,
0.1406254768,
0.3311221004,
-0.0303111617,
0.1407975852,
0.0260427929,
0.098814182,
-0.4347648323,
-0.1841466427,
0.0602045245,
-0.2762187123,
-0.297478348,
-0.0169336945,
-0.1227034479,
0.3157137632,
-0.1157889515,
-0.4564089477,
-0.3070780635,
-0.249256283,
0.3409289122,
-0.1840696633,
0.2868568897,
0.1675692499,
0.1474983841,
-0.1426559985,
-0.241671741,
-0.0538783148,
0.280436486,
-0.2117326856,
0.0400799885,
0.1509509087,
0.5182061791,
0.0724675208,
0.6133500934,
0.5002939105,
0.088274315,
0.279117465,
-0.0928220227,
0.2891703844,
-0.1708507985,
-0.4779528677,
-0.2943907082,
0.1661695838,
0.206133008,
0.2267426848,
-0.1307823956,
0.126014933,
0.0918804035,
-0.0914259776,
-0.4983184934,
-0.280993104,
-0.2584247291,
-0.2079370469,
0.0594165139,
0.0559902042,
0.0944303721,
-0.0589041151,
0.1520701051,
0.1882858425,
0.1523129046,
0.0250053406,
0.0236910805,
-0.328214258,
0.0291184969,
-0.4109378457,
0.2250788808,
-0.2089008987,
0.3213146031,
-0.1174955368,
0.1202064455,
0.0278091133,
-0.010815464,
0.6370674372,
-0.3670236468,
0.1646799743,
0.084231101,
-0.1588382274,
-0.121183157,
-0.0301569253,
-0.0135968029,
0.1148913354,
-0.0315828472,
0.2285148203,
-0.5454474688,
0.1311468631,
0.2034051269,
0.271673739,
-0.1741940081,
-0.2394860536,
-0.0387505032,
-0.4927271008,
-0.498588711,
-0.1477439106,
0.0117496774,
0.2282521278,
-0.1652648747,
-0.0506203026,
0.0157091934,
-0.1714574248,
0.1775357276,
0.1479468793,
0.2621706724,
0.2157788575,
0.6348121762,
0.1356798261,
-0.1521138102,
0.1617397219,
0.6787909865,
-0.1573693901,
-0.2183034569,
-0.2806075215,
-0.172932595,
-0.224773109,
0.2754724622,
-0.1484751403,
0.3007210195,
-0.1415907592,
0.0204611607,
0.2139417529,
-0.3148278594,
0.2035318911,
-0.1699670553,
0.0089356378,
-0.3534319401,
0.0157120675,
-0.0586178266,
-0.2973247468,
0.1694924831,
0.1423404664,
-0.2212100923,
0.3661331832,
-0.1916655004,
0.877738595,
-0.0657744855,
0.0092349816,
0.1628193557,
-0.2247974724,
0.3618405163,
0.0900776908,
-0.1640423685,
-0.4612333179,
-0.3005611897,
0.1581873149,
0.0517322123,
0.1566578448,
0.1095852405,
-0.2995366454,
0.20863913,
-0.118192561,
0.0969923586,
-0.0475664362,
0.2875967324,
-0.2880062461,
0.0701050162,
-0.1188700199,
0.1461496204,
0.0694422126,
0.0494908616,
0.0489635356,
-0.1171792448,
0.1988665909,
-0.4868974984,
-0.2058997005,
0.0336262435,
-0.3923664391,
0.3286433518,
-0.1180855185,
-0.3370566964,
0.2058613896,
0.4307637811,
0.4622984827,
0.2482504845,
0.0187582765,
0.0546284392,
-0.0069999769,
0.2869395614,
-0.1258174777,
-0.2343725413,
-0.0116666555,
-0.1105601788,
-0.3548018932,
-0.1090685576,
0.1537509114,
-0.0820784569,
-0.2488623857,
0.1152268797,
-0.0675450265,
-0.124665983,
0.0234343894,
-0.1411093473,
-0.1776533723,
-0.4434711933,
0.1303863078,
0.1312361658,
-0.175439775,
0.2219365388,
-0.1883816421,
-0.1558761597,
-0.0415970422,
0.3397011757,
0.1883186698,
0.2474417686,
0.5482301116,
0.0551552176,
0.0425939932,
-0.2531750798,
-0.0076903999,
0.0406288765,
-0.4769058824,
0.1915145814,
-0.2640394866,
0.1442857534,
0.1088687778,
0.3577144444,
0.2171236873,
0.1366255879,
0.1687985063,
-0.3037642837,
-0.1269868612,
0.0299507957,
0.1908327341,
0.2174737453,
0.1731235385,
-0.0191916265,
-0.1452842951,
0.3274480402,
-0.3689515591,
0.2378380001,
-0.0046651289,
-0.0102386195,
0.000704838,
-0.1199512184,
0.0396755598,
0.1199862733,
0.202909559,
0.2261535227,
-0.0559355691,
-0.2679729164,
-0.2521992326,
0.1316016465,
-0.2184980661,
-0.1682141423,
-0.0694027022,
-0.2364602387,
-0.058673311,
-0.0839180574,
0.4266133904,
0.137183249,
0.0029951502,
0.1578781605,
0.1529670209,
0.1456464827,
-0.1631800532,
0.1880169213,
-0.2690668702,
0.0163337737,
0.1415005028,
0.0948353484,
-0.0189502817,
-0.1715522707,
-0.3372677565,
0.0826948956,
-0.0560488068,
0.1779658496,
0.2785223722,
-0.2052520663,
-0.2647079229,
0.4296861291,
0.2974286079,
0.0996679366,
-0.1986871809,
0.0051001683,
0.0335957259,
0.2705051303,
-0.3992034197,
-0.4369935393,
0.1719175577,
-0.1399968714,
0.1139139161,
0.3059455156,
0.2254581749,
-0.3515102863,
-0.2786740065,
0.1173190922,
0.3834747076,
-0.0804789215,
0.2226230502,
0.4485848546,
-0.0854706392,
-0.0763477534,
0.0265164878,
-0.1229588464,
-0.026119858,
0.3270572126,
-0.235809058,
0.3113100231,
-0.1389686763,
0.0790471584,
0.2696993351,
-0.3729178309,
0.4485180378,
0.1381930709,
-0.2525948286,
0.0229353178,
0.153645426,
0.1603440493,
-0.0875268951,
0.080473423,
-0.217544049,
0.1058720648,
-0.1773340702,
-0.0396666266,
-0.1882717609,
-0.2591829896,
-0.18296583,
-0.0938079357,
-0.0120981485,
-0.1587509066,
0.3571465611,
-0.0653851032,
-0.2649567425,
-0.2993309498,
0.0447380841,
0.2955609858,
0.1373045146,
-0.4245441854,
0.0067301001,
0.5594318509,
-0.0806821138,
-0.0790802985,
0.2808080614,
0.5457741618,
0.1270320266,
-0.0827854574,
0.1383130848,
0.1929415762,
-0.063737601,
-0.1260758042,
0.2143978179,
-0.0173142478,
0.1705466807,
0.2234162241,
0.1514258385,
-0.2110046893,
-0.2321828455,
0.4559076428,
-0.1453309357,
-0.3635571897,
0.1920876503,
-0.2378397435,
-0.03235697,
-0.0969724655,
0.3651043773,
-0.2949543595,
-0.1943059564,
0.1872399747,
0.234721452,
0.1408712715,
-0.427559793,
0.1380084157,
-0.1543762833,
0.1261256635,
0.2467406988,
-0.1832294464,
-0.3851377666,
-0.0157499015,
-0.7335857153,
0.2009658068,
-0.1504069269,
-0.0707663745,
0.0706767514,
0.2328766137,
-0.0135099478,
0.0742940605,
0.2322017848,
0.2283026427,
-0.0936848,
0.4965486825,
-0.4009828568,
-0.225074634,
0.113750957,
-0.1236985624,
0.0905502439,
-0.4316610694,
0.2643920779,
-0.0150295384,
0.0841799527,
-0.0555540323,
0.0026558489,
0.3295315504,
-0.2390794754,
0.2479808629,
0.3015715778,
0.4559419155,
-0.1107433364,
-0.280184716,
0.0129054748,
-0.0368631594,
-0.0411266387,
0.2801690102,
0.321718812,
0.2556380332,
0.1058467478,
-0.2885211706,
-0.22451967,
0.3387835324,
0.2152881622,
0.0428715125,
-0.3165061474,
0.404150784,
-0.0445989743,
0.0526791587,
0.1392771602,
0.3226177096,
-0.0196400471,
0.2745648026,
-0.3327929974,
-0.6344323754,
0.3417710662,
-0.3225762546,
-0.1796860546,
-0.2740093172,
0.3677445352,
-0.083162494,
-0.1276745796,
-0.2130843103,
0.1397540867,
0.4295461476,
-0.24910146,
0.0651855767,
0.3638624847,
-0.0633860454,
0.1249611527,
0.2045359612,
0.1447394192,
0.1241830811,
-0.2364502847,
0.5228367448,
-0.1628025323
] |
https://github.com/huggingface/datasets/issues/2538 | Loading partial dataset when debugging | Hi ! `load_dataset` downloads the full dataset once and caches it, so that subsequent calls to `load_dataset` just reloads the dataset from your disk.
Then when you specify a `split` in `load_dataset`, it will just load the requested split from the disk. If your specified split is a sliced split (e.g. `"train[:10]"`), then it will load the 10 first rows of the train split that you have on disk.
Therefore, as long as you don't delete your cache, all your calls to `load_dataset` will be very fast. Except the first call that downloads the dataset of course ^^ | I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks! | 98 | Loading partial dataset when debugging
I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks!
Hi ! `load_dataset` downloads the full dataset once and caches it, so that subsequent calls to `load_dataset` just reloads the dataset from your disk.
Then when you specify a `split` in `load_dataset`, it will just load the requested split from the disk. If your specified split is a sliced split (e.g. `"train[:10]"`), then it will load the 10 first rows of the train split that you have on disk.
Therefore, as long as you don't delete your cache, all your calls to `load_dataset` will be very fast. Except the first call that downloads the dataset of course ^^ | [
-0.3671889901,
-0.1431685239,
-0.0216083787,
0.3622047007,
-0.0675305128,
0.2756693959,
0.5740375519,
0.416804105,
0.2612757087,
-0.0835100561,
-0.0828442574,
0.1403204203,
-0.17392084,
0.1820894331,
0.0995868593,
0.1087069809,
-0.1426475793,
0.3165223598,
0.0734350979,
-0.0784855708,
0.1707004011,
-0.2612391114,
-0.1748517603,
-0.1787911654,
-0.4388397336,
0.0658319592,
0.0724345222,
0.1917065978,
0.2921259403,
-0.1966114342,
0.3809174001,
0.1237110049,
0.0042908564,
0.1477994025,
-0.0001250374,
0.0485775471,
0.4530164897,
-0.1177271754,
-0.4413949549,
0.0793151855,
-0.2372335047,
-0.0172558762,
0.444910109,
-0.0426377654,
-0.0530505702,
-0.1875392199,
0.0052163787,
-0.3129990697,
0.2829739451,
-0.0120450519,
0.0667554066,
0.0641539544,
-0.5506687164,
0.1383746713,
0.2196930051,
-0.0400902741,
0.0063698068,
0.3839597404,
0.4114598036,
0.0257233009,
-0.318921268,
0.1433298141,
-0.1303000748,
0.2568037808,
0.3651659489,
-0.0175334532,
0.0169918202,
-0.4844473898,
0.277962327,
0.3971954286,
0.6139984131,
0.017797729,
-0.3248313367,
-0.5615001917,
0.0680838525,
-0.1019033715,
0.1404102892,
-0.0329522006,
-0.4404363036,
-0.0019115377,
-0.503777504,
-0.1788007021,
0.0656843483,
0.1815217435,
0.0742578134,
-0.2963500917,
0.0635767728,
0.1199378669,
0.4592186809,
0.2257743925,
0.3110455573,
-0.0591476038,
0.0867828578,
0.1040572301,
-0.3470099568,
0.0552105904,
-0.1715556681,
-0.0937869996,
-0.0360147543,
0.5328015685,
-0.0335628763,
0.4623100162,
0.1792251021,
0.0048953881,
0.5818147063,
-0.1044393778,
0.1357751489,
0.1604956836,
0.3302035332,
-0.3076428473,
-0.0562029518,
-0.0291393418,
-0.4441227913,
-0.1446471065,
0.2911396623,
-0.0331761613,
-0.0609829128,
-0.3301863968,
-0.0984939411,
-0.345772177,
0.1044792533,
-0.0277235191,
0.2356436849,
0.450866878,
0.0771403089,
0.0577648953,
-0.1905168593,
0.0967730209,
-0.2860886157,
-0.0646087527,
-0.1252986789,
-0.1794557273,
-0.0533977561,
0.1343159676,
0.3456486762,
-0.3430443704,
0.3036071956,
-0.0918702781,
0.4442438185,
-0.194200635,
0.1545957327,
-0.2542305589,
-0.0301960818,
0.1774716824,
-0.0150247142,
0.2808523774,
0.1144266203,
0.256408155,
-0.305434972,
0.4385035038,
-0.1146828756,
-0.3874349594,
0.0642130375,
-0.0014647534,
-0.3882310987,
0.244288817,
-0.1981088817,
0.236418426,
0.1910143197,
-0.2338834107,
-0.2300256938,
0.0961131006,
0.0001003146,
-0.1139453799,
0.6939178705,
0.3801715374,
-0.1435455084,
-0.2851573825,
-0.2555276453,
0.0346328542,
0.2755737305,
0.2422010601,
-0.4427697957,
0.232446745,
-0.1369288862,
-0.0750613213,
0.5813106298,
-0.0458763354,
-0.389980942,
0.4592674971,
-0.0660862401,
0.2072698325,
-0.0639578104,
0.5403295755,
0.2244981378,
0.0629711896,
0.1113069654,
0.4323063791,
-0.1434761286,
0.1165146679,
-0.2158845663,
-0.1530448198,
0.1313550174,
0.4665029049,
0.0372895934,
0.1652178168,
-0.0386098251,
0.1996421516,
0.1884551793,
0.0003336463,
-0.0666797608,
0.1926487982,
-0.1065418571,
0.0639997125,
0.0371611901,
-0.2812865973,
-0.561496675,
0.3774620295,
0.1746423393,
-0.3102478385,
-0.0822078884,
-0.0205233283,
-0.1016742438,
-0.1576439142,
-0.0180430058,
-0.0850499719,
-0.1891312152,
0.0147953462,
-0.0793386698,
-0.3969838619,
-0.4567692876,
0.1184229404,
0.0288375914,
-0.0162684787,
-0.3463565409,
0.1118146926,
0.3637426198,
-0.0564942136,
-0.0430021323,
-0.0884557888,
0.0026184199,
-0.266302228,
-0.0660596043,
0.3327569366,
0.1487978846,
0.2904266715,
0.0450857952,
0.1757802367,
-0.0158163253,
-0.0804259479,
0.3634445369,
-0.0561743677,
0.002339974,
-0.1930640042,
-0.1984040737,
0.3541494012,
-0.4528668523,
0.4073087871,
0.0399319008,
-0.2771592736,
0.1374358237,
-0.1565609574,
-0.131467402,
-0.0885142237,
0.4653719068,
-0.2589768469,
0.3783654571,
0.24758555,
-0.0831933022,
-0.1018936932,
0.2595183253,
-0.0359506011,
0.0045657661,
0.296041131,
-0.462066561,
-0.0278335027,
-0.1357199103,
-0.1868362427,
0.0805441588,
0.141146332,
0.1734264493,
-0.2135947794,
0.2454041243,
-0.0822361633,
0.1437816918,
0.0757912546,
0.1059344113,
0.1493422091,
-0.1592338979,
-0.1643155813,
-0.1599851549,
0.071743235,
0.1587983966,
0.158615306,
-0.2362280786,
0.1022942737,
-0.4182839394,
-0.1048178598,
0.0990507454,
-0.0547478311,
-0.0408970416,
-0.1226124465,
0.0478476696,
0.3270422816,
0.069841221,
0.2051166743,
-0.2745992541,
0.1811828464,
-0.1321082264,
-0.3716081381,
-0.2293088734,
-0.3260007501,
-0.0815041661,
-0.0047446713,
0.4853348136,
0.1031748056,
0.314823091,
-0.2068865001,
-0.2574829459,
0.1653000116,
-0.0430505425,
-0.0358236581,
0.2538660765,
0.2143921405,
-0.128767103,
0.3431731462,
0.1944274902,
-0.3629197776,
0.082421422,
-0.1285372376,
-0.0336526781,
0.086114876,
0.227483958,
0.3637344837,
-0.0477723591,
-0.1344334781,
-0.029883299,
-0.353954792,
0.3215945065,
0.0293438286,
0.1498515159,
0.0673592389,
-0.1317502558,
-0.167379871,
-0.0274367966,
0.1491860449,
0.0864901915,
-0.3391233087,
0.4030130208,
0.1747459024,
-0.040862266,
-0.0752275884,
-0.0718041435,
-0.1546740383,
0.2917643785,
-0.6640379429,
-0.0668255091,
-0.1284805983,
-0.0040829405,
-0.1210260242,
-0.28576684,
-0.0021878034,
-0.1174402088,
0.0631619096,
0.1598547697,
-0.1683163643,
-0.138829574,
-0.2689239979,
0.0819728225,
-0.0497704186,
0.2759533823,
-0.0506892353,
0.8458833098,
0.0419286862,
-0.185301438,
-0.1689167023,
-0.1192441881,
0.0638332143,
-0.3244427443,
-0.4014129639,
-0.0687759593,
-0.1970942616,
-0.2633645535,
0.107717894,
-0.0919820964,
-0.355175823,
-0.1895462424,
0.0282498226,
-0.2745783031,
-0.3581510484,
0.4824311137,
-0.5855875015,
-0.1406050324,
-0.0282723419,
0.2764351666,
-0.0449178852,
-0.2472791374,
0.0181328133,
0.0796074867,
0.4708021283,
-0.2335609943,
-0.0139494613,
0.1771228909,
-0.1779388189,
0.1654903591,
-0.1226428971,
0.1473453641,
-0.0257004127,
-0.163383916,
0.2757573128,
0.1785819381,
0.7884399891,
0.0170750562,
0.1327189505,
0.0002016872,
-0.5102226734,
-0.2963165045,
0.0534744188,
0.1002968103,
0.5788519382,
0.1988779008,
0.3522876203,
-0.3964131474,
-0.0815311223,
0.1228854805,
0.3506295085,
-0.295737654,
-0.1107422113,
-0.3007187843,
0.0792071968,
-0.3384437263,
0.0602168366,
-0.0772344545,
-0.1689596325,
0.1111789495,
-0.1326544285,
-0.2855384648,
0.0597574711,
0.1412392408,
0.2928120196,
0.2557170391,
-0.0518072397,
0.5995865464,
0.2853756845,
-0.087378934,
0.283531487,
0.4308952093,
0.0039385632,
-0.2233616263,
0.2127961218,
-0.0280539803,
0.1954461783,
0.4685197473,
0.0028097965,
-0.1305246651,
0.2168255746,
0.1986552328,
-0.366175741,
0.1299187243,
0.0626512989,
-0.0761787891,
-0.3292381763,
-0.5705028772,
0.4089974165,
-0.0779560655,
0.0118413866,
0.567950666,
-0.2431018651,
-0.0053954832,
0.1903682053,
0.0203535967,
1.0178786516,
-0.3330102563,
0.0218967441,
-0.4650070965,
0.0914327651,
0.488253206,
-0.2961699069,
0.0646977499,
-0.3654840589,
-0.6286568642,
0.0786012635,
-0.2877317667,
-0.2745549083,
0.2768288851,
0.2540504634,
0.2377893627,
-0.4282455444,
0.0898490548,
-0.0995339826,
0.2724860013,
0.0906432867,
-0.3121676743,
-0.0334697627,
0.0022576526,
-0.0345315635,
0.1255580783,
0.0643879473,
0.0665348619,
-0.0685931146,
0.155092299,
-0.3927319646,
0.1411189288,
-0.1374562085,
-0.0428904109,
-0.2702481747,
-0.3985819221,
-0.0254867934,
0.1370049566,
-0.0683279335,
0.087968722,
-0.0561873689,
0.3046512306,
0.0296231396,
0.173774749,
0.0210133381,
0.0706016943,
-0.0502464026,
-0.0093012676,
-0.0992268473,
-0.133722946,
-0.2553776503,
-0.4720454514,
0.3233763874,
0.239531517,
0.1415909231,
-0.0632363185,
-0.2486245632,
-0.0001772456,
0.1796436757,
-0.1793679893,
0.0291047581,
0.4345210493,
-0.0641022995,
0.1792688668,
0.2324332148,
-0.3975846171,
0.0245463252,
0.3809720576,
0.1816919297,
-0.0583335832,
0.4532394409,
-0.0917831585,
-0.3143451214,
-0.0893869847,
0.0159123987,
0.3293493986,
-0.5196861029,
-0.0000236109,
-0.1610175669,
0.0594338477,
-0.1526345313,
-0.2847926319,
-0.0055983076,
0.0689758658,
-0.3740067482,
-0.3733097911,
-0.1986034214,
0.3582195044,
0.0253329836,
0.3640443683,
-0.2689652741,
-0.11130438,
-0.1866378933,
0.5100820661,
-0.151525721,
-0.1166600138,
-0.1506281495,
0.3793261647,
0.0103445649,
0.023071032,
0.3565027118,
-0.1719986498,
-0.0177373085,
0.0263421759,
0.1387480348,
-0.087726593,
0.0856962353,
0.223717764,
-0.2166979909,
-0.2318815142,
-0.1974545121,
-0.1283963472,
-0.0637033582,
-0.2944409549,
0.2201378644,
0.1698257327,
0.1967494786,
-0.1060338169,
0.4144618511,
0.0202574357,
-0.4970490038,
0.172421664,
-0.2905475199,
0.3164815903,
-0.0907999873,
0.2046424747,
0.0721128583,
-0.0054179728,
-0.011009343,
-0.0986156762,
0.3651936948,
-0.1053294539,
0.1401946247,
0.0574860647,
0.2886665463,
0.0617077947,
0.3608945906,
0.7714851499,
0.0302281491,
0.2253791541,
0.0788225085,
0.03532774,
-0.041550301,
-0.1432339847,
0.0548329577,
-0.3868785501,
-0.0227045715,
0.2216558158,
-0.228980422,
0.2641274333,
-0.0151986554,
-0.2538964152,
0.2530397475,
-0.1723757237,
0.0172843039,
0.3965554237,
-0.2170439363,
-0.1060307473,
0.0804064572,
0.2679736614,
0.0435837321,
0.3496537507,
-0.133651793,
0.2164202183,
0.1409597248,
0.1506497413,
-0.2677200437,
-0.3968939483,
0.0076027885,
0.5739415288,
0.150914222,
0.0038489401,
-0.176815182,
0.0664815754,
0.148986876,
-0.2371138036,
-0.0311330259,
0.0436326303,
0.0971295759,
-0.074643068,
0.206761241,
-0.1738482863,
-0.2689622045,
0.1178787053,
-0.1730869412,
-0.3819601536,
-0.0769188032,
0.2927039862,
0.1724588126,
-0.1080511883,
0.1192585528,
0.0203605853,
0.2263834178,
-0.3633551002,
0.1058876589,
-0.1151914224,
0.265933603,
0.4520156682,
-0.0552791432,
0.0113521367,
0.145259127,
-0.1387481093,
0.0534793586,
0.3016168773,
-0.0364706293,
-0.2781961858,
0.3117524385,
0.1510300189,
0.3166747987,
0.0354431011,
0.0237745009,
-0.0851155818,
0.1745291352,
-0.2254251987,
-0.0548544787,
-0.502007246,
0.3572722077,
0.0979874432,
-0.2567736804,
0.0217996836,
-0.1460694969,
0.1641466022,
-0.5156953931,
0.2081432641,
-0.2873865962,
-0.0298746172,
0.3652811348,
0.0081695989,
-0.0818291903,
0.6307969093,
0.0844638795,
0.5784638524,
-0.2518799901,
0.0471646786,
-0.4567261934,
0.0864482895,
-0.0638263524,
0.0068628415,
0.426787734,
0.2150808871,
0.3521039486,
0.3763363361,
0.0156499557,
-0.0039928555,
0.3473139405,
0.3020211756,
-0.0365599208,
-0.0076754913,
-0.5346398354,
0.2176373899,
-0.0012321323,
-0.3525678813,
0.1920086592,
-0.0523053259,
-0.1589456201,
0.4528040588,
-0.4606046379,
0.4527315497,
0.3637913465,
0.4324218631,
-0.2064354867,
0.6541491747,
0.0310746506,
-0.129953146,
-0.06981574,
-0.5255050659,
-0.2674126625,
0.3101968169,
0.1402409375,
-0.1344029456,
-0.069459103,
0.0419761389,
-0.3419908881,
0.1872284263,
-0.1282742918,
0.0314741991,
-0.0409943238,
-0.4278570116,
0.1215903759,
0.2747300267,
0.2673532367,
0.164035514,
-0.1089973599,
-0.18433927,
-0.1763429344,
0.0502829105,
0.5359642506,
-0.1613200903,
-0.0261933655,
-0.0143748596,
0.3824872971,
0.1976982653,
0.2183241248,
-0.5468693972,
-0.037599571,
0.321560055,
-0.2120874226,
-0.01722911,
-0.0083576124,
0.0410817266,
-0.0789167359,
-0.2472642809,
0.162550807,
0.0581364483,
-0.068548426,
-0.346940577,
-0.3269046247
] |
https://github.com/huggingface/datasets/issues/2538 | Loading partial dataset when debugging | Hi @reachtarunhere.
Besides the above insights provided by @lhoestq and @thomwolf, there is also a Dataset feature in progress (I plan to finish it this week): #2249, which will allow you, when calling `load_dataset`, to pass the option to download/preprocess/cache only some specific split(s), which will definitely speed up your workflow.
If this feature is interesting for you, I can ping you once it will be merged into the master branch. | I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks! | 71 | Loading partial dataset when debugging
I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks!
Hi @reachtarunhere.
Besides the above insights provided by @lhoestq and @thomwolf, there is also a Dataset feature in progress (I plan to finish it this week): #2249, which will allow you, when calling `load_dataset`, to pass the option to download/preprocess/cache only some specific split(s), which will definitely speed up your workflow.
If this feature is interesting for you, I can ping you once it will be merged into the master branch. | [
-0.4255479276,
-0.1098937467,
-0.0348531902,
0.3032791018,
-0.0704117417,
0.2823930383,
0.5759150982,
0.431137681,
0.30114308,
-0.0897588059,
-0.0946435481,
0.1700281203,
-0.1675222367,
0.2383288592,
0.0475686416,
0.0998502597,
-0.1617255956,
0.3242845237,
0.0387711264,
-0.066067256,
0.1287384331,
-0.2229062766,
-0.2483515441,
-0.2115879059,
-0.4659938514,
0.0293288659,
0.0986265093,
0.1705517918,
0.3179527819,
-0.1268360615,
0.3389089108,
0.1375171244,
-0.0084877796,
0.133572191,
-0.0001241957,
-0.010722056,
0.5006650686,
-0.0931075811,
-0.4362999797,
0.0735285059,
-0.2374211997,
-0.0477146879,
0.4577592909,
0.0274893641,
-0.0834212229,
-0.1815832853,
0.0253199544,
-0.3546503782,
0.2971427441,
-0.0064250827,
0.073707208,
0.1067956686,
-0.4661463499,
0.1442130506,
0.1794304848,
-0.0509804226,
-0.0699998811,
0.3940601349,
0.4568609595,
-0.0344274044,
-0.2619636953,
0.1470097899,
-0.0907027945,
0.3317942917,
0.3868727088,
-0.0311700255,
0.0120005962,
-0.5471946597,
0.2819918096,
0.439940691,
0.6287295818,
0.0329470895,
-0.3415043354,
-0.582824707,
0.0757659227,
-0.0979448855,
0.1490000784,
0.0070241578,
-0.4245783687,
0.0065801032,
-0.4864512384,
-0.1778587401,
0.0478371158,
0.1568618119,
0.0531839281,
-0.2893978953,
0.0368967764,
0.0943089277,
0.3902571201,
0.2198372632,
0.3261694908,
-0.0573071986,
0.0780219361,
0.0870086774,
-0.3868719339,
0.0628543124,
-0.1920489967,
-0.094686985,
-0.0610503852,
0.5311381817,
-0.0742089227,
0.4788449109,
0.2084883004,
-0.0358147062,
0.5376529694,
-0.1502549797,
0.1837612689,
0.1738739908,
0.3688539565,
-0.3586814106,
-0.0799366459,
-0.0411487855,
-0.3891735673,
-0.1940125376,
0.2670510411,
-0.0223627295,
-0.0176772662,
-0.3543410897,
-0.1577947587,
-0.367539674,
0.1221823394,
-0.0502619781,
0.2032263726,
0.4276987612,
0.088124916,
0.0653595254,
-0.1983947456,
0.1510776877,
-0.2707570493,
-0.1073966399,
-0.0971075445,
-0.2272583246,
-0.0123130903,
0.1486581862,
0.3650506437,
-0.3609238565,
0.2793483734,
-0.0693353191,
0.4252465665,
-0.2300669551,
0.1399096698,
-0.2663925886,
-0.0253237896,
0.1920959204,
0.0380920768,
0.2751619518,
0.0690243393,
0.2701104283,
-0.3026752472,
0.3971215487,
-0.0496055931,
-0.3965833187,
0.044024609,
-0.0021047411,
-0.3572969437,
0.2418509722,
-0.1939347833,
0.2439127266,
0.1567404121,
-0.1495725363,
-0.2970223427,
0.0720494241,
-0.0504864007,
-0.0922592804,
0.6279112697,
0.3850619793,
-0.1324376762,
-0.1911817789,
-0.2131754309,
0.0428281054,
0.2830063701,
0.211183846,
-0.3966248035,
0.2519932091,
-0.1373875737,
-0.118643187,
0.5024477243,
-0.0747007281,
-0.3204850554,
0.5063078403,
-0.0870784521,
0.1802228689,
-0.0622123033,
0.4636335671,
0.216033265,
0.0420144014,
0.0510068908,
0.4863907397,
-0.1479168981,
0.1553366184,
-0.2005392611,
-0.1223475933,
0.1038937867,
0.4797149897,
0.0456260964,
0.1825734377,
-0.0500609763,
0.1873490214,
0.1789162606,
-0.0209915154,
-0.0779562742,
0.196269542,
-0.1176257282,
0.0428440794,
0.0597054809,
-0.2848039865,
-0.6154303551,
0.3532469869,
0.1503711641,
-0.3225486875,
-0.0631123632,
-0.0078730136,
-0.0616655499,
-0.1172563434,
-0.0140973665,
-0.0845231712,
-0.1754078418,
0.0163252912,
-0.0633148104,
-0.403050065,
-0.4566090703,
0.172505796,
0.0014142692,
0.0076228902,
-0.3340218067,
0.1149459109,
0.3976436555,
-0.0506279506,
-0.0025285333,
-0.0804585814,
-0.0058339797,
-0.2696808577,
-0.0657007471,
0.3011420071,
0.139320761,
0.2979269624,
0.1136754975,
0.1450334191,
-0.03134818,
-0.0681553185,
0.3927513957,
-0.0917416811,
-0.0070267022,
-0.2175115645,
-0.1865833849,
0.361593008,
-0.4406472445,
0.4426868856,
0.0334505737,
-0.2793007493,
0.1115422696,
-0.1444296092,
-0.1060399562,
-0.0906952173,
0.4702703953,
-0.2627223134,
0.3744700849,
0.2515541911,
-0.1180132478,
-0.04310349,
0.2224403322,
-0.0110000297,
-0.026483696,
0.3000361919,
-0.4567556679,
-0.0279172361,
-0.1657411605,
-0.1882311553,
0.1148745492,
0.1626738608,
0.1160587817,
-0.2489050329,
0.234513551,
-0.1317113042,
0.1706824899,
0.1135741025,
0.1078626513,
0.1801271141,
-0.1570753157,
-0.1743771881,
-0.1415261328,
0.1043534726,
0.149166584,
0.1552518904,
-0.2420473248,
0.0409891754,
-0.4336851835,
-0.0954359323,
0.1087248549,
0.0012945682,
0.0000099316,
-0.1684017181,
0.045546975,
0.3233200908,
0.087068148,
0.1428836435,
-0.2267098278,
0.1525970995,
-0.1484452188,
-0.3771046996,
-0.2346265763,
-0.2746380866,
-0.0331601948,
0.003381256,
0.5305066109,
0.1417619288,
0.3325961232,
-0.2133326232,
-0.2271151692,
0.0889054537,
-0.0519534498,
-0.0518513955,
0.2499417365,
0.2526986003,
-0.1263365149,
0.3071931601,
0.2569518089,
-0.3159407973,
0.109803915,
-0.1088884473,
0.0034073144,
0.0676967427,
0.1605549455,
0.3011196256,
0.0053967088,
-0.1698036194,
-0.0307081956,
-0.3686235845,
0.3665093482,
0.0164292008,
0.1151426062,
0.0609636083,
-0.1534953415,
-0.2031874508,
-0.0551406182,
0.1240792572,
0.1300556064,
-0.2488167584,
0.399947077,
0.1499374509,
-0.0674016923,
-0.0626193061,
-0.0296017267,
-0.1598857939,
0.2536579669,
-0.6322859526,
-0.0330956355,
-0.1697779596,
0.0591504574,
-0.0926251858,
-0.3379983902,
-0.030604545,
-0.1077452898,
0.0659351423,
0.1735349596,
-0.170505017,
-0.1234262586,
-0.3009799421,
0.0332171395,
0.0075059365,
0.2793800533,
-0.1313443333,
0.7960777283,
0.0527015701,
-0.1776238233,
-0.1590409279,
-0.1315186173,
0.0526378006,
-0.3936484158,
-0.3983526826,
-0.0121331885,
-0.170949176,
-0.1929161847,
0.1234551594,
-0.0569070727,
-0.3607070446,
-0.1844073236,
-0.0245300829,
-0.2462878525,
-0.3422316313,
0.485838145,
-0.5331352949,
-0.1508587301,
-0.0002185926,
0.2596715093,
-0.0153867677,
-0.2984859645,
-0.007780388,
0.0723130852,
0.5126266479,
-0.2478265464,
0.0950119346,
0.2320858091,
-0.2354311347,
0.1943083555,
-0.158459872,
0.1555483937,
-0.0471597239,
-0.1470237076,
0.3114204109,
0.1976335943,
0.6516825557,
0.0131330099,
0.126987949,
-0.0256437026,
-0.5850504041,
-0.2765257359,
0.0595206991,
0.0903100893,
0.5965147018,
0.1576709747,
0.3528319895,
-0.3361721635,
-0.1693974435,
0.1582764089,
0.3369894624,
-0.2529734969,
-0.1542019844,
-0.2478727847,
0.108568579,
-0.3825853467,
0.0695342571,
-0.0136524253,
-0.2019247711,
0.0756775439,
-0.17208606,
-0.304081589,
0.0818557143,
0.1404734701,
0.2908130288,
0.2106691003,
-0.1111379266,
0.6667951345,
0.3049613237,
-0.1057520956,
0.2823261321,
0.3889490068,
-0.0066261343,
-0.2671969235,
0.1825740933,
-0.1143232286,
0.2009789348,
0.4967264235,
-0.0328111202,
-0.1805927753,
0.1169171184,
0.2165847421,
-0.3674064279,
0.042587433,
0.1022802591,
0.0049078614,
-0.3011726141,
-0.5198277831,
0.3954169154,
-0.0661348253,
0.0396846384,
0.6187755466,
-0.2771739364,
-0.0084434692,
0.1720662415,
0.021291947,
0.9266542196,
-0.3237706423,
-0.0267254356,
-0.4711100161,
0.0420476571,
0.3918361366,
-0.291341573,
0.032728564,
-0.3474789262,
-0.6259022951,
0.0939164534,
-0.2549414039,
-0.2424484789,
0.3078629971,
0.2693951726,
0.2444549501,
-0.4067323804,
0.0754268169,
-0.1080510765,
0.3130565286,
0.0523109511,
-0.3572488725,
-0.0330370367,
0.0150457993,
-0.015556721,
0.1669781655,
0.0760957673,
0.0463347547,
-0.0431395322,
0.1699291468,
-0.4182585478,
0.1273208857,
-0.1174610108,
-0.1342813224,
-0.223425284,
-0.358917892,
0.080655545,
0.1642117798,
-0.0663384348,
0.1277462244,
-0.077103667,
0.3243988156,
0.0203705821,
0.1677103043,
0.0537239686,
0.0404101871,
-0.0689276606,
-0.0560782626,
-0.082916528,
-0.238313511,
-0.2540110946,
-0.4231799841,
0.2556217313,
0.2539015114,
0.1100004315,
-0.0319809765,
-0.2888384163,
-0.0155117549,
0.1655250937,
-0.20772174,
0.0495570041,
0.4450702667,
-0.0290834121,
0.2075001597,
0.2286259085,
-0.4448324442,
-0.0193744116,
0.3128206432,
0.154784143,
-0.0245693997,
0.4885363877,
-0.0238863081,
-0.348251313,
-0.0968004316,
0.0324060321,
0.3478178382,
-0.5323244333,
0.0432260223,
-0.0954327211,
0.0717843175,
-0.0855791196,
-0.2574070394,
-0.082729131,
0.0252301749,
-0.3723295927,
-0.399713397,
-0.1243818179,
0.255515635,
-0.0016858636,
0.3168868423,
-0.2882213593,
-0.1357834488,
-0.1156777442,
0.4980577826,
-0.1506542563,
-0.1228768229,
-0.1188015491,
0.3464043438,
0.0529482439,
0.0250470433,
0.3450152874,
-0.1282463372,
-0.0013390519,
0.0266421176,
0.1603634357,
-0.1047794074,
0.1074302644,
0.2032574117,
-0.2422373295,
-0.2329372168,
-0.1401115954,
-0.1356324106,
-0.1378339529,
-0.3078650832,
0.2151730508,
0.1667671204,
0.1878564358,
-0.1424105018,
0.4268203378,
-0.0315649919,
-0.4116505682,
0.2446381152,
-0.2885435224,
0.3497887254,
-0.1457009614,
0.2330198437,
0.1168087646,
0.0130679756,
0.0273899399,
-0.1620251834,
0.3498269022,
-0.0905715972,
0.1439077407,
0.0498301871,
0.2511838078,
0.0712216496,
0.3635662198,
0.7526986003,
0.0421290323,
0.2309816033,
0.0358691737,
0.0266574789,
-0.0456360616,
-0.0797325671,
0.0889467448,
-0.3545719683,
-0.0360710546,
0.2208167911,
-0.1860036552,
0.2577244043,
-0.029929705,
-0.2412745059,
0.2492343932,
-0.2294998169,
-0.0234915894,
0.3386665583,
-0.1834357977,
-0.072239317,
0.1141105667,
0.2787199318,
0.0044050217,
0.3821217418,
-0.1071389019,
0.1787776202,
0.1578713208,
0.1865140796,
-0.2052663565,
-0.3974642754,
-0.0073937424,
0.579564333,
0.1509663314,
0.0063895518,
-0.1550514102,
0.0297772903,
0.1568143815,
-0.230193615,
-0.0403929614,
0.0557421632,
0.1063029096,
-0.0871281624,
0.2420916557,
-0.1243696809,
-0.25327456,
0.1570651829,
-0.1857651621,
-0.3671963811,
-0.1061073765,
0.3231732845,
0.220407784,
-0.1215089411,
0.1551022381,
-0.0787674785,
0.2425984442,
-0.3389587402,
0.139044866,
-0.147566691,
0.3207711875,
0.4877932668,
-0.0260484051,
0.0615060478,
0.167036742,
-0.1229514182,
0.0573806353,
0.2521366179,
-0.0455731079,
-0.2194969207,
0.3887044191,
0.1053222045,
0.3220395446,
0.0493758097,
0.0182548836,
-0.07622765,
0.1485421658,
-0.2521018684,
-0.0411131121,
-0.4598381519,
0.3122322559,
0.1221920699,
-0.2666966021,
-0.0598164983,
-0.162040174,
0.1932629347,
-0.5238355994,
0.2419542521,
-0.3260865808,
-0.0765335411,
0.3290897608,
0.0178691596,
-0.0785536468,
0.6179023981,
0.0901755244,
0.6525303125,
-0.2413717508,
0.0449950397,
-0.4157396853,
0.0718605742,
-0.0802069306,
-0.0179308727,
0.4335513711,
0.1877973527,
0.3594683409,
0.3741152883,
0.0650740862,
-0.0139176361,
0.3873795867,
0.3575517833,
-0.0418279245,
0.0121629741,
-0.5447232127,
0.1933727413,
0.0058100671,
-0.3408639431,
0.230386585,
0.0353683345,
-0.1486156136,
0.3801406026,
-0.3933699727,
0.4711252451,
0.3187218904,
0.326038599,
-0.2265873551,
0.6798647046,
0.0250497758,
-0.1249546334,
-0.0659321398,
-0.5260887146,
-0.2678968012,
0.3594198525,
0.1478925943,
-0.2117684335,
-0.0471149758,
0.0144736245,
-0.2860059142,
0.1787317395,
-0.1955965012,
0.051644478,
-0.077900514,
-0.4243186712,
0.1215829104,
0.2915966511,
0.2652497292,
0.146590665,
-0.100606367,
-0.233740896,
-0.1721859723,
0.0066253245,
0.5101662874,
-0.1248637736,
-0.0478918068,
0.0060931109,
0.3391575217,
0.1818606108,
0.2179679722,
-0.5644078255,
-0.0370993763,
0.2662120163,
-0.2286667526,
0.0809671283,
0.0042564012,
0.1076986566,
-0.0629156679,
-0.2644653916,
0.1196224988,
0.0584049374,
-0.0623077266,
-0.3767542541,
-0.3212265074
] |
https://github.com/huggingface/datasets/issues/2538 | Loading partial dataset when debugging | Thanks all for responding.
Hey @albertvillanova
Thanks. Yes, I would be interested.
@lhoestq I think even if a small split is specified it loads up the full dataset from the disk (please correct me if this is not the case). Because it does seem to be slow to me even on subsequent calls. There is no repeated downloading so it seems that the cache is working.
I am not aware of the streaming feature @thomwolf mentioned. So I might need to read up on it. | I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks! | 85 | Loading partial dataset when debugging
I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks!
Thanks all for responding.
Hey @albertvillanova
Thanks. Yes, I would be interested.
@lhoestq I think even if a small split is specified it loads up the full dataset from the disk (please correct me if this is not the case). Because it does seem to be slow to me even on subsequent calls. There is no repeated downloading so it seems that the cache is working.
I am not aware of the streaming feature @thomwolf mentioned. So I might need to read up on it. | [
-0.4159126282,
-0.1481461078,
-0.0125232525,
0.3571512699,
-0.0992512852,
0.2774941027,
0.500405848,
0.4125295579,
0.3049237132,
-0.1691026986,
-0.0966693759,
0.120726943,
-0.1135292947,
0.251886487,
0.1217294037,
0.0623836443,
-0.1812786162,
0.3625118136,
0.0558309443,
-0.1207428873,
0.1732830107,
-0.2011187971,
-0.2202488929,
-0.2168608159,
-0.388948679,
0.0764959902,
0.1006410271,
0.1514774859,
0.2842653096,
-0.1781846285,
0.3325756192,
0.1009301096,
0.0430351272,
0.1529106498,
-0.0001255008,
0.003987141,
0.5047407746,
-0.1904087663,
-0.429572165,
0.0861378834,
-0.2011618614,
0.0131380111,
0.4568485618,
-0.0062861145,
-0.08015275,
-0.1891244948,
0.0196710322,
-0.3495224714,
0.3023767173,
0.0137106553,
0.0576920994,
0.0685628057,
-0.5156864524,
0.1896018386,
0.1670228243,
-0.0335523039,
-0.0232579745,
0.3747782409,
0.47445485,
0.0265350714,
-0.3703328967,
0.1561925113,
-0.1206537783,
0.3349695802,
0.4263786674,
-0.0274211187,
-0.0863648504,
-0.5245527625,
0.3088877201,
0.432854861,
0.7110124826,
0.0691518262,
-0.3323351741,
-0.546377182,
0.0553161949,
-0.1214705557,
0.1506924033,
0.0559455529,
-0.485868752,
-0.0160152875,
-0.47475034,
-0.1795729995,
0.0094086975,
0.1596932411,
0.0370571315,
-0.2802909613,
0.0489185825,
0.1070274711,
0.3559328914,
0.2472992241,
0.3180225194,
-0.1036360115,
0.0716250539,
0.0855664462,
-0.3632456064,
0.0396835804,
-0.1876771897,
-0.0634622276,
-0.0351118632,
0.4928973913,
0.0537334979,
0.4419736862,
0.1951718777,
-0.0539121516,
0.5882900953,
-0.1239793003,
0.1999562085,
0.1320296228,
0.3957650065,
-0.2681328058,
-0.0428771749,
-0.0303607192,
-0.3341363966,
-0.0585838184,
0.2521037161,
-0.0839881152,
-0.0564100556,
-0.3437395692,
-0.1681815088,
-0.3101800084,
0.1414813697,
-0.0881742164,
0.2062131315,
0.4173727036,
0.0737163424,
0.0797019675,
-0.1862520576,
0.1231179386,
-0.230812937,
-0.1563002467,
-0.1004407257,
-0.205261454,
-0.0079845861,
0.1595641375,
0.3800746799,
-0.3889923096,
0.3479873836,
-0.1370396167,
0.4121006131,
-0.1663665473,
0.1136632487,
-0.2666144371,
0.0171436034,
0.2017516345,
0.0424344912,
0.2724156082,
0.0887800902,
0.2402318716,
-0.2842928171,
0.4575054348,
-0.007821843,
-0.3609114289,
0.0774090961,
-0.0084562954,
-0.3604272902,
0.2339559197,
-0.2522042096,
0.3074852526,
0.1119800881,
-0.234281227,
-0.2774862051,
0.0819798112,
-0.0516642332,
-0.096185416,
0.6512776613,
0.4351747036,
-0.1835157573,
-0.2662341595,
-0.1741188318,
0.0488525406,
0.2412638366,
0.2247573584,
-0.4059409201,
0.1950816065,
-0.1556663662,
-0.0307995081,
0.5310040116,
-0.0549812205,
-0.3930069208,
0.5534249544,
-0.0423558652,
0.1968271881,
-0.0140453912,
0.4981527328,
0.2792951763,
0.0834637433,
0.0859898478,
0.4684687257,
-0.1412014216,
0.144164443,
-0.2153413892,
-0.1161555648,
0.1395130754,
0.4743178487,
0.0431787223,
0.1887047887,
-0.0309544802,
0.1427439898,
0.2508325577,
0.0146929109,
-0.0430909358,
0.1715888381,
-0.1290431172,
0.0048909746,
0.0708853751,
-0.2515199482,
-0.6060566306,
0.3516188264,
0.2121591866,
-0.3468960226,
-0.0178334489,
0.0149981454,
-0.1039046198,
-0.1333016753,
-0.0106944684,
-0.1397803873,
-0.1877256632,
0.0580748096,
-0.0552600957,
-0.3899653554,
-0.504170537,
0.1705366373,
0.0138532892,
0.0111173801,
-0.3354496956,
0.1781121939,
0.4008472562,
-0.0462545827,
0.0144778267,
-0.162190184,
0.0068246024,
-0.2368640006,
-0.0759178475,
0.2959758043,
0.1486867219,
0.2828855515,
0.1145111322,
0.1139543951,
0.0202640835,
-0.1139084101,
0.4275052845,
0.0277543552,
0.0352048874,
-0.2094916254,
-0.2280778438,
0.3332339823,
-0.4468023777,
0.3899789751,
0.0867235363,
-0.2779378593,
0.1355454773,
-0.0903227329,
-0.1310148537,
-0.0591621995,
0.4690316916,
-0.2653321028,
0.3321262598,
0.2059682608,
-0.1701812148,
-0.0676304325,
0.1805544943,
-0.0547414646,
-0.0281820968,
0.3191452324,
-0.5030070543,
-0.0855560005,
-0.0710673705,
-0.1535503268,
0.1706552804,
0.1412256658,
0.1257361025,
-0.2463173121,
0.3012812138,
-0.0973693877,
0.1797517985,
0.0764471143,
0.0239909552,
0.2401649952,
-0.1692893654,
-0.1677249372,
-0.2075761557,
0.1335401088,
0.163300544,
0.1261617839,
-0.2461009026,
0.0559542403,
-0.3923881352,
-0.1371290982,
0.0984191,
-0.0263085999,
-0.0162436012,
-0.1145448685,
0.0295514837,
0.3922592402,
0.1370491683,
0.132335633,
-0.2432088703,
0.2042604238,
-0.151104629,
-0.3757821918,
-0.2814657986,
-0.2620999217,
-0.0485495105,
0.0039449185,
0.4429612756,
0.1515239328,
0.2691592574,
-0.2304829806,
-0.2361419499,
0.1046243459,
-0.0445629358,
-0.0410591103,
0.2351592779,
0.2145914435,
-0.1406756043,
0.3545922637,
0.2172017843,
-0.2870862484,
0.0678704754,
-0.1821411997,
-0.0087207183,
0.0792456269,
0.2033639699,
0.3169820309,
0.0007928386,
-0.1470526755,
-0.0798825324,
-0.3423279524,
0.3489236534,
0.0219493359,
0.1081116423,
0.0131320357,
-0.2031900287,
-0.1880280823,
-0.0201022886,
0.1227915138,
0.0990580469,
-0.2736400664,
0.3888801932,
0.1685302705,
-0.1319756806,
-0.0197491497,
-0.0427999161,
-0.1725602597,
0.2457066327,
-0.7163403034,
-0.0363679752,
-0.1039070785,
-0.0275340304,
-0.1411459446,
-0.3152738512,
-0.0093186609,
-0.1638634056,
0.0879862905,
0.1405755132,
-0.2466288507,
-0.1660838127,
-0.2383487821,
0.0327037647,
-0.051915817,
0.2790384591,
-0.1051086932,
0.7948539257,
0.0669624135,
-0.1358751059,
-0.1208627298,
-0.115293853,
0.0748094469,
-0.40055269,
-0.3552447259,
0.0047248118,
-0.217561096,
-0.2861962914,
0.1386245191,
-0.0846053362,
-0.3736600578,
-0.2103448808,
-0.0040325671,
-0.2412603945,
-0.2968295515,
0.4443385303,
-0.4901680648,
-0.1639559418,
0.0084250569,
0.2829982936,
0.0149872005,
-0.3082872033,
-0.0442691557,
0.1167140454,
0.5464727283,
-0.2055648565,
0.0772359893,
0.2033467591,
-0.2294429392,
0.1801037639,
-0.1383928359,
0.1540877968,
-0.0372022912,
-0.186848104,
0.3023751378,
0.2027573586,
0.6964051723,
0.029053187,
0.1523522437,
-0.0294493176,
-0.5537369251,
-0.3339633346,
0.0513140634,
0.1236571819,
0.5426995158,
0.1416487992,
0.3319578171,
-0.3412103653,
-0.0857287198,
0.0878412575,
0.3475196958,
-0.2562972307,
-0.1165639162,
-0.2733142972,
0.1115522087,
-0.3391993046,
0.0460335463,
-0.0341025032,
-0.2568398714,
0.0771778226,
-0.1358341426,
-0.1969121993,
0.0703858584,
0.1082945317,
0.3095799685,
0.2561499476,
-0.0795992762,
0.6283693314,
0.2473174632,
-0.074668549,
0.2623123229,
0.4484376907,
0.0541105829,
-0.2391327471,
0.2559787035,
-0.0761415288,
0.1570314616,
0.4805579484,
-0.0273215808,
-0.1740470231,
0.1657722145,
0.1821802258,
-0.3535291553,
0.0296647176,
0.0437474772,
-0.0363747701,
-0.2842464745,
-0.5381668806,
0.4099709094,
-0.1583424211,
0.0270081013,
0.592995584,
-0.267898798,
0.0433024094,
0.1711852103,
-0.0341253057,
0.9001867175,
-0.2775947452,
0.0181044191,
-0.4738499522,
0.0255157351,
0.3826699555,
-0.2529368997,
0.0576608181,
-0.3758231699,
-0.6318650246,
0.0451945812,
-0.2700018287,
-0.2560807765,
0.290387392,
0.1918895841,
0.2626981139,
-0.3450228572,
0.145222798,
-0.089629665,
0.2789684534,
0.00927631,
-0.3133334816,
-0.0787836909,
-0.0112401806,
-0.06868615,
0.1829636097,
0.1194632575,
0.0324165113,
-0.0137159899,
0.1280996948,
-0.4161294699,
0.150904581,
-0.13541466,
-0.1083076224,
-0.2610020936,
-0.4459327757,
0.0013436675,
0.1891569495,
-0.169579193,
0.0079536634,
-0.0962304398,
0.3113496602,
-0.0028131176,
0.2317948937,
0.0342329331,
0.0917194188,
-0.0884341225,
-0.066941388,
-0.0867954344,
-0.1193681955,
-0.2997491062,
-0.4180704355,
0.3202330172,
0.2411246002,
0.172718972,
-0.0488424152,
-0.2446348965,
-0.020855356,
0.1551903933,
-0.2033874094,
0.0130447848,
0.4422788024,
-0.054704003,
0.1766160876,
0.231745705,
-0.3899615705,
-0.0324455276,
0.4000253379,
0.1774892211,
-0.0122098178,
0.4729731977,
-0.0983904004,
-0.3320081234,
-0.090529792,
0.0528171808,
0.2913813591,
-0.4966560602,
0.0077611171,
-0.1362749934,
0.1066786349,
-0.1356606334,
-0.2550936043,
-0.0600697398,
0.0896168947,
-0.3603335321,
-0.4292682409,
-0.1603854299,
0.2925669253,
-0.0006637392,
0.2813884914,
-0.2482959032,
-0.1884154975,
-0.0865621269,
0.4756276906,
-0.1367111057,
-0.0825287402,
-0.0671440363,
0.3384633362,
0.0354081243,
0.0608303659,
0.3525753319,
-0.126036644,
-0.038571652,
0.0245582499,
0.1656218469,
-0.0732397586,
0.1285143495,
0.2295506597,
-0.1557929516,
-0.2205277085,
-0.2334295958,
-0.1802586913,
-0.124819234,
-0.2638166845,
0.2511463761,
0.1583966762,
0.1694556773,
-0.1106830984,
0.4914953411,
-0.0609235503,
-0.4792805314,
0.2214919478,
-0.2967146039,
0.3501202166,
-0.1263441443,
0.2038217187,
0.0991057307,
-0.0105070919,
-0.0357675143,
-0.1017042696,
0.3124387264,
-0.1113363877,
0.2047917545,
0.047027193,
0.295006156,
0.0029088743,
0.3840980828,
0.803635776,
0.0334466919,
0.2618501484,
-0.0099873338,
0.023774527,
-0.0524262115,
-0.1327249408,
0.0429704972,
-0.3547079861,
-0.0327946246,
0.219491899,
-0.1778029203,
0.1971531063,
0.0066403225,
-0.2571290135,
0.2985554039,
-0.1595153511,
-0.0018196851,
0.3739378452,
-0.222619459,
-0.0248825289,
0.0594378933,
0.2785051763,
0.0101030879,
0.3171231747,
-0.1013445333,
0.2024614513,
0.1621012837,
0.1747724712,
-0.2879362106,
-0.444885999,
-0.0459662452,
0.5084710121,
0.1409296393,
0.0349626914,
-0.1158673763,
-0.0183838084,
0.115274027,
-0.2419970334,
-0.058295019,
-0.0145592038,
0.1222932488,
-0.0667557046,
0.235720709,
-0.1662473232,
-0.1868184209,
0.1992183179,
-0.2124332637,
-0.3387031257,
-0.1223848015,
0.3224776983,
0.136771962,
-0.1114939302,
0.0598550998,
-0.0568305999,
0.2279416323,
-0.3398153782,
0.1281613559,
-0.1308222711,
0.3174036443,
0.5237313509,
-0.0250460356,
-0.0044353446,
0.1036649197,
-0.0880647078,
0.0602623187,
0.3079098165,
-0.038688086,
-0.2340181768,
0.362621516,
0.1883049309,
0.3122760355,
0.0332420692,
0.0143888108,
-0.0594108775,
0.2364653647,
-0.2298785448,
-0.0372659639,
-0.4761093557,
0.2671965659,
0.1054493338,
-0.2371656001,
-0.0161492862,
-0.1595798433,
0.1871890724,
-0.4613911808,
0.2017502189,
-0.3219946623,
-0.0484765694,
0.328283906,
0.0040228926,
-0.0981032476,
0.6001442671,
0.0621680729,
0.560212791,
-0.2283139527,
0.0213622451,
-0.4172229767,
0.0945702642,
-0.0164525881,
-0.0068266019,
0.429631561,
0.20576334,
0.3834557831,
0.3887081444,
0.0355895497,
0.0380240791,
0.2914913297,
0.3280866146,
-0.0167886689,
-0.058955241,
-0.51485008,
0.2842602134,
-0.0555006415,
-0.333676815,
0.2457807064,
0.0031642951,
-0.1566980928,
0.4101820886,
-0.4301158786,
0.4235062897,
0.3595996201,
0.3506818414,
-0.21700266,
0.686422646,
0.0228639096,
-0.1376713216,
-0.0296391137,
-0.53142488,
-0.2944951653,
0.3133071661,
0.126061976,
-0.1157502979,
-0.0128572471,
0.0236604121,
-0.2885641158,
0.2185400575,
-0.1884385645,
0.0344262272,
-0.0742430612,
-0.4067564607,
0.0970122963,
0.3279888928,
0.2838814259,
0.1655912995,
-0.1393089294,
-0.2604669034,
-0.1652663648,
0.0357346982,
0.5490171909,
-0.1703854203,
-0.0008907467,
0.0074438788,
0.330095768,
0.1613235325,
0.2442734689,
-0.5656343699,
-0.0187948868,
0.3026268482,
-0.266338855,
0.0532585829,
-0.0105472691,
0.0401478261,
-0.0577692166,
-0.2461520135,
0.1853065193,
0.0904781222,
-0.1217582375,
-0.368588984,
-0.3309919238
] |
https://github.com/huggingface/datasets/issues/2532 | Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task | Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**? | [This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner).
The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`:
![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png)
Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing)
It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'.
One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`.
I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this.
p.s.
**I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)**
`get_dataset `is just a simple wrapping for `load_dataset`
and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")` | 18 | Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task
[This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner).
The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`:
![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png)
Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing)
It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'.
One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`.
I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this.
p.s.
**I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)**
`get_dataset `is just a simple wrapping for `load_dataset`
and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")`
Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**? | [
-0.1536962986,
0.0790132284,
0.0737818629,
-0.0382320546,
0.0921575353,
-0.3246814609,
-0.089981392,
0.1060318351,
-0.4617610276,
0.1986738741,
-0.2085371315,
0.3074207902,
0.2766765952,
0.0308850408,
-0.2191911638,
-0.1632774621,
0.1479932964,
0.219057247,
0.0056233983,
0.0611227453,
-0.1194192246,
0.4571381509,
-0.2123355269,
0.2143605798,
-0.2866263092,
-0.0706365779,
0.1255777478,
-0.3156487346,
-0.1683976948,
-0.3988147676,
0.2497142255,
0.1189106256,
-0.0836715698,
0.2043142319,
-0.0001126969,
-0.0575012192,
-0.0180355255,
0.0142885819,
0.1786754727,
-0.1964324713,
0.1283863187,
-0.3769185841,
-0.3356094956,
0.1073894799,
-0.0636702329,
0.0396108218,
0.2408126146,
-0.05541889,
0.6431404948,
0.4151499271,
0.1455554664,
-0.0134892911,
0.2545183301,
0.0607687347,
-0.3109232783,
0.2689673305,
-0.0950675458,
0.0190098099,
-0.1540723145,
0.0314687118,
-0.0746515244,
-0.0096177272,
-0.0922700465,
-0.4802753329,
-0.0148854349,
0.1148960292,
0.3214079738,
-0.4625910223,
0.1870726645,
0.0185330808,
-0.2498889863,
-0.0450735539,
-0.1830772758,
-0.3914946914,
-0.1368261576,
-0.2679941058,
0.2000966668,
-0.1542629898,
-0.1181236729,
0.1168284714,
0.0120837651,
0.1378457546,
0.029742755,
-0.2120394707,
-0.2942864895,
0.5647349954,
-0.0654120594,
0.0426451564,
-0.2047559023,
-0.0101767685,
0.3918431699,
-0.0428207107,
0.0059831096,
0.4373292029,
-0.2852554321,
-0.0585255586,
0.1970696598,
-0.4548267722,
-0.0079328343,
-0.0356672555,
0.1242710799,
0.2060959637,
0.0719588473,
0.0609171912,
-0.1630161405,
0.4642791152,
0.2114514858,
0.2766358852,
0.1968424022,
0.1170864031,
-0.0398003198,
-0.0404410213,
0.0627822056,
-0.1251490712,
-0.0498765223,
0.2508596778,
-0.3735535443,
0.1039711982,
-0.2315129042,
0.41214329,
-0.071867153,
0.3000816703,
0.0338656716,
-0.0993585065,
0.0393205024,
0.2893413305,
-0.3403169513,
-0.1019155309,
-0.0826219171,
0.1086550057,
-0.1952840388,
0.0189830288,
-0.2947452068,
0.1247094572,
-0.1966221631,
0.1081776023,
-0.0275509469,
0.1280119121,
0.3569861352,
-0.0326926708,
-0.0828051418,
-0.0947529972,
0.5368514657,
0.2782023549,
0.0261524543,
0.1261869371,
0.1154815257,
-0.3598403931,
-0.3748220205,
-0.0433909446,
-0.215793252,
0.089990288,
0.1479028314,
0.2012823075,
-0.1073766127,
0.1348212957,
-0.3785092831,
0.2858778238,
0.3308011293,
-0.2465245724,
0.0029815733,
-0.3679089546,
-0.4135366678,
-0.1898321807,
0.3192926347,
-0.144251883,
-0.0017331615,
-0.0091709867,
0.1106588021,
0.1891387552,
0.4840113223,
0.1339652836,
0.3138591647,
0.3631410897,
-0.4917096496,
0.4855648279,
0.0987910256,
-0.1336459368,
-0.0881665498,
-0.1546434313,
-0.3981323242,
0.2574173808,
-0.1778469384,
-0.2853302062,
0.1459316462,
0.1648341268,
0.1642515212,
0.4675333202,
-0.1345410198,
0.0967918783,
-0.0824028179,
0.3093528152,
-0.0516471267,
-0.2683204412,
0.0125271874,
-0.0348947458,
-0.2307364941,
-0.238222152,
-0.1597028822,
-0.0885296687,
0.102519162,
-0.0872083902,
0.0438993648,
-0.1296177357,
0.0238304175,
-0.1528643966,
0.0428630635,
-0.0116005912,
-0.3619787395,
0.2263041288,
0.0065002143,
-0.1665719897,
-0.2440985292,
0.1780436188,
-0.1699587554,
-0.1374198496,
0.229845345,
0.0661634654,
0.177830562,
0.3334912658,
0.0553163663,
0.2994612753,
0.1876495034,
0.2598831058,
-0.2379400432,
0.1655212045,
-0.1539326459,
0.0328836478,
-0.107662648,
0.4495725334,
0.0576866828,
-0.1159917265,
-0.1262979358,
0.228382811,
0.25328511,
-0.0442685708,
-0.2839105725,
0.0855725557,
0.1471209228,
0.1632163972,
-0.3755314052,
0.2840961516,
-0.2077518404,
-0.1224474609,
0.5265045166,
0.8932766318,
-0.0384240784,
0.1267525107,
-0.1457831562,
-0.0221705288,
0.4458657205,
0.1181423888,
-0.1546637714,
-0.2694556713,
0.0372078568,
0.2975232005,
-0.10649281,
0.0252686348,
-0.0940384045,
0.1421897858,
0.2193614841,
0.0666166991,
-0.2200762331,
0.1170538366,
0.0044204649,
-0.2848397791,
0.1736073643,
0.0940915942,
0.2308216989,
0.0403841101,
0.1598120332,
0.2757774889,
-0.2304854393,
-0.1623516679,
0.1398642957,
0.0159912668,
0.1191513538,
0.5081242323,
0.1112575084,
0.4917434454,
-0.2569987178,
-0.2506945431,
-0.3280730844,
0.0469816625,
-0.1642935425,
0.2328414023,
-0.2001020908,
-0.3381243646,
-0.4188846648,
-0.1450554878,
-0.1150106266,
-0.5577640533,
0.1381096393,
0.0413246639,
-0.2752408981,
0.4234622121,
0.113436237,
0.2538702786,
-0.1176143587,
0.0566215143,
-0.2270079255,
0.0496981591,
-0.4241376221,
-0.0032033175,
0.1883002967,
-0.2271524966,
0.1867781132,
-0.3008563519,
-0.0523730665,
0.1612114906,
-0.738155365,
0.1576874554,
0.0599958301,
0.0300803725,
0.2673286796,
-0.280410409,
-0.4084677696,
-0.5457121134,
0.1107585281,
0.0272974297,
-0.363614887,
0.1239912063,
-0.0817676932,
-0.1428296268,
-0.1644626856,
-0.0236307532,
0.069203414,
-0.2058778107,
-0.0429570414,
-0.4525322318,
0.2052508891,
0.2379836291,
-0.4658522904,
-0.0950662345,
-0.4946015775,
0.0330812857,
-0.1578764319,
-0.089362666,
0.2096682787,
-0.2081831992,
-0.0607302859,
-0.2306273431,
-0.3089902401,
0.4237655103,
0.0377433263,
-0.0328562856,
-0.0219789073,
0.0233348254,
0.0698871315,
-0.1160932481,
-0.0024438798,
0.0631487593,
0.1390255541,
-0.0318451039,
0.0003428459,
0.0977713913,
0.0718517005,
-0.2497508079,
0.1135584563,
-0.2141739428,
0.0221478418,
0.2703062892,
0.2845878303,
0.2309905887,
-0.2108984143,
0.0462134555,
0.0478864983,
0.1470340043,
-0.2481185198,
-0.1872298717,
0.1388610452,
0.1633289307,
-0.0804207325,
0.177638039,
0.0043389425,
0.0124961212,
0.0787414685,
0.0671448857,
0.1239257455,
-0.5669609904,
0.1740664542,
0.0063349586,
0.3078860044,
-0.02243964,
0.0088057593,
-0.1556965858,
-0.1675527096,
-0.0230150074,
0.0912775099,
-0.0685239732,
0.0833247229,
-0.6093363166,
-0.40870592,
-0.5790937543,
0.179669708,
0.3769253194,
0.5158492327,
0.0631970614,
0.0022393465,
-0.0609265305,
0.190102607,
0.4397818744,
-0.0025196504,
-0.3540674448,
0.1587361097,
-0.2482476085,
0.0448083133,
-0.0599945784,
0.119246304,
0.4059155285,
0.4624784887,
0.6241883039,
-0.1079075485,
-0.0444513299,
-0.2833612561,
0.0380275249,
-0.0437425971,
-0.0279176719,
-0.2320089042,
-0.1256360859,
0.0214122161,
0.2826704681,
0.3797211647,
0.4987151623,
0.1252159774,
-0.3248329759,
-0.1013537198,
-0.0680504814,
-0.0375918336,
0.2665783763,
-0.010676764,
0.0478922762,
0.0593677238,
0.0176351275,
0.1956767142,
0.438166827,
-0.2038093805,
0.226207301,
-0.5027624965,
-0.2139520943,
0.0629588068,
0.1709332019,
0.2143756151,
0.1790310144,
0.1252253354,
-0.2666704655,
0.0195627101,
-0.0269470215,
0.5451052189,
-0.1103776842,
0.2474048436,
-0.2115400732,
0.1946564019,
-0.1120186895,
0.1319496185,
-0.1759559214,
0.1986517906,
0.0094300359,
-0.4868904352,
0.2963677347,
0.3950623572,
0.9533658028,
0.4690330625,
0.2323831916,
0.344370842,
-0.3253096044,
0.5577523708,
0.0121842623,
0.2279827595,
-0.4324993491,
-0.1341833323,
-0.0456636138,
-0.0061298832,
-0.1033252925,
-0.1976793557,
-0.0330658033,
0.1741433293,
0.2883645892,
0.3233245015,
0.0277676471,
-0.098289296,
0.0814576149,
-0.3617425263,
-0.0013464317,
0.0234095231,
-0.0649723411,
0.0034662746,
-0.1622009873,
0.1170454919,
-0.1443164647,
0.1657348573,
-0.2635446191,
-0.070007816,
-0.2716578543,
0.0989565849,
0.3264747858,
-0.2881454229,
0.0499259084,
0.036862947,
0.61918962,
0.3315455616,
0.0225815345,
-0.0339670666,
0.1469226927,
0.2428238094,
0.044536382,
-0.4531975389,
0.3092097342,
0.0624039769,
0.2238799185,
-0.4029239416,
0.0980225056,
0.2158091217,
-0.2508913875,
-0.0615018271,
0.0382590704,
0.0031560101,
0.2250571102,
-0.1111282259,
0.202856198,
-0.2256279141,
0.1336387694,
-0.0337821655,
-0.2314990461,
-0.0089012086,
-0.036962308,
-0.3149181604,
0.041738715,
0.2063769996,
-0.0394492559,
-0.5680708885,
0.2585474849,
-0.3827707767,
-0.2513917685,
-0.0074506551,
0.228117615,
0.1966436654,
-0.0670428053,
0.1369248778,
-0.0981109291,
-0.2944404781,
-0.185488373,
0.2192818969,
0.3219817281,
-0.1407372057,
0.0456985533,
-0.351043582,
-0.1588984728,
0.0010027736,
-0.1786631942,
0.2199771106,
0.3252377212,
0.5128349662,
-0.3801932037,
0.1378066838,
-0.2897762656,
-0.2866574824,
-0.1854326129,
-0.0114551662,
-0.4478393793,
-0.121814236,
-0.4638454914,
-0.066103518,
0.0396460593,
0.467785269,
-0.0939923823,
-0.1583507657,
-0.1563606262,
0.0935140699,
0.3157992959,
-0.1554118544,
0.181610629,
0.420915544,
-0.1054449081,
-0.2760101259,
-0.0125928968,
-0.0062853992,
-0.0343768932,
0.2151856571,
0.2160928845,
0.4562658668,
0.1022043973,
0.0215159766,
0.1370663643,
0.0469141975,
0.1742349863,
0.4892760813,
-0.3065263033,
-0.060269624,
0.0650109947,
0.1609164625,
0.2588518262,
-0.1035243943,
0.2140512466,
0.1330474764,
-0.39813447,
0.2124921083,
0.0166540742,
0.2489037514,
-0.0569160692,
-0.4193787873,
0.4872604907,
0.154936105,
-0.0717952996,
0.052345559,
0.3959015906,
-0.1198632419,
-0.0587129183,
0.0534303971,
0.2961941957,
-0.0174068809,
0.2820732892,
0.0970097631,
0.2905798852,
-0.034077771,
0.1603578031,
0.0292962752,
0.0170201883,
0.4946970046,
0.4404007494,
-0.1957187504,
0.1561524123,
0.2504731417,
0.0438961238,
0.3230759799,
0.0308163539,
0.0219730381,
-0.0927131027,
-0.1868674159,
-0.2750903368,
0.1224020123,
-0.0890772194,
0.2107143402,
0.3414237499,
0.0426952615,
-0.0634648427,
-0.0621655472,
-0.00941021,
0.172562331,
-0.6092427969,
-0.1043751836,
-0.3937652707,
-0.0638765618,
-0.3130135536,
-0.087859422,
0.1186135709,
0.1606635302,
0.0132570788,
-0.2074565589,
-0.3273747563,
-0.0157747678,
0.2165648192,
0.0084982077,
0.2358189374,
-0.0823176652,
0.2951457798,
0.010712143,
0.0943172276,
-0.22710298,
0.1180297211,
0.5410670042,
0.1945248395,
-0.3048998415,
-0.1898747534,
-0.1428612918,
0.0159298256,
-0.2217851281,
0.3723817766,
-0.0461731516,
-0.1168169826,
0.1849311888,
0.0456459001,
-0.1747490168,
-0.0496920235,
0.2591226995,
0.0956099033,
0.2560720146,
0.3022288084,
0.0270090103,
0.0460872352,
0.1359392256,
-0.0166350752,
0.1046451703,
0.0186182968,
-0.1913212687,
-0.0224692561,
0.0496057458,
-0.1372327954,
0.0889952034,
0.2402990907,
0.3574058414,
0.5412002802,
-0.0921803266,
-0.2061897367,
-0.4149597883,
-0.3863124251,
0.5211244226,
0.4785048366,
-0.0168483034,
-0.0629613847,
-0.1964921653,
-0.1075165644,
0.0957126021,
-0.4149102271,
0.164754495,
0.0897946209,
0.1671876013,
-0.1554736197,
0.2812336385,
-0.0012406185,
-0.4019348919,
-0.1089807972,
-0.0724289268,
0.2989853024,
0.0287750736,
0.0601962209,
0.204209432,
-0.0134703144,
-0.1505276859,
0.320137471,
-0.0521138571,
0.6280631423,
0.1354068071,
-0.1455905735,
0.4411861897,
-0.0176505633,
0.0286774822,
-0.5843862891,
0.3166666031,
-0.2392611504,
0.3147201538,
0.037315771,
-0.4717946053,
-0.0502217114,
0.0252539515,
0.3487577438,
-0.1720806956,
-0.3881040215,
0.3029597402,
-0.213873893,
-0.0357794054,
0.0506294593,
0.3882572353,
0.2650302947,
0.4494659305,
-0.2877138853,
-0.6340729594,
-0.0330076069,
-0.2101485878,
-0.2857015431,
-0.19992055,
-0.1178364307,
0.2962211072,
-0.1532811671,
-0.1381505877,
-0.2883765996,
0.1595631391,
-0.2351205945,
-0.2998198867,
0.2422927916,
-0.1733076721,
-0.032171376,
-0.1982434094,
0.3979833126,
0.174154371,
-0.2592081428,
0.1010875031,
-0.141712144
] |
https://github.com/huggingface/datasets/issues/2532 | Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task | > Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**?
Oh, I am sorry
I would reopen the post on huggingface/transformers | [This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner).
The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`:
![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png)
Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing)
It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'.
One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`.
I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this.
p.s.
**I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)**
`get_dataset `is just a simple wrapping for `load_dataset`
and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")` | 30 | Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task
[This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner).
The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`:
![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png)
Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing)
It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'.
One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`.
I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this.
p.s.
**I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)**
`get_dataset `is just a simple wrapping for `load_dataset`
and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")`
> Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**?
Oh, I am sorry
I would reopen the post on huggingface/transformers | [
-0.1536962986,
0.0790132284,
0.0737818629,
-0.0382320546,
0.0921575353,
-0.3246814609,
-0.089981392,
0.1060318351,
-0.4617610276,
0.1986738741,
-0.2085371315,
0.3074207902,
0.2766765952,
0.0308850408,
-0.2191911638,
-0.1632774621,
0.1479932964,
0.219057247,
0.0056233983,
0.0611227453,
-0.1194192246,
0.4571381509,
-0.2123355269,
0.2143605798,
-0.2866263092,
-0.0706365779,
0.1255777478,
-0.3156487346,
-0.1683976948,
-0.3988147676,
0.2497142255,
0.1189106256,
-0.0836715698,
0.2043142319,
-0.0001126969,
-0.0575012192,
-0.0180355255,
0.0142885819,
0.1786754727,
-0.1964324713,
0.1283863187,
-0.3769185841,
-0.3356094956,
0.1073894799,
-0.0636702329,
0.0396108218,
0.2408126146,
-0.05541889,
0.6431404948,
0.4151499271,
0.1455554664,
-0.0134892911,
0.2545183301,
0.0607687347,
-0.3109232783,
0.2689673305,
-0.0950675458,
0.0190098099,
-0.1540723145,
0.0314687118,
-0.0746515244,
-0.0096177272,
-0.0922700465,
-0.4802753329,
-0.0148854349,
0.1148960292,
0.3214079738,
-0.4625910223,
0.1870726645,
0.0185330808,
-0.2498889863,
-0.0450735539,
-0.1830772758,
-0.3914946914,
-0.1368261576,
-0.2679941058,
0.2000966668,
-0.1542629898,
-0.1181236729,
0.1168284714,
0.0120837651,
0.1378457546,
0.029742755,
-0.2120394707,
-0.2942864895,
0.5647349954,
-0.0654120594,
0.0426451564,
-0.2047559023,
-0.0101767685,
0.3918431699,
-0.0428207107,
0.0059831096,
0.4373292029,
-0.2852554321,
-0.0585255586,
0.1970696598,
-0.4548267722,
-0.0079328343,
-0.0356672555,
0.1242710799,
0.2060959637,
0.0719588473,
0.0609171912,
-0.1630161405,
0.4642791152,
0.2114514858,
0.2766358852,
0.1968424022,
0.1170864031,
-0.0398003198,
-0.0404410213,
0.0627822056,
-0.1251490712,
-0.0498765223,
0.2508596778,
-0.3735535443,
0.1039711982,
-0.2315129042,
0.41214329,
-0.071867153,
0.3000816703,
0.0338656716,
-0.0993585065,
0.0393205024,
0.2893413305,
-0.3403169513,
-0.1019155309,
-0.0826219171,
0.1086550057,
-0.1952840388,
0.0189830288,
-0.2947452068,
0.1247094572,
-0.1966221631,
0.1081776023,
-0.0275509469,
0.1280119121,
0.3569861352,
-0.0326926708,
-0.0828051418,
-0.0947529972,
0.5368514657,
0.2782023549,
0.0261524543,
0.1261869371,
0.1154815257,
-0.3598403931,
-0.3748220205,
-0.0433909446,
-0.215793252,
0.089990288,
0.1479028314,
0.2012823075,
-0.1073766127,
0.1348212957,
-0.3785092831,
0.2858778238,
0.3308011293,
-0.2465245724,
0.0029815733,
-0.3679089546,
-0.4135366678,
-0.1898321807,
0.3192926347,
-0.144251883,
-0.0017331615,
-0.0091709867,
0.1106588021,
0.1891387552,
0.4840113223,
0.1339652836,
0.3138591647,
0.3631410897,
-0.4917096496,
0.4855648279,
0.0987910256,
-0.1336459368,
-0.0881665498,
-0.1546434313,
-0.3981323242,
0.2574173808,
-0.1778469384,
-0.2853302062,
0.1459316462,
0.1648341268,
0.1642515212,
0.4675333202,
-0.1345410198,
0.0967918783,
-0.0824028179,
0.3093528152,
-0.0516471267,
-0.2683204412,
0.0125271874,
-0.0348947458,
-0.2307364941,
-0.238222152,
-0.1597028822,
-0.0885296687,
0.102519162,
-0.0872083902,
0.0438993648,
-0.1296177357,
0.0238304175,
-0.1528643966,
0.0428630635,
-0.0116005912,
-0.3619787395,
0.2263041288,
0.0065002143,
-0.1665719897,
-0.2440985292,
0.1780436188,
-0.1699587554,
-0.1374198496,
0.229845345,
0.0661634654,
0.177830562,
0.3334912658,
0.0553163663,
0.2994612753,
0.1876495034,
0.2598831058,
-0.2379400432,
0.1655212045,
-0.1539326459,
0.0328836478,
-0.107662648,
0.4495725334,
0.0576866828,
-0.1159917265,
-0.1262979358,
0.228382811,
0.25328511,
-0.0442685708,
-0.2839105725,
0.0855725557,
0.1471209228,
0.1632163972,
-0.3755314052,
0.2840961516,
-0.2077518404,
-0.1224474609,
0.5265045166,
0.8932766318,
-0.0384240784,
0.1267525107,
-0.1457831562,
-0.0221705288,
0.4458657205,
0.1181423888,
-0.1546637714,
-0.2694556713,
0.0372078568,
0.2975232005,
-0.10649281,
0.0252686348,
-0.0940384045,
0.1421897858,
0.2193614841,
0.0666166991,
-0.2200762331,
0.1170538366,
0.0044204649,
-0.2848397791,
0.1736073643,
0.0940915942,
0.2308216989,
0.0403841101,
0.1598120332,
0.2757774889,
-0.2304854393,
-0.1623516679,
0.1398642957,
0.0159912668,
0.1191513538,
0.5081242323,
0.1112575084,
0.4917434454,
-0.2569987178,
-0.2506945431,
-0.3280730844,
0.0469816625,
-0.1642935425,
0.2328414023,
-0.2001020908,
-0.3381243646,
-0.4188846648,
-0.1450554878,
-0.1150106266,
-0.5577640533,
0.1381096393,
0.0413246639,
-0.2752408981,
0.4234622121,
0.113436237,
0.2538702786,
-0.1176143587,
0.0566215143,
-0.2270079255,
0.0496981591,
-0.4241376221,
-0.0032033175,
0.1883002967,
-0.2271524966,
0.1867781132,
-0.3008563519,
-0.0523730665,
0.1612114906,
-0.738155365,
0.1576874554,
0.0599958301,
0.0300803725,
0.2673286796,
-0.280410409,
-0.4084677696,
-0.5457121134,
0.1107585281,
0.0272974297,
-0.363614887,
0.1239912063,
-0.0817676932,
-0.1428296268,
-0.1644626856,
-0.0236307532,
0.069203414,
-0.2058778107,
-0.0429570414,
-0.4525322318,
0.2052508891,
0.2379836291,
-0.4658522904,
-0.0950662345,
-0.4946015775,
0.0330812857,
-0.1578764319,
-0.089362666,
0.2096682787,
-0.2081831992,
-0.0607302859,
-0.2306273431,
-0.3089902401,
0.4237655103,
0.0377433263,
-0.0328562856,
-0.0219789073,
0.0233348254,
0.0698871315,
-0.1160932481,
-0.0024438798,
0.0631487593,
0.1390255541,
-0.0318451039,
0.0003428459,
0.0977713913,
0.0718517005,
-0.2497508079,
0.1135584563,
-0.2141739428,
0.0221478418,
0.2703062892,
0.2845878303,
0.2309905887,
-0.2108984143,
0.0462134555,
0.0478864983,
0.1470340043,
-0.2481185198,
-0.1872298717,
0.1388610452,
0.1633289307,
-0.0804207325,
0.177638039,
0.0043389425,
0.0124961212,
0.0787414685,
0.0671448857,
0.1239257455,
-0.5669609904,
0.1740664542,
0.0063349586,
0.3078860044,
-0.02243964,
0.0088057593,
-0.1556965858,
-0.1675527096,
-0.0230150074,
0.0912775099,
-0.0685239732,
0.0833247229,
-0.6093363166,
-0.40870592,
-0.5790937543,
0.179669708,
0.3769253194,
0.5158492327,
0.0631970614,
0.0022393465,
-0.0609265305,
0.190102607,
0.4397818744,
-0.0025196504,
-0.3540674448,
0.1587361097,
-0.2482476085,
0.0448083133,
-0.0599945784,
0.119246304,
0.4059155285,
0.4624784887,
0.6241883039,
-0.1079075485,
-0.0444513299,
-0.2833612561,
0.0380275249,
-0.0437425971,
-0.0279176719,
-0.2320089042,
-0.1256360859,
0.0214122161,
0.2826704681,
0.3797211647,
0.4987151623,
0.1252159774,
-0.3248329759,
-0.1013537198,
-0.0680504814,
-0.0375918336,
0.2665783763,
-0.010676764,
0.0478922762,
0.0593677238,
0.0176351275,
0.1956767142,
0.438166827,
-0.2038093805,
0.226207301,
-0.5027624965,
-0.2139520943,
0.0629588068,
0.1709332019,
0.2143756151,
0.1790310144,
0.1252253354,
-0.2666704655,
0.0195627101,
-0.0269470215,
0.5451052189,
-0.1103776842,
0.2474048436,
-0.2115400732,
0.1946564019,
-0.1120186895,
0.1319496185,
-0.1759559214,
0.1986517906,
0.0094300359,
-0.4868904352,
0.2963677347,
0.3950623572,
0.9533658028,
0.4690330625,
0.2323831916,
0.344370842,
-0.3253096044,
0.5577523708,
0.0121842623,
0.2279827595,
-0.4324993491,
-0.1341833323,
-0.0456636138,
-0.0061298832,
-0.1033252925,
-0.1976793557,
-0.0330658033,
0.1741433293,
0.2883645892,
0.3233245015,
0.0277676471,
-0.098289296,
0.0814576149,
-0.3617425263,
-0.0013464317,
0.0234095231,
-0.0649723411,
0.0034662746,
-0.1622009873,
0.1170454919,
-0.1443164647,
0.1657348573,
-0.2635446191,
-0.070007816,
-0.2716578543,
0.0989565849,
0.3264747858,
-0.2881454229,
0.0499259084,
0.036862947,
0.61918962,
0.3315455616,
0.0225815345,
-0.0339670666,
0.1469226927,
0.2428238094,
0.044536382,
-0.4531975389,
0.3092097342,
0.0624039769,
0.2238799185,
-0.4029239416,
0.0980225056,
0.2158091217,
-0.2508913875,
-0.0615018271,
0.0382590704,
0.0031560101,
0.2250571102,
-0.1111282259,
0.202856198,
-0.2256279141,
0.1336387694,
-0.0337821655,
-0.2314990461,
-0.0089012086,
-0.036962308,
-0.3149181604,
0.041738715,
0.2063769996,
-0.0394492559,
-0.5680708885,
0.2585474849,
-0.3827707767,
-0.2513917685,
-0.0074506551,
0.228117615,
0.1966436654,
-0.0670428053,
0.1369248778,
-0.0981109291,
-0.2944404781,
-0.185488373,
0.2192818969,
0.3219817281,
-0.1407372057,
0.0456985533,
-0.351043582,
-0.1588984728,
0.0010027736,
-0.1786631942,
0.2199771106,
0.3252377212,
0.5128349662,
-0.3801932037,
0.1378066838,
-0.2897762656,
-0.2866574824,
-0.1854326129,
-0.0114551662,
-0.4478393793,
-0.121814236,
-0.4638454914,
-0.066103518,
0.0396460593,
0.467785269,
-0.0939923823,
-0.1583507657,
-0.1563606262,
0.0935140699,
0.3157992959,
-0.1554118544,
0.181610629,
0.420915544,
-0.1054449081,
-0.2760101259,
-0.0125928968,
-0.0062853992,
-0.0343768932,
0.2151856571,
0.2160928845,
0.4562658668,
0.1022043973,
0.0215159766,
0.1370663643,
0.0469141975,
0.1742349863,
0.4892760813,
-0.3065263033,
-0.060269624,
0.0650109947,
0.1609164625,
0.2588518262,
-0.1035243943,
0.2140512466,
0.1330474764,
-0.39813447,
0.2124921083,
0.0166540742,
0.2489037514,
-0.0569160692,
-0.4193787873,
0.4872604907,
0.154936105,
-0.0717952996,
0.052345559,
0.3959015906,
-0.1198632419,
-0.0587129183,
0.0534303971,
0.2961941957,
-0.0174068809,
0.2820732892,
0.0970097631,
0.2905798852,
-0.034077771,
0.1603578031,
0.0292962752,
0.0170201883,
0.4946970046,
0.4404007494,
-0.1957187504,
0.1561524123,
0.2504731417,
0.0438961238,
0.3230759799,
0.0308163539,
0.0219730381,
-0.0927131027,
-0.1868674159,
-0.2750903368,
0.1224020123,
-0.0890772194,
0.2107143402,
0.3414237499,
0.0426952615,
-0.0634648427,
-0.0621655472,
-0.00941021,
0.172562331,
-0.6092427969,
-0.1043751836,
-0.3937652707,
-0.0638765618,
-0.3130135536,
-0.087859422,
0.1186135709,
0.1606635302,
0.0132570788,
-0.2074565589,
-0.3273747563,
-0.0157747678,
0.2165648192,
0.0084982077,
0.2358189374,
-0.0823176652,
0.2951457798,
0.010712143,
0.0943172276,
-0.22710298,
0.1180297211,
0.5410670042,
0.1945248395,
-0.3048998415,
-0.1898747534,
-0.1428612918,
0.0159298256,
-0.2217851281,
0.3723817766,
-0.0461731516,
-0.1168169826,
0.1849311888,
0.0456459001,
-0.1747490168,
-0.0496920235,
0.2591226995,
0.0956099033,
0.2560720146,
0.3022288084,
0.0270090103,
0.0460872352,
0.1359392256,
-0.0166350752,
0.1046451703,
0.0186182968,
-0.1913212687,
-0.0224692561,
0.0496057458,
-0.1372327954,
0.0889952034,
0.2402990907,
0.3574058414,
0.5412002802,
-0.0921803266,
-0.2061897367,
-0.4149597883,
-0.3863124251,
0.5211244226,
0.4785048366,
-0.0168483034,
-0.0629613847,
-0.1964921653,
-0.1075165644,
0.0957126021,
-0.4149102271,
0.164754495,
0.0897946209,
0.1671876013,
-0.1554736197,
0.2812336385,
-0.0012406185,
-0.4019348919,
-0.1089807972,
-0.0724289268,
0.2989853024,
0.0287750736,
0.0601962209,
0.204209432,
-0.0134703144,
-0.1505276859,
0.320137471,
-0.0521138571,
0.6280631423,
0.1354068071,
-0.1455905735,
0.4411861897,
-0.0176505633,
0.0286774822,
-0.5843862891,
0.3166666031,
-0.2392611504,
0.3147201538,
0.037315771,
-0.4717946053,
-0.0502217114,
0.0252539515,
0.3487577438,
-0.1720806956,
-0.3881040215,
0.3029597402,
-0.213873893,
-0.0357794054,
0.0506294593,
0.3882572353,
0.2650302947,
0.4494659305,
-0.2877138853,
-0.6340729594,
-0.0330076069,
-0.2101485878,
-0.2857015431,
-0.19992055,
-0.1178364307,
0.2962211072,
-0.1532811671,
-0.1381505877,
-0.2883765996,
0.1595631391,
-0.2351205945,
-0.2998198867,
0.2422927916,
-0.1733076721,
-0.032171376,
-0.1982434094,
0.3979833126,
0.174154371,
-0.2592081428,
0.1010875031,
-0.141712144
] |
https://github.com/huggingface/datasets/issues/2522 | Documentation Mistakes in Dataset: emotion | Hi,
this issue has been already reported in the dataset repo (https://github.com/dair-ai/emotion_dataset/issues/2), so this is a bug on their side. | As per documentation,
Dataset: emotion
Homepage: https://github.com/dair-ai/emotion_dataset
Dataset: https://github.com/huggingface/datasets/blob/master/datasets/emotion/emotion.py
Permalink: https://huggingface.co/datasets/viewer/?dataset=emotion
Emotion is a dataset of English Twitter messages with eight basic emotions: anger, anticipation, disgust, fear, joy, sadness, surprise, and trust. For more detailed information please refer to the paper.
But when we view the data, there are only 6 emotions, anger, fear, joy, sadness, surprise, and trust. | 20 | Documentation Mistakes in Dataset: emotion
As per documentation,
Dataset: emotion
Homepage: https://github.com/dair-ai/emotion_dataset
Dataset: https://github.com/huggingface/datasets/blob/master/datasets/emotion/emotion.py
Permalink: https://huggingface.co/datasets/viewer/?dataset=emotion
Emotion is a dataset of English Twitter messages with eight basic emotions: anger, anticipation, disgust, fear, joy, sadness, surprise, and trust. For more detailed information please refer to the paper.
But when we view the data, there are only 6 emotions, anger, fear, joy, sadness, surprise, and trust.
Hi,
this issue has been already reported in the dataset repo (https://github.com/dair-ai/emotion_dataset/issues/2), so this is a bug on their side. | [
0.2212710977,
-0.3492064476,
-0.1087545305,
0.5762395859,
0.2677906156,
0.1737760454,
0.2942093611,
0.1110391468,
-0.1283254474,
0.2038232088,
-0.1274428368,
0.0429527275,
-0.2023336142,
-0.1131506935,
-0.005595265,
-0.1862744689,
0.0835631043,
-0.0872548819,
0.3198857307,
-0.1177930832,
0.033547692,
0.1983207166,
-0.0980704427,
0.2302878499,
-0.4554689527,
-0.0563981384,
-0.2686940432,
-0.0515944175,
-0.046982348,
-0.5062132478,
0.071676679,
-0.0896964073,
-0.0074800625,
0.2895740271,
-0.0001154652,
-0.1116648465,
0.3260879815,
0.0778149739,
0.0454543233,
-0.2310890853,
0.2143917531,
-0.3071581721,
0.3784171939,
-0.0876956731,
-0.0448349528,
-0.5062564611,
0.0592918918,
-0.0312777087,
0.4184463918,
0.492714107,
0.1667770296,
0.1780877113,
0.2175600976,
0.2025783211,
0.419418931,
0.5456278324,
-0.017826125,
0.020421315,
-0.1378221214,
-0.0215042345,
-0.1851764619,
0.3451383114,
0.1650801599,
0.0712510794,
0.1775847822,
-0.0918468386,
0.1996379793,
-0.5791179538,
0.1523031145,
0.1900899261,
0.4783174694,
-0.0171628967,
-0.3321195543,
-0.11462681,
0.0158167928,
-0.1334293187,
0.1938817799,
0.2820128202,
-0.113977164,
0.0929716229,
0.1022889763,
0.0965631902,
-0.1609795392,
0.424610585,
0.0660461485,
0.1322464496,
-0.3756155074,
0.0194859132,
0.0079662176,
-0.2089993954,
0.0384882875,
0.1436932981,
-0.0376612768,
0.2057617307,
-0.1708821803,
0.2282334417,
-0.0167875737,
0.0003169551,
-0.0389235578,
-0.2421784103,
-0.1124491319,
0.1332705468,
-0.1147635877,
-0.0613618232,
0.619705677,
0.0495514572,
0.1868033707,
0.1237085909,
0.2935322821,
0.090946123,
-0.0030078292,
-0.0017007729,
-0.0367354192,
0.0221604817,
0.0139618441,
-0.4305973947,
-0.0058876798,
0.0918473601,
-0.3832755387,
-0.0522357672,
-0.2342672348,
-0.3501873314,
-0.0679656416,
0.3387866616,
0.0737478882,
0.3004630804,
-0.0802051201,
0.1375326216,
0.0170842484,
-0.541508317,
-0.1882719994,
-0.0249803644,
-0.2958144546,
-0.0081739724,
0.1116003022,
-0.0923950076,
0.63155514,
0.155940935,
-0.2107318938,
-0.3750534654,
0.0885887966,
-0.1992551386,
0.3007444739,
0.1824377179,
-0.0359495543,
0.2212835252,
0.266477406,
-0.0924433544,
0.0486650318,
0.091569975,
-0.0351154655,
-0.0881065875,
-0.4956248105,
0.0979887024,
-0.2035674006,
0.0199235976,
-0.039060697,
0.6006981134,
0.0803499371,
0.1519803852,
0.2233846933,
-0.0730354488,
0.0122766122,
-0.2965441346,
0.3505522311,
0.3677571416,
-0.3522182703,
-0.3982223272,
-0.3678139448,
0.0090234894,
0.1439786702,
0.4062842131,
-0.3304086328,
0.1271509826,
-0.3378308713,
0.2549832761,
0.2418566048,
-0.1866464317,
-0.2345923185,
0.1127934307,
0.3574961126,
0.0649623945,
-0.0762089789,
0.2588240504,
0.1550675631,
0.1859454811,
0.0829655007,
-0.2622181475,
0.3079396188,
-0.040788766,
-0.340000689,
-0.1971056759,
0.1795886457,
0.0728719532,
-0.0786689371,
-0.0564082265,
0.292244941,
-0.2469895631,
0.681065917,
-0.0197621267,
-0.014157014,
0.2730136514,
0.1785175353,
0.4840730727,
0.125122726,
-0.0556447059,
-0.1300531626,
-0.111468114,
0.1443302631,
0.4373604953,
0.2046015263,
-0.0555773452,
-0.2629445195,
-0.0983478129,
-0.1430062801,
-0.4279915988,
0.1366410255,
0.2002826035,
-0.3659702539,
0.2478678077,
-0.3380768597,
0.2200652808,
-0.2423123717,
0.0935566574,
-0.2778652906,
0.2316067517,
-0.0960297137,
0.017993547,
0.1508453488,
0.0809294432,
0.046376247,
0.0718573257,
-0.0797580183,
0.2689034641,
0.0939959362,
0.1416841894,
0.0152788591,
0.0105835125,
0.3232315779,
-0.4997342825,
0.0140254553,
0.1580100507,
-0.1684829891,
0.2369733751,
-0.1351103783,
0.1746464968,
0.2725007534,
0.0226434693,
0.0001452565,
0.1185612902,
0.3502691984,
0.2929785252,
-0.4297550619,
-0.4398634434,
0.1170178503,
-0.2998408973,
0.1213402748,
0.1156433672,
-0.2244834006,
0.2992220819,
0.2973558009,
0.0801389962,
0.154386282,
0.2432101667,
-0.5394957066,
-0.3813191056,
0.0901102945,
0.0315192714,
0.2323158532,
0.2432174385,
-0.1390017867,
-0.1369743049,
0.0364047438,
-0.1281926632,
0.2262079567,
0.2362592071,
0.1060450748,
-0.0901912674,
0.1861981452,
0.0976962894,
-0.3965110779,
0.1131403446,
-0.1362861842,
0.2927366197,
-0.4832673073,
-0.158835113,
-0.1684352607,
-0.3459651768,
0.1443155408,
-0.056645073,
-0.1863457859,
-0.3294003308,
-0.0384604745,
-0.3649955094,
-0.1907692552,
-0.0067474972,
-0.1385477185,
0.0470803455,
-0.0089545101,
0.5758179426,
-0.2279248536,
-0.0529018827,
-0.2607599795,
0.0117808916,
-0.0994346291,
0.1297069341,
0.0816467106,
-0.259659797,
-0.2590091825,
-0.2978916168,
-0.5375894308,
0.2664558589,
-0.2632861137,
0.3585532904,
0.0612230599,
-0.0123539343,
-0.4086563587,
-0.0889175907,
0.2468179464,
-0.2753389478,
-0.1839737296,
-0.1442345977,
-0.093952924,
0.0186867118,
0.1265519261,
-0.5909526944,
-0.2242354602,
-0.1425712556,
0.3636080623,
-0.0673638955,
0.1479128003,
0.169194147,
0.033671122,
0.1353574246,
-0.3880834877,
-0.0101905912,
-0.4052891433,
-0.2496476471,
0.2451401353,
-0.3715068102,
-0.4380247295,
0.1713706851,
0.0093548223,
0.146030575,
-0.2629666626,
-0.6767250299,
0.0650980771,
-0.2844429314,
0.1649731249,
-0.0391653962,
0.2578708231,
-0.1962356567,
-0.0335548446,
-0.1405587494,
0.0131706223,
-0.3025433421,
-0.0472641811,
-0.3038463891,
0.4315599501,
-0.2831238508,
0.1189669967,
0.0314504057,
0.2606201768,
0.4236906767,
-0.1661624908,
0.1330356598,
-0.2599679828,
0.4982192516,
0.1351464689,
-0.2544525862,
0.2596282959,
-0.0836422518,
0.2704187036,
0.4516675472,
0.0968761891,
-0.0060576238,
0.0286700651,
-0.0716326982,
-0.3876915276,
-0.3234593272,
-0.0732196271,
-0.3693271279,
0.2897179723,
0.1122932211,
-0.1058360785,
-0.0475785471,
-0.1648265123,
-0.0646665022,
0.2462559342,
0.044237636,
0.1387831271,
-0.2342515141,
0.1010597944,
-0.3769003749,
0.1123181283,
-0.0255668312,
0.3216905594,
0.0228448361,
0.0710415095,
-0.0112936422,
0.3466482759,
0.475274384,
-0.1060133502,
-0.1243093684,
0.1034454107,
0.2500171363,
-0.6698015332,
0.0482918099,
-0.2016926408,
0.1725429595,
0.3898584247,
0.4813296199,
-0.1017726511,
-0.0332942232,
0.2220116556,
0.0038328543,
-0.055409003,
-0.1946830601,
-0.3725696802,
-0.2727360129,
-0.0943463817,
-0.3107714355,
0.2005605251,
-0.2032245398,
-0.1688938886,
-0.0818767846,
-0.0048375037,
-0.0029969811,
0.1037379056,
0.046942547,
0.3300942779,
-0.0200655609,
0.0435918346,
0.4950053394,
0.31576401,
0.0102142747,
0.4064960778,
-0.0269220285,
-0.6741470098,
0.065728277,
-0.2502686381,
0.0342187583,
0.1419752091,
-0.1325028241,
-0.0033857822,
0.166695267,
0.1282818019,
-0.0065624882,
0.1957175732,
0.6088895202,
0.1220682636,
0.0894868821,
-0.3547284305,
0.2650873959,
0.0514201969,
0.0123913884,
-0.101360023,
0.581146121,
-0.1059893593,
0.242825523,
0.1652479321,
0.8558476567,
0.0546252206,
0.1828425527,
0.2816801965,
-0.05383889,
0.5717368722,
-0.0866699219,
0.1045087874,
-0.3380014896,
0.1762048751,
-0.0362826735,
0.0243873149,
-0.0873434395,
0.3483555913,
-0.1920886189,
0.0702588335,
-0.0287693068,
0.1276536435,
0.1744468957,
0.0807512403,
-0.1416054517,
0.0913456231,
-0.3640452027,
0.1393848956,
-0.0821594149,
0.2686318457,
0.1377174854,
0.0379363783,
-0.07131771,
-0.125880152,
-0.5482359529,
-0.2577884793,
-0.6138538122,
-0.0038741939,
-0.1841580868,
0.0087305456,
0.2942083478,
0.5220599174,
0.5753256083,
-0.0724818558,
-0.0636659861,
0.0764413178,
0.0112093734,
-0.2106305361,
0.0168812759,
0.0478558652,
0.246567145,
-0.0639677495,
-0.4747827351,
0.1924728751,
-0.0319322422,
0.1135666668,
-0.4081457853,
-0.0220131315,
-0.2099514604,
-0.2016079426,
0.1455542296,
-0.1266416609,
-0.2544453144,
-0.2183948457,
0.1006957218,
0.1826275587,
-0.0076850392,
0.036989931,
0.0159807894,
-0.1750515848,
-0.1224473268,
0.0530371964,
-0.139587,
-0.3345019519,
0.4910681248,
0.2866665125,
-0.146616742,
-0.1908088326,
0.1806305349,
0.2962315083,
-0.5138754249,
0.128376171,
-0.0219825618,
0.0162780881,
-0.1513836235,
0.2409598827,
0.0548996218,
0.137191534,
-0.1302477866,
-0.2732832432,
-0.2836494446,
0.4248709977,
0.0570407808,
0.0046400018,
-0.0850583762,
-0.23700881,
0.1729515493,
0.1067770794,
-0.2570381165,
0.0735716373,
0.0665480494,
-0.0176840387,
0.1118416116,
-0.0777178258,
0.2077561319,
-0.0933495462,
0.0825388432,
-0.0391171202,
0.2671704292,
-0.1491824985,
-0.0442340001,
0.1616088003,
0.0723477304,
-0.1651757658,
-0.0152211338,
-0.0501178056,
-0.0207906105,
-0.1669557989,
0.1597810835,
0.4227868617,
0.0663979501,
0.4139953256,
-0.4394425452,
0.0645751953,
0.3271657228,
-0.111058116,
0.2328565121,
0.4335312545,
0.3713965416,
0.0603558123,
0.2591711283,
-0.0801141262,
-0.0536848046,
0.0043768343,
-0.1375543326,
0.2534368336,
0.0494652018,
-0.4649819434,
0.0077136979,
-0.235001877,
0.3385831416,
0.168830812,
-0.2895058393,
0.0920865983,
0.0927089602,
0.192806229,
-0.3769543469,
-0.0334831104,
-0.2554331124,
-0.1835785359,
0.1491666287,
0.0393544398,
0.1262141168,
0.0949014574,
-0.132091701,
-0.0742515624,
0.2503603399,
-0.2206674814,
0.2582572997,
-0.0035884939,
-0.3227564692,
-0.0463627167,
0.206457153,
0.1990864575,
0.1075852588,
0.3274730444,
0.1877728403,
0.2775310576,
0.1415827572,
0.1120448858,
0.2960927486,
-0.0117401406,
0.2074178755,
0.1706997752,
-0.3604427278,
0.1573473811,
-0.1794186085,
0.6270519495,
0.1679916829,
-0.0309813991,
0.0112478808,
-0.0917844176,
-0.0041666902,
0.0572588108,
-0.0046416074,
-0.2117327452,
-0.3360926211,
-0.1708007753,
-0.1270978153,
-0.3938743472,
-0.1881665587,
0.27264148,
-0.3617935777,
-0.622592628,
0.2395994663,
0.3184604645,
0.427642256,
0.0079052001,
0.1754390746,
0.3265023828,
-0.1069339961,
0.0372633003,
0.343847245,
0.5582187176,
0.2726561129,
0.1357982606,
0.0585241653,
-0.1089523584,
-0.1505996585,
0.0711601004,
0.0317658186,
0.3115764558,
-0.3008618355,
-0.0867408812,
0.0576541871,
-0.1387261301,
0.1372631341,
0.052185107,
0.5654799938,
-0.2587907314,
0.2997581065,
-0.6842377782,
-0.2530016899,
-0.1697013676,
-0.1047003567,
-0.3903718591,
0.0478404835,
0.44834885,
0.0521796681,
0.0657665282,
-0.248942554,
0.0888760164,
-0.2897294164,
0.2565431595,
0.3679550886,
0.0715660453,
-0.0254189018,
-0.1495765448,
-0.6116509438,
0.058843825,
0.0604283512,
-0.2176890075,
0.0264881998,
0.2333488315,
0.0948557034,
0.0595006831,
0.4047591984,
-0.1115938127,
0.1358875483,
0.0189149939,
-0.101651229,
-0.0852361396,
-0.1031046957,
0.5716148615,
0.0936458409,
0.1650379896,
0.1955997348,
0.1957148463,
-0.1012586504,
-0.1404988468,
0.1763876528,
0.034984313,
-0.191730231,
-0.0249968022,
0.3378706574,
0.2155155241,
-0.0544069335,
-0.3151960969,
-0.3827752471,
-0.191952467,
-0.0921654999,
0.434330523,
0.1147847474,
0.4005175233,
-0.1333859712,
-0.362126708,
-0.309442997,
-0.1144908816,
0.0826686174,
-0.3093991578,
-0.1664940268,
0.0467183664,
0.2304985523,
-0.0848025978,
0.0504703373,
0.145922333,
-0.1524725109,
-0.0363555327,
-0.2446847111,
-0.3524094224,
0.3186002374,
-0.4616987705,
0.0756683722,
-0.0987285674,
0.3212604523,
0.5552662611,
-0.2004435062,
-0.737968564,
-0.0266473964,
0.5044903755,
0.1435476243,
-0.2154506445,
0.0133137926,
-0.0447971597,
0.1685383469,
0.0444824547,
0.4601896703,
0.3010539711,
0.048400104,
0.135705471,
-0.1152163297
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | Hi ! `map` calls `__getstate__` using `dill` to hash your map function. This is used by the caching mechanism to recover previously computed results. That's why you don't see any `__setstate__` call.
Why do you change an attribute of your tokenizer when `__getstate__` is called ? | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 46 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
Hi ! `map` calls `__getstate__` using `dill` to hash your map function. This is used by the caching mechanism to recover previously computed results. That's why you don't see any `__setstate__` call.
Why do you change an attribute of your tokenizer when `__getstate__` is called ? | [
-0.2248879373,
0.1931206882,
0.1127529666,
0.0287755355,
0.0341957547,
-0.3237703443,
0.1385364532,
0.1950844824,
0.3468083441,
-0.1000180244,
0.1921815872,
0.7253853083,
-0.1929605752,
0.2086694688,
-0.0016188882,
0.059579365,
0.0705189481,
-0.035407722,
-0.0051377863,
-0.0640127957,
-0.2173010111,
0.05091656,
-0.3579758406,
0.1536128968,
-0.2765947878,
-0.1768147945,
0.0259387493,
0.1186884493,
-0.0299848206,
-0.2711365819,
0.2045459747,
-0.0787938684,
-0.0277054757,
0.2411658317,
-0.0001231694,
-0.0801149085,
0.016194012,
-0.0863833278,
-0.0041621327,
-0.2175994962,
-0.2230957747,
-0.123976931,
-0.1235439554,
-0.2294130474,
0.0781576335,
0.0024628341,
-0.2965723872,
-0.3813812137,
0.6342017651,
0.4318727851,
0.1199070215,
0.3648687601,
-0.0678680688,
-0.034679357,
-0.1355489343,
0.3100190163,
0.0528480634,
0.223302871,
0.1253270507,
-0.3918115497,
-0.0012151934,
0.0956294388,
-0.19812572,
-0.2160099745,
0.1527505815,
0.0591068305,
0.1838102937,
0.0106210914,
-0.0086784381,
0.0929948539,
0.2169976532,
-0.3573753536,
-0.2120289505,
-0.3761956394,
-0.0575138479,
-0.150500685,
0.3402034938,
-0.2168391645,
0.1316487044,
0.1427591592,
-0.048483938,
-0.1044859737,
0.2239406407,
0.3518481851,
-0.0390821695,
0.257178694,
-0.0166093931,
0.3984130025,
-0.0536792763,
-0.1063232422,
-0.1807259619,
-0.1033440679,
0.101654321,
0.4516166747,
-0.0112114083,
-0.2384908497,
0.2105505764,
-0.2123310417,
-0.0243079178,
0.2115103304,
-0.1638646871,
0.1225486845,
-0.3641278744,
0.2640175521,
0.4708403945,
0.2212182283,
0.1237126887,
0.6363039613,
0.1985703111,
-0.1602927446,
-0.3000453711,
0.0745260864,
0.3102484345,
-0.1011357307,
-0.0373393595,
0.1756479442,
-0.1027165204,
-0.1286522895,
-0.0738531947,
0.2730225921,
-0.7321612835,
0.0083056018,
0.1820912808,
0.1216199249,
-0.0009520054,
-0.2224105299,
-0.0831373632,
0.0777556375,
-0.2158573866,
0.1148084998,
-0.1185755283,
0.1242492348,
-0.3427779675,
0.1104225293,
-0.0432602912,
0.0569454506,
0.3175241351,
0.1256697774,
-0.1688384116,
-0.0596508682,
0.1512503326,
-0.2294481248,
0.4016972482,
-0.0197039768,
-0.2360145599,
0.0424857289,
0.3069403172,
-0.44203192,
-0.2555748224,
-0.0592270866,
-0.1526567042,
-0.141263485,
-0.0386342406,
0.0347255096,
-0.2372964174,
-0.0047180336,
-0.3046903014,
0.102889508,
0.3713425398,
-0.2058526874,
0.0988660976,
-0.5015790462,
-0.3563109636,
-0.2076636404,
0.0088022873,
0.1774782538,
-0.4386509955,
-0.2434040755,
-0.0980323851,
0.1520785093,
0.3357073963,
0.1245673597,
-0.2613386214,
0.6007257104,
-0.4962501526,
0.8756875992,
0.2869646847,
-0.1486269236,
-0.4010114968,
0.0329538472,
-0.1728947759,
0.2320755869,
-0.6788750291,
-0.1038571894,
0.1650153995,
-0.0797583014,
0.1138164774,
0.33886379,
0.1549206823,
-0.0953324735,
-0.1282201707,
0.0644308925,
0.3268654943,
-0.2837591767,
0.0703489035,
-0.0096955039,
0.1624443531,
-0.2167632282,
0.2174031585,
0.0343073532,
0.1843425483,
-0.1125895903,
0.455953896,
0.1764434129,
-0.1205100715,
-0.3156249523,
-0.1837680936,
0.3253222406,
-0.0280875638,
-0.0268793292,
-0.1192956194,
-0.0829098225,
-0.1131263599,
0.05602213,
-0.3399250805,
-0.2433563471,
0.0299024209,
0.0243139639,
0.2335765809,
0.1753293425,
-0.0835650563,
-0.2479454726,
-0.0506148413,
0.060971193,
-0.0558932684,
0.056883499,
0.1251783967,
-0.2686153352,
-0.31788975,
0.1674041301,
0.4087355733,
-0.0979360864,
-0.1848381311,
0.2761867344,
0.5985628366,
-0.2991657853,
-0.3962607384,
-0.1816082895,
-0.1041160598,
0.1290624291,
-0.2356886715,
0.1717507839,
-0.0027844682,
-0.2309008539,
-0.0256965421,
0.5132232904,
0.247693643,
0.3112366796,
-0.4027120769,
0.2516180277,
-0.0123053417,
-0.0868053138,
-0.1482174695,
-0.3373770714,
-0.2627914846,
0.0373320803,
0.3305849731,
-0.1344625503,
-0.0364915878,
0.0407442302,
0.3557883799,
-0.0735355392,
0.3257072568,
-0.0644304752,
-0.1981064826,
-0.1906805933,
0.2980231047,
0.3740842342,
0.5166620612,
-0.1092321873,
-0.0572248697,
0.0850380659,
-0.0458903052,
-0.0490010381,
0.0168409869,
-0.1722276956,
-0.0378648788,
0.198848024,
0.0485894382,
-0.0998981595,
-0.1812919676,
0.0097946078,
0.0562791005,
0.2922280431,
-0.2386671901,
0.0962415561,
-0.5637151599,
0.0709879398,
-0.2885975242,
-0.1303832233,
0.0072153546,
-0.4439607561,
-0.2119713426,
0.0941521376,
-0.2360057831,
0.2182338536,
-0.1610496342,
-0.1597822756,
-0.15046224,
-0.2889372706,
0.0986512154,
-0.2346133739,
-0.2234227657,
-0.0864399076,
0.1288220882,
0.122381568,
0.2256276011,
0.3576844335,
-0.4277693033,
-0.3453749418,
-0.2861615419,
0.3642110229,
-0.167160809,
0.1216559336,
0.3645746112,
-0.21086362,
-0.072285071,
0.1510340869,
0.3195461631,
-0.10602507,
-0.1192035824,
-0.1503360122,
0.2773755193,
0.0240005292,
-0.0283164419,
0.0144706164,
-0.1706430465,
-0.0576483086,
0.3715695143,
-0.1595645845,
0.0871456414,
0.16744183,
0.0440908633,
0.2306471467,
-0.1044093668,
-0.2606274784,
-0.4392028451,
-0.0985319465,
0.1647435129,
-0.1962970495,
-0.1257396638,
-0.0366651565,
-0.1095461994,
0.1613348722,
0.0417045392,
-0.2359027267,
0.089979738,
-0.0043368693,
0.3883191347,
-0.2089864761,
0.1180845499,
0.375202179,
0.1685074419,
0.0596245602,
-0.1573243141,
-0.2061855197,
0.1814011186,
0.3865937591,
0.2156430334,
0.1895821095,
0.2443964034,
0.1597873867,
0.8500335217,
0.3193300962,
-0.4346618652,
0.1205975637,
-0.0580942929,
-0.0644242615,
-0.0762368441,
-0.3137792349,
-0.0662493035,
-0.243352741,
-0.120112963,
-0.1252257973,
-0.2128140479,
0.1224452183,
0.1718871444,
0.0738454461,
-0.0232220441,
-0.4763818979,
0.1844984889,
-0.2536952496,
0.1434858292,
0.1585398316,
0.3790479302,
-0.1934465766,
0.3132581413,
0.2337404191,
-0.0990403816,
0.4059717059,
0.0916798562,
-0.571154058,
-0.2006430477,
-0.3427854776,
0.4440488219,
0.254760325,
0.1755266488,
-0.0901170224,
-0.085762918,
-0.1431155801,
0.1859126985,
0.3545986414,
-0.4438411295,
-0.0312309414,
0.3080911636,
-0.1699861884,
-0.1782905161,
-0.0858222991,
0.2033344507,
0.6135458946,
0.0606841519,
0.5777101517,
-0.1326726228,
-0.0017200708,
-0.1848406792,
0.0997182131,
-0.0973079652,
-0.1813913435,
-0.0416363738,
0.0443171412,
-0.2571534514,
0.1307145506,
0.1788236499,
-0.0311467461,
0.2515215576,
0.0375728905,
-0.1130551845,
-0.2486297041,
-0.067083478,
0.0204546414,
0.2222064734,
0.0019847155,
0.1563673764,
0.2334224433,
-0.0332232453,
0.2050067782,
0.317037344,
-0.1554173827,
0.0191607662,
-0.2010469735,
0.0237922817,
0.3575346768,
0.0755348727,
-0.0567951873,
0.3018533587,
-0.0134982141,
-0.1000862196,
-0.2922605574,
0.2588860095,
0.1977369487,
0.0974986255,
-0.1309506297,
-0.5797989368,
0.0610706024,
0.0986435115,
-0.1772266924,
0.3608712852,
0.0427088365,
-0.2918622494,
0.2905965447,
0.1774502993,
0.8005260825,
0.165405944,
0.0148345493,
0.3365235925,
0.1808234006,
0.3699223101,
0.2355187088,
-0.0656937063,
-0.342785567,
0.3571146727,
-0.1838504076,
-0.2929324806,
0.0024913941,
0.0052597923,
-0.1912899911,
0.2498562336,
-0.0131080598,
0.1557759345,
-0.1824070215,
0.1464310288,
0.3141552806,
-0.2115348428,
-0.0345842466,
0.1503130347,
-0.0739183649,
0.2885680497,
-0.0357554592,
0.1344928592,
-0.1474820971,
-0.0078982189,
-0.2440618873,
0.1444131732,
-0.5116114616,
0.3974110186,
0.0836284608,
-0.083952114,
0.2956180274,
0.0821683407,
-0.0700965226,
0.165381968,
-0.0545428395,
0.1242013872,
0.2346414775,
0.2012885064,
0.1240213811,
-0.3333579004,
0.2635715604,
0.2254087329,
-0.1046200097,
-0.0038388595,
-0.1554675549,
-0.2256291956,
-0.1773542315,
0.2104773819,
0.2259200513,
-0.3565039337,
-0.230855152,
-0.0348870344,
0.0960318521,
-0.1957100928,
0.0203740522,
0.120653443,
0.1306190044,
0.2372604311,
-0.3842774034,
-0.1575084031,
0.0443065204,
0.4637594819,
-0.2750539482,
0.2132609487,
0.4285076559,
-0.0054325834,
-0.0431296788,
-0.1208830103,
0.126763612,
0.0437581688,
0.2106192112,
0.1623666286,
-0.3165004551,
-0.0629370064,
-0.2680115402,
0.3825358152,
-0.0419599116,
-0.2074609399,
-0.0652515143,
-0.2240739763,
-0.467910707,
-0.0544449948,
0.2477303147,
0.1402737647,
0.0923666209,
0.5768777132,
-0.3586946726,
0.1836714894,
-0.1821166724,
0.0947732776,
0.0293324664,
0.085285753,
0.0898132101,
0.0372846164,
-0.0222300459,
-0.2665498555,
-0.0872107223,
0.4501666129,
0.0098865442,
-0.0926165432,
-0.4276525974,
0.1731843948,
0.5592159629,
-0.1824074239,
0.074064672,
-0.2170207202,
-0.0007078648,
-0.3593151867,
-0.0251794979,
0.2778586149,
0.0307259206,
0.2733376026,
0.1893639266,
0.1163055226,
0.0041883141,
-0.015500023,
-0.0967456102,
-0.0643710196,
0.0176322758,
0.0547902994,
0.0343395397,
-0.0734430552,
-0.0807642192,
0.221937269,
0.2970215976,
0.2084832489,
0.2401298881,
-0.0455406755,
-0.2281159014,
-0.1336232275,
0.3515206575,
0.3570411503,
-0.2013127804,
-0.2437855303,
0.5111566186,
0.083680369,
-0.0942783207,
0.1351260245,
0.2759710252,
0.0347154401,
0.2394303977,
0.1732371747,
-0.2326283157,
0.281164825,
-0.4663679302,
-0.0875424594,
0.2715708911,
-0.0467736721,
0.0408418588,
0.0809432268,
-0.1805370897,
0.2933400273,
0.2770448327,
0.1332242489,
0.3300228417,
0.2303714156,
0.0932227448,
0.1252532154,
0.1260303557,
0.0945226029,
0.1989383101,
-0.4628058672,
0.3219623864,
0.2426407039,
-0.00558687,
0.1944715977,
0.1545813233,
0.4853101969,
-0.5250397325,
-0.2774403095,
0.2316378653,
0.418274343,
-0.2075713575,
-0.0414234661,
-0.4448894262,
0.0641771704,
-0.0232781246,
-0.019184947,
-0.0846734047,
0.0040488048,
0.1793667823,
-0.1410150975,
-0.0608336739,
-0.2040791214,
-0.4670404792,
-0.1198213995,
0.305119276,
-0.2399478108,
-0.1056112126,
-0.1089057177,
0.0585187338,
-0.2150147706,
-0.1264314055,
0.2644937038,
0.2069675624,
-0.3826076984,
-0.1049550474,
0.0128402896,
0.1148540303,
-0.122049056,
0.2308774143,
-0.2840909958,
-0.3314355314,
0.361192435,
-0.0268519856,
-0.0976094604,
-0.1502251774,
0.1964080781,
0.6410108209,
0.000151597,
0.2310474813,
-0.025150612,
-0.0345954895,
-0.1389732659,
0.052772332,
0.0753149986,
0.1661891937,
0.157014221,
0.1477216631,
0.4005221426,
0.0043879673,
0.0500766598,
0.0997287184,
0.2572560012,
0.3555529714,
-0.3640004992,
-0.5150117874,
0.0507320166,
-0.5516375899,
0.1780669689,
-0.2801927328,
-0.3762616515,
-0.1620286703,
-0.0828688145,
0.3111834526,
0.032231994,
-0.093854174,
0.1567066014,
0.111985907,
0.1879042834,
0.1225925237,
-0.2437007725,
-0.4694608152,
-0.3019475341,
0.3355239034,
-0.2901149392,
0.2659897506,
0.2904399335,
-0.0163325146,
-0.0716631711,
-0.3088710308,
-0.0686776042,
0.0746302083,
0.6968880892,
0.3198543191,
0.1866271496,
-0.0940046832,
0.0994577929,
-0.0232535899,
0.2076237053,
-0.2597786784,
0.1713565141,
-0.4841794968,
0.3901790679,
0.0003466643,
0.2632505298,
-0.6178386211,
0.0062231496,
0.1685735732,
-0.0620839372,
-0.5151698589,
0.268466264,
-0.1714924723,
0.1405557841,
-0.1522609591,
0.506000936,
-0.1623696238,
0.5561700463,
-0.2420715988,
-0.1725637764,
0.6069842577,
-0.5967276096,
-0.2871378064,
0.088119477,
-0.020446308,
-0.0478137359,
-0.3517235816,
-0.4075020254,
-0.2545371652,
0.3183052242,
-0.1005824506,
-0.2755891085,
-0.127273351,
0.0381446257,
0.1181816608,
-0.0827641636,
0.7448387146,
0.086063683,
-0.0579104386,
0.3663491607,
-0.008757852
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | @lhoestq because if I try to pickle my custom tokenizer (it contains a pure python pretokenization step in an otherwise rust backed tokenizer) I get
> Exception: Error while attempting to pickle Tokenizer: Custom PreTokenizer cannot be serialized
So I remove the Custom PreTokenizer in `__getstate__` and then restore it in `__setstate__` (since it doesn't contain any state). This is what my `__getstate__` / `__setstate__` looks like:
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
out = self.__dict__.copy()
logger.debug("Detaching pre_tokenizer")
out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
return out
def __setstate__(self, d):
"""
Reinstates pre_tokenizer
"""
logger.debug("Reattaching pre_tokenizer")
self.__dict__ = d
self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer()
If this is the case can you think of another way of avoiding my issue? | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 121 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
@lhoestq because if I try to pickle my custom tokenizer (it contains a pure python pretokenization step in an otherwise rust backed tokenizer) I get
> Exception: Error while attempting to pickle Tokenizer: Custom PreTokenizer cannot be serialized
So I remove the Custom PreTokenizer in `__getstate__` and then restore it in `__setstate__` (since it doesn't contain any state). This is what my `__getstate__` / `__setstate__` looks like:
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
out = self.__dict__.copy()
logger.debug("Detaching pre_tokenizer")
out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
return out
def __setstate__(self, d):
"""
Reinstates pre_tokenizer
"""
logger.debug("Reattaching pre_tokenizer")
self.__dict__ = d
self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer()
If this is the case can you think of another way of avoiding my issue? | [
-0.2248879373,
0.1931206882,
0.1127529666,
0.0287755355,
0.0341957547,
-0.3237703443,
0.1385364532,
0.1950844824,
0.3468083441,
-0.1000180244,
0.1921815872,
0.7253853083,
-0.1929605752,
0.2086694688,
-0.0016188882,
0.059579365,
0.0705189481,
-0.035407722,
-0.0051377863,
-0.0640127957,
-0.2173010111,
0.05091656,
-0.3579758406,
0.1536128968,
-0.2765947878,
-0.1768147945,
0.0259387493,
0.1186884493,
-0.0299848206,
-0.2711365819,
0.2045459747,
-0.0787938684,
-0.0277054757,
0.2411658317,
-0.0001231694,
-0.0801149085,
0.016194012,
-0.0863833278,
-0.0041621327,
-0.2175994962,
-0.2230957747,
-0.123976931,
-0.1235439554,
-0.2294130474,
0.0781576335,
0.0024628341,
-0.2965723872,
-0.3813812137,
0.6342017651,
0.4318727851,
0.1199070215,
0.3648687601,
-0.0678680688,
-0.034679357,
-0.1355489343,
0.3100190163,
0.0528480634,
0.223302871,
0.1253270507,
-0.3918115497,
-0.0012151934,
0.0956294388,
-0.19812572,
-0.2160099745,
0.1527505815,
0.0591068305,
0.1838102937,
0.0106210914,
-0.0086784381,
0.0929948539,
0.2169976532,
-0.3573753536,
-0.2120289505,
-0.3761956394,
-0.0575138479,
-0.150500685,
0.3402034938,
-0.2168391645,
0.1316487044,
0.1427591592,
-0.048483938,
-0.1044859737,
0.2239406407,
0.3518481851,
-0.0390821695,
0.257178694,
-0.0166093931,
0.3984130025,
-0.0536792763,
-0.1063232422,
-0.1807259619,
-0.1033440679,
0.101654321,
0.4516166747,
-0.0112114083,
-0.2384908497,
0.2105505764,
-0.2123310417,
-0.0243079178,
0.2115103304,
-0.1638646871,
0.1225486845,
-0.3641278744,
0.2640175521,
0.4708403945,
0.2212182283,
0.1237126887,
0.6363039613,
0.1985703111,
-0.1602927446,
-0.3000453711,
0.0745260864,
0.3102484345,
-0.1011357307,
-0.0373393595,
0.1756479442,
-0.1027165204,
-0.1286522895,
-0.0738531947,
0.2730225921,
-0.7321612835,
0.0083056018,
0.1820912808,
0.1216199249,
-0.0009520054,
-0.2224105299,
-0.0831373632,
0.0777556375,
-0.2158573866,
0.1148084998,
-0.1185755283,
0.1242492348,
-0.3427779675,
0.1104225293,
-0.0432602912,
0.0569454506,
0.3175241351,
0.1256697774,
-0.1688384116,
-0.0596508682,
0.1512503326,
-0.2294481248,
0.4016972482,
-0.0197039768,
-0.2360145599,
0.0424857289,
0.3069403172,
-0.44203192,
-0.2555748224,
-0.0592270866,
-0.1526567042,
-0.141263485,
-0.0386342406,
0.0347255096,
-0.2372964174,
-0.0047180336,
-0.3046903014,
0.102889508,
0.3713425398,
-0.2058526874,
0.0988660976,
-0.5015790462,
-0.3563109636,
-0.2076636404,
0.0088022873,
0.1774782538,
-0.4386509955,
-0.2434040755,
-0.0980323851,
0.1520785093,
0.3357073963,
0.1245673597,
-0.2613386214,
0.6007257104,
-0.4962501526,
0.8756875992,
0.2869646847,
-0.1486269236,
-0.4010114968,
0.0329538472,
-0.1728947759,
0.2320755869,
-0.6788750291,
-0.1038571894,
0.1650153995,
-0.0797583014,
0.1138164774,
0.33886379,
0.1549206823,
-0.0953324735,
-0.1282201707,
0.0644308925,
0.3268654943,
-0.2837591767,
0.0703489035,
-0.0096955039,
0.1624443531,
-0.2167632282,
0.2174031585,
0.0343073532,
0.1843425483,
-0.1125895903,
0.455953896,
0.1764434129,
-0.1205100715,
-0.3156249523,
-0.1837680936,
0.3253222406,
-0.0280875638,
-0.0268793292,
-0.1192956194,
-0.0829098225,
-0.1131263599,
0.05602213,
-0.3399250805,
-0.2433563471,
0.0299024209,
0.0243139639,
0.2335765809,
0.1753293425,
-0.0835650563,
-0.2479454726,
-0.0506148413,
0.060971193,
-0.0558932684,
0.056883499,
0.1251783967,
-0.2686153352,
-0.31788975,
0.1674041301,
0.4087355733,
-0.0979360864,
-0.1848381311,
0.2761867344,
0.5985628366,
-0.2991657853,
-0.3962607384,
-0.1816082895,
-0.1041160598,
0.1290624291,
-0.2356886715,
0.1717507839,
-0.0027844682,
-0.2309008539,
-0.0256965421,
0.5132232904,
0.247693643,
0.3112366796,
-0.4027120769,
0.2516180277,
-0.0123053417,
-0.0868053138,
-0.1482174695,
-0.3373770714,
-0.2627914846,
0.0373320803,
0.3305849731,
-0.1344625503,
-0.0364915878,
0.0407442302,
0.3557883799,
-0.0735355392,
0.3257072568,
-0.0644304752,
-0.1981064826,
-0.1906805933,
0.2980231047,
0.3740842342,
0.5166620612,
-0.1092321873,
-0.0572248697,
0.0850380659,
-0.0458903052,
-0.0490010381,
0.0168409869,
-0.1722276956,
-0.0378648788,
0.198848024,
0.0485894382,
-0.0998981595,
-0.1812919676,
0.0097946078,
0.0562791005,
0.2922280431,
-0.2386671901,
0.0962415561,
-0.5637151599,
0.0709879398,
-0.2885975242,
-0.1303832233,
0.0072153546,
-0.4439607561,
-0.2119713426,
0.0941521376,
-0.2360057831,
0.2182338536,
-0.1610496342,
-0.1597822756,
-0.15046224,
-0.2889372706,
0.0986512154,
-0.2346133739,
-0.2234227657,
-0.0864399076,
0.1288220882,
0.122381568,
0.2256276011,
0.3576844335,
-0.4277693033,
-0.3453749418,
-0.2861615419,
0.3642110229,
-0.167160809,
0.1216559336,
0.3645746112,
-0.21086362,
-0.072285071,
0.1510340869,
0.3195461631,
-0.10602507,
-0.1192035824,
-0.1503360122,
0.2773755193,
0.0240005292,
-0.0283164419,
0.0144706164,
-0.1706430465,
-0.0576483086,
0.3715695143,
-0.1595645845,
0.0871456414,
0.16744183,
0.0440908633,
0.2306471467,
-0.1044093668,
-0.2606274784,
-0.4392028451,
-0.0985319465,
0.1647435129,
-0.1962970495,
-0.1257396638,
-0.0366651565,
-0.1095461994,
0.1613348722,
0.0417045392,
-0.2359027267,
0.089979738,
-0.0043368693,
0.3883191347,
-0.2089864761,
0.1180845499,
0.375202179,
0.1685074419,
0.0596245602,
-0.1573243141,
-0.2061855197,
0.1814011186,
0.3865937591,
0.2156430334,
0.1895821095,
0.2443964034,
0.1597873867,
0.8500335217,
0.3193300962,
-0.4346618652,
0.1205975637,
-0.0580942929,
-0.0644242615,
-0.0762368441,
-0.3137792349,
-0.0662493035,
-0.243352741,
-0.120112963,
-0.1252257973,
-0.2128140479,
0.1224452183,
0.1718871444,
0.0738454461,
-0.0232220441,
-0.4763818979,
0.1844984889,
-0.2536952496,
0.1434858292,
0.1585398316,
0.3790479302,
-0.1934465766,
0.3132581413,
0.2337404191,
-0.0990403816,
0.4059717059,
0.0916798562,
-0.571154058,
-0.2006430477,
-0.3427854776,
0.4440488219,
0.254760325,
0.1755266488,
-0.0901170224,
-0.085762918,
-0.1431155801,
0.1859126985,
0.3545986414,
-0.4438411295,
-0.0312309414,
0.3080911636,
-0.1699861884,
-0.1782905161,
-0.0858222991,
0.2033344507,
0.6135458946,
0.0606841519,
0.5777101517,
-0.1326726228,
-0.0017200708,
-0.1848406792,
0.0997182131,
-0.0973079652,
-0.1813913435,
-0.0416363738,
0.0443171412,
-0.2571534514,
0.1307145506,
0.1788236499,
-0.0311467461,
0.2515215576,
0.0375728905,
-0.1130551845,
-0.2486297041,
-0.067083478,
0.0204546414,
0.2222064734,
0.0019847155,
0.1563673764,
0.2334224433,
-0.0332232453,
0.2050067782,
0.317037344,
-0.1554173827,
0.0191607662,
-0.2010469735,
0.0237922817,
0.3575346768,
0.0755348727,
-0.0567951873,
0.3018533587,
-0.0134982141,
-0.1000862196,
-0.2922605574,
0.2588860095,
0.1977369487,
0.0974986255,
-0.1309506297,
-0.5797989368,
0.0610706024,
0.0986435115,
-0.1772266924,
0.3608712852,
0.0427088365,
-0.2918622494,
0.2905965447,
0.1774502993,
0.8005260825,
0.165405944,
0.0148345493,
0.3365235925,
0.1808234006,
0.3699223101,
0.2355187088,
-0.0656937063,
-0.342785567,
0.3571146727,
-0.1838504076,
-0.2929324806,
0.0024913941,
0.0052597923,
-0.1912899911,
0.2498562336,
-0.0131080598,
0.1557759345,
-0.1824070215,
0.1464310288,
0.3141552806,
-0.2115348428,
-0.0345842466,
0.1503130347,
-0.0739183649,
0.2885680497,
-0.0357554592,
0.1344928592,
-0.1474820971,
-0.0078982189,
-0.2440618873,
0.1444131732,
-0.5116114616,
0.3974110186,
0.0836284608,
-0.083952114,
0.2956180274,
0.0821683407,
-0.0700965226,
0.165381968,
-0.0545428395,
0.1242013872,
0.2346414775,
0.2012885064,
0.1240213811,
-0.3333579004,
0.2635715604,
0.2254087329,
-0.1046200097,
-0.0038388595,
-0.1554675549,
-0.2256291956,
-0.1773542315,
0.2104773819,
0.2259200513,
-0.3565039337,
-0.230855152,
-0.0348870344,
0.0960318521,
-0.1957100928,
0.0203740522,
0.120653443,
0.1306190044,
0.2372604311,
-0.3842774034,
-0.1575084031,
0.0443065204,
0.4637594819,
-0.2750539482,
0.2132609487,
0.4285076559,
-0.0054325834,
-0.0431296788,
-0.1208830103,
0.126763612,
0.0437581688,
0.2106192112,
0.1623666286,
-0.3165004551,
-0.0629370064,
-0.2680115402,
0.3825358152,
-0.0419599116,
-0.2074609399,
-0.0652515143,
-0.2240739763,
-0.467910707,
-0.0544449948,
0.2477303147,
0.1402737647,
0.0923666209,
0.5768777132,
-0.3586946726,
0.1836714894,
-0.1821166724,
0.0947732776,
0.0293324664,
0.085285753,
0.0898132101,
0.0372846164,
-0.0222300459,
-0.2665498555,
-0.0872107223,
0.4501666129,
0.0098865442,
-0.0926165432,
-0.4276525974,
0.1731843948,
0.5592159629,
-0.1824074239,
0.074064672,
-0.2170207202,
-0.0007078648,
-0.3593151867,
-0.0251794979,
0.2778586149,
0.0307259206,
0.2733376026,
0.1893639266,
0.1163055226,
0.0041883141,
-0.015500023,
-0.0967456102,
-0.0643710196,
0.0176322758,
0.0547902994,
0.0343395397,
-0.0734430552,
-0.0807642192,
0.221937269,
0.2970215976,
0.2084832489,
0.2401298881,
-0.0455406755,
-0.2281159014,
-0.1336232275,
0.3515206575,
0.3570411503,
-0.2013127804,
-0.2437855303,
0.5111566186,
0.083680369,
-0.0942783207,
0.1351260245,
0.2759710252,
0.0347154401,
0.2394303977,
0.1732371747,
-0.2326283157,
0.281164825,
-0.4663679302,
-0.0875424594,
0.2715708911,
-0.0467736721,
0.0408418588,
0.0809432268,
-0.1805370897,
0.2933400273,
0.2770448327,
0.1332242489,
0.3300228417,
0.2303714156,
0.0932227448,
0.1252532154,
0.1260303557,
0.0945226029,
0.1989383101,
-0.4628058672,
0.3219623864,
0.2426407039,
-0.00558687,
0.1944715977,
0.1545813233,
0.4853101969,
-0.5250397325,
-0.2774403095,
0.2316378653,
0.418274343,
-0.2075713575,
-0.0414234661,
-0.4448894262,
0.0641771704,
-0.0232781246,
-0.019184947,
-0.0846734047,
0.0040488048,
0.1793667823,
-0.1410150975,
-0.0608336739,
-0.2040791214,
-0.4670404792,
-0.1198213995,
0.305119276,
-0.2399478108,
-0.1056112126,
-0.1089057177,
0.0585187338,
-0.2150147706,
-0.1264314055,
0.2644937038,
0.2069675624,
-0.3826076984,
-0.1049550474,
0.0128402896,
0.1148540303,
-0.122049056,
0.2308774143,
-0.2840909958,
-0.3314355314,
0.361192435,
-0.0268519856,
-0.0976094604,
-0.1502251774,
0.1964080781,
0.6410108209,
0.000151597,
0.2310474813,
-0.025150612,
-0.0345954895,
-0.1389732659,
0.052772332,
0.0753149986,
0.1661891937,
0.157014221,
0.1477216631,
0.4005221426,
0.0043879673,
0.0500766598,
0.0997287184,
0.2572560012,
0.3555529714,
-0.3640004992,
-0.5150117874,
0.0507320166,
-0.5516375899,
0.1780669689,
-0.2801927328,
-0.3762616515,
-0.1620286703,
-0.0828688145,
0.3111834526,
0.032231994,
-0.093854174,
0.1567066014,
0.111985907,
0.1879042834,
0.1225925237,
-0.2437007725,
-0.4694608152,
-0.3019475341,
0.3355239034,
-0.2901149392,
0.2659897506,
0.2904399335,
-0.0163325146,
-0.0716631711,
-0.3088710308,
-0.0686776042,
0.0746302083,
0.6968880892,
0.3198543191,
0.1866271496,
-0.0940046832,
0.0994577929,
-0.0232535899,
0.2076237053,
-0.2597786784,
0.1713565141,
-0.4841794968,
0.3901790679,
0.0003466643,
0.2632505298,
-0.6178386211,
0.0062231496,
0.1685735732,
-0.0620839372,
-0.5151698589,
0.268466264,
-0.1714924723,
0.1405557841,
-0.1522609591,
0.506000936,
-0.1623696238,
0.5561700463,
-0.2420715988,
-0.1725637764,
0.6069842577,
-0.5967276096,
-0.2871378064,
0.088119477,
-0.020446308,
-0.0478137359,
-0.3517235816,
-0.4075020254,
-0.2545371652,
0.3183052242,
-0.1005824506,
-0.2755891085,
-0.127273351,
0.0381446257,
0.1181816608,
-0.0827641636,
0.7448387146,
0.086063683,
-0.0579104386,
0.3663491607,
-0.008757852
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | Actually, maybe I need to deep copy `self.__dict__`? That way `self` isn't modified. That was my intention and I thought it was working - I'll double-check after the weekend. | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 29 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
Actually, maybe I need to deep copy `self.__dict__`? That way `self` isn't modified. That was my intention and I thought it was working - I'll double-check after the weekend. | [
-0.2248879373,
0.1931206882,
0.1127529666,
0.0287755355,
0.0341957547,
-0.3237703443,
0.1385364532,
0.1950844824,
0.3468083441,
-0.1000180244,
0.1921815872,
0.7253853083,
-0.1929605752,
0.2086694688,
-0.0016188882,
0.059579365,
0.0705189481,
-0.035407722,
-0.0051377863,
-0.0640127957,
-0.2173010111,
0.05091656,
-0.3579758406,
0.1536128968,
-0.2765947878,
-0.1768147945,
0.0259387493,
0.1186884493,
-0.0299848206,
-0.2711365819,
0.2045459747,
-0.0787938684,
-0.0277054757,
0.2411658317,
-0.0001231694,
-0.0801149085,
0.016194012,
-0.0863833278,
-0.0041621327,
-0.2175994962,
-0.2230957747,
-0.123976931,
-0.1235439554,
-0.2294130474,
0.0781576335,
0.0024628341,
-0.2965723872,
-0.3813812137,
0.6342017651,
0.4318727851,
0.1199070215,
0.3648687601,
-0.0678680688,
-0.034679357,
-0.1355489343,
0.3100190163,
0.0528480634,
0.223302871,
0.1253270507,
-0.3918115497,
-0.0012151934,
0.0956294388,
-0.19812572,
-0.2160099745,
0.1527505815,
0.0591068305,
0.1838102937,
0.0106210914,
-0.0086784381,
0.0929948539,
0.2169976532,
-0.3573753536,
-0.2120289505,
-0.3761956394,
-0.0575138479,
-0.150500685,
0.3402034938,
-0.2168391645,
0.1316487044,
0.1427591592,
-0.048483938,
-0.1044859737,
0.2239406407,
0.3518481851,
-0.0390821695,
0.257178694,
-0.0166093931,
0.3984130025,
-0.0536792763,
-0.1063232422,
-0.1807259619,
-0.1033440679,
0.101654321,
0.4516166747,
-0.0112114083,
-0.2384908497,
0.2105505764,
-0.2123310417,
-0.0243079178,
0.2115103304,
-0.1638646871,
0.1225486845,
-0.3641278744,
0.2640175521,
0.4708403945,
0.2212182283,
0.1237126887,
0.6363039613,
0.1985703111,
-0.1602927446,
-0.3000453711,
0.0745260864,
0.3102484345,
-0.1011357307,
-0.0373393595,
0.1756479442,
-0.1027165204,
-0.1286522895,
-0.0738531947,
0.2730225921,
-0.7321612835,
0.0083056018,
0.1820912808,
0.1216199249,
-0.0009520054,
-0.2224105299,
-0.0831373632,
0.0777556375,
-0.2158573866,
0.1148084998,
-0.1185755283,
0.1242492348,
-0.3427779675,
0.1104225293,
-0.0432602912,
0.0569454506,
0.3175241351,
0.1256697774,
-0.1688384116,
-0.0596508682,
0.1512503326,
-0.2294481248,
0.4016972482,
-0.0197039768,
-0.2360145599,
0.0424857289,
0.3069403172,
-0.44203192,
-0.2555748224,
-0.0592270866,
-0.1526567042,
-0.141263485,
-0.0386342406,
0.0347255096,
-0.2372964174,
-0.0047180336,
-0.3046903014,
0.102889508,
0.3713425398,
-0.2058526874,
0.0988660976,
-0.5015790462,
-0.3563109636,
-0.2076636404,
0.0088022873,
0.1774782538,
-0.4386509955,
-0.2434040755,
-0.0980323851,
0.1520785093,
0.3357073963,
0.1245673597,
-0.2613386214,
0.6007257104,
-0.4962501526,
0.8756875992,
0.2869646847,
-0.1486269236,
-0.4010114968,
0.0329538472,
-0.1728947759,
0.2320755869,
-0.6788750291,
-0.1038571894,
0.1650153995,
-0.0797583014,
0.1138164774,
0.33886379,
0.1549206823,
-0.0953324735,
-0.1282201707,
0.0644308925,
0.3268654943,
-0.2837591767,
0.0703489035,
-0.0096955039,
0.1624443531,
-0.2167632282,
0.2174031585,
0.0343073532,
0.1843425483,
-0.1125895903,
0.455953896,
0.1764434129,
-0.1205100715,
-0.3156249523,
-0.1837680936,
0.3253222406,
-0.0280875638,
-0.0268793292,
-0.1192956194,
-0.0829098225,
-0.1131263599,
0.05602213,
-0.3399250805,
-0.2433563471,
0.0299024209,
0.0243139639,
0.2335765809,
0.1753293425,
-0.0835650563,
-0.2479454726,
-0.0506148413,
0.060971193,
-0.0558932684,
0.056883499,
0.1251783967,
-0.2686153352,
-0.31788975,
0.1674041301,
0.4087355733,
-0.0979360864,
-0.1848381311,
0.2761867344,
0.5985628366,
-0.2991657853,
-0.3962607384,
-0.1816082895,
-0.1041160598,
0.1290624291,
-0.2356886715,
0.1717507839,
-0.0027844682,
-0.2309008539,
-0.0256965421,
0.5132232904,
0.247693643,
0.3112366796,
-0.4027120769,
0.2516180277,
-0.0123053417,
-0.0868053138,
-0.1482174695,
-0.3373770714,
-0.2627914846,
0.0373320803,
0.3305849731,
-0.1344625503,
-0.0364915878,
0.0407442302,
0.3557883799,
-0.0735355392,
0.3257072568,
-0.0644304752,
-0.1981064826,
-0.1906805933,
0.2980231047,
0.3740842342,
0.5166620612,
-0.1092321873,
-0.0572248697,
0.0850380659,
-0.0458903052,
-0.0490010381,
0.0168409869,
-0.1722276956,
-0.0378648788,
0.198848024,
0.0485894382,
-0.0998981595,
-0.1812919676,
0.0097946078,
0.0562791005,
0.2922280431,
-0.2386671901,
0.0962415561,
-0.5637151599,
0.0709879398,
-0.2885975242,
-0.1303832233,
0.0072153546,
-0.4439607561,
-0.2119713426,
0.0941521376,
-0.2360057831,
0.2182338536,
-0.1610496342,
-0.1597822756,
-0.15046224,
-0.2889372706,
0.0986512154,
-0.2346133739,
-0.2234227657,
-0.0864399076,
0.1288220882,
0.122381568,
0.2256276011,
0.3576844335,
-0.4277693033,
-0.3453749418,
-0.2861615419,
0.3642110229,
-0.167160809,
0.1216559336,
0.3645746112,
-0.21086362,
-0.072285071,
0.1510340869,
0.3195461631,
-0.10602507,
-0.1192035824,
-0.1503360122,
0.2773755193,
0.0240005292,
-0.0283164419,
0.0144706164,
-0.1706430465,
-0.0576483086,
0.3715695143,
-0.1595645845,
0.0871456414,
0.16744183,
0.0440908633,
0.2306471467,
-0.1044093668,
-0.2606274784,
-0.4392028451,
-0.0985319465,
0.1647435129,
-0.1962970495,
-0.1257396638,
-0.0366651565,
-0.1095461994,
0.1613348722,
0.0417045392,
-0.2359027267,
0.089979738,
-0.0043368693,
0.3883191347,
-0.2089864761,
0.1180845499,
0.375202179,
0.1685074419,
0.0596245602,
-0.1573243141,
-0.2061855197,
0.1814011186,
0.3865937591,
0.2156430334,
0.1895821095,
0.2443964034,
0.1597873867,
0.8500335217,
0.3193300962,
-0.4346618652,
0.1205975637,
-0.0580942929,
-0.0644242615,
-0.0762368441,
-0.3137792349,
-0.0662493035,
-0.243352741,
-0.120112963,
-0.1252257973,
-0.2128140479,
0.1224452183,
0.1718871444,
0.0738454461,
-0.0232220441,
-0.4763818979,
0.1844984889,
-0.2536952496,
0.1434858292,
0.1585398316,
0.3790479302,
-0.1934465766,
0.3132581413,
0.2337404191,
-0.0990403816,
0.4059717059,
0.0916798562,
-0.571154058,
-0.2006430477,
-0.3427854776,
0.4440488219,
0.254760325,
0.1755266488,
-0.0901170224,
-0.085762918,
-0.1431155801,
0.1859126985,
0.3545986414,
-0.4438411295,
-0.0312309414,
0.3080911636,
-0.1699861884,
-0.1782905161,
-0.0858222991,
0.2033344507,
0.6135458946,
0.0606841519,
0.5777101517,
-0.1326726228,
-0.0017200708,
-0.1848406792,
0.0997182131,
-0.0973079652,
-0.1813913435,
-0.0416363738,
0.0443171412,
-0.2571534514,
0.1307145506,
0.1788236499,
-0.0311467461,
0.2515215576,
0.0375728905,
-0.1130551845,
-0.2486297041,
-0.067083478,
0.0204546414,
0.2222064734,
0.0019847155,
0.1563673764,
0.2334224433,
-0.0332232453,
0.2050067782,
0.317037344,
-0.1554173827,
0.0191607662,
-0.2010469735,
0.0237922817,
0.3575346768,
0.0755348727,
-0.0567951873,
0.3018533587,
-0.0134982141,
-0.1000862196,
-0.2922605574,
0.2588860095,
0.1977369487,
0.0974986255,
-0.1309506297,
-0.5797989368,
0.0610706024,
0.0986435115,
-0.1772266924,
0.3608712852,
0.0427088365,
-0.2918622494,
0.2905965447,
0.1774502993,
0.8005260825,
0.165405944,
0.0148345493,
0.3365235925,
0.1808234006,
0.3699223101,
0.2355187088,
-0.0656937063,
-0.342785567,
0.3571146727,
-0.1838504076,
-0.2929324806,
0.0024913941,
0.0052597923,
-0.1912899911,
0.2498562336,
-0.0131080598,
0.1557759345,
-0.1824070215,
0.1464310288,
0.3141552806,
-0.2115348428,
-0.0345842466,
0.1503130347,
-0.0739183649,
0.2885680497,
-0.0357554592,
0.1344928592,
-0.1474820971,
-0.0078982189,
-0.2440618873,
0.1444131732,
-0.5116114616,
0.3974110186,
0.0836284608,
-0.083952114,
0.2956180274,
0.0821683407,
-0.0700965226,
0.165381968,
-0.0545428395,
0.1242013872,
0.2346414775,
0.2012885064,
0.1240213811,
-0.3333579004,
0.2635715604,
0.2254087329,
-0.1046200097,
-0.0038388595,
-0.1554675549,
-0.2256291956,
-0.1773542315,
0.2104773819,
0.2259200513,
-0.3565039337,
-0.230855152,
-0.0348870344,
0.0960318521,
-0.1957100928,
0.0203740522,
0.120653443,
0.1306190044,
0.2372604311,
-0.3842774034,
-0.1575084031,
0.0443065204,
0.4637594819,
-0.2750539482,
0.2132609487,
0.4285076559,
-0.0054325834,
-0.0431296788,
-0.1208830103,
0.126763612,
0.0437581688,
0.2106192112,
0.1623666286,
-0.3165004551,
-0.0629370064,
-0.2680115402,
0.3825358152,
-0.0419599116,
-0.2074609399,
-0.0652515143,
-0.2240739763,
-0.467910707,
-0.0544449948,
0.2477303147,
0.1402737647,
0.0923666209,
0.5768777132,
-0.3586946726,
0.1836714894,
-0.1821166724,
0.0947732776,
0.0293324664,
0.085285753,
0.0898132101,
0.0372846164,
-0.0222300459,
-0.2665498555,
-0.0872107223,
0.4501666129,
0.0098865442,
-0.0926165432,
-0.4276525974,
0.1731843948,
0.5592159629,
-0.1824074239,
0.074064672,
-0.2170207202,
-0.0007078648,
-0.3593151867,
-0.0251794979,
0.2778586149,
0.0307259206,
0.2733376026,
0.1893639266,
0.1163055226,
0.0041883141,
-0.015500023,
-0.0967456102,
-0.0643710196,
0.0176322758,
0.0547902994,
0.0343395397,
-0.0734430552,
-0.0807642192,
0.221937269,
0.2970215976,
0.2084832489,
0.2401298881,
-0.0455406755,
-0.2281159014,
-0.1336232275,
0.3515206575,
0.3570411503,
-0.2013127804,
-0.2437855303,
0.5111566186,
0.083680369,
-0.0942783207,
0.1351260245,
0.2759710252,
0.0347154401,
0.2394303977,
0.1732371747,
-0.2326283157,
0.281164825,
-0.4663679302,
-0.0875424594,
0.2715708911,
-0.0467736721,
0.0408418588,
0.0809432268,
-0.1805370897,
0.2933400273,
0.2770448327,
0.1332242489,
0.3300228417,
0.2303714156,
0.0932227448,
0.1252532154,
0.1260303557,
0.0945226029,
0.1989383101,
-0.4628058672,
0.3219623864,
0.2426407039,
-0.00558687,
0.1944715977,
0.1545813233,
0.4853101969,
-0.5250397325,
-0.2774403095,
0.2316378653,
0.418274343,
-0.2075713575,
-0.0414234661,
-0.4448894262,
0.0641771704,
-0.0232781246,
-0.019184947,
-0.0846734047,
0.0040488048,
0.1793667823,
-0.1410150975,
-0.0608336739,
-0.2040791214,
-0.4670404792,
-0.1198213995,
0.305119276,
-0.2399478108,
-0.1056112126,
-0.1089057177,
0.0585187338,
-0.2150147706,
-0.1264314055,
0.2644937038,
0.2069675624,
-0.3826076984,
-0.1049550474,
0.0128402896,
0.1148540303,
-0.122049056,
0.2308774143,
-0.2840909958,
-0.3314355314,
0.361192435,
-0.0268519856,
-0.0976094604,
-0.1502251774,
0.1964080781,
0.6410108209,
0.000151597,
0.2310474813,
-0.025150612,
-0.0345954895,
-0.1389732659,
0.052772332,
0.0753149986,
0.1661891937,
0.157014221,
0.1477216631,
0.4005221426,
0.0043879673,
0.0500766598,
0.0997287184,
0.2572560012,
0.3555529714,
-0.3640004992,
-0.5150117874,
0.0507320166,
-0.5516375899,
0.1780669689,
-0.2801927328,
-0.3762616515,
-0.1620286703,
-0.0828688145,
0.3111834526,
0.032231994,
-0.093854174,
0.1567066014,
0.111985907,
0.1879042834,
0.1225925237,
-0.2437007725,
-0.4694608152,
-0.3019475341,
0.3355239034,
-0.2901149392,
0.2659897506,
0.2904399335,
-0.0163325146,
-0.0716631711,
-0.3088710308,
-0.0686776042,
0.0746302083,
0.6968880892,
0.3198543191,
0.1866271496,
-0.0940046832,
0.0994577929,
-0.0232535899,
0.2076237053,
-0.2597786784,
0.1713565141,
-0.4841794968,
0.3901790679,
0.0003466643,
0.2632505298,
-0.6178386211,
0.0062231496,
0.1685735732,
-0.0620839372,
-0.5151698589,
0.268466264,
-0.1714924723,
0.1405557841,
-0.1522609591,
0.506000936,
-0.1623696238,
0.5561700463,
-0.2420715988,
-0.1725637764,
0.6069842577,
-0.5967276096,
-0.2871378064,
0.088119477,
-0.020446308,
-0.0478137359,
-0.3517235816,
-0.4075020254,
-0.2545371652,
0.3183052242,
-0.1005824506,
-0.2755891085,
-0.127273351,
0.0381446257,
0.1181816608,
-0.0827641636,
0.7448387146,
0.086063683,
-0.0579104386,
0.3663491607,
-0.008757852
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | Doing a deep copy results in the warning:
> 06/20/2021 16:02:15 - WARNING - datasets.fingerprint - Parameter 'function'=<function tokenize_function at 0x7f1e95f05d40> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
```
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
out = copy.deepcopy(self.__dict__)
logger.debug("Detaching pre_tokenizer")
out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
return out
``` | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 114 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
Doing a deep copy results in the warning:
> 06/20/2021 16:02:15 - WARNING - datasets.fingerprint - Parameter 'function'=<function tokenize_function at 0x7f1e95f05d40> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
```
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
out = copy.deepcopy(self.__dict__)
logger.debug("Detaching pre_tokenizer")
out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
return out
``` | [
-0.2248879373,
0.1931206882,
0.1127529666,
0.0287755355,
0.0341957547,
-0.3237703443,
0.1385364532,
0.1950844824,
0.3468083441,
-0.1000180244,
0.1921815872,
0.7253853083,
-0.1929605752,
0.2086694688,
-0.0016188882,
0.059579365,
0.0705189481,
-0.035407722,
-0.0051377863,
-0.0640127957,
-0.2173010111,
0.05091656,
-0.3579758406,
0.1536128968,
-0.2765947878,
-0.1768147945,
0.0259387493,
0.1186884493,
-0.0299848206,
-0.2711365819,
0.2045459747,
-0.0787938684,
-0.0277054757,
0.2411658317,
-0.0001231694,
-0.0801149085,
0.016194012,
-0.0863833278,
-0.0041621327,
-0.2175994962,
-0.2230957747,
-0.123976931,
-0.1235439554,
-0.2294130474,
0.0781576335,
0.0024628341,
-0.2965723872,
-0.3813812137,
0.6342017651,
0.4318727851,
0.1199070215,
0.3648687601,
-0.0678680688,
-0.034679357,
-0.1355489343,
0.3100190163,
0.0528480634,
0.223302871,
0.1253270507,
-0.3918115497,
-0.0012151934,
0.0956294388,
-0.19812572,
-0.2160099745,
0.1527505815,
0.0591068305,
0.1838102937,
0.0106210914,
-0.0086784381,
0.0929948539,
0.2169976532,
-0.3573753536,
-0.2120289505,
-0.3761956394,
-0.0575138479,
-0.150500685,
0.3402034938,
-0.2168391645,
0.1316487044,
0.1427591592,
-0.048483938,
-0.1044859737,
0.2239406407,
0.3518481851,
-0.0390821695,
0.257178694,
-0.0166093931,
0.3984130025,
-0.0536792763,
-0.1063232422,
-0.1807259619,
-0.1033440679,
0.101654321,
0.4516166747,
-0.0112114083,
-0.2384908497,
0.2105505764,
-0.2123310417,
-0.0243079178,
0.2115103304,
-0.1638646871,
0.1225486845,
-0.3641278744,
0.2640175521,
0.4708403945,
0.2212182283,
0.1237126887,
0.6363039613,
0.1985703111,
-0.1602927446,
-0.3000453711,
0.0745260864,
0.3102484345,
-0.1011357307,
-0.0373393595,
0.1756479442,
-0.1027165204,
-0.1286522895,
-0.0738531947,
0.2730225921,
-0.7321612835,
0.0083056018,
0.1820912808,
0.1216199249,
-0.0009520054,
-0.2224105299,
-0.0831373632,
0.0777556375,
-0.2158573866,
0.1148084998,
-0.1185755283,
0.1242492348,
-0.3427779675,
0.1104225293,
-0.0432602912,
0.0569454506,
0.3175241351,
0.1256697774,
-0.1688384116,
-0.0596508682,
0.1512503326,
-0.2294481248,
0.4016972482,
-0.0197039768,
-0.2360145599,
0.0424857289,
0.3069403172,
-0.44203192,
-0.2555748224,
-0.0592270866,
-0.1526567042,
-0.141263485,
-0.0386342406,
0.0347255096,
-0.2372964174,
-0.0047180336,
-0.3046903014,
0.102889508,
0.3713425398,
-0.2058526874,
0.0988660976,
-0.5015790462,
-0.3563109636,
-0.2076636404,
0.0088022873,
0.1774782538,
-0.4386509955,
-0.2434040755,
-0.0980323851,
0.1520785093,
0.3357073963,
0.1245673597,
-0.2613386214,
0.6007257104,
-0.4962501526,
0.8756875992,
0.2869646847,
-0.1486269236,
-0.4010114968,
0.0329538472,
-0.1728947759,
0.2320755869,
-0.6788750291,
-0.1038571894,
0.1650153995,
-0.0797583014,
0.1138164774,
0.33886379,
0.1549206823,
-0.0953324735,
-0.1282201707,
0.0644308925,
0.3268654943,
-0.2837591767,
0.0703489035,
-0.0096955039,
0.1624443531,
-0.2167632282,
0.2174031585,
0.0343073532,
0.1843425483,
-0.1125895903,
0.455953896,
0.1764434129,
-0.1205100715,
-0.3156249523,
-0.1837680936,
0.3253222406,
-0.0280875638,
-0.0268793292,
-0.1192956194,
-0.0829098225,
-0.1131263599,
0.05602213,
-0.3399250805,
-0.2433563471,
0.0299024209,
0.0243139639,
0.2335765809,
0.1753293425,
-0.0835650563,
-0.2479454726,
-0.0506148413,
0.060971193,
-0.0558932684,
0.056883499,
0.1251783967,
-0.2686153352,
-0.31788975,
0.1674041301,
0.4087355733,
-0.0979360864,
-0.1848381311,
0.2761867344,
0.5985628366,
-0.2991657853,
-0.3962607384,
-0.1816082895,
-0.1041160598,
0.1290624291,
-0.2356886715,
0.1717507839,
-0.0027844682,
-0.2309008539,
-0.0256965421,
0.5132232904,
0.247693643,
0.3112366796,
-0.4027120769,
0.2516180277,
-0.0123053417,
-0.0868053138,
-0.1482174695,
-0.3373770714,
-0.2627914846,
0.0373320803,
0.3305849731,
-0.1344625503,
-0.0364915878,
0.0407442302,
0.3557883799,
-0.0735355392,
0.3257072568,
-0.0644304752,
-0.1981064826,
-0.1906805933,
0.2980231047,
0.3740842342,
0.5166620612,
-0.1092321873,
-0.0572248697,
0.0850380659,
-0.0458903052,
-0.0490010381,
0.0168409869,
-0.1722276956,
-0.0378648788,
0.198848024,
0.0485894382,
-0.0998981595,
-0.1812919676,
0.0097946078,
0.0562791005,
0.2922280431,
-0.2386671901,
0.0962415561,
-0.5637151599,
0.0709879398,
-0.2885975242,
-0.1303832233,
0.0072153546,
-0.4439607561,
-0.2119713426,
0.0941521376,
-0.2360057831,
0.2182338536,
-0.1610496342,
-0.1597822756,
-0.15046224,
-0.2889372706,
0.0986512154,
-0.2346133739,
-0.2234227657,
-0.0864399076,
0.1288220882,
0.122381568,
0.2256276011,
0.3576844335,
-0.4277693033,
-0.3453749418,
-0.2861615419,
0.3642110229,
-0.167160809,
0.1216559336,
0.3645746112,
-0.21086362,
-0.072285071,
0.1510340869,
0.3195461631,
-0.10602507,
-0.1192035824,
-0.1503360122,
0.2773755193,
0.0240005292,
-0.0283164419,
0.0144706164,
-0.1706430465,
-0.0576483086,
0.3715695143,
-0.1595645845,
0.0871456414,
0.16744183,
0.0440908633,
0.2306471467,
-0.1044093668,
-0.2606274784,
-0.4392028451,
-0.0985319465,
0.1647435129,
-0.1962970495,
-0.1257396638,
-0.0366651565,
-0.1095461994,
0.1613348722,
0.0417045392,
-0.2359027267,
0.089979738,
-0.0043368693,
0.3883191347,
-0.2089864761,
0.1180845499,
0.375202179,
0.1685074419,
0.0596245602,
-0.1573243141,
-0.2061855197,
0.1814011186,
0.3865937591,
0.2156430334,
0.1895821095,
0.2443964034,
0.1597873867,
0.8500335217,
0.3193300962,
-0.4346618652,
0.1205975637,
-0.0580942929,
-0.0644242615,
-0.0762368441,
-0.3137792349,
-0.0662493035,
-0.243352741,
-0.120112963,
-0.1252257973,
-0.2128140479,
0.1224452183,
0.1718871444,
0.0738454461,
-0.0232220441,
-0.4763818979,
0.1844984889,
-0.2536952496,
0.1434858292,
0.1585398316,
0.3790479302,
-0.1934465766,
0.3132581413,
0.2337404191,
-0.0990403816,
0.4059717059,
0.0916798562,
-0.571154058,
-0.2006430477,
-0.3427854776,
0.4440488219,
0.254760325,
0.1755266488,
-0.0901170224,
-0.085762918,
-0.1431155801,
0.1859126985,
0.3545986414,
-0.4438411295,
-0.0312309414,
0.3080911636,
-0.1699861884,
-0.1782905161,
-0.0858222991,
0.2033344507,
0.6135458946,
0.0606841519,
0.5777101517,
-0.1326726228,
-0.0017200708,
-0.1848406792,
0.0997182131,
-0.0973079652,
-0.1813913435,
-0.0416363738,
0.0443171412,
-0.2571534514,
0.1307145506,
0.1788236499,
-0.0311467461,
0.2515215576,
0.0375728905,
-0.1130551845,
-0.2486297041,
-0.067083478,
0.0204546414,
0.2222064734,
0.0019847155,
0.1563673764,
0.2334224433,
-0.0332232453,
0.2050067782,
0.317037344,
-0.1554173827,
0.0191607662,
-0.2010469735,
0.0237922817,
0.3575346768,
0.0755348727,
-0.0567951873,
0.3018533587,
-0.0134982141,
-0.1000862196,
-0.2922605574,
0.2588860095,
0.1977369487,
0.0974986255,
-0.1309506297,
-0.5797989368,
0.0610706024,
0.0986435115,
-0.1772266924,
0.3608712852,
0.0427088365,
-0.2918622494,
0.2905965447,
0.1774502993,
0.8005260825,
0.165405944,
0.0148345493,
0.3365235925,
0.1808234006,
0.3699223101,
0.2355187088,
-0.0656937063,
-0.342785567,
0.3571146727,
-0.1838504076,
-0.2929324806,
0.0024913941,
0.0052597923,
-0.1912899911,
0.2498562336,
-0.0131080598,
0.1557759345,
-0.1824070215,
0.1464310288,
0.3141552806,
-0.2115348428,
-0.0345842466,
0.1503130347,
-0.0739183649,
0.2885680497,
-0.0357554592,
0.1344928592,
-0.1474820971,
-0.0078982189,
-0.2440618873,
0.1444131732,
-0.5116114616,
0.3974110186,
0.0836284608,
-0.083952114,
0.2956180274,
0.0821683407,
-0.0700965226,
0.165381968,
-0.0545428395,
0.1242013872,
0.2346414775,
0.2012885064,
0.1240213811,
-0.3333579004,
0.2635715604,
0.2254087329,
-0.1046200097,
-0.0038388595,
-0.1554675549,
-0.2256291956,
-0.1773542315,
0.2104773819,
0.2259200513,
-0.3565039337,
-0.230855152,
-0.0348870344,
0.0960318521,
-0.1957100928,
0.0203740522,
0.120653443,
0.1306190044,
0.2372604311,
-0.3842774034,
-0.1575084031,
0.0443065204,
0.4637594819,
-0.2750539482,
0.2132609487,
0.4285076559,
-0.0054325834,
-0.0431296788,
-0.1208830103,
0.126763612,
0.0437581688,
0.2106192112,
0.1623666286,
-0.3165004551,
-0.0629370064,
-0.2680115402,
0.3825358152,
-0.0419599116,
-0.2074609399,
-0.0652515143,
-0.2240739763,
-0.467910707,
-0.0544449948,
0.2477303147,
0.1402737647,
0.0923666209,
0.5768777132,
-0.3586946726,
0.1836714894,
-0.1821166724,
0.0947732776,
0.0293324664,
0.085285753,
0.0898132101,
0.0372846164,
-0.0222300459,
-0.2665498555,
-0.0872107223,
0.4501666129,
0.0098865442,
-0.0926165432,
-0.4276525974,
0.1731843948,
0.5592159629,
-0.1824074239,
0.074064672,
-0.2170207202,
-0.0007078648,
-0.3593151867,
-0.0251794979,
0.2778586149,
0.0307259206,
0.2733376026,
0.1893639266,
0.1163055226,
0.0041883141,
-0.015500023,
-0.0967456102,
-0.0643710196,
0.0176322758,
0.0547902994,
0.0343395397,
-0.0734430552,
-0.0807642192,
0.221937269,
0.2970215976,
0.2084832489,
0.2401298881,
-0.0455406755,
-0.2281159014,
-0.1336232275,
0.3515206575,
0.3570411503,
-0.2013127804,
-0.2437855303,
0.5111566186,
0.083680369,
-0.0942783207,
0.1351260245,
0.2759710252,
0.0347154401,
0.2394303977,
0.1732371747,
-0.2326283157,
0.281164825,
-0.4663679302,
-0.0875424594,
0.2715708911,
-0.0467736721,
0.0408418588,
0.0809432268,
-0.1805370897,
0.2933400273,
0.2770448327,
0.1332242489,
0.3300228417,
0.2303714156,
0.0932227448,
0.1252532154,
0.1260303557,
0.0945226029,
0.1989383101,
-0.4628058672,
0.3219623864,
0.2426407039,
-0.00558687,
0.1944715977,
0.1545813233,
0.4853101969,
-0.5250397325,
-0.2774403095,
0.2316378653,
0.418274343,
-0.2075713575,
-0.0414234661,
-0.4448894262,
0.0641771704,
-0.0232781246,
-0.019184947,
-0.0846734047,
0.0040488048,
0.1793667823,
-0.1410150975,
-0.0608336739,
-0.2040791214,
-0.4670404792,
-0.1198213995,
0.305119276,
-0.2399478108,
-0.1056112126,
-0.1089057177,
0.0585187338,
-0.2150147706,
-0.1264314055,
0.2644937038,
0.2069675624,
-0.3826076984,
-0.1049550474,
0.0128402896,
0.1148540303,
-0.122049056,
0.2308774143,
-0.2840909958,
-0.3314355314,
0.361192435,
-0.0268519856,
-0.0976094604,
-0.1502251774,
0.1964080781,
0.6410108209,
0.000151597,
0.2310474813,
-0.025150612,
-0.0345954895,
-0.1389732659,
0.052772332,
0.0753149986,
0.1661891937,
0.157014221,
0.1477216631,
0.4005221426,
0.0043879673,
0.0500766598,
0.0997287184,
0.2572560012,
0.3555529714,
-0.3640004992,
-0.5150117874,
0.0507320166,
-0.5516375899,
0.1780669689,
-0.2801927328,
-0.3762616515,
-0.1620286703,
-0.0828688145,
0.3111834526,
0.032231994,
-0.093854174,
0.1567066014,
0.111985907,
0.1879042834,
0.1225925237,
-0.2437007725,
-0.4694608152,
-0.3019475341,
0.3355239034,
-0.2901149392,
0.2659897506,
0.2904399335,
-0.0163325146,
-0.0716631711,
-0.3088710308,
-0.0686776042,
0.0746302083,
0.6968880892,
0.3198543191,
0.1866271496,
-0.0940046832,
0.0994577929,
-0.0232535899,
0.2076237053,
-0.2597786784,
0.1713565141,
-0.4841794968,
0.3901790679,
0.0003466643,
0.2632505298,
-0.6178386211,
0.0062231496,
0.1685735732,
-0.0620839372,
-0.5151698589,
0.268466264,
-0.1714924723,
0.1405557841,
-0.1522609591,
0.506000936,
-0.1623696238,
0.5561700463,
-0.2420715988,
-0.1725637764,
0.6069842577,
-0.5967276096,
-0.2871378064,
0.088119477,
-0.020446308,
-0.0478137359,
-0.3517235816,
-0.4075020254,
-0.2545371652,
0.3183052242,
-0.1005824506,
-0.2755891085,
-0.127273351,
0.0381446257,
0.1181816608,
-0.0827641636,
0.7448387146,
0.086063683,
-0.0579104386,
0.3663491607,
-0.008757852
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | Looks like there is still an object that is not pickable in your `tokenize_function` function.
You can test if an object can be pickled and hashed by using
```python
from datasets.fingerprint import Hasher
Hasher.hash(my_object)
```
Under the hood it pickles the object to compute its hash, so it calls `__getstate__` when applicable. | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 52 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
Looks like there is still an object that is not pickable in your `tokenize_function` function.
You can test if an object can be pickled and hashed by using
```python
from datasets.fingerprint import Hasher
Hasher.hash(my_object)
```
Under the hood it pickles the object to compute its hash, so it calls `__getstate__` when applicable. | [
-0.2248879373,
0.1931206882,
0.1127529666,
0.0287755355,
0.0341957547,
-0.3237703443,
0.1385364532,
0.1950844824,
0.3468083441,
-0.1000180244,
0.1921815872,
0.7253853083,
-0.1929605752,
0.2086694688,
-0.0016188882,
0.059579365,
0.0705189481,
-0.035407722,
-0.0051377863,
-0.0640127957,
-0.2173010111,
0.05091656,
-0.3579758406,
0.1536128968,
-0.2765947878,
-0.1768147945,
0.0259387493,
0.1186884493,
-0.0299848206,
-0.2711365819,
0.2045459747,
-0.0787938684,
-0.0277054757,
0.2411658317,
-0.0001231694,
-0.0801149085,
0.016194012,
-0.0863833278,
-0.0041621327,
-0.2175994962,
-0.2230957747,
-0.123976931,
-0.1235439554,
-0.2294130474,
0.0781576335,
0.0024628341,
-0.2965723872,
-0.3813812137,
0.6342017651,
0.4318727851,
0.1199070215,
0.3648687601,
-0.0678680688,
-0.034679357,
-0.1355489343,
0.3100190163,
0.0528480634,
0.223302871,
0.1253270507,
-0.3918115497,
-0.0012151934,
0.0956294388,
-0.19812572,
-0.2160099745,
0.1527505815,
0.0591068305,
0.1838102937,
0.0106210914,
-0.0086784381,
0.0929948539,
0.2169976532,
-0.3573753536,
-0.2120289505,
-0.3761956394,
-0.0575138479,
-0.150500685,
0.3402034938,
-0.2168391645,
0.1316487044,
0.1427591592,
-0.048483938,
-0.1044859737,
0.2239406407,
0.3518481851,
-0.0390821695,
0.257178694,
-0.0166093931,
0.3984130025,
-0.0536792763,
-0.1063232422,
-0.1807259619,
-0.1033440679,
0.101654321,
0.4516166747,
-0.0112114083,
-0.2384908497,
0.2105505764,
-0.2123310417,
-0.0243079178,
0.2115103304,
-0.1638646871,
0.1225486845,
-0.3641278744,
0.2640175521,
0.4708403945,
0.2212182283,
0.1237126887,
0.6363039613,
0.1985703111,
-0.1602927446,
-0.3000453711,
0.0745260864,
0.3102484345,
-0.1011357307,
-0.0373393595,
0.1756479442,
-0.1027165204,
-0.1286522895,
-0.0738531947,
0.2730225921,
-0.7321612835,
0.0083056018,
0.1820912808,
0.1216199249,
-0.0009520054,
-0.2224105299,
-0.0831373632,
0.0777556375,
-0.2158573866,
0.1148084998,
-0.1185755283,
0.1242492348,
-0.3427779675,
0.1104225293,
-0.0432602912,
0.0569454506,
0.3175241351,
0.1256697774,
-0.1688384116,
-0.0596508682,
0.1512503326,
-0.2294481248,
0.4016972482,
-0.0197039768,
-0.2360145599,
0.0424857289,
0.3069403172,
-0.44203192,
-0.2555748224,
-0.0592270866,
-0.1526567042,
-0.141263485,
-0.0386342406,
0.0347255096,
-0.2372964174,
-0.0047180336,
-0.3046903014,
0.102889508,
0.3713425398,
-0.2058526874,
0.0988660976,
-0.5015790462,
-0.3563109636,
-0.2076636404,
0.0088022873,
0.1774782538,
-0.4386509955,
-0.2434040755,
-0.0980323851,
0.1520785093,
0.3357073963,
0.1245673597,
-0.2613386214,
0.6007257104,
-0.4962501526,
0.8756875992,
0.2869646847,
-0.1486269236,
-0.4010114968,
0.0329538472,
-0.1728947759,
0.2320755869,
-0.6788750291,
-0.1038571894,
0.1650153995,
-0.0797583014,
0.1138164774,
0.33886379,
0.1549206823,
-0.0953324735,
-0.1282201707,
0.0644308925,
0.3268654943,
-0.2837591767,
0.0703489035,
-0.0096955039,
0.1624443531,
-0.2167632282,
0.2174031585,
0.0343073532,
0.1843425483,
-0.1125895903,
0.455953896,
0.1764434129,
-0.1205100715,
-0.3156249523,
-0.1837680936,
0.3253222406,
-0.0280875638,
-0.0268793292,
-0.1192956194,
-0.0829098225,
-0.1131263599,
0.05602213,
-0.3399250805,
-0.2433563471,
0.0299024209,
0.0243139639,
0.2335765809,
0.1753293425,
-0.0835650563,
-0.2479454726,
-0.0506148413,
0.060971193,
-0.0558932684,
0.056883499,
0.1251783967,
-0.2686153352,
-0.31788975,
0.1674041301,
0.4087355733,
-0.0979360864,
-0.1848381311,
0.2761867344,
0.5985628366,
-0.2991657853,
-0.3962607384,
-0.1816082895,
-0.1041160598,
0.1290624291,
-0.2356886715,
0.1717507839,
-0.0027844682,
-0.2309008539,
-0.0256965421,
0.5132232904,
0.247693643,
0.3112366796,
-0.4027120769,
0.2516180277,
-0.0123053417,
-0.0868053138,
-0.1482174695,
-0.3373770714,
-0.2627914846,
0.0373320803,
0.3305849731,
-0.1344625503,
-0.0364915878,
0.0407442302,
0.3557883799,
-0.0735355392,
0.3257072568,
-0.0644304752,
-0.1981064826,
-0.1906805933,
0.2980231047,
0.3740842342,
0.5166620612,
-0.1092321873,
-0.0572248697,
0.0850380659,
-0.0458903052,
-0.0490010381,
0.0168409869,
-0.1722276956,
-0.0378648788,
0.198848024,
0.0485894382,
-0.0998981595,
-0.1812919676,
0.0097946078,
0.0562791005,
0.2922280431,
-0.2386671901,
0.0962415561,
-0.5637151599,
0.0709879398,
-0.2885975242,
-0.1303832233,
0.0072153546,
-0.4439607561,
-0.2119713426,
0.0941521376,
-0.2360057831,
0.2182338536,
-0.1610496342,
-0.1597822756,
-0.15046224,
-0.2889372706,
0.0986512154,
-0.2346133739,
-0.2234227657,
-0.0864399076,
0.1288220882,
0.122381568,
0.2256276011,
0.3576844335,
-0.4277693033,
-0.3453749418,
-0.2861615419,
0.3642110229,
-0.167160809,
0.1216559336,
0.3645746112,
-0.21086362,
-0.072285071,
0.1510340869,
0.3195461631,
-0.10602507,
-0.1192035824,
-0.1503360122,
0.2773755193,
0.0240005292,
-0.0283164419,
0.0144706164,
-0.1706430465,
-0.0576483086,
0.3715695143,
-0.1595645845,
0.0871456414,
0.16744183,
0.0440908633,
0.2306471467,
-0.1044093668,
-0.2606274784,
-0.4392028451,
-0.0985319465,
0.1647435129,
-0.1962970495,
-0.1257396638,
-0.0366651565,
-0.1095461994,
0.1613348722,
0.0417045392,
-0.2359027267,
0.089979738,
-0.0043368693,
0.3883191347,
-0.2089864761,
0.1180845499,
0.375202179,
0.1685074419,
0.0596245602,
-0.1573243141,
-0.2061855197,
0.1814011186,
0.3865937591,
0.2156430334,
0.1895821095,
0.2443964034,
0.1597873867,
0.8500335217,
0.3193300962,
-0.4346618652,
0.1205975637,
-0.0580942929,
-0.0644242615,
-0.0762368441,
-0.3137792349,
-0.0662493035,
-0.243352741,
-0.120112963,
-0.1252257973,
-0.2128140479,
0.1224452183,
0.1718871444,
0.0738454461,
-0.0232220441,
-0.4763818979,
0.1844984889,
-0.2536952496,
0.1434858292,
0.1585398316,
0.3790479302,
-0.1934465766,
0.3132581413,
0.2337404191,
-0.0990403816,
0.4059717059,
0.0916798562,
-0.571154058,
-0.2006430477,
-0.3427854776,
0.4440488219,
0.254760325,
0.1755266488,
-0.0901170224,
-0.085762918,
-0.1431155801,
0.1859126985,
0.3545986414,
-0.4438411295,
-0.0312309414,
0.3080911636,
-0.1699861884,
-0.1782905161,
-0.0858222991,
0.2033344507,
0.6135458946,
0.0606841519,
0.5777101517,
-0.1326726228,
-0.0017200708,
-0.1848406792,
0.0997182131,
-0.0973079652,
-0.1813913435,
-0.0416363738,
0.0443171412,
-0.2571534514,
0.1307145506,
0.1788236499,
-0.0311467461,
0.2515215576,
0.0375728905,
-0.1130551845,
-0.2486297041,
-0.067083478,
0.0204546414,
0.2222064734,
0.0019847155,
0.1563673764,
0.2334224433,
-0.0332232453,
0.2050067782,
0.317037344,
-0.1554173827,
0.0191607662,
-0.2010469735,
0.0237922817,
0.3575346768,
0.0755348727,
-0.0567951873,
0.3018533587,
-0.0134982141,
-0.1000862196,
-0.2922605574,
0.2588860095,
0.1977369487,
0.0974986255,
-0.1309506297,
-0.5797989368,
0.0610706024,
0.0986435115,
-0.1772266924,
0.3608712852,
0.0427088365,
-0.2918622494,
0.2905965447,
0.1774502993,
0.8005260825,
0.165405944,
0.0148345493,
0.3365235925,
0.1808234006,
0.3699223101,
0.2355187088,
-0.0656937063,
-0.342785567,
0.3571146727,
-0.1838504076,
-0.2929324806,
0.0024913941,
0.0052597923,
-0.1912899911,
0.2498562336,
-0.0131080598,
0.1557759345,
-0.1824070215,
0.1464310288,
0.3141552806,
-0.2115348428,
-0.0345842466,
0.1503130347,
-0.0739183649,
0.2885680497,
-0.0357554592,
0.1344928592,
-0.1474820971,
-0.0078982189,
-0.2440618873,
0.1444131732,
-0.5116114616,
0.3974110186,
0.0836284608,
-0.083952114,
0.2956180274,
0.0821683407,
-0.0700965226,
0.165381968,
-0.0545428395,
0.1242013872,
0.2346414775,
0.2012885064,
0.1240213811,
-0.3333579004,
0.2635715604,
0.2254087329,
-0.1046200097,
-0.0038388595,
-0.1554675549,
-0.2256291956,
-0.1773542315,
0.2104773819,
0.2259200513,
-0.3565039337,
-0.230855152,
-0.0348870344,
0.0960318521,
-0.1957100928,
0.0203740522,
0.120653443,
0.1306190044,
0.2372604311,
-0.3842774034,
-0.1575084031,
0.0443065204,
0.4637594819,
-0.2750539482,
0.2132609487,
0.4285076559,
-0.0054325834,
-0.0431296788,
-0.1208830103,
0.126763612,
0.0437581688,
0.2106192112,
0.1623666286,
-0.3165004551,
-0.0629370064,
-0.2680115402,
0.3825358152,
-0.0419599116,
-0.2074609399,
-0.0652515143,
-0.2240739763,
-0.467910707,
-0.0544449948,
0.2477303147,
0.1402737647,
0.0923666209,
0.5768777132,
-0.3586946726,
0.1836714894,
-0.1821166724,
0.0947732776,
0.0293324664,
0.085285753,
0.0898132101,
0.0372846164,
-0.0222300459,
-0.2665498555,
-0.0872107223,
0.4501666129,
0.0098865442,
-0.0926165432,
-0.4276525974,
0.1731843948,
0.5592159629,
-0.1824074239,
0.074064672,
-0.2170207202,
-0.0007078648,
-0.3593151867,
-0.0251794979,
0.2778586149,
0.0307259206,
0.2733376026,
0.1893639266,
0.1163055226,
0.0041883141,
-0.015500023,
-0.0967456102,
-0.0643710196,
0.0176322758,
0.0547902994,
0.0343395397,
-0.0734430552,
-0.0807642192,
0.221937269,
0.2970215976,
0.2084832489,
0.2401298881,
-0.0455406755,
-0.2281159014,
-0.1336232275,
0.3515206575,
0.3570411503,
-0.2013127804,
-0.2437855303,
0.5111566186,
0.083680369,
-0.0942783207,
0.1351260245,
0.2759710252,
0.0347154401,
0.2394303977,
0.1732371747,
-0.2326283157,
0.281164825,
-0.4663679302,
-0.0875424594,
0.2715708911,
-0.0467736721,
0.0408418588,
0.0809432268,
-0.1805370897,
0.2933400273,
0.2770448327,
0.1332242489,
0.3300228417,
0.2303714156,
0.0932227448,
0.1252532154,
0.1260303557,
0.0945226029,
0.1989383101,
-0.4628058672,
0.3219623864,
0.2426407039,
-0.00558687,
0.1944715977,
0.1545813233,
0.4853101969,
-0.5250397325,
-0.2774403095,
0.2316378653,
0.418274343,
-0.2075713575,
-0.0414234661,
-0.4448894262,
0.0641771704,
-0.0232781246,
-0.019184947,
-0.0846734047,
0.0040488048,
0.1793667823,
-0.1410150975,
-0.0608336739,
-0.2040791214,
-0.4670404792,
-0.1198213995,
0.305119276,
-0.2399478108,
-0.1056112126,
-0.1089057177,
0.0585187338,
-0.2150147706,
-0.1264314055,
0.2644937038,
0.2069675624,
-0.3826076984,
-0.1049550474,
0.0128402896,
0.1148540303,
-0.122049056,
0.2308774143,
-0.2840909958,
-0.3314355314,
0.361192435,
-0.0268519856,
-0.0976094604,
-0.1502251774,
0.1964080781,
0.6410108209,
0.000151597,
0.2310474813,
-0.025150612,
-0.0345954895,
-0.1389732659,
0.052772332,
0.0753149986,
0.1661891937,
0.157014221,
0.1477216631,
0.4005221426,
0.0043879673,
0.0500766598,
0.0997287184,
0.2572560012,
0.3555529714,
-0.3640004992,
-0.5150117874,
0.0507320166,
-0.5516375899,
0.1780669689,
-0.2801927328,
-0.3762616515,
-0.1620286703,
-0.0828688145,
0.3111834526,
0.032231994,
-0.093854174,
0.1567066014,
0.111985907,
0.1879042834,
0.1225925237,
-0.2437007725,
-0.4694608152,
-0.3019475341,
0.3355239034,
-0.2901149392,
0.2659897506,
0.2904399335,
-0.0163325146,
-0.0716631711,
-0.3088710308,
-0.0686776042,
0.0746302083,
0.6968880892,
0.3198543191,
0.1866271496,
-0.0940046832,
0.0994577929,
-0.0232535899,
0.2076237053,
-0.2597786784,
0.1713565141,
-0.4841794968,
0.3901790679,
0.0003466643,
0.2632505298,
-0.6178386211,
0.0062231496,
0.1685735732,
-0.0620839372,
-0.5151698589,
0.268466264,
-0.1714924723,
0.1405557841,
-0.1522609591,
0.506000936,
-0.1623696238,
0.5561700463,
-0.2420715988,
-0.1725637764,
0.6069842577,
-0.5967276096,
-0.2871378064,
0.088119477,
-0.020446308,
-0.0478137359,
-0.3517235816,
-0.4075020254,
-0.2545371652,
0.3183052242,
-0.1005824506,
-0.2755891085,
-0.127273351,
0.0381446257,
0.1181816608,
-0.0827641636,
0.7448387146,
0.086063683,
-0.0579104386,
0.3663491607,
-0.008757852
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | I figured it out, the problem is deep copy itself uses pickle (unless you implement `__deepcopy__`). So when I changed `__getstate__` it started throwing an error.
I'm sure there's a better way of doing this, but in order to return the `__dict__` without the non-pikelable pre-tokeniser and without modifying self I removed the pre-tokenizers, did a deep copy and then re-generated it.
It does work - although I noticed Hasher doesn't call `__hash__` if the object being hashed implements it which I feel it should? If it did I could return a hash of the tokenizers.json file instead.
```
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
self.backend_tokenizer.pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
out = copy.deepcopy(self.__dict__) #self.__dict__.copy()
self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer()
return out
```
| I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 126 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
I figured it out, the problem is deep copy itself uses pickle (unless you implement `__deepcopy__`). So when I changed `__getstate__` it started throwing an error.
I'm sure there's a better way of doing this, but in order to return the `__dict__` without the non-pikelable pre-tokeniser and without modifying self I removed the pre-tokenizers, did a deep copy and then re-generated it.
It does work - although I noticed Hasher doesn't call `__hash__` if the object being hashed implements it which I feel it should? If it did I could return a hash of the tokenizers.json file instead.
```
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
self.backend_tokenizer.pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
out = copy.deepcopy(self.__dict__) #self.__dict__.copy()
self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer()
return out
```
| [
-0.2248879373,
0.1931206882,
0.1127529666,
0.0287755355,
0.0341957547,
-0.3237703443,
0.1385364532,
0.1950844824,
0.3468083441,
-0.1000180244,
0.1921815872,
0.7253853083,
-0.1929605752,
0.2086694688,
-0.0016188882,
0.059579365,
0.0705189481,
-0.035407722,
-0.0051377863,
-0.0640127957,
-0.2173010111,
0.05091656,
-0.3579758406,
0.1536128968,
-0.2765947878,
-0.1768147945,
0.0259387493,
0.1186884493,
-0.0299848206,
-0.2711365819,
0.2045459747,
-0.0787938684,
-0.0277054757,
0.2411658317,
-0.0001231694,
-0.0801149085,
0.016194012,
-0.0863833278,
-0.0041621327,
-0.2175994962,
-0.2230957747,
-0.123976931,
-0.1235439554,
-0.2294130474,
0.0781576335,
0.0024628341,
-0.2965723872,
-0.3813812137,
0.6342017651,
0.4318727851,
0.1199070215,
0.3648687601,
-0.0678680688,
-0.034679357,
-0.1355489343,
0.3100190163,
0.0528480634,
0.223302871,
0.1253270507,
-0.3918115497,
-0.0012151934,
0.0956294388,
-0.19812572,
-0.2160099745,
0.1527505815,
0.0591068305,
0.1838102937,
0.0106210914,
-0.0086784381,
0.0929948539,
0.2169976532,
-0.3573753536,
-0.2120289505,
-0.3761956394,
-0.0575138479,
-0.150500685,
0.3402034938,
-0.2168391645,
0.1316487044,
0.1427591592,
-0.048483938,
-0.1044859737,
0.2239406407,
0.3518481851,
-0.0390821695,
0.257178694,
-0.0166093931,
0.3984130025,
-0.0536792763,
-0.1063232422,
-0.1807259619,
-0.1033440679,
0.101654321,
0.4516166747,
-0.0112114083,
-0.2384908497,
0.2105505764,
-0.2123310417,
-0.0243079178,
0.2115103304,
-0.1638646871,
0.1225486845,
-0.3641278744,
0.2640175521,
0.4708403945,
0.2212182283,
0.1237126887,
0.6363039613,
0.1985703111,
-0.1602927446,
-0.3000453711,
0.0745260864,
0.3102484345,
-0.1011357307,
-0.0373393595,
0.1756479442,
-0.1027165204,
-0.1286522895,
-0.0738531947,
0.2730225921,
-0.7321612835,
0.0083056018,
0.1820912808,
0.1216199249,
-0.0009520054,
-0.2224105299,
-0.0831373632,
0.0777556375,
-0.2158573866,
0.1148084998,
-0.1185755283,
0.1242492348,
-0.3427779675,
0.1104225293,
-0.0432602912,
0.0569454506,
0.3175241351,
0.1256697774,
-0.1688384116,
-0.0596508682,
0.1512503326,
-0.2294481248,
0.4016972482,
-0.0197039768,
-0.2360145599,
0.0424857289,
0.3069403172,
-0.44203192,
-0.2555748224,
-0.0592270866,
-0.1526567042,
-0.141263485,
-0.0386342406,
0.0347255096,
-0.2372964174,
-0.0047180336,
-0.3046903014,
0.102889508,
0.3713425398,
-0.2058526874,
0.0988660976,
-0.5015790462,
-0.3563109636,
-0.2076636404,
0.0088022873,
0.1774782538,
-0.4386509955,
-0.2434040755,
-0.0980323851,
0.1520785093,
0.3357073963,
0.1245673597,
-0.2613386214,
0.6007257104,
-0.4962501526,
0.8756875992,
0.2869646847,
-0.1486269236,
-0.4010114968,
0.0329538472,
-0.1728947759,
0.2320755869,
-0.6788750291,
-0.1038571894,
0.1650153995,
-0.0797583014,
0.1138164774,
0.33886379,
0.1549206823,
-0.0953324735,
-0.1282201707,
0.0644308925,
0.3268654943,
-0.2837591767,
0.0703489035,
-0.0096955039,
0.1624443531,
-0.2167632282,
0.2174031585,
0.0343073532,
0.1843425483,
-0.1125895903,
0.455953896,
0.1764434129,
-0.1205100715,
-0.3156249523,
-0.1837680936,
0.3253222406,
-0.0280875638,
-0.0268793292,
-0.1192956194,
-0.0829098225,
-0.1131263599,
0.05602213,
-0.3399250805,
-0.2433563471,
0.0299024209,
0.0243139639,
0.2335765809,
0.1753293425,
-0.0835650563,
-0.2479454726,
-0.0506148413,
0.060971193,
-0.0558932684,
0.056883499,
0.1251783967,
-0.2686153352,
-0.31788975,
0.1674041301,
0.4087355733,
-0.0979360864,
-0.1848381311,
0.2761867344,
0.5985628366,
-0.2991657853,
-0.3962607384,
-0.1816082895,
-0.1041160598,
0.1290624291,
-0.2356886715,
0.1717507839,
-0.0027844682,
-0.2309008539,
-0.0256965421,
0.5132232904,
0.247693643,
0.3112366796,
-0.4027120769,
0.2516180277,
-0.0123053417,
-0.0868053138,
-0.1482174695,
-0.3373770714,
-0.2627914846,
0.0373320803,
0.3305849731,
-0.1344625503,
-0.0364915878,
0.0407442302,
0.3557883799,
-0.0735355392,
0.3257072568,
-0.0644304752,
-0.1981064826,
-0.1906805933,
0.2980231047,
0.3740842342,
0.5166620612,
-0.1092321873,
-0.0572248697,
0.0850380659,
-0.0458903052,
-0.0490010381,
0.0168409869,
-0.1722276956,
-0.0378648788,
0.198848024,
0.0485894382,
-0.0998981595,
-0.1812919676,
0.0097946078,
0.0562791005,
0.2922280431,
-0.2386671901,
0.0962415561,
-0.5637151599,
0.0709879398,
-0.2885975242,
-0.1303832233,
0.0072153546,
-0.4439607561,
-0.2119713426,
0.0941521376,
-0.2360057831,
0.2182338536,
-0.1610496342,
-0.1597822756,
-0.15046224,
-0.2889372706,
0.0986512154,
-0.2346133739,
-0.2234227657,
-0.0864399076,
0.1288220882,
0.122381568,
0.2256276011,
0.3576844335,
-0.4277693033,
-0.3453749418,
-0.2861615419,
0.3642110229,
-0.167160809,
0.1216559336,
0.3645746112,
-0.21086362,
-0.072285071,
0.1510340869,
0.3195461631,
-0.10602507,
-0.1192035824,
-0.1503360122,
0.2773755193,
0.0240005292,
-0.0283164419,
0.0144706164,
-0.1706430465,
-0.0576483086,
0.3715695143,
-0.1595645845,
0.0871456414,
0.16744183,
0.0440908633,
0.2306471467,
-0.1044093668,
-0.2606274784,
-0.4392028451,
-0.0985319465,
0.1647435129,
-0.1962970495,
-0.1257396638,
-0.0366651565,
-0.1095461994,
0.1613348722,
0.0417045392,
-0.2359027267,
0.089979738,
-0.0043368693,
0.3883191347,
-0.2089864761,
0.1180845499,
0.375202179,
0.1685074419,
0.0596245602,
-0.1573243141,
-0.2061855197,
0.1814011186,
0.3865937591,
0.2156430334,
0.1895821095,
0.2443964034,
0.1597873867,
0.8500335217,
0.3193300962,
-0.4346618652,
0.1205975637,
-0.0580942929,
-0.0644242615,
-0.0762368441,
-0.3137792349,
-0.0662493035,
-0.243352741,
-0.120112963,
-0.1252257973,
-0.2128140479,
0.1224452183,
0.1718871444,
0.0738454461,
-0.0232220441,
-0.4763818979,
0.1844984889,
-0.2536952496,
0.1434858292,
0.1585398316,
0.3790479302,
-0.1934465766,
0.3132581413,
0.2337404191,
-0.0990403816,
0.4059717059,
0.0916798562,
-0.571154058,
-0.2006430477,
-0.3427854776,
0.4440488219,
0.254760325,
0.1755266488,
-0.0901170224,
-0.085762918,
-0.1431155801,
0.1859126985,
0.3545986414,
-0.4438411295,
-0.0312309414,
0.3080911636,
-0.1699861884,
-0.1782905161,
-0.0858222991,
0.2033344507,
0.6135458946,
0.0606841519,
0.5777101517,
-0.1326726228,
-0.0017200708,
-0.1848406792,
0.0997182131,
-0.0973079652,
-0.1813913435,
-0.0416363738,
0.0443171412,
-0.2571534514,
0.1307145506,
0.1788236499,
-0.0311467461,
0.2515215576,
0.0375728905,
-0.1130551845,
-0.2486297041,
-0.067083478,
0.0204546414,
0.2222064734,
0.0019847155,
0.1563673764,
0.2334224433,
-0.0332232453,
0.2050067782,
0.317037344,
-0.1554173827,
0.0191607662,
-0.2010469735,
0.0237922817,
0.3575346768,
0.0755348727,
-0.0567951873,
0.3018533587,
-0.0134982141,
-0.1000862196,
-0.2922605574,
0.2588860095,
0.1977369487,
0.0974986255,
-0.1309506297,
-0.5797989368,
0.0610706024,
0.0986435115,
-0.1772266924,
0.3608712852,
0.0427088365,
-0.2918622494,
0.2905965447,
0.1774502993,
0.8005260825,
0.165405944,
0.0148345493,
0.3365235925,
0.1808234006,
0.3699223101,
0.2355187088,
-0.0656937063,
-0.342785567,
0.3571146727,
-0.1838504076,
-0.2929324806,
0.0024913941,
0.0052597923,
-0.1912899911,
0.2498562336,
-0.0131080598,
0.1557759345,
-0.1824070215,
0.1464310288,
0.3141552806,
-0.2115348428,
-0.0345842466,
0.1503130347,
-0.0739183649,
0.2885680497,
-0.0357554592,
0.1344928592,
-0.1474820971,
-0.0078982189,
-0.2440618873,
0.1444131732,
-0.5116114616,
0.3974110186,
0.0836284608,
-0.083952114,
0.2956180274,
0.0821683407,
-0.0700965226,
0.165381968,
-0.0545428395,
0.1242013872,
0.2346414775,
0.2012885064,
0.1240213811,
-0.3333579004,
0.2635715604,
0.2254087329,
-0.1046200097,
-0.0038388595,
-0.1554675549,
-0.2256291956,
-0.1773542315,
0.2104773819,
0.2259200513,
-0.3565039337,
-0.230855152,
-0.0348870344,
0.0960318521,
-0.1957100928,
0.0203740522,
0.120653443,
0.1306190044,
0.2372604311,
-0.3842774034,
-0.1575084031,
0.0443065204,
0.4637594819,
-0.2750539482,
0.2132609487,
0.4285076559,
-0.0054325834,
-0.0431296788,
-0.1208830103,
0.126763612,
0.0437581688,
0.2106192112,
0.1623666286,
-0.3165004551,
-0.0629370064,
-0.2680115402,
0.3825358152,
-0.0419599116,
-0.2074609399,
-0.0652515143,
-0.2240739763,
-0.467910707,
-0.0544449948,
0.2477303147,
0.1402737647,
0.0923666209,
0.5768777132,
-0.3586946726,
0.1836714894,
-0.1821166724,
0.0947732776,
0.0293324664,
0.085285753,
0.0898132101,
0.0372846164,
-0.0222300459,
-0.2665498555,
-0.0872107223,
0.4501666129,
0.0098865442,
-0.0926165432,
-0.4276525974,
0.1731843948,
0.5592159629,
-0.1824074239,
0.074064672,
-0.2170207202,
-0.0007078648,
-0.3593151867,
-0.0251794979,
0.2778586149,
0.0307259206,
0.2733376026,
0.1893639266,
0.1163055226,
0.0041883141,
-0.015500023,
-0.0967456102,
-0.0643710196,
0.0176322758,
0.0547902994,
0.0343395397,
-0.0734430552,
-0.0807642192,
0.221937269,
0.2970215976,
0.2084832489,
0.2401298881,
-0.0455406755,
-0.2281159014,
-0.1336232275,
0.3515206575,
0.3570411503,
-0.2013127804,
-0.2437855303,
0.5111566186,
0.083680369,
-0.0942783207,
0.1351260245,
0.2759710252,
0.0347154401,
0.2394303977,
0.1732371747,
-0.2326283157,
0.281164825,
-0.4663679302,
-0.0875424594,
0.2715708911,
-0.0467736721,
0.0408418588,
0.0809432268,
-0.1805370897,
0.2933400273,
0.2770448327,
0.1332242489,
0.3300228417,
0.2303714156,
0.0932227448,
0.1252532154,
0.1260303557,
0.0945226029,
0.1989383101,
-0.4628058672,
0.3219623864,
0.2426407039,
-0.00558687,
0.1944715977,
0.1545813233,
0.4853101969,
-0.5250397325,
-0.2774403095,
0.2316378653,
0.418274343,
-0.2075713575,
-0.0414234661,
-0.4448894262,
0.0641771704,
-0.0232781246,
-0.019184947,
-0.0846734047,
0.0040488048,
0.1793667823,
-0.1410150975,
-0.0608336739,
-0.2040791214,
-0.4670404792,
-0.1198213995,
0.305119276,
-0.2399478108,
-0.1056112126,
-0.1089057177,
0.0585187338,
-0.2150147706,
-0.1264314055,
0.2644937038,
0.2069675624,
-0.3826076984,
-0.1049550474,
0.0128402896,
0.1148540303,
-0.122049056,
0.2308774143,
-0.2840909958,
-0.3314355314,
0.361192435,
-0.0268519856,
-0.0976094604,
-0.1502251774,
0.1964080781,
0.6410108209,
0.000151597,
0.2310474813,
-0.025150612,
-0.0345954895,
-0.1389732659,
0.052772332,
0.0753149986,
0.1661891937,
0.157014221,
0.1477216631,
0.4005221426,
0.0043879673,
0.0500766598,
0.0997287184,
0.2572560012,
0.3555529714,
-0.3640004992,
-0.5150117874,
0.0507320166,
-0.5516375899,
0.1780669689,
-0.2801927328,
-0.3762616515,
-0.1620286703,
-0.0828688145,
0.3111834526,
0.032231994,
-0.093854174,
0.1567066014,
0.111985907,
0.1879042834,
0.1225925237,
-0.2437007725,
-0.4694608152,
-0.3019475341,
0.3355239034,
-0.2901149392,
0.2659897506,
0.2904399335,
-0.0163325146,
-0.0716631711,
-0.3088710308,
-0.0686776042,
0.0746302083,
0.6968880892,
0.3198543191,
0.1866271496,
-0.0940046832,
0.0994577929,
-0.0232535899,
0.2076237053,
-0.2597786784,
0.1713565141,
-0.4841794968,
0.3901790679,
0.0003466643,
0.2632505298,
-0.6178386211,
0.0062231496,
0.1685735732,
-0.0620839372,
-0.5151698589,
0.268466264,
-0.1714924723,
0.1405557841,
-0.1522609591,
0.506000936,
-0.1623696238,
0.5561700463,
-0.2420715988,
-0.1725637764,
0.6069842577,
-0.5967276096,
-0.2871378064,
0.088119477,
-0.020446308,
-0.0478137359,
-0.3517235816,
-0.4075020254,
-0.2545371652,
0.3183052242,
-0.1005824506,
-0.2755891085,
-0.127273351,
0.0381446257,
0.1181816608,
-0.0827641636,
0.7448387146,
0.086063683,
-0.0579104386,
0.3663491607,
-0.008757852
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | I'm glad you figured something out :)
Regarding hashing: we're not using hashing for the same purpose as the python `__hash__` purpose (which is in general for dictionary lookups). For example it is allowed for python hashing to not return the same hash across sessions, while our hashing must return the same hashes across sessions for the caching to work properly. | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 61 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
I'm glad you figured something out :)
Regarding hashing: we're not using hashing for the same purpose as the python `__hash__` purpose (which is in general for dictionary lookups). For example it is allowed for python hashing to not return the same hash across sessions, while our hashing must return the same hashes across sessions for the caching to work properly. | [
-0.2248879373,
0.1931206882,
0.1127529666,
0.0287755355,
0.0341957547,
-0.3237703443,
0.1385364532,
0.1950844824,
0.3468083441,
-0.1000180244,
0.1921815872,
0.7253853083,
-0.1929605752,
0.2086694688,
-0.0016188882,
0.059579365,
0.0705189481,
-0.035407722,
-0.0051377863,
-0.0640127957,
-0.2173010111,
0.05091656,
-0.3579758406,
0.1536128968,
-0.2765947878,
-0.1768147945,
0.0259387493,
0.1186884493,
-0.0299848206,
-0.2711365819,
0.2045459747,
-0.0787938684,
-0.0277054757,
0.2411658317,
-0.0001231694,
-0.0801149085,
0.016194012,
-0.0863833278,
-0.0041621327,
-0.2175994962,
-0.2230957747,
-0.123976931,
-0.1235439554,
-0.2294130474,
0.0781576335,
0.0024628341,
-0.2965723872,
-0.3813812137,
0.6342017651,
0.4318727851,
0.1199070215,
0.3648687601,
-0.0678680688,
-0.034679357,
-0.1355489343,
0.3100190163,
0.0528480634,
0.223302871,
0.1253270507,
-0.3918115497,
-0.0012151934,
0.0956294388,
-0.19812572,
-0.2160099745,
0.1527505815,
0.0591068305,
0.1838102937,
0.0106210914,
-0.0086784381,
0.0929948539,
0.2169976532,
-0.3573753536,
-0.2120289505,
-0.3761956394,
-0.0575138479,
-0.150500685,
0.3402034938,
-0.2168391645,
0.1316487044,
0.1427591592,
-0.048483938,
-0.1044859737,
0.2239406407,
0.3518481851,
-0.0390821695,
0.257178694,
-0.0166093931,
0.3984130025,
-0.0536792763,
-0.1063232422,
-0.1807259619,
-0.1033440679,
0.101654321,
0.4516166747,
-0.0112114083,
-0.2384908497,
0.2105505764,
-0.2123310417,
-0.0243079178,
0.2115103304,
-0.1638646871,
0.1225486845,
-0.3641278744,
0.2640175521,
0.4708403945,
0.2212182283,
0.1237126887,
0.6363039613,
0.1985703111,
-0.1602927446,
-0.3000453711,
0.0745260864,
0.3102484345,
-0.1011357307,
-0.0373393595,
0.1756479442,
-0.1027165204,
-0.1286522895,
-0.0738531947,
0.2730225921,
-0.7321612835,
0.0083056018,
0.1820912808,
0.1216199249,
-0.0009520054,
-0.2224105299,
-0.0831373632,
0.0777556375,
-0.2158573866,
0.1148084998,
-0.1185755283,
0.1242492348,
-0.3427779675,
0.1104225293,
-0.0432602912,
0.0569454506,
0.3175241351,
0.1256697774,
-0.1688384116,
-0.0596508682,
0.1512503326,
-0.2294481248,
0.4016972482,
-0.0197039768,
-0.2360145599,
0.0424857289,
0.3069403172,
-0.44203192,
-0.2555748224,
-0.0592270866,
-0.1526567042,
-0.141263485,
-0.0386342406,
0.0347255096,
-0.2372964174,
-0.0047180336,
-0.3046903014,
0.102889508,
0.3713425398,
-0.2058526874,
0.0988660976,
-0.5015790462,
-0.3563109636,
-0.2076636404,
0.0088022873,
0.1774782538,
-0.4386509955,
-0.2434040755,
-0.0980323851,
0.1520785093,
0.3357073963,
0.1245673597,
-0.2613386214,
0.6007257104,
-0.4962501526,
0.8756875992,
0.2869646847,
-0.1486269236,
-0.4010114968,
0.0329538472,
-0.1728947759,
0.2320755869,
-0.6788750291,
-0.1038571894,
0.1650153995,
-0.0797583014,
0.1138164774,
0.33886379,
0.1549206823,
-0.0953324735,
-0.1282201707,
0.0644308925,
0.3268654943,
-0.2837591767,
0.0703489035,
-0.0096955039,
0.1624443531,
-0.2167632282,
0.2174031585,
0.0343073532,
0.1843425483,
-0.1125895903,
0.455953896,
0.1764434129,
-0.1205100715,
-0.3156249523,
-0.1837680936,
0.3253222406,
-0.0280875638,
-0.0268793292,
-0.1192956194,
-0.0829098225,
-0.1131263599,
0.05602213,
-0.3399250805,
-0.2433563471,
0.0299024209,
0.0243139639,
0.2335765809,
0.1753293425,
-0.0835650563,
-0.2479454726,
-0.0506148413,
0.060971193,
-0.0558932684,
0.056883499,
0.1251783967,
-0.2686153352,
-0.31788975,
0.1674041301,
0.4087355733,
-0.0979360864,
-0.1848381311,
0.2761867344,
0.5985628366,
-0.2991657853,
-0.3962607384,
-0.1816082895,
-0.1041160598,
0.1290624291,
-0.2356886715,
0.1717507839,
-0.0027844682,
-0.2309008539,
-0.0256965421,
0.5132232904,
0.247693643,
0.3112366796,
-0.4027120769,
0.2516180277,
-0.0123053417,
-0.0868053138,
-0.1482174695,
-0.3373770714,
-0.2627914846,
0.0373320803,
0.3305849731,
-0.1344625503,
-0.0364915878,
0.0407442302,
0.3557883799,
-0.0735355392,
0.3257072568,
-0.0644304752,
-0.1981064826,
-0.1906805933,
0.2980231047,
0.3740842342,
0.5166620612,
-0.1092321873,
-0.0572248697,
0.0850380659,
-0.0458903052,
-0.0490010381,
0.0168409869,
-0.1722276956,
-0.0378648788,
0.198848024,
0.0485894382,
-0.0998981595,
-0.1812919676,
0.0097946078,
0.0562791005,
0.2922280431,
-0.2386671901,
0.0962415561,
-0.5637151599,
0.0709879398,
-0.2885975242,
-0.1303832233,
0.0072153546,
-0.4439607561,
-0.2119713426,
0.0941521376,
-0.2360057831,
0.2182338536,
-0.1610496342,
-0.1597822756,
-0.15046224,
-0.2889372706,
0.0986512154,
-0.2346133739,
-0.2234227657,
-0.0864399076,
0.1288220882,
0.122381568,
0.2256276011,
0.3576844335,
-0.4277693033,
-0.3453749418,
-0.2861615419,
0.3642110229,
-0.167160809,
0.1216559336,
0.3645746112,
-0.21086362,
-0.072285071,
0.1510340869,
0.3195461631,
-0.10602507,
-0.1192035824,
-0.1503360122,
0.2773755193,
0.0240005292,
-0.0283164419,
0.0144706164,
-0.1706430465,
-0.0576483086,
0.3715695143,
-0.1595645845,
0.0871456414,
0.16744183,
0.0440908633,
0.2306471467,
-0.1044093668,
-0.2606274784,
-0.4392028451,
-0.0985319465,
0.1647435129,
-0.1962970495,
-0.1257396638,
-0.0366651565,
-0.1095461994,
0.1613348722,
0.0417045392,
-0.2359027267,
0.089979738,
-0.0043368693,
0.3883191347,
-0.2089864761,
0.1180845499,
0.375202179,
0.1685074419,
0.0596245602,
-0.1573243141,
-0.2061855197,
0.1814011186,
0.3865937591,
0.2156430334,
0.1895821095,
0.2443964034,
0.1597873867,
0.8500335217,
0.3193300962,
-0.4346618652,
0.1205975637,
-0.0580942929,
-0.0644242615,
-0.0762368441,
-0.3137792349,
-0.0662493035,
-0.243352741,
-0.120112963,
-0.1252257973,
-0.2128140479,
0.1224452183,
0.1718871444,
0.0738454461,
-0.0232220441,
-0.4763818979,
0.1844984889,
-0.2536952496,
0.1434858292,
0.1585398316,
0.3790479302,
-0.1934465766,
0.3132581413,
0.2337404191,
-0.0990403816,
0.4059717059,
0.0916798562,
-0.571154058,
-0.2006430477,
-0.3427854776,
0.4440488219,
0.254760325,
0.1755266488,
-0.0901170224,
-0.085762918,
-0.1431155801,
0.1859126985,
0.3545986414,
-0.4438411295,
-0.0312309414,
0.3080911636,
-0.1699861884,
-0.1782905161,
-0.0858222991,
0.2033344507,
0.6135458946,
0.0606841519,
0.5777101517,
-0.1326726228,
-0.0017200708,
-0.1848406792,
0.0997182131,
-0.0973079652,
-0.1813913435,
-0.0416363738,
0.0443171412,
-0.2571534514,
0.1307145506,
0.1788236499,
-0.0311467461,
0.2515215576,
0.0375728905,
-0.1130551845,
-0.2486297041,
-0.067083478,
0.0204546414,
0.2222064734,
0.0019847155,
0.1563673764,
0.2334224433,
-0.0332232453,
0.2050067782,
0.317037344,
-0.1554173827,
0.0191607662,
-0.2010469735,
0.0237922817,
0.3575346768,
0.0755348727,
-0.0567951873,
0.3018533587,
-0.0134982141,
-0.1000862196,
-0.2922605574,
0.2588860095,
0.1977369487,
0.0974986255,
-0.1309506297,
-0.5797989368,
0.0610706024,
0.0986435115,
-0.1772266924,
0.3608712852,
0.0427088365,
-0.2918622494,
0.2905965447,
0.1774502993,
0.8005260825,
0.165405944,
0.0148345493,
0.3365235925,
0.1808234006,
0.3699223101,
0.2355187088,
-0.0656937063,
-0.342785567,
0.3571146727,
-0.1838504076,
-0.2929324806,
0.0024913941,
0.0052597923,
-0.1912899911,
0.2498562336,
-0.0131080598,
0.1557759345,
-0.1824070215,
0.1464310288,
0.3141552806,
-0.2115348428,
-0.0345842466,
0.1503130347,
-0.0739183649,
0.2885680497,
-0.0357554592,
0.1344928592,
-0.1474820971,
-0.0078982189,
-0.2440618873,
0.1444131732,
-0.5116114616,
0.3974110186,
0.0836284608,
-0.083952114,
0.2956180274,
0.0821683407,
-0.0700965226,
0.165381968,
-0.0545428395,
0.1242013872,
0.2346414775,
0.2012885064,
0.1240213811,
-0.3333579004,
0.2635715604,
0.2254087329,
-0.1046200097,
-0.0038388595,
-0.1554675549,
-0.2256291956,
-0.1773542315,
0.2104773819,
0.2259200513,
-0.3565039337,
-0.230855152,
-0.0348870344,
0.0960318521,
-0.1957100928,
0.0203740522,
0.120653443,
0.1306190044,
0.2372604311,
-0.3842774034,
-0.1575084031,
0.0443065204,
0.4637594819,
-0.2750539482,
0.2132609487,
0.4285076559,
-0.0054325834,
-0.0431296788,
-0.1208830103,
0.126763612,
0.0437581688,
0.2106192112,
0.1623666286,
-0.3165004551,
-0.0629370064,
-0.2680115402,
0.3825358152,
-0.0419599116,
-0.2074609399,
-0.0652515143,
-0.2240739763,
-0.467910707,
-0.0544449948,
0.2477303147,
0.1402737647,
0.0923666209,
0.5768777132,
-0.3586946726,
0.1836714894,
-0.1821166724,
0.0947732776,
0.0293324664,
0.085285753,
0.0898132101,
0.0372846164,
-0.0222300459,
-0.2665498555,
-0.0872107223,
0.4501666129,
0.0098865442,
-0.0926165432,
-0.4276525974,
0.1731843948,
0.5592159629,
-0.1824074239,
0.074064672,
-0.2170207202,
-0.0007078648,
-0.3593151867,
-0.0251794979,
0.2778586149,
0.0307259206,
0.2733376026,
0.1893639266,
0.1163055226,
0.0041883141,
-0.015500023,
-0.0967456102,
-0.0643710196,
0.0176322758,
0.0547902994,
0.0343395397,
-0.0734430552,
-0.0807642192,
0.221937269,
0.2970215976,
0.2084832489,
0.2401298881,
-0.0455406755,
-0.2281159014,
-0.1336232275,
0.3515206575,
0.3570411503,
-0.2013127804,
-0.2437855303,
0.5111566186,
0.083680369,
-0.0942783207,
0.1351260245,
0.2759710252,
0.0347154401,
0.2394303977,
0.1732371747,
-0.2326283157,
0.281164825,
-0.4663679302,
-0.0875424594,
0.2715708911,
-0.0467736721,
0.0408418588,
0.0809432268,
-0.1805370897,
0.2933400273,
0.2770448327,
0.1332242489,
0.3300228417,
0.2303714156,
0.0932227448,
0.1252532154,
0.1260303557,
0.0945226029,
0.1989383101,
-0.4628058672,
0.3219623864,
0.2426407039,
-0.00558687,
0.1944715977,
0.1545813233,
0.4853101969,
-0.5250397325,
-0.2774403095,
0.2316378653,
0.418274343,
-0.2075713575,
-0.0414234661,
-0.4448894262,
0.0641771704,
-0.0232781246,
-0.019184947,
-0.0846734047,
0.0040488048,
0.1793667823,
-0.1410150975,
-0.0608336739,
-0.2040791214,
-0.4670404792,
-0.1198213995,
0.305119276,
-0.2399478108,
-0.1056112126,
-0.1089057177,
0.0585187338,
-0.2150147706,
-0.1264314055,
0.2644937038,
0.2069675624,
-0.3826076984,
-0.1049550474,
0.0128402896,
0.1148540303,
-0.122049056,
0.2308774143,
-0.2840909958,
-0.3314355314,
0.361192435,
-0.0268519856,
-0.0976094604,
-0.1502251774,
0.1964080781,
0.6410108209,
0.000151597,
0.2310474813,
-0.025150612,
-0.0345954895,
-0.1389732659,
0.052772332,
0.0753149986,
0.1661891937,
0.157014221,
0.1477216631,
0.4005221426,
0.0043879673,
0.0500766598,
0.0997287184,
0.2572560012,
0.3555529714,
-0.3640004992,
-0.5150117874,
0.0507320166,
-0.5516375899,
0.1780669689,
-0.2801927328,
-0.3762616515,
-0.1620286703,
-0.0828688145,
0.3111834526,
0.032231994,
-0.093854174,
0.1567066014,
0.111985907,
0.1879042834,
0.1225925237,
-0.2437007725,
-0.4694608152,
-0.3019475341,
0.3355239034,
-0.2901149392,
0.2659897506,
0.2904399335,
-0.0163325146,
-0.0716631711,
-0.3088710308,
-0.0686776042,
0.0746302083,
0.6968880892,
0.3198543191,
0.1866271496,
-0.0940046832,
0.0994577929,
-0.0232535899,
0.2076237053,
-0.2597786784,
0.1713565141,
-0.4841794968,
0.3901790679,
0.0003466643,
0.2632505298,
-0.6178386211,
0.0062231496,
0.1685735732,
-0.0620839372,
-0.5151698589,
0.268466264,
-0.1714924723,
0.1405557841,
-0.1522609591,
0.506000936,
-0.1623696238,
0.5561700463,
-0.2420715988,
-0.1725637764,
0.6069842577,
-0.5967276096,
-0.2871378064,
0.088119477,
-0.020446308,
-0.0478137359,
-0.3517235816,
-0.4075020254,
-0.2545371652,
0.3183052242,
-0.1005824506,
-0.2755891085,
-0.127273351,
0.0381446257,
0.1181816608,
-0.0827641636,
0.7448387146,
0.086063683,
-0.0579104386,
0.3663491607,
-0.008757852
] |
https://github.com/huggingface/datasets/issues/2514 | Can datasets remove duplicated rows? | Hi ! For now this is probably the best option.
We might add a feature like this in the feature as well.
Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ?
Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases | **Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no | 63 | Can datasets remove duplicated rows?
**Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no
Hi ! For now this is probably the best option.
We might add a feature like this in the feature as well.
Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ?
Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases | [
0.140685156,
-0.165482074,
-0.1650882959,
0.154005006,
0.0489431322,
0.2394910008,
0.2769090533,
0.0634389967,
-0.337651372,
0.0192049854,
-0.0341105983,
0.2346980274,
0.1190901697,
0.2062143832,
-0.0816840902,
0.0102526033,
0.0978407413,
0.1727185249,
-0.0850974023,
0.035691306,
-0.0740697831,
-0.2448659539,
-0.2372235656,
-0.1401375681,
-0.4883828759,
-0.0701319426,
-0.3793187141,
-0.052384872,
-0.1877829283,
-0.0563323013,
0.1769872308,
0.5257617831,
-0.015922755,
0.3108599186,
-0.0001015379,
-0.3572310507,
0.0228314847,
0.1596542299,
-0.3186168075,
0.164224267,
-0.371380806,
-0.0732261837,
0.0418946743,
-0.0257241726,
0.0256407484,
-0.2802484632,
-0.2648801506,
-0.2234135717,
0.1587845981,
0.0940889418,
0.2888640761,
-0.0277582109,
-0.2481735051,
-0.0161672644,
0.0297318567,
0.4935168028,
-0.1404054761,
0.2517938018,
0.4525960982,
-0.0940501392,
0.1595205367,
0.1083618179,
-0.0224841088,
0.2351041585,
0.1676218808,
-0.1702306867,
-0.2057348788,
-0.1909145862,
0.2019750625,
0.3055929542,
0.7380337715,
-0.4114798903,
-0.3087227941,
-0.2445227206,
0.4246825576,
-0.0125919543,
-0.0807778239,
0.0383968353,
-0.0188629515,
0.0967523605,
-0.3541406393,
-0.5405526161,
-0.1078157797,
-0.2075585723,
-0.0283802524,
-0.5066341758,
0.0746084228,
-0.1145886481,
0.0782368332,
-0.0259598773,
0.426138103,
-0.1496887356,
0.2013802081,
0.3944004178,
-0.3874804974,
-0.3127180934,
-0.1966111362,
-0.0839561224,
0.2826721966,
0.1205256879,
0.3587395549,
-0.0393951535,
-0.1054676771,
0.2516823113,
0.31066221,
0.0013533458,
-0.13744618,
0.0365057178,
0.0527422838,
-0.2087915838,
-0.2718606591,
-0.1024354175,
0.0155876875,
0.2337319255,
0.3121540248,
-0.0734117031,
0.2197850347,
-0.3145793974,
-0.369615078,
0.039502576,
-0.2582021058,
-0.1338281631,
-0.1559177637,
-0.1158695817,
0.1043354422,
-0.0742387846,
-0.1398549974,
-0.0562562384,
-0.2685824633,
-0.3536014557,
-0.0524647981,
0.0923021361,
-0.1924514771,
0.0273810755,
0.3380940557,
-0.1689907312,
-0.0459467918,
0.2378153056,
0.1735194474,
-0.1429390013,
0.3021446466,
-0.2683894634,
0.0580600426,
-0.1268219352,
-0.1946305633,
-0.2599048018,
-0.1769256294,
0.1686662287,
-0.0677966923,
0.4203226566,
0.1222819984,
-0.0890089199,
-0.0260752365,
0.3075681329,
0.0380234197,
-0.1720778942,
-0.2657402456,
0.2884061933,
-0.1524930298,
0.1331702769,
0.0765211135,
0.0340101942,
-0.0129356533,
-0.2317593992,
-0.0672176406,
0.1737956703,
-0.43737486,
-0.0078026354,
-0.1961131394,
-0.3269720078,
-0.1153032184,
0.3891501129,
-0.0075876564,
0.1604727805,
0.0140762106,
-0.0453708842,
0.046332933,
0.0908387601,
-0.1502966434,
0.2502067089,
-0.0282452404,
0.2478692234,
-0.1319450736,
0.3640057743,
0.3663207293,
-0.0124331918,
0.1415612102,
0.0014438462,
-0.277879864,
-0.3764962554,
-0.2161199749,
-0.4165987372,
0.1194740236,
0.105959937,
0.1478085518,
0.0597622208,
0.1666276455,
-0.1710540801,
0.1553810984,
-0.0631802455,
-0.1182342544,
-0.0565081052,
0.4424175024,
0.1002993956,
0.1001490206,
-0.3835814595,
-0.4197449088,
0.1171434969,
-0.1840033829,
-0.1174986064,
0.2460183203,
-0.6625520587,
0.0903072879,
-0.0896112621,
-0.0794647038,
0.1624146551,
0.2374854684,
-0.3466383219,
0.0311685801,
-0.2786121666,
-0.2357184589,
0.3210315406,
-0.2857351005,
0.0295974575,
-0.1031140834,
0.3592187464,
0.1591355503,
-0.0108291544,
0.1967086643,
0.3669460714,
-0.0154450573,
0.1201517433,
0.0040443949,
0.1093619764,
0.1113896519,
0.0468277372,
0.2053043544,
0.1967704296,
0.1637277454,
-0.0249818489,
-0.0328928903,
0.300132513,
0.0941673219,
0.0090638027,
-0.4436185062,
0.1890524477,
-0.396879971,
-0.143371135,
0.0715353042,
-0.0711401552,
0.0350453407,
-0.1869291067,
0.136822015,
-0.2567850351,
0.1241660416,
0.1711548269,
-0.1705225408,
0.3658868372,
-0.4551765919,
0.1549884379,
-0.1446324587,
-0.1276320964,
0.1036439687,
-0.0278993957,
-0.0213380493,
-0.1337421238,
0.2878715396,
0.3261106908,
0.3545408547,
0.2429135442,
0.2274256647,
0.2056376934,
0.2314520627,
0.1031551361,
0.0854177475,
-0.1205096394,
0.0236359686,
-0.1802591383,
-0.096285373,
0.1669262499,
-0.3265921772,
0.1067499965,
0.2158192694,
0.1735785306,
-0.0868753046,
-0.3450115323,
-0.503924191,
-0.5576464534,
-0.0695747286,
0.2795038819,
-0.0923284888,
0.033904776,
0.4795558751,
0.1193514541,
0.0990646034,
-0.0422910377,
-0.2414944023,
0.6234964132,
-0.2915301323,
0.014295334,
-0.0168414563,
-0.1014137268,
-0.0281203706,
0.3210753798,
0.1391530037,
0.304089427,
0.7592908144,
0.1577476859,
0.07966014,
-0.6362701654,
-0.1932234168,
-0.078581199,
0.0907435119,
0.1842634678,
0.0044848323,
0.0530588664,
-0.1311347336,
0.1233930513,
-0.1617035121,
-0.0167218745,
-0.1975779682,
-0.2556273341,
0.2330761254,
0.1756501347,
-0.0681052729,
-0.2742832899,
0.0457901284,
-0.1980941445,
0.2695210278,
-0.2622246444,
0.0951303542,
-0.3755032718,
-0.0681840405,
-0.1175014228,
0.1213092059,
0.0527999401,
-0.3482723236,
-0.2078989446,
-0.0830826759,
0.0397476926,
-0.1691692621,
-0.1180493683,
0.2818206549,
-0.0622631311,
0.3909326792,
-0.1327952594,
-0.2212593555,
0.027614953,
0.1558005661,
0.0163266622,
-0.0522641912,
0.2613497674,
0.2835830152,
-0.1511325389,
0.0405749306,
-0.0436747596,
-0.1215492487,
0.0741652697,
-0.0268685669,
0.1740277112,
0.2242372185,
0.229126215,
0.3919929862,
0.457218349,
0.012055343,
0.1044706404,
0.1064214855,
0.1943878084,
0.0151885729,
-0.3934974372,
-0.0631570518,
-0.2528233528,
0.1516998708,
0.4256210327,
0.1379576027,
-0.2058085352,
0.0294687301,
-0.3817226291,
-0.2387853861,
-0.2324658036,
-0.0845030621,
-0.4879083037,
0.3477215767,
-0.0017104074,
-0.2861217856,
0.0441844948,
-0.0023835823,
-0.0917694122,
-0.0810922608,
0.2863121927,
-0.2717477679,
-0.2790018916,
-0.2390107512,
-0.1783731431,
0.2477946728,
0.1335835755,
0.173550427,
0.0309218019,
0.2605941892,
0.1744631827,
0.1475319713,
0.4469807148,
-0.2209325284,
-0.294113636,
-0.0769942552,
-0.1500926912,
0.1528446078,
0.1882314533,
-0.0595771223,
0.1963179857,
-0.0077381525,
-0.0078367665,
-0.1292005032,
-0.2321169227,
0.3821358383,
0.3925139606,
-0.2230865657,
-0.3086246848,
0.2006901652,
-0.1509441286,
-0.308311224,
0.1182734817,
0.0833299533,
-0.2034466714,
-0.0352649502,
-0.2010385096,
-0.188907668,
-0.0574609116,
0.5008251667,
-0.1931931674,
-0.067711845,
-0.0585319325,
0.3980492949,
0.0129431039,
-0.0658272058,
0.5238160491,
0.4703605175,
-0.2744764984,
-0.2046439499,
-0.4385218024,
-0.4762161374,
0.4185966253,
0.1051483005,
0.0575385801,
0.4906478226,
-0.1769180298,
-0.096455209,
-0.2603178918,
-0.3278203607,
0.161007002,
-0.0771324933,
-0.2866967022,
-0.412642777,
0.156919986,
0.2747709155,
-0.169658348,
0.3188522756,
0.2740942538,
-0.2063531578,
0.0082204901,
0.0602808148,
0.7813105583,
-0.0572616346,
-0.0152083822,
-0.4095436037,
-0.2641256452,
0.2027223706,
0.1019194126,
0.0460514203,
0.0212359652,
-0.3808657229,
-0.0866684914,
0.1076635867,
0.217641905,
0.3884307444,
0.0392844379,
0.2841057181,
-0.0924637318,
-0.000543653,
0.294362098,
0.3750172853,
0.0731351003,
0.1393527836,
0.0992628038,
0.1993831396,
0.1266739666,
-0.4207124114,
-0.1413898766,
0.171973139,
0.4786083996,
0.0558300763,
-0.0638378039,
-0.3529224694,
-0.1126641557,
0.2513095737,
-0.2462432235,
-0.1611236781,
0.2035203874,
-0.197961539,
0.1111253798,
0.0654318184,
-0.0434318259,
-0.0374817513,
0.4285085499,
0.334197849,
-0.1032546163,
-0.1048060507,
0.2820319831,
-0.0139264464,
-0.1866951585,
0.0177016146,
0.260414362,
-0.3278188109,
-0.2937097847,
0.1115784645,
-0.2877515852,
-0.194891423,
-0.0711984634,
-0.0361998752,
-0.1690893024,
-0.2639677823,
0.2227432579,
0.2321110517,
-0.0886577368,
0.5801398158,
0.096573174,
0.1145548373,
-0.2845461369,
0.0514663272,
0.6038421392,
-0.294262588,
0.0203120541,
-0.0450428352,
-0.3466794491,
-0.3113828897,
0.0495288968,
-0.043998085,
-0.1276924759,
0.2685382068,
-0.2381168753,
0.2652872205,
0.2355504036,
-0.2999508679,
-0.1005667895,
0.0460508391,
-0.0921841562,
0.047501415,
-0.2061018497,
0.1462438107,
0.2292242348,
0.4124715328,
0.0708963424,
-0.0468709692,
-0.1285556704,
0.2888341248,
-0.4000198245,
0.3993601799,
0.0945593938,
0.1767641157,
0.0824465901,
0.1948525012,
-0.2577295005,
-0.2160283476,
0.1403772384,
-0.0178155862,
0.3704653084,
-0.3278236389,
-0.0225526839,
0.0600105226,
-0.1476686597,
0.2092429698,
0.1008259729,
-0.0661533698,
-0.0986373276,
-0.0651675463,
0.1538115889,
0.0807400197,
0.0721880347,
0.0130379498,
0.398470521,
-0.4098279774,
-0.3508967161,
0.2121176869,
0.117125608,
0.0153384283,
0.2029841542,
-0.0538278408,
0.0407225117,
0.0347624868,
-0.2113346457,
0.0822405741,
0.2176879495,
-0.3976353705,
0.1352213621,
0.0903970003,
-0.0065129027,
0.0280603133,
0.3131864667,
0.0237551201,
-0.0954858959,
-0.0735833868,
0.1023027673,
0.2557308972,
-0.473510474,
-0.0518354662,
0.3816907704,
-0.2694067955,
0.1285035908,
0.3236990571,
0.1077450067,
0.3082869053,
0.0759881437,
-0.1486617923,
0.0952470452,
-0.3077057898,
0.2454696149,
0.1432371736,
0.370495975,
-0.24052535,
0.1277180165,
0.1459759176,
-0.0762235522,
0.2074324787,
0.0497042835,
0.2443205863,
0.2103809416,
0.0827847421,
0.322406888,
0.0005856231,
0.1528161764,
0.4286257625,
-0.1078521013,
0.0441781506,
0.2797580659,
-0.1247083545,
0.1938398927,
-0.1352655441,
-0.1123758852,
0.1474459767,
-0.0893396735,
0.158405453,
0.1259021461,
-0.2418936342,
-0.1280557215,
-0.0236352086,
-0.0601813011,
-0.0971800387,
0.2889664173,
-0.0741619319,
0.0530999079,
-0.1978664994,
0.5029255152,
0.0863769129,
0.2710225582,
-0.1500815898,
-0.3748135269,
0.0151134394,
0.062586084,
0.1371515989,
0.5981582403,
0.0585290045,
0.0340734683,
-0.08152356,
0.0144752525,
-0.216202125,
0.0285845548,
0.0467490554,
0.2041556835,
-0.1509690583,
-0.1052283794,
-0.0115825571,
0.1715225279,
-0.0447367877,
0.0386971869,
0.196415171,
-0.1436283886,
-0.7924934626,
0.3506557643,
0.233195141,
-0.3567836881,
0.1086482406,
-0.0057644062,
-0.0246923938,
-0.0635941476,
0.5445170403,
-0.0859045014,
-0.1150614321,
-0.0185316745,
0.1519896388,
-0.1441809535,
0.1815047711,
0.3420636952,
0.1265691519,
-0.1513133049,
-0.0463798419,
-0.569683671,
-0.1018694565,
-0.220476076,
0.1026963517,
0.4844152927,
0.0441272035,
-0.067432642,
0.1358663142,
0.0070428401,
-0.2546030283,
-0.0132013932,
0.2133856714,
-0.3235014677,
-0.0227957778,
-0.0068381894,
-0.1383006275,
-0.1080932915,
-0.361194998,
0.1588809341,
-0.1554007083,
-0.0089334697,
-0.0340318009,
0.0469430164,
0.3325408101,
0.1585763544,
0.0870800763,
0.0702106208,
0.2880364656,
0.1809132546,
0.0711492971,
0.1565505266,
0.259400785,
-0.2120544016,
0.3363726139,
0.3618614972,
-0.1224537492,
-0.1858341098,
-0.1522149146,
0.2615294158,
0.2256317288,
-0.1041049808,
0.0013003126,
-0.2095728815,
-0.1042665318,
0.0674145445,
0.0819423348,
0.0823077932,
0.2622484565,
-0.2664482296,
0.1350755394,
-0.2109161615,
-0.1355093271,
0.1331357062,
-0.0722149387,
-0.063025251,
-0.3058521152,
0.2632052898,
0.0985739008,
-0.2345578074,
-0.378154397,
-0.1496788263,
0.4653115571,
-0.1693102419,
0.1591649801,
0.5180372596,
0.0763002038,
-0.0000083223,
-0.1389847249,
-0.0060037225,
0.0172108766,
0.0925400034,
0.2196026742,
-0.2579992712
] |
https://github.com/huggingface/datasets/issues/2514 | Can datasets remove duplicated rows? | Yes, I'd like to work on this feature once I'm done with #2500, but first I have to do some research, and see if the implementation wouldn't be too complex.
In the meantime, maybe [this lib](https://github.com/TomScheffers/pyarrow_ops) can help. However, note that this lib operates directly on pyarrow tables and relies only on `hash` to find duplicates (e.g. `-1` and `-2` have the same hash in Python 3, so this lib will treat them as duplicates), which doesn't make much sense. | **Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no | 80 | Can datasets remove duplicated rows?
**Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no
Yes, I'd like to work on this feature once I'm done with #2500, but first I have to do some research, and see if the implementation wouldn't be too complex.
In the meantime, maybe [this lib](https://github.com/TomScheffers/pyarrow_ops) can help. However, note that this lib operates directly on pyarrow tables and relies only on `hash` to find duplicates (e.g. `-1` and `-2` have the same hash in Python 3, so this lib will treat them as duplicates), which doesn't make much sense. | [
0.1044110656,
0.0183884203,
-0.135391295,
0.0949542299,
0.0331350639,
0.140713051,
0.3450479507,
0.2536360025,
-0.6958322525,
0.0018974319,
-0.0936518833,
0.3721429706,
0.0341931917,
0.1650433093,
0.1942411363,
0.0286321118,
0.1286832094,
0.2465854436,
-0.1124954373,
0.1162926406,
-0.1895908862,
-0.2231098562,
-0.3207568228,
0.035102535,
-0.3403730989,
0.013470713,
-0.3700187504,
-0.0473622903,
-0.2080129087,
-0.2208463997,
0.2427170277,
0.5297173262,
0.0183267854,
0.2103601694,
-0.0001062609,
-0.2848938406,
0.0180513151,
0.1628573537,
-0.3009909391,
0.0122175366,
-0.0974297151,
-0.1236536801,
0.1503573358,
-0.0711362809,
0.0399263203,
-0.4889657497,
-0.2355798036,
0.1284603775,
0.1914304793,
0.1222233325,
0.2542188168,
0.2170831859,
-0.0721716955,
0.1295601875,
0.2810862958,
0.3251205683,
-0.1984840035,
0.4407838881,
0.4495326877,
-0.1497721821,
0.3157265782,
0.0626320094,
-0.1624637544,
0.1453372687,
0.1373353004,
0.0009985529,
-0.1338932365,
-0.0835923254,
0.0399320349,
0.283454895,
0.5527540445,
-0.6672780514,
-0.3417753279,
-0.350033462,
0.4291495383,
-0.2890273333,
-0.0532079041,
0.07050924,
-0.0623897724,
0.1691334546,
-0.4275589585,
-0.2888959944,
-0.1135680526,
-0.0553034283,
-0.0859847516,
-0.2437136769,
0.2126116902,
0.0046138205,
0.1512089223,
-0.0223211199,
0.4632270336,
-0.0744319484,
0.2205947638,
0.4448761046,
-0.4444242716,
-0.2212744206,
-0.1027682498,
0.1373484731,
0.3310640454,
0.1832379997,
0.2757818699,
0.0348055661,
0.0536747128,
0.2114179134,
0.2253225446,
-0.0003010444,
-0.0716263503,
0.1072475538,
-0.048481755,
-0.171482712,
-0.1903432459,
0.1094563752,
0.0688165724,
0.1245209873,
0.42258358,
-0.0973045155,
0.2560530305,
-0.1723716855,
-0.3565199971,
0.0375064462,
-0.5191216469,
-0.2063176632,
-0.0685029924,
-0.1372722089,
0.1091359481,
-0.2522801757,
-0.1279277503,
0.0959540159,
-0.3302258253,
-0.2666725814,
-0.0282258466,
0.072054565,
-0.1864465475,
-0.0160292927,
0.3545637131,
-0.2653105855,
-0.1158275008,
0.2977140844,
0.1664299965,
0.052876927,
0.2804612815,
-0.0771172196,
-0.0925079361,
0.0024871547,
-0.1493975818,
-0.2366425842,
-0.1870186776,
0.0621965528,
-0.137765035,
0.5223926306,
0.1237041652,
-0.0923640057,
-0.1227300093,
0.2812559009,
-0.1491717249,
-0.1853645891,
-0.1511609852,
0.1568151861,
-0.0947598442,
0.0086550787,
0.1222717613,
-0.1431023031,
0.0737314075,
-0.3464637101,
-0.1126490235,
0.0648132563,
-0.467001915,
-0.0562974028,
-0.0684907734,
-0.2799327075,
-0.1742826253,
0.3257151842,
-0.0579801127,
0.1904357523,
0.1309432089,
0.0974579304,
0.0092130825,
0.0978481472,
-0.2693905532,
0.0308333635,
0.0046318248,
0.2481785417,
-0.1455248594,
0.2779867947,
0.3345445693,
-0.0485472754,
0.0061092172,
0.020880986,
-0.2229346335,
-0.4015346169,
-0.1754587889,
-0.3120458126,
0.2402065992,
0.2327382118,
0.011830545,
-0.1296454221,
0.1328343153,
-0.3675982952,
0.3119072914,
-0.1483110487,
-0.1385408491,
-0.1938742995,
0.4634330571,
0.0824155062,
0.132925868,
-0.3347438276,
-0.4417124093,
0.1908192784,
-0.329641223,
-0.0624993294,
-0.0673098266,
-0.6913437247,
0.0400848016,
0.0445211828,
-0.1122875065,
0.2088789642,
0.1710990965,
-0.4651971757,
0.104198724,
-0.200391829,
-0.3963651061,
0.1534628719,
-0.2286745906,
0.214286685,
-0.0842429549,
0.4892988801,
0.036602594,
-0.1764852107,
0.0690185726,
0.405618012,
0.0476470478,
0.0649266988,
0.1994919479,
0.2082215548,
-0.100464493,
-0.0953536183,
-0.0311935581,
0.2300291955,
0.1409670562,
0.0056997761,
-0.0579595566,
0.1789646298,
0.0268169977,
0.0631053001,
-0.3733069599,
0.4113068879,
-0.3832027316,
-0.1537825018,
0.0186026841,
-0.1228374094,
-0.0743718669,
-0.1507575661,
0.1481106579,
-0.1434401274,
0.1585223973,
0.3084121943,
-0.1017344296,
0.3747661412,
-0.3540121317,
0.2607420981,
-0.1475555152,
-0.2778929174,
0.1260588765,
0.0078660976,
0.0648227334,
-0.0456088036,
0.2205124944,
0.1937395632,
0.2955666184,
0.2332068682,
0.1198237389,
0.278822273,
0.04006375,
0.0992880166,
0.0858442783,
-0.1198738366,
0.0092497617,
-0.1813762188,
0.0222155564,
0.2317917794,
-0.3626889288,
0.143701151,
0.2026199698,
0.2773589194,
-0.2206279933,
-0.1910680979,
-0.5655443072,
-0.4531567693,
-0.0762027055,
0.0453595594,
-0.1780553758,
0.0915171728,
0.5150851011,
0.1038600132,
0.0137921497,
0.1103625819,
-0.0746414065,
0.3941476643,
-0.2792815864,
-0.0394744687,
-0.1317640245,
-0.1765996516,
0.0203455333,
0.2772712708,
0.1195707321,
0.1093557924,
0.5857252479,
0.0744349062,
0.0695961118,
-0.6109539866,
-0.298368156,
-0.0311365612,
0.0372673534,
0.1495422125,
0.08542265,
-0.0270605795,
-0.3043858409,
0.032549642,
-0.0417544506,
-0.0985048562,
-0.1936567873,
-0.1042861938,
0.1357040405,
0.2669231594,
-0.1313283741,
-0.2455849349,
-0.1122040674,
-0.005250752,
0.3367563486,
-0.1136647835,
0.162663728,
-0.3023938239,
0.0167213939,
-0.1321526468,
-0.0836809427,
-0.1281005144,
-0.2123142034,
-0.286913693,
0.0213602968,
0.0162557699,
-0.1465836763,
-0.1533123404,
0.1851412952,
-0.200535506,
0.4018159807,
0.011475794,
-0.3118756115,
0.1534087807,
0.507643342,
0.0489151701,
0.0520672873,
0.3560240567,
0.3535313308,
-0.0741011649,
0.0246504918,
0.0310235396,
-0.1591765136,
0.1633945256,
0.0025985911,
0.07697694,
0.1382022798,
0.2860572934,
0.4721867144,
0.2066884488,
-0.0952023417,
0.1265110075,
-0.0693734884,
0.2181540728,
0.0455580205,
-0.3102404475,
-0.1662704945,
-0.3074214458,
0.187479496,
0.4478244781,
0.1748808175,
-0.2337746918,
0.1441047937,
-0.233210966,
-0.5569918752,
-0.219641313,
-0.007938209,
-0.1678029001,
0.3260243237,
0.0846033022,
-0.3632077277,
0.0090634301,
-0.1497917175,
-0.0940441787,
-0.1068415269,
0.2615232468,
-0.2522055507,
-0.1510204822,
-0.4240186512,
-0.124703452,
0.2552507818,
0.1949158013,
-0.0751073509,
0.2008883059,
0.182667166,
0.2519541979,
0.0984334052,
0.6468616724,
-0.1492333859,
-0.2107221484,
-0.0603854358,
0.0109378099,
-0.0572138429,
0.0634218901,
-0.0763698518,
0.06608437,
-0.0949915349,
-0.1192446277,
-0.1999767423,
-0.0821862817,
0.521083653,
0.391253829,
-0.1593157351,
-0.3596799076,
0.0358035415,
-0.3132456243,
-0.2835783362,
0.1139167845,
0.0217585862,
-0.0557774976,
-0.0976581424,
0.0525504947,
-0.0164307263,
0.0300416872,
0.3727794588,
-0.0867570415,
-0.0055878889,
-0.0923462212,
0.2851486206,
0.0504658595,
-0.2362451404,
0.5697202086,
0.4987104535,
-0.1559572518,
-0.2272203416,
-0.5975427628,
-0.4074415267,
0.4083676934,
0.0544861816,
0.0111147873,
0.4816337228,
-0.2928212583,
-0.0611239932,
0.0185559615,
-0.4915010333,
0.1985457093,
-0.1483791023,
-0.2121208906,
-0.2890118361,
0.2951411009,
0.2490939498,
-0.1999500394,
0.0702198967,
0.2622960806,
-0.1759201288,
0.1031374484,
0.0268728957,
0.8997113705,
-0.1537869573,
0.0391390733,
-0.1291901469,
-0.2764852047,
0.3032194972,
-0.0598268881,
0.0454573594,
-0.1890162528,
-0.2673986256,
-0.0778642967,
0.092576623,
0.2458870411,
0.4782502353,
0.1129979193,
0.1543110907,
-0.1317538321,
0.1419730932,
0.3370567858,
0.2129841149,
0.0325273722,
0.1623694599,
-0.1697062999,
0.1479341835,
0.1216153428,
-0.4452354312,
-0.1877200603,
0.1676515043,
0.3555828631,
-0.0666628107,
0.0445275903,
-0.3174159527,
-0.0347612202,
0.2446347773,
-0.0071866512,
-0.3055076897,
-0.0170851126,
-0.0873994082,
0.0232437588,
-0.1431645751,
0.0386561751,
-0.0224847384,
0.4205989242,
0.4071328044,
0.0298158266,
-0.084845975,
0.2570125163,
0.0094526485,
-0.2883402109,
0.0997738689,
0.3497152627,
-0.3559152484,
-0.2147189081,
0.1591344774,
-0.2184224427,
-0.1804960221,
0.1551721841,
-0.0712403804,
-0.0580592006,
-0.3316576183,
0.1704321057,
0.1180436015,
-0.0996865034,
0.6222679615,
-0.145157069,
0.0775385201,
-0.2983396351,
0.0324798748,
0.5118438601,
-0.203154549,
-0.0017208769,
0.1107376516,
-0.3159991801,
-0.1827515364,
0.2060247213,
-0.0038201995,
-0.3440488875,
0.115119949,
-0.0865317658,
0.4295627773,
0.2392294407,
-0.2274761945,
-0.09827362,
0.0113094375,
-0.071635589,
0.0187309459,
-0.1199151278,
0.1719382703,
0.4926501811,
0.2791412175,
0.1893622279,
0.2254904807,
-0.010536626,
0.1215112209,
-0.3703797162,
0.4481425285,
0.1095801815,
0.3079476357,
-0.0832733065,
0.1583909392,
-0.295414567,
-0.3457024992,
0.1549722254,
0.020154465,
0.3334085643,
-0.335487932,
-0.1186095402,
0.0778183788,
-0.1121976897,
0.1648176014,
0.1211891919,
0.0708629638,
0.0310247056,
-0.0064481702,
0.1450165808,
0.1954201013,
0.1516327709,
0.021990478,
0.6954900026,
-0.3684905469,
-0.3162459135,
0.0467087179,
-0.1004606783,
-0.0085437112,
0.2305116653,
0.007272711,
-0.0876680389,
0.1252837777,
0.0593233407,
-0.0296629146,
0.165449813,
-0.4229681492,
0.2478305101,
-0.0688031539,
-0.1274457574,
-0.1567017287,
0.5310268402,
-0.0192128494,
-0.1377566457,
-0.1361899823,
0.1865353286,
0.2113355547,
-0.5376394987,
-0.0772431046,
0.3420592844,
-0.1656555235,
0.0484617278,
0.3049325347,
0.0320762545,
0.2197634876,
-0.0184644982,
-0.0835451856,
0.2788000107,
-0.1496604979,
0.1379195005,
0.2400129139,
0.2825616598,
-0.2172234207,
0.2884016335,
0.0495564677,
-0.0538609885,
0.1368465722,
-0.1109050363,
0.1620570123,
0.0565384477,
0.012984015,
0.2799028158,
0.0169336796,
0.0616246834,
0.2446557134,
0.0434481166,
-0.097176224,
0.3055137098,
0.1565425545,
0.3416390121,
-0.0264827199,
0.0217283815,
0.2720404267,
0.0625353009,
0.1540867984,
-0.0740806162,
-0.2136196196,
-0.0782185197,
-0.064603731,
-0.1890469193,
-0.3106630743,
0.3977771401,
0.1065496281,
0.1259818673,
-0.3896439075,
0.3826610446,
-0.0735547543,
0.2179979533,
-0.0860809833,
-0.3578411341,
0.1943043768,
-0.0324579217,
0.0880389884,
0.4262212515,
0.2487999648,
-0.0439272039,
-0.2069269419,
0.0492282398,
-0.4595759809,
0.1220458746,
0.0760365278,
0.1318108737,
-0.0749090612,
-0.0174437016,
-0.1294482052,
0.1688017249,
-0.0743671209,
0.10674797,
0.2290675491,
-0.1014800519,
-0.7163106799,
0.1947495341,
0.2168850452,
-0.4372050166,
0.2104268223,
-0.0665784776,
-0.0675299913,
-0.0037527606,
0.4338000715,
0.1405687481,
-0.1521218419,
-0.0515958145,
0.1071066111,
-0.0179616082,
0.205242604,
0.377918303,
0.183556661,
-0.2155326903,
0.0132898539,
-0.5778458714,
-0.0691290572,
-0.4157993495,
0.0295880064,
0.5652522445,
-0.0484477058,
-0.0484681875,
0.3098571301,
0.0799077004,
0.0138320588,
-0.1534743458,
0.2666596472,
-0.30079934,
-0.0290299002,
-0.0654779673,
-0.1326018125,
-0.2107749283,
-0.2510818243,
0.181397289,
-0.3836818039,
-0.017537117,
-0.2416159362,
-0.0566138253,
0.4530104101,
0.1486596763,
0.2132157534,
0.0342440307,
0.4056187272,
0.2609453201,
0.063666068,
0.185246855,
0.1711772978,
-0.2430463433,
0.4706925154,
0.1666076481,
-0.178531006,
-0.0617739968,
-0.3375508189,
0.2445052862,
0.2603078485,
-0.1194972619,
0.0688637793,
-0.1194408983,
-0.135875985,
0.1132175848,
0.0888072103,
-0.1549824476,
0.1614750922,
-0.2481970191,
0.3061467409,
-0.2263026237,
-0.3050387204,
0.2326825261,
-0.2734933496,
-0.0349010192,
-0.2624464631,
0.1766581237,
-0.0643001199,
-0.2301066071,
-0.365023613,
-0.1018801033,
0.4784151614,
-0.0784606859,
0.1206107438,
0.4608334005,
0.0331138931,
-0.0399202928,
-0.0932518169,
-0.0537027158,
-0.0345106907,
0.1175372824,
0.1016295478,
-0.3563200235
] |
https://github.com/huggingface/datasets/issues/2514 | Can datasets remove duplicated rows? | > Hi ! For now this is probably the best option.
> We might add a feature like this in the feature as well.
>
> Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ?
> Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases
Great if this is can be done. Thanks!!
Not sure if you are asking me. In any case I don't know of any unfortunately :( in practice if data is really large we normally do it with spark (only for info. I understand this is not useful in developing this library..) | **Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no | 119 | Can datasets remove duplicated rows?
**Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no
> Hi ! For now this is probably the best option.
> We might add a feature like this in the feature as well.
>
> Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ?
> Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases
Great if this is can be done. Thanks!!
Not sure if you are asking me. In any case I don't know of any unfortunately :( in practice if data is really large we normally do it with spark (only for info. I understand this is not useful in developing this library..) | [
0.101298362,
-0.1910532266,
-0.139270246,
0.2864696383,
0.0751885846,
0.203661263,
0.2715581954,
0.0986694694,
-0.3335004449,
-0.0163342431,
-0.0008100793,
0.2826297581,
0.0401865356,
0.197771728,
-0.024946643,
-0.0297987387,
0.1026340127,
0.1306527108,
-0.1036723927,
0.0501255095,
-0.0256589651,
-0.146569863,
-0.2704994977,
-0.1782125831,
-0.4471101165,
-0.0617120788,
-0.482965976,
-0.0588314198,
-0.158778891,
0.0186243653,
0.2496168762,
0.506991446,
0.0081409477,
0.3449680507,
-0.0001065691,
-0.4029148817,
-0.0071388949,
0.1132890731,
-0.1967678815,
0.0577062778,
-0.2064544559,
-0.0378360674,
0.0811135918,
-0.0923915505,
0.0455435365,
-0.2710401118,
-0.309234947,
-0.2610732019,
0.1535584778,
0.0755507052,
0.2574926913,
-0.064240247,
-0.2274292409,
0.0427544564,
0.1963111758,
0.5021435618,
-0.1407868117,
0.2988497615,
0.5304871202,
-0.0445953235,
0.1433535367,
0.0672995299,
-0.11134886,
0.1386646181,
0.2907040715,
-0.1952320933,
-0.2926006913,
-0.1928341985,
0.2041080296,
0.3246283829,
0.8173854351,
-0.4910623133,
-0.282320559,
-0.1588139832,
0.4048905373,
0.0392115265,
-0.088346757,
0.0993426293,
-0.0085496828,
0.0695748329,
-0.3531999588,
-0.5799797773,
-0.1640010774,
-0.1828126311,
0.0733935237,
-0.441757977,
0.0995517373,
-0.0448228158,
0.1841218472,
-0.0781925172,
0.3813768923,
-0.163251251,
0.1593033075,
0.4425400794,
-0.4141801298,
-0.3620019555,
-0.2003976405,
-0.0943413228,
0.3296690583,
0.1987356991,
0.3466754556,
-0.0675839409,
-0.1132861674,
0.2721819282,
0.3223303556,
0.0195967034,
-0.1558398902,
0.0113170557,
0.1128348708,
-0.1993381083,
-0.2604492307,
-0.0415462665,
-0.0300453771,
0.2280075401,
0.3002119362,
-0.0754929036,
0.0775924101,
-0.3900251389,
-0.2964451015,
0.0931488127,
-0.2986606359,
-0.1495648324,
-0.0994156003,
-0.129501462,
0.0868141204,
-0.1445711404,
-0.0661542788,
-0.1551332027,
-0.2972077727,
-0.227149725,
-0.0256303269,
0.1597303748,
-0.223503828,
-0.0066861995,
0.3262158632,
-0.2521711886,
-0.0575284325,
0.2420903444,
0.1999290586,
-0.1301858872,
0.3419538438,
-0.2848269939,
0.0834752172,
-0.0906564444,
-0.2567923069,
-0.2523035407,
-0.2064597309,
0.1417126656,
-0.091676861,
0.4854810238,
0.129681021,
-0.093227759,
-0.1475788355,
0.2590627968,
-0.0467089675,
-0.106552124,
-0.2730348706,
0.2472011447,
-0.1362902671,
0.0149163678,
0.1113037914,
-0.0092501976,
0.1134476289,
-0.2967495024,
-0.0482335277,
0.204947263,
-0.5000965595,
0.0429927707,
-0.1776578724,
-0.294242382,
-0.0986085758,
0.4649657011,
-0.0501376465,
0.0564431697,
0.0138204619,
-0.0734153315,
0.0800507888,
0.0723870695,
-0.1646425724,
0.3385248482,
0.0167543292,
0.1923592091,
-0.1407323927,
0.440646112,
0.3836032748,
-0.0312119909,
0.1031770706,
0.0156771131,
-0.249823004,
-0.3883447647,
-0.2344843447,
-0.4616600871,
0.2157371342,
0.0939400196,
0.1487677991,
-0.032365799,
0.1957757324,
-0.0963868052,
0.1839364469,
-0.0687403232,
-0.0946717262,
-0.0008344352,
0.4486304224,
0.1039021611,
0.1751071513,
-0.3972981572,
-0.3710740507,
0.0808524415,
-0.1925427467,
-0.1053729355,
0.2508819401,
-0.6575386524,
0.171053201,
-0.1175082251,
-0.0220813043,
0.1245758384,
0.1292588264,
-0.4144191742,
0.0347934142,
-0.3078161478,
-0.2813328803,
0.229851827,
-0.3113639951,
0.032475438,
-0.2253489196,
0.41577667,
0.1745208651,
-0.0179055966,
0.1903281659,
0.3661200404,
-0.034599416,
0.0753780603,
-0.0093811098,
0.1028032005,
0.1476318538,
-0.003696803,
0.187470898,
0.2373099625,
0.215112865,
-0.0731162876,
0.0110310819,
0.3312470317,
0.1400050223,
-0.022834301,
-0.4782251418,
0.1685676873,
-0.5081925988,
-0.1461954415,
0.0462403744,
-0.0886551365,
0.0201871619,
-0.1640035212,
0.1715239882,
-0.1282509118,
0.1904503107,
0.1697266698,
-0.1296028048,
0.3815736771,
-0.4475439787,
0.0641821995,
-0.1406338364,
-0.1185541078,
0.0377798527,
0.0418273024,
-0.0185643025,
-0.1150995046,
0.3880047202,
0.3194037676,
0.3859786987,
0.2076180279,
0.162847057,
0.2141688913,
0.3135329783,
0.0956349969,
0.1016093269,
-0.1003506184,
0.0071906783,
-0.1843216717,
-0.1023380086,
0.21576491,
-0.3473795652,
0.0111866891,
0.2527471483,
0.2058583498,
-0.0462607443,
-0.2968866229,
-0.5272916555,
-0.6229698658,
-0.1058492661,
0.2558297515,
-0.1789134741,
0.1530617476,
0.4257557988,
0.1220299006,
0.1268967986,
-0.0463795103,
-0.1135760248,
0.61145854,
-0.2947299778,
-0.1177481785,
-0.0578325838,
-0.0651275665,
-0.0194141567,
0.2763375938,
0.1898469776,
0.3241820037,
0.7310888171,
0.2817602158,
0.1069164872,
-0.6828425527,
-0.3100989461,
-0.1548413634,
0.022071125,
0.2122169137,
0.1046080738,
0.0073589832,
-0.137003988,
0.0865821093,
-0.1891389787,
-0.035715308,
-0.1473562121,
-0.266533345,
0.2026571035,
0.1801407486,
-0.1981698275,
-0.2760497332,
-0.0062434543,
-0.2233168036,
0.3453074694,
-0.2187124789,
0.1618306041,
-0.4644886553,
-0.0877310261,
-0.0700933188,
0.1799728572,
0.0134254806,
-0.2804413438,
-0.27592659,
-0.0374961793,
0.0590812787,
-0.2052407414,
-0.0942783877,
0.2906416655,
-0.0165990293,
0.3591822088,
-0.2501955628,
-0.215451926,
0.050895296,
0.1491319239,
0.0574434064,
-0.006402703,
0.2411808223,
0.2258654833,
-0.0641690493,
0.0476741642,
-0.1351561993,
-0.1079880521,
0.0796848983,
0.0920588225,
0.210448578,
0.2346978486,
0.1868862063,
0.3986666799,
0.4363940954,
-0.0304671451,
0.1008329391,
0.1341675073,
0.1313814968,
-0.0042360835,
-0.3950914145,
-0.0240606684,
-0.2811254263,
0.0778110474,
0.4160497785,
0.1726763248,
-0.2761065066,
0.010827817,
-0.4355362654,
-0.1743418574,
-0.206657663,
-0.0830262899,
-0.5281804204,
0.2518496215,
-0.0584767461,
-0.2659345567,
0.0218992457,
-0.0675445646,
-0.0927627757,
0.0153092705,
0.3267207146,
-0.2318803966,
-0.1968443692,
-0.3175486028,
-0.1894105077,
0.2490171045,
0.1273400784,
0.126067996,
0.0645547509,
0.286290288,
0.2849065959,
0.0944534615,
0.5072616935,
-0.1550371796,
-0.3747444451,
-0.0297641605,
-0.1918337047,
0.142360419,
0.1936910897,
-0.0345423669,
0.1590634882,
0.0462305546,
0.0104220752,
-0.2269630283,
-0.2246125191,
0.3740513027,
0.4223035574,
-0.204880923,
-0.384765178,
0.2303042263,
-0.2099767029,
-0.3856250048,
0.1169314235,
-0.0015918463,
-0.1818374246,
-0.0545130149,
-0.2308936417,
-0.0752638802,
-0.0534934253,
0.5534109473,
-0.2494470775,
-0.0452382527,
-0.1618761271,
0.4126782417,
-0.0461914651,
-0.0647723824,
0.5135989785,
0.4399628639,
-0.2340793163,
-0.0955065936,
-0.3327073455,
-0.468721658,
0.4154407382,
0.0632599816,
-0.010544721,
0.6419349909,
-0.2069547474,
-0.1050459296,
-0.1951551288,
-0.363076359,
0.1463478506,
-0.0616197586,
-0.2987641394,
-0.4916356206,
0.1742485315,
0.2544906735,
-0.1544757783,
0.405405581,
0.2026756853,
-0.1384015977,
0.0683060437,
0.0626350194,
0.8880194426,
-0.1315448284,
-0.0210644715,
-0.5048198104,
-0.2182020843,
0.3203292787,
0.1101239473,
0.0369020626,
-0.1533002853,
-0.3402648866,
-0.0973494053,
0.08671128,
0.2498955131,
0.3294868171,
0.0319352373,
0.2788449526,
-0.0634563491,
-0.0170540363,
0.2026633322,
0.4478131533,
0.0420330912,
0.1184316054,
0.0272979625,
0.1520116478,
0.0843288302,
-0.3738180399,
-0.155431062,
0.1178783923,
0.4924119711,
-0.0143022761,
-0.1616538167,
-0.3362332582,
-0.066111818,
0.3038233817,
-0.1971487105,
-0.1846026182,
0.2987507284,
-0.1756711453,
0.0282929521,
0.1860210598,
-0.0497365519,
-0.0338163003,
0.3742716312,
0.342864424,
-0.0448882096,
-0.0347160324,
0.3155071437,
-0.0240451433,
-0.1775734723,
0.0328863822,
0.2792314887,
-0.4303010106,
-0.2020954192,
0.1069955304,
-0.1454862058,
-0.1505758464,
-0.0816992372,
0.0012096092,
-0.2756045163,
-0.2018070519,
0.1682782918,
0.309147507,
-0.0842485651,
0.6608371139,
0.0679012612,
0.0843942463,
-0.3240246475,
0.0801819861,
0.6168254614,
-0.3480918109,
-0.0158459563,
0.076467514,
-0.3589729369,
-0.2794746757,
0.0417126417,
-0.1506997943,
-0.2133917809,
0.2705877423,
-0.2612149417,
0.2985773683,
0.2992024124,
-0.3048180938,
-0.0682666749,
0.1192349643,
-0.0829763561,
0.0452655777,
-0.3097729087,
0.1152445078,
0.1627221704,
0.4415403306,
0.130417347,
-0.0959678441,
-0.1138586998,
0.3005701005,
-0.343850106,
0.4714670479,
0.068848215,
0.1904934943,
0.0782987103,
0.2368115336,
-0.3214197457,
-0.1811047643,
0.0666388273,
0.0794917196,
0.3810452223,
-0.2554197311,
-0.0792582706,
0.09592776,
-0.1776943356,
0.1848970056,
0.0697868168,
-0.1565337628,
-0.1252881289,
-0.049668856,
0.2326224446,
0.0428486913,
0.0793866515,
-0.0635467619,
0.4134473503,
-0.4536337256,
-0.4365442693,
0.2588056922,
0.1193439811,
0.0316156968,
0.2070860416,
-0.0543182231,
0.0982477516,
-0.0273257047,
-0.2776971459,
0.0722713843,
0.2129619569,
-0.4306279123,
0.2142938673,
0.1544846594,
-0.025642395,
-0.0029883198,
0.3490704,
0.055706121,
-0.0163679011,
-0.0679793283,
0.137809217,
0.1761341691,
-0.4282858372,
-0.0741738901,
0.3166076541,
-0.1787236035,
0.0123570561,
0.2967843711,
0.096459657,
0.3377547264,
0.0042387433,
-0.1560533345,
0.188648805,
-0.2589982748,
0.2207678705,
0.1989772618,
0.2766293287,
-0.239859879,
0.1741201729,
0.1463070661,
-0.0420256406,
0.2355798781,
0.0415933542,
0.2634001374,
0.3026798368,
0.0452106558,
0.3227914274,
-0.0349328034,
0.0739853084,
0.442825079,
0.0682912916,
0.0580404066,
0.2874361575,
-0.068339631,
0.2384700626,
-0.1309801489,
-0.0871747658,
0.2352378219,
-0.0565090626,
0.1907278746,
0.14858675,
-0.2084194571,
-0.150464192,
-0.0080810785,
-0.1395135522,
-0.055951573,
0.3512406349,
-0.0156347901,
0.1096003056,
-0.2197769135,
0.5052937269,
0.0266911499,
0.2342055738,
-0.1877645999,
-0.3179319799,
0.0719370767,
0.0776497275,
0.1111996323,
0.4749702215,
0.0632934645,
0.027170945,
-0.057073608,
-0.0331967771,
-0.2760204673,
0.1277460754,
0.1048714668,
0.3314169347,
-0.1079456732,
-0.0018259063,
0.0300678052,
0.0967407227,
-0.0053438134,
0.0893901512,
0.1831604093,
-0.093103677,
-0.786531508,
0.3493583798,
0.2298717499,
-0.3472647071,
0.0225216113,
0.0056212954,
-0.0517571084,
-0.1072737873,
0.5509379506,
-0.0814044103,
-0.1437779665,
-0.0513461567,
0.1184336245,
-0.2014710456,
0.2428553402,
0.3888444304,
0.1531117409,
-0.1822668016,
-0.0770740062,
-0.607568264,
-0.1002844498,
-0.148525551,
0.2064983249,
0.4242288768,
0.068670474,
-0.016047813,
0.1010088027,
-0.0390289575,
-0.2488712966,
0.002046641,
0.215596959,
-0.334415555,
0.0215904843,
-0.1229384989,
-0.1379567236,
-0.1229776293,
-0.3416821063,
0.1283522397,
-0.2221682817,
-0.0732398704,
-0.1079542488,
-0.027671501,
0.3466143012,
0.1421360821,
0.1150747165,
0.0356482044,
0.3848185241,
0.2009038031,
0.0643572956,
0.2148557603,
0.2523735762,
-0.1405182183,
0.313795656,
0.3568802476,
-0.0743016005,
-0.154035911,
-0.066898644,
0.2339361161,
0.3083656132,
-0.2212505639,
0.0382492319,
-0.2708303928,
-0.1847289801,
0.0084305629,
0.0594212525,
0.0863315761,
0.3143296838,
-0.2490260154,
0.1305452734,
-0.2227337658,
-0.0613358095,
0.2162168622,
-0.1443850994,
-0.039939303,
-0.3423180282,
0.2046394348,
0.120177947,
-0.226367414,
-0.4386421442,
-0.1585230678,
0.4443909824,
-0.1324951649,
0.1383077353,
0.493834883,
0.0098457374,
0.0560975969,
-0.1618195176,
-0.1014935076,
0.0371484049,
0.0918861106,
0.281891942,
-0.3022620678
] |
https://github.com/huggingface/datasets/issues/2511 | Add C4 | Update on this: I'm computing the checksums of the data files. It will be available soon | ## Adding a Dataset
- **Name:** *C4*
- **Description:** *https://github.com/allenai/allennlp/discussions/5056*
- **Paper:** *https://arxiv.org/abs/1910.10683*
- **Data:** *https://huggingface.co/datasets/allenai/c4*
- **Motivation:** *Used a lot for pretraining*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Should fix https://github.com/huggingface/datasets/issues/1710 | 16 | Add C4
## Adding a Dataset
- **Name:** *C4*
- **Description:** *https://github.com/allenai/allennlp/discussions/5056*
- **Paper:** *https://arxiv.org/abs/1910.10683*
- **Data:** *https://huggingface.co/datasets/allenai/c4*
- **Motivation:** *Used a lot for pretraining*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Should fix https://github.com/huggingface/datasets/issues/1710
Update on this: I'm computing the checksums of the data files. It will be available soon | [
-0.2586116195,
-0.2368935198,
-0.2156257629,
0.07441926,
0.2085536122,
-0.087480396,
0.1077218726,
0.3031298816,
0.0643012151,
0.323135674,
-0.2132709324,
0.0666776896,
-0.1542895287,
0.4332845807,
-0.0734491199,
0.0308050402,
0.0055631734,
0.2454855293,
-0.2516649961,
-0.0612389147,
-0.1237059236,
0.1600955278,
0.1151484922,
-0.3427096605,
-0.2370681614,
-0.028237164,
-0.0126360618,
0.2399480939,
-0.2678383589,
-0.2220923454,
0.1105904281,
0.2579704821,
-0.1301325262,
0.3192816973,
-0.0001002747,
-0.0244538561,
-0.0022873804,
-0.1104863733,
-0.0692490637,
0.2499467283,
-0.0230544731,
-0.0328950509,
-0.0620339736,
-0.104799971,
-0.3629560173,
0.012654718,
0.0622263402,
-0.1381945014,
0.368925333,
0.2271876931,
0.3632344604,
0.386916995,
-0.0194075555,
-0.1629914343,
0.1113212332,
0.0167697016,
-0.0871040002,
0.2593565881,
0.2584521472,
0.1209053621,
-0.2002435625,
0.284101367,
0.184780553,
0.0739730895,
0.1756888032,
0.0254422985,
-0.055046659,
0.0629207194,
0.0187195558,
0.0853793547,
0.1215295941,
-0.2831239998,
-0.3110687137,
-0.175632745,
0.0741554201,
-0.3809305429,
0.1468229741,
0.0236500241,
0.0082677342,
-0.0215164293,
-0.1706751883,
0.024088271,
-0.1968895048,
-0.0516158342,
0.1005557552,
0.0680276975,
-0.2644312382,
-0.2472832203,
0.2497014999,
0.0335759073,
-0.380304724,
0.1121621281,
-0.06707412,
-0.0589750782,
-0.0907468796,
-0.2901785076,
0.0382392406,
0.2546216249,
0.3078464866,
0.1262143552,
0.1025284976,
0.2484944165,
-0.0234189816,
0.1000334769,
-0.1276971549,
-0.0782610625,
0.0358931795,
-0.2585763931,
0.309581697,
0.1944137514,
-0.1259980351,
-0.1424465328,
0.0289673693,
-0.1575797349,
-0.0986097455,
0.0520869158,
-0.167792663,
-0.247550115,
-0.2214192748,
0.0771840066,
0.0888819173,
0.0077096745,
0.1176060438,
0.5735186338,
-0.0618298464,
-0.1944667995,
0.0046389922,
0.2758074105,
-0.1213819385,
-0.1446335912,
-0.3123089075,
-0.0546740703,
-0.2895222306,
0.022736771,
0.3508205414,
-0.0656063408,
0.3327206671,
0.0534066036,
0.2864613831,
0.1202825531,
0.1082647741,
0.0188669637,
0.1733445078,
0.0356123596,
-0.0004556403,
-0.2364005148,
0.1209372804,
-0.0725718737,
-0.0417090356,
-0.4723994136,
0.0708002001,
0.0765202865,
-0.2188249677,
0.3166132867,
0.0024370477,
-0.0092684142,
-0.0422470048,
0.0561761856,
-0.0712293908,
-0.186460942,
0.014460735,
0.1856624931,
-0.090241015,
-0.1852319837,
0.1604569554,
0.2504971325,
0.0348878652,
-0.1383182406,
0.2225318849,
-0.1801271737,
0.0053031929,
0.1121449769,
0.0546576269,
-0.1318763942,
-0.2068517208,
0.0868498832,
-0.0757230222,
-0.17916134,
-0.2858579755,
0.0691649765,
-0.1840792894,
-0.0118538961,
0.1742109954,
0.1349698305,
0.0025922507,
-0.1063931733,
-0.0471258424,
0.0593738742,
0.0134820919,
0.1410412192,
-0.2126967311,
-0.2363344431,
-0.154797405,
0.121625632,
0.142341882,
-0.1273559332,
0.2024533302,
-0.1252298057,
0.3256567419,
-0.3942756653,
0.061558038,
0.1828732491,
0.4015355408,
0.0219070297,
-0.193261683,
-0.1827530563,
-0.2574683726,
0.006263651,
-0.0590293035,
0.145152092,
0.0297115277,
-0.3581782579,
-0.088343516,
-0.2195278108,
-0.1305892766,
-0.0849127471,
0.3844879866,
0.2899779975,
0.0879075751,
-0.0343078673,
0.0201950222,
0.3061675131,
-0.1901516616,
0.0976372436,
-0.0789306015,
0.1960108876,
-0.1100703105,
-0.1417632699,
0.3407819271,
0.1319138408,
-0.0608003661,
-0.1108486056,
0.144361943,
0.3013297021,
-0.0395786166,
0.2133538127,
0.227040261,
0.4914597869,
0.0338229239,
-0.1589360535,
0.0062979553,
0.1531941295,
-0.0104622468,
0.0646911263,
-0.1888081878,
0.5184323788,
0.0301833339,
-0.1605614871,
0.2123944759,
-0.1512404382,
0.2263774872,
-0.173715964,
-0.0606888495,
-0.3493955731,
0.1980845332,
-0.0980959535,
0.2594584227,
-0.1316395253,
-0.4100784957,
0.0487896539,
0.2338220626,
0.1663602293,
0.170386821,
-0.0405133218,
-0.0363338627,
0.0802967697,
0.140196681,
0.1761389971,
0.213407442,
0.5047034621,
0.1331341565,
0.058897227,
-0.1254738569,
-0.1863912642,
0.1383116245,
-0.2588727176,
-0.0642817691,
0.2351439446,
0.0219161399,
-0.1701901108,
-0.6001666784,
0.0372483134,
-0.2497784495,
-0.0394538566,
-0.2543343902,
-0.0752417445,
-0.1240678728,
-0.249233216,
-0.1242170408,
0.0269255303,
-0.1130856574,
-0.1818075478,
0.1995168924,
0.1633024365,
-0.3851900101,
0.0591588542,
-0.2787407637,
0.2953506112,
0.0269861519,
0.0085842069,
0.0370012,
0.0854821503,
0.040805798,
0.2772706449,
0.2907308042,
0.0665359572,
0.6287950277,
-0.3146470189,
0.1830504239,
-0.2187590599,
-0.5036547184,
0.1665037572,
-0.1542674005,
0.1319327056,
0.21562168,
0.1723759621,
-0.0999764353,
-0.3396266103,
0.156720221,
-0.3860038221,
-0.3319839835,
-0.046469979,
-0.0542917103,
0.0138938129,
-0.3315371275,
-0.1770871878,
-0.0326984301,
-0.2762328684,
0.4101893604,
0.1199419349,
0.0139644882,
0.1550646871,
0.099447161,
0.1597023159,
-0.3217942715,
0.2671185732,
-0.3387694657,
-0.4841822386,
0.2318956703,
-0.3925535679,
-0.4123532176,
-0.1928910017,
-0.1043147966,
0.3161993623,
-0.0530862287,
-0.2953404188,
-0.2839136124,
-0.1251227409,
0.2562996149,
0.0690908432,
0.0794285163,
0.2865324914,
-0.0360677615,
-0.3148213923,
-0.2869903147,
0.0091244876,
0.343237102,
-0.2602679133,
0.0930615515,
-0.3781879246,
0.0193490349,
0.0591101423,
0.3250525594,
0.1804753989,
-0.2283664346,
0.3548694551,
-0.1520234495,
0.5535255075,
0.0695395395,
-0.1883888841,
0.2312801331,
-0.0045394152,
0.1252147108,
0.44020468,
0.1030633673,
0.0941186845,
-0.0408259071,
0.0296801031,
-0.3676125109,
-0.3207439184,
0.0620303303,
0.1089216098,
0.1617339998,
-0.1250069886,
0.058635734,
-0.1335462481,
-0.1395227909,
0.1339302212,
0.2203103602,
-0.0487965308,
-0.2848825753,
-0.3441628516,
0.0100542083,
-0.4193617702,
0.2949056625,
0.1592249274,
-0.0592814423,
-0.1573581994,
-0.1976355165,
-0.1458632946,
-0.1930571496,
0.3951096237,
0.0239374023,
0.1395501792,
-0.0657827035,
-0.1350123435,
-0.1307116449,
0.2956536114,
-0.390679121,
-0.1058888137,
0.2813066244,
0.3926395178,
-0.4702377319,
-0.0706680119,
0.0776194707,
0.1879816055,
-0.0025738329,
0.0136996917,
-0.18031165,
-0.0984496474,
-0.1680195332,
0.2098436654,
-0.1209869012,
0.1346727461,
-0.0937309116,
-0.1281522214,
0.0898433775,
-0.0872646272,
0.372099787,
0.2908614874,
0.2714121938,
0.1856373996,
0.1081399471,
0.0484059006,
0.1658588797,
0.3566213846,
0.3592708707,
-0.1186858118,
0.0882533789,
-0.1735044271,
-0.2214379162,
0.3014196754,
0.2030113041,
0.1486731917,
0.141575098,
0.0163740143,
0.1771241724,
-0.3032543957,
0.3258421421,
0.1457599699,
0.0752541274,
-0.0524988621,
-0.020620916,
0.1941464543,
-0.1415147781,
-0.0373852104,
0.2611513436,
0.4078721404,
-0.3011980057,
0.093732819,
0.2443813682,
0.8777467012,
-0.0046667848,
0.2176968902,
0.2962686718,
-0.3105142117,
0.1050283834,
-0.1164756566,
0.051380422,
-0.1365355998,
-0.3590021133,
0.0525876284,
0.0482213199,
0.0691624954,
-0.0005929042,
-0.1677505374,
-0.0689115822,
0.0936187506,
0.1628495753,
-0.1722351909,
0.0950141102,
-0.1619413346,
-0.1869975328,
-0.2368475795,
0.3349008262,
0.155903697,
-0.1940421462,
-0.1583414376,
-0.2405658811,
-0.0901219249,
-0.1532127708,
-0.0317371637,
-0.0857944265,
-0.2066099197,
-0.1015000641,
0.0833999962,
-0.0622991547,
-0.0720380619,
0.0582489558,
0.3871598244,
0.3838895857,
-0.2678079903,
0.1037070006,
0.0349542052,
0.0192258544,
-0.1153023466,
0.1006242111,
-0.0004586466,
-0.1532994807,
-0.0048642755,
-0.0906592458,
0.1995953321,
-0.3959477544,
0.0739672482,
-0.0694266558,
-0.3752851188,
-0.2290605456,
0.0389384031,
0.1117536575,
-0.1367266774,
-0.2934674025,
0.2787504792,
0.1051096618,
-0.114393577,
0.015720671,
0.3547440171,
-0.1251774877,
-0.252789408,
0.3834082186,
-0.1521927863,
-0.1380853057,
0.2241638452,
0.0676641315,
-0.2761641741,
-0.4785529971,
-0.2041914016,
0.1426137835,
-0.2338983715,
0.0328521058,
0.0920858309,
-0.2548296154,
0.0880375654,
0.2719172239,
0.305676043,
-0.0205093212,
0.205107078,
-0.0958160087,
-0.6194847822,
0.2811790109,
-0.0765739083,
0.4294382334,
-0.026386328,
0.4414273798,
-0.2109745145,
0.0565092638,
-0.5384542346,
-0.0210269056,
-0.3181414008,
-0.0798599049,
0.1433390081,
-0.1306789517,
0.3084123731,
-0.0928663313,
0.3257277906,
0.0914621502,
-0.3117187023,
-0.3644776344,
-0.1320673823,
0.0511494651,
-0.0996304899,
0.0106856525,
0.3214327693,
0.1851659864,
-0.1380699277,
-0.1665499955,
0.1431971192,
0.0987847894,
0.0346631035,
0.224277392,
0.2374430448,
0.0527478978,
0.108870402,
-0.2880389094,
0.084038727,
-0.0015570484,
-0.0754436404,
-0.1213697642,
-0.3290362358,
-0.1117809266,
0.5154304504,
0.3174785376,
0.1826005578,
0.0761365891,
0.1818928421,
0.0261962414,
-0.219498083,
0.3510785997,
0.4336694777,
-0.0402932055,
-0.0891640335,
0.1107378229,
0.1840313971,
0.4534438252,
-0.3457516432,
0.0680997521,
0.0552133173,
-0.0613624603,
0.3749155998,
0.2573202848,
0.0839183778,
-0.2434905171,
0.1740938872,
0.1419278681,
-0.1442548186,
-0.0210447758,
0.0100241713,
0.1906671673,
0.068726927,
-0.1367883384,
0.2694219947,
0.0267400704,
0.1927175671,
0.1791889369,
-0.1262066811,
0.2254704535,
-0.3400601745,
0.0581012852,
0.0377325639,
-0.0817447901,
0.0968949571,
0.2272136509,
0.0492977165,
0.1836007982,
0.1171765625,
0.5696302056,
-0.156578362,
-0.2025787681,
-0.359615624,
0.1760598719,
-0.2035919428,
-0.0836501941,
-0.137635529,
-0.2224753499,
-0.1705409437,
0.0411341637,
0.0798767209,
-0.0019956324,
0.1915550828,
-0.0354680754,
0.0658656061,
-0.2086835802,
-0.0682744831,
0.1018466204,
0.2579043508,
-0.179046616,
0.1622300744,
0.3193748593,
0.0281829797,
0.2234217972,
0.3514076471,
0.2412112355,
-0.0871996507,
0.0893331021,
0.1626978219,
-0.1762309372,
-0.0311367791,
-0.3607547581,
0.2241189182,
0.3361490369,
0.1975806057,
0.3792406321,
0.2971458435,
-0.3550037444,
-0.0402266569,
-0.0842022449,
-0.0679761544,
-0.0705575049,
0.162029162,
0.0212598555,
-0.084530063,
-0.1829675436,
-0.1626427174,
-0.461833626,
0.0602068231,
-0.0069877785,
-0.1328730285,
0.2082101107,
-0.0472461544,
0.1634314358,
0.1856045723,
0.5502735972,
0.0255937297,
0.1202687174,
-0.1698034108,
-0.4889597595,
-0.5210316181,
0.2235606462,
0.0629496425,
0.0278373733,
-0.3625487387,
0.0703041628,
0.4442745149,
-0.063520208,
0.2373723388,
-0.0352657028,
0.1218714714,
-0.0982068926,
-0.4115130603,
0.1512266546,
-0.0488003753,
-0.1151849702,
0.2564331889,
-0.1479371041,
0.0145486286,
0.0333205573,
0.3110306561,
0.0052456241,
0.1741113812,
-0.2488556206,
-0.1233886927,
0.3204118609,
0.008249281,
0.4328647852,
-0.5732754469,
-0.2378932834,
-0.1087393016,
-0.0136975441,
-0.1755242348,
0.033719819,
0.139236778,
0.5417927504,
-0.0298414547,
-0.1966590434,
-0.0242918916,
0.3196479082,
0.3039908707,
0.0287042819,
-0.1446599662,
0.3647100925,
-0.0003909245,
-0.2065257281,
-0.0516169183,
0.491520077,
-0.0658000559,
-0.0153526403,
-0.1639594287,
-0.3880120516,
0.5056561232,
-0.3207928836,
-0.0266805366,
-0.0344345942,
0.3556979895,
0.1834289581,
-0.2193897218,
-0.5304563642,
0.2442418784,
0.0832715034,
0.1025890261,
-0.1924139261,
0.3654031456,
-0.1686751246,
-0.1641022712,
-0.0059415773,
0.4586778879,
0.2416504025,
-0.2849209309,
-0.046581734,
-0.3411105871
] |
https://github.com/huggingface/datasets/issues/2508 | Load Image Classification Dataset from Local | Hi ! Is this folder structure a standard, a bit like imagenet ?
In this case maybe we can consider having a dataset loader for cifar-like, imagenet-like, squad-like, conll-like etc. datasets ?
```python
from datasets import load_dataset
my_custom_cifar = load_dataset("cifar_like", data_dir="path/to/data/dir")
```
Let me know what you think | **Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
| 48 | Load Image Classification Dataset from Local
**Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
Hi ! Is this folder structure a standard, a bit like imagenet ?
In this case maybe we can consider having a dataset loader for cifar-like, imagenet-like, squad-like, conll-like etc. datasets ?
```python
from datasets import load_dataset
my_custom_cifar = load_dataset("cifar_like", data_dir="path/to/data/dir")
```
Let me know what you think | [
-0.1711524129,
-0.1667462736,
0.031352967,
0.4532009661,
0.2632548213,
-0.0811185241,
0.2285080403,
0.0517845713,
0.3194643855,
0.2681330144,
-0.1980352402,
0.0934313089,
-0.334746182,
0.3943923712,
0.0378463194,
-0.2031166404,
-0.2279975265,
0.2942554355,
-0.1917820275,
-0.2173049152,
-0.0529891662,
-0.1112340912,
0.1236170977,
0.0195181053,
-0.2421072572,
0.1486361474,
-0.2809578776,
0.4919871092,
-0.1451514661,
-0.1026545167,
0.489280045,
0.0337605812,
0.3682652116,
0.6073809266,
-0.0001115616,
0.1082240716,
-0.1246428639,
-0.2912989855,
-0.1220244318,
-0.318472147,
-0.0028073117,
-0.1293972284,
0.2840099931,
-0.2369063497,
-0.4590674639,
-0.031031521,
0.0454268456,
-0.3836555183,
0.4092211425,
0.2136447281,
0.1300622523,
0.0714405403,
-0.4090711176,
0.0486207418,
-0.22430484,
0.568105042,
-0.1489500403,
0.4393533766,
0.3459991813,
-0.2117604613,
-0.0951591879,
0.1754907966,
0.0813864172,
-0.0121849738,
0.6244928837,
0.3266998529,
-0.2012629807,
-0.2279156744,
-0.1793521941,
0.1679527462,
0.2916376889,
-0.1329027265,
-0.1520918012,
-0.1528731585,
0.1039551124,
-0.1191773266,
0.0571649,
0.1517659724,
-0.4100266695,
0.2615832388,
-0.235424757,
-0.14853248,
-0.4728707075,
0.1664522886,
-0.0157126486,
-0.3108101487,
-0.1096827537,
-0.0335084125,
0.1107050776,
-0.0302020162,
-0.0637880564,
-0.0225579347,
0.1726935357,
0.5213355422,
-0.1483542919,
-0.2448641062,
-0.0624012239,
0.1635793447,
0.0854707956,
-0.1567990482,
0.1323320568,
-0.0657560378,
-0.4273363054,
0.0766007975,
0.1742500365,
0.0852660984,
-0.0694659576,
0.3597373664,
-0.1167032272,
0.0099346265,
-0.4018885791,
-0.1022833362,
-0.3766007721,
-0.0059973262,
-0.1649573147,
-0.0880271792,
-0.0829650015,
-0.0514034405,
0.2310632169,
-0.2127626985,
0.1315826625,
0.1782815456,
0.2259930819,
0.2244734764,
0.000382904,
-0.0224530045,
0.1043005735,
-0.0969309285,
-0.1879048049,
-0.011245925,
-0.1539771855,
0.1492158771,
-0.284630388,
0.1611147374,
0.0593349338,
-0.2404904366,
0.0239402503,
-0.2232359797,
0.4601965249,
0.1644294709,
-0.0332626812,
-0.1945622265,
0.2785152197,
0.2013732493,
-0.3364457488,
-0.1555515826,
0.3225754797,
-0.1244988963,
-0.2927465141,
0.091083914,
-0.4155611396,
-0.3023659587,
0.1320977807,
0.1275160164,
0.0541833341,
-0.118560791,
-0.4537302256,
0.0471442938,
-0.3906649053,
-0.0376894251,
-0.2005946636,
0.0031110588,
-0.3844122887,
-0.1122067645,
0.325561136,
0.499510318,
-0.3537166417,
-0.1935029924,
-0.2759791017,
-0.1226334721,
-0.0405499376,
0.3582924902,
-0.2825185955,
0.3609902561,
-0.2316223681,
-0.0004722178,
0.3596025109,
-0.6408891082,
-0.1602462679,
0.361123383,
-0.1468533874,
0.0834793225,
-0.1106667966,
0.4675811529,
0.0573205464,
-0.0437317714,
-0.1097149178,
0.7292588353,
-0.2461506873,
0.1003960073,
0.0783912987,
-0.34449476,
-0.0595199689,
0.3862074614,
-0.025586687,
0.2612336278,
0.0877622068,
-0.1202735156,
0.1105120927,
-0.240092963,
-0.016725108,
-0.0660725981,
0.2149086446,
0.2525713742,
-0.0356154926,
0.0856859237,
-0.3853400946,
0.3809301853,
0.0137659907,
0.2332105488,
-0.0894566774,
-0.0775723681,
-0.1049791127,
-0.1797708422,
-0.2935764194,
-0.0740472674,
-0.0191341937,
0.0974871069,
-0.0879436061,
-0.1982381046,
-0.3646780252,
0.3607049882,
-0.4032904506,
0.146089673,
0.1556633264,
0.1872359961,
0.1924533844,
0.0663263276,
-0.2258825004,
0.0304026362,
-0.1710556895,
-0.216335088,
-0.0901055783,
0.1741504967,
0.1317848563,
0.2255438864,
0.2103807628,
0.191141054,
0.2752168179,
-0.2569105625,
0.0800210163,
-0.0953986198,
0.3030810356,
0.0504755676,
-0.2694002688,
0.4733869433,
-0.0346193127,
0.265086323,
0.1230628043,
-0.1807813942,
0.0388386399,
-0.1177835092,
0.0074157119,
-0.0695325434,
0.1119446754,
0.4586135745,
0.3327571452,
0.243303597,
-0.1677211523,
-0.2217966467,
-0.088011086,
0.0076384991,
0.0139187891,
0.2951627374,
0.0542376414,
0.309399724,
-0.0272909515,
-0.1097019538,
0.5220650434,
0.0971357524,
-0.1485694498,
0.1968316436,
0.1740428805,
0.0449787751,
0.0066721998,
-0.0037081093,
0.1470156312,
0.0109730866,
-0.0192596707,
0.1900919676,
-0.3261588216,
-0.2001761198,
-0.2250066251,
-0.0429199822,
-0.0188867375,
0.3271227479,
-0.0284522884,
-0.4352129698,
-0.2229121625,
-0.1485522091,
-0.0564318188,
0.4121333957,
-0.0265576392,
-0.1437771171,
-0.0114056766,
0.0061252862,
0.0188561156,
0.7483345866,
-0.0273527168,
-0.5523811579,
0.1248901412,
0.0192501433,
-0.145324558,
0.0816014558,
0.2255043685,
-0.0599973463,
0.3380978703,
-0.0557871014,
0.0297197253,
-0.2399782836,
-0.2019123137,
0.2341752499,
-0.0794294178,
0.3294305205,
0.0342180282,
0.2260847539,
0.0151084587,
-0.230215773,
0.2885737419,
-0.0619156361,
-0.2701320052,
-0.3402598202,
0.1675588042,
0.3559238911,
-0.1829325855,
-0.2913973331,
-0.6088712215,
-0.3206723928,
0.2787880599,
0.416488111,
0.2521069944,
0.2307675928,
0.1515020579,
-0.0546731353,
-0.1698649377,
0.0696597844,
0.1167345196,
-0.5177241564,
0.0358617678,
-0.2100634277,
-0.2204993963,
-0.2387839258,
-0.2466603965,
0.1457768381,
0.0720842481,
-0.384516567,
-0.2613415122,
-0.0408324525,
0.1592837274,
-0.0618201606,
-0.0013889354,
0.1672934741,
-0.0954540297,
-0.0235283524,
0.0389557481,
0.2476974726,
0.0794439316,
0.0094007105,
-0.1864801645,
0.1917173564,
0.1555675864,
-0.1275318861,
0.4102590382,
-0.0690623969,
-0.208833918,
0.4698213041,
-0.2183327526,
0.252311945,
-0.5016579032,
-0.5047842264,
0.2008979917,
0.2034909278,
-0.3791692853,
0.2592872083,
0.3521592617,
-0.0071071256,
-0.3364824057,
-0.1287148148,
-0.0697977915,
-0.2419342697,
0.3536167145,
0.2839042246,
0.3354140222,
-0.4179281294,
-0.1929781735,
-0.1943463981,
-0.0567978807,
-0.0406873524,
0.6717272401,
0.1609266102,
0.0094621964,
-0.3218970001,
0.2331465632,
-0.009168949,
-0.0332697257,
0.199197948,
-0.1552211642,
-0.1863543391,
-0.050049711,
0.0616951361,
0.1646848917,
0.3063274026,
0.0745864362,
0.1010865271,
0.125138849,
-0.4726449251,
-0.169032976,
0.095772244,
0.1085044444,
-0.160537675,
-0.2302184999,
0.6902585626,
0.075645715,
-0.3655422032,
0.1751871407,
0.17503874,
-0.3738023937,
-0.1013867408,
-0.1717063785,
0.0359934121,
-0.2495565712,
-0.0382316113,
0.0375482589,
0.2471784651,
0.321349442,
0.1070401818,
-0.1904524267,
-0.0473847352,
0.1418730319,
-0.0774637163,
0.0356821418,
0.2747858763,
0.2058424503,
0.215074122,
0.3199416101,
-0.0552338883,
0.5318437219,
-0.2067219466,
-0.4484454989,
-0.0082831588,
0.0992643312,
0.3700361252,
0.3551434577,
0.1360485405,
-0.0077105947,
0.0238096975,
-0.0558499023,
-0.7978022695,
0.5541272759,
0.0784002095,
-0.1719646454,
0.0020039156,
-0.4529388547,
0.5468379855,
-0.0532988459,
-0.0842843503,
0.1839753091,
0.2237270772,
-0.3484927416,
0.130499661,
0.3636845946,
1.0036211014,
-0.2000193149,
0.5979270935,
0.1882563382,
0.3165777922,
0.1871586144,
0.2571654916,
-0.1189419627,
-0.1989306659,
-0.3950670362,
-0.1318370104,
-0.1330114305,
0.148886621,
0.1190441847,
0.1053665504,
0.1067567766,
-0.1086651534,
-0.0392312258,
0.0464437157,
0.2183546424,
0.0208844487,
-0.5506272912,
-0.2668249607,
0.1397693455,
0.1630827039,
0.3775496781,
-0.0552519225,
-0.0429413244,
-0.0772999004,
0.0099429265,
-0.0043947101,
-0.1391949952,
-0.1740023345,
0.0335314609,
0.0126943439,
-0.2328245491,
-0.0502983741,
0.3883976042,
0.2344044894,
0.0964229405,
-0.0383393802,
0.1355281472,
-0.3317180276,
0.19218041,
-0.0705680549,
-0.2202102393,
0.3999598026,
0.0428436846,
0.0266044587,
-0.1041101813,
-0.042927973,
-0.434578836,
-0.0305895954,
-0.0844626874,
0.6611813307,
-0.2210623324,
-0.180644542,
-0.1703479588,
0.0149895996,
0.2041856945,
0.1152870804,
0.2015034556,
0.0900539309,
-0.0656379908,
0.2074519992,
-0.2563243508,
0.0653493926,
0.1979352236,
0.0860575736,
-0.4300831854,
0.2644722462,
0.0282170922,
0.1034592837,
-0.2177565843,
0.5871707201,
0.6104702353,
-0.0557037741,
0.0996853709,
0.26357463,
-0.1479200125,
-0.1274321973,
0.7271056771,
0.3650840819,
-0.3910201788,
-0.2315896749,
-0.207519263,
-0.5043407679,
0.1877872348,
-0.2077358663,
0.2692263722,
-0.0096118599,
0.0223330855,
0.1949770898,
-0.0040620938,
-0.3121486902,
0.1485974193,
-0.1957097352,
0.0460950434,
0.445979774,
0.205648154,
0.3248222768,
0.0021926574,
0.0678552538,
-0.0865041018,
-0.1329452246,
-0.1138898283,
-0.2136780769,
0.1644245982,
0.0822074115,
0.1318350434,
0.0325373374,
-0.2356373221,
-0.1330018193,
-0.1140094399,
0.1053071469,
-0.0979826748,
-0.1127383858,
0.1572508812,
-0.2052235901,
0.0462917425,
-0.1604260355,
0.2952700257,
0.0089542978,
0.3124405742,
0.2140682191,
-0.3142930865,
-0.1873661578,
-0.2776601315,
0.2408556938,
0.1674013287,
0.1792430729,
-0.0307548288,
0.2105467021,
0.1559765786,
0.2315227538,
0.0817588568,
0.3380714059,
-0.1454691142,
-0.2125448287,
0.1547467113,
0.4487445354,
0.1892139763,
-0.1692368537,
-0.2411857992,
-0.1099907309,
-0.1559244245,
0.1897256523,
0.367754072,
-0.2745052576,
0.3570898473,
-0.2224763334,
-0.1835070997,
0.2273591608,
0.1385714859,
-0.0709573925,
0.1136433631,
-0.2601017654,
0.0836562067,
0.157111764,
0.2050439119,
0.1487437189,
0.4492584169,
-0.4987840652,
0.2104024887,
-0.4103267491,
0.0532917902,
0.3693914115,
-0.3706341386,
0.0909094587,
0.005235523,
0.1692734212,
0.0678851306,
-0.377476573,
0.2427134812,
-0.2050590664,
-0.2998978794,
0.0458187014,
0.0883684009,
-0.0854750052,
0.033792749,
-0.4702093601,
-0.0412394032,
-0.1352409273,
0.1471665204,
-0.1011157185,
-0.2601193786,
0.0451041088,
0.1402022839,
0.2343097031,
0.2619284987,
-0.1562953293,
0.2496562898,
0.0728595704,
-0.0985256881,
0.1705280989,
0.0140765309,
0.19737719,
0.2325738966,
0.3065913916,
-0.2564779818,
0.4207337499,
0.0622000098,
0.2470007837,
-0.1252540797,
-0.1160263121,
-0.066389963,
-0.1322397441,
-0.2821484506,
0.2717030346,
0.1526797116,
0.1508155465,
-0.1591505259,
0.1688972861,
-0.1398804337,
0.1339811683,
-0.5048725009,
0.3854017854,
0.3395006955,
0.1274988055,
-0.2040968686,
0.2874662876,
-0.3802792132,
0.1660720706,
0.2698232234,
0.0666697174,
0.1398975253,
0.2488579005,
0.0307345204,
0.1064171046,
0.6256430745,
0.1565339565,
0.058062546,
-0.4024633467,
-0.2386449724,
-0.5080853105,
0.0719946846,
0.0885117948,
-0.3129581809,
-0.0073910523,
0.0532940999,
0.2365839928,
0.3540361822,
-0.1684106886,
-0.2577151656,
0.1331724524,
-0.0545122027,
-0.2838407755,
-0.1130410582,
0.2317338586,
0.2961946428,
0.0627538785,
-0.3775098324,
0.1264813095,
-0.239835307,
0.0668148622,
0.2509345412,
-0.107364431,
-0.2066173106,
-0.1168395877,
0.3551854491,
-0.1814096421,
0.1029652506,
0.0332702547,
-0.0983117074,
-0.1111630425,
-0.0830923691,
-0.2492655218,
0.004051568,
0.0883746818,
0.4344703555,
-0.4324679077,
0.1266243458,
-0.5154184103,
-0.1808874309,
0.1386322677,
-0.1103626937,
-0.2050597668,
0.0371080637,
0.0302585512,
-0.0312009379,
0.009301085,
0.4774013162,
-0.2749959826,
-0.2616229057,
-0.2650995851,
-0.1257017255,
0.5387347937,
-0.3954185545,
-0.1003000736,
-0.0282266643,
-0.0324405283,
-0.0426292159,
0.1789045483,
-0.0998635963,
0.2147546411,
0.2795606256,
0.0839395225,
-0.1748628467,
0.2535270751,
0.1491099298,
-0.0945382342,
-0.0824440718,
0.1646547616,
-0.0835352689,
0.1062403694,
-0.0935261399,
-0.3627170324
] |
https://github.com/huggingface/datasets/issues/2508 | Load Image Classification Dataset from Local | @lhoestq I think we'll want a generic `image-folder` dataset (same as 'imagenet-like'). This is like `torchvision.datasets.ImageFolder`, and is something vision folks are used to seeing. | **Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
| 25 | Load Image Classification Dataset from Local
**Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
@lhoestq I think we'll want a generic `image-folder` dataset (same as 'imagenet-like'). This is like `torchvision.datasets.ImageFolder`, and is something vision folks are used to seeing. | [
-0.2203827649,
-0.1735642254,
0.0379923806,
0.4659893811,
0.1979658902,
-0.0509572253,
0.1801859736,
0.0725656897,
0.3113460541,
0.2405242622,
-0.1453478634,
0.1418924332,
-0.2927550375,
0.2843793035,
0.0848557353,
-0.2747693658,
-0.2471706569,
0.3313149214,
-0.2056816518,
-0.1957014203,
-0.0449201837,
-0.1257202774,
0.1448776275,
0.0041878223,
-0.2547868192,
0.1277288347,
-0.2468129545,
0.4981718957,
-0.0797513947,
-0.0845915973,
0.4612981975,
-0.0093377791,
0.3770538867,
0.4620995224,
-0.0001086435,
0.0818981826,
-0.0611455329,
-0.2880571783,
-0.0763201118,
-0.1762282252,
-0.0149729699,
-0.0790724456,
0.2707419097,
-0.1627684534,
-0.4990907013,
-0.0147909168,
0.0881995335,
-0.4173049927,
0.4179805815,
0.1468571723,
0.1434505284,
0.1118764579,
-0.3733751476,
0.035077136,
-0.1778990179,
0.5875372887,
-0.1875458807,
0.3944594562,
0.4111531377,
-0.1405942142,
-0.1894526333,
0.2388449013,
0.0990794301,
-0.0389611274,
0.6692716479,
0.2804869413,
-0.2617646754,
-0.1706674695,
-0.2399689555,
0.2066527158,
0.3181584775,
0.0006301189,
-0.0447476655,
-0.1067000329,
0.0801903605,
-0.0609743893,
0.1026630551,
0.1048559844,
-0.4013629854,
0.2154264003,
-0.3154782951,
-0.2255513668,
-0.5069892406,
0.119783029,
0.0038084015,
-0.4213101268,
-0.0634872466,
-0.0050006695,
0.1666992009,
-0.0544403791,
-0.0993968397,
0.1049673855,
0.0811220109,
0.422881037,
-0.1536217034,
-0.2187399864,
-0.0559957437,
0.1574493647,
0.0980692878,
-0.2005213499,
0.2193756402,
-0.0241951905,
-0.4958959818,
0.1277993023,
0.132678479,
0.0980140269,
-0.0123294815,
0.3163385093,
-0.1417286545,
-0.0399908796,
-0.3384732306,
-0.0842934549,
-0.3632297516,
0.0447500721,
-0.267095387,
-0.0891440511,
-0.1156794429,
-0.1065346301,
0.1591629982,
-0.2201785445,
0.123175621,
0.2107809037,
0.1692011952,
0.2219036669,
-0.0250554886,
-0.0770390481,
0.1714543253,
-0.1723674238,
-0.1978271753,
-0.1410322189,
-0.142993167,
0.1034081802,
-0.3244973421,
0.191598475,
0.0878313184,
-0.2593480647,
0.0646573231,
-0.2324135005,
0.3678424358,
0.2796501815,
-0.0336758122,
-0.111966759,
0.3258748353,
0.1366646737,
-0.3914692402,
-0.2433128655,
0.2597413659,
0.0465239957,
-0.2552481592,
0.1332138032,
-0.3724262416,
-0.2556300163,
0.054666236,
0.1216502488,
0.1061292216,
-0.1501433849,
-0.331351161,
0.1637575626,
-0.4754869342,
-0.0514057316,
-0.1621992588,
-0.0148726357,
-0.3337173462,
-0.0651121214,
0.3065490723,
0.4737493396,
-0.4164991379,
-0.1793345511,
-0.2316374332,
-0.1584115177,
-0.1063854098,
0.3455011845,
-0.2947669029,
0.2779904008,
-0.2246078253,
-0.0050774962,
0.2705889642,
-0.534938395,
-0.0601744577,
0.303656131,
-0.211943388,
0.0305144414,
-0.1640351713,
0.5342689753,
0.050146699,
-0.0419988632,
-0.174598977,
0.6611355543,
-0.3526693285,
0.0466845632,
0.0780656189,
-0.3422690034,
-0.0644627437,
0.4122165143,
-0.0797402635,
0.2406914979,
0.1318220496,
-0.1193684787,
-0.0236292295,
-0.2165366709,
-0.0034816228,
-0.0660729259,
0.0811398774,
0.2458647788,
-0.073032707,
0.1529966593,
-0.3992542922,
0.3711700439,
0.0097049847,
0.1909090132,
0.0310495999,
-0.0621122345,
-0.0510724895,
-0.2172997743,
-0.172138378,
-0.1460331082,
-0.0090472735,
0.1679480076,
-0.1434602737,
-0.217909649,
-0.2863900661,
0.3025025129,
-0.4228336215,
0.1167781204,
0.1282298267,
0.1148817688,
0.1717137545,
0.0182776339,
-0.194015801,
-0.0566646419,
-0.1676886976,
-0.2380436659,
-0.0803513229,
0.1865676641,
0.0075435713,
0.2275128216,
0.2719524503,
0.191762656,
0.2524003386,
-0.3821572065,
0.1531847864,
-0.150438115,
0.2151248008,
0.0628465861,
-0.3206401765,
0.398011446,
-0.0454427339,
0.2160473764,
0.0668011084,
-0.1179176271,
-0.0077412277,
-0.1440979093,
0.0915234163,
-0.0523047782,
0.1271099746,
0.4711929858,
0.2664763629,
0.2243495733,
-0.218883127,
-0.1921232939,
-0.0595936514,
0.0769029707,
-0.0112246834,
0.2901334763,
-0.0028835088,
0.289847374,
0.1034179255,
-0.2469833493,
0.4035188854,
0.1600290686,
-0.1715873182,
0.1276344657,
0.1330761313,
0.0537483171,
-0.0414683372,
-0.0240613706,
0.1006187052,
-0.0882861912,
-0.1025517508,
0.1620596349,
-0.3434333205,
-0.1346261799,
-0.1863877475,
-0.0674706548,
0.0368100703,
0.264449954,
-0.0366190076,
-0.4857852161,
-0.2420706153,
-0.0306958407,
-0.1192211807,
0.4429273009,
0.0953445882,
-0.125559628,
-0.0598940626,
0.0386002883,
0.0327109471,
0.8698263764,
-0.017756775,
-0.4855664968,
0.1011933982,
0.0124975219,
-0.2378600836,
0.1273884773,
0.196802929,
-0.1020844728,
0.4002472162,
-0.0251910947,
0.1554801762,
-0.2948790789,
-0.2264707983,
0.2518215477,
-0.0938106328,
0.2748892307,
0.0254154559,
0.1629116982,
0.0268963426,
-0.2239453793,
0.2427930236,
-0.0728500411,
-0.2957371473,
-0.4095210135,
0.1939202696,
0.3621398211,
-0.2087420225,
-0.3324574828,
-0.4163191617,
-0.3412549198,
0.3048316836,
0.3539650738,
0.2217600048,
0.1651597023,
0.1471842527,
0.0040502474,
-0.2702944279,
0.0946021751,
0.1144488007,
-0.4609879851,
-0.0590892583,
-0.1896749139,
-0.206740737,
-0.2203397155,
-0.1727891117,
0.1196983159,
0.156820327,
-0.459494859,
-0.1874852628,
0.014501797,
0.2022877038,
-0.0684158951,
-0.1215320677,
0.2696076334,
-0.0686746761,
-0.0675725713,
-0.0113545358,
0.1930972934,
0.130538553,
0.015098853,
-0.0766621381,
0.2141605616,
0.1200866997,
-0.1289937794,
0.4839244783,
-0.1341380179,
-0.2982961237,
0.4586882591,
-0.1482965797,
0.2997556329,
-0.4732166231,
-0.3920402825,
0.2545680404,
0.2472587079,
-0.2930371165,
0.2879586816,
0.3745382726,
-0.0634124875,
-0.3145255148,
-0.1609679461,
-0.0095563084,
-0.1770733595,
0.4041856825,
0.2089853734,
0.3410284519,
-0.4403281808,
-0.1249428093,
-0.1967131793,
-0.0869487301,
0.0050693788,
0.5884592533,
0.2764632702,
0.0240623653,
-0.2165908515,
0.3037581146,
0.0321438499,
0.0399331376,
0.1948242188,
-0.1237632632,
-0.2956555486,
-0.1122799441,
0.0854419172,
0.1938696504,
0.2848784328,
0.0979405344,
0.04826767,
0.0827788711,
-0.4667032659,
-0.0958472788,
0.1218661815,
0.154450655,
-0.1674496233,
-0.289426595,
0.5744003654,
0.0712845027,
-0.3223759532,
0.1751601696,
0.1193184704,
-0.3754457235,
-0.0278294552,
-0.0399081148,
0.1829681993,
-0.2103991508,
0.0174820162,
-0.0102239735,
0.1486940682,
0.340716511,
0.0679077357,
-0.1554696858,
-0.0782486498,
0.0654698983,
-0.0717561692,
-0.0290607605,
0.2698783278,
0.242138505,
0.319757998,
0.4253334403,
-0.0151424911,
0.5078395009,
-0.1578490883,
-0.3838403225,
0.0121009015,
0.1267113686,
0.3334470689,
0.3710131049,
0.1919393539,
-0.0384321138,
0.0186789557,
-0.13705118,
-0.8158695698,
0.5896151066,
0.0729696378,
-0.2231981754,
0.0463674627,
-0.2987619638,
0.4696883857,
-0.1042823195,
-0.1003983617,
0.2121418267,
0.1468673646,
-0.3020865917,
0.0595263094,
0.4889577031,
0.9659129381,
-0.2565286756,
0.5424618125,
0.0919433013,
0.2645853162,
0.2019234598,
0.2472121567,
-0.0507732183,
-0.214033559,
-0.3854648173,
-0.132699877,
-0.1157031059,
0.089996025,
0.0280095115,
0.1046667695,
-0.000479009,
0.0318762958,
0.0459690616,
0.0555039197,
0.1865992397,
0.1125453189,
-0.5767173767,
-0.0885066241,
0.1656725407,
0.0978723988,
0.3691045642,
-0.0501506217,
-0.0938528776,
-0.0038342103,
-0.0055168122,
0.011954993,
-0.1070677638,
-0.1335559189,
0.0020824485,
0.0067067351,
-0.2064535916,
-0.0368457362,
0.3239463866,
0.1903467625,
0.0462065339,
-0.14602907,
0.1698483229,
-0.2683290839,
0.1435432881,
-0.0371727198,
-0.2572736144,
0.4271562696,
0.0603839606,
0.1232574582,
-0.0871603489,
-0.0342846364,
-0.4487550855,
-0.1154085025,
-0.1401175261,
0.6795424223,
-0.201659739,
-0.0441876538,
-0.1713186204,
0.0454778224,
0.194747746,
0.1356180906,
0.1881374866,
0.1464858353,
-0.1470836997,
0.3069870472,
-0.1632523835,
0.0422833413,
0.181850493,
0.0206913166,
-0.4831431508,
0.13899827,
0.0571578741,
0.1379524916,
-0.2186935842,
0.5137709379,
0.6890597939,
-0.185610503,
0.0950153172,
0.2550155818,
-0.1769705266,
-0.0809610039,
0.7742315531,
0.3607248664,
-0.4379701018,
-0.2155486196,
-0.0806495249,
-0.5159038305,
0.1880481392,
-0.3054277301,
0.3426120579,
-0.0671246797,
-0.02053231,
0.1677677184,
0.0446033254,
-0.3304333687,
0.0615928546,
-0.2406258136,
0.1268833727,
0.4618704915,
0.2617571056,
0.2810434997,
0.0487013012,
0.0479382873,
-0.0934766978,
-0.1809422672,
-0.0897053033,
-0.1819971949,
0.1569425166,
0.0965894014,
0.1295960248,
-0.0247122329,
-0.2508898079,
-0.1646747142,
-0.0765928179,
0.1185129359,
-0.2117545009,
-0.1617009938,
0.1377969384,
-0.1535951793,
0.0359755717,
-0.1333455443,
0.2676191032,
0.0069108903,
0.3529626131,
0.0898393095,
-0.3657233715,
-0.2456702441,
-0.3413457274,
0.2444542199,
0.2418668568,
0.1333358884,
0.0059953611,
0.1923785806,
0.2601995468,
0.1615189612,
0.0354919843,
0.3301912248,
-0.2450648546,
-0.1639593542,
0.1343407333,
0.4791514874,
0.2119671106,
-0.1309016347,
-0.2089428902,
-0.0889953077,
-0.2090010047,
0.1344101876,
0.2951008081,
-0.2345123291,
0.395060569,
-0.0475562848,
-0.1903672367,
0.1842794418,
0.1106931716,
-0.0624363571,
0.14889431,
-0.3155524135,
0.0609463714,
0.2417801917,
0.1907817125,
0.1738514602,
0.4474365711,
-0.5088697076,
0.2313014567,
-0.3525950015,
0.1327974349,
0.4371778965,
-0.3301294446,
0.0889637694,
-0.0813509822,
0.2755257487,
0.1303028762,
-0.4082708359,
0.260867238,
-0.1979528666,
-0.3885849714,
-0.0071524531,
0.0998760164,
-0.1769783497,
0.1098459661,
-0.5392642617,
-0.10547667,
-0.0967823491,
0.2101846337,
-0.078877978,
-0.1732394546,
0.1305889785,
0.1152084023,
0.1759532541,
0.2512297332,
-0.154310748,
0.2087506056,
0.0609658509,
-0.0560694039,
0.229368329,
-0.0510763265,
0.1742602289,
0.3724262714,
0.373193413,
-0.3360880017,
0.3672221601,
0.1079405174,
0.197318092,
-0.060423553,
-0.114571698,
-0.0751978979,
-0.0853595957,
-0.2778795362,
0.2198884934,
0.1320544779,
0.1360961944,
-0.139824301,
0.2305926532,
-0.2897709608,
0.1470109224,
-0.4413468242,
0.2855166197,
0.3836603165,
0.1116190553,
-0.2781769335,
0.2666490972,
-0.3031939268,
0.1557962894,
0.1269329637,
0.0470835008,
0.0562159531,
0.2201369107,
0.0491623022,
0.0408182591,
0.6757798791,
0.1230628639,
-0.0002568085,
-0.4220191538,
-0.2528707385,
-0.4494129419,
0.1086920202,
0.1498081833,
-0.2966708243,
0.0146450549,
0.0192308649,
0.289381355,
0.3351863623,
-0.1327325702,
-0.2538822889,
0.2743799984,
-0.07673724,
-0.2786458433,
-0.1292857826,
0.3408538997,
0.2206348479,
0.0567821488,
-0.2851385772,
0.2080627829,
-0.1478381753,
0.0750448555,
0.2263495028,
-0.1668167412,
-0.1618992537,
-0.0848921388,
0.4018751085,
-0.1649269462,
0.0886628777,
0.0323637202,
-0.1147095859,
-0.1409032643,
-0.1237450019,
-0.298791796,
-0.1430525482,
0.146563977,
0.4959651232,
-0.4086170793,
0.1019577682,
-0.5701284409,
-0.1637083292,
0.1276894212,
0.0118019432,
-0.2440304756,
0.0364948958,
-0.0801194981,
-0.0949008763,
0.0979752988,
0.4745472372,
-0.1897487789,
-0.3523247242,
-0.360465467,
-0.1509294808,
0.5336059332,
-0.3622513115,
-0.0179836228,
-0.0006379262,
-0.1082380265,
0.0579235554,
0.1308809817,
-0.1344612539,
0.1527676433,
0.2543118596,
0.1060824692,
-0.1274396777,
0.2331529707,
0.1409255564,
-0.0177379474,
-0.1020820439,
0.1804926395,
-0.012253779,
0.1106825247,
-0.0972424299,
-0.3407366872
] |
https://github.com/huggingface/datasets/issues/2508 | Load Image Classification Dataset from Local | Opening this back up, since I'm planning on tackling this. Already posted a quick version of it on my account on the hub.
```python
from datasets import load_dataset
ds = load_dataset('nateraw/image-folder', data_files='PetImages/')
``` | **Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
| 33 | Load Image Classification Dataset from Local
**Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
Opening this back up, since I'm planning on tackling this. Already posted a quick version of it on my account on the hub.
```python
from datasets import load_dataset
ds = load_dataset('nateraw/image-folder', data_files='PetImages/')
``` | [
-0.2027494609,
-0.1886907369,
0.0131783411,
0.4011634588,
0.2593049407,
-0.027974166,
0.1975972354,
0.1451177597,
0.3119898438,
0.2857658267,
-0.1935355067,
0.1235475168,
-0.3047414422,
0.3270211816,
0.065077655,
-0.2292605191,
-0.2278255224,
0.3378816247,
-0.1562043875,
-0.2475795448,
-0.0562427342,
-0.0963322744,
0.1660833955,
-0.0088662021,
-0.3098390698,
0.1793596596,
-0.2453822494,
0.5447190404,
-0.1185015738,
-0.1016759723,
0.488791883,
0.0333637968,
0.3943756521,
0.5124261975,
-0.0001068552,
0.0872664452,
-0.1294455528,
-0.2651172876,
-0.0608893111,
-0.2519887686,
-0.020675011,
-0.1543315649,
0.2418373227,
-0.2121085525,
-0.499715507,
-0.0551612526,
0.0461999923,
-0.3964983821,
0.4658915997,
0.1928681731,
0.1746451259,
0.1268733889,
-0.3423509896,
0.0266527347,
-0.2240593731,
0.4555779696,
-0.1381311566,
0.4050807953,
0.4020672441,
-0.242272824,
-0.0563131385,
0.2717683017,
0.0958086103,
-0.0036631059,
0.5949124694,
0.3227716386,
-0.1611326039,
-0.2097162902,
-0.1857713759,
0.1864373088,
0.1650445461,
-0.0789070204,
-0.1229937151,
-0.1892204285,
0.1058704406,
-0.1091681272,
0.0645307451,
0.1194692254,
-0.4392843246,
0.2350856662,
-0.2582420111,
-0.1784313619,
-0.4480181634,
0.0994260982,
0.026265651,
-0.3858402371,
-0.0895732939,
-0.0566949733,
0.1281296015,
-0.0233990215,
-0.1673012972,
0.0837894976,
0.1429526955,
0.4985156655,
-0.1698470563,
-0.2242090106,
0.0119306864,
0.094493866,
0.0747529939,
-0.1614051461,
0.1179356128,
-0.0337837562,
-0.453022778,
0.072545141,
0.193568781,
0.119587034,
-0.0463379286,
0.3049667478,
-0.1034985259,
0.0002566315,
-0.4169121385,
-0.1191151515,
-0.301264286,
-0.0344272181,
-0.1744807214,
-0.0468033925,
-0.0193034634,
-0.1389567256,
0.1612505317,
-0.1624352783,
0.1029188409,
0.190890491,
0.1504070163,
0.2424590737,
-0.048272647,
-0.0031930637,
0.1031279713,
-0.1202347502,
-0.2283464223,
-0.0636384934,
-0.191752106,
0.1401707977,
-0.2598932683,
0.1119391322,
0.0759558305,
-0.2991690636,
0.0413863137,
-0.2150570452,
0.472855866,
0.2309119701,
-0.058795061,
-0.1564924121,
0.3177805543,
0.1721375287,
-0.3297012448,
-0.2200272083,
0.3412005305,
-0.1647662371,
-0.2446694672,
0.0908580422,
-0.3651208282,
-0.2542338967,
0.0902900025,
0.1549030244,
0.05807098,
-0.130782634,
-0.3527173102,
0.1504349709,
-0.4175848961,
0.0191521943,
-0.194458589,
-0.0075771459,
-0.3421980143,
-0.0516984351,
0.3478898406,
0.4690687656,
-0.3932279944,
-0.1652915776,
-0.1618797481,
-0.1397896111,
-0.0641404539,
0.3136606812,
-0.2297159284,
0.3035104275,
-0.1629565805,
-0.0052738488,
0.2235994339,
-0.5785596371,
-0.1155701205,
0.2601819634,
-0.1376005113,
0.1651305854,
-0.1817652732,
0.4197823703,
0.0482666157,
-0.0234769005,
-0.1105473489,
0.7269151211,
-0.2688495517,
0.0874660537,
0.0078725293,
-0.3116491735,
-0.0915131867,
0.4174852371,
0.0188925639,
0.2793212533,
0.059595719,
-0.0981966853,
0.0894355625,
-0.2581094205,
0.0199274495,
-0.0467382334,
0.2255552113,
0.2770268619,
-0.0013278946,
0.0582766831,
-0.3241298795,
0.4105856717,
-0.0123330355,
0.2917640805,
-0.1126457006,
-0.068365857,
-0.1458888054,
-0.1702475846,
-0.2722264528,
-0.1347837597,
0.0470266268,
0.0864297748,
-0.0660313666,
-0.1581669599,
-0.3154456317,
0.3485406637,
-0.4256828427,
0.1370668709,
0.1380569041,
0.1380336583,
0.1871838272,
-0.0216988195,
-0.1657733172,
-0.0027624425,
-0.1812499166,
-0.1727611125,
-0.1171170175,
0.2002928555,
0.0799684078,
0.245636642,
0.2190037519,
0.1401596814,
0.2687152922,
-0.2863895297,
-0.0079384297,
-0.0720432997,
0.2825769782,
0.0857937485,
-0.2918456197,
0.4547755122,
-0.0203837082,
0.2221368253,
0.1012875289,
-0.1100744456,
0.0155489445,
-0.1211862192,
0.0509898812,
-0.0794551969,
0.1232160404,
0.420969218,
0.3136692047,
0.1299491227,
-0.1777852625,
-0.1941129118,
-0.0812531114,
0.058599636,
-0.0019888598,
0.2639882863,
0.0237172376,
0.2941879034,
0.0284503195,
-0.1595567912,
0.4201908708,
0.1286082417,
-0.1448095292,
0.1587540507,
0.0780902579,
0.0449382812,
-0.0498136133,
-0.0107470527,
0.064047493,
-0.0586436056,
-0.0079141948,
0.1536594629,
-0.3867434561,
-0.1319256425,
-0.2363810092,
0.001870906,
-0.0079264194,
0.2852340341,
-0.1009812504,
-0.3875077963,
-0.1490826011,
-0.1553314477,
-0.1084500104,
0.3473499417,
0.0478669927,
-0.1340534389,
-0.0920878574,
0.0323765427,
0.064540565,
0.7125995159,
-0.0248520859,
-0.4691959918,
0.1037002504,
-0.0467528179,
-0.1814676821,
0.1466983557,
0.2156879902,
-0.0644050092,
0.360367626,
-0.0669213161,
0.0659148023,
-0.2202035785,
-0.2478678226,
0.1926793307,
-0.0845230892,
0.3398305476,
0.0223370623,
0.2182108611,
-0.0282246433,
-0.167015329,
0.3136242628,
-0.125192821,
-0.224856317,
-0.372148037,
0.1539634913,
0.3486576974,
-0.2092302442,
-0.3167017698,
-0.5308420658,
-0.3142334819,
0.3089399934,
0.4514374733,
0.2063345015,
0.2160312831,
0.1925135106,
0.0203400925,
-0.2060066313,
0.1167830154,
0.0709908754,
-0.5225772858,
0.0260534417,
-0.2402144372,
-0.2574027777,
-0.2038246393,
-0.1880463362,
0.0893686712,
0.0179091021,
-0.3726286888,
-0.3170895875,
-0.0948067531,
0.1927016973,
-0.0982364342,
-0.0089153266,
0.1456407905,
-0.0769764334,
-0.0927024335,
-0.0380812921,
0.2784570456,
0.1374168694,
0.0226469412,
-0.2067887634,
0.1048830375,
0.0421141945,
-0.0949455723,
0.3632552922,
-0.118990168,
-0.1858231872,
0.4987353086,
-0.2188989222,
0.278049022,
-0.5007695556,
-0.4705109298,
0.1554920971,
0.2024282962,
-0.3157975674,
0.2361057997,
0.3836196959,
0.0417031795,
-0.3428863883,
-0.0829942003,
-0.0110559687,
-0.2468993962,
0.322365582,
0.3423323929,
0.2638838589,
-0.3573631942,
-0.1419976354,
-0.2169507444,
-0.0788720995,
-0.0044165514,
0.5882697701,
0.1983954608,
0.0050529055,
-0.3221977949,
0.2321478128,
-0.0820271298,
0.0094451271,
0.2002619356,
-0.1162261888,
-0.240681231,
-0.1060221791,
0.0583757125,
0.148995623,
0.3460452557,
0.1016143486,
0.067190513,
0.1230658591,
-0.5372576118,
-0.1438312531,
0.1007355601,
0.0597227216,
-0.2057906985,
-0.2554806769,
0.6490072012,
0.0681872517,
-0.3536733389,
0.1585284472,
0.0991670042,
-0.3491899371,
-0.032816343,
-0.1618232131,
0.0673729107,
-0.2876481712,
-0.0037828721,
0.0376043171,
0.287519753,
0.2628844976,
0.1315568388,
-0.1734480411,
-0.0176331587,
0.1536101103,
-0.0293114819,
0.0278310217,
0.2857743502,
0.2290546,
0.2562814057,
0.3251543939,
-0.0794727132,
0.5093401074,
-0.2159672678,
-0.4752890766,
-0.0389043465,
0.1117703021,
0.3309124708,
0.3534558415,
0.1149044484,
0.0006216094,
-0.0314125121,
-0.0187641382,
-0.8070133924,
0.576205194,
0.0688986778,
-0.1418066174,
0.0866759494,
-0.4121034741,
0.4884509146,
-0.0991749242,
-0.0336984619,
0.1793901622,
0.2129329145,
-0.2754081786,
0.1061647385,
0.3879116178,
0.950214088,
-0.2089954317,
0.5667914748,
0.1677488685,
0.2664765716,
0.2431253791,
0.2348921001,
-0.1047667786,
-0.1616081595,
-0.4155467749,
-0.1051978618,
-0.076686278,
0.1650698483,
0.0588501617,
0.0765499622,
0.0380689576,
-0.0239416361,
-0.0512516201,
0.0152959526,
0.1511948705,
0.0087293889,
-0.5815861821,
-0.3145025969,
0.2094790339,
0.1535283625,
0.3991641402,
-0.0469239093,
-0.0668685883,
-0.0617357679,
0.0073632002,
0.0269925743,
-0.1028417647,
-0.1125144437,
0.0362896733,
0.0071030911,
-0.2341010869,
-0.1018064916,
0.3608928025,
0.264295578,
0.0759975463,
-0.1297740936,
0.1938925385,
-0.3031799197,
0.1749076843,
-0.084434554,
-0.1884145439,
0.4033651352,
0.0306337848,
0.0402395576,
-0.0778920203,
-0.046499528,
-0.4463988245,
-0.0515010804,
-0.0914787129,
0.594982028,
-0.143631041,
-0.14426063,
-0.1526287496,
0.0557626188,
0.1164381057,
0.1565444916,
0.2211783975,
0.0589641072,
-0.0566400774,
0.2580012679,
-0.2473712265,
0.0799934268,
0.2593114376,
0.0732707381,
-0.4243010879,
0.2710447907,
0.1312050968,
0.1236437261,
-0.2333194166,
0.4793844819,
0.5929046273,
-0.0943112075,
0.1389595717,
0.262760222,
-0.1387142539,
-0.0982638076,
0.7520090938,
0.3514800668,
-0.4276148379,
-0.1781026721,
-0.1849623173,
-0.5113025308,
0.1392213553,
-0.1715736389,
0.3388849497,
0.0048545152,
0.0719593987,
0.1959538758,
0.0211515035,
-0.3629049361,
0.1149832308,
-0.2795416415,
0.0781995058,
0.3643583357,
0.2243510485,
0.3502087593,
-0.0084178485,
0.0853072032,
-0.0262585878,
-0.1596098244,
-0.1616481394,
-0.219317019,
0.135716185,
0.0767204612,
0.1213215515,
0.0447622165,
-0.1669969857,
-0.1648410857,
-0.085063383,
0.1592331231,
-0.0806107223,
-0.1487304866,
0.1932412684,
-0.1417417079,
0.0104059437,
-0.1049188748,
0.2175504565,
0.0159713291,
0.2904708087,
0.1388824731,
-0.3403905928,
-0.2393262982,
-0.2667356133,
0.3110298514,
0.1864566207,
0.1296161562,
-0.0170905665,
0.1988243312,
0.1754840612,
0.1664512455,
0.0432941727,
0.3626083136,
-0.2004909068,
-0.2212091684,
0.2235448062,
0.4667609334,
0.2406204492,
-0.1922975481,
-0.2187253386,
-0.080772832,
-0.180143252,
0.2173094153,
0.3076252043,
-0.2552921474,
0.3836823702,
-0.1784025133,
-0.1280025542,
0.1589684188,
0.1056007296,
-0.0670827478,
0.1668912917,
-0.2920245826,
0.0753034204,
0.140085429,
0.1639073491,
0.1505864114,
0.4241311848,
-0.5359813571,
0.2032940835,
-0.4283614457,
0.1026889831,
0.3870524168,
-0.3839821219,
0.094415769,
0.0223558843,
0.1899939477,
0.163354978,
-0.3974063396,
0.363119781,
-0.2455973774,
-0.3343328238,
-0.015243914,
0.1304397136,
-0.1191878617,
0.0357595384,
-0.4416670203,
-0.061371997,
-0.1514234543,
0.1702167094,
-0.0652250499,
-0.2150893509,
0.0124943517,
0.0824303925,
0.1849017143,
0.2537662387,
-0.2565476,
0.2063065618,
0.1319916397,
-0.065789476,
0.1126946434,
0.0414288491,
0.1676035523,
0.2787659168,
0.3783049285,
-0.2263223976,
0.413628757,
0.0632914975,
0.2188954055,
-0.0334755071,
-0.1237979978,
-0.0826207697,
-0.0444802493,
-0.2586866617,
0.2596136034,
0.2082895041,
0.1723280251,
-0.2008013725,
0.1348541081,
-0.1885301471,
0.2333206981,
-0.513628304,
0.37228778,
0.3565178514,
0.1105497032,
-0.220444262,
0.237942338,
-0.3508533537,
0.1727733314,
0.1916840523,
0.0668125153,
0.1018795669,
0.1869105399,
0.0600962974,
0.0617360026,
0.6641269922,
0.149437964,
0.0210157037,
-0.405076772,
-0.2557225823,
-0.5360122323,
0.0816491991,
0.1062446907,
-0.2939186692,
0.0084798038,
0.03062547,
0.2576008141,
0.3980211616,
-0.1194431037,
-0.3155708611,
0.1635519862,
-0.0418914631,
-0.2796114087,
-0.1119439006,
0.2454476058,
0.2100671083,
0.0810231119,
-0.3084844351,
0.1834351718,
-0.2136033326,
0.1177766472,
0.2491156459,
-0.1012824401,
-0.1914177239,
-0.1190895587,
0.3701429069,
-0.138264209,
0.0733895898,
-0.0025672764,
-0.1067174375,
-0.1225960329,
-0.1300559491,
-0.2726759613,
-0.0744351149,
0.0721400231,
0.5224915743,
-0.4053121507,
0.0876043439,
-0.4886484146,
-0.0944114178,
0.1875331998,
-0.0686934739,
-0.2719263434,
0.0453880578,
0.0730387121,
-0.0700624436,
0.0103009082,
0.5261642933,
-0.2377746254,
-0.2638459206,
-0.3279536963,
-0.1958243549,
0.558826983,
-0.4133076668,
-0.137567997,
-0.0633120537,
-0.0475288779,
-0.0437316038,
0.0730090588,
-0.1622510254,
0.2003908157,
0.2113155723,
0.1249168366,
-0.2120070308,
0.3038729429,
0.1336131394,
-0.0588355847,
-0.0838024691,
0.1437306255,
-0.0280817933,
0.1466640085,
-0.0601994097,
-0.3650999367
] |
https://github.com/huggingface/datasets/issues/2503 | SubjQA wrong boolean values in entries | @arnaudstiegler I have just checked that these mismatches are already present in the original dataset: https://github.com/megagonlabs/SubjQA
We are going to contact the dataset owners to report this. | ## Describe the bug
SubjQA seems to have a boolean that's consistently wrong.
It defines:
- question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective).
- is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective)
However, `is_ques_subjective` seems to have wrong values in the entire dataset.
For instance, in the example in the dataset card, we have:
- "question_subj_level": 2
- "is_ques_subjective": false
However, according to the description, the question should be subjective since the `question_subj_level` is below 4
| 27 | SubjQA wrong boolean values in entries
## Describe the bug
SubjQA seems to have a boolean that's consistently wrong.
It defines:
- question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective).
- is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective)
However, `is_ques_subjective` seems to have wrong values in the entire dataset.
For instance, in the example in the dataset card, we have:
- "question_subj_level": 2
- "is_ques_subjective": false
However, according to the description, the question should be subjective since the `question_subj_level` is below 4
@arnaudstiegler I have just checked that these mismatches are already present in the original dataset: https://github.com/megagonlabs/SubjQA
We are going to contact the dataset owners to report this. | [
0.1235662326,
0.0693045408,
0.0270316675,
0.1645202339,
-0.3365960717,
-0.0068989024,
0.0865070522,
0.045239497,
-0.0927972943,
0.1864392161,
-0.0919596925,
0.4202955067,
0.2149701416,
0.2549102306,
-0.2184264511,
0.1229734868,
0.2286490202,
0.1842407733,
-0.1363600045,
-0.1547207832,
-0.4317787886,
0.2605760992,
-0.5335963964,
-0.0119048171,
-0.1275138706,
-0.2023661137,
-0.1333582401,
-0.1422059685,
-0.2238849103,
-0.2932462692,
0.0730005205,
-0.0335393287,
-0.0811766014,
0.1234091148,
-0.0001093275,
-0.2034584284,
0.0526366718,
0.0162327811,
-0.21767959,
0.0769176036,
-0.2617808878,
-0.0417562053,
-0.1978146434,
0.0486693531,
-0.3357684612,
-0.4470200241,
-0.2089022696,
-0.2683669925,
0.3899083436,
0.0090999864,
0.1720300615,
0.0610969961,
-0.1662038267,
0.247456491,
0.3539651632,
-0.1808389425,
-0.0492368117,
0.2432311177,
-0.0437768437,
-0.046365276,
0.1507539153,
0.3817000091,
0.0878880396,
0.0792879313,
0.1195276082,
-0.1314198673,
-0.0643834174,
-0.2449347824,
0.2853113413,
0.2433768809,
0.3400313258,
-0.1474964321,
-0.4372365475,
-0.0865622163,
-0.0688514709,
-0.1194220334,
0.2729386687,
0.0267801061,
0.1324341744,
-0.0465578213,
0.1046249047,
0.3983647227,
0.1085541323,
-0.0410748608,
-0.1135645732,
0.1411967576,
-0.1243972182,
-0.0282296762,
-0.1896748245,
-0.1182829663,
0.0167927667,
0.00290462,
-0.6352514625,
0.1034264266,
-0.4720295072,
-0.0552290082,
-0.0651544034,
0.1520368457,
-0.1540695429,
-0.3375006318,
0.2958488762,
-0.0503650084,
0.203173548,
0.1381501853,
0.5345703363,
0.2554334998,
0.3524949253,
-0.2006354034,
-0.0916455835,
-0.254408896,
0.0428179204,
0.0638488531,
0.1985458434,
-0.2788587809,
-0.0028027371,
0.0887786299,
0.1084228083,
-0.3041126132,
-0.5812080503,
0.1572571099,
-0.4001151323,
-0.0450356081,
0.1340211183,
0.0927848294,
0.0476536416,
-0.2227295488,
-0.0990665406,
0.0209522434,
-0.1345921755,
-0.4782001972,
-0.1239521056,
-0.023846278,
-0.1999013275,
0.0544942096,
0.0194702968,
-0.0180341564,
-0.0020738021,
0.371930182,
-0.1979905516,
-0.2239185721,
0.009152323,
-0.2884497344,
0.2214833945,
0.2032552212,
-0.2496661842,
0.2008804977,
0.0493719652,
-0.0521150567,
-0.0147674829,
0.3387774825,
0.0891698301,
0.181959033,
-0.0369843058,
0.180438444,
-0.0891753733,
-0.0578743704,
0.1410856545,
0.3233654499,
0.2153365314,
0.0382414609,
0.0631319061,
-0.2067237049,
-0.1559421271,
-0.0916230381,
-0.0364300236,
0.1502397656,
-0.6753104925,
-0.1031777114,
-0.0081573464,
0.2379132807,
0.0118778907,
0.1806162447,
0.1911160201,
0.2914663553,
0.0767868385,
-0.0861869678,
-0.2743889689,
0.1927628666,
-0.4252070189,
0.0999394357,
0.4220339358,
-0.0812632069,
-0.2345723063,
0.2056290358,
0.1705131233,
0.0348282158,
0.1862523854,
0.0711832047,
0.0980643705,
-0.1092920005,
-0.4336031675,
-0.0682205185,
-0.0198697709,
0.2016845942,
-0.1839961708,
-0.0702621192,
0.0519552752,
-0.4857284129,
0.1369780302,
0.1761034429,
-0.2915924191,
0.0750329494,
0.4579089284,
-0.3810140491,
0.2863348424,
0.0377028137,
0.1168817133,
0.1942811608,
-0.4058646858,
0.0025863745,
0.5612461567,
-0.0935290158,
-0.1990177929,
0.1016953513,
0.047990635,
-0.1811898798,
0.1231812015,
0.1443931758,
-0.3442241848,
-0.0312304609,
-0.282902658,
-0.0618520305,
0.1143132895,
-0.0696994364,
0.1398047209,
-0.1327399462,
-0.0771323591,
0.0567474291,
0.4595973194,
0.3403609395,
0.4474403858,
0.0692555904,
-0.098288998,
0.1780463159,
0.0816662759,
-0.1003289223,
-0.1397878081,
-0.2158811092,
-0.0932417735,
-0.100941129,
0.0486007407,
0.5878676176,
-0.0976714045,
0.3459820747,
0.1544425935,
0.4633139968,
0.081157133,
-0.1465828568,
-0.3019925058,
0.2043398172,
-0.0304882675,
-0.194627583,
-0.1729126871,
-0.405631721,
0.2356467992,
0.0524055138,
-0.0895467252,
0.2477193773,
0.1411383748,
0.2954143584,
0.3167259395,
-0.1854983866,
0.2649511099,
-0.2104400396,
-0.0202971101,
-0.0652850121,
0.2469481081,
0.4416827857,
0.1151769459,
0.195472613,
-0.0981777012,
-0.0625018775,
-0.1693165451,
-0.0454245582,
0.2141799331,
0.1679680794,
-0.2550608814,
-0.0083731897,
0.0559940562,
0.1583368629,
-0.2140282393,
0.7436456084,
-0.0561721288,
0.0429212824,
-0.3219943643,
0.3840667009,
-0.316583097,
-0.3022708297,
0.0065395571,
-0.526925683,
0.0282168463,
-0.2270457447,
0.4689016938,
-0.3912792206,
-0.4067312181,
0.390320152,
0.4209654927,
0.6782057881,
-0.1489884257,
0.1956745535,
-0.0283060968,
-0.0563011095,
-0.5697384477,
0.0757159144,
0.036611326,
-0.2367689312,
0.0595964789,
-0.137931183,
-0.1368678212,
-0.0072095767,
-0.2768758535,
0.119259052,
0.0006520338,
1.0724867582,
-0.2695177197,
-0.1467302442,
-0.1190347224,
0.1193542704,
-0.1574741453,
0.1590287387,
-0.0539906919,
0.0906693935,
-0.1739585251,
-0.1675076783,
-0.1246677488,
-0.3515956998,
0.0382577255,
0.0046204403,
-0.1437676847,
-0.2055476606,
0.2674571276,
0.4465824366,
-0.1614126712,
-0.3993707895,
0.0713937283,
-0.0173410717,
-0.3348315954,
-0.2631747127,
0.3340444863,
0.0522258431,
-0.5183656812,
-0.0925901681,
-0.12972489,
0.4031529725,
-0.265747577,
-0.3338997364,
0.3003413677,
0.0676517934,
-0.2214176059,
0.3181124628,
-0.3968442678,
-0.1473351568,
-0.2791085541,
-0.1210671738,
-0.1548232138,
-0.6240267158,
0.1361130327,
0.1735401452,
0.4568224549,
-0.048764322,
0.1495236158,
0.1556360275,
-0.0425297208,
0.3412079811,
0.1651683152,
0.3119769096,
0.3186431825,
0.3356913328,
0.083191663,
-0.2547815442,
0.3756679296,
-0.0273990259,
-0.2127393931,
0.3895860016,
0.0599054806,
-0.2288591117,
-0.1277028471,
-0.1800571978,
-0.304917872,
-0.0435705595,
-0.2200163752,
-0.191335693,
-0.0832535475,
0.2246245295,
0.3975693285,
0.0006998181,
-0.1159173995,
0.0042764656,
0.0272914171,
0.1127711535,
0.0074558109,
-0.1231149137,
-0.2056864947,
0.1232675985,
0.2521840632,
-0.2121991217,
0.4180152118,
0.0451588035,
-0.0097377822,
0.0432472527,
-0.0618414618,
0.3363802433,
0.1082416996,
0.1873944104,
0.1663551927,
0.2925170958,
-0.3721617162,
-0.2799000442,
0.0299686342,
0.0526576005,
0.398399204,
-0.2495495826,
0.0345628113,
0.1566705406,
0.152894944,
-0.2442188263,
-0.3942865729,
-0.3982587457,
-0.5250511765,
-0.0674080998,
0.0731194243,
-0.2132787257,
-0.0859829113,
-0.0457683951,
0.0369199738,
-0.2266896367,
-0.0952133313,
-0.2053317726,
0.1177325249,
0.3615657687,
0.1725517213,
-0.1322090626,
0.3831833601,
0.0572225042,
0.4139148593,
0.0133754704,
0.2656073868,
-0.0019588815,
0.1644228101,
0.0157552063,
-0.1311364174,
-0.0216496736,
0.0119551122,
-0.1118064076,
0.1419663727,
0.0780655891,
-0.000462804,
-0.290446341,
-0.2381998301,
0.1909381449,
0.2920928597,
0.1383162737,
-0.2242975831,
0.5193615556,
-0.2695474327,
-0.3641126156,
0.1406290829,
0.1554798186,
0.0487959236,
0.4307951331,
0.5219875574,
0.7752363682,
0.0249506235,
-0.1994741857,
0.0232309401,
-0.5342603326,
0.2276937664,
0.1881097257,
0.0658887401,
-0.3278452158,
-0.0222094879,
0.0415822491,
0.0512276515,
0.0864015818,
-0.0782106221,
-0.2384380996,
0.243613556,
-0.0614317805,
0.2418658137,
0.1969997436,
-0.4235360324,
0.0483170077,
0.2041698098,
0.079564333,
0.1667335629,
0.0505109206,
0.2443154454,
-0.1379185766,
0.0434098318,
0.0136464089,
-0.0338521414,
-0.2221970856,
-0.069159776,
-0.0649968311,
-0.1792669594,
0.5730499625,
0.0441919118,
-0.1402344406,
0.3558793068,
0.7642986774,
0.0335442722,
-0.1301912814,
0.2423317879,
0.0350235961,
0.1353752017,
-0.0243631396,
-0.0333929211,
0.3863115013,
-0.1636992991,
-0.251290381,
-0.0570652224,
0.258472383,
0.1336395442,
-0.5338665247,
0.1852086782,
0.1505409628,
-0.0688360631,
0.2695313096,
-0.3762759864,
0.487880528,
-0.3313368559,
0.1649711728,
-0.0474713854,
0.1532193422,
0.2749247849,
-0.2633226216,
-0.1157360524,
-0.2474366724,
0.0408618152,
0.1218427569,
0.4315549731,
0.2313310355,
-0.1939184368,
0.0098415464,
-0.1757998914,
0.1753427386,
0.1273625791,
0.1977410167,
-0.1055423766,
-0.1823632121,
-0.3872097731,
-0.1193847656,
0.414798826,
0.3592253923,
0.1023105532,
-0.0635272935,
-0.4572015703,
-0.0118481815,
0.1701104045,
-0.2586508095,
0.0249616522,
0.0414024591,
-0.0099093579,
0.0454231203,
0.4727853835,
-0.2946558595,
-0.2848927379,
-0.1437344551,
-0.1145410165,
-0.0792017579,
-0.1556374282,
-0.0609721802,
0.0131852813,
0.0809933022,
-0.2546263635,
-0.0911783725,
-0.1349460483,
-0.237850517,
0.075996533,
0.1858254373,
0.1357620656,
-0.2410286218,
-0.0968574435,
-0.0528465621,
-0.0384106748,
-0.0851728171,
-0.1401199251,
0.1708899289,
0.5099930167,
-0.2567969263,
-0.06652762,
-0.0687681958,
0.1167857423,
0.1696680784,
-0.0922318846,
0.0603905171,
-0.0241421591,
-0.0374813601,
-0.0915849581,
-0.0986885875,
0.1159597188,
-0.3026840985,
0.0257620029,
0.1222919375,
-0.1805092394,
0.2352316082,
0.0132280029,
0.0667850748,
-0.0411055349,
-0.0670948923,
-0.1620508134,
-0.0609439835,
0.1795120388,
-0.3609012961,
-0.28597188,
-0.5163063407,
0.0793661997,
-0.0257655606,
0.16782704,
0.0959158838,
-0.1292790025,
-0.086310178,
-0.0490190014,
0.1414649189,
-0.0860995054,
-0.0971283689,
0.1656464636,
-0.1560973227,
0.0525445305,
0.3499756753,
0.0512842126,
0.008799687,
0.6680774093,
-0.0368154794,
0.2858697772,
0.3955478072,
0.1617471576,
-0.0236243084,
0.054087989,
0.7669573426,
0.7463682294,
0.0661249012,
-0.0779031068,
0.1320262551,
-0.1819620728,
0.0664946288,
-0.3291191757,
-0.3671011329,
-0.2042683363,
-0.1462714821,
-0.2567372918,
-0.7162511945,
-0.1572031975,
0.0245054215,
-0.1584973931,
-0.2033134699,
-0.1467433125,
-0.1335707009,
0.0106223524,
-0.272875309,
-0.0699337646,
-0.3388297558,
0.3155475557,
-0.0242834985,
-0.099963963,
0.4305459857,
-0.0234451704,
0.2384317517,
0.4121885598,
0.2002361417,
0.1885686666,
0.3959138989,
-0.3454799652,
0.0806804895,
-0.0005040355,
-0.2542780936,
0.0388815552,
0.1794077158,
-0.132167846,
0.4886131287,
0.2490168065,
0.0578085408,
-0.0644316003,
0.2468820363,
0.0444872528,
0.7353171706,
-0.3102242947,
0.0769421607,
-0.2547955215,
0.0198198557,
0.10258542,
0.0089670792,
-0.2493954599,
-0.210824132,
-0.1092765033,
0.0135482587,
0.153376013,
0.1415676475,
0.1117555723,
-0.1167590916,
0.3674059212,
0.0092893187,
0.3763065934,
-0.209263593,
0.0337287039,
-0.6373872757,
0.0088736005,
0.3327726126,
0.0958688706,
0.2232337594,
-0.039626997,
0.1314701438,
0.3173561096,
0.2348478138,
0.4174256623,
-0.0000525825,
-0.3034649193,
-0.5666861534,
-0.1190752834,
0.2442637235,
0.1538656503,
-0.0076224655,
-0.0659140348,
0.3218995929,
0.0929829329,
0.0182209164,
0.3179986477,
-0.3438113332,
0.2634426951,
0.0750607699,
0.1002883017,
0.2569548786,
0.0346497223,
0.048290804,
-0.0914408118,
0.0513270497,
0.0839146376,
-0.3272608221,
-0.1908597946,
-0.1339076757,
0.4577322006,
0.1618555486,
-0.102899842,
0.0780969113,
0.1582156569,
0.1992509216,
-0.3002578616,
-0.307849288,
0.2193502188,
0.2622332573,
0.0981666818,
-0.0249888562,
0.0775299668,
0.0179366134,
0.3035352528,
-0.265531987,
-0.1424576342,
0.4916684031,
-0.5384702086,
0.2442445755,
-0.0164522044,
0.4995485842,
0.176241681,
-0.1370937228,
-0.1033864319,
-0.1187580973,
0.368296355,
-0.1611116976,
-0.1232272759,
0.082705155,
-0.0310240649,
0.1907951683,
-0.0175490417,
0.1547932327,
0.3163715601,
-0.1636603773,
0.3270503283,
-0.1499860883
] |
https://github.com/huggingface/datasets/issues/2503 | SubjQA wrong boolean values in entries | I have:
- opened an issue in their repo: https://github.com/megagonlabs/SubjQA/issues/3
- written an email to all the paper authors | ## Describe the bug
SubjQA seems to have a boolean that's consistently wrong.
It defines:
- question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective).
- is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective)
However, `is_ques_subjective` seems to have wrong values in the entire dataset.
For instance, in the example in the dataset card, we have:
- "question_subj_level": 2
- "is_ques_subjective": false
However, according to the description, the question should be subjective since the `question_subj_level` is below 4
| 19 | SubjQA wrong boolean values in entries
## Describe the bug
SubjQA seems to have a boolean that's consistently wrong.
It defines:
- question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective).
- is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective)
However, `is_ques_subjective` seems to have wrong values in the entire dataset.
For instance, in the example in the dataset card, we have:
- "question_subj_level": 2
- "is_ques_subjective": false
However, according to the description, the question should be subjective since the `question_subj_level` is below 4
I have:
- opened an issue in their repo: https://github.com/megagonlabs/SubjQA/issues/3
- written an email to all the paper authors | [
0.1710736752,
0.0587354153,
0.0442122705,
0.099144958,
-0.3185439706,
-0.1043599471,
0.099345997,
0.0244082846,
-0.1466469169,
0.2234869301,
-0.0614027306,
0.3840121329,
0.2275162935,
0.2279733419,
-0.2728486955,
0.1101417616,
0.2479694933,
0.1666611433,
-0.0700229555,
-0.1800618172,
-0.4520649314,
0.2599632442,
-0.6040438414,
-0.0405318327,
-0.124443844,
-0.2389922291,
-0.1235724837,
-0.1611757874,
-0.3197337985,
-0.2684791386,
0.0228945091,
-0.002461202,
-0.0706964508,
0.1173535138,
-0.0001112474,
-0.1952677667,
0.0751515031,
0.0176681802,
-0.2246201783,
0.0856109336,
-0.1955977082,
-0.0928517431,
-0.2246857435,
0.040088892,
-0.3261653483,
-0.4419413209,
-0.2020020783,
-0.2190364599,
0.3537074924,
0.0255619735,
0.1417028606,
0.0158054978,
-0.1125526801,
0.2566836178,
0.34051314,
-0.2426412851,
-0.1025823802,
0.2494193166,
-0.0194549859,
-0.045755554,
0.1129644588,
0.3713185787,
0.1074477881,
0.0999767184,
0.0808567256,
-0.0649046972,
-0.0014371499,
-0.2529067993,
0.2693755925,
0.2289805114,
0.3289310634,
-0.146862179,
-0.4584597945,
-0.0965825468,
-0.0855325386,
-0.0976804495,
0.2790672183,
0.0382845327,
0.1127965748,
-0.0264041405,
0.1741399914,
0.4021877944,
0.0861005932,
-0.0118233487,
-0.1140189841,
0.117590189,
-0.1791200638,
-0.0428104028,
-0.1124674156,
-0.133760348,
-0.0495316498,
0.0108836219,
-0.6033583879,
0.1203538924,
-0.4970488548,
-0.0238894001,
0.0368810482,
0.11412628,
-0.1481907219,
-0.3702000082,
0.3033159673,
-0.0532093793,
0.2016268224,
0.2120983601,
0.516777873,
0.2139941007,
0.3768239617,
-0.2153893262,
-0.0588613935,
-0.2195382118,
0.0617489964,
0.0186375286,
0.1607973129,
-0.2832607031,
0.0360875428,
0.0494178049,
0.1375555843,
-0.2750587761,
-0.5347523689,
0.117276445,
-0.4085181355,
-0.0356438719,
0.152028963,
0.0824727044,
0.0522989407,
-0.218277961,
-0.1242638826,
-0.0142755862,
-0.1809727848,
-0.4663913548,
-0.1026124135,
-0.0126756765,
-0.242190063,
0.070466727,
0.0095847473,
-0.0051731467,
-0.032660827,
0.3610461354,
-0.1792067438,
-0.23111476,
-0.0455442891,
-0.319203347,
0.2102465332,
0.1566303521,
-0.257568866,
0.176936686,
0.0184607822,
-0.0885851383,
0.0113790184,
0.3068140745,
0.1314321458,
0.2160137892,
-0.0265002027,
0.1529014856,
-0.0488314889,
-0.01942477,
0.1305797398,
0.3427816629,
0.2295733094,
0.0766576901,
0.097899273,
-0.1246003658,
-0.10844706,
-0.1201661974,
-0.0074979961,
0.0930765942,
-0.5938054323,
-0.0956555754,
0.0028290413,
0.2563055456,
0.0060082003,
0.1614622325,
0.2352576107,
0.3217534125,
0.1038667783,
-0.069682315,
-0.2798697948,
0.1783294082,
-0.4563196301,
0.1051224321,
0.4366205037,
-0.1220437437,
-0.2218265682,
0.2033572495,
0.1472887695,
0.0721245036,
0.1484613419,
0.0606568567,
0.0919767097,
-0.0978628173,
-0.4295604527,
-0.0188795626,
-0.0461561903,
0.1946667135,
-0.1881419718,
-0.0667495877,
0.0751229376,
-0.4497659206,
0.1388596445,
0.2089561224,
-0.2969644964,
0.065131478,
0.4925535023,
-0.4521818161,
0.2907608747,
0.0284888968,
0.1424672008,
0.1890471876,
-0.4601026177,
0.018779438,
0.5386310816,
-0.0874890164,
-0.2166935354,
0.0964654312,
0.0762857199,
-0.1828972697,
0.1264412999,
0.0942379236,
-0.320694387,
0.0440111607,
-0.2463473529,
-0.0723951235,
0.1173852906,
-0.0538818985,
0.1654935181,
-0.1231293753,
-0.0828999579,
0.0102145821,
0.5004788637,
0.3310025036,
0.4476000667,
0.0824005529,
-0.0840768516,
0.1700824499,
0.0918704048,
-0.0996951386,
-0.1469711214,
-0.2126726955,
-0.1487466246,
-0.0451175421,
0.0176736284,
0.5685981512,
-0.0961348563,
0.3559564352,
0.1158237904,
0.4205283523,
0.0681669936,
-0.1510516107,
-0.2987358868,
0.1734165251,
-0.0158577375,
-0.2166255414,
-0.2364974916,
-0.3514856696,
0.1823425442,
0.0784170479,
-0.1122973412,
0.2293712795,
0.2149411142,
0.2402788401,
0.3250105679,
-0.1460168362,
0.3074641228,
-0.1975397021,
0.0135952104,
-0.0615348965,
0.2345063537,
0.3891462684,
0.0415772609,
0.1550032496,
-0.1160534546,
-0.0861488432,
-0.1397909522,
-0.031043889,
0.1661271751,
0.2036785781,
-0.2768191099,
-0.0534089617,
0.040355783,
0.1367257684,
-0.180414781,
0.773811698,
-0.0661964193,
0.0629095435,
-0.2841640115,
0.4080079198,
-0.3262365162,
-0.3555267155,
0.0651526898,
-0.5793984532,
0.0429908037,
-0.1876523197,
0.4197408557,
-0.3421956599,
-0.3711317778,
0.3845450878,
0.4321460724,
0.7168487906,
-0.0835763738,
0.1979314238,
0.0355790108,
-0.0012879781,
-0.548874259,
0.070420526,
-0.0014024004,
-0.2150137872,
0.0272913929,
-0.1356783807,
-0.0908275098,
0.0397351757,
-0.2662622929,
0.1043314338,
0.0013370952,
1.0558437109,
-0.2724153996,
-0.1538788974,
-0.1018536389,
0.1566331089,
-0.0917654335,
0.1692700088,
-0.0083261766,
0.1373542249,
-0.1299720705,
-0.1773164868,
-0.1217777207,
-0.3256254792,
0.1216005832,
-0.007337831,
-0.1755316705,
-0.2254959643,
0.2760754526,
0.4957950711,
-0.0990770981,
-0.3769017756,
0.0817377716,
-0.0282830279,
-0.2469939291,
-0.2265731543,
0.3488764167,
0.0640421584,
-0.5016041994,
-0.0953377485,
-0.1688266993,
0.4532335997,
-0.2941659093,
-0.260714829,
0.303018868,
0.1040577441,
-0.2190979719,
0.3839104772,
-0.3634410501,
-0.1291662902,
-0.3180088103,
-0.1227656305,
-0.1539870054,
-0.641274631,
0.109434478,
0.1728314459,
0.4949542284,
0.0312017351,
0.123087883,
0.2159012556,
-0.1157743186,
0.4156974256,
0.1808376461,
0.296356827,
0.3292667866,
0.3150509,
0.1459966898,
-0.3184508085,
0.4076509476,
-0.0131400824,
-0.2225533426,
0.3915553689,
0.1070998758,
-0.2039830983,
-0.1251977682,
-0.2320002615,
-0.2930090725,
-0.0953901932,
-0.2225008607,
-0.173755303,
-0.0804588497,
0.1478120238,
0.4191001952,
0.0185866952,
-0.0496433824,
0.0072555728,
0.0653141961,
0.1636178643,
-0.0373219699,
-0.0649502799,
-0.1452892125,
0.0865935832,
0.2224620581,
-0.1967711151,
0.4460459948,
0.0981758386,
0.0612529814,
0.0429761484,
-0.0720526576,
0.2515119016,
0.0819989592,
0.1902335584,
0.1813405752,
0.2219101638,
-0.3612620234,
-0.2554589212,
0.0454081818,
0.0373499058,
0.4311314225,
-0.320687294,
-0.0464967191,
0.1578715295,
0.1075586528,
-0.316937238,
-0.3542121351,
-0.4349242449,
-0.5650663376,
-0.0700687543,
0.0910843909,
-0.2530287504,
-0.0687801093,
-0.0058951303,
0.0442946106,
-0.2659393549,
-0.0459986702,
-0.2791157365,
0.0803434402,
0.3241613507,
0.1375289559,
-0.1815164089,
0.3898331821,
0.0832719281,
0.3620138168,
-0.0191580616,
0.22223939,
-0.0041746115,
0.1461883634,
0.0003622212,
-0.1001680195,
-0.0257409513,
-0.0471038595,
-0.1457593292,
0.1756807864,
0.1380997896,
0.005161589,
-0.298178345,
-0.2280024141,
0.1883991063,
0.2918301523,
0.1923451275,
-0.1986015141,
0.5775856972,
-0.2535890639,
-0.3238764405,
0.1643604189,
0.1683273464,
0.0528545007,
0.3784891069,
0.453930974,
0.6912429333,
0.0340015367,
-0.2650209665,
0.0035185739,
-0.4962542951,
0.1727015227,
0.1954562217,
0.1080079079,
-0.3301399946,
0.0022252947,
0.0319643989,
0.0554594696,
0.1138453782,
-0.1201778054,
-0.2493573725,
0.228140682,
-0.0764812827,
0.2382537723,
0.2021414936,
-0.4176891744,
0.0296193939,
0.1498799026,
0.0613119043,
0.1391272247,
0.0793405771,
0.2710898519,
-0.1377519965,
0.0098857321,
0.0082468167,
-0.0124127343,
-0.2050177455,
-0.1198810935,
-0.0636536106,
-0.2108409703,
0.6007063389,
0.0496906638,
-0.1621564031,
0.3443548679,
0.7612617016,
0.0414604992,
-0.1690540165,
0.1809289753,
-0.0063548535,
0.0539401658,
-0.0523572937,
-0.0242301021,
0.3899327517,
-0.1600636691,
-0.2672144175,
-0.035423629,
0.2512815297,
0.120862402,
-0.4943596721,
0.1666124761,
0.1627019346,
-0.0504369214,
0.3389599919,
-0.3811137378,
0.4413520992,
-0.3024435043,
0.1571770012,
0.0596395135,
0.1861141026,
0.2916508913,
-0.2486472428,
-0.0310855135,
-0.2250554711,
0.0086325407,
0.0705896989,
0.4474607706,
0.1469640434,
-0.1963318139,
0.0011983141,
-0.1352939606,
0.1603172719,
0.1021550447,
0.2937579751,
-0.0895490497,
-0.173499763,
-0.3739551306,
-0.1134505942,
0.454618603,
0.3324970603,
0.0349063799,
-0.0810140222,
-0.4279143214,
0.0097931549,
0.1897895038,
-0.3191976249,
-0.0186346155,
0.0535010099,
-0.0060305297,
0.1207751557,
0.4614460766,
-0.2734965384,
-0.3302184045,
-0.1840929985,
-0.136431545,
-0.0317590684,
-0.1606333107,
-0.0649155006,
0.0195147768,
0.0582752526,
-0.2366170585,
-0.0580766797,
-0.1101903617,
-0.2381672114,
0.0738930702,
0.2222916484,
0.1310153008,
-0.2087088376,
-0.1066548973,
-0.0951597169,
-0.0650418103,
-0.1191649139,
-0.1671591997,
0.1784077734,
0.5427188873,
-0.3180457652,
-0.072773397,
-0.0946561098,
0.1349089146,
0.1783763915,
-0.1064406559,
0.0457238145,
-0.0195695162,
-0.0604570992,
-0.0733915269,
-0.1429055035,
0.101495415,
-0.3249174654,
-0.0324071236,
0.1791354418,
-0.1792757213,
0.2557192147,
-0.0481328145,
0.0687510371,
-0.1087822393,
-0.0806979537,
-0.1058295667,
-0.0837051272,
0.1577277631,
-0.2939202487,
-0.2751471698,
-0.5780189633,
0.0810625553,
0.0259184837,
0.2421536744,
0.0658203065,
-0.1607861519,
-0.1154473424,
-0.0842853934,
0.1261683106,
-0.0743291453,
-0.1699786335,
0.1035674065,
-0.1424231678,
0.0622134656,
0.4021683335,
0.0162793621,
0.0114185177,
0.6619753242,
0.0064643174,
0.2706699371,
0.3829730749,
0.1991988868,
-0.0744827092,
0.1442099214,
0.7489560246,
0.7794596553,
0.0877801925,
-0.1546945572,
0.0922626704,
-0.2461013645,
0.0689400434,
-0.2604272664,
-0.3266122043,
-0.1921122223,
-0.1099603325,
-0.2357734442,
-0.7090880871,
-0.1479443312,
0.0614779443,
-0.229894489,
-0.1654641032,
-0.1609169394,
-0.13097395,
-0.0166165084,
-0.2493015379,
-0.0342957042,
-0.3071189821,
0.3857824802,
0.0257287733,
-0.0913103819,
0.4063306451,
-0.0780962855,
0.270938307,
0.3368431032,
0.2180176675,
0.2085645646,
0.4107733965,
-0.3620150685,
0.0342452563,
0.0007551648,
-0.2595655322,
0.0585559607,
0.2109636664,
-0.1715667099,
0.5173899531,
0.189172104,
0.0402592607,
-0.0571143702,
0.239741385,
0.0573120378,
0.7155685425,
-0.3011629581,
0.1196398735,
-0.2480363399,
0.0413653553,
0.0841014683,
0.0089148581,
-0.2025248706,
-0.1839355528,
-0.1601079255,
-0.0255513266,
0.1391833127,
0.0968236774,
0.099587813,
-0.0579675324,
0.3223222792,
-0.0431692041,
0.4640343189,
-0.2075225711,
0.051889345,
-0.5853192806,
-0.0900233537,
0.3276989162,
0.0366401523,
0.2794469297,
0.0311095342,
0.1066710949,
0.4072139859,
0.2393847257,
0.4312260151,
-0.0055292174,
-0.3166001141,
-0.5569552183,
-0.1463938951,
0.223780632,
0.112915732,
-0.0277987085,
-0.1004468799,
0.3361706734,
0.0746725574,
0.0399964675,
0.3453145027,
-0.296759665,
0.2541279495,
0.0569517314,
0.1100656241,
0.2701631784,
-0.0224241167,
0.0659557283,
-0.1521825939,
0.000219387,
0.1862972975,
-0.3042447865,
-0.2631474435,
-0.1038384587,
0.4582397342,
0.1468835771,
-0.1342572868,
0.0556059629,
0.1960707605,
0.2331262678,
-0.3619259596,
-0.2265970111,
0.2175064683,
0.3137881756,
0.08977063,
-0.0526370071,
0.0236258395,
-0.048844222,
0.2905327082,
-0.3144273758,
-0.1801203042,
0.4388243556,
-0.5293755531,
0.2906621695,
-0.0097944625,
0.5312718749,
0.1658745259,
-0.1308618188,
-0.1109354645,
-0.0946589485,
0.3302752376,
-0.1105707511,
-0.1525578797,
0.0244374759,
0.0119885467,
0.189810127,
0.0036700666,
0.1343384683,
0.2634167969,
-0.0979349241,
0.3415635526,
-0.1324796081
] |
https://github.com/huggingface/datasets/issues/2499 | Python Programming Puzzles | Thanks @VictorSanh!
There's also a [notebook](https://aka.ms/python_puzzles) and [demo](https://aka.ms/python_puzzles_study) available now to try out some of the puzzles | ## Adding a Dataset
- **Name:** Python Programming Puzzles
- **Description:** Programming challenge called programming puzzles, as an objective and comprehensive evaluation of program synthesis
- **Paper:** https://arxiv.org/pdf/2106.05784.pdf
- **Data:** https://github.com/microsoft/PythonProgrammingPuzzles ([Scrolling through the data](https://github.com/microsoft/PythonProgrammingPuzzles/blob/main/problems/README.md))
- **Motivation:** Spans a large range of difficulty, problems, and domains. A useful resource for evaluation as we don't have a clear understanding of the abilities and skills of extremely large LMs.
Note: it's a growing dataset (contributions are welcome), so we'll need careful versioning for this dataset.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 17 | Python Programming Puzzles
## Adding a Dataset
- **Name:** Python Programming Puzzles
- **Description:** Programming challenge called programming puzzles, as an objective and comprehensive evaluation of program synthesis
- **Paper:** https://arxiv.org/pdf/2106.05784.pdf
- **Data:** https://github.com/microsoft/PythonProgrammingPuzzles ([Scrolling through the data](https://github.com/microsoft/PythonProgrammingPuzzles/blob/main/problems/README.md))
- **Motivation:** Spans a large range of difficulty, problems, and domains. A useful resource for evaluation as we don't have a clear understanding of the abilities and skills of extremely large LMs.
Note: it's a growing dataset (contributions are welcome), so we'll need careful versioning for this dataset.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Thanks @VictorSanh!
There's also a [notebook](https://aka.ms/python_puzzles) and [demo](https://aka.ms/python_puzzles_study) available now to try out some of the puzzles | [
-0.0690369457,
-0.1561273336,
-0.2759868503,
-0.0527508035,
-0.0006476985,
0.0701650903,
0.0195628386,
0.256218791,
0.003462635,
0.1276415288,
0.0386161655,
0.3095813394,
-0.3876285255,
0.3575746119,
0.2331802845,
-0.3480180204,
-0.0425297618,
-0.0044567287,
-0.0990917385,
0.0490014926,
-0.1924675703,
0.250990063,
-0.1473505944,
-0.0799461901,
0.0459987447,
-0.2655209005,
-0.1827943921,
0.2118450105,
-0.0962317288,
-0.3995167613,
-0.3597231507,
0.0380531065,
-0.1506149769,
0.3561879396,
-0.0000946857,
-0.4483579397,
0.1580720246,
-0.0328321531,
-0.4988931715,
-0.0523063242,
0.1360360682,
-0.2378714085,
-0.1941979378,
-0.172354579,
-0.1147182435,
-0.0105928779,
-0.0551269874,
-0.3561471403,
0.4866497219,
0.2586366832,
0.3744766712,
0.2904417515,
0.2213056535,
-0.0379726402,
0.1492570937,
-0.1286348104,
-0.157435894,
0.2081691325,
0.502933383,
-0.1821866482,
-0.0104112439,
0.0505566299,
0.0969827324,
-0.1274921298,
0.0570480861,
-0.2780984938,
0.0993156284,
-0.5485328436,
-0.1464283168,
0.1003870592,
0.1350399256,
-0.1140145361,
-0.2543658614,
-0.3878378272,
-0.0214347076,
-0.1134716943,
-0.3032559454,
0.2030616999,
-0.2227851152,
0.018184837,
0.0416181423,
-0.1341143698,
-0.0169906095,
-0.0963681042,
0.0912828743,
0.2131258249,
-0.0226303898,
-0.1626650542,
0.1081700176,
-0.1193749309,
-0.1527064443,
0.0314425603,
0.1135201305,
0.2347505987,
-0.0868085921,
-0.2609753311,
0.2708576024,
0.1239232868,
0.0177956596,
0.335564971,
0.1480636597,
-0.0060744262,
0.3773308992,
-0.1028958708,
0.1093335971,
0.0927997679,
-0.1637728512,
-0.0196727533,
-0.0344464034,
0.1125671566,
-0.2922191024,
0.088562876,
-0.0866943151,
-0.1023692638,
0.0563464463,
0.1442159563,
-0.0840297565,
0.1820851713,
-0.1716403663,
0.203360036,
-0.2273286581,
0.0299164131,
-0.0007513743,
0.010750493,
-0.1066902801,
0.0260177106,
-0.0303212889,
0.0574968308,
-0.2994652987,
-0.0056299716,
-0.1562252939,
0.058140479,
-0.3145741224,
-0.1795535833,
0.355458796,
0.0870750621,
0.0416048095,
0.1689747572,
0.0125687774,
-0.2826562524,
0.3062530458,
-0.0045681559,
0.1723783016,
-0.0171374269,
-0.078427203,
-0.3076548576,
0.0100729819,
-0.2725691199,
-0.280899018,
0.1333917081,
0.2779684663,
0.0449202806,
-0.0949023888,
0.3816743791,
-0.1550905704,
0.1056775153,
0.2967669666,
0.3964276314,
-0.1516936272,
0.3133291602,
-0.0206085443,
-0.1080100462,
0.2293014824,
-0.1770499349,
0.2192472368,
0.2873529792,
-0.0541666783,
0.0985069647,
-0.0198066086,
-0.0220544599,
-0.3745413423,
0.1586956531,
0.1215592027,
0.465480119,
-0.1846596897,
0.0024685562,
0.3773062229,
-0.2076588273,
0.1459483057,
0.032000877,
-0.1530907154,
0.0365186632,
0.0253285468,
0.258823216,
0.0556176826,
-0.0200533923,
0.1840393841,
0.314040482,
-0.0406616181,
-0.0831536725,
-0.273620218,
0.0288457051,
-0.1419503391,
0.1271437854,
0.1529227644,
-0.1347586215,
0.032384254,
-0.1064789295,
0.1668424904,
-0.1540446728,
-0.2847519815,
0.1016535163,
0.1968062371,
0.170475781,
0.1061801091,
-0.4948401749,
-0.0954570919,
-0.0782224312,
0.2154522091,
0.209256649,
0.117888853,
-0.0678555593,
-0.1630570143,
0.1954728067,
0.0771311894,
-0.2147102058,
0.3580571413,
-0.1830910742,
0.1555979848,
-0.131241262,
-0.132145375,
0.3327612579,
0.0983532816,
-0.0328270048,
-0.293933779,
0.0650842637,
-0.1366573274,
-0.1323001087,
0.1677355766,
0.4808665812,
-0.0348925926,
0.1765158325,
0.152764976,
0.0091347555,
0.1683672071,
-0.2324341536,
0.081219703,
0.3387719989,
-0.1564699858,
-0.2968169749,
0.1251401901,
0.3188965619,
-0.0220045373,
0.1281386018,
0.333766222,
0.3432987332,
-0.0628282577,
0.1198532283,
0.327359736,
0.0607918575,
-0.0467177406,
-0.015749827,
-0.3352227807,
-0.1780976355,
0.4403579533,
-0.0038233818,
0.2370431572,
-0.0717472509,
-0.3317885101,
0.1878474504,
0.4561132193,
-0.0291135386,
0.2473886311,
-0.1612133831,
-0.1126266718,
0.0585726053,
-0.2232494503,
0.216029048,
0.0277734846,
0.322036773,
0.2059083581,
0.2230836898,
-0.2732075453,
-0.2321783602,
0.1780885011,
0.0639742613,
-0.2333122641,
0.1899661124,
0.1242353246,
0.114408344,
-0.0533994138,
-0.2826057673,
-0.2626925409,
-0.0810925588,
-0.2464056015,
0.2295690477,
-0.1131104529,
-0.1971314847,
-0.2495611012,
0.0127562247,
-0.0888335407,
-0.4756059051,
0.1830378622,
0.1165233254,
-0.2463804632,
-0.0390421972,
0.0415542871,
0.2850765586,
-0.2686410248,
0.1312717199,
0.175901413,
-0.2556347251,
-0.0451753661,
0.3335236013,
0.1024494767,
0.0451790281,
0.7545124292,
-0.4607821703,
0.3017047048,
-0.1164506823,
-0.532143116,
0.0517703258,
-0.0727220923,
0.660795033,
0.3045018613,
-0.026544068,
-0.0186408684,
-0.1703278422,
0.0631329566,
-0.1959263682,
-0.0507188514,
-0.184832871,
0.1850782484,
-0.1605684012,
-0.2132173032,
-0.186085701,
-0.0465308577,
-0.3705587685,
0.3902663291,
0.2063405812,
0.2195364535,
0.0811279714,
-0.0710448921,
0.1906783432,
0.0697573647,
0.1549746543,
-0.0232917294,
-0.1519991457,
0.0968973339,
-0.347481966,
-0.230686754,
-0.1915352345,
-0.4439185858,
0.1147795916,
0.0001650043,
-0.0150545388,
0.0378851108,
-0.0818679333,
0.2155011743,
-0.0263534095,
0.3032612801,
-0.2600442171,
0.1974383891,
-0.2345321476,
-0.207015574,
-0.1931429952,
0.1899800301,
0.1369210482,
0.0737718046,
-0.1756891012,
0.0039852532,
-0.0646066964,
0.5416693687,
0.1444905102,
0.0965864509,
0.1775264591,
-0.0395967811,
0.2368362248,
-0.0356598869,
-0.3107918203,
0.0096796192,
0.1647157669,
-0.1436950266,
0.2343012691,
0.2779712975,
-0.0106763039,
-0.0441382602,
0.0526839271,
-0.2258946449,
-0.0388458632,
0.3063016236,
-0.158750996,
0.1283338815,
-0.0737076625,
0.0262013227,
-0.3611782789,
-0.0159422979,
-0.1870710254,
0.0389971584,
0.0505216345,
-0.0409502909,
0.0347645134,
-0.2494030446,
-0.3102258444,
0.1455375254,
0.1685858369,
-0.0082250778,
0.0812309533,
-0.3296036422,
-0.1815975159,
-0.0434759296,
0.1425542086,
-0.0119509585,
-0.0785712302,
0.3668580949,
0.0096084923,
-0.0375763029,
-0.0309769437,
-0.3742430806,
-0.0176461153,
0.1927548051,
0.3419071436,
0.0150988996,
0.0027151704,
0.0409252942,
0.3311523199,
-0.0868282467,
-0.089955166,
-0.2745041251,
-0.4378646612,
-0.3091592789,
0.1035918966,
0.2543666363,
0.1961684972,
-0.0251271315,
-0.0307610333,
0.0362061337,
-0.1105723381,
0.2938116491,
0.1053561121,
-0.0059823524,
-0.0822007507,
0.1436874419,
-0.2420021147,
-0.0984783694,
-0.0850635245,
0.169328481,
-0.3131099343,
0.1889676005,
0.0329420865,
-0.0483949371,
0.392113626,
0.2157168388,
0.0349284522,
-0.0350555517,
-0.2584020495,
0.3342834115,
-0.3643998504,
-0.0816663504,
0.0917207301,
0.2204822898,
-0.2457789034,
-0.3512531221,
0.0310871042,
-0.12199682,
-0.1132733822,
0.1257787645,
-0.2043557316,
-0.0937827751,
0.1382656544,
0.1394013613,
0.7695463896,
-0.2423823923,
0.1440494359,
0.2465066314,
-0.3516136408,
0.4781211913,
0.0819470659,
0.1643393934,
-0.3154323697,
-0.0308698677,
0.0982630625,
-0.3076475263,
0.1232838258,
0.0670362413,
-0.1559764445,
0.2217409313,
-0.1696430892,
-0.1114578843,
0.0752786621,
0.4630977213,
0.0173100214,
0.0861429125,
-0.4428918958,
0.315877676,
0.0528278984,
0.0239633881,
-0.2839016318,
0.0062363632,
-0.1343146265,
-0.0093879923,
-0.3785089254,
0.0911128968,
-0.1066075861,
0.021301575,
-0.015566553,
-0.1867976487,
0.2088782489,
-0.1206164956,
0.324562937,
0.4761957228,
0.0971526727,
0.0018039842,
0.2171012759,
-0.1232541054,
0.2538089752,
0.1527248174,
0.4604758024,
-0.2643863559,
-0.079858914,
-0.0852971226,
0.2536115348,
-0.1232155636,
-0.3077405095,
-0.0837398916,
0.0708820149,
-0.011984963,
0.0479115583,
0.0312017687,
-0.1383458227,
-0.0562493019,
0.2917150557,
0.1155024618,
-0.1229965165,
0.1712292284,
-0.0439924002,
-0.0851935297,
-0.012080444,
-0.3101010919,
0.0772055387,
-0.0763778612,
0.1873512268,
0.2989388108,
-0.195985809,
-0.4983999729,
-0.0272515193,
-0.0620665103,
0.0277309865,
0.2527609468,
-0.1006311774,
-0.1459802389,
-0.0119408723,
0.0088389292,
0.2668994367,
0.0403584093,
-0.0414744243,
0.0136552677,
-0.2834407985,
0.0384302326,
0.1314190924,
0.1851040125,
-0.3328624964,
0.2243739218,
0.117231153,
0.2479750663,
-0.5505170822,
0.0041111149,
-0.3728103638,
-0.0001517441,
0.0744420439,
-0.3020962775,
-0.4391438365,
0.0567220114,
0.3743458688,
-0.0688628852,
-0.4298591018,
-0.4343462586,
-0.2867398858,
-0.022349447,
-0.2107210159,
-0.0016589537,
0.1870347559,
0.0086106807,
0.0415395312,
-0.1880383193,
-0.1111692786,
-0.067605637,
0.1136835739,
0.1113969535,
0.0959634259,
0.1404608488,
0.0950420722,
0.098785311,
0.0849587023,
0.196241796,
0.0901591554,
0.1185635403,
0.0794279426,
0.0507439524,
-0.1370888054,
0.05024378,
-0.0123638213,
0.1506476104,
-0.0515548959,
0.0267640613,
-0.2211906016,
0.1216376275,
0.1003753319,
0.277579546,
-0.0283701513,
-0.0733614415,
0.2402865887,
0.3897966444,
-0.1823671609,
0.2277123183,
0.1928218156,
-0.2348291874,
0.2318038493,
0.3255147934,
-0.0016311929,
0.0244115591,
-0.1715511978,
-0.1144249141,
0.1474411041,
0.1806930602,
0.326202929,
0.1819064319,
0.156591475,
-0.037913274,
0.0403941274,
-0.0785380751,
0.051246807,
0.0784504637,
-0.1034302041,
0.1659888625,
0.2315859199,
0.0740342438,
0.2153995186,
0.2852216363,
0.254247427,
0.1275485903,
0.108003892,
0.2308656424,
0.0185127035,
0.0074522831,
-0.2453175187,
0.082188338,
-0.075284712,
0.2779006958,
-0.2056856006,
-0.0719240457,
0.313288033,
-0.2913528085,
-0.2342718542,
-0.1108089313,
0.0524082817,
-0.2813008428,
-0.0089151748,
-0.0062078983,
0.2553599179,
-0.1142993569,
-0.1499308944,
0.0054702149,
0.3869016469,
-0.2155784667,
0.1432786733,
0.1367814392,
0.1342476755,
0.0253647175,
0.1762520075,
0.4440716803,
0.1253831834,
-0.4179984331,
0.0775766373,
-0.2172597349,
-0.0695185438,
-0.2213418633,
0.1724797487,
0.111568585,
0.1996083409,
0.2587204576,
0.2700967193,
-0.3019434214,
-0.2827017903,
0.0589903966,
-0.3771443367,
-0.2978941798,
0.3868866563,
-0.1045128331,
-0.1454065293,
-0.0439536273,
0.1012015864,
-0.4862309396,
-0.1802123785,
0.3434891105,
-0.0849164426,
-0.0505054332,
-0.0594290383,
0.1933020353,
-0.0597740971,
0.5083768964,
0.3308283687,
0.6604350209,
-0.09874098,
-0.1256652325,
-0.5089101791,
0.0274066627,
-0.0679130778,
-0.2085276246,
-0.028837502,
0.1555772126,
0.0242197718,
0.2306132019,
-0.0204537287,
0.2452186644,
-0.1169553772,
-0.055317238,
-0.4203050137,
0.2021096349,
0.0966745317,
-0.0789750591,
-0.0023822486,
-0.0157943442,
-0.0422280729,
-0.2822076678,
0.2868260145,
-0.0480556861,
0.0356837362,
0.2877691984,
0.0443809628,
0.1415066421,
0.1029956043,
0.3527121842,
-0.0143935755,
-0.5512962341,
-0.0410050824,
-0.033903271,
-0.1100923717,
0.1887825876,
0.218233183,
0.2595932782,
-0.0630076528,
-0.001713519,
0.081893146,
0.1197581291,
0.2425083369,
0.1526300013,
-0.0231062211,
-0.0692384094,
0.1991021037,
-0.0270718485,
0.0771509483,
0.4572691321,
-0.1705478281,
0.130923003,
-0.0883628428,
-0.23116979,
0.251657337,
-0.1641234905,
-0.4007522762,
-0.2591986358,
0.1849486232,
0.0476104617,
0.1128683537,
-0.4909983873,
-0.0792071521,
0.2659677863,
-0.1039646342,
-0.0158231109,
0.443607837,
-0.1985337734,
0.0322363079,
0.0246872827,
0.035249237,
-0.170540899,
0.0034700856,
-0.0374609195,
-0.2289956659
] |
https://github.com/huggingface/datasets/issues/2498 | Improve torch formatting performance | That’s interesting thanks, let’s see what we can do. Can you detail your last sentence? I’m not sure I understand it well. | **Is your feature request related to a problem? Please describe.**
It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors.
A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs.
The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded.
**Describe the solution you'd like**
Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call.
![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png)
As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call.
Digging a bit deeper into format_batch we can see the following profiler data:
![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png)
Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion.
**Describe alternatives you've considered**
I am not familiar with pyarrow and have not yet considered the alternatives to the current approach.
Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
| 22 | Improve torch formatting performance
**Is your feature request related to a problem? Please describe.**
It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors.
A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs.
The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded.
**Describe the solution you'd like**
Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call.
![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png)
As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call.
Digging a bit deeper into format_batch we can see the following profiler data:
![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png)
Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion.
**Describe alternatives you've considered**
I am not familiar with pyarrow and have not yet considered the alternatives to the current approach.
Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
That’s interesting thanks, let’s see what we can do. Can you detail your last sentence? I’m not sure I understand it well. | [
-0.3501350284,
-0.2402969599,
-0.0736680478,
0.190357253,
0.1027540565,
0.1477068812,
0.2599890232,
0.6868169904,
-0.1211307496,
-0.0641198605,
-0.3566420078,
0.2431408763,
-0.1145985872,
-0.033221744,
0.0663352236,
-0.310111016,
0.0007661693,
0.1003080159,
-0.0678959936,
-0.130862236,
-0.101923719,
-0.424163878,
0.0556782186,
-0.2308925986,
-0.1764648259,
0.1433885396,
-0.0729704276,
0.0049901558,
-0.0147776231,
-0.391408056,
-0.0168024898,
0.2041122168,
0.1916378886,
0.2366556823,
-0.0001087394,
-0.0219623074,
0.1055636853,
0.0298546627,
-0.3094553351,
0.2616171241,
0.3262712359,
-0.3157902062,
0.0545600206,
-0.2053413987,
-0.4622154534,
-0.2044649571,
-0.011554027,
-0.3079182804,
0.0437101535,
0.0324946567,
0.1543280482,
0.2567406297,
-0.3000165522,
0.1878046095,
0.3291626573,
0.4852658808,
-0.1752860397,
0.0986192971,
0.3001519144,
0.0291678235,
-0.5153076649,
0.617962122,
-0.172257781,
-0.0325026996,
0.1771953553,
0.0603692941,
-0.2424560785,
-0.1164500415,
-0.0824213177,
0.4060194492,
0.0325251743,
-0.2445897609,
-0.50075984,
-0.4453504682,
-0.0309531018,
-0.5959243774,
-0.1001468077,
0.1113878712,
-0.2834426165,
0.1466884911,
-0.068033725,
0.0368809253,
-0.1203645617,
-0.0961363688,
-0.0547592603,
0.2587933242,
0.2410729527,
-0.222595945,
0.0905141383,
0.1961138546,
0.4558000863,
-0.1157794967,
0.2760976553,
-0.0045531206,
-0.3522317111,
-0.1666411757,
-0.0236719027,
-0.1867085993,
-0.1529744565,
-0.0668887421,
0.1264795363,
0.5531221628,
-0.0911922529,
-0.0197009332,
-0.2372615188,
0.0375599712,
-0.1032606661,
0.2105922103,
0.1966997981,
-0.118680954,
0.0677640587,
0.1936757118,
-0.0780168027,
-0.0493072495,
-0.3120107651,
0.1427364051,
-0.4815456867,
-0.0842901915,
-0.1862223595,
0.025211066,
-0.1306553483,
-0.1333498359,
0.0409615375,
0.3111972213,
-0.2863077521,
0.194833681,
0.1680843234,
-0.1474619359,
-0.2475613952,
-0.2679264247,
0.0511940159,
0.1703957021,
-0.289352566,
0.0069735497,
0.2033198923,
-0.2458303571,
-0.0934310108,
-0.0709548295,
0.074785918,
0.3887600303,
0.0200323761,
-0.2280968428,
0.4766448438,
-0.0271023363,
-0.0679627955,
0.0136562511,
0.1813702583,
0.5773718357,
-0.2796096206,
0.1573994309,
-0.1916831434,
-0.2062160969,
-0.1592076719,
0.1019588932,
0.0700447708,
0.0073347595,
0.0668838471,
0.3424278498,
0.1331914514,
0.0767202154,
0.1264722645,
-0.2490811497,
-0.3356595635,
-0.1178226322,
0.300101757,
0.3032245934,
-0.1989409626,
-0.0473861694,
0.4758730233,
0.3441789746,
0.4220879376,
0.4858786464,
-0.3000444472,
0.117968902,
-0.0290246382,
0.0072557628,
0.3716582656,
-0.369782567,
-0.1297080219,
0.3484437466,
0.0749131069,
0.270839572,
0.1608397663,
0.1948834956,
0.4046298265,
-0.0059368499,
0.0729748011,
0.3954885006,
0.0082201101,
-0.0499475971,
-0.4824645519,
-0.1739064306,
0.4433811307,
0.3957265019,
0.0574342683,
-0.3865258992,
-0.1188641936,
-0.1047388837,
0.4031052887,
-0.3227178156,
0.1457480043,
0.108986184,
-0.1720589399,
0.1534135193,
0.0151738413,
0.2190544605,
-0.1121950299,
0.224209398,
-0.3645498753,
0.3796461821,
0.0479121953,
-0.1950646937,
0.3231680989,
-0.0361455306,
-0.0039832089,
-0.2554197609,
0.0407076478,
-0.0446180999,
-0.2046024203,
0.025376983,
0.0424454361,
0.3719468415,
-0.2666929066,
0.1153117791,
-0.2319296449,
0.110672757,
0.0529058129,
-0.0528732464,
-0.0534535609,
0.2816495895,
0.0650102124,
-0.0430516563,
-0.0791780278,
0.1298168749,
-0.1343419254,
0.2028244734,
-0.2158797681,
0.1773777753,
0.4185039699,
-0.1259624213,
0.2937960327,
0.1701382697,
-0.0248790793,
-0.1208948046,
-0.4223830998,
0.7661340237,
0.4835482836,
0.1557845026,
-0.1161571369,
-0.2186771929,
-0.2221037149,
0.1484178007,
0.056070365,
0.0844043344,
0.5234326124,
0.136819452,
0.1734046042,
0.0809790865,
-0.4177881479,
0.3712824583,
0.3411576152,
0.0051349029,
-0.1374357939,
0.4363705218,
-0.0785389617,
-0.3662787676,
0.338037312,
-0.5506461263,
-0.0050993189,
0.2330391109,
0.2333678156,
0.0235325713,
-0.0177601259,
-0.0314639956,
0.098376438,
0.0105499905,
-0.0542772934,
0.012683861,
0.2190359682,
0.2533149421,
-0.073250711,
-0.094421044,
-0.1324298382,
0.0236581806,
-0.1572206318,
0.1237856448,
-0.4127210081,
-0.1031664535,
-0.1553758979,
-0.3362689614,
-0.0705450028,
-0.1799099445,
0.0300737433,
0.1377860606,
-0.0285049528,
0.1710877866,
0.0217944905,
0.046973899,
0.0570297763,
-0.2233769745,
-0.1739788353,
-0.1969987601,
-0.0307843089,
0.0338539705,
0.1475592703,
-0.0326290354,
0.369990021,
-0.0069353878,
0.1059629172,
0.0763377622,
-0.2765930891,
0.0485949218,
-0.1336114705,
-0.2551214397,
0.0496093929,
-0.1258973628,
-0.2280783057,
-0.1208020896,
0.0972726941,
0.0017792806,
0.0587241277,
-0.1553660631,
-0.0902634263,
0.1817822903,
-0.0192361251,
-0.2255815864,
-0.2459591925,
-0.3073496222,
-0.0496059619,
-0.1677564681,
0.1565369666,
-0.2041859329,
-0.0283643454,
0.1308834106,
0.2082246989,
0.0456593335,
0.0236806422,
-0.4292764068,
0.4179671109,
-0.2306929529,
-0.1688782424,
-0.401109457,
-0.020250462,
0.0000504013,
0.3673451245,
-0.4472311437,
0.2142146081,
-0.0647431985,
0.1862568259,
-0.2460258007,
-0.1165188029,
0.1445495486,
0.2486152351,
-0.0935692564,
0.0081000626,
0.0720040351,
-0.1541754901,
-0.2329792529,
0.1022164226,
-0.0745998621,
0.30419752,
0.324606806,
0.6840353608,
-0.0617227405,
-0.34579283,
0.102927193,
0.1235020831,
0.104231596,
-0.093337141,
-0.232314527,
0.1221761107,
-0.2074721754,
0.3181698918,
0.3299956024,
-0.0535863638,
-0.217392087,
-0.0138572901,
-0.2203795612,
0.1459464878,
-0.2429203242,
0.6411694288,
-0.4819490612,
0.2805368304,
-0.0943442732,
0.4774985909,
-0.2672188282,
-0.2383502424,
0.2915060818,
-0.0068225749,
0.272803396,
-0.177601099,
0.1038238779,
-0.1798347384,
-0.4914887249,
0.2444354594,
0.3847652674,
0.1953476667,
0.0330887213,
-0.0129565075,
0.1963344216,
-0.0567444526,
0.2656693459,
0.0066432711,
-0.1794696748,
0.1652776301,
-0.52353549,
-0.195119828,
0.0093969256,
-0.0036707669,
-0.0709715188,
-0.0767355859,
0.2761701941,
-0.1187236309,
-0.3965090513,
0.2941376865,
-0.0535487495,
-0.0598529838,
-0.0008517243,
0.051536262,
-0.0114569366,
-0.1247614324,
0.1667720079,
0.0765729696,
-0.0107120574,
-0.211726889,
-0.0574950688,
-0.1102335602,
0.2859824896,
0.3494957089,
0.0255459286,
-0.1026382819,
0.0217124112,
0.117597945,
0.0775160193,
0.3361064196,
0.4761410058,
0.0730552077,
-0.3765405416,
0.0465190224,
-0.0345420763,
-0.0940708816,
0.2185597271,
0.5431830287,
0.094153218,
0.357247442,
-0.295946449,
0.0031488203,
-0.4404728413,
0.1241223142,
0.079910621,
0.016460821,
-0.5305222273,
-0.5308510661,
0.4449135661,
0.0952892229,
-0.0073606819,
0.3080016971,
-0.1986230612,
-0.1722660214,
0.4340581298,
0.4619414806,
1.013272047,
0.0184632335,
0.4371170104,
0.0783795267,
-0.3031278849,
-0.0109504834,
-0.670663476,
0.2412646413,
-0.3993287086,
-0.2291051894,
-0.0166533329,
0.0206780881,
0.1523991823,
-0.0672578216,
0.0205897242,
0.0318230502,
0.1562061906,
0.0996151119,
-0.0527222715,
0.1821582317,
0.2133351713,
-0.7044994831,
-0.2040031403,
0.1137506515,
0.0907500088,
0.1175579429,
-0.0489601865,
-0.2579952478,
-0.1663820148,
0.1905657351,
-0.1383578479,
-0.0450617857,
-0.2100948989,
0.0955525935,
-0.2639066577,
-0.8112203479,
0.3461897671,
0.1180447936,
0.1777117252,
0.1102318391,
0.0089754015,
0.1276234537,
0.1128087342,
0.3375873268,
0.1916223764,
-0.3779074252,
0.3423677087,
-0.0188873336,
0.0039914846,
0.203913331,
0.0453792587,
-0.188549459,
-0.0305915475,
-0.0427063517,
0.2833449543,
-0.1624306738,
0.0899060816,
-0.1114211529,
-0.0500166044,
-0.2463739067,
0.112133652,
0.133896172,
-0.0950404853,
0.246892482,
-0.0048645046,
-0.262727797,
-0.2601155937,
0.5095310211,
0.153536886,
-0.1177703068,
0.1691269279,
0.3207574189,
-0.5200849771,
-0.1520255804,
0.2127375752,
0.452996701,
-0.3142907619,
-0.1394715607,
-0.1035795584,
-0.0857297555,
-0.0949096531,
-0.110652104,
-0.085801959,
-0.1794986725,
-0.1017010137,
0.1357046366,
-0.4016146958,
-0.0884810686,
-0.2072797716,
0.2621750832,
0.0059842095,
0.4504778385,
-0.2052359879,
0.2569231093,
-0.3582397997,
-0.1157366037,
0.1890012473,
0.2031716406,
-0.1223326176,
0.1105041206,
0.1015336514,
0.2365466952,
0.0470126793,
0.3806160092,
-0.0133107044,
-0.1437844038,
-0.211173445,
0.1359449327,
-0.1630243361,
-0.2040037811,
0.1853450239,
0.0713818818,
-0.2378405333,
-0.3986274898,
0.2083636671,
0.1215954721,
0.0794303119,
0.2650214434,
0.1749062538,
0.1456356645,
-0.0116830245,
0.1614356637,
0.0436110646,
0.3500567079,
-0.1312401295,
-0.0331347063,
-0.154723376,
-0.1816765964,
0.0194095448,
0.1629772484,
0.4281506836,
0.0954225361,
0.3320987225,
0.0279597435,
0.0267651379,
-0.186063379,
0.3409813941,
-0.0844898671,
-0.0620811209,
-0.2638730109,
0.3456560075,
0.1365156472,
-0.0907139555,
-0.0626951754,
-0.1355541795,
-0.4172331393,
0.1579435468,
0.1829022765,
0.5511479378,
0.4552228451,
0.1613771319,
-0.0611740202,
0.0412169211,
-0.2157765329,
-0.1608436406,
0.4734090865,
0.2522918582,
-0.0158942714,
0.294606775,
0.0607481673,
0.1728648841,
0.1979302764,
0.1669099629,
0.5242635608,
0.4437016249,
0.2266334146,
-0.1603256315,
-0.2803913951,
-0.2760702074,
0.0749758035,
0.0950400531,
0.4341543913,
-0.1632956862,
0.2683141232,
-0.0126119908,
-0.4638893008,
0.1848494411,
0.5748339295,
-0.24232544,
-0.0748645738,
0.2102376074,
-0.0191639885,
-0.3495025635,
0.0930140018,
-0.1050721109,
-0.0751006007,
-0.0156533383,
0.3138202131,
0.0348404497,
0.0191512704,
0.116443634,
-0.1667735875,
0.4328151941,
-0.2130880654,
-0.0587467104,
0.0340815708,
0.0050266664,
-0.0648339987,
-0.055548951,
0.2003890127,
-0.0976638645,
-0.37714082,
-0.0379992388,
-0.2076566219,
0.1153810844,
0.1750667095,
0.0863943845,
-0.047186587,
-0.2225122154,
0.3377093375,
0.0271605439,
-0.1881808192,
0.0681811124,
0.0210091099,
-0.0788610503,
-0.064423725,
0.1969482303,
0.3674181998,
-0.1713654995,
-0.2173266709,
-0.3684088886,
-0.2444448918,
-0.1997158378,
0.5486779213,
-0.0873467177,
-0.0335330591,
0.095593594,
0.1014815867,
0.0862169564,
0.6552402377,
0.0800396651,
0.1004411876,
-0.3057166636,
-0.1001805514,
-0.0198480561,
-0.0347768776,
-0.0303323939,
-0.1363443285,
0.0663212538,
-0.0353639014,
0.2537302673,
-0.0160554759,
-0.0654063001,
-0.1982384771,
0.2522164881,
0.342179507,
-0.3151413798,
0.1931944489,
-0.5118899345,
0.1501817107,
-0.1294437051,
-0.2208767682,
0.2189541608,
0.2018658221,
0.0827888548,
-0.2830981016,
-0.1504085958,
0.2201898992,
0.1271343231,
0.4697139263,
-0.0993737504,
0.0384240113,
-0.16377303,
-0.2426308095,
-0.1156157851,
0.1785307229,
-0.1564410627,
0.1788857132,
0.1588067114,
0.3668153584,
0.1120526493,
-0.5914254189,
-0.2831096947,
0.6362102628,
0.1218943,
-0.1333906502,
-0.1297864318,
0.301138103,
-0.1914128959,
-0.008940123,
0.1173379198,
0.3214927912,
0.4039704204,
0.1156475842,
-0.6210431457,
-0.259151876,
0.3328732848,
-0.2074283957,
-0.0719588026,
-0.1597022116,
-0.0799204707,
0.2690052986,
0.5017654896,
-0.7551472187,
-0.1231009364,
0.1283415258,
0.09595792,
-0.0990818366,
0.3250201046,
0.3227868676,
0.0367258936,
-0.3005057573,
-0.0376774929,
-0.1567611098,
-0.0169450827,
-0.312545687,
-0.2917816639
] |
https://github.com/huggingface/datasets/issues/2498 | Improve torch formatting performance | Hi ! I just re-ran a quick benchmark and using `to_numpy()` seems to be faster now:
```python
import pyarrow as pa # I used pyarrow 3.0.0
import numpy as np
n, max_length = 1_000, 512
low, high, size = 0, 2 << 16, (n, max_length)
table = pa.Table.from_pydict({
"input_ids": np.random.default_rng(42).integers(low=low, high=high, size=size).tolist()
})
%%timeit
_ = table.to_pandas()["input_ids"].to_numpy()
# 1.44 ms ± 80.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
%%timeit
_ = table["input_ids"].to_pandas().to_numpy()
# 461 µs ± 14.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
%%timeit
_ = table["input_ids"].to_numpy()
# 317 µs ± 5.06 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
```
Currently the conversion from arrow to numpy is done in the NumpyArrowExtractor here:
https://github.com/huggingface/datasets/blob/d6d0ede9486ffad7944642ca9a326e058b676788/src/datasets/formatting/formatting.py#L143-L166
Let's update the NumpyArrowExtractor to call `to_numpy` directly and see how our github benchmarks evolve ?__ | **Is your feature request related to a problem? Please describe.**
It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors.
A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs.
The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded.
**Describe the solution you'd like**
Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call.
![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png)
As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call.
Digging a bit deeper into format_batch we can see the following profiler data:
![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png)
Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion.
**Describe alternatives you've considered**
I am not familiar with pyarrow and have not yet considered the alternatives to the current approach.
Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
| 150 | Improve torch formatting performance
**Is your feature request related to a problem? Please describe.**
It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors.
A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs.
The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded.
**Describe the solution you'd like**
Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call.
![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png)
As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call.
Digging a bit deeper into format_batch we can see the following profiler data:
![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png)
Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion.
**Describe alternatives you've considered**
I am not familiar with pyarrow and have not yet considered the alternatives to the current approach.
Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
Hi ! I just re-ran a quick benchmark and using `to_numpy()` seems to be faster now:
```python
import pyarrow as pa # I used pyarrow 3.0.0
import numpy as np
n, max_length = 1_000, 512
low, high, size = 0, 2 << 16, (n, max_length)
table = pa.Table.from_pydict({
"input_ids": np.random.default_rng(42).integers(low=low, high=high, size=size).tolist()
})
%%timeit
_ = table.to_pandas()["input_ids"].to_numpy()
# 1.44 ms ± 80.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
%%timeit
_ = table["input_ids"].to_pandas().to_numpy()
# 461 µs ± 14.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
%%timeit
_ = table["input_ids"].to_numpy()
# 317 µs ± 5.06 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
```
Currently the conversion from arrow to numpy is done in the NumpyArrowExtractor here:
https://github.com/huggingface/datasets/blob/d6d0ede9486ffad7944642ca9a326e058b676788/src/datasets/formatting/formatting.py#L143-L166
Let's update the NumpyArrowExtractor to call `to_numpy` directly and see how our github benchmarks evolve ?__ | [
-0.3501350284,
-0.2402969599,
-0.0736680478,
0.190357253,
0.1027540565,
0.1477068812,
0.2599890232,
0.6868169904,
-0.1211307496,
-0.0641198605,
-0.3566420078,
0.2431408763,
-0.1145985872,
-0.033221744,
0.0663352236,
-0.310111016,
0.0007661693,
0.1003080159,
-0.0678959936,
-0.130862236,
-0.101923719,
-0.424163878,
0.0556782186,
-0.2308925986,
-0.1764648259,
0.1433885396,
-0.0729704276,
0.0049901558,
-0.0147776231,
-0.391408056,
-0.0168024898,
0.2041122168,
0.1916378886,
0.2366556823,
-0.0001087394,
-0.0219623074,
0.1055636853,
0.0298546627,
-0.3094553351,
0.2616171241,
0.3262712359,
-0.3157902062,
0.0545600206,
-0.2053413987,
-0.4622154534,
-0.2044649571,
-0.011554027,
-0.3079182804,
0.0437101535,
0.0324946567,
0.1543280482,
0.2567406297,
-0.3000165522,
0.1878046095,
0.3291626573,
0.4852658808,
-0.1752860397,
0.0986192971,
0.3001519144,
0.0291678235,
-0.5153076649,
0.617962122,
-0.172257781,
-0.0325026996,
0.1771953553,
0.0603692941,
-0.2424560785,
-0.1164500415,
-0.0824213177,
0.4060194492,
0.0325251743,
-0.2445897609,
-0.50075984,
-0.4453504682,
-0.0309531018,
-0.5959243774,
-0.1001468077,
0.1113878712,
-0.2834426165,
0.1466884911,
-0.068033725,
0.0368809253,
-0.1203645617,
-0.0961363688,
-0.0547592603,
0.2587933242,
0.2410729527,
-0.222595945,
0.0905141383,
0.1961138546,
0.4558000863,
-0.1157794967,
0.2760976553,
-0.0045531206,
-0.3522317111,
-0.1666411757,
-0.0236719027,
-0.1867085993,
-0.1529744565,
-0.0668887421,
0.1264795363,
0.5531221628,
-0.0911922529,
-0.0197009332,
-0.2372615188,
0.0375599712,
-0.1032606661,
0.2105922103,
0.1966997981,
-0.118680954,
0.0677640587,
0.1936757118,
-0.0780168027,
-0.0493072495,
-0.3120107651,
0.1427364051,
-0.4815456867,
-0.0842901915,
-0.1862223595,
0.025211066,
-0.1306553483,
-0.1333498359,
0.0409615375,
0.3111972213,
-0.2863077521,
0.194833681,
0.1680843234,
-0.1474619359,
-0.2475613952,
-0.2679264247,
0.0511940159,
0.1703957021,
-0.289352566,
0.0069735497,
0.2033198923,
-0.2458303571,
-0.0934310108,
-0.0709548295,
0.074785918,
0.3887600303,
0.0200323761,
-0.2280968428,
0.4766448438,
-0.0271023363,
-0.0679627955,
0.0136562511,
0.1813702583,
0.5773718357,
-0.2796096206,
0.1573994309,
-0.1916831434,
-0.2062160969,
-0.1592076719,
0.1019588932,
0.0700447708,
0.0073347595,
0.0668838471,
0.3424278498,
0.1331914514,
0.0767202154,
0.1264722645,
-0.2490811497,
-0.3356595635,
-0.1178226322,
0.300101757,
0.3032245934,
-0.1989409626,
-0.0473861694,
0.4758730233,
0.3441789746,
0.4220879376,
0.4858786464,
-0.3000444472,
0.117968902,
-0.0290246382,
0.0072557628,
0.3716582656,
-0.369782567,
-0.1297080219,
0.3484437466,
0.0749131069,
0.270839572,
0.1608397663,
0.1948834956,
0.4046298265,
-0.0059368499,
0.0729748011,
0.3954885006,
0.0082201101,
-0.0499475971,
-0.4824645519,
-0.1739064306,
0.4433811307,
0.3957265019,
0.0574342683,
-0.3865258992,
-0.1188641936,
-0.1047388837,
0.4031052887,
-0.3227178156,
0.1457480043,
0.108986184,
-0.1720589399,
0.1534135193,
0.0151738413,
0.2190544605,
-0.1121950299,
0.224209398,
-0.3645498753,
0.3796461821,
0.0479121953,
-0.1950646937,
0.3231680989,
-0.0361455306,
-0.0039832089,
-0.2554197609,
0.0407076478,
-0.0446180999,
-0.2046024203,
0.025376983,
0.0424454361,
0.3719468415,
-0.2666929066,
0.1153117791,
-0.2319296449,
0.110672757,
0.0529058129,
-0.0528732464,
-0.0534535609,
0.2816495895,
0.0650102124,
-0.0430516563,
-0.0791780278,
0.1298168749,
-0.1343419254,
0.2028244734,
-0.2158797681,
0.1773777753,
0.4185039699,
-0.1259624213,
0.2937960327,
0.1701382697,
-0.0248790793,
-0.1208948046,
-0.4223830998,
0.7661340237,
0.4835482836,
0.1557845026,
-0.1161571369,
-0.2186771929,
-0.2221037149,
0.1484178007,
0.056070365,
0.0844043344,
0.5234326124,
0.136819452,
0.1734046042,
0.0809790865,
-0.4177881479,
0.3712824583,
0.3411576152,
0.0051349029,
-0.1374357939,
0.4363705218,
-0.0785389617,
-0.3662787676,
0.338037312,
-0.5506461263,
-0.0050993189,
0.2330391109,
0.2333678156,
0.0235325713,
-0.0177601259,
-0.0314639956,
0.098376438,
0.0105499905,
-0.0542772934,
0.012683861,
0.2190359682,
0.2533149421,
-0.073250711,
-0.094421044,
-0.1324298382,
0.0236581806,
-0.1572206318,
0.1237856448,
-0.4127210081,
-0.1031664535,
-0.1553758979,
-0.3362689614,
-0.0705450028,
-0.1799099445,
0.0300737433,
0.1377860606,
-0.0285049528,
0.1710877866,
0.0217944905,
0.046973899,
0.0570297763,
-0.2233769745,
-0.1739788353,
-0.1969987601,
-0.0307843089,
0.0338539705,
0.1475592703,
-0.0326290354,
0.369990021,
-0.0069353878,
0.1059629172,
0.0763377622,
-0.2765930891,
0.0485949218,
-0.1336114705,
-0.2551214397,
0.0496093929,
-0.1258973628,
-0.2280783057,
-0.1208020896,
0.0972726941,
0.0017792806,
0.0587241277,
-0.1553660631,
-0.0902634263,
0.1817822903,
-0.0192361251,
-0.2255815864,
-0.2459591925,
-0.3073496222,
-0.0496059619,
-0.1677564681,
0.1565369666,
-0.2041859329,
-0.0283643454,
0.1308834106,
0.2082246989,
0.0456593335,
0.0236806422,
-0.4292764068,
0.4179671109,
-0.2306929529,
-0.1688782424,
-0.401109457,
-0.020250462,
0.0000504013,
0.3673451245,
-0.4472311437,
0.2142146081,
-0.0647431985,
0.1862568259,
-0.2460258007,
-0.1165188029,
0.1445495486,
0.2486152351,
-0.0935692564,
0.0081000626,
0.0720040351,
-0.1541754901,
-0.2329792529,
0.1022164226,
-0.0745998621,
0.30419752,
0.324606806,
0.6840353608,
-0.0617227405,
-0.34579283,
0.102927193,
0.1235020831,
0.104231596,
-0.093337141,
-0.232314527,
0.1221761107,
-0.2074721754,
0.3181698918,
0.3299956024,
-0.0535863638,
-0.217392087,
-0.0138572901,
-0.2203795612,
0.1459464878,
-0.2429203242,
0.6411694288,
-0.4819490612,
0.2805368304,
-0.0943442732,
0.4774985909,
-0.2672188282,
-0.2383502424,
0.2915060818,
-0.0068225749,
0.272803396,
-0.177601099,
0.1038238779,
-0.1798347384,
-0.4914887249,
0.2444354594,
0.3847652674,
0.1953476667,
0.0330887213,
-0.0129565075,
0.1963344216,
-0.0567444526,
0.2656693459,
0.0066432711,
-0.1794696748,
0.1652776301,
-0.52353549,
-0.195119828,
0.0093969256,
-0.0036707669,
-0.0709715188,
-0.0767355859,
0.2761701941,
-0.1187236309,
-0.3965090513,
0.2941376865,
-0.0535487495,
-0.0598529838,
-0.0008517243,
0.051536262,
-0.0114569366,
-0.1247614324,
0.1667720079,
0.0765729696,
-0.0107120574,
-0.211726889,
-0.0574950688,
-0.1102335602,
0.2859824896,
0.3494957089,
0.0255459286,
-0.1026382819,
0.0217124112,
0.117597945,
0.0775160193,
0.3361064196,
0.4761410058,
0.0730552077,
-0.3765405416,
0.0465190224,
-0.0345420763,
-0.0940708816,
0.2185597271,
0.5431830287,
0.094153218,
0.357247442,
-0.295946449,
0.0031488203,
-0.4404728413,
0.1241223142,
0.079910621,
0.016460821,
-0.5305222273,
-0.5308510661,
0.4449135661,
0.0952892229,
-0.0073606819,
0.3080016971,
-0.1986230612,
-0.1722660214,
0.4340581298,
0.4619414806,
1.013272047,
0.0184632335,
0.4371170104,
0.0783795267,
-0.3031278849,
-0.0109504834,
-0.670663476,
0.2412646413,
-0.3993287086,
-0.2291051894,
-0.0166533329,
0.0206780881,
0.1523991823,
-0.0672578216,
0.0205897242,
0.0318230502,
0.1562061906,
0.0996151119,
-0.0527222715,
0.1821582317,
0.2133351713,
-0.7044994831,
-0.2040031403,
0.1137506515,
0.0907500088,
0.1175579429,
-0.0489601865,
-0.2579952478,
-0.1663820148,
0.1905657351,
-0.1383578479,
-0.0450617857,
-0.2100948989,
0.0955525935,
-0.2639066577,
-0.8112203479,
0.3461897671,
0.1180447936,
0.1777117252,
0.1102318391,
0.0089754015,
0.1276234537,
0.1128087342,
0.3375873268,
0.1916223764,
-0.3779074252,
0.3423677087,
-0.0188873336,
0.0039914846,
0.203913331,
0.0453792587,
-0.188549459,
-0.0305915475,
-0.0427063517,
0.2833449543,
-0.1624306738,
0.0899060816,
-0.1114211529,
-0.0500166044,
-0.2463739067,
0.112133652,
0.133896172,
-0.0950404853,
0.246892482,
-0.0048645046,
-0.262727797,
-0.2601155937,
0.5095310211,
0.153536886,
-0.1177703068,
0.1691269279,
0.3207574189,
-0.5200849771,
-0.1520255804,
0.2127375752,
0.452996701,
-0.3142907619,
-0.1394715607,
-0.1035795584,
-0.0857297555,
-0.0949096531,
-0.110652104,
-0.085801959,
-0.1794986725,
-0.1017010137,
0.1357046366,
-0.4016146958,
-0.0884810686,
-0.2072797716,
0.2621750832,
0.0059842095,
0.4504778385,
-0.2052359879,
0.2569231093,
-0.3582397997,
-0.1157366037,
0.1890012473,
0.2031716406,
-0.1223326176,
0.1105041206,
0.1015336514,
0.2365466952,
0.0470126793,
0.3806160092,
-0.0133107044,
-0.1437844038,
-0.211173445,
0.1359449327,
-0.1630243361,
-0.2040037811,
0.1853450239,
0.0713818818,
-0.2378405333,
-0.3986274898,
0.2083636671,
0.1215954721,
0.0794303119,
0.2650214434,
0.1749062538,
0.1456356645,
-0.0116830245,
0.1614356637,
0.0436110646,
0.3500567079,
-0.1312401295,
-0.0331347063,
-0.154723376,
-0.1816765964,
0.0194095448,
0.1629772484,
0.4281506836,
0.0954225361,
0.3320987225,
0.0279597435,
0.0267651379,
-0.186063379,
0.3409813941,
-0.0844898671,
-0.0620811209,
-0.2638730109,
0.3456560075,
0.1365156472,
-0.0907139555,
-0.0626951754,
-0.1355541795,
-0.4172331393,
0.1579435468,
0.1829022765,
0.5511479378,
0.4552228451,
0.1613771319,
-0.0611740202,
0.0412169211,
-0.2157765329,
-0.1608436406,
0.4734090865,
0.2522918582,
-0.0158942714,
0.294606775,
0.0607481673,
0.1728648841,
0.1979302764,
0.1669099629,
0.5242635608,
0.4437016249,
0.2266334146,
-0.1603256315,
-0.2803913951,
-0.2760702074,
0.0749758035,
0.0950400531,
0.4341543913,
-0.1632956862,
0.2683141232,
-0.0126119908,
-0.4638893008,
0.1848494411,
0.5748339295,
-0.24232544,
-0.0748645738,
0.2102376074,
-0.0191639885,
-0.3495025635,
0.0930140018,
-0.1050721109,
-0.0751006007,
-0.0156533383,
0.3138202131,
0.0348404497,
0.0191512704,
0.116443634,
-0.1667735875,
0.4328151941,
-0.2130880654,
-0.0587467104,
0.0340815708,
0.0050266664,
-0.0648339987,
-0.055548951,
0.2003890127,
-0.0976638645,
-0.37714082,
-0.0379992388,
-0.2076566219,
0.1153810844,
0.1750667095,
0.0863943845,
-0.047186587,
-0.2225122154,
0.3377093375,
0.0271605439,
-0.1881808192,
0.0681811124,
0.0210091099,
-0.0788610503,
-0.064423725,
0.1969482303,
0.3674181998,
-0.1713654995,
-0.2173266709,
-0.3684088886,
-0.2444448918,
-0.1997158378,
0.5486779213,
-0.0873467177,
-0.0335330591,
0.095593594,
0.1014815867,
0.0862169564,
0.6552402377,
0.0800396651,
0.1004411876,
-0.3057166636,
-0.1001805514,
-0.0198480561,
-0.0347768776,
-0.0303323939,
-0.1363443285,
0.0663212538,
-0.0353639014,
0.2537302673,
-0.0160554759,
-0.0654063001,
-0.1982384771,
0.2522164881,
0.342179507,
-0.3151413798,
0.1931944489,
-0.5118899345,
0.1501817107,
-0.1294437051,
-0.2208767682,
0.2189541608,
0.2018658221,
0.0827888548,
-0.2830981016,
-0.1504085958,
0.2201898992,
0.1271343231,
0.4697139263,
-0.0993737504,
0.0384240113,
-0.16377303,
-0.2426308095,
-0.1156157851,
0.1785307229,
-0.1564410627,
0.1788857132,
0.1588067114,
0.3668153584,
0.1120526493,
-0.5914254189,
-0.2831096947,
0.6362102628,
0.1218943,
-0.1333906502,
-0.1297864318,
0.301138103,
-0.1914128959,
-0.008940123,
0.1173379198,
0.3214927912,
0.4039704204,
0.1156475842,
-0.6210431457,
-0.259151876,
0.3328732848,
-0.2074283957,
-0.0719588026,
-0.1597022116,
-0.0799204707,
0.2690052986,
0.5017654896,
-0.7551472187,
-0.1231009364,
0.1283415258,
0.09595792,
-0.0990818366,
0.3250201046,
0.3227868676,
0.0367258936,
-0.3005057573,
-0.0376774929,
-0.1567611098,
-0.0169450827,
-0.312545687,
-0.2917816639
] |