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/2945 | Protect master branch | @lhoestq now the 2 are implemented.
Please note that for the the second protection, finally I have chosen to protect the master branch only from **merge commits** (see update comment above), so no need to disable/re-enable the protection on each release (direct commits, different from merge commits, can be pushed to the remote master branch; and eventually reverted without messing up the repo history). | After accidental merge commit (91c55355b634d0dc73350a7ddee1a6776dbbdd69) into `datasets` master branch, all commits present in the feature branch were permanently added to `datasets` master branch history, as e.g.:
- 00cc036fea7c7745cfe722360036ed306796a3f2
- 13ae8c98602bbad8197de3b9b425f4c78f582af1
- ...
I propose to protect our master branch, so that we avoid we can accidentally make this kind of mistakes in the future:
- [x] For Pull Requests using GitHub, allow only squash merging, so that only a single commit per Pull Request is merged into the master branch
- Currently, simple merge commits are already disabled
- I propose to disable rebase merging as well
- ~~Protect the master branch from direct pushes (to avoid accidentally pushing of merge commits)~~
- ~~This protection would reject direct pushes to master branch~~
- ~~If so, for each release (when we need to commit directly to the master branch), we should previously disable the protection and re-enable it again after the release~~
- [x] Protect the master branch only from direct pushing of **merge commits**
- GitHub offers the possibility to protect the master branch only from merge commits (which are the ones that introduce all the commits from the feature branch into the master branch).
- No need to disable/re-enable this protection on each release
This purpose of this Issue is to open a discussion about this problem and to agree in a solution. | 64 | Protect master branch
After accidental merge commit (91c55355b634d0dc73350a7ddee1a6776dbbdd69) into `datasets` master branch, all commits present in the feature branch were permanently added to `datasets` master branch history, as e.g.:
- 00cc036fea7c7745cfe722360036ed306796a3f2
- 13ae8c98602bbad8197de3b9b425f4c78f582af1
- ...
I propose to protect our master branch, so that we avoid we can accidentally make this kind of mistakes in the future:
- [x] For Pull Requests using GitHub, allow only squash merging, so that only a single commit per Pull Request is merged into the master branch
- Currently, simple merge commits are already disabled
- I propose to disable rebase merging as well
- ~~Protect the master branch from direct pushes (to avoid accidentally pushing of merge commits)~~
- ~~This protection would reject direct pushes to master branch~~
- ~~If so, for each release (when we need to commit directly to the master branch), we should previously disable the protection and re-enable it again after the release~~
- [x] Protect the master branch only from direct pushing of **merge commits**
- GitHub offers the possibility to protect the master branch only from merge commits (which are the ones that introduce all the commits from the feature branch into the master branch).
- No need to disable/re-enable this protection on each release
This purpose of this Issue is to open a discussion about this problem and to agree in a solution.
@lhoestq now the 2 are implemented.
Please note that for the the second protection, finally I have chosen to protect the master branch only from **merge commits** (see update comment above), so no need to disable/re-enable the protection on each release (direct commits, different from merge commits, can be pushed to the remote master branch; and eventually reverted without messing up the repo history). | [
-0.1553196907,
-0.1002302244,
-0.0703211576,
-0.0798171014,
-0.1042536274,
-0.1879872978,
0.010403702,
0.2728639543,
-0.0098490976,
-0.0841396898,
0.2926149666,
-0.0778749511,
-0.1324568242,
0.2158906311,
-0.0562291816,
0.1705456823,
0.2003229409,
-0.0407976881,
-0.0923327506,
0.0279234499,
0.022608377,
-0.068702966,
0.083200261,
0.043630518,
-0.1837822497,
0.005400816,
-0.0148118101,
0.1564962417,
-0.4397662878,
-0.4695701003,
0.1452461928,
0.2322402894,
0.025106214,
0.5705345869,
-0.0001043637,
-0.0003454536,
0.1694867164,
-0.0406007245,
-0.1401026398,
-0.2154635787,
-0.4901071191,
-0.4447952211,
-0.0700631961,
-0.0083541572,
0.1288065612,
0.0528679639,
-0.132500127,
0.0238453001,
0.3848451376,
0.1055523828,
0.2386110425,
-0.1028514579,
0.1812401265,
0.0137692541,
0.3920086026,
0.547452569,
-0.0666347072,
0.3031994402,
0.0540182739,
0.0006758235,
0.0611056946,
0.1741086245,
-0.082372427,
-0.2866697907,
0.2270195484,
-0.1779911816,
0.5181742311,
-0.4243532717,
-0.2415837348,
-0.0831172615,
0.0523793474,
-0.1781464219,
-0.4089039564,
-0.241936788,
-0.1499474496,
0.0076339841,
0.0677804947,
0.2468640208,
0.0397399627,
0.0036498865,
-0.3773655295,
-0.2718090415,
-0.004407756,
0.0492043719,
0.1419407725,
-0.1626292467,
0.0664263889,
-0.1270382851,
0.2942225039,
-0.0473279059,
-0.1469835639,
-0.3676343262,
-0.2413336635,
-0.0125877634,
-0.1026131809,
-0.1957471967,
-0.2462064922,
-0.3248275518,
0.4251306653,
0.3889689147,
-0.3832729161,
0.0137398429,
-0.0304894838,
-0.0810164139,
0.207185179,
0.1178582534,
-0.0104902275,
0.0584888235,
0.5307134986,
0.3144406974,
0.0051583126,
0.3255857229,
0.3015701175,
0.0030474477,
0.0344461277,
0.5741183162,
0.4289449751,
-0.262920469,
0.1276475191,
0.1959736943,
-0.3412005603,
-0.3845079243,
0.0711311847,
-0.086172089,
0.1103257611,
0.0271335281,
-0.1147115231,
0.0668014362,
0.0451907441,
-0.0380863994,
-0.3079028428,
-0.1414854825,
-0.3744004369,
-0.0685302094,
0.1860403866,
-0.4571045637,
0.1491677165,
0.4325240254,
-0.0680370554,
-0.199284181,
0.0445524901,
0.1292254925,
0.0555874109,
0.2961195409,
-0.1537979245,
-0.4526281357,
0.2235966325,
0.1313330233,
-0.0668997169,
0.194004178,
-0.1598995775,
-0.2616217434,
-0.1049758047,
0.2977659702,
-0.1482722312,
0.3071559072,
-0.523766458,
0.03637309,
-0.0044835657,
0.3506705761,
0.4910375178,
0.3025480807,
0.3280783296,
-0.1685935706,
0.0617564917,
0.1903456151,
0.3235116601,
-0.0516864583,
0.0623042136,
-0.2877365053,
0.1095034257,
0.1450733691,
-0.3121601641,
0.0175556634,
-0.0052361824,
-0.1312821805,
0.0107762292,
-0.0714069754,
-0.1119880378,
-0.098929286,
-0.3666859269,
0.0694026873,
-0.0407375954,
-0.1007769406,
0.2079570442,
-0.3201758564,
-0.0947938636,
0.205081895,
-0.1481234133,
0.0208984315,
-0.2919873893,
-0.6061382294,
-0.1636559516,
-0.0634389222,
0.1249144822,
0.2275641412,
0.3607693613,
-0.0050312988,
-0.0283613615,
-0.1714022607,
-0.009397408,
0.1125068367,
0.3421368003,
-0.1496780962,
-0.2415419072,
0.1322465837,
-0.3545881212,
0.091140613,
-0.0785118267,
-0.0097749047,
0.0344482884,
-0.3157883883,
0.3412796855,
-0.0440525971,
-0.1208015978,
-0.1141507775,
0.2415171564,
0.0959514603,
-0.1747334599,
-0.2039213181,
-0.2074066252,
0.2601908445,
-0.2408303171,
0.3018656671,
0.1300137788,
0.1026374176,
-0.1411807537,
-0.036453113,
-0.0250962898,
0.3619363308,
0.2363044173,
-0.0899173692,
-0.0591583997,
0.168760851,
-0.0490628257,
0.2035703808,
0.2246948034,
0.425242424,
0.3736156225,
-0.1026817039,
0.0626012236,
-0.091792725,
-0.0787246376,
0.0245946124,
-0.3291273415,
0.3280376196,
0.0736942887,
-0.1394644529,
-0.1740319133,
-0.1033323854,
-0.1740739644,
-0.2202689946,
-0.1707725227,
-0.0129516497,
-0.1690977365,
0.194364801,
-0.3365916014,
0.2223694026,
-0.2772078812,
0.1485798657,
0.015052475,
-0.2516067922,
-0.1024009362,
0.0682979077,
-0.0059674382,
-0.1327148974,
0.1241710931,
0.3773834109,
0.1278745532,
0.1701000631,
0.004274508,
0.0201515388,
0.2572822571,
-0.1164359599,
0.3533256054,
0.1443069577,
-0.1054450795,
0.0540641136,
0.3364559412,
0.1812186539,
0.0643320307,
0.346919477,
-0.0033243559,
0.0352583304,
-0.208406806,
-0.0459842533,
-0.2602105737,
-0.5283414721,
0.2192375958,
-0.1106379479,
-0.3552160859,
-0.0085042305,
-0.0453657992,
0.0474182665,
-0.5248721242,
0.1360301524,
0.1835808158,
0.2905260623,
-0.317802906,
-0.1199781969,
0.1263159215,
-0.0225954037,
0.0123442393,
0.1285601258,
0.363160044,
-0.2266808748,
0.4594512582,
0.2389811426,
-0.1695563346,
-0.4726403058,
-0.3434129953,
0.0191300288,
-0.2039362043,
-0.1179745346,
0.0098188072,
-0.098930642,
0.0921540707,
-0.3585399389,
-0.3257124126,
-0.0187740698,
-0.3730048835,
-0.1600954831,
0.0695957541,
0.0628854185,
-0.2346179634,
-0.1140405238,
-0.386589855,
-0.2821526527,
0.4793556035,
-0.0164330937,
0.1156589538,
-0.043173328,
-0.2923768461,
-0.0459179543,
0.0874826163,
0.1366391182,
-0.0000451989,
-0.3609322011,
0.0325667709,
-0.0406605117,
-0.0293471701,
0.3526099324,
0.1854909211,
-0.4302403927,
0.0712515712,
-0.3217608631,
-0.1558190882,
-0.052084662,
0.4864441752,
0.3141197562,
-0.0973736122,
0.0710804239,
0.1035511345,
-0.1919004619,
0.0550890416,
-0.1816119254,
0.1472242028,
0.3454881608,
0.2857185006,
0.0378994346,
0.1458676606,
0.0254973769,
0.7140871882,
0.3778495789,
-0.0596571825,
0.2103371769,
0.3106970489,
-0.0277176723,
0.003990192,
-0.2601565421,
0.0650469288,
-0.1012430415,
-0.0000208244,
0.0867040455,
-0.1295782328,
-0.1229653805,
-0.0112110078,
-0.4777137041,
0.0091562644,
-0.4146765172,
-0.2396629453,
-0.3181840479,
0.1842497289,
-0.0225255378,
-0.4854881763,
0.1313801408,
0.0537710227,
0.2305762023,
0.2159709036,
0.2142061442,
0.1812156588,
-0.0202592388,
-0.0510847531,
-0.1200737655,
-0.0677260458,
-0.004330989,
0.1452501416,
0.090580292,
-0.1670409441,
0.0318055078,
0.0695504099,
0.3299908042,
-0.0148684233,
0.1402915865,
-0.1708071232,
-0.5094850659,
0.6086310744,
-0.3185942173,
0.1394026577,
0.2990987003,
0.5112240314,
0.4397637248,
-0.2954542041,
-0.1953164637,
0.2071225941,
0.0325558931,
0.1978366524,
0.177350089,
0.1449770778,
0.2783071995,
-0.490381062,
0.2887741327,
0.1548330486,
-0.2504822016,
-0.1551760435,
-0.0039055645,
-0.0270504691,
0.1264626384,
-0.0263034515,
-0.2453977317,
0.0091273412,
-0.1094376519,
0.1734459251,
0.132920295,
0.0698279589,
0.4152194262,
0.5946590304,
0.1349337995,
-0.3891985118,
-0.0482013151,
-0.1750734895,
-0.0742833316,
0.3271440268,
0.1983507723,
0.2482280582,
0.0203484297,
0.1776859909,
-0.1234724671,
-0.2662384212,
-0.2033668756,
-0.038491156,
-0.0767425895,
0.0075889528,
0.0873294622,
-0.0458978787,
-0.0909923464,
0.0130485268,
0.1399984956,
-0.366099894,
0.1637847275,
0.6180497408,
0.9825441837,
0.3975672126,
0.0890337974,
-0.2546566427,
-0.327382952,
0.3259907961,
-0.3401076198,
-0.1664509624,
-0.2470171899,
-0.1235882342,
-0.1842461228,
-0.3403116465,
-0.0386946835,
-0.4898471236,
-0.3528554738,
0.1351124793,
-0.2180550992,
0.5279188752,
0.008177802,
0.1233861893,
0.1910187453,
-0.1223143935,
0.2551512718,
0.1982709765,
0.0618111044,
0.1040950343,
-0.0040275864,
-0.4687904418,
-0.0022330359,
0.0205387697,
-0.3772696257,
0.0891471058,
-0.3437779546,
0.0388468765,
-0.2063531429,
-0.3160519004,
0.1158269271,
-0.0870480314,
0.60594064,
0.1666304618,
-0.0794519261,
-0.0446207225,
0.2913889885,
0.4645249844,
-0.2288515866,
-0.2195305675,
0.5223727226,
-0.2133639902,
-0.130217582,
-0.2047615945,
-0.0803343728,
-0.2370927036,
-0.2609477639,
-0.1280431151,
-0.3282327652,
0.0795016736,
0.0417145081,
0.2636536062,
-0.0910696089,
-0.1676062942,
0.185993135,
0.1154859811,
-0.1075729132,
-0.1185849756,
-0.1695202589,
-0.2610398531,
-0.0678160638,
0.2016011328,
0.1616056263,
-0.120606795,
-0.0767641887,
0.0996574312,
-0.2443368286,
-0.2207898796,
-0.2072925866,
0.1059877798,
-0.1394683868,
0.0929815024,
-0.5486777425,
-0.3299345076,
0.0517465174,
0.2461931109,
0.2794155478,
0.3304982185,
0.1180000901,
-0.0997707248,
-0.22444956,
0.2186436057,
-0.3279265463,
0.1686488837,
0.0235842615,
0.1588115692,
-0.0260099247,
0.0404300094,
-0.3905958831,
0.1603152156,
-0.1254808605,
-0.021126302,
-0.2255208343,
-0.1017532647,
-0.0006300434,
-0.3081862628,
0.0324876606,
0.0234331153,
-0.1957565844,
-0.2830154002,
0.0926689059,
0.0656955764,
0.0647893697,
-0.057013534,
-0.0574608296,
-0.1081574485,
0.0827528611,
0.2720324695,
0.2396922559,
-0.1584912837,
0.1097131371,
-0.0322249383,
0.1710882187,
0.1105847955,
-0.0247726999,
0.0892418474,
0.0146323238,
-0.2658015192,
-0.0353750549,
0.267160058,
-0.181746006,
-0.2171440274,
-0.2685393095,
0.1888353527,
0.105633691,
0.5840902328,
0.202880308,
0.1442173272,
-0.4050823748,
0.1754092425,
-0.0531975478,
-0.0036353469,
-0.1692356318,
-0.096940428,
-0.0849621594,
0.2793602645,
-0.0867192447,
-0.3035973907,
0.2713840604,
0.188181743,
0.0007487535,
0.1049711257,
0.5280753374,
0.129620865,
-0.1896521002,
0.4221355319,
0.2712431252,
-0.0876761824,
0.4948998988,
0.470233202,
-0.1131819561,
-0.0203251615,
-0.082735762,
0.1166146696,
0.2306873947,
-0.2540960908,
0.128471598,
0.2962189019,
0.64629668,
-0.168884024,
0.3935548961,
-0.0330963545,
0.3437393606,
0.1979929954,
0.0587404147,
-0.2460492551,
0.3927091062,
0.2117074728,
0.3301509917,
-0.6189892292,
0.1363728642,
0.4914030433,
0.0492829382,
0.1995817125,
-0.400105536,
-0.049232699,
-0.0584761947,
-0.0483132638,
-0.0781827718,
0.1634954959,
0.1237374693,
0.2829663157,
0.0065842085,
-0.0883785337,
-0.0434402637,
0.1850478798,
0.24156183,
-0.1169978157,
-0.1811730713,
0.3577546477,
-0.2761979401,
0.0664940625,
0.2154601067,
0.1350682825,
-0.0747164264,
-0.0686337799,
0.1802344918,
0.4503943324,
-0.1699341536,
0.0225113444,
0.0557495728,
-0.1625678539,
0.1577174962,
0.0801473781,
0.2580326796,
-0.0533407964,
0.1128026769,
0.0354270115,
-0.4152975082,
-0.025322251,
0.4330807328,
0.5564643145,
-0.3377305865,
0.4601386487,
0.1192683578,
0.2847005129,
-0.0326846391,
0.437435478,
-0.047126241,
0.1163922101,
-0.0051538534,
0.1430787295,
0.0280899256,
0.2575882971,
0.141499728,
-0.0333453305,
-0.159288466,
0.0301066935,
-0.1215411574,
0.1274356544,
0.2968393564,
0.1730703264,
0.4198884964,
-0.294713825,
0.1275686622,
0.12823461,
-0.0875692815,
-0.3413963318,
0.0095218755,
0.0940848961,
-0.3605291843,
0.0042474959,
0.2224818468,
-0.0694396719,
-0.0241941847,
0.1189335212,
0.4094777107,
0.1927904338,
0.1120927334,
0.1051309481,
-0.0493476987,
0.3209429979,
-0.3918456137,
0.2249618769,
0.1892230809,
-0.1029295474,
-0.2218884081,
-0.051098831,
0.0073657287,
0.0212803893,
-0.4355088174,
-0.1401805431,
-0.1622254997,
0.4209836125,
-0.13559708,
0.0682981312,
-0.3722177148,
0.0687670708,
-0.0371344686,
0.2683556974,
-0.3000993729,
0.0864086002,
0.0525472015,
0.0173381157,
0.0883702934,
0.13057971,
0.0684344023,
0.2528502345,
-0.3523155749,
-0.1248895526,
0.3586621881,
-0.0194703974,
0.091035977,
-0.2172686458,
0.4182044268,
0.4654459357,
-0.1480812579,
-0.3321150541,
-0.2635182738,
-0.0111564659,
-0.2798339427,
-0.5420891643,
0.298637718,
0.1378679574,
0.1974382848,
-0.1058709025,
0.0366071947,
-0.0743264854,
-0.1527633518,
0.0611718819,
-0.1987861097
] |
https://github.com/huggingface/datasets/issues/2943 | Backwards compatibility broken for cached datasets that use `.filter()` | Hi ! I guess the caching mechanism should have considered the new `filter` to be different from the old one, and don't use cached results from the old `filter`.
To avoid other users from having this issue we could make the caching differentiate the two, what do you think ? | ## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`
Related feature: https://github.com/huggingface/datasets/pull/2836
:question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)
## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.
## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.
2. `pip install datasets==1.11.0` and run the following snippet:
```python
from datasets import load_dataset
ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again
## Expected results
Same result as with the previous `datasets` version.
## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
ds = ds.filter(lambda x: x["id"] in ids)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
indices = self.map(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
return self._map_single(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
return cls(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}
Process finished with exit code 1
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 50 | Backwards compatibility broken for cached datasets that use `.filter()`
## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`
Related feature: https://github.com/huggingface/datasets/pull/2836
:question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)
## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.
## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.
2. `pip install datasets==1.11.0` and run the following snippet:
```python
from datasets import load_dataset
ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again
## Expected results
Same result as with the previous `datasets` version.
## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
ds = ds.filter(lambda x: x["id"] in ids)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
indices = self.map(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
return self._map_single(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
return cls(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}
Process finished with exit code 1
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0
Hi ! I guess the caching mechanism should have considered the new `filter` to be different from the old one, and don't use cached results from the old `filter`.
To avoid other users from having this issue we could make the caching differentiate the two, what do you think ? | [
-0.3049952984,
0.124387905,
-0.0465586074,
0.2368963808,
0.1517290622,
-0.0666599274,
-0.0069408538,
0.3285394311,
0.173739031,
0.0293815993,
-0.2313866317,
0.3581927419,
-0.1503304243,
0.2527367473,
-0.2977858186,
-0.1378118992,
0.0444690213,
0.0321245417,
-0.0614950396,
0.1664126813,
-0.1239174008,
0.4988579154,
-0.1957764924,
0.0070791524,
0.2221656293,
0.0513209552,
0.1091238931,
0.1385661364,
0.0798623711,
-0.3392695189,
0.5981169939,
0.1064067036,
-0.0348690674,
0.4980957508,
-0.0001213098,
0.0998678803,
0.4398062527,
-0.1073977277,
-0.4579494298,
-0.3686877191,
-0.192853868,
0.131993711,
0.213113606,
0.0811630934,
-0.0715119913,
0.1143421978,
-0.3034938872,
-0.346047163,
0.2488766313,
0.198933199,
0.2267288119,
0.2136142105,
0.2657418251,
0.0665871575,
0.170178771,
0.0826521963,
0.0259718895,
-0.0490863472,
0.2940285206,
0.0142610073,
0.0436854511,
0.4806105494,
-0.3283526003,
-0.2146459818,
0.3046188354,
-0.2982529998,
0.1030711457,
-0.3957035244,
0.2999310791,
0.0781373307,
0.1462637037,
-0.2555182278,
-0.5773367286,
-0.3483258784,
-0.5121471882,
-0.2868289351,
0.4164728522,
-0.2163588405,
-0.2009970397,
0.2200829983,
-0.3342646956,
-0.0270038154,
0.0934983119,
0.0535095222,
-0.058482416,
0.2941836417,
-0.1318319142,
-0.0048627183,
0.0149830263,
-0.1329007149,
0.1924080253,
-0.2750048637,
-0.1968746781,
0.172580272,
-0.0155594852,
-0.0546129793,
0.0954228565,
0.3323277235,
0.1405711174,
0.03562852,
0.0192101784,
0.0845403224,
-0.0409640595,
0.0536776111,
0.1373272091,
0.475378871,
0.4901199639,
0.2467905581,
0.2727873623,
0.2854888439,
-0.0078852251,
-0.0013804897,
0.5281857252,
-0.1666410863,
0.0747073814,
0.1517301351,
0.1966951489,
-0.4048687816,
-0.3602137566,
0.1689628959,
-0.0770000666,
-0.12503995,
0.2207262367,
0.0534947515,
0.1005651876,
0.2142344117,
0.1320813596,
0.0338565484,
-0.1964720488,
0.0612347014,
-0.1725098789,
-0.1739456654,
0.0011613891,
-0.1112987772,
-0.0473049097,
-0.8997768164,
0.1747696698,
0.0482600704,
0.0063486509,
0.1058093458,
-0.0697736889,
0.2074347734,
0.173016876,
0.5229281187,
-0.221358642,
0.0839004442,
0.167191118,
-0.5483285189,
-0.1386866271,
0.0125279408,
-0.2415380627,
-0.1112060249,
0.2085877508,
0.1735863686,
-0.3296717405,
0.0126508549,
-0.1702991426,
0.4515429139,
0.259213686,
-0.5466867089,
-0.077957198,
-0.2133800983,
-0.4382347167,
-0.1997144818,
0.0971906483,
0.4131376743,
-0.5942544937,
-0.3216673732,
0.0216872506,
0.0319067761,
0.0399167389,
-0.122934185,
-0.0634391457,
-0.2444724739,
-0.1077684015,
-0.1384177506,
0.3606542647,
-0.319554776,
-0.7338929176,
0.1537259221,
0.2360214591,
0.5342667103,
-0.0709590018,
-0.137484327,
0.2813946903,
-0.2578287721,
0.14599213,
0.0848447308,
-0.1649033874,
-0.0079936609,
-0.3409692049,
-0.2346944362,
0.223870039,
-0.1502911896,
0.0904171094,
0.3348589838,
0.0790063888,
-0.2542200089,
0.0502921864,
0.0350502208,
0.1049241349,
0.1990929544,
0.245324105,
0.2237652242,
0.2863060832,
-0.4365181327,
-0.2801405787,
0.2506178617,
0.2141300738,
-0.0600014552,
-0.1524062455,
-0.1982274652,
-0.2678266168,
-0.0884184092,
-0.1589773148,
-0.3044101596,
0.0788738877,
0.0225765929,
0.3843640089,
-0.0385037623,
-0.1145257875,
0.6218647957,
0.3084534407,
0.0944801942,
-0.5049408078,
0.2296410799,
-0.0548518002,
0.0051684044,
-0.0591857396,
0.0377821624,
0.293959558,
-0.0685251504,
-0.2895758152,
0.4078748822,
0.039259091,
0.0841677487,
-0.0276332423,
0.1937459111,
0.1773461401,
0.2105838656,
0.0639336035,
0.274181962,
-0.0148834847,
0.2087214887,
-0.1954571605,
0.5572487116,
0.0293753594,
0.3240503669,
0.1208346188,
0.1487564147,
0.3702496588,
0.1305632442,
-0.2189948112,
-0.137078464,
0.3204488754,
-0.4587231874,
0.0626678169,
0.0123390742,
-0.1297933459,
0.3776257634,
0.0716822147,
0.0755120367,
-0.033451993,
0.3119211197,
-0.1593657285,
-0.0421907902,
0.1813622117,
0.4024862647,
0.4014505744,
0.2088319212,
0.0507172123,
0.0758816898,
-0.1615393907,
-0.0248772688,
0.2082491219,
0.1293460727,
-0.169640258,
0.153575331,
0.3034209907,
0.2732039988,
-0.3061975837,
0.093393065,
-0.2356238663,
0.1195331067,
-0.2705812752,
0.3616371453,
-0.2810100913,
-0.2280871719,
0.0761421546,
-0.167832166,
-0.261514008,
-0.3875222206,
0.0898991004,
0.3934392929,
-0.0862187967,
0.2567745447,
0.0147165284,
0.244541198,
0.1361676008,
-0.1996820867,
-0.4005722404,
-0.2078812569,
-0.3476477861,
0.0053976849,
0.2051319033,
-0.156849131,
0.2970356047,
-0.0763089433,
-0.2066244036,
-0.3902941346,
-0.9079105258,
-0.0486291237,
-0.1239648387,
0.6180295348,
0.3176226914,
-0.091625616,
-0.1352720708,
-0.2327560931,
0.1665795594,
-0.0413153023,
-0.4310829639,
0.1568388641,
0.066622749,
0.1682223082,
-0.2003855109,
-0.2270281166,
-0.1135407612,
-0.1458193362,
0.0079397857,
-0.127689749,
0.0849653408,
0.3094043136,
0.1123534516,
-0.3165152669,
-0.0872012228,
0.1330857277,
-0.3335404098,
-0.0773376524,
0.0739420801,
-0.0541622452,
-0.2302437872,
-0.0341396034,
-0.0319809318,
0.0831898302,
0.3736630976,
-0.406958878,
-0.3791770339,
-0.2713731229,
-0.0048742518,
0.23117733,
0.0683609024,
0.2319664061,
0.1899943352,
0.0391032174,
-0.2794685662,
-0.4342857897,
-0.0886204168,
-0.2365953624,
0.1095489562,
0.1482242942,
0.6309944391,
0.0345639586,
0.4764264524,
0.2947267294,
0.0489608869,
0.1398263574,
0.1815549731,
0.4972689748,
-0.3258458674,
-0.4095647633,
-0.0467091389,
-0.0461941659,
0.0505126566,
-0.1531917304,
0.1795817316,
-0.1120615155,
-0.348788321,
0.0000889525,
-0.2515637875,
-0.2498104721,
-0.2386272997,
-0.0136437304,
0.269005388,
0.3906215429,
0.1407711655,
-0.3225957155,
-0.1763849556,
-0.0081371665,
0.4007479548,
0.1035780013,
0.2502201796,
-0.1815417409,
-0.0471421517,
-0.4509261847,
0.4925593734,
0.2151453644,
0.2648921609,
-0.1177540869,
-0.162966162,
-0.3294480145,
-0.0492411032,
0.5928118825,
-0.3631772995,
0.0443487205,
0.1019542664,
-0.2081840038,
-0.3828818798,
0.0511295795,
0.0076627731,
0.3649111986,
0.0543547198,
0.3508077264,
-0.0821148306,
-0.0730154216,
-0.0869159251,
0.2223744392,
-0.1245946959,
0.0196015723,
-0.2743617892,
-0.2049435079,
-0.1433088183,
0.0314203613,
-0.1528895497,
0.165067479,
-0.1800073832,
-0.0685373768,
-0.113143228,
-0.0563925393,
0.1153810173,
0.1347035319,
0.2945026457,
-0.1000053883,
0.118739292,
0.1441813409,
0.240529418,
0.042369619,
0.4583911002,
-0.2755984962,
-0.278095752,
-0.0670713782,
0.1208043993,
-0.114640519,
0.3437378705,
-0.2040163279,
-0.0173399746,
-0.0444571488,
-0.1020427868,
-0.0212401226,
-0.1411030889,
-0.0019393526,
0.3703024685,
-0.2049248368,
-0.2889378667,
0.2329641134,
0.2390515506,
-0.2043494284,
0.4367762506,
0.3422555327,
-0.2809349895,
0.1687894464,
-0.1999589503,
0.7136856318,
0.1521682441,
-0.0298539922,
0.0877991617,
-0.1695175767,
0.4524543583,
0.312545687,
0.1559780091,
-0.0667678118,
-0.2370488644,
-0.0655061454,
-0.034747418,
0.1580223143,
-0.111061506,
-0.2036341429,
0.563148737,
-0.0592190921,
-0.035387788,
0.1755871475,
-0.117328532,
-0.2023076862,
0.0190882459,
-0.4372625351,
0.0991253406,
-0.0213231258,
0.2521659434,
0.0010583699,
-0.0767223239,
0.0552206635,
-0.3087655604,
-0.2637810111,
-0.0523917601,
-0.3992069364,
-0.0659273863,
0.2081238925,
-0.4332802594,
0.0089730322,
0.0526267737,
0.2566774487,
-0.0081805456,
-0.0373011343,
-0.0075373081,
0.0702683851,
0.4977717996,
0.2345930636,
0.0250331312,
0.2863309085,
0.0890945792,
0.1867843717,
0.0195987541,
-0.1420111954,
-0.3608395755,
-0.0186533779,
0.0038107838,
0.1180323213,
-0.1588667631,
0.0288233161,
-0.242854923,
0.0213064551,
-0.3648616672,
0.0650938898,
-0.089833878,
-0.0098388381,
0.0943214372,
-0.0165628176,
-0.2268176377,
-0.0053526862,
0.6357889175,
-0.1438152194,
-0.4367527068,
0.127720058,
-0.0055662245,
-0.2235847116,
0.0353584141,
-0.2044419199,
0.0274195895,
-0.2750840187,
0.297878325,
-0.2511253953,
-0.1071276963,
0.2691297233,
0.322792232,
0.1886075288,
0.2146120071,
-0.151667282,
-0.3945677578,
-0.1370823532,
0.2854577303,
0.0442741737,
0.0549805909,
-0.0311487652,
-0.3236707151,
-0.1444217861,
-0.2066637874,
-0.225788936,
0.0087528154,
0.3313150108,
0.0712086186,
0.1904865801,
0.2205635011,
0.1548966765,
-0.1995645314,
-0.0134113915,
0.0725869313,
-0.2038202733,
-0.10209319,
-0.0933457538,
0.0935417935,
-0.0911599323,
-0.2648987174,
-0.1546195447,
-0.0057540983,
0.0614033639,
-0.1646930128,
0.4182680845,
0.3214155436,
-0.1182498261,
-0.0536906682,
-0.0327781402,
0.0472253412,
0.3035395741,
0.1383114457,
0.0185653735,
0.0326713324,
0.0427049398,
0.1994483769,
-0.1875814348,
0.0140964836,
0.0820162818,
0.0423961766,
-0.2510477006,
0.0270900764,
0.3569348454,
-0.2952964008,
-0.021639429,
0.5987739563,
0.3562678397,
0.2437597811,
-0.1398065835,
0.1138306782,
-0.0777394623,
0.1533576101,
-0.273904711,
-0.332678169,
0.2057785541,
0.2732262015,
0.0609576702,
0.1860819906,
-0.002107203,
0.0291594714,
0.6171159148,
0.2176479399,
0.4478166997,
-0.1253158301,
0.3508078754,
0.5271655917,
0.2326288372,
0.184375748,
0.2417199612,
0.0737256259,
0.0160926357,
0.5080397725,
-0.0660086721,
0.2586890757,
0.2197470069,
0.1287701428,
-0.0355190933,
-0.4662740827,
-0.165674895,
0.0283218995,
-0.0797490105,
0.2506763041,
0.1661576927,
0.0856597796,
-0.2232842445,
-0.3345977664,
0.0114883706,
0.0248980299,
-0.1936261356,
-0.2161097825,
0.1446397007,
-0.3639175296,
-0.0571492612,
0.0134867504,
-0.120843865,
0.0703996271,
0.4529307187,
-0.2469493896,
-0.128362447,
-0.4731903672,
-0.3793773055,
0.0500450991,
0.1747642756,
-0.0140106902,
0.4047628343,
0.2587805688,
-0.2298550904,
0.221988216,
0.2503438592,
0.4856495261,
0.2468239665,
0.0276925862,
0.0133471526,
-0.1420495212,
-0.0540066808,
-0.0907230526,
0.3356419802,
-0.087083146,
0.030568976,
0.1879346967,
0.1134103388,
0.0007337667,
0.2053899765,
-0.0408544727,
0.3989400864,
-0.466181457,
0.0895343721,
-0.2369528115,
0.2848795652,
0.0150144249,
0.100014098,
-0.2490250766,
-0.118114993,
0.171214819,
0.2318111956,
0.2039028108,
-0.1064849868,
0.0748108327,
0.134854272,
0.0739090294,
0.4687883854,
-0.0930127054,
-0.0892462805,
-0.146488905,
-0.6535097361,
-0.0558623038,
0.1423009783,
0.1280673742,
-0.0635152906,
0.0375309512,
0.0490150899,
0.1846857965,
0.0434730016,
-0.1836021245,
0.1054587439,
-0.2515143752,
-0.2000014484,
-0.1759466231,
0.2301194966,
-0.2421483696,
0.0548489988,
-0.2659101486,
0.0627726167,
-0.04169254,
0.02695366,
-0.005927844,
-0.0628841817,
0.0675144494,
0.3473343253,
-0.1370733082,
0.3493894935,
0.2663171589,
0.0334930569,
-0.0034477115,
-0.278297931,
-0.1931355,
-0.2683140337,
0.0700842142,
-0.2921245098,
0.4918607473,
-0.4018592536,
-0.3019632995,
-0.1804216802,
0.2724742591,
0.1233780235,
-0.1268286705,
-0.4767788351,
0.1658579111,
-0.0587570518,
0.0838124603,
0.0044374987,
0.508733809,
0.0599868,
0.3379510641,
-0.2266304791,
-0.3412218094,
0.5358172655,
-0.4137625992,
-0.2617648244,
-0.1319275945,
-0.0639737546,
0.6073153615,
-0.4836448431,
-0.3043729663,
-0.2037672251,
0.2719913721,
-0.1200055629,
-0.1490255296,
0.1555722952,
-0.2652983069,
0.1745558083,
-0.189201951,
-0.0870611668,
0.4393820167,
-0.0882679746,
0.2773536444,
-0.1299419254
] |
https://github.com/huggingface/datasets/issues/2943 | Backwards compatibility broken for cached datasets that use `.filter()` | If it's easy enough to implement, then yes please 😄 But this issue can be low-priority, since I've only encountered it in a couple of `transformers` CI tests. | ## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`
Related feature: https://github.com/huggingface/datasets/pull/2836
:question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)
## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.
## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.
2. `pip install datasets==1.11.0` and run the following snippet:
```python
from datasets import load_dataset
ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again
## Expected results
Same result as with the previous `datasets` version.
## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
ds = ds.filter(lambda x: x["id"] in ids)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
indices = self.map(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
return self._map_single(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
return cls(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}
Process finished with exit code 1
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 28 | Backwards compatibility broken for cached datasets that use `.filter()`
## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`
Related feature: https://github.com/huggingface/datasets/pull/2836
:question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)
## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.
## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.
2. `pip install datasets==1.11.0` and run the following snippet:
```python
from datasets import load_dataset
ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again
## Expected results
Same result as with the previous `datasets` version.
## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
ds = ds.filter(lambda x: x["id"] in ids)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
indices = self.map(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
return self._map_single(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
return cls(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}
Process finished with exit code 1
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0
If it's easy enough to implement, then yes please 😄 But this issue can be low-priority, since I've only encountered it in a couple of `transformers` CI tests. | [
-0.3049952984,
0.124387905,
-0.0465586074,
0.2368963808,
0.1517290622,
-0.0666599274,
-0.0069408538,
0.3285394311,
0.173739031,
0.0293815993,
-0.2313866317,
0.3581927419,
-0.1503304243,
0.2527367473,
-0.2977858186,
-0.1378118992,
0.0444690213,
0.0321245417,
-0.0614950396,
0.1664126813,
-0.1239174008,
0.4988579154,
-0.1957764924,
0.0070791524,
0.2221656293,
0.0513209552,
0.1091238931,
0.1385661364,
0.0798623711,
-0.3392695189,
0.5981169939,
0.1064067036,
-0.0348690674,
0.4980957508,
-0.0001213098,
0.0998678803,
0.4398062527,
-0.1073977277,
-0.4579494298,
-0.3686877191,
-0.192853868,
0.131993711,
0.213113606,
0.0811630934,
-0.0715119913,
0.1143421978,
-0.3034938872,
-0.346047163,
0.2488766313,
0.198933199,
0.2267288119,
0.2136142105,
0.2657418251,
0.0665871575,
0.170178771,
0.0826521963,
0.0259718895,
-0.0490863472,
0.2940285206,
0.0142610073,
0.0436854511,
0.4806105494,
-0.3283526003,
-0.2146459818,
0.3046188354,
-0.2982529998,
0.1030711457,
-0.3957035244,
0.2999310791,
0.0781373307,
0.1462637037,
-0.2555182278,
-0.5773367286,
-0.3483258784,
-0.5121471882,
-0.2868289351,
0.4164728522,
-0.2163588405,
-0.2009970397,
0.2200829983,
-0.3342646956,
-0.0270038154,
0.0934983119,
0.0535095222,
-0.058482416,
0.2941836417,
-0.1318319142,
-0.0048627183,
0.0149830263,
-0.1329007149,
0.1924080253,
-0.2750048637,
-0.1968746781,
0.172580272,
-0.0155594852,
-0.0546129793,
0.0954228565,
0.3323277235,
0.1405711174,
0.03562852,
0.0192101784,
0.0845403224,
-0.0409640595,
0.0536776111,
0.1373272091,
0.475378871,
0.4901199639,
0.2467905581,
0.2727873623,
0.2854888439,
-0.0078852251,
-0.0013804897,
0.5281857252,
-0.1666410863,
0.0747073814,
0.1517301351,
0.1966951489,
-0.4048687816,
-0.3602137566,
0.1689628959,
-0.0770000666,
-0.12503995,
0.2207262367,
0.0534947515,
0.1005651876,
0.2142344117,
0.1320813596,
0.0338565484,
-0.1964720488,
0.0612347014,
-0.1725098789,
-0.1739456654,
0.0011613891,
-0.1112987772,
-0.0473049097,
-0.8997768164,
0.1747696698,
0.0482600704,
0.0063486509,
0.1058093458,
-0.0697736889,
0.2074347734,
0.173016876,
0.5229281187,
-0.221358642,
0.0839004442,
0.167191118,
-0.5483285189,
-0.1386866271,
0.0125279408,
-0.2415380627,
-0.1112060249,
0.2085877508,
0.1735863686,
-0.3296717405,
0.0126508549,
-0.1702991426,
0.4515429139,
0.259213686,
-0.5466867089,
-0.077957198,
-0.2133800983,
-0.4382347167,
-0.1997144818,
0.0971906483,
0.4131376743,
-0.5942544937,
-0.3216673732,
0.0216872506,
0.0319067761,
0.0399167389,
-0.122934185,
-0.0634391457,
-0.2444724739,
-0.1077684015,
-0.1384177506,
0.3606542647,
-0.319554776,
-0.7338929176,
0.1537259221,
0.2360214591,
0.5342667103,
-0.0709590018,
-0.137484327,
0.2813946903,
-0.2578287721,
0.14599213,
0.0848447308,
-0.1649033874,
-0.0079936609,
-0.3409692049,
-0.2346944362,
0.223870039,
-0.1502911896,
0.0904171094,
0.3348589838,
0.0790063888,
-0.2542200089,
0.0502921864,
0.0350502208,
0.1049241349,
0.1990929544,
0.245324105,
0.2237652242,
0.2863060832,
-0.4365181327,
-0.2801405787,
0.2506178617,
0.2141300738,
-0.0600014552,
-0.1524062455,
-0.1982274652,
-0.2678266168,
-0.0884184092,
-0.1589773148,
-0.3044101596,
0.0788738877,
0.0225765929,
0.3843640089,
-0.0385037623,
-0.1145257875,
0.6218647957,
0.3084534407,
0.0944801942,
-0.5049408078,
0.2296410799,
-0.0548518002,
0.0051684044,
-0.0591857396,
0.0377821624,
0.293959558,
-0.0685251504,
-0.2895758152,
0.4078748822,
0.039259091,
0.0841677487,
-0.0276332423,
0.1937459111,
0.1773461401,
0.2105838656,
0.0639336035,
0.274181962,
-0.0148834847,
0.2087214887,
-0.1954571605,
0.5572487116,
0.0293753594,
0.3240503669,
0.1208346188,
0.1487564147,
0.3702496588,
0.1305632442,
-0.2189948112,
-0.137078464,
0.3204488754,
-0.4587231874,
0.0626678169,
0.0123390742,
-0.1297933459,
0.3776257634,
0.0716822147,
0.0755120367,
-0.033451993,
0.3119211197,
-0.1593657285,
-0.0421907902,
0.1813622117,
0.4024862647,
0.4014505744,
0.2088319212,
0.0507172123,
0.0758816898,
-0.1615393907,
-0.0248772688,
0.2082491219,
0.1293460727,
-0.169640258,
0.153575331,
0.3034209907,
0.2732039988,
-0.3061975837,
0.093393065,
-0.2356238663,
0.1195331067,
-0.2705812752,
0.3616371453,
-0.2810100913,
-0.2280871719,
0.0761421546,
-0.167832166,
-0.261514008,
-0.3875222206,
0.0898991004,
0.3934392929,
-0.0862187967,
0.2567745447,
0.0147165284,
0.244541198,
0.1361676008,
-0.1996820867,
-0.4005722404,
-0.2078812569,
-0.3476477861,
0.0053976849,
0.2051319033,
-0.156849131,
0.2970356047,
-0.0763089433,
-0.2066244036,
-0.3902941346,
-0.9079105258,
-0.0486291237,
-0.1239648387,
0.6180295348,
0.3176226914,
-0.091625616,
-0.1352720708,
-0.2327560931,
0.1665795594,
-0.0413153023,
-0.4310829639,
0.1568388641,
0.066622749,
0.1682223082,
-0.2003855109,
-0.2270281166,
-0.1135407612,
-0.1458193362,
0.0079397857,
-0.127689749,
0.0849653408,
0.3094043136,
0.1123534516,
-0.3165152669,
-0.0872012228,
0.1330857277,
-0.3335404098,
-0.0773376524,
0.0739420801,
-0.0541622452,
-0.2302437872,
-0.0341396034,
-0.0319809318,
0.0831898302,
0.3736630976,
-0.406958878,
-0.3791770339,
-0.2713731229,
-0.0048742518,
0.23117733,
0.0683609024,
0.2319664061,
0.1899943352,
0.0391032174,
-0.2794685662,
-0.4342857897,
-0.0886204168,
-0.2365953624,
0.1095489562,
0.1482242942,
0.6309944391,
0.0345639586,
0.4764264524,
0.2947267294,
0.0489608869,
0.1398263574,
0.1815549731,
0.4972689748,
-0.3258458674,
-0.4095647633,
-0.0467091389,
-0.0461941659,
0.0505126566,
-0.1531917304,
0.1795817316,
-0.1120615155,
-0.348788321,
0.0000889525,
-0.2515637875,
-0.2498104721,
-0.2386272997,
-0.0136437304,
0.269005388,
0.3906215429,
0.1407711655,
-0.3225957155,
-0.1763849556,
-0.0081371665,
0.4007479548,
0.1035780013,
0.2502201796,
-0.1815417409,
-0.0471421517,
-0.4509261847,
0.4925593734,
0.2151453644,
0.2648921609,
-0.1177540869,
-0.162966162,
-0.3294480145,
-0.0492411032,
0.5928118825,
-0.3631772995,
0.0443487205,
0.1019542664,
-0.2081840038,
-0.3828818798,
0.0511295795,
0.0076627731,
0.3649111986,
0.0543547198,
0.3508077264,
-0.0821148306,
-0.0730154216,
-0.0869159251,
0.2223744392,
-0.1245946959,
0.0196015723,
-0.2743617892,
-0.2049435079,
-0.1433088183,
0.0314203613,
-0.1528895497,
0.165067479,
-0.1800073832,
-0.0685373768,
-0.113143228,
-0.0563925393,
0.1153810173,
0.1347035319,
0.2945026457,
-0.1000053883,
0.118739292,
0.1441813409,
0.240529418,
0.042369619,
0.4583911002,
-0.2755984962,
-0.278095752,
-0.0670713782,
0.1208043993,
-0.114640519,
0.3437378705,
-0.2040163279,
-0.0173399746,
-0.0444571488,
-0.1020427868,
-0.0212401226,
-0.1411030889,
-0.0019393526,
0.3703024685,
-0.2049248368,
-0.2889378667,
0.2329641134,
0.2390515506,
-0.2043494284,
0.4367762506,
0.3422555327,
-0.2809349895,
0.1687894464,
-0.1999589503,
0.7136856318,
0.1521682441,
-0.0298539922,
0.0877991617,
-0.1695175767,
0.4524543583,
0.312545687,
0.1559780091,
-0.0667678118,
-0.2370488644,
-0.0655061454,
-0.034747418,
0.1580223143,
-0.111061506,
-0.2036341429,
0.563148737,
-0.0592190921,
-0.035387788,
0.1755871475,
-0.117328532,
-0.2023076862,
0.0190882459,
-0.4372625351,
0.0991253406,
-0.0213231258,
0.2521659434,
0.0010583699,
-0.0767223239,
0.0552206635,
-0.3087655604,
-0.2637810111,
-0.0523917601,
-0.3992069364,
-0.0659273863,
0.2081238925,
-0.4332802594,
0.0089730322,
0.0526267737,
0.2566774487,
-0.0081805456,
-0.0373011343,
-0.0075373081,
0.0702683851,
0.4977717996,
0.2345930636,
0.0250331312,
0.2863309085,
0.0890945792,
0.1867843717,
0.0195987541,
-0.1420111954,
-0.3608395755,
-0.0186533779,
0.0038107838,
0.1180323213,
-0.1588667631,
0.0288233161,
-0.242854923,
0.0213064551,
-0.3648616672,
0.0650938898,
-0.089833878,
-0.0098388381,
0.0943214372,
-0.0165628176,
-0.2268176377,
-0.0053526862,
0.6357889175,
-0.1438152194,
-0.4367527068,
0.127720058,
-0.0055662245,
-0.2235847116,
0.0353584141,
-0.2044419199,
0.0274195895,
-0.2750840187,
0.297878325,
-0.2511253953,
-0.1071276963,
0.2691297233,
0.322792232,
0.1886075288,
0.2146120071,
-0.151667282,
-0.3945677578,
-0.1370823532,
0.2854577303,
0.0442741737,
0.0549805909,
-0.0311487652,
-0.3236707151,
-0.1444217861,
-0.2066637874,
-0.225788936,
0.0087528154,
0.3313150108,
0.0712086186,
0.1904865801,
0.2205635011,
0.1548966765,
-0.1995645314,
-0.0134113915,
0.0725869313,
-0.2038202733,
-0.10209319,
-0.0933457538,
0.0935417935,
-0.0911599323,
-0.2648987174,
-0.1546195447,
-0.0057540983,
0.0614033639,
-0.1646930128,
0.4182680845,
0.3214155436,
-0.1182498261,
-0.0536906682,
-0.0327781402,
0.0472253412,
0.3035395741,
0.1383114457,
0.0185653735,
0.0326713324,
0.0427049398,
0.1994483769,
-0.1875814348,
0.0140964836,
0.0820162818,
0.0423961766,
-0.2510477006,
0.0270900764,
0.3569348454,
-0.2952964008,
-0.021639429,
0.5987739563,
0.3562678397,
0.2437597811,
-0.1398065835,
0.1138306782,
-0.0777394623,
0.1533576101,
-0.273904711,
-0.332678169,
0.2057785541,
0.2732262015,
0.0609576702,
0.1860819906,
-0.002107203,
0.0291594714,
0.6171159148,
0.2176479399,
0.4478166997,
-0.1253158301,
0.3508078754,
0.5271655917,
0.2326288372,
0.184375748,
0.2417199612,
0.0737256259,
0.0160926357,
0.5080397725,
-0.0660086721,
0.2586890757,
0.2197470069,
0.1287701428,
-0.0355190933,
-0.4662740827,
-0.165674895,
0.0283218995,
-0.0797490105,
0.2506763041,
0.1661576927,
0.0856597796,
-0.2232842445,
-0.3345977664,
0.0114883706,
0.0248980299,
-0.1936261356,
-0.2161097825,
0.1446397007,
-0.3639175296,
-0.0571492612,
0.0134867504,
-0.120843865,
0.0703996271,
0.4529307187,
-0.2469493896,
-0.128362447,
-0.4731903672,
-0.3793773055,
0.0500450991,
0.1747642756,
-0.0140106902,
0.4047628343,
0.2587805688,
-0.2298550904,
0.221988216,
0.2503438592,
0.4856495261,
0.2468239665,
0.0276925862,
0.0133471526,
-0.1420495212,
-0.0540066808,
-0.0907230526,
0.3356419802,
-0.087083146,
0.030568976,
0.1879346967,
0.1134103388,
0.0007337667,
0.2053899765,
-0.0408544727,
0.3989400864,
-0.466181457,
0.0895343721,
-0.2369528115,
0.2848795652,
0.0150144249,
0.100014098,
-0.2490250766,
-0.118114993,
0.171214819,
0.2318111956,
0.2039028108,
-0.1064849868,
0.0748108327,
0.134854272,
0.0739090294,
0.4687883854,
-0.0930127054,
-0.0892462805,
-0.146488905,
-0.6535097361,
-0.0558623038,
0.1423009783,
0.1280673742,
-0.0635152906,
0.0375309512,
0.0490150899,
0.1846857965,
0.0434730016,
-0.1836021245,
0.1054587439,
-0.2515143752,
-0.2000014484,
-0.1759466231,
0.2301194966,
-0.2421483696,
0.0548489988,
-0.2659101486,
0.0627726167,
-0.04169254,
0.02695366,
-0.005927844,
-0.0628841817,
0.0675144494,
0.3473343253,
-0.1370733082,
0.3493894935,
0.2663171589,
0.0334930569,
-0.0034477115,
-0.278297931,
-0.1931355,
-0.2683140337,
0.0700842142,
-0.2921245098,
0.4918607473,
-0.4018592536,
-0.3019632995,
-0.1804216802,
0.2724742591,
0.1233780235,
-0.1268286705,
-0.4767788351,
0.1658579111,
-0.0587570518,
0.0838124603,
0.0044374987,
0.508733809,
0.0599868,
0.3379510641,
-0.2266304791,
-0.3412218094,
0.5358172655,
-0.4137625992,
-0.2617648244,
-0.1319275945,
-0.0639737546,
0.6073153615,
-0.4836448431,
-0.3043729663,
-0.2037672251,
0.2719913721,
-0.1200055629,
-0.1490255296,
0.1555722952,
-0.2652983069,
0.1745558083,
-0.189201951,
-0.0870611668,
0.4393820167,
-0.0882679746,
0.2773536444,
-0.1299419254
] |
https://github.com/huggingface/datasets/issues/2943 | Backwards compatibility broken for cached datasets that use `.filter()` | Well it can cause issue with anyone that updates `datasets` and re-run some code that uses filter, so I'm creating a PR | ## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`
Related feature: https://github.com/huggingface/datasets/pull/2836
:question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)
## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.
## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.
2. `pip install datasets==1.11.0` and run the following snippet:
```python
from datasets import load_dataset
ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again
## Expected results
Same result as with the previous `datasets` version.
## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
ds = ds.filter(lambda x: x["id"] in ids)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
indices = self.map(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
return self._map_single(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
return cls(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}
Process finished with exit code 1
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 22 | Backwards compatibility broken for cached datasets that use `.filter()`
## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`
Related feature: https://github.com/huggingface/datasets/pull/2836
:question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)
## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.
## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.
2. `pip install datasets==1.11.0` and run the following snippet:
```python
from datasets import load_dataset
ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again
## Expected results
Same result as with the previous `datasets` version.
## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
ds = ds.filter(lambda x: x["id"] in ids)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
indices = self.map(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
return self._map_single(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
return cls(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}
Process finished with exit code 1
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0
Well it can cause issue with anyone that updates `datasets` and re-run some code that uses filter, so I'm creating a PR | [
-0.3049952984,
0.124387905,
-0.0465586074,
0.2368963808,
0.1517290622,
-0.0666599274,
-0.0069408538,
0.3285394311,
0.173739031,
0.0293815993,
-0.2313866317,
0.3581927419,
-0.1503304243,
0.2527367473,
-0.2977858186,
-0.1378118992,
0.0444690213,
0.0321245417,
-0.0614950396,
0.1664126813,
-0.1239174008,
0.4988579154,
-0.1957764924,
0.0070791524,
0.2221656293,
0.0513209552,
0.1091238931,
0.1385661364,
0.0798623711,
-0.3392695189,
0.5981169939,
0.1064067036,
-0.0348690674,
0.4980957508,
-0.0001213098,
0.0998678803,
0.4398062527,
-0.1073977277,
-0.4579494298,
-0.3686877191,
-0.192853868,
0.131993711,
0.213113606,
0.0811630934,
-0.0715119913,
0.1143421978,
-0.3034938872,
-0.346047163,
0.2488766313,
0.198933199,
0.2267288119,
0.2136142105,
0.2657418251,
0.0665871575,
0.170178771,
0.0826521963,
0.0259718895,
-0.0490863472,
0.2940285206,
0.0142610073,
0.0436854511,
0.4806105494,
-0.3283526003,
-0.2146459818,
0.3046188354,
-0.2982529998,
0.1030711457,
-0.3957035244,
0.2999310791,
0.0781373307,
0.1462637037,
-0.2555182278,
-0.5773367286,
-0.3483258784,
-0.5121471882,
-0.2868289351,
0.4164728522,
-0.2163588405,
-0.2009970397,
0.2200829983,
-0.3342646956,
-0.0270038154,
0.0934983119,
0.0535095222,
-0.058482416,
0.2941836417,
-0.1318319142,
-0.0048627183,
0.0149830263,
-0.1329007149,
0.1924080253,
-0.2750048637,
-0.1968746781,
0.172580272,
-0.0155594852,
-0.0546129793,
0.0954228565,
0.3323277235,
0.1405711174,
0.03562852,
0.0192101784,
0.0845403224,
-0.0409640595,
0.0536776111,
0.1373272091,
0.475378871,
0.4901199639,
0.2467905581,
0.2727873623,
0.2854888439,
-0.0078852251,
-0.0013804897,
0.5281857252,
-0.1666410863,
0.0747073814,
0.1517301351,
0.1966951489,
-0.4048687816,
-0.3602137566,
0.1689628959,
-0.0770000666,
-0.12503995,
0.2207262367,
0.0534947515,
0.1005651876,
0.2142344117,
0.1320813596,
0.0338565484,
-0.1964720488,
0.0612347014,
-0.1725098789,
-0.1739456654,
0.0011613891,
-0.1112987772,
-0.0473049097,
-0.8997768164,
0.1747696698,
0.0482600704,
0.0063486509,
0.1058093458,
-0.0697736889,
0.2074347734,
0.173016876,
0.5229281187,
-0.221358642,
0.0839004442,
0.167191118,
-0.5483285189,
-0.1386866271,
0.0125279408,
-0.2415380627,
-0.1112060249,
0.2085877508,
0.1735863686,
-0.3296717405,
0.0126508549,
-0.1702991426,
0.4515429139,
0.259213686,
-0.5466867089,
-0.077957198,
-0.2133800983,
-0.4382347167,
-0.1997144818,
0.0971906483,
0.4131376743,
-0.5942544937,
-0.3216673732,
0.0216872506,
0.0319067761,
0.0399167389,
-0.122934185,
-0.0634391457,
-0.2444724739,
-0.1077684015,
-0.1384177506,
0.3606542647,
-0.319554776,
-0.7338929176,
0.1537259221,
0.2360214591,
0.5342667103,
-0.0709590018,
-0.137484327,
0.2813946903,
-0.2578287721,
0.14599213,
0.0848447308,
-0.1649033874,
-0.0079936609,
-0.3409692049,
-0.2346944362,
0.223870039,
-0.1502911896,
0.0904171094,
0.3348589838,
0.0790063888,
-0.2542200089,
0.0502921864,
0.0350502208,
0.1049241349,
0.1990929544,
0.245324105,
0.2237652242,
0.2863060832,
-0.4365181327,
-0.2801405787,
0.2506178617,
0.2141300738,
-0.0600014552,
-0.1524062455,
-0.1982274652,
-0.2678266168,
-0.0884184092,
-0.1589773148,
-0.3044101596,
0.0788738877,
0.0225765929,
0.3843640089,
-0.0385037623,
-0.1145257875,
0.6218647957,
0.3084534407,
0.0944801942,
-0.5049408078,
0.2296410799,
-0.0548518002,
0.0051684044,
-0.0591857396,
0.0377821624,
0.293959558,
-0.0685251504,
-0.2895758152,
0.4078748822,
0.039259091,
0.0841677487,
-0.0276332423,
0.1937459111,
0.1773461401,
0.2105838656,
0.0639336035,
0.274181962,
-0.0148834847,
0.2087214887,
-0.1954571605,
0.5572487116,
0.0293753594,
0.3240503669,
0.1208346188,
0.1487564147,
0.3702496588,
0.1305632442,
-0.2189948112,
-0.137078464,
0.3204488754,
-0.4587231874,
0.0626678169,
0.0123390742,
-0.1297933459,
0.3776257634,
0.0716822147,
0.0755120367,
-0.033451993,
0.3119211197,
-0.1593657285,
-0.0421907902,
0.1813622117,
0.4024862647,
0.4014505744,
0.2088319212,
0.0507172123,
0.0758816898,
-0.1615393907,
-0.0248772688,
0.2082491219,
0.1293460727,
-0.169640258,
0.153575331,
0.3034209907,
0.2732039988,
-0.3061975837,
0.093393065,
-0.2356238663,
0.1195331067,
-0.2705812752,
0.3616371453,
-0.2810100913,
-0.2280871719,
0.0761421546,
-0.167832166,
-0.261514008,
-0.3875222206,
0.0898991004,
0.3934392929,
-0.0862187967,
0.2567745447,
0.0147165284,
0.244541198,
0.1361676008,
-0.1996820867,
-0.4005722404,
-0.2078812569,
-0.3476477861,
0.0053976849,
0.2051319033,
-0.156849131,
0.2970356047,
-0.0763089433,
-0.2066244036,
-0.3902941346,
-0.9079105258,
-0.0486291237,
-0.1239648387,
0.6180295348,
0.3176226914,
-0.091625616,
-0.1352720708,
-0.2327560931,
0.1665795594,
-0.0413153023,
-0.4310829639,
0.1568388641,
0.066622749,
0.1682223082,
-0.2003855109,
-0.2270281166,
-0.1135407612,
-0.1458193362,
0.0079397857,
-0.127689749,
0.0849653408,
0.3094043136,
0.1123534516,
-0.3165152669,
-0.0872012228,
0.1330857277,
-0.3335404098,
-0.0773376524,
0.0739420801,
-0.0541622452,
-0.2302437872,
-0.0341396034,
-0.0319809318,
0.0831898302,
0.3736630976,
-0.406958878,
-0.3791770339,
-0.2713731229,
-0.0048742518,
0.23117733,
0.0683609024,
0.2319664061,
0.1899943352,
0.0391032174,
-0.2794685662,
-0.4342857897,
-0.0886204168,
-0.2365953624,
0.1095489562,
0.1482242942,
0.6309944391,
0.0345639586,
0.4764264524,
0.2947267294,
0.0489608869,
0.1398263574,
0.1815549731,
0.4972689748,
-0.3258458674,
-0.4095647633,
-0.0467091389,
-0.0461941659,
0.0505126566,
-0.1531917304,
0.1795817316,
-0.1120615155,
-0.348788321,
0.0000889525,
-0.2515637875,
-0.2498104721,
-0.2386272997,
-0.0136437304,
0.269005388,
0.3906215429,
0.1407711655,
-0.3225957155,
-0.1763849556,
-0.0081371665,
0.4007479548,
0.1035780013,
0.2502201796,
-0.1815417409,
-0.0471421517,
-0.4509261847,
0.4925593734,
0.2151453644,
0.2648921609,
-0.1177540869,
-0.162966162,
-0.3294480145,
-0.0492411032,
0.5928118825,
-0.3631772995,
0.0443487205,
0.1019542664,
-0.2081840038,
-0.3828818798,
0.0511295795,
0.0076627731,
0.3649111986,
0.0543547198,
0.3508077264,
-0.0821148306,
-0.0730154216,
-0.0869159251,
0.2223744392,
-0.1245946959,
0.0196015723,
-0.2743617892,
-0.2049435079,
-0.1433088183,
0.0314203613,
-0.1528895497,
0.165067479,
-0.1800073832,
-0.0685373768,
-0.113143228,
-0.0563925393,
0.1153810173,
0.1347035319,
0.2945026457,
-0.1000053883,
0.118739292,
0.1441813409,
0.240529418,
0.042369619,
0.4583911002,
-0.2755984962,
-0.278095752,
-0.0670713782,
0.1208043993,
-0.114640519,
0.3437378705,
-0.2040163279,
-0.0173399746,
-0.0444571488,
-0.1020427868,
-0.0212401226,
-0.1411030889,
-0.0019393526,
0.3703024685,
-0.2049248368,
-0.2889378667,
0.2329641134,
0.2390515506,
-0.2043494284,
0.4367762506,
0.3422555327,
-0.2809349895,
0.1687894464,
-0.1999589503,
0.7136856318,
0.1521682441,
-0.0298539922,
0.0877991617,
-0.1695175767,
0.4524543583,
0.312545687,
0.1559780091,
-0.0667678118,
-0.2370488644,
-0.0655061454,
-0.034747418,
0.1580223143,
-0.111061506,
-0.2036341429,
0.563148737,
-0.0592190921,
-0.035387788,
0.1755871475,
-0.117328532,
-0.2023076862,
0.0190882459,
-0.4372625351,
0.0991253406,
-0.0213231258,
0.2521659434,
0.0010583699,
-0.0767223239,
0.0552206635,
-0.3087655604,
-0.2637810111,
-0.0523917601,
-0.3992069364,
-0.0659273863,
0.2081238925,
-0.4332802594,
0.0089730322,
0.0526267737,
0.2566774487,
-0.0081805456,
-0.0373011343,
-0.0075373081,
0.0702683851,
0.4977717996,
0.2345930636,
0.0250331312,
0.2863309085,
0.0890945792,
0.1867843717,
0.0195987541,
-0.1420111954,
-0.3608395755,
-0.0186533779,
0.0038107838,
0.1180323213,
-0.1588667631,
0.0288233161,
-0.242854923,
0.0213064551,
-0.3648616672,
0.0650938898,
-0.089833878,
-0.0098388381,
0.0943214372,
-0.0165628176,
-0.2268176377,
-0.0053526862,
0.6357889175,
-0.1438152194,
-0.4367527068,
0.127720058,
-0.0055662245,
-0.2235847116,
0.0353584141,
-0.2044419199,
0.0274195895,
-0.2750840187,
0.297878325,
-0.2511253953,
-0.1071276963,
0.2691297233,
0.322792232,
0.1886075288,
0.2146120071,
-0.151667282,
-0.3945677578,
-0.1370823532,
0.2854577303,
0.0442741737,
0.0549805909,
-0.0311487652,
-0.3236707151,
-0.1444217861,
-0.2066637874,
-0.225788936,
0.0087528154,
0.3313150108,
0.0712086186,
0.1904865801,
0.2205635011,
0.1548966765,
-0.1995645314,
-0.0134113915,
0.0725869313,
-0.2038202733,
-0.10209319,
-0.0933457538,
0.0935417935,
-0.0911599323,
-0.2648987174,
-0.1546195447,
-0.0057540983,
0.0614033639,
-0.1646930128,
0.4182680845,
0.3214155436,
-0.1182498261,
-0.0536906682,
-0.0327781402,
0.0472253412,
0.3035395741,
0.1383114457,
0.0185653735,
0.0326713324,
0.0427049398,
0.1994483769,
-0.1875814348,
0.0140964836,
0.0820162818,
0.0423961766,
-0.2510477006,
0.0270900764,
0.3569348454,
-0.2952964008,
-0.021639429,
0.5987739563,
0.3562678397,
0.2437597811,
-0.1398065835,
0.1138306782,
-0.0777394623,
0.1533576101,
-0.273904711,
-0.332678169,
0.2057785541,
0.2732262015,
0.0609576702,
0.1860819906,
-0.002107203,
0.0291594714,
0.6171159148,
0.2176479399,
0.4478166997,
-0.1253158301,
0.3508078754,
0.5271655917,
0.2326288372,
0.184375748,
0.2417199612,
0.0737256259,
0.0160926357,
0.5080397725,
-0.0660086721,
0.2586890757,
0.2197470069,
0.1287701428,
-0.0355190933,
-0.4662740827,
-0.165674895,
0.0283218995,
-0.0797490105,
0.2506763041,
0.1661576927,
0.0856597796,
-0.2232842445,
-0.3345977664,
0.0114883706,
0.0248980299,
-0.1936261356,
-0.2161097825,
0.1446397007,
-0.3639175296,
-0.0571492612,
0.0134867504,
-0.120843865,
0.0703996271,
0.4529307187,
-0.2469493896,
-0.128362447,
-0.4731903672,
-0.3793773055,
0.0500450991,
0.1747642756,
-0.0140106902,
0.4047628343,
0.2587805688,
-0.2298550904,
0.221988216,
0.2503438592,
0.4856495261,
0.2468239665,
0.0276925862,
0.0133471526,
-0.1420495212,
-0.0540066808,
-0.0907230526,
0.3356419802,
-0.087083146,
0.030568976,
0.1879346967,
0.1134103388,
0.0007337667,
0.2053899765,
-0.0408544727,
0.3989400864,
-0.466181457,
0.0895343721,
-0.2369528115,
0.2848795652,
0.0150144249,
0.100014098,
-0.2490250766,
-0.118114993,
0.171214819,
0.2318111956,
0.2039028108,
-0.1064849868,
0.0748108327,
0.134854272,
0.0739090294,
0.4687883854,
-0.0930127054,
-0.0892462805,
-0.146488905,
-0.6535097361,
-0.0558623038,
0.1423009783,
0.1280673742,
-0.0635152906,
0.0375309512,
0.0490150899,
0.1846857965,
0.0434730016,
-0.1836021245,
0.1054587439,
-0.2515143752,
-0.2000014484,
-0.1759466231,
0.2301194966,
-0.2421483696,
0.0548489988,
-0.2659101486,
0.0627726167,
-0.04169254,
0.02695366,
-0.005927844,
-0.0628841817,
0.0675144494,
0.3473343253,
-0.1370733082,
0.3493894935,
0.2663171589,
0.0334930569,
-0.0034477115,
-0.278297931,
-0.1931355,
-0.2683140337,
0.0700842142,
-0.2921245098,
0.4918607473,
-0.4018592536,
-0.3019632995,
-0.1804216802,
0.2724742591,
0.1233780235,
-0.1268286705,
-0.4767788351,
0.1658579111,
-0.0587570518,
0.0838124603,
0.0044374987,
0.508733809,
0.0599868,
0.3379510641,
-0.2266304791,
-0.3412218094,
0.5358172655,
-0.4137625992,
-0.2617648244,
-0.1319275945,
-0.0639737546,
0.6073153615,
-0.4836448431,
-0.3043729663,
-0.2037672251,
0.2719913721,
-0.1200055629,
-0.1490255296,
0.1555722952,
-0.2652983069,
0.1745558083,
-0.189201951,
-0.0870611668,
0.4393820167,
-0.0882679746,
0.2773536444,
-0.1299419254
] |
https://github.com/huggingface/datasets/issues/2943 | Backwards compatibility broken for cached datasets that use `.filter()` | I just merged a fix, let me know if you're still having this kind of issues :)
We'll do a release soon to make this fix available | ## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`
Related feature: https://github.com/huggingface/datasets/pull/2836
:question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)
## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.
## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.
2. `pip install datasets==1.11.0` and run the following snippet:
```python
from datasets import load_dataset
ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again
## Expected results
Same result as with the previous `datasets` version.
## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
ds = ds.filter(lambda x: x["id"] in ids)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
indices = self.map(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
return self._map_single(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
return cls(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}
Process finished with exit code 1
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 27 | Backwards compatibility broken for cached datasets that use `.filter()`
## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`
Related feature: https://github.com/huggingface/datasets/pull/2836
:question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)
## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.
## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.
2. `pip install datasets==1.11.0` and run the following snippet:
```python
from datasets import load_dataset
ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again
## Expected results
Same result as with the previous `datasets` version.
## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
ds = ds.filter(lambda x: x["id"] in ids)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
indices = self.map(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
return self._map_single(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
out = func(self, *args, **kwargs)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
return cls(
File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}
Process finished with exit code 1
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0
I just merged a fix, let me know if you're still having this kind of issues :)
We'll do a release soon to make this fix available | [
-0.3049952984,
0.124387905,
-0.0465586074,
0.2368963808,
0.1517290622,
-0.0666599274,
-0.0069408538,
0.3285394311,
0.173739031,
0.0293815993,
-0.2313866317,
0.3581927419,
-0.1503304243,
0.2527367473,
-0.2977858186,
-0.1378118992,
0.0444690213,
0.0321245417,
-0.0614950396,
0.1664126813,
-0.1239174008,
0.4988579154,
-0.1957764924,
0.0070791524,
0.2221656293,
0.0513209552,
0.1091238931,
0.1385661364,
0.0798623711,
-0.3392695189,
0.5981169939,
0.1064067036,
-0.0348690674,
0.4980957508,
-0.0001213098,
0.0998678803,
0.4398062527,
-0.1073977277,
-0.4579494298,
-0.3686877191,
-0.192853868,
0.131993711,
0.213113606,
0.0811630934,
-0.0715119913,
0.1143421978,
-0.3034938872,
-0.346047163,
0.2488766313,
0.198933199,
0.2267288119,
0.2136142105,
0.2657418251,
0.0665871575,
0.170178771,
0.0826521963,
0.0259718895,
-0.0490863472,
0.2940285206,
0.0142610073,
0.0436854511,
0.4806105494,
-0.3283526003,
-0.2146459818,
0.3046188354,
-0.2982529998,
0.1030711457,
-0.3957035244,
0.2999310791,
0.0781373307,
0.1462637037,
-0.2555182278,
-0.5773367286,
-0.3483258784,
-0.5121471882,
-0.2868289351,
0.4164728522,
-0.2163588405,
-0.2009970397,
0.2200829983,
-0.3342646956,
-0.0270038154,
0.0934983119,
0.0535095222,
-0.058482416,
0.2941836417,
-0.1318319142,
-0.0048627183,
0.0149830263,
-0.1329007149,
0.1924080253,
-0.2750048637,
-0.1968746781,
0.172580272,
-0.0155594852,
-0.0546129793,
0.0954228565,
0.3323277235,
0.1405711174,
0.03562852,
0.0192101784,
0.0845403224,
-0.0409640595,
0.0536776111,
0.1373272091,
0.475378871,
0.4901199639,
0.2467905581,
0.2727873623,
0.2854888439,
-0.0078852251,
-0.0013804897,
0.5281857252,
-0.1666410863,
0.0747073814,
0.1517301351,
0.1966951489,
-0.4048687816,
-0.3602137566,
0.1689628959,
-0.0770000666,
-0.12503995,
0.2207262367,
0.0534947515,
0.1005651876,
0.2142344117,
0.1320813596,
0.0338565484,
-0.1964720488,
0.0612347014,
-0.1725098789,
-0.1739456654,
0.0011613891,
-0.1112987772,
-0.0473049097,
-0.8997768164,
0.1747696698,
0.0482600704,
0.0063486509,
0.1058093458,
-0.0697736889,
0.2074347734,
0.173016876,
0.5229281187,
-0.221358642,
0.0839004442,
0.167191118,
-0.5483285189,
-0.1386866271,
0.0125279408,
-0.2415380627,
-0.1112060249,
0.2085877508,
0.1735863686,
-0.3296717405,
0.0126508549,
-0.1702991426,
0.4515429139,
0.259213686,
-0.5466867089,
-0.077957198,
-0.2133800983,
-0.4382347167,
-0.1997144818,
0.0971906483,
0.4131376743,
-0.5942544937,
-0.3216673732,
0.0216872506,
0.0319067761,
0.0399167389,
-0.122934185,
-0.0634391457,
-0.2444724739,
-0.1077684015,
-0.1384177506,
0.3606542647,
-0.319554776,
-0.7338929176,
0.1537259221,
0.2360214591,
0.5342667103,
-0.0709590018,
-0.137484327,
0.2813946903,
-0.2578287721,
0.14599213,
0.0848447308,
-0.1649033874,
-0.0079936609,
-0.3409692049,
-0.2346944362,
0.223870039,
-0.1502911896,
0.0904171094,
0.3348589838,
0.0790063888,
-0.2542200089,
0.0502921864,
0.0350502208,
0.1049241349,
0.1990929544,
0.245324105,
0.2237652242,
0.2863060832,
-0.4365181327,
-0.2801405787,
0.2506178617,
0.2141300738,
-0.0600014552,
-0.1524062455,
-0.1982274652,
-0.2678266168,
-0.0884184092,
-0.1589773148,
-0.3044101596,
0.0788738877,
0.0225765929,
0.3843640089,
-0.0385037623,
-0.1145257875,
0.6218647957,
0.3084534407,
0.0944801942,
-0.5049408078,
0.2296410799,
-0.0548518002,
0.0051684044,
-0.0591857396,
0.0377821624,
0.293959558,
-0.0685251504,
-0.2895758152,
0.4078748822,
0.039259091,
0.0841677487,
-0.0276332423,
0.1937459111,
0.1773461401,
0.2105838656,
0.0639336035,
0.274181962,
-0.0148834847,
0.2087214887,
-0.1954571605,
0.5572487116,
0.0293753594,
0.3240503669,
0.1208346188,
0.1487564147,
0.3702496588,
0.1305632442,
-0.2189948112,
-0.137078464,
0.3204488754,
-0.4587231874,
0.0626678169,
0.0123390742,
-0.1297933459,
0.3776257634,
0.0716822147,
0.0755120367,
-0.033451993,
0.3119211197,
-0.1593657285,
-0.0421907902,
0.1813622117,
0.4024862647,
0.4014505744,
0.2088319212,
0.0507172123,
0.0758816898,
-0.1615393907,
-0.0248772688,
0.2082491219,
0.1293460727,
-0.169640258,
0.153575331,
0.3034209907,
0.2732039988,
-0.3061975837,
0.093393065,
-0.2356238663,
0.1195331067,
-0.2705812752,
0.3616371453,
-0.2810100913,
-0.2280871719,
0.0761421546,
-0.167832166,
-0.261514008,
-0.3875222206,
0.0898991004,
0.3934392929,
-0.0862187967,
0.2567745447,
0.0147165284,
0.244541198,
0.1361676008,
-0.1996820867,
-0.4005722404,
-0.2078812569,
-0.3476477861,
0.0053976849,
0.2051319033,
-0.156849131,
0.2970356047,
-0.0763089433,
-0.2066244036,
-0.3902941346,
-0.9079105258,
-0.0486291237,
-0.1239648387,
0.6180295348,
0.3176226914,
-0.091625616,
-0.1352720708,
-0.2327560931,
0.1665795594,
-0.0413153023,
-0.4310829639,
0.1568388641,
0.066622749,
0.1682223082,
-0.2003855109,
-0.2270281166,
-0.1135407612,
-0.1458193362,
0.0079397857,
-0.127689749,
0.0849653408,
0.3094043136,
0.1123534516,
-0.3165152669,
-0.0872012228,
0.1330857277,
-0.3335404098,
-0.0773376524,
0.0739420801,
-0.0541622452,
-0.2302437872,
-0.0341396034,
-0.0319809318,
0.0831898302,
0.3736630976,
-0.406958878,
-0.3791770339,
-0.2713731229,
-0.0048742518,
0.23117733,
0.0683609024,
0.2319664061,
0.1899943352,
0.0391032174,
-0.2794685662,
-0.4342857897,
-0.0886204168,
-0.2365953624,
0.1095489562,
0.1482242942,
0.6309944391,
0.0345639586,
0.4764264524,
0.2947267294,
0.0489608869,
0.1398263574,
0.1815549731,
0.4972689748,
-0.3258458674,
-0.4095647633,
-0.0467091389,
-0.0461941659,
0.0505126566,
-0.1531917304,
0.1795817316,
-0.1120615155,
-0.348788321,
0.0000889525,
-0.2515637875,
-0.2498104721,
-0.2386272997,
-0.0136437304,
0.269005388,
0.3906215429,
0.1407711655,
-0.3225957155,
-0.1763849556,
-0.0081371665,
0.4007479548,
0.1035780013,
0.2502201796,
-0.1815417409,
-0.0471421517,
-0.4509261847,
0.4925593734,
0.2151453644,
0.2648921609,
-0.1177540869,
-0.162966162,
-0.3294480145,
-0.0492411032,
0.5928118825,
-0.3631772995,
0.0443487205,
0.1019542664,
-0.2081840038,
-0.3828818798,
0.0511295795,
0.0076627731,
0.3649111986,
0.0543547198,
0.3508077264,
-0.0821148306,
-0.0730154216,
-0.0869159251,
0.2223744392,
-0.1245946959,
0.0196015723,
-0.2743617892,
-0.2049435079,
-0.1433088183,
0.0314203613,
-0.1528895497,
0.165067479,
-0.1800073832,
-0.0685373768,
-0.113143228,
-0.0563925393,
0.1153810173,
0.1347035319,
0.2945026457,
-0.1000053883,
0.118739292,
0.1441813409,
0.240529418,
0.042369619,
0.4583911002,
-0.2755984962,
-0.278095752,
-0.0670713782,
0.1208043993,
-0.114640519,
0.3437378705,
-0.2040163279,
-0.0173399746,
-0.0444571488,
-0.1020427868,
-0.0212401226,
-0.1411030889,
-0.0019393526,
0.3703024685,
-0.2049248368,
-0.2889378667,
0.2329641134,
0.2390515506,
-0.2043494284,
0.4367762506,
0.3422555327,
-0.2809349895,
0.1687894464,
-0.1999589503,
0.7136856318,
0.1521682441,
-0.0298539922,
0.0877991617,
-0.1695175767,
0.4524543583,
0.312545687,
0.1559780091,
-0.0667678118,
-0.2370488644,
-0.0655061454,
-0.034747418,
0.1580223143,
-0.111061506,
-0.2036341429,
0.563148737,
-0.0592190921,
-0.035387788,
0.1755871475,
-0.117328532,
-0.2023076862,
0.0190882459,
-0.4372625351,
0.0991253406,
-0.0213231258,
0.2521659434,
0.0010583699,
-0.0767223239,
0.0552206635,
-0.3087655604,
-0.2637810111,
-0.0523917601,
-0.3992069364,
-0.0659273863,
0.2081238925,
-0.4332802594,
0.0089730322,
0.0526267737,
0.2566774487,
-0.0081805456,
-0.0373011343,
-0.0075373081,
0.0702683851,
0.4977717996,
0.2345930636,
0.0250331312,
0.2863309085,
0.0890945792,
0.1867843717,
0.0195987541,
-0.1420111954,
-0.3608395755,
-0.0186533779,
0.0038107838,
0.1180323213,
-0.1588667631,
0.0288233161,
-0.242854923,
0.0213064551,
-0.3648616672,
0.0650938898,
-0.089833878,
-0.0098388381,
0.0943214372,
-0.0165628176,
-0.2268176377,
-0.0053526862,
0.6357889175,
-0.1438152194,
-0.4367527068,
0.127720058,
-0.0055662245,
-0.2235847116,
0.0353584141,
-0.2044419199,
0.0274195895,
-0.2750840187,
0.297878325,
-0.2511253953,
-0.1071276963,
0.2691297233,
0.322792232,
0.1886075288,
0.2146120071,
-0.151667282,
-0.3945677578,
-0.1370823532,
0.2854577303,
0.0442741737,
0.0549805909,
-0.0311487652,
-0.3236707151,
-0.1444217861,
-0.2066637874,
-0.225788936,
0.0087528154,
0.3313150108,
0.0712086186,
0.1904865801,
0.2205635011,
0.1548966765,
-0.1995645314,
-0.0134113915,
0.0725869313,
-0.2038202733,
-0.10209319,
-0.0933457538,
0.0935417935,
-0.0911599323,
-0.2648987174,
-0.1546195447,
-0.0057540983,
0.0614033639,
-0.1646930128,
0.4182680845,
0.3214155436,
-0.1182498261,
-0.0536906682,
-0.0327781402,
0.0472253412,
0.3035395741,
0.1383114457,
0.0185653735,
0.0326713324,
0.0427049398,
0.1994483769,
-0.1875814348,
0.0140964836,
0.0820162818,
0.0423961766,
-0.2510477006,
0.0270900764,
0.3569348454,
-0.2952964008,
-0.021639429,
0.5987739563,
0.3562678397,
0.2437597811,
-0.1398065835,
0.1138306782,
-0.0777394623,
0.1533576101,
-0.273904711,
-0.332678169,
0.2057785541,
0.2732262015,
0.0609576702,
0.1860819906,
-0.002107203,
0.0291594714,
0.6171159148,
0.2176479399,
0.4478166997,
-0.1253158301,
0.3508078754,
0.5271655917,
0.2326288372,
0.184375748,
0.2417199612,
0.0737256259,
0.0160926357,
0.5080397725,
-0.0660086721,
0.2586890757,
0.2197470069,
0.1287701428,
-0.0355190933,
-0.4662740827,
-0.165674895,
0.0283218995,
-0.0797490105,
0.2506763041,
0.1661576927,
0.0856597796,
-0.2232842445,
-0.3345977664,
0.0114883706,
0.0248980299,
-0.1936261356,
-0.2161097825,
0.1446397007,
-0.3639175296,
-0.0571492612,
0.0134867504,
-0.120843865,
0.0703996271,
0.4529307187,
-0.2469493896,
-0.128362447,
-0.4731903672,
-0.3793773055,
0.0500450991,
0.1747642756,
-0.0140106902,
0.4047628343,
0.2587805688,
-0.2298550904,
0.221988216,
0.2503438592,
0.4856495261,
0.2468239665,
0.0276925862,
0.0133471526,
-0.1420495212,
-0.0540066808,
-0.0907230526,
0.3356419802,
-0.087083146,
0.030568976,
0.1879346967,
0.1134103388,
0.0007337667,
0.2053899765,
-0.0408544727,
0.3989400864,
-0.466181457,
0.0895343721,
-0.2369528115,
0.2848795652,
0.0150144249,
0.100014098,
-0.2490250766,
-0.118114993,
0.171214819,
0.2318111956,
0.2039028108,
-0.1064849868,
0.0748108327,
0.134854272,
0.0739090294,
0.4687883854,
-0.0930127054,
-0.0892462805,
-0.146488905,
-0.6535097361,
-0.0558623038,
0.1423009783,
0.1280673742,
-0.0635152906,
0.0375309512,
0.0490150899,
0.1846857965,
0.0434730016,
-0.1836021245,
0.1054587439,
-0.2515143752,
-0.2000014484,
-0.1759466231,
0.2301194966,
-0.2421483696,
0.0548489988,
-0.2659101486,
0.0627726167,
-0.04169254,
0.02695366,
-0.005927844,
-0.0628841817,
0.0675144494,
0.3473343253,
-0.1370733082,
0.3493894935,
0.2663171589,
0.0334930569,
-0.0034477115,
-0.278297931,
-0.1931355,
-0.2683140337,
0.0700842142,
-0.2921245098,
0.4918607473,
-0.4018592536,
-0.3019632995,
-0.1804216802,
0.2724742591,
0.1233780235,
-0.1268286705,
-0.4767788351,
0.1658579111,
-0.0587570518,
0.0838124603,
0.0044374987,
0.508733809,
0.0599868,
0.3379510641,
-0.2266304791,
-0.3412218094,
0.5358172655,
-0.4137625992,
-0.2617648244,
-0.1319275945,
-0.0639737546,
0.6073153615,
-0.4836448431,
-0.3043729663,
-0.2037672251,
0.2719913721,
-0.1200055629,
-0.1490255296,
0.1555722952,
-0.2652983069,
0.1745558083,
-0.189201951,
-0.0870611668,
0.4393820167,
-0.0882679746,
0.2773536444,
-0.1299419254
] |
https://github.com/huggingface/datasets/issues/2937 | load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied | Hi @daqieq, thanks for reporting.
Unfortunately, I was not able to reproduce this bug:
```ipython
In [1]: from datasets import load_dataset
...: ds = load_dataset('wiki_bio')
Downloading: 7.58kB [00:00, 26.3kB/s]
Downloading: 2.71kB [00:00, ?B/s]
Using custom data configuration default
Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\
1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9...
Downloading: 334MB [01:17, 4.32MB/s]
Dataset wiki_bio downloaded and prepared to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9. Subsequent calls will reuse thi
s data.
```
This kind of error messages usually happen because:
- Your running Python script hasn't write access to that directory
- You have another program (the File Explorer?) already browsing inside that directory | ## Describe the bug
Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11.
## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset('wiki_bio')
```
## Expected results
It is expected that the dataset downloads without any errors.
## Actual results
PermissionError see trace below:
```
Using custom data configuration default
Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare
self._save_info()
File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__
next(self.gen)
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir
os.rename(tmp_dir, dirname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9'
```
By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed.
It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue.
## Environment info
- `datasets` version: 1.12.1
- Platform: Windows-10-10.0.22449-SP0
- Python version: 3.8.12
- PyArrow version: 5.0.0
| 109 | load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied
## Describe the bug
Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11.
## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset('wiki_bio')
```
## Expected results
It is expected that the dataset downloads without any errors.
## Actual results
PermissionError see trace below:
```
Using custom data configuration default
Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare
self._save_info()
File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__
next(self.gen)
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir
os.rename(tmp_dir, dirname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9'
```
By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed.
It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue.
## Environment info
- `datasets` version: 1.12.1
- Platform: Windows-10-10.0.22449-SP0
- Python version: 3.8.12
- PyArrow version: 5.0.0
Hi @daqieq, thanks for reporting.
Unfortunately, I was not able to reproduce this bug:
```ipython
In [1]: from datasets import load_dataset
...: ds = load_dataset('wiki_bio')
Downloading: 7.58kB [00:00, 26.3kB/s]
Downloading: 2.71kB [00:00, ?B/s]
Using custom data configuration default
Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\
1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9...
Downloading: 334MB [01:17, 4.32MB/s]
Dataset wiki_bio downloaded and prepared to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9. Subsequent calls will reuse thi
s data.
```
This kind of error messages usually happen because:
- Your running Python script hasn't write access to that directory
- You have another program (the File Explorer?) already browsing inside that directory | [
-0.2289306819,
0.3834536374,
0.0403455123,
0.2550398707,
-0.0121114748,
0.2622570992,
0.5036686659,
0.1329528391,
0.3442815542,
0.1357177198,
-0.1089740172,
0.0772838667,
0.073150292,
-0.0056993067,
-0.1256227195,
0.0789284036,
0.0364450403,
-0.0053883456,
0.2149499953,
0.1039546505,
-0.4238831997,
0.1072951853,
-0.1728550494,
0.18611525,
0.0260949396,
-0.1363422424,
0.1212602928,
0.3607298136,
-0.0307891499,
-0.3922067285,
0.3530230522,
0.0634533614,
0.4639181495,
0.2582460642,
-0.000119246,
-0.0137066245,
0.2306839526,
0.1244995147,
-0.0737274811,
0.0871000364,
-0.1839850396,
-0.1409677565,
0.1652295887,
-0.0976865813,
0.1767437905,
0.363491416,
-0.1021371782,
-0.2009293735,
-0.0130414814,
0.3790340126,
0.1573003381,
-0.038185209,
-0.1186793,
-0.0752040446,
0.4933359325,
-0.1592981517,
-0.133180216,
0.2798379064,
0.079024978,
-0.1145702899,
-0.0989916921,
0.1995730847,
-0.1621492505,
0.1471575797,
0.0186585188,
0.0311296061,
0.2162310183,
-0.4581093788,
0.3521410227,
0.1512576044,
0.9656503797,
-0.1955736428,
-0.1914042979,
-0.0887491331,
0.0133039914,
-0.0330024846,
0.4326033294,
0.4286228716,
-0.3245688677,
0.252370894,
0.0659692809,
0.0835652128,
-0.0825508237,
-0.001908889,
0.0712851733,
0.1486521959,
-0.0504702814,
0.1195564419,
-0.114730984,
-0.0834005624,
0.3863353729,
-0.2138272524,
-0.2546019256,
0.1916670203,
-0.3394364715,
0.2898703218,
0.0534536913,
0.7778065205,
0.1578776687,
0.3155295551,
0.1250243187,
-0.0540523119,
0.213623777,
0.0651902109,
0.0085930564,
0.3214896321,
-0.1122386605,
-0.0169231072,
0.427105844,
0.117442362,
-0.0816166177,
-0.0089903977,
-0.0200454462,
-0.4294739366,
0.3538796902,
0.105407238,
0.4081186354,
-0.2856416702,
-0.1217011064,
-0.0002952218,
0.1581319273,
-0.0239709187,
0.05888303,
0.5011534691,
-0.2717711926,
0.0426834486,
0.0682515353,
0.1794450283,
0.0186105669,
0.0977605879,
-0.0877998918,
-0.089002721,
-0.2667179406,
-0.0514381379,
0.4086471796,
-0.3225749135,
0.0955643952,
0.2566770911,
0.0270482227,
-0.1792940795,
0.191831857,
-0.0414975584,
-0.0328566693,
0.357686609,
0.397295773,
0.3376339674,
0.174932465,
-0.2122965753,
-0.0349954516,
0.1863115728,
-0.4872899652,
-0.4025040567,
-0.0336631201,
0.1213276833,
-0.0833241865,
0.0632049516,
-0.1980365515,
-0.0482575409,
0.3823127449,
-0.3008549809,
-0.0618357137,
-0.0137259383,
-0.2206201851,
-0.5042763352,
0.0407075882,
0.4012889862,
-0.359698832,
0.130366981,
-0.0915538967,
-0.2640864253,
0.1504323184,
0.0056377389,
0.0056344233,
0.3616816998,
-0.2812202573,
0.0156069994,
0.2774583995,
-0.3938951194,
-1.0015972853,
-0.0210030675,
0.073099874,
0.1660425365,
0.2444062084,
0.1191370711,
0.3659378886,
-0.0303457454,
0.170476988,
0.3187129498,
0.1300749481,
0.1119743437,
-0.0629963279,
-0.2038551867,
0.2796608806,
0.1339262724,
0.0883390605,
0.3009034991,
0.3125997186,
-0.0569340698,
0.2510955632,
-0.1872614026,
0.1168041155,
0.1925157607,
0.0114951627,
-0.0351364501,
0.1375143826,
-0.1277376264,
-0.4204092622,
0.3514482975,
-0.0081170052,
0.0851671621,
0.0759793371,
-0.2027432919,
-0.3184638917,
0.0913410336,
-0.5447551012,
-0.2889967859,
0.0851063654,
0.2938991785,
0.2124252915,
0.0236819461,
0.1891639531,
0.3374144137,
-0.2082268894,
0.1271958947,
-0.1811407059,
0.0386060849,
-0.1883372813,
-0.136449039,
-0.2122478187,
0.0469156131,
0.2001281381,
0.252748549,
-0.2134329677,
0.1961009949,
0.1512132138,
0.0374988988,
-0.3785575032,
-0.0595559031,
-0.0223774984,
0.1217298508,
0.1568485498,
0.1381784081,
0.148323521,
-0.0443944484,
-0.192219004,
0.1377543956,
-0.1596345305,
0.1437312663,
-0.3266508281,
0.2430362999,
0.2447061986,
0.0900503322,
0.0856965557,
0.0344528556,
0.3054703474,
0.0241180807,
0.0745957047,
-0.2858041525,
0.1012612879,
-0.0778077692,
0.0593028516,
0.0225473121,
0.0812819451,
0.2497535348,
-0.1746014953,
0.0168862492,
0.2869938016,
0.3496789932,
0.5377132893,
-0.0409863256,
0.0515503176,
0.0667969286,
0.0479119457,
0.0896691382,
0.1192514747,
0.0857711285,
-0.0702272207,
0.263449043,
0.1284335256,
0.2241659015,
-0.0647976249,
-0.113860786,
-0.1075413004,
0.4194296896,
-0.4875138998,
-0.0843875632,
0.1000551581,
0.0748399794,
0.181201458,
-0.2428469807,
-0.0887820274,
-0.1460986584,
-0.2430456877,
0.3116367459,
0.0940705985,
0.0835374966,
-0.5119578242,
0.164441511,
0.0075376779,
-0.2018062174,
-0.1137571037,
0.1238791943,
-0.165833801,
-0.0141073428,
0.1862449348,
-0.1799400002,
0.1873877198,
-0.2951590419,
0.2437519729,
-0.3901757598,
-0.1954322159,
0.0151099861,
0.0578858294,
0.4098418951,
0.1254312247,
0.1551068723,
0.1864108443,
-0.3417646289,
0.0566029251,
-0.1075194478,
-0.151061058,
0.2333707958,
-0.0550265051,
0.093855381,
0.0341967791,
-0.2493750155,
-0.5408245921,
-0.2501788139,
-0.0095761176,
0.3858901262,
0.0983012617,
-0.002851326,
-0.1126532406,
0.0033441521,
0.2670296431,
0.3937679231,
-0.2108281106,
-0.2492018938,
0.2102497518,
-0.2092679441,
-0.3346995711,
0.0819490775,
-0.1042307615,
0.044570744,
0.2523833811,
-0.478848815,
-0.0906345695,
-0.3600654602,
0.4096083045,
-0.2326152027,
0.0938281342,
0.3463047743,
0.0892929062,
0.1463987231,
-0.0417489335,
-0.2757164538,
-0.0651356578,
-0.2946413755,
-0.0682324842,
0.3381983042,
0.4274493754,
-0.0575701892,
0.3770319819,
0.3002277017,
0.3604495525,
0.3344712257,
0.0458412766,
0.3711137176,
0.0542610958,
-0.2594741583,
0.108775273,
-0.1943463087,
-0.1401606798,
0.3007433116,
0.0889824033,
-0.1952639222,
-0.0525318235,
-0.3804526627,
-0.2807891965,
-0.2852860689,
-0.0992423743,
-0.2463322729,
0.2537563443,
0.1191408932,
0.1100430414,
-0.4462447762,
-0.3691141903,
0.0288439281,
0.5546327233,
-0.3098393977,
0.1115754396,
-0.3508036733,
0.1366984397,
-0.6549721956,
0.2522454858,
0.0340252779,
0.4958057106,
-0.1741241962,
0.126697138,
-0.0015079491,
-0.1074296087,
0.5570680499,
-0.6522980928,
0.46183002,
0.0581228882,
0.1157311201,
0.0101969615,
-0.2243449986,
-0.0922561362,
0.2416802496,
0.1369417459,
0.214554742,
0.1639220566,
0.0440417156,
0.0762093514,
0.1665932685,
-0.2001325935,
-0.2790575624,
-0.2271350026,
-0.3418878019,
-0.3903852403,
0.1280059814,
0.0421994478,
0.1854701936,
-0.1517434716,
0.1171617955,
-0.4046883583,
0.2369778305,
0.1301798522,
0.1602822542,
0.1877918988,
0.0645755827,
0.2181591392,
-0.0480449386,
0.0753487349,
-0.1291564405,
0.5240868926,
-0.2804766893,
-0.3283787966,
-0.0524906367,
-0.1999856532,
-0.1171173379,
0.1122425422,
-0.3265575767,
-0.0500915684,
-0.1384818554,
-0.1327375472,
-0.3143308461,
0.1170744598,
0.0426039472,
-0.1354340613,
-0.3776836395,
-0.3201940656,
0.3641436398,
0.2117006332,
-0.4467276931,
0.3404746354,
0.1198480427,
-0.4280629754,
0.182469219,
0.0517599434,
0.7466568947,
0.0798900202,
0.278021127,
0.09727709,
-0.1122954637,
0.2001173794,
0.1161782891,
0.0565572493,
-0.3728863001,
-0.4541018009,
-0.0988717899,
-0.2205426991,
-0.1345372349,
-0.0249410085,
-0.2337932885,
0.2817450762,
-0.1129787266,
0.3188051879,
0.2743099928,
0.04803738,
-0.3741956353,
-0.3764995933,
-0.1209943816,
0.1251862943,
-0.1938234866,
0.1358687431,
-0.2274904847,
0.0911156386,
0.0849042386,
-0.1673949063,
-0.4391218424,
0.1967894584,
-0.4114460945,
0.1381168962,
-0.2974180281,
-0.383682549,
0.087799713,
0.5960641503,
0.2849672139,
0.3604593277,
-0.1543028504,
0.060066551,
0.0793892294,
0.1179450899,
0.0249578729,
0.0074553415,
0.196264267,
-0.0806937888,
-0.2981881797,
-0.0151689686,
-0.2781271338,
-0.3215303421,
-0.1055536121,
0.2862681746,
0.4039054215,
-0.3201122284,
-0.2076889426,
-0.3106456101,
0.0849743038,
-0.2798958421,
0.0937028453,
0.0470424704,
-0.0756008029,
0.3795402646,
-0.3368884921,
-0.4257120192,
-0.1475177407,
0.5242763162,
-0.0790770203,
-0.1337568164,
0.5711381435,
-0.0485030413,
-0.1785395592,
-0.0130322464,
0.1454920769,
-0.1009837091,
-0.4624590278,
-0.1003440619,
-0.1225367188,
0.107828021,
-0.0291068386,
0.1698506922,
0.2787975669,
-0.0963104218,
0.0534037948,
-0.7581390738,
-0.2621004283,
-0.1129845753,
-0.2311436832,
0.1716350615,
0.1831113547,
-0.4405415058,
-0.1353052557,
-0.2840807736,
-0.2030029446,
0.0441008732,
-0.2147328556,
-0.1294413656,
0.2779016495,
0.1545574516,
-0.0013405159,
0.1245134324,
-0.0026246868,
0.0926586911,
0.1227550209,
-0.1713697463,
-0.1237097606,
0.1475241631,
0.1037820205,
-0.0917998925,
0.0267538689,
-0.3284253478,
-0.0735969618,
-0.0984260663,
0.3940446377,
0.2593080997,
-0.0281577855,
0.0679169223,
-0.1276832521,
0.2894710898,
-0.2827047706,
0.4151190221,
-0.3472835124,
-0.0251296461,
-0.0133728236,
0.334769249,
-0.1413164735,
0.054126814,
-0.1174534783,
-0.0824943334,
0.1532539725,
0.067897521,
0.0646064579,
-0.3769118488,
0.0850263089,
0.1787574291,
0.0593336225,
0.0623649172,
-0.2331831753,
0.0148411766,
0.2450494915,
0.1589922756,
-0.0922702253,
-0.1294874996,
-0.0120075559,
-0.3234774768,
-0.179044351,
0.3004156053,
0.1639570743,
-0.3836255968,
0.1359912753,
-0.0324051306,
0.5581637621,
-0.224694699,
-0.05772084,
0.4813492,
-0.2174007595,
0.2738089859,
0.2185859084,
0.2596436739,
-0.0843800232,
0.5514784455,
0.1820428073,
0.1367383748,
-0.005867789,
-0.172048375,
-0.1030526459,
-0.6628077626,
0.2800289392,
0.0652532652,
-0.0736902952,
0.0509435683,
-0.0296166316,
-0.0086357668,
-0.3041152358,
-0.0021535866,
-0.4382818937,
-0.2168944031,
-0.180883497,
-0.2836595774,
0.0684351027,
-0.2338435948,
0.172539115,
0.0927765369,
-0.1707767546,
-0.1451970041,
-0.0699780062,
-0.0427518673,
-0.3035750687,
-0.2684686184,
0.1116327345,
0.4133674204,
-0.26629287,
-0.1926916242,
0.0890492797,
0.0064424723,
0.2395811677,
0.0886424705,
0.0961361006,
0.7200034857,
0.3696609735,
-0.1867061555,
-0.0827121288,
0.2043792456,
0.0849799588,
-0.1013357937,
0.3095622659,
0.1992661208,
0.177231878,
0.3453570008,
0.1196847185,
-0.1244665906,
0.0374585949,
0.0380601063,
-0.0089478046,
-0.0834793597,
0.1873594075,
-0.1764344722,
-0.1684233248,
0.1405664831,
0.1980234832,
-0.072777532,
0.1700269878,
0.2323685437,
0.0627375469,
0.194508791,
-0.1900536865,
0.0200616792,
0.1487800479,
0.315546006,
0.3503625393,
0.0980699062,
-0.2335532159,
-0.0683590919,
-0.5775801539,
0.2545948327,
-0.0182251967,
-0.3800155818,
-0.0322350785,
-0.1324878931,
-0.3368007839,
0.106135495,
0.1619228125,
-0.109096691,
0.0555580929,
0.2668964267,
-0.15676108,
-0.2936109304,
0.3894381821,
-0.0377686471,
-0.0781007633,
-0.6786635518,
0.0366011113,
-0.0887598991,
0.0320076868,
-0.1506993771,
-0.1666384935,
0.0341497734,
-0.0260736439,
0.5437771678,
0.2644130886,
0.4555603862,
0.0078378692,
0.0918127075,
-0.5622055531,
-0.068797648,
-0.1452899277,
-0.0336943828,
-0.0778261572,
0.2713478804,
-0.2275038064,
0.0414362848,
-0.1241924092,
0.1670939773,
0.2662992179,
0.3795419037,
-0.0054565854,
0.2279052585,
0.1809429228,
0.1571902037,
0.347844094,
0.0699720681,
-0.0961795077,
0.446036607,
-0.2409338653,
-0.3420478702,
0.2109490484,
-0.394151181,
-0.3340472281,
-0.0192079395,
0.3251574039,
-0.2549185455,
-0.1531336606,
-0.2379635572,
0.2061090171,
0.247839421,
-0.1434803456,
-0.3868971765,
0.1413453072,
-0.1570355594,
0.140291661,
-0.0227521993,
0.0342237987,
0.010134723,
-0.2253904045,
0.170867458,
-0.2374368906
] |
https://github.com/huggingface/datasets/issues/2937 | load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied | Thanks @albertvillanova for looking at it! I tried on my personal Windows machine and it downloaded just fine.
Running on my work machine and on a colleague's machine it is consistently hitting this error. It's not a write access issue because the `.incomplete` directory is written just fine. It just won't rename and then it deletes the directory in the `finally` step. Also the zip file is written and extracted fine in the downloads directory.
That leaves another program that might be interfering, and there are plenty of those in my work machine ... (full antivirus, data loss prevention, etc.). So the question remains, why not extend the `try` block to allow catching the error and circle back to the rename after the unknown program is finished doing its 'stuff'. This is the approach that I read about in the linked repo (see my comments above).
If it's not high priority, that's fine. However, if someone were to write an PR that solved this issue in our environment in an `except` clause, would it be reviewed for inclusion in a future release? Just wondering whether I should spend any more time on this issue. | ## Describe the bug
Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11.
## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset('wiki_bio')
```
## Expected results
It is expected that the dataset downloads without any errors.
## Actual results
PermissionError see trace below:
```
Using custom data configuration default
Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare
self._save_info()
File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__
next(self.gen)
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir
os.rename(tmp_dir, dirname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9'
```
By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed.
It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue.
## Environment info
- `datasets` version: 1.12.1
- Platform: Windows-10-10.0.22449-SP0
- Python version: 3.8.12
- PyArrow version: 5.0.0
| 194 | load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied
## Describe the bug
Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11.
## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset('wiki_bio')
```
## Expected results
It is expected that the dataset downloads without any errors.
## Actual results
PermissionError see trace below:
```
Using custom data configuration default
Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare
self._save_info()
File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__
next(self.gen)
File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir
os.rename(tmp_dir, dirname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9'
```
By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed.
It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue.
## Environment info
- `datasets` version: 1.12.1
- Platform: Windows-10-10.0.22449-SP0
- Python version: 3.8.12
- PyArrow version: 5.0.0
Thanks @albertvillanova for looking at it! I tried on my personal Windows machine and it downloaded just fine.
Running on my work machine and on a colleague's machine it is consistently hitting this error. It's not a write access issue because the `.incomplete` directory is written just fine. It just won't rename and then it deletes the directory in the `finally` step. Also the zip file is written and extracted fine in the downloads directory.
That leaves another program that might be interfering, and there are plenty of those in my work machine ... (full antivirus, data loss prevention, etc.). So the question remains, why not extend the `try` block to allow catching the error and circle back to the rename after the unknown program is finished doing its 'stuff'. This is the approach that I read about in the linked repo (see my comments above).
If it's not high priority, that's fine. However, if someone were to write an PR that solved this issue in our environment in an `except` clause, would it be reviewed for inclusion in a future release? Just wondering whether I should spend any more time on this issue. | [
-0.2289306819,
0.3834536374,
0.0403455123,
0.2550398707,
-0.0121114748,
0.2622570992,
0.5036686659,
0.1329528391,
0.3442815542,
0.1357177198,
-0.1089740172,
0.0772838667,
0.073150292,
-0.0056993067,
-0.1256227195,
0.0789284036,
0.0364450403,
-0.0053883456,
0.2149499953,
0.1039546505,
-0.4238831997,
0.1072951853,
-0.1728550494,
0.18611525,
0.0260949396,
-0.1363422424,
0.1212602928,
0.3607298136,
-0.0307891499,
-0.3922067285,
0.3530230522,
0.0634533614,
0.4639181495,
0.2582460642,
-0.000119246,
-0.0137066245,
0.2306839526,
0.1244995147,
-0.0737274811,
0.0871000364,
-0.1839850396,
-0.1409677565,
0.1652295887,
-0.0976865813,
0.1767437905,
0.363491416,
-0.1021371782,
-0.2009293735,
-0.0130414814,
0.3790340126,
0.1573003381,
-0.038185209,
-0.1186793,
-0.0752040446,
0.4933359325,
-0.1592981517,
-0.133180216,
0.2798379064,
0.079024978,
-0.1145702899,
-0.0989916921,
0.1995730847,
-0.1621492505,
0.1471575797,
0.0186585188,
0.0311296061,
0.2162310183,
-0.4581093788,
0.3521410227,
0.1512576044,
0.9656503797,
-0.1955736428,
-0.1914042979,
-0.0887491331,
0.0133039914,
-0.0330024846,
0.4326033294,
0.4286228716,
-0.3245688677,
0.252370894,
0.0659692809,
0.0835652128,
-0.0825508237,
-0.001908889,
0.0712851733,
0.1486521959,
-0.0504702814,
0.1195564419,
-0.114730984,
-0.0834005624,
0.3863353729,
-0.2138272524,
-0.2546019256,
0.1916670203,
-0.3394364715,
0.2898703218,
0.0534536913,
0.7778065205,
0.1578776687,
0.3155295551,
0.1250243187,
-0.0540523119,
0.213623777,
0.0651902109,
0.0085930564,
0.3214896321,
-0.1122386605,
-0.0169231072,
0.427105844,
0.117442362,
-0.0816166177,
-0.0089903977,
-0.0200454462,
-0.4294739366,
0.3538796902,
0.105407238,
0.4081186354,
-0.2856416702,
-0.1217011064,
-0.0002952218,
0.1581319273,
-0.0239709187,
0.05888303,
0.5011534691,
-0.2717711926,
0.0426834486,
0.0682515353,
0.1794450283,
0.0186105669,
0.0977605879,
-0.0877998918,
-0.089002721,
-0.2667179406,
-0.0514381379,
0.4086471796,
-0.3225749135,
0.0955643952,
0.2566770911,
0.0270482227,
-0.1792940795,
0.191831857,
-0.0414975584,
-0.0328566693,
0.357686609,
0.397295773,
0.3376339674,
0.174932465,
-0.2122965753,
-0.0349954516,
0.1863115728,
-0.4872899652,
-0.4025040567,
-0.0336631201,
0.1213276833,
-0.0833241865,
0.0632049516,
-0.1980365515,
-0.0482575409,
0.3823127449,
-0.3008549809,
-0.0618357137,
-0.0137259383,
-0.2206201851,
-0.5042763352,
0.0407075882,
0.4012889862,
-0.359698832,
0.130366981,
-0.0915538967,
-0.2640864253,
0.1504323184,
0.0056377389,
0.0056344233,
0.3616816998,
-0.2812202573,
0.0156069994,
0.2774583995,
-0.3938951194,
-1.0015972853,
-0.0210030675,
0.073099874,
0.1660425365,
0.2444062084,
0.1191370711,
0.3659378886,
-0.0303457454,
0.170476988,
0.3187129498,
0.1300749481,
0.1119743437,
-0.0629963279,
-0.2038551867,
0.2796608806,
0.1339262724,
0.0883390605,
0.3009034991,
0.3125997186,
-0.0569340698,
0.2510955632,
-0.1872614026,
0.1168041155,
0.1925157607,
0.0114951627,
-0.0351364501,
0.1375143826,
-0.1277376264,
-0.4204092622,
0.3514482975,
-0.0081170052,
0.0851671621,
0.0759793371,
-0.2027432919,
-0.3184638917,
0.0913410336,
-0.5447551012,
-0.2889967859,
0.0851063654,
0.2938991785,
0.2124252915,
0.0236819461,
0.1891639531,
0.3374144137,
-0.2082268894,
0.1271958947,
-0.1811407059,
0.0386060849,
-0.1883372813,
-0.136449039,
-0.2122478187,
0.0469156131,
0.2001281381,
0.252748549,
-0.2134329677,
0.1961009949,
0.1512132138,
0.0374988988,
-0.3785575032,
-0.0595559031,
-0.0223774984,
0.1217298508,
0.1568485498,
0.1381784081,
0.148323521,
-0.0443944484,
-0.192219004,
0.1377543956,
-0.1596345305,
0.1437312663,
-0.3266508281,
0.2430362999,
0.2447061986,
0.0900503322,
0.0856965557,
0.0344528556,
0.3054703474,
0.0241180807,
0.0745957047,
-0.2858041525,
0.1012612879,
-0.0778077692,
0.0593028516,
0.0225473121,
0.0812819451,
0.2497535348,
-0.1746014953,
0.0168862492,
0.2869938016,
0.3496789932,
0.5377132893,
-0.0409863256,
0.0515503176,
0.0667969286,
0.0479119457,
0.0896691382,
0.1192514747,
0.0857711285,
-0.0702272207,
0.263449043,
0.1284335256,
0.2241659015,
-0.0647976249,
-0.113860786,
-0.1075413004,
0.4194296896,
-0.4875138998,
-0.0843875632,
0.1000551581,
0.0748399794,
0.181201458,
-0.2428469807,
-0.0887820274,
-0.1460986584,
-0.2430456877,
0.3116367459,
0.0940705985,
0.0835374966,
-0.5119578242,
0.164441511,
0.0075376779,
-0.2018062174,
-0.1137571037,
0.1238791943,
-0.165833801,
-0.0141073428,
0.1862449348,
-0.1799400002,
0.1873877198,
-0.2951590419,
0.2437519729,
-0.3901757598,
-0.1954322159,
0.0151099861,
0.0578858294,
0.4098418951,
0.1254312247,
0.1551068723,
0.1864108443,
-0.3417646289,
0.0566029251,
-0.1075194478,
-0.151061058,
0.2333707958,
-0.0550265051,
0.093855381,
0.0341967791,
-0.2493750155,
-0.5408245921,
-0.2501788139,
-0.0095761176,
0.3858901262,
0.0983012617,
-0.002851326,
-0.1126532406,
0.0033441521,
0.2670296431,
0.3937679231,
-0.2108281106,
-0.2492018938,
0.2102497518,
-0.2092679441,
-0.3346995711,
0.0819490775,
-0.1042307615,
0.044570744,
0.2523833811,
-0.478848815,
-0.0906345695,
-0.3600654602,
0.4096083045,
-0.2326152027,
0.0938281342,
0.3463047743,
0.0892929062,
0.1463987231,
-0.0417489335,
-0.2757164538,
-0.0651356578,
-0.2946413755,
-0.0682324842,
0.3381983042,
0.4274493754,
-0.0575701892,
0.3770319819,
0.3002277017,
0.3604495525,
0.3344712257,
0.0458412766,
0.3711137176,
0.0542610958,
-0.2594741583,
0.108775273,
-0.1943463087,
-0.1401606798,
0.3007433116,
0.0889824033,
-0.1952639222,
-0.0525318235,
-0.3804526627,
-0.2807891965,
-0.2852860689,
-0.0992423743,
-0.2463322729,
0.2537563443,
0.1191408932,
0.1100430414,
-0.4462447762,
-0.3691141903,
0.0288439281,
0.5546327233,
-0.3098393977,
0.1115754396,
-0.3508036733,
0.1366984397,
-0.6549721956,
0.2522454858,
0.0340252779,
0.4958057106,
-0.1741241962,
0.126697138,
-0.0015079491,
-0.1074296087,
0.5570680499,
-0.6522980928,
0.46183002,
0.0581228882,
0.1157311201,
0.0101969615,
-0.2243449986,
-0.0922561362,
0.2416802496,
0.1369417459,
0.214554742,
0.1639220566,
0.0440417156,
0.0762093514,
0.1665932685,
-0.2001325935,
-0.2790575624,
-0.2271350026,
-0.3418878019,
-0.3903852403,
0.1280059814,
0.0421994478,
0.1854701936,
-0.1517434716,
0.1171617955,
-0.4046883583,
0.2369778305,
0.1301798522,
0.1602822542,
0.1877918988,
0.0645755827,
0.2181591392,
-0.0480449386,
0.0753487349,
-0.1291564405,
0.5240868926,
-0.2804766893,
-0.3283787966,
-0.0524906367,
-0.1999856532,
-0.1171173379,
0.1122425422,
-0.3265575767,
-0.0500915684,
-0.1384818554,
-0.1327375472,
-0.3143308461,
0.1170744598,
0.0426039472,
-0.1354340613,
-0.3776836395,
-0.3201940656,
0.3641436398,
0.2117006332,
-0.4467276931,
0.3404746354,
0.1198480427,
-0.4280629754,
0.182469219,
0.0517599434,
0.7466568947,
0.0798900202,
0.278021127,
0.09727709,
-0.1122954637,
0.2001173794,
0.1161782891,
0.0565572493,
-0.3728863001,
-0.4541018009,
-0.0988717899,
-0.2205426991,
-0.1345372349,
-0.0249410085,
-0.2337932885,
0.2817450762,
-0.1129787266,
0.3188051879,
0.2743099928,
0.04803738,
-0.3741956353,
-0.3764995933,
-0.1209943816,
0.1251862943,
-0.1938234866,
0.1358687431,
-0.2274904847,
0.0911156386,
0.0849042386,
-0.1673949063,
-0.4391218424,
0.1967894584,
-0.4114460945,
0.1381168962,
-0.2974180281,
-0.383682549,
0.087799713,
0.5960641503,
0.2849672139,
0.3604593277,
-0.1543028504,
0.060066551,
0.0793892294,
0.1179450899,
0.0249578729,
0.0074553415,
0.196264267,
-0.0806937888,
-0.2981881797,
-0.0151689686,
-0.2781271338,
-0.3215303421,
-0.1055536121,
0.2862681746,
0.4039054215,
-0.3201122284,
-0.2076889426,
-0.3106456101,
0.0849743038,
-0.2798958421,
0.0937028453,
0.0470424704,
-0.0756008029,
0.3795402646,
-0.3368884921,
-0.4257120192,
-0.1475177407,
0.5242763162,
-0.0790770203,
-0.1337568164,
0.5711381435,
-0.0485030413,
-0.1785395592,
-0.0130322464,
0.1454920769,
-0.1009837091,
-0.4624590278,
-0.1003440619,
-0.1225367188,
0.107828021,
-0.0291068386,
0.1698506922,
0.2787975669,
-0.0963104218,
0.0534037948,
-0.7581390738,
-0.2621004283,
-0.1129845753,
-0.2311436832,
0.1716350615,
0.1831113547,
-0.4405415058,
-0.1353052557,
-0.2840807736,
-0.2030029446,
0.0441008732,
-0.2147328556,
-0.1294413656,
0.2779016495,
0.1545574516,
-0.0013405159,
0.1245134324,
-0.0026246868,
0.0926586911,
0.1227550209,
-0.1713697463,
-0.1237097606,
0.1475241631,
0.1037820205,
-0.0917998925,
0.0267538689,
-0.3284253478,
-0.0735969618,
-0.0984260663,
0.3940446377,
0.2593080997,
-0.0281577855,
0.0679169223,
-0.1276832521,
0.2894710898,
-0.2827047706,
0.4151190221,
-0.3472835124,
-0.0251296461,
-0.0133728236,
0.334769249,
-0.1413164735,
0.054126814,
-0.1174534783,
-0.0824943334,
0.1532539725,
0.067897521,
0.0646064579,
-0.3769118488,
0.0850263089,
0.1787574291,
0.0593336225,
0.0623649172,
-0.2331831753,
0.0148411766,
0.2450494915,
0.1589922756,
-0.0922702253,
-0.1294874996,
-0.0120075559,
-0.3234774768,
-0.179044351,
0.3004156053,
0.1639570743,
-0.3836255968,
0.1359912753,
-0.0324051306,
0.5581637621,
-0.224694699,
-0.05772084,
0.4813492,
-0.2174007595,
0.2738089859,
0.2185859084,
0.2596436739,
-0.0843800232,
0.5514784455,
0.1820428073,
0.1367383748,
-0.005867789,
-0.172048375,
-0.1030526459,
-0.6628077626,
0.2800289392,
0.0652532652,
-0.0736902952,
0.0509435683,
-0.0296166316,
-0.0086357668,
-0.3041152358,
-0.0021535866,
-0.4382818937,
-0.2168944031,
-0.180883497,
-0.2836595774,
0.0684351027,
-0.2338435948,
0.172539115,
0.0927765369,
-0.1707767546,
-0.1451970041,
-0.0699780062,
-0.0427518673,
-0.3035750687,
-0.2684686184,
0.1116327345,
0.4133674204,
-0.26629287,
-0.1926916242,
0.0890492797,
0.0064424723,
0.2395811677,
0.0886424705,
0.0961361006,
0.7200034857,
0.3696609735,
-0.1867061555,
-0.0827121288,
0.2043792456,
0.0849799588,
-0.1013357937,
0.3095622659,
0.1992661208,
0.177231878,
0.3453570008,
0.1196847185,
-0.1244665906,
0.0374585949,
0.0380601063,
-0.0089478046,
-0.0834793597,
0.1873594075,
-0.1764344722,
-0.1684233248,
0.1405664831,
0.1980234832,
-0.072777532,
0.1700269878,
0.2323685437,
0.0627375469,
0.194508791,
-0.1900536865,
0.0200616792,
0.1487800479,
0.315546006,
0.3503625393,
0.0980699062,
-0.2335532159,
-0.0683590919,
-0.5775801539,
0.2545948327,
-0.0182251967,
-0.3800155818,
-0.0322350785,
-0.1324878931,
-0.3368007839,
0.106135495,
0.1619228125,
-0.109096691,
0.0555580929,
0.2668964267,
-0.15676108,
-0.2936109304,
0.3894381821,
-0.0377686471,
-0.0781007633,
-0.6786635518,
0.0366011113,
-0.0887598991,
0.0320076868,
-0.1506993771,
-0.1666384935,
0.0341497734,
-0.0260736439,
0.5437771678,
0.2644130886,
0.4555603862,
0.0078378692,
0.0918127075,
-0.5622055531,
-0.068797648,
-0.1452899277,
-0.0336943828,
-0.0778261572,
0.2713478804,
-0.2275038064,
0.0414362848,
-0.1241924092,
0.1670939773,
0.2662992179,
0.3795419037,
-0.0054565854,
0.2279052585,
0.1809429228,
0.1571902037,
0.347844094,
0.0699720681,
-0.0961795077,
0.446036607,
-0.2409338653,
-0.3420478702,
0.2109490484,
-0.394151181,
-0.3340472281,
-0.0192079395,
0.3251574039,
-0.2549185455,
-0.1531336606,
-0.2379635572,
0.2061090171,
0.247839421,
-0.1434803456,
-0.3868971765,
0.1413453072,
-0.1570355594,
0.140291661,
-0.0227521993,
0.0342237987,
0.010134723,
-0.2253904045,
0.170867458,
-0.2374368906
] |
https://github.com/huggingface/datasets/issues/2934 | to_tf_dataset keeps a reference to the open data somewhere, causing issues on windows | I did some investigation and, as it seems, the bug stems from [this line](https://github.com/huggingface/datasets/blob/8004d7c3e1d74b29c3e5b0d1660331cd26758363/src/datasets/arrow_dataset.py#L325). The lifecycle of the dataset from the linked line is bound to one of the returned `tf.data.Dataset`. So my (hacky) solution involves wrapping the linked dataset with `weakref.proxy` and adding a custom `__del__` to `tf.python.data.ops.dataset_ops.TensorSliceDataset` (this is the type of a dataset that is returned by `tf.data.Dataset.from_tensor_slices`; this works for TF 2.x, but I'm not sure `tf.python.data.ops.dataset_ops` is a valid path for TF 1.x) that deletes the linked dataset, which is assigned to the dataset object as a property. Will open a draft PR soon! | To reproduce:
```python
import datasets as ds
import weakref
import gc
d = ds.load_dataset("mnist", split="train")
ref = weakref.ref(d._data.table)
tfd = d.to_tf_dataset("image", batch_size=1, shuffle=False, label_cols="label")
del tfd, d
gc.collect()
assert ref() is None, "Error: there is at least one reference left"
```
This causes issues because the table holds a reference to an open arrow file that should be closed. So on windows it's not possible to delete or move the arrow file afterwards.
Moreover the CI test of the `to_tf_dataset` method isn't able to clean up the temporary arrow files because of this.
cc @Rocketknight1 | 99 | to_tf_dataset keeps a reference to the open data somewhere, causing issues on windows
To reproduce:
```python
import datasets as ds
import weakref
import gc
d = ds.load_dataset("mnist", split="train")
ref = weakref.ref(d._data.table)
tfd = d.to_tf_dataset("image", batch_size=1, shuffle=False, label_cols="label")
del tfd, d
gc.collect()
assert ref() is None, "Error: there is at least one reference left"
```
This causes issues because the table holds a reference to an open arrow file that should be closed. So on windows it's not possible to delete or move the arrow file afterwards.
Moreover the CI test of the `to_tf_dataset` method isn't able to clean up the temporary arrow files because of this.
cc @Rocketknight1
I did some investigation and, as it seems, the bug stems from [this line](https://github.com/huggingface/datasets/blob/8004d7c3e1d74b29c3e5b0d1660331cd26758363/src/datasets/arrow_dataset.py#L325). The lifecycle of the dataset from the linked line is bound to one of the returned `tf.data.Dataset`. So my (hacky) solution involves wrapping the linked dataset with `weakref.proxy` and adding a custom `__del__` to `tf.python.data.ops.dataset_ops.TensorSliceDataset` (this is the type of a dataset that is returned by `tf.data.Dataset.from_tensor_slices`; this works for TF 2.x, but I'm not sure `tf.python.data.ops.dataset_ops` is a valid path for TF 1.x) that deletes the linked dataset, which is assigned to the dataset object as a property. Will open a draft PR soon! | [
0.0456906855,
0.3345080316,
0.1148889512,
0.0804506093,
0.2304305434,
0.1188877076,
0.3988847733,
0.2548753023,
-0.1099168733,
0.2674389482,
-0.3353856802,
0.4040720761,
-0.1644808352,
-0.1074624807,
-0.0342663452,
-0.1066429764,
0.0511107743,
0.145164758,
-0.1666639894,
-0.1226121858,
-0.2103367746,
0.0351908058,
-0.1274757832,
0.0721155554,
-0.1387631446,
-0.281144619,
0.0105894208,
0.1006438658,
0.2441079319,
-0.0183546767,
0.0682791099,
0.0211764704,
-0.1777959019,
0.4797621071,
-0.0001166652,
0.4142078757,
-0.0061278846,
0.1301537156,
-0.2355813086,
0.0565107875,
-0.0690316707,
0.1760493815,
0.1245590001,
-0.0599729568,
0.1349684447,
-0.2177764028,
-0.0255723502,
0.0832733959,
0.2824957073,
0.4290578663,
0.1738770008,
0.6678112745,
0.0490496904,
-0.0070740059,
0.3827848136,
0.063897185,
-0.2742590308,
0.1161700636,
-0.2370098531,
-0.1935151964,
0.0655605942,
0.5781883001,
0.0173821375,
-0.0747983605,
-0.1346867383,
0.0793779641,
-0.2474850863,
-0.2132098973,
0.0991552919,
0.386462003,
0.2942150533,
-0.3177288771,
-0.0704426616,
-0.128684029,
-0.0647846833,
-0.1454349607,
0.191347748,
-0.0462072156,
0.0173867345,
0.1348502785,
0.0582146272,
-0.1622670889,
-0.2615069151,
-0.0061725415,
-0.2810889482,
-0.107219398,
0.0857436806,
0.0801384151,
0.4141067863,
-0.0271511786,
-0.0686376169,
0.0416292585,
0.020164147,
0.1307914704,
-0.2023016363,
-0.1820207238,
-0.0392584875,
-0.1770305187,
-0.0281794928,
-0.0708619505,
0.2392521501,
-0.1570444852,
-0.2443444133,
0.067739971,
0.1644196957,
-0.0705887154,
-0.6655332446,
0.1451995075,
0.2680507302,
-0.1933341473,
-0.1119191051,
-0.0286710784,
0.0027097426,
-0.4981429279,
0.2861166894,
-0.2107922137,
0.4638059735,
0.0174133852,
-0.58344841,
0.1703358889,
-0.1943604499,
0.4077931941,
-0.0392661095,
0.3421228528,
-0.0097243525,
0.2793690264,
0.3236466646,
-0.0036119809,
-0.4970703721,
-0.016201023,
-0.0546676889,
-0.0396625996,
-0.2995607257,
-0.3319227397,
0.1675924957,
0.0439530686,
-0.0478492379,
0.1728075296,
0.0610826872,
0.1025774777,
0.2539456487,
-0.2808155715,
0.5246314406,
0.48127231,
-0.0750979558,
0.2450948358,
0.0949580222,
-0.2507019043,
-0.1292223334,
0.353417784,
-0.2710707486,
-0.1585650444,
-0.2603646517,
0.1245643422,
-0.1202332303,
-0.1552469879,
-0.2238021493,
0.0450048298,
0.0343124382,
-0.05954713,
0.0862919763,
-0.1370919049,
-0.5523477793,
-0.2646560669,
0.0109039545,
0.3650913239,
-0.1991527081,
0.1795514226,
-0.0254389681,
-0.393191725,
-0.1594110429,
0.2656011283,
0.0646050125,
0.3153831363,
-0.4097916484,
-0.1304868758,
0.4838192463,
-0.2320681214,
-0.4512840807,
0.2350059152,
-0.2089942396,
0.2142525613,
-0.3518176377,
0.1303172261,
0.2125168741,
-0.2066657543,
0.0123628564,
-0.0070452467,
-0.06231042,
-0.0091277137,
-0.3236088753,
-0.0108149648,
-0.0680187419,
-0.1952710599,
-0.0157280769,
-0.0124156512,
0.131864816,
-0.0493952669,
0.3902635574,
0.2196919918,
0.1933262199,
0.1417479664,
0.3756608963,
-0.1729134023,
-0.0790890828,
0.0432888046,
-0.377517581,
0.1395243555,
0.4056794047,
0.0777033865,
-0.1249043569,
-0.1479363889,
-0.0149694346,
0.1985373944,
-0.1919496655,
0.0200804286,
0.0784436315,
-0.1194250435,
-0.3427839279,
0.2097571641,
-0.0087736696,
-0.1780347377,
-0.2768907249,
0.0820085928,
0.1028023809,
0.4687247276,
0.2687639296,
-0.0055730566,
-0.244813621,
0.1943386644,
-0.1494650841,
-0.0300622955,
-0.2719016969,
0.4269394875,
0.1747719347,
0.3178132474,
-0.1541972309,
0.5814439654,
0.1066851988,
-0.5981357098,
-0.2948665917,
0.3456803262,
0.1319474578,
-0.0286236182,
-0.0179552957,
0.1456978321,
-0.2007221431,
0.1713245809,
0.0537686795,
0.239264071,
0.0408271551,
0.0214638934,
-0.0363969728,
-0.3410163522,
-0.0483818986,
0.3614163101,
-0.3146297634,
0.2986147106,
-0.6084029675,
0.1965303868,
0.3866645694,
0.0311067477,
-0.1689247936,
0.2358302176,
-0.169494614,
0.0617296398,
0.0715380311,
0.3181353211,
0.4760547876,
0.0223622248,
0.1727906018,
0.1367988139,
-0.1937398314,
-0.0902522653,
0.237364307,
0.0887135416,
0.3124322593,
0.2039207518,
0.2570449114,
0.1931035817,
-0.302403599,
0.0330185518,
0.1302036941,
0.1728960425,
-0.4525786936,
0.1747217923,
-0.1807387918,
-0.038846653,
-0.3074898422,
0.0117458552,
0.0377213284,
-0.1348004341,
0.315459758,
0.3967654407,
-0.4561236501,
0.153922677,
-0.3289418519,
0.1290332079,
0.0227685496,
-0.2959319949,
0.1803024411,
-0.169178918,
-0.2714837193,
0.0344428271,
0.3643866181,
-0.2442777306,
0.4180339873,
-0.0013579726,
-0.0747495443,
-0.1528535187,
-0.2631630898,
0.0897796899,
-0.0949535072,
0.1932280362,
0.2937165499,
0.336810261,
-0.1232666075,
-0.1301763952,
0.1462335438,
-0.4851278961,
-0.1786133349,
0.1372667998,
-0.1227180064,
0.2090111077,
0.020397976,
-0.1520888507,
0.0741769299,
-0.3432302177,
0.0670824349,
-0.1913795918,
0.127728194,
0.6203323007,
0.1520406604,
-0.0800019652,
0.3789709806,
0.1076797247,
-0.1736002862,
-0.1127344221,
0.2009139955,
-0.2037229538,
-0.4296332598,
0.2909049988,
0.0338889658,
0.1325789392,
0.2955588698,
-0.6434158087,
-0.1689424068,
-0.0437353179,
0.1776636541,
-0.1088864952,
-0.0470070429,
0.1665740311,
0.1164369732,
-0.1197147295,
-0.343247354,
0.0827861726,
0.3821261227,
-0.2270807028,
-0.0485797636,
0.0422705263,
0.088244848,
0.3135707974,
0.6243582964,
0.0508326069,
-0.3429433703,
0.0208035335,
-0.2982518077,
0.5073612928,
-0.1590901464,
-0.2795747817,
0.0158005692,
0.0420312509,
-0.1327363998,
0.2462736368,
-0.0795773864,
-0.2103794068,
0.057861954,
0.2167323232,
-0.037591856,
-0.5290263891,
0.1369027048,
-0.396507293,
0.1983656734,
0.1509985626,
-0.0425542146,
-0.158177644,
-0.4451107681,
0.22895962,
0.2040209621,
0.0930263549,
-0.1366163641,
-0.1987894177,
-0.2823880315,
-0.3425536752,
0.0680474415,
0.1306472421,
0.5035334826,
0.0921354145,
-0.2987199426,
0.1360502839,
0.2798966765,
0.7769180536,
-0.0301158335,
-0.0992755517,
0.2773327231,
0.3224095702,
-0.4041953385,
0.055564329,
-0.1050164402,
-0.0046283938,
0.0281626992,
0.241694659,
0.0772358179,
-0.3887940645,
0.2129504085,
0.1766911596,
-0.2477181554,
0.2110396773,
-0.3918556571,
-0.3986026049,
0.1013681665,
0.0878464878,
0.2604940236,
0.049755998,
-0.1087201685,
-0.1115121245,
-0.3012362123,
-0.2482331842,
0.0881450474,
-0.0156273134,
0.3283711672,
0.3708718121,
0.3975337148,
0.0533414707,
0.5702841878,
0.3938702047,
0.4075017869,
-0.5431132317,
0.0214277413,
0.0755056217,
0.191133678,
0.125191614,
0.4420393705,
-0.1866853237,
0.0531416759,
-0.4151875675,
0.0002782717,
-0.3923722208,
0.5302585363,
0.1395114064,
-0.2031340897,
-0.0013098195,
-0.0922305435,
0.1333689094,
-0.0103616379,
-0.148902446,
0.6897455454,
0.2165825516,
-0.1877484918,
0.2651526034,
0.1582136303,
1.1080409288,
-0.0935678184,
0.233469069,
0.5235840678,
-0.2643699646,
0.2126545012,
-0.0553807914,
0.1353134811,
-0.0632257164,
-0.5360182524,
0.0201392844,
-0.0125074312,
-0.360824585,
-0.2005609572,
0.189327687,
0.0023708828,
0.157206744,
0.4106847048,
0.2291461229,
0.0776232332,
0.2959439754,
-0.2186194956,
0.0396569632,
0.0224719755,
0.4466588795,
-0.1266207099,
-0.202606976,
-0.1223223954,
0.165946871,
0.0271230191,
-0.0344650745,
-0.0096407533,
-0.722563982,
0.2756165862,
0.0422484726,
-0.0904387459,
-0.0240594968,
0.4012314975,
0.3712235391,
-0.0988770872,
-0.1523476243,
0.2883421481,
0.3773629367,
0.2930125594,
0.0938070416,
-0.016785726,
0.4750954211,
0.0383026823,
-0.0803635046,
0.1676329523,
-0.054471869,
-0.0525227711,
-0.0370947272,
-0.1225821376,
0.0382938683,
-0.1205562055,
0.0445846617,
-0.0995849222,
-0.2459054291,
-0.0579577684,
0.1035772711,
-0.1804872751,
-0.1070264429,
0.2344727218,
-0.1927343011,
-0.4316692352,
0.2392566651,
0.39225474,
-0.1205128282,
0.1710347384,
0.3036811948,
-0.076104477,
-0.0731282011,
-0.2562384605,
0.3445344269,
0.0378303453,
-0.567092061,
0.2645977437,
-0.1810760796,
0.3202284276,
-0.1079887152,
0.514718473,
-0.1970302314,
0.0209410582,
0.0221597999,
-0.1397223324,
-0.3977710605,
0.2361744344,
0.0018206821,
0.4124106467,
-0.2537191212,
0.4747988582,
-0.1287530363,
-0.2527931333,
-0.2997977734,
0.2343673408,
-0.0281139389,
0.0787902698,
-0.1058860421,
0.0576506034,
0.3181126714,
-0.2779518962,
0.0576958805,
0.1073204875,
-0.1381113976,
-0.1384907663,
-0.1637139916,
0.1632773727,
0.0280179828,
-0.3234010637,
-0.0129801482,
-0.1738721132,
0.076291576,
-0.111380294,
0.3281942904,
0.0700532719,
-0.3296965063,
0.0270977207,
-0.2136469036,
0.1309411079,
0.1392471641,
0.0077433065,
-0.0305916928,
0.3758685887,
0.0896959454,
0.0981486291,
-0.2366092205,
-0.2325259447,
-0.0303852763,
0.2842663527,
-0.035637565,
-0.3600644767,
0.037712615,
-0.0558479689,
-0.2938880026,
-0.0599050336,
0.3766299784,
0.1799757928,
-0.4634622931,
-0.1362241805,
0.2592976391,
0.2242169678,
-0.2404212356,
0.1624508053,
-0.1217676103,
0.0198639929,
0.0385115743,
0.166296646,
0.1840274036,
-0.1465543211,
-0.1428776532,
0.1772314459,
-0.2008032799,
-0.20362477,
0.0310161822,
0.5156288743,
-0.0325355902,
0.2373233587,
-0.1476537883,
0.1036646366,
0.1264172494,
0.2481572479,
-0.0781783611,
0.4826430082,
0.1981097162,
-0.0654389858,
-0.0354683064,
-0.31345281,
-0.0555219986,
0.1641894579,
-0.1238171011,
0.2421869636,
-0.0361494273,
0.2217095494,
0.1549313366,
-0.4245825112,
-0.0117487237,
0.2324925065,
-0.0859793872,
-0.3671879172,
-0.3900305629,
-0.20805493,
-0.272334218,
0.0311244279,
-0.0055277343,
-0.0865741596,
0.009404134,
0.1060138717,
-0.0662820041,
-0.2825776935,
-0.1198214591,
0.3330773115,
0.2778065205,
-0.2325667739,
0.0656124502,
-0.0248094872,
-0.0656781197,
-0.0021086484,
0.2082014084,
0.0835288167,
0.0284214877,
-0.1759397984,
0.0114994124,
-0.0346539989,
0.0922639072,
-0.0400927253,
0.2144378722,
-0.0489173345,
-0.1405197978,
0.2157977819,
-0.0491835326,
-0.0700247735,
0.1828449368,
0.0519723222,
0.0976672024,
-0.4182253778,
0.1498895139,
-0.0033791186,
-0.1016805917,
-0.2287627608,
-0.0051180832,
0.050867185,
-0.1086790487,
0.4808009267,
-0.4602067769,
0.364477694,
-0.0873914808,
0.0682187378,
-0.0095314439,
0.2219791114,
0.1271089762,
0.3292398751,
-0.2891254425,
-0.3842817545,
-0.5309659243,
0.2625988722,
-0.0495070256,
-0.0506450534,
0.2118177116,
0.031771712,
-0.0888987482,
-0.0664602742,
0.0274048857,
-0.1865465641,
0.1133229285,
0.2672547698,
-0.265827477,
-0.0360958874,
-0.4830034375,
0.098432675,
0.0199030191,
-0.5478619337,
-0.1800813079,
-0.1762709618,
0.0375099257,
-0.0818458945,
-0.021551773,
-0.0166111402,
0.5460250974,
0.5247311592,
0.1254573017,
0.0754964799,
0.1195666045,
-0.102561377,
-0.2674233317,
-0.1794993132,
-0.3766337633,
-0.1837469935,
0.0070535615,
-0.0237968713,
-0.052944012,
0.197137326,
0.0137046389,
-0.2977708578,
0.1801952422,
0.3653976023,
-0.4400824606,
0.1956056058,
-0.2059034109,
0.3725327849,
0.2628457248,
0.4234926701,
-0.1296610981,
0.2166780233,
-0.3998851776,
-0.3820689321,
0.4928815067,
-0.5328620672,
-0.0930068493,
-0.0245975591,
0.3842856884,
-0.0938029438,
0.0362868905,
-0.5819959641,
-0.1765553802,
0.3898157775,
-0.083492808,
-0.5030674338,
0.1706115752,
0.130146414,
0.1384346038,
0.1181670725,
0.5913181305,
0.140175879,
-0.1933636367,
0.0364977866,
-0.286213547
] |
https://github.com/huggingface/datasets/issues/2924 | "File name too long" error for file locks | Hi, the filename here is less than 255
```python
>>> len("_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock")
154
```
so not sure why it's considered too long for your filesystem.
(also note that the lock files we use always have smaller filenames than 255)
https://github.com/huggingface/datasets/blob/5d1a9f1e3c6c495dc0610b459e39d2eb8893f152/src/datasets/utils/filelock.py#L135-L135 | ## Describe the bug
Getting the following error when calling `load_dataset("gar1t/test")`:
```
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```
## Steps to reproduce the bug
Where the user cache dir (e.g. `~/.cache`) is on a file system that limits filenames to 255 chars (e.g. ext4):
```python
from datasets import load_dataset
load_dataset("gar1t/test")
```
## Expected results
Expect the function to return without an error.
## Actual results
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<python_venv>/lib/python3.9/site-packages/datasets/load.py", line 1112, in load_dataset
builder_instance.download_and_prepare(
File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 644, in download_and_prepare
self._save_info()
File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 765, in _save_info
with FileLock(lock_path):
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 323, in __enter__
self.acquire()
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 272, in acquire
self._acquire()
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 403, in _acquire
fd = os.open(self._lock_file, open_mode)
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-27-generic-x86_64-with-glibc2.31
- Python version: 3.9.7
- PyArrow version: 5.0.0
| 39 | "File name too long" error for file locks
## Describe the bug
Getting the following error when calling `load_dataset("gar1t/test")`:
```
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```
## Steps to reproduce the bug
Where the user cache dir (e.g. `~/.cache`) is on a file system that limits filenames to 255 chars (e.g. ext4):
```python
from datasets import load_dataset
load_dataset("gar1t/test")
```
## Expected results
Expect the function to return without an error.
## Actual results
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<python_venv>/lib/python3.9/site-packages/datasets/load.py", line 1112, in load_dataset
builder_instance.download_and_prepare(
File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 644, in download_and_prepare
self._save_info()
File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 765, in _save_info
with FileLock(lock_path):
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 323, in __enter__
self.acquire()
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 272, in acquire
self._acquire()
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 403, in _acquire
fd = os.open(self._lock_file, open_mode)
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-27-generic-x86_64-with-glibc2.31
- Python version: 3.9.7
- PyArrow version: 5.0.0
Hi, the filename here is less than 255
```python
>>> len("_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock")
154
```
so not sure why it's considered too long for your filesystem.
(also note that the lock files we use always have smaller filenames than 255)
https://github.com/huggingface/datasets/blob/5d1a9f1e3c6c495dc0610b459e39d2eb8893f152/src/datasets/utils/filelock.py#L135-L135 | [
0.0493387729,
0.0920009762,
-0.0714941099,
0.401848197,
0.4151671231,
0.2358948588,
0.6366623044,
0.2435027659,
0.2364588678,
0.2313295007,
0.0185687691,
0.0077437051,
-0.1442687213,
-0.3100363016,
-0.2015361935,
-0.244314611,
-0.158109054,
-0.0416219905,
-0.1770785898,
0.2177186608,
-0.1549791098,
0.3787366152,
0.0246381462,
0.1570836753,
-0.5360065699,
0.0900787339,
-0.129596293,
0.388674587,
-0.0215062648,
-0.3729910254,
0.0511184931,
-0.046716623,
0.0688150823,
0.8113575578,
-0.0001220686,
-0.3334413171,
0.3542335927,
-0.056298919,
-0.3271901011,
-0.2243083715,
-0.1685818732,
-0.5117117763,
-0.0345850736,
-0.4988022745,
0.1872132421,
-0.0951191336,
-0.0331906974,
-0.8021569848,
0.0410522968,
0.3733056784,
0.1268748045,
-0.0783472732,
0.0910247043,
-0.2579203546,
0.3323120773,
-0.2779889703,
0.0040847734,
0.3564024568,
0.3556976616,
-0.0988673419,
-0.1546516567,
0.2032181621,
-0.0368967988,
0.0273247212,
0.2471579909,
0.0795376152,
-0.0874830484,
-0.326164484,
0.2958056629,
0.4273938537,
0.471437484,
-0.093061924,
-0.2793130577,
-0.467697531,
0.1424981207,
-0.1251060069,
0.488530755,
-0.0762399882,
-0.2220745683,
0.1514883637,
-0.1704196483,
-0.0196211301,
-0.1235968992,
-0.1102386117,
-0.1019758433,
0.0650620982,
0.0405087098,
0.0362790152,
0.3111135066,
-0.3483148813,
0.2395954728,
0.0048368443,
0.0742737055,
0.2694600523,
-0.6542135477,
0.1469124109,
0.084268108,
0.3854928613,
0.2534899712,
0.0576435216,
-0.2659730911,
-0.1483080387,
0.1947483271,
-0.0104661286,
-0.064955011,
0.3742070794,
0.1944443434,
0.1612815559,
0.3012427092,
0.0779470801,
-0.3367466033,
-0.1069349945,
-0.0764873996,
-0.5534628034,
0.4451378584,
0.1335907578,
0.0741625279,
-0.3437120616,
0.1504582018,
0.5705772638,
0.1057045311,
-0.0104901902,
0.2287025154,
0.2733798623,
0.0054354407,
0.1107668504,
0.0830742121,
-0.0899365395,
-0.0889611915,
0.1008350775,
-0.1473124921,
-0.1107303798,
-0.2270202786,
0.1124097332,
0.0892054141,
-0.3083955646,
0.2792794108,
-0.2274651378,
0.3152399063,
-0.1249575615,
-0.0829686001,
-0.2377423942,
-0.0667323321,
0.1559672207,
-0.0591067746,
0.0739143044,
0.2452138513,
-0.2607334256,
-0.1920616627,
-0.0771117061,
-0.3397485018,
-0.285187602,
-0.0617213845,
0.0947030634,
-0.1654944718,
0.2159019858,
0.241554901,
-0.2671949267,
0.6555526257,
-0.0798194259,
0.0127977468,
-0.2747654617,
-0.1418098509,
0.0071926489,
0.0408247709,
0.5534656644,
0.1325239539,
-0.0175628886,
-0.0687893331,
0.1282822043,
0.0086660907,
0.3722594082,
0.1806451082,
-0.0535968207,
-0.4219526052,
0.3124940395,
0.2268716991,
-0.240280807,
-0.4869856834,
0.3215384781,
-0.3943073452,
0.0994933248,
0.3229114413,
0.0228829682,
0.0517103672,
-0.0245827306,
0.2853382826,
0.1822130829,
-0.0260958299,
0.0234952867,
-0.2025244832,
-0.1073305756,
-0.0406304337,
0.1691957116,
0.0109545132,
0.0670008212,
0.0796194971,
-0.1751917005,
0.2715683877,
0.0314634889,
-0.2040444613,
0.3736800551,
0.1382421255,
0.3267183602,
0.1860824227,
-0.1063276678,
-0.593750596,
0.2637210786,
-0.1218476444,
-0.1787317842,
-0.2175931036,
-0.1868049204,
-0.174988687,
-0.0072901174,
0.0034601605,
0.1351370215,
-0.0204084329,
0.283249557,
0.1417795569,
-0.1317637563,
0.0934400707,
0.5883799195,
-0.1702440977,
0.0175973661,
-0.4781186283,
-0.1711263955,
-0.1178537458,
-0.1125400066,
0.0315069407,
0.001639422,
0.3693964183,
-0.1089681834,
-0.3443508148,
0.4480754435,
0.3332765102,
0.0975326225,
-0.1789246202,
-0.0044302642,
-0.0568642244,
0.2207756937,
0.0726701021,
0.0398116149,
0.0077854358,
0.0142917857,
-0.2135763168,
0.3000160754,
-0.1408158243,
0.27127707,
0.0286139771,
0.1682408005,
0.2461793423,
-0.1318138242,
0.0643452853,
-0.1761223972,
0.6458846331,
-0.2163525224,
0.3048402369,
0.0547802746,
0.0452313498,
-0.1448626965,
0.645819366,
0.045392707,
-0.0001777746,
0.1977424622,
0.1562013775,
-0.0408152863,
-0.0193725601,
0.3064888716,
0.51114434,
0.192058593,
-0.0301227085,
-0.206505999,
0.3941577375,
-0.2238345295,
0.256318748,
0.015908191,
-0.0027930178,
0.3657029271,
0.0496182665,
-0.1290876865,
0.0514838323,
-0.8095088005,
-0.050442148,
0.223697558,
-0.3198086619,
0.1480822563,
-0.1393255591,
-0.0432044677,
-0.0237995163,
0.0004905537,
-0.0803986639,
-0.4162821174,
-0.1888938546,
0.2785061002,
-0.1418367475,
0.2145340145,
-0.1188359708,
-0.0032407343,
0.2712829709,
-0.0145384036,
-0.2950280905,
-0.0016125664,
0.0803441554,
-0.0837600976,
0.2720729709,
-0.5375036597,
0.0838036239,
-0.1256634593,
-0.063107416,
-0.5083526373,
-0.249880299,
0.1116677821,
-0.1684809625,
0.2935638726,
0.3413660824,
0.2078575045,
0.1666621864,
0.0588971674,
0.0049614832,
-0.2622788548,
0.0236697048,
0.2326638997,
0.177900672,
-0.0228181574,
-0.1917994916,
-0.0234549604,
-0.3463731706,
-0.4160332084,
0.3207849264,
0.0303033888,
0.2279278636,
0.3411895037,
-0.0708732456,
0.2978124321,
-0.0179731809,
0.2472921908,
-0.0879070163,
-0.4463702142,
0.4170608819,
-0.1525217444,
-0.2990591526,
-0.4318083823,
0.2980132997,
-0.0355094969,
0.1055191457,
-0.4223636985,
-0.1790713966,
-0.4012610912,
0.3389858603,
-0.335719645,
0.0054094102,
0.1970202625,
-0.0852011293,
-0.056348715,
-0.1069381684,
0.0849028602,
0.2325124592,
0.0110358074,
-0.0095209405,
0.0929810554,
0.2951666117,
-0.1160778031,
0.4532133639,
0.3616655767,
0.0753480345,
0.1953795552,
-0.1376696378,
0.1843571216,
-0.2590323091,
-0.1269459277,
0.0239379853,
0.1744715571,
-0.2215842754,
0.1342059076,
-0.0853910595,
0.0140822716,
-0.1333197653,
-0.057792075,
0.1078079566,
-0.2960295081,
0.0073164683,
0.0485864654,
0.0524901152,
0.031080313,
0.1456944644,
-0.1948867738,
-0.130910188,
-0.0240891837,
0.3084782958,
0.0540785715,
-0.0233559478,
-0.2468733191,
0.0915109962,
-0.3371422589,
0.4440094829,
0.1830918342,
0.2137980461,
-0.0693597645,
-0.1601749957,
-0.0800487325,
0.0460067019,
0.6831175089,
0.0991291851,
0.3160925806,
0.1554957032,
0.2547035515,
-0.1230870932,
0.0391723216,
0.0795528516,
0.37018767,
0.1390411407,
0.4079337418,
-0.230809778,
0.0376087353,
-0.1833171695,
0.1855424047,
-0.1166331917,
-0.4492169321,
-0.026285693,
0.0087962672,
-0.2636859715,
0.1616199017,
0.0336055979,
0.2442287058,
0.061672166,
0.0049132183,
-0.0601772517,
-0.0747793615,
0.1601552814,
0.1748355031,
0.281263113,
-0.4468776882,
0.2643654644,
-0.027559286,
-0.1595292985,
0.2304125279,
0.5639727712,
-0.4439827502,
-0.2478428483,
0.4144732952,
-0.3565593958,
0.0764389038,
0.428709507,
-0.3107660413,
-0.158424601,
0.3582059741,
0.6321595907,
0.1236555874,
0.0257822722,
0.0325682759,
0.1308743954,
-0.1530222595,
-0.3346109688,
0.2163308859,
0.2430950701,
-0.0178354084,
0.5360286832,
0.0242516566,
-0.3025456071,
0.2613931298,
-0.2059546858,
1.0209487677,
-0.1854491234,
0.1871505678,
-0.0190805662,
0.1287677884,
0.4992989004,
0.0092908144,
-0.0842247382,
-0.4268136919,
-0.482785821,
0.1402027607,
-0.1498040259,
0.2397721112,
-0.0366778672,
-0.1301994473,
0.3139282763,
-0.2595100999,
0.0177617222,
-0.1745312661,
0.4527937174,
-0.6466597915,
-0.2542140484,
-0.2503229976,
0.0479837768,
-0.0439813025,
0.1101505235,
0.0617119335,
0.1686862707,
-0.3292619586,
-0.2781672478,
-0.2272059619,
0.0370317623,
-0.4157633781,
0.0835296139,
-0.2439021319,
-0.2822076678,
-0.0902423263,
0.2852125168,
-0.0320499055,
0.4013367295,
-0.2035952359,
0.0923506916,
0.0828220099,
0.0968723074,
0.0729996115,
-0.0632443875,
0.3176955879,
0.0168972239,
0.0743538588,
-0.2857044935,
0.0053975023,
-0.1422323883,
0.0324823409,
-0.0234268755,
0.150413841,
-0.2308296114,
-0.3237560987,
-0.3392715156,
-0.2038623989,
-0.1504356861,
0.052160468,
0.3335696459,
-0.2387237549,
-0.0088772327,
-0.2857560515,
-0.4090463519,
-0.0096646473,
0.3055092096,
-0.1481093615,
-0.0472045727,
0.4327270687,
0.3000044525,
-0.2102095038,
-0.1779171228,
-0.0190173909,
-0.1799962819,
-0.6621263027,
0.0823080689,
0.0360399596,
-0.042710796,
-0.2416070849,
-0.2668298781,
0.2053604722,
0.1265296191,
0.1113988757,
-0.4697988629,
-0.4082911313,
-0.2329965532,
-0.2976685166,
0.201614961,
-0.0566246845,
-0.3551496863,
-0.2588423789,
0.0327730179,
-0.2122100294,
0.0599939302,
-0.1423734725,
-0.0618366711,
0.4633506536,
-0.1418499053,
0.2244607508,
-0.1397038847,
0.0463556647,
0.401208967,
0.0694131404,
-0.1816515177,
-0.3011113703,
0.1451772451,
0.0411615483,
0.058584623,
-0.0672907233,
-0.3786490262,
-0.0527515113,
-0.2798326015,
0.1326039582,
0.3364622295,
0.242445454,
0.0756184012,
0.0943305045,
0.0986532569,
-0.0325292125,
0.3306850791,
-0.1649504006,
-0.1383993775,
0.0095240064,
0.2725931406,
-0.2107259631,
0.1175263226,
-0.3212474585,
0.153660506,
-0.0095390752,
-0.036181666,
0.0752807558,
-0.0265366957,
-0.1096813157,
0.5564430356,
0.2327182889,
0.2920390964,
-0.2722925842,
-0.2302523553,
0.275631547,
0.1339131296,
0.0165831223,
-0.2051157057,
0.1073662192,
-0.1286122501,
-0.099584952,
0.3734355867,
-0.0706341118,
-0.1355884075,
-0.1899377406,
-0.1248223186,
0.5824733973,
0.0935560167,
-0.0696672946,
0.2455470115,
-0.0136259198,
0.0776756108,
0.4613702893,
0.2502688766,
0.0169344209,
0.5474847555,
-0.3130880594,
0.0298885647,
-0.1627935916,
-0.0062185861,
-0.2004128098,
-0.4473773241,
0.1316618621,
0.310780704,
-0.0724566877,
0.1873664856,
-0.1468191892,
0.3045752645,
-0.2501968741,
0.1819010824,
0.0543670505,
0.0492204018,
-0.1095730364,
-0.0142701454,
0.3495129943,
-0.0250100493,
-0.2757629752,
-0.0046617165,
-0.1150470376,
0.1466552466,
0.379602015,
0.2733507752,
0.1335938126,
-0.1753618866,
0.0041430574,
0.2133580595,
0.1663142294,
-0.4822300076,
0.1435224861,
0.3909597695,
-0.0886782482,
0.262295723,
-0.001731379,
0.5537605882,
0.1397945881,
0.0983081311,
-0.0007226951,
-0.1064625531,
-0.0113883279,
-0.1354414523,
0.4446235597,
-0.0308795534,
-0.1025132835,
0.3387676775,
0.0280347615,
-0.1576936394,
0.1146626472,
0.1928841472,
0.123716116,
-0.1751527786,
0.2012575269,
0.0158895403,
-0.2077659667,
-0.1786324531,
0.1449804604,
-0.3786619902,
-0.1633839309,
0.2516909838,
0.0403836928,
0.2624588907,
-0.1355941147,
0.0489801392,
-0.1194115281,
0.1483440548,
0.3839923143,
0.2433495075,
-0.2853366137,
-0.0405623168,
-0.6024459004,
0.224628225,
-0.048773583,
-0.1710737795,
0.0451598838,
-0.1129756942,
-0.0471115671,
-0.1518051475,
0.3878984153,
-0.015927773,
0.1115339845,
0.2670121789,
-0.4752603173,
-0.2240056992,
0.1703025103,
-0.0663013309,
0.2272349596,
-0.3988767266,
0.1303194612,
-0.2667441368,
-0.0137349628,
-0.1426666677,
-0.1962015331,
0.1286678761,
0.3134683669,
0.3546337783,
0.1124141812,
0.2980175614,
0.0608977824,
-0.2498636246,
-0.3230273128,
0.1182480007,
-0.1321164817,
0.0156514756,
0.2199657261,
0.2973279059,
-0.4038829207,
-0.432920754,
-0.377073437,
0.5200784206,
-0.1345875263,
0.0714469254,
-0.1244054586,
-0.0493410081,
-0.0306261256,
0.273988992,
0.263312161,
0.2337563634,
0.0706376582,
0.4157320857,
-0.190689072,
-0.2998300195,
0.6595064998,
-0.1065888852,
-0.4276303649,
0.0981978923,
0.4086523056,
0.0720972568,
-0.1614484191,
-0.4712713659,
0.1547386199,
0.3244367838,
0.0784330368,
-0.2918293774,
0.2315366119,
-0.2830386758,
0.1289328337,
-0.1040055826,
0.2516618967,
0.26928249,
-0.2087138742,
-0.0591595545,
-0.1967327595
] |
https://github.com/huggingface/datasets/issues/2924 | "File name too long" error for file locks | Yes, you're right! I need to get you more info here. Either there's something going with the name itself that the file system doesn't like (an encoding that blows up the name length??) or perhaps there's something with the path that's causing the entire string to be used as a name. I haven't seen this on any system before and the Internet's not forthcoming with any info. | ## Describe the bug
Getting the following error when calling `load_dataset("gar1t/test")`:
```
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```
## Steps to reproduce the bug
Where the user cache dir (e.g. `~/.cache`) is on a file system that limits filenames to 255 chars (e.g. ext4):
```python
from datasets import load_dataset
load_dataset("gar1t/test")
```
## Expected results
Expect the function to return without an error.
## Actual results
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<python_venv>/lib/python3.9/site-packages/datasets/load.py", line 1112, in load_dataset
builder_instance.download_and_prepare(
File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 644, in download_and_prepare
self._save_info()
File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 765, in _save_info
with FileLock(lock_path):
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 323, in __enter__
self.acquire()
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 272, in acquire
self._acquire()
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 403, in _acquire
fd = os.open(self._lock_file, open_mode)
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-27-generic-x86_64-with-glibc2.31
- Python version: 3.9.7
- PyArrow version: 5.0.0
| 67 | "File name too long" error for file locks
## Describe the bug
Getting the following error when calling `load_dataset("gar1t/test")`:
```
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```
## Steps to reproduce the bug
Where the user cache dir (e.g. `~/.cache`) is on a file system that limits filenames to 255 chars (e.g. ext4):
```python
from datasets import load_dataset
load_dataset("gar1t/test")
```
## Expected results
Expect the function to return without an error.
## Actual results
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<python_venv>/lib/python3.9/site-packages/datasets/load.py", line 1112, in load_dataset
builder_instance.download_and_prepare(
File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 644, in download_and_prepare
self._save_info()
File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 765, in _save_info
with FileLock(lock_path):
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 323, in __enter__
self.acquire()
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 272, in acquire
self._acquire()
File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 403, in _acquire
fd = os.open(self._lock_file, open_mode)
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-27-generic-x86_64-with-glibc2.31
- Python version: 3.9.7
- PyArrow version: 5.0.0
Yes, you're right! I need to get you more info here. Either there's something going with the name itself that the file system doesn't like (an encoding that blows up the name length??) or perhaps there's something with the path that's causing the entire string to be used as a name. I haven't seen this on any system before and the Internet's not forthcoming with any info. | [
0.0493387729,
0.0920009762,
-0.0714941099,
0.401848197,
0.4151671231,
0.2358948588,
0.6366623044,
0.2435027659,
0.2364588678,
0.2313295007,
0.0185687691,
0.0077437051,
-0.1442687213,
-0.3100363016,
-0.2015361935,
-0.244314611,
-0.158109054,
-0.0416219905,
-0.1770785898,
0.2177186608,
-0.1549791098,
0.3787366152,
0.0246381462,
0.1570836753,
-0.5360065699,
0.0900787339,
-0.129596293,
0.388674587,
-0.0215062648,
-0.3729910254,
0.0511184931,
-0.046716623,
0.0688150823,
0.8113575578,
-0.0001220686,
-0.3334413171,
0.3542335927,
-0.056298919,
-0.3271901011,
-0.2243083715,
-0.1685818732,
-0.5117117763,
-0.0345850736,
-0.4988022745,
0.1872132421,
-0.0951191336,
-0.0331906974,
-0.8021569848,
0.0410522968,
0.3733056784,
0.1268748045,
-0.0783472732,
0.0910247043,
-0.2579203546,
0.3323120773,
-0.2779889703,
0.0040847734,
0.3564024568,
0.3556976616,
-0.0988673419,
-0.1546516567,
0.2032181621,
-0.0368967988,
0.0273247212,
0.2471579909,
0.0795376152,
-0.0874830484,
-0.326164484,
0.2958056629,
0.4273938537,
0.471437484,
-0.093061924,
-0.2793130577,
-0.467697531,
0.1424981207,
-0.1251060069,
0.488530755,
-0.0762399882,
-0.2220745683,
0.1514883637,
-0.1704196483,
-0.0196211301,
-0.1235968992,
-0.1102386117,
-0.1019758433,
0.0650620982,
0.0405087098,
0.0362790152,
0.3111135066,
-0.3483148813,
0.2395954728,
0.0048368443,
0.0742737055,
0.2694600523,
-0.6542135477,
0.1469124109,
0.084268108,
0.3854928613,
0.2534899712,
0.0576435216,
-0.2659730911,
-0.1483080387,
0.1947483271,
-0.0104661286,
-0.064955011,
0.3742070794,
0.1944443434,
0.1612815559,
0.3012427092,
0.0779470801,
-0.3367466033,
-0.1069349945,
-0.0764873996,
-0.5534628034,
0.4451378584,
0.1335907578,
0.0741625279,
-0.3437120616,
0.1504582018,
0.5705772638,
0.1057045311,
-0.0104901902,
0.2287025154,
0.2733798623,
0.0054354407,
0.1107668504,
0.0830742121,
-0.0899365395,
-0.0889611915,
0.1008350775,
-0.1473124921,
-0.1107303798,
-0.2270202786,
0.1124097332,
0.0892054141,
-0.3083955646,
0.2792794108,
-0.2274651378,
0.3152399063,
-0.1249575615,
-0.0829686001,
-0.2377423942,
-0.0667323321,
0.1559672207,
-0.0591067746,
0.0739143044,
0.2452138513,
-0.2607334256,
-0.1920616627,
-0.0771117061,
-0.3397485018,
-0.285187602,
-0.0617213845,
0.0947030634,
-0.1654944718,
0.2159019858,
0.241554901,
-0.2671949267,
0.6555526257,
-0.0798194259,
0.0127977468,
-0.2747654617,
-0.1418098509,
0.0071926489,
0.0408247709,
0.5534656644,
0.1325239539,
-0.0175628886,
-0.0687893331,
0.1282822043,
0.0086660907,
0.3722594082,
0.1806451082,
-0.0535968207,
-0.4219526052,
0.3124940395,
0.2268716991,
-0.240280807,
-0.4869856834,
0.3215384781,
-0.3943073452,
0.0994933248,
0.3229114413,
0.0228829682,
0.0517103672,
-0.0245827306,
0.2853382826,
0.1822130829,
-0.0260958299,
0.0234952867,
-0.2025244832,
-0.1073305756,
-0.0406304337,
0.1691957116,
0.0109545132,
0.0670008212,
0.0796194971,
-0.1751917005,
0.2715683877,
0.0314634889,
-0.2040444613,
0.3736800551,
0.1382421255,
0.3267183602,
0.1860824227,
-0.1063276678,
-0.593750596,
0.2637210786,
-0.1218476444,
-0.1787317842,
-0.2175931036,
-0.1868049204,
-0.174988687,
-0.0072901174,
0.0034601605,
0.1351370215,
-0.0204084329,
0.283249557,
0.1417795569,
-0.1317637563,
0.0934400707,
0.5883799195,
-0.1702440977,
0.0175973661,
-0.4781186283,
-0.1711263955,
-0.1178537458,
-0.1125400066,
0.0315069407,
0.001639422,
0.3693964183,
-0.1089681834,
-0.3443508148,
0.4480754435,
0.3332765102,
0.0975326225,
-0.1789246202,
-0.0044302642,
-0.0568642244,
0.2207756937,
0.0726701021,
0.0398116149,
0.0077854358,
0.0142917857,
-0.2135763168,
0.3000160754,
-0.1408158243,
0.27127707,
0.0286139771,
0.1682408005,
0.2461793423,
-0.1318138242,
0.0643452853,
-0.1761223972,
0.6458846331,
-0.2163525224,
0.3048402369,
0.0547802746,
0.0452313498,
-0.1448626965,
0.645819366,
0.045392707,
-0.0001777746,
0.1977424622,
0.1562013775,
-0.0408152863,
-0.0193725601,
0.3064888716,
0.51114434,
0.192058593,
-0.0301227085,
-0.206505999,
0.3941577375,
-0.2238345295,
0.256318748,
0.015908191,
-0.0027930178,
0.3657029271,
0.0496182665,
-0.1290876865,
0.0514838323,
-0.8095088005,
-0.050442148,
0.223697558,
-0.3198086619,
0.1480822563,
-0.1393255591,
-0.0432044677,
-0.0237995163,
0.0004905537,
-0.0803986639,
-0.4162821174,
-0.1888938546,
0.2785061002,
-0.1418367475,
0.2145340145,
-0.1188359708,
-0.0032407343,
0.2712829709,
-0.0145384036,
-0.2950280905,
-0.0016125664,
0.0803441554,
-0.0837600976,
0.2720729709,
-0.5375036597,
0.0838036239,
-0.1256634593,
-0.063107416,
-0.5083526373,
-0.249880299,
0.1116677821,
-0.1684809625,
0.2935638726,
0.3413660824,
0.2078575045,
0.1666621864,
0.0588971674,
0.0049614832,
-0.2622788548,
0.0236697048,
0.2326638997,
0.177900672,
-0.0228181574,
-0.1917994916,
-0.0234549604,
-0.3463731706,
-0.4160332084,
0.3207849264,
0.0303033888,
0.2279278636,
0.3411895037,
-0.0708732456,
0.2978124321,
-0.0179731809,
0.2472921908,
-0.0879070163,
-0.4463702142,
0.4170608819,
-0.1525217444,
-0.2990591526,
-0.4318083823,
0.2980132997,
-0.0355094969,
0.1055191457,
-0.4223636985,
-0.1790713966,
-0.4012610912,
0.3389858603,
-0.335719645,
0.0054094102,
0.1970202625,
-0.0852011293,
-0.056348715,
-0.1069381684,
0.0849028602,
0.2325124592,
0.0110358074,
-0.0095209405,
0.0929810554,
0.2951666117,
-0.1160778031,
0.4532133639,
0.3616655767,
0.0753480345,
0.1953795552,
-0.1376696378,
0.1843571216,
-0.2590323091,
-0.1269459277,
0.0239379853,
0.1744715571,
-0.2215842754,
0.1342059076,
-0.0853910595,
0.0140822716,
-0.1333197653,
-0.057792075,
0.1078079566,
-0.2960295081,
0.0073164683,
0.0485864654,
0.0524901152,
0.031080313,
0.1456944644,
-0.1948867738,
-0.130910188,
-0.0240891837,
0.3084782958,
0.0540785715,
-0.0233559478,
-0.2468733191,
0.0915109962,
-0.3371422589,
0.4440094829,
0.1830918342,
0.2137980461,
-0.0693597645,
-0.1601749957,
-0.0800487325,
0.0460067019,
0.6831175089,
0.0991291851,
0.3160925806,
0.1554957032,
0.2547035515,
-0.1230870932,
0.0391723216,
0.0795528516,
0.37018767,
0.1390411407,
0.4079337418,
-0.230809778,
0.0376087353,
-0.1833171695,
0.1855424047,
-0.1166331917,
-0.4492169321,
-0.026285693,
0.0087962672,
-0.2636859715,
0.1616199017,
0.0336055979,
0.2442287058,
0.061672166,
0.0049132183,
-0.0601772517,
-0.0747793615,
0.1601552814,
0.1748355031,
0.281263113,
-0.4468776882,
0.2643654644,
-0.027559286,
-0.1595292985,
0.2304125279,
0.5639727712,
-0.4439827502,
-0.2478428483,
0.4144732952,
-0.3565593958,
0.0764389038,
0.428709507,
-0.3107660413,
-0.158424601,
0.3582059741,
0.6321595907,
0.1236555874,
0.0257822722,
0.0325682759,
0.1308743954,
-0.1530222595,
-0.3346109688,
0.2163308859,
0.2430950701,
-0.0178354084,
0.5360286832,
0.0242516566,
-0.3025456071,
0.2613931298,
-0.2059546858,
1.0209487677,
-0.1854491234,
0.1871505678,
-0.0190805662,
0.1287677884,
0.4992989004,
0.0092908144,
-0.0842247382,
-0.4268136919,
-0.482785821,
0.1402027607,
-0.1498040259,
0.2397721112,
-0.0366778672,
-0.1301994473,
0.3139282763,
-0.2595100999,
0.0177617222,
-0.1745312661,
0.4527937174,
-0.6466597915,
-0.2542140484,
-0.2503229976,
0.0479837768,
-0.0439813025,
0.1101505235,
0.0617119335,
0.1686862707,
-0.3292619586,
-0.2781672478,
-0.2272059619,
0.0370317623,
-0.4157633781,
0.0835296139,
-0.2439021319,
-0.2822076678,
-0.0902423263,
0.2852125168,
-0.0320499055,
0.4013367295,
-0.2035952359,
0.0923506916,
0.0828220099,
0.0968723074,
0.0729996115,
-0.0632443875,
0.3176955879,
0.0168972239,
0.0743538588,
-0.2857044935,
0.0053975023,
-0.1422323883,
0.0324823409,
-0.0234268755,
0.150413841,
-0.2308296114,
-0.3237560987,
-0.3392715156,
-0.2038623989,
-0.1504356861,
0.052160468,
0.3335696459,
-0.2387237549,
-0.0088772327,
-0.2857560515,
-0.4090463519,
-0.0096646473,
0.3055092096,
-0.1481093615,
-0.0472045727,
0.4327270687,
0.3000044525,
-0.2102095038,
-0.1779171228,
-0.0190173909,
-0.1799962819,
-0.6621263027,
0.0823080689,
0.0360399596,
-0.042710796,
-0.2416070849,
-0.2668298781,
0.2053604722,
0.1265296191,
0.1113988757,
-0.4697988629,
-0.4082911313,
-0.2329965532,
-0.2976685166,
0.201614961,
-0.0566246845,
-0.3551496863,
-0.2588423789,
0.0327730179,
-0.2122100294,
0.0599939302,
-0.1423734725,
-0.0618366711,
0.4633506536,
-0.1418499053,
0.2244607508,
-0.1397038847,
0.0463556647,
0.401208967,
0.0694131404,
-0.1816515177,
-0.3011113703,
0.1451772451,
0.0411615483,
0.058584623,
-0.0672907233,
-0.3786490262,
-0.0527515113,
-0.2798326015,
0.1326039582,
0.3364622295,
0.242445454,
0.0756184012,
0.0943305045,
0.0986532569,
-0.0325292125,
0.3306850791,
-0.1649504006,
-0.1383993775,
0.0095240064,
0.2725931406,
-0.2107259631,
0.1175263226,
-0.3212474585,
0.153660506,
-0.0095390752,
-0.036181666,
0.0752807558,
-0.0265366957,
-0.1096813157,
0.5564430356,
0.2327182889,
0.2920390964,
-0.2722925842,
-0.2302523553,
0.275631547,
0.1339131296,
0.0165831223,
-0.2051157057,
0.1073662192,
-0.1286122501,
-0.099584952,
0.3734355867,
-0.0706341118,
-0.1355884075,
-0.1899377406,
-0.1248223186,
0.5824733973,
0.0935560167,
-0.0696672946,
0.2455470115,
-0.0136259198,
0.0776756108,
0.4613702893,
0.2502688766,
0.0169344209,
0.5474847555,
-0.3130880594,
0.0298885647,
-0.1627935916,
-0.0062185861,
-0.2004128098,
-0.4473773241,
0.1316618621,
0.310780704,
-0.0724566877,
0.1873664856,
-0.1468191892,
0.3045752645,
-0.2501968741,
0.1819010824,
0.0543670505,
0.0492204018,
-0.1095730364,
-0.0142701454,
0.3495129943,
-0.0250100493,
-0.2757629752,
-0.0046617165,
-0.1150470376,
0.1466552466,
0.379602015,
0.2733507752,
0.1335938126,
-0.1753618866,
0.0041430574,
0.2133580595,
0.1663142294,
-0.4822300076,
0.1435224861,
0.3909597695,
-0.0886782482,
0.262295723,
-0.001731379,
0.5537605882,
0.1397945881,
0.0983081311,
-0.0007226951,
-0.1064625531,
-0.0113883279,
-0.1354414523,
0.4446235597,
-0.0308795534,
-0.1025132835,
0.3387676775,
0.0280347615,
-0.1576936394,
0.1146626472,
0.1928841472,
0.123716116,
-0.1751527786,
0.2012575269,
0.0158895403,
-0.2077659667,
-0.1786324531,
0.1449804604,
-0.3786619902,
-0.1633839309,
0.2516909838,
0.0403836928,
0.2624588907,
-0.1355941147,
0.0489801392,
-0.1194115281,
0.1483440548,
0.3839923143,
0.2433495075,
-0.2853366137,
-0.0405623168,
-0.6024459004,
0.224628225,
-0.048773583,
-0.1710737795,
0.0451598838,
-0.1129756942,
-0.0471115671,
-0.1518051475,
0.3878984153,
-0.015927773,
0.1115339845,
0.2670121789,
-0.4752603173,
-0.2240056992,
0.1703025103,
-0.0663013309,
0.2272349596,
-0.3988767266,
0.1303194612,
-0.2667441368,
-0.0137349628,
-0.1426666677,
-0.1962015331,
0.1286678761,
0.3134683669,
0.3546337783,
0.1124141812,
0.2980175614,
0.0608977824,
-0.2498636246,
-0.3230273128,
0.1182480007,
-0.1321164817,
0.0156514756,
0.2199657261,
0.2973279059,
-0.4038829207,
-0.432920754,
-0.377073437,
0.5200784206,
-0.1345875263,
0.0714469254,
-0.1244054586,
-0.0493410081,
-0.0306261256,
0.273988992,
0.263312161,
0.2337563634,
0.0706376582,
0.4157320857,
-0.190689072,
-0.2998300195,
0.6595064998,
-0.1065888852,
-0.4276303649,
0.0981978923,
0.4086523056,
0.0720972568,
-0.1614484191,
-0.4712713659,
0.1547386199,
0.3244367838,
0.0784330368,
-0.2918293774,
0.2315366119,
-0.2830386758,
0.1289328337,
-0.1040055826,
0.2516618967,
0.26928249,
-0.2087138742,
-0.0591595545,
-0.1967327595
] |
https://github.com/huggingface/datasets/issues/2918 | `Can not decode content-encoding: gzip` when loading `scitldr` dataset with streaming | Hi @SBrandeis, thanks for reporting! ^^
I think this is an issue with `fsspec`: https://github.com/intake/filesystem_spec/issues/389
I will ask them if they are planning to fix it... | ## Describe the bug
Trying to load the `"FullText"` config of the `"scitldr"` dataset with `streaming=True` raises an error from `aiohttp`:
```python
ClientPayloadError: 400, message='Can not decode content-encoding: gzip'
```
cc @lhoestq
## Steps to reproduce the bug
```python
from datasets import load_dataset
iter_dset = iter(
load_dataset("scitldr", name="FullText", split="test", streaming=True)
)
next(iter_dset)
```
## Expected results
Returns the first sample of the dataset
## Actual results
Calling `__next__` crashes with the following Traceback:
```python
----> 1 next(dset_iter)
~\miniconda3\envs\datasets\lib\site-packages\datasets\iterable_dataset.py in __iter__(self)
339
340 def __iter__(self):
--> 341 for key, example in self._iter():
342 if self.features:
343 # we encode the example for ClassLabel feature types for example
~\miniconda3\envs\datasets\lib\site-packages\datasets\iterable_dataset.py in _iter(self)
336 else:
337 ex_iterable = self._ex_iterable
--> 338 yield from ex_iterable
339
340 def __iter__(self):
~\miniconda3\envs\datasets\lib\site-packages\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
~\.cache\huggingface\modules\datasets_modules\datasets\scitldr\72d6e2195786c57e1d343066fb2cc4f93ea39c5e381e53e6ae7c44bbfd1f05ef\scitldr.py in _generate_examples(self, filepath, split)
162
163 with open(filepath, encoding="utf-8") as f:
--> 164 for id_, row in enumerate(f):
165 data = json.loads(row)
166 if self.config.name == "AIC":
~\miniconda3\envs\datasets\lib\site-packages\fsspec\implementations\http.py in read(self, length)
496 else:
497 length = min(self.size - self.loc, length)
--> 498 return super().read(length)
499
500 async def async_fetch_all(self):
~\miniconda3\envs\datasets\lib\site-packages\fsspec\spec.py in read(self, length)
1481 # don't even bother calling fetch
1482 return b""
-> 1483 out = self.cache._fetch(self.loc, self.loc + length)
1484 self.loc += len(out)
1485 return out
~\miniconda3\envs\datasets\lib\site-packages\fsspec\caching.py in _fetch(self, start, end)
378 elif start < self.start:
379 if self.end - end > self.blocksize:
--> 380 self.cache = self.fetcher(start, bend)
381 self.start = start
382 else:
~\miniconda3\envs\datasets\lib\site-packages\fsspec\asyn.py in wrapper(*args, **kwargs)
86 def wrapper(*args, **kwargs):
87 self = obj or args[0]
---> 88 return sync(self.loop, func, *args, **kwargs)
89
90 return wrapper
~\miniconda3\envs\datasets\lib\site-packages\fsspec\asyn.py in sync(loop, func, timeout, *args, **kwargs)
67 raise FSTimeoutError
68 if isinstance(result[0], BaseException):
---> 69 raise result[0]
70 return result[0]
71
~\miniconda3\envs\datasets\lib\site-packages\fsspec\asyn.py in _runner(event, coro, result, timeout)
23 coro = asyncio.wait_for(coro, timeout=timeout)
24 try:
---> 25 result[0] = await coro
26 except Exception as ex:
27 result[0] = ex
~\miniconda3\envs\datasets\lib\site-packages\fsspec\implementations\http.py in async_fetch_range(self, start, end)
538 if r.status == 206:
539 # partial content, as expected
--> 540 out = await r.read()
541 elif "Content-Length" in r.headers:
542 cl = int(r.headers["Content-Length"])
~\miniconda3\envs\datasets\lib\site-packages\aiohttp\client_reqrep.py in read(self)
1030 if self._body is None:
1031 try:
-> 1032 self._body = await self.content.read()
1033 for trace in self._traces:
1034 await trace.send_response_chunk_received(
~\miniconda3\envs\datasets\lib\site-packages\aiohttp\streams.py in read(self, n)
342 async def read(self, n: int = -1) -> bytes:
343 if self._exception is not None:
--> 344 raise self._exception
345
346 # migration problem; with DataQueue you have to catch
ClientPayloadError: 400, message='Can not decode content-encoding: gzip'
```
## Environment info
- `datasets` version: 1.12.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.5
- PyArrow version: 2.0.0
- aiohttp version: 3.7.4.post0
| 26 | `Can not decode content-encoding: gzip` when loading `scitldr` dataset with streaming
## Describe the bug
Trying to load the `"FullText"` config of the `"scitldr"` dataset with `streaming=True` raises an error from `aiohttp`:
```python
ClientPayloadError: 400, message='Can not decode content-encoding: gzip'
```
cc @lhoestq
## Steps to reproduce the bug
```python
from datasets import load_dataset
iter_dset = iter(
load_dataset("scitldr", name="FullText", split="test", streaming=True)
)
next(iter_dset)
```
## Expected results
Returns the first sample of the dataset
## Actual results
Calling `__next__` crashes with the following Traceback:
```python
----> 1 next(dset_iter)
~\miniconda3\envs\datasets\lib\site-packages\datasets\iterable_dataset.py in __iter__(self)
339
340 def __iter__(self):
--> 341 for key, example in self._iter():
342 if self.features:
343 # we encode the example for ClassLabel feature types for example
~\miniconda3\envs\datasets\lib\site-packages\datasets\iterable_dataset.py in _iter(self)
336 else:
337 ex_iterable = self._ex_iterable
--> 338 yield from ex_iterable
339
340 def __iter__(self):
~\miniconda3\envs\datasets\lib\site-packages\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
~\.cache\huggingface\modules\datasets_modules\datasets\scitldr\72d6e2195786c57e1d343066fb2cc4f93ea39c5e381e53e6ae7c44bbfd1f05ef\scitldr.py in _generate_examples(self, filepath, split)
162
163 with open(filepath, encoding="utf-8") as f:
--> 164 for id_, row in enumerate(f):
165 data = json.loads(row)
166 if self.config.name == "AIC":
~\miniconda3\envs\datasets\lib\site-packages\fsspec\implementations\http.py in read(self, length)
496 else:
497 length = min(self.size - self.loc, length)
--> 498 return super().read(length)
499
500 async def async_fetch_all(self):
~\miniconda3\envs\datasets\lib\site-packages\fsspec\spec.py in read(self, length)
1481 # don't even bother calling fetch
1482 return b""
-> 1483 out = self.cache._fetch(self.loc, self.loc + length)
1484 self.loc += len(out)
1485 return out
~\miniconda3\envs\datasets\lib\site-packages\fsspec\caching.py in _fetch(self, start, end)
378 elif start < self.start:
379 if self.end - end > self.blocksize:
--> 380 self.cache = self.fetcher(start, bend)
381 self.start = start
382 else:
~\miniconda3\envs\datasets\lib\site-packages\fsspec\asyn.py in wrapper(*args, **kwargs)
86 def wrapper(*args, **kwargs):
87 self = obj or args[0]
---> 88 return sync(self.loop, func, *args, **kwargs)
89
90 return wrapper
~\miniconda3\envs\datasets\lib\site-packages\fsspec\asyn.py in sync(loop, func, timeout, *args, **kwargs)
67 raise FSTimeoutError
68 if isinstance(result[0], BaseException):
---> 69 raise result[0]
70 return result[0]
71
~\miniconda3\envs\datasets\lib\site-packages\fsspec\asyn.py in _runner(event, coro, result, timeout)
23 coro = asyncio.wait_for(coro, timeout=timeout)
24 try:
---> 25 result[0] = await coro
26 except Exception as ex:
27 result[0] = ex
~\miniconda3\envs\datasets\lib\site-packages\fsspec\implementations\http.py in async_fetch_range(self, start, end)
538 if r.status == 206:
539 # partial content, as expected
--> 540 out = await r.read()
541 elif "Content-Length" in r.headers:
542 cl = int(r.headers["Content-Length"])
~\miniconda3\envs\datasets\lib\site-packages\aiohttp\client_reqrep.py in read(self)
1030 if self._body is None:
1031 try:
-> 1032 self._body = await self.content.read()
1033 for trace in self._traces:
1034 await trace.send_response_chunk_received(
~\miniconda3\envs\datasets\lib\site-packages\aiohttp\streams.py in read(self, n)
342 async def read(self, n: int = -1) -> bytes:
343 if self._exception is not None:
--> 344 raise self._exception
345
346 # migration problem; with DataQueue you have to catch
ClientPayloadError: 400, message='Can not decode content-encoding: gzip'
```
## Environment info
- `datasets` version: 1.12.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.5
- PyArrow version: 2.0.0
- aiohttp version: 3.7.4.post0
Hi @SBrandeis, thanks for reporting! ^^
I think this is an issue with `fsspec`: https://github.com/intake/filesystem_spec/issues/389
I will ask them if they are planning to fix it... | [
-0.3864648342,
-0.2204954028,
0.0894812346,
0.4387411475,
0.2157088816,
0.1229232103,
-0.0369099304,
0.3093880415,
0.2422772944,
0.0955025926,
-0.2264312804,
0.4261532128,
-0.0641759783,
0.3035329282,
-0.0094657149,
-0.2584783137,
-0.0045060329,
0.2337660491,
-0.1049253345,
0.1268759519,
-0.0005552247,
0.1941257715,
-0.2469927967,
-0.0304233357,
0.0522288159,
-0.1081044674,
0.0124068782,
0.2805254459,
-0.0595832467,
-0.4462356567,
0.1259049773,
-0.0615480281,
0.412114352,
0.3375739455,
-0.0001145032,
0.273448348,
0.4721425474,
-0.1227843612,
-0.4853444099,
-0.2121145725,
-0.2186653912,
0.0961271897,
0.0428348333,
-0.1566339433,
-0.0091344267,
0.0711133182,
-0.0400048569,
-0.7192989588,
0.3178498149,
0.3456362188,
0.177849859,
0.0426002666,
-0.0489488281,
0.026822377,
0.068838805,
-0.2986649871,
-0.0920066088,
0.1218171716,
0.2367272973,
0.2287400663,
-0.3595731258,
0.3845902681,
-0.0658879802,
0.060183946,
0.0944150537,
0.0967236087,
-0.1749502718,
-0.4655050933,
-0.0073940558,
0.1884143203,
0.6776788235,
-0.2555165887,
-0.4161982536,
-0.2319882214,
-0.0021709763,
-0.6144573689,
0.1465313435,
0.1489271969,
-0.4673650861,
0.1280595064,
0.245963186,
-0.0087530576,
-0.3279941678,
-0.0458732359,
-0.2467990518,
0.388222456,
-0.0767855197,
-0.0237270556,
0.0272941515,
-0.0866288543,
0.4627742171,
-0.2110349238,
-0.284593761,
-0.06397935,
-0.4397553802,
-0.0420654863,
-0.0765122473,
-0.0941094235,
0.1681464314,
0.2153903097,
0.2953205109,
0.0882523358,
0.1543644965,
0.092644155,
0.3555267751,
0.360866785,
0.0598315187,
0.1853773296,
0.1311808228,
0.0994314179,
0.1366243809,
-0.1818916947,
-0.1464888602,
-0.0372806117,
0.0281630084,
-0.0131143257,
0.2628583312,
-0.1912379116,
-0.4138479531,
0.0297919512,
-0.305721581,
-0.0794671923,
0.0055906363,
0.2817170322,
0.095834136,
0.418780148,
0.0194581151,
0.1178673655,
-0.2396833897,
-0.4573937953,
-0.0878112018,
-0.1247183457,
-0.0010086223,
0.1233464703,
0.0153353065,
-0.1886833608,
0.151573807,
-0.0465375893,
0.1621008515,
-0.0012184083,
-0.0208561607,
-0.1100593656,
0.0216294136,
0.2049841136,
0.2180561125,
0.164035216,
0.179515332,
-0.1997853965,
-0.1306825131,
0.0886228085,
-0.1416330785,
-0.1671276838,
-0.1788373142,
0.2166469991,
-0.009402249,
-0.3506268561,
-0.0937892646,
0.2814686596,
0.1409592628,
-0.2037899792,
-0.1410703659,
-0.0391464457,
-0.1241322234,
-0.0865158141,
0.1792778969,
0.5796176791,
-0.1855917424,
-0.1380211264,
-0.1521385312,
0.0008937344,
0.5833054185,
0.3344026804,
-0.0607915819,
0.0897967964,
-0.1707224548,
0.1476538479,
0.5017136335,
-0.1436582506,
-0.5796043873,
0.5436658263,
-0.0396082923,
0.5637280941,
0.2707029283,
0.0225365721,
0.1742345691,
0.0431194082,
0.3135291934,
0.3299021721,
-0.1484594196,
0.0074818879,
-0.3334666491,
-0.0399839543,
0.4416947365,
0.1912288219,
0.0674292073,
0.2502860725,
-0.02887417,
-0.0626680106,
0.3689775467,
-0.0752569586,
0.0763452575,
0.0410077199,
0.1468884051,
0.0120372931,
0.1379382908,
-0.2090768516,
-0.310682863,
0.297231108,
0.0749307871,
0.0127099585,
-0.3174343705,
0.2031728178,
-0.1906454861,
0.0017470643,
-0.2628930211,
-0.2590404749,
0.1243169904,
0.3170803189,
0.0756207407,
0.0505897701,
-0.3084765673,
0.7747215033,
-0.0782549381,
-0.0131347179,
-0.4549140334,
0.2024927884,
-0.0707771033,
-0.201457262,
0.0164403692,
-0.1265656799,
0.067255415,
-0.0161920432,
-0.2579913735,
0.331320107,
-0.2366141379,
0.2640711963,
-0.1954373717,
-0.1731968075,
0.2897444367,
-0.3644789457,
-0.0866842717,
0.2706030309,
0.107503891,
0.1252098978,
-0.0176987406,
0.1480840296,
0.2070917338,
0.2361333817,
0.0434488654,
0.1143488213,
0.1961681545,
-0.0816748887,
-0.0686836541,
-0.0850089863,
0.3240483999,
-0.3548791111,
0.0467498153,
-0.1989232302,
-0.2722991705,
0.0823630542,
0.3586786091,
-0.1403827518,
-0.0492742881,
0.3303243518,
-0.2885321975,
-0.1639077365,
0.3145601749,
0.1940100491,
0.4723354578,
0.0815223008,
0.2573351562,
-0.0455883741,
-0.1886482388,
-0.0735060126,
0.3051701188,
0.1374841779,
0.0314635076,
0.2464114279,
0.0300060846,
0.1635745317,
-0.3229162097,
-0.3497171402,
-0.0566318557,
0.1123418137,
-0.320186913,
0.306301713,
-0.3882682323,
-0.4651740491,
0.0463514589,
0.1560088545,
0.0689052045,
-0.3235586286,
-0.1817545891,
0.2325055003,
-0.0038824454,
0.1636845171,
-0.268206507,
0.0895482749,
0.2671771646,
-0.0134687396,
-0.3418698907,
-0.1808480024,
-0.2729628682,
0.0591980219,
0.1749955416,
-0.422804594,
0.176919207,
0.0074263141,
-0.116053015,
-0.1401736885,
-0.0764234588,
0.3197819591,
-0.1554996967,
0.1568954736,
-0.2774870396,
0.1493913531,
0.2213631719,
-0.250348866,
0.1219482943,
0.0908335373,
-0.1187845469,
0.2801246047,
0.0940898061,
-0.0241613425,
-0.0305835083,
-0.3010805547,
-0.3024662733,
-0.6177491546,
0.0549682453,
0.0454261452,
0.2135514915,
0.1643047035,
0.0170348659,
0.0968244523,
0.3292070925,
0.0991601646,
-0.1142122,
-0.4199432731,
0.3747450411,
-0.1670145541,
-0.2868407965,
-0.3248367608,
-0.068159759,
0.197289899,
0.2589268088,
-0.5295243263,
0.2950168252,
-0.408103317,
0.0848926604,
-0.3834520578,
-0.0974560529,
-0.0261519365,
0.0762888789,
-0.0349893793,
-0.1878575832,
0.0707456768,
-0.1169515103,
0.099007532,
0.2066107243,
0.1086307317,
0.3698712587,
0.1008495316,
0.3327508271,
0.4812107384,
-0.0195495207,
0.340754807,
0.0828914344,
0.1538008004,
-0.1004335433,
-0.0627882555,
-0.0955620185,
-0.2280800343,
-0.0261197612,
0.0981995016,
-0.0962132961,
-0.5762302876,
-0.2840516567,
0.0549152717,
-0.0692367107,
-0.2383102626,
0.0528835431,
-0.511775136,
0.0420480222,
-0.1872567534,
0.158339709,
0.0807968155,
0.0520014092,
0.0860458016,
0.1772524118,
0.126164645,
0.172119841,
-0.1850209981,
-0.0639052689,
-0.4881905019,
0.1825859249,
0.1051265746,
0.4215747118,
-0.1678104103,
-0.1327164173,
0.079114981,
-0.0652067959,
0.3487039804,
-0.2754174471,
0.003567344,
0.2673938274,
0.1421359777,
-0.141551882,
0.0917669758,
-0.3209462762,
0.1368290484,
0.2359539717,
0.0974200815,
-0.1718233079,
0.0333401039,
-0.0884199217,
-0.0724965036,
-0.1253026724,
-0.0163988993,
-0.1704962552,
-0.2492374927,
-0.152010262,
-0.1342425346,
0.2032724023,
0.1256834567,
-0.0124602318,
-0.0567927919,
-0.0460818298,
-0.0396244228,
0.2418597192,
0.2213253379,
0.1399097294,
-0.072280094,
0.2290112525,
0.0671990812,
0.2844446599,
0.229216665,
0.8364325762,
0.1181944758,
-0.562425375,
0.2350821197,
0.2339566648,
0.1660988778,
0.1305403411,
-0.1482324898,
-0.0085168146,
-0.040384464,
0.2698211968,
-0.3024733961,
0.2146551162,
0.2112326026,
-0.0507210419,
-0.5149304271,
-0.4357539117,
0.5883386731,
-0.0393684581,
-0.0761906728,
0.7872931957,
-0.1665047705,
-0.3171558976,
0.4775416255,
0.023435384,
0.7585883141,
0.0943951458,
0.2168688178,
0.2407481968,
-0.3207278252,
0.5003328323,
-0.2320683897,
0.3346685469,
-0.1206095293,
-0.3350296617,
-0.0831094384,
-0.104109481,
0.1709020287,
-0.1476038396,
-0.6302540898,
0.1709610522,
-0.0596439317,
-0.2528054118,
0.3353526592,
0.2742265463,
-0.6082693934,
-0.3062929511,
-0.0675496459,
0.1388827115,
-0.2213594615,
0.3239611387,
0.1382447928,
-0.2202336192,
-0.0515734516,
-0.0843103752,
-0.470235914,
0.4758627415,
-0.2765564322,
0.1624137312,
-0.2390312552,
-0.476098299,
0.1513126493,
0.2664023638,
-0.1421327591,
-0.2257857323,
-0.1582509279,
0.2350440919,
0.1860539317,
0.128023535,
0.0993066132,
0.1514587104,
0.388358593,
0.0532773808,
-0.0168123841,
0.1884423494,
-0.0089799501,
-0.1606285572,
-0.0637813061,
0.0554575026,
0.3183137774,
-0.2681801915,
0.2368576229,
-0.1058514044,
0.042925328,
-0.184253186,
0.0869721249,
-0.0188317224,
-0.174054563,
-0.0738877654,
-0.081296958,
-0.2196761668,
-0.084744215,
0.3771201372,
0.1454578191,
0.3179714084,
0.4994189143,
0.0281168967,
-0.1778804362,
-0.1036715209,
-0.0551505983,
-0.2931397259,
-0.2526119053,
0.0693600997,
-0.2414766699,
-0.1610281765,
-0.2706694603,
0.0038263733,
0.0448378474,
-0.1035543606,
-0.1137387976,
-0.2993662357,
-0.1906369328,
-0.0266143344,
-0.1242438555,
0.2199307382,
-0.1722204089,
0.0222038664,
0.0031198412,
0.1290861517,
-0.2706837952,
-0.1228594556,
-0.0753693059,
0.0231181793,
0.2672104836,
0.029267557,
0.2592339218,
0.109669283,
0.1476227641,
0.313904345,
-0.0276747905,
-0.1609540135,
-0.1787950695,
0.1384893656,
0.0165314712,
-0.3480512798,
-0.1548940837,
-0.0566204414,
0.0126906075,
-0.1251360923,
0.3503145874,
0.181230247,
0.0380967334,
0.2706008554,
0.1240137368,
0.0563359968,
-0.2326476872,
0.1542366892,
-0.2642732859,
0.2401307076,
0.0811118111,
0.0928403959,
-0.0755398124,
-0.0118691325,
-0.3646137714,
0.0622696355,
0.1017948836,
-0.0280174632,
0.5909270644,
-0.4241806269,
0.1720450073,
-0.0497745387,
0.0660299733,
0.4045223892,
-0.229618609,
-0.2089620382,
0.0850853324,
0.2000515163,
-0.0432030633,
-0.2126209289,
-0.4010485411,
-0.1016408652,
0.0112390146,
0.1459596306,
-0.1068902537,
-0.2721834779,
0.0999631286,
-0.2103082985,
0.48598364,
0.3358430862,
0.2670662999,
0.4836386442,
-0.1811282486,
0.0228469688,
-0.2260247916,
0.0204594508,
0.1999065429,
0.2970435023,
0.0035515912,
-0.0078699626,
-0.1613660157,
0.217818886,
-0.1859749407,
-0.4821960926,
-0.0797477886,
0.1024475992,
-0.164754957,
0.390193522,
0.1489098668,
0.1521605253,
-0.2779349387,
-0.0519218668,
-0.0458418429,
-0.0661265701,
-0.0142798405,
-0.0960804075,
0.1068765968,
-0.0128561333,
-0.3279227614,
0.0976090282,
0.0123998635,
0.0633682758,
-0.0198641904,
0.2808056474,
-0.2884627879,
-0.1185013875,
-0.0822275877,
0.1043176353,
0.2999255657,
-0.3544149995,
0.4440691769,
0.3661907911,
-0.1568612754,
0.0282510035,
0.0700020269,
0.4816073477,
0.2853378356,
-0.176650703,
0.0946500301,
0.3374168277,
-0.0436373316,
-0.0402214304,
0.0442540981,
0.2830949128,
0.1793198287,
0.4566898048,
0.0887393951,
-0.1485420465,
0.104571797,
0.0814352483,
0.2538891733,
-0.2799381614,
0.4623195827,
-0.1195058674,
0.0366923809,
0.0272422433,
-0.3365722299,
-0.5624158382,
-0.0282045491,
0.0348957665,
-0.2285001278,
0.0745237544,
-0.0081124082,
0.0628782436,
0.1139546931,
0.4926683009,
0.3248411119,
-0.0188455544,
-0.2245095074,
-0.1508788764,
-0.235583514,
0.2332023382,
-0.0674799085,
-0.1231483817,
0.1752854586,
0.2219230831,
-0.004841473,
0.1680495143,
-0.158444792,
0.0204545669,
-0.2672834694,
0.1405725628,
-0.3995795846,
-0.3515672982,
0.1919632256,
0.1735795438,
-0.0483117215,
-0.576480031,
0.1881390959,
-0.150238961,
0.160817802,
0.0926133096,
-0.241848141,
0.101145193,
-0.2756582797,
0.5297336578,
0.2331106514,
0.3792003691,
-0.1842953563,
-0.4119566083,
-0.0992462337,
-0.3762303293,
-0.2749149203,
-0.0155846253,
0.1083336696,
0.5696321726,
-0.1493341923,
-0.2373838723,
-0.3574707806,
0.3262626231,
0.0608898401,
-0.2656731308,
-0.2735390067,
0.1733702123,
-0.1194599271,
0.2131261379,
0.3050512075,
0.3803451955,
-0.0287129171,
0.1639949232,
-0.2235155702,
-0.4333210588,
0.5773114562,
-0.3461061716,
-0.2659670711,
0.2418414205,
0.0638137534,
0.326497674,
0.2410196811,
-0.4596661925,
0.0893657058,
0.3556544781,
-0.2354130596,
-0.1511853337,
0.1421460807,
0.22597,
-0.0607199222,
-0.0850398764,
0.4553109407,
0.2423965186,
-0.2492040098,
0.1750814915,
-0.1786387712
] |
End of preview. Expand
in Dataset Viewer.
No dataset card yet
New: Create and edit this dataset card directly on the website!
Contribute a Dataset Card- Downloads last month
- 5