Dataset Preview
Full Screen
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 27 new columns ({'draft', 'number', 'labels_url', 'pull_request', 'closed_at', 'created_at', 'performed_via_github_app', 'user', 'locked', 'labels', 'repository_url', 'events_url', 'assignee', 'url', 'is_pull_request', 'milestone', 'reactions', 'active_lock_reason', 'author_association', 'updated_at', 'id', 'timeline_url', 'duration', 'state', 'assignees', 'comments_url', 'node_id'}) and 3 missing columns ({'embeddings', 'comment_length', 'text'}).

This happened while the json dataset builder was generating data using

hf://datasets/SebastianS/github-issues/issues-datasets-with-comments.jsonl (at revision e73b4ff89f31e0fbbb720aae0d8079bdcdf93d7d)

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2011, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 585, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2302, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2256, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              url: string
              repository_url: string
              labels_url: string
              comments_url: string
              events_url: string
              html_url: string
              id: int64
              node_id: string
              number: int64
              title: string
              user: struct<avatar_url: string, events_url: string, followers_url: string, following_url: string, gists_url: string, gravatar_id: string, html_url: string, id: int64, login: string, node_id: string, organizations_url: string, received_events_url: string, repos_url: string, site_admin: bool, starred_url: string, subscriptions_url: string, type: string, url: string>
                child 0, avatar_url: string
                child 1, events_url: string
                child 2, followers_url: string
                child 3, following_url: string
                child 4, gists_url: string
                child 5, gravatar_id: string
                child 6, html_url: string
                child 7, id: int64
                child 8, login: string
                child 9, node_id: string
                child 10, organizations_url: string
                child 11, received_events_url: string
                child 12, repos_url: string
                child 13, site_admin: bool
                child 14, starred_url: string
                child 15, subscriptions_url: string
                child 16, type: string
                child 17, url: string
              labels: list<item: struct<color: string, default: bool, description: string, id: int64, name: string, node_id: string, url: string>>
                child 0, item: struct<color: string, default: bool, description: string, id: int64, name: string, node_id: string, url: string>
                    child 0, color: string
                    child 1, default: bool
                    child 2, description: string
                    child 3, id: int64
                    child 4, name: string
                    child 5, 
              ...
              : string
                    child 11, received_events_url: string
                    child 12, repos_url: string
                    child 13, site_admin: bool
                    child 14, starred_url: string
                    child 15, subscriptions_url: string
                    child 16, type: string
                    child 17, url: string
                child 4, description: string
                child 5, due_on: int64
                child 6, html_url: string
                child 7, id: int64
                child 8, labels_url: string
                child 9, node_id: string
                child 10, number: int64
                child 11, open_issues: int64
                child 12, state: string
                child 13, title: string
                child 14, updated_at: int64
                child 15, url: string
              comments: list<item: string>
                child 0, item: string
              created_at: int64
              updated_at: int64
              closed_at: int64
              author_association: string
              active_lock_reason: null
              draft: bool
              pull_request: struct<diff_url: string, html_url: string, merged_at: int64, patch_url: string, url: string>
                child 0, diff_url: string
                child 1, html_url: string
                child 2, merged_at: int64
                child 3, patch_url: string
                child 4, url: string
              body: string
              reactions: struct<+1: int64, -1: int64, confused: int64, eyes: int64, heart: int64, hooray: int64, laugh: int64, rocket: int64, total_count: int64, url: string>
                child 0, +1: int64
                child 1, -1: int64
                child 2, confused: int64
                child 3, eyes: int64
                child 4, heart: int64
                child 5, hooray: int64
                child 6, laugh: int64
                child 7, rocket: int64
                child 8, total_count: int64
                child 9, url: string
              timeline_url: string
              performed_via_github_app: null
              is_pull_request: bool
              duration: double
              to
              {'html_url': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'comments': Value(dtype='string', id=None), 'body': Value(dtype='string', id=None), 'comment_length': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'embeddings': Sequence(feature=Value(dtype='float64', id=None), length=-1, id=None)}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1321, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 935, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2013, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 27 new columns ({'draft', 'number', 'labels_url', 'pull_request', 'closed_at', 'created_at', 'performed_via_github_app', 'user', 'locked', 'labels', 'repository_url', 'events_url', 'assignee', 'url', 'is_pull_request', 'milestone', 'reactions', 'active_lock_reason', 'author_association', 'updated_at', 'id', 'timeline_url', 'duration', 'state', 'assignees', 'comments_url', 'node_id'}) and 3 missing columns ({'embeddings', 'comment_length', 'text'}).
              
              This happened while the json dataset builder was generating data using
              
              hf://datasets/SebastianS/github-issues/issues-datasets-with-comments.jsonl (at revision e73b4ff89f31e0fbbb720aae0d8079bdcdf93d7d)
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

html_url
string
title
string
comments
string
body
string
comment_length
int64
text
string
embeddings
sequence
https://github.com/huggingface/datasets/issues/2945
Protect master branch
Cool, I think we can do both :)
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.
8
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. Cool, I think we can do both :)
[ -0.2390099317, -0.0966292247, -0.0759872422, -0.0984264985, -0.0993319154, -0.114640519, 0.0078532966, 0.239554435, -0.029255297, -0.0760675296, 0.3045841157, -0.0697917044, -0.1556909084, 0.2472542524, -0.0918809772, 0.2528043091, 0.1680651754, 0.000099914, -0.099873215, 0.0868200585, -0.0079817604, -0.1016465425, 0.1242587939, 0.0464673564, -0.2174060941, 0.0417824537, 0.0499481186, 0.1391150504, -0.4184132516, -0.4594882727, 0.1383522302, 0.1707512289, 0.0033366256, 0.5652734041, -0.0001042576, 0.0216173306, 0.2390211523, 0.0108919349, -0.1405786723, -0.1769673228, -0.5225075483, -0.4049667418, -0.1415199637, 0.0287014097, 0.0748746395, 0.06865637, -0.0910198018, 0.002452912, 0.3400871456, 0.0976495519, 0.2408002317, -0.1941754073, 0.1793913692, -0.0078934981, 0.3311534822, 0.5539640784, -0.0518133156, 0.22529535, 0.0045611048, -0.0102421539, 0.1125852838, 0.2086250186, -0.0837501734, -0.2613006532, 0.2912853956, -0.1761568338, 0.5298508406, -0.3999355435, -0.1809146106, -0.1078854129, 0.0704470351, -0.201073736, -0.3955834508, -0.2669799924, -0.1179080084, -0.0097809853, 0.0528227128, 0.2314448655, -0.0157607514, 0.0743468106, -0.3007844985, -0.3514812589, 0.0444366112, 0.0477003977, 0.10768985, -0.1619907767, 0.0425621495, -0.0867641419, 0.3245029449, 0.0032727672, -0.1678859442, -0.2417692542, -0.3024554849, -0.0731806457, -0.1582976431, -0.166840598, -0.2660009265, -0.3856663704, 0.4048146307, 0.3533258736, -0.360022366, -0.049508784, 0.002726417, -0.0647690669, 0.2959358394, 0.0719453767, 0.011164953, 0.0792105719, 0.5598432422, 0.3058459461, 0.0217627417, 0.3349214792, 0.3275439441, -0.0626471415, 0.0689635947, 0.5172939301, 0.5336612463, -0.2621914148, 0.0377011895, 0.1680787653, -0.3323733509, -0.3190573454, 0.0054372335, -0.0610207208, 0.0830994621, 0.0703226849, -0.1091590971, 0.0525613427, 0.1415696889, -0.0016033769, -0.3210552037, -0.1457319856, -0.3556134701, -0.0552582555, 0.1311259568, -0.4680353403, 0.0908330008, 0.4519638121, -0.1013908461, -0.2686688304, 0.0358462371, 0.1716575772, 0.0330468714, 0.2908923328, -0.1433112174, -0.3825237751, 0.2031245977, 0.0965870917, -0.0456247479, 0.2545187175, -0.1935967952, -0.2513652146, -0.1866476983, 0.3089985549, -0.1121701747, 0.3287965655, -0.548268497, 0.0025912365, 0.0102211721, 0.3561609685, 0.4972600937, 0.385391444, 0.2942132354, -0.1614470184, 0.0424310081, 0.1232627109, 0.3384101689, -0.0511925742, -0.0100153778, -0.2738169432, 0.1200275049, 0.2083038092, -0.2946696877, -0.0103482995, -0.0507854298, -0.1232980564, 0.0196767803, -0.048742909, -0.204722017, -0.0717563778, -0.4525829852, -0.0241770819, -0.0117112603, 0.0191363525, 0.1543500572, -0.3124671876, -0.0787971914, 0.1779266298, -0.182664752, 0.1171256378, -0.3127051294, -0.6241436601, -0.1159733236, -0.0647230893, 0.1302614063, 0.1962026656, 0.3260959387, 0.0762788281, 0.0484594442, -0.1529644579, -0.0238246322, 0.1797253937, 0.3943619728, -0.1591625661, -0.2575499117, 0.0904227868, -0.3276287019, 0.0429003425, -0.0230592508, -0.0326709487, 0.0328225382, -0.4201252162, 0.2604811192, -0.0395855084, -0.089378275, -0.1092364043, 0.2325994372, 0.0994815007, -0.2429064363, -0.2273789346, -0.1815333217, 0.2851662338, -0.242647782, 0.2751372755, 0.099704735, 0.0815574303, -0.1571651399, -0.0062341182, -0.0228314847, 0.3285116851, 0.1736403704, -0.0701381266, -0.04674327, 0.1801669151, -0.0945321396, 0.1870126128, 0.1769949794, 0.4175725579, 0.3424830437, -0.1347359419, -0.0105623221, -0.1067967415, -0.1460241973, 0.022494385, -0.2684330642, 0.2932992876, 0.0991126224, -0.2107091695, -0.249318257, -0.0687692985, -0.1965132803, -0.265663594, -0.1541765183, 0.0057348073, -0.1855473518, 0.1418430507, -0.2901535332, 0.2540666461, -0.2189239413, 0.1275674105, 0.0980846509, -0.201123789, -0.0243991297, 0.0869311392, -0.0290957168, -0.057731878, 0.100935325, 0.3220874071, 0.0902120993, 0.183042407, -0.0160376783, 0.0336617008, 0.2433368862, -0.0592605695, 0.362724781, 0.1478046626, -0.0405387431, 0.0476890579, 0.3128943741, 0.1199872941, 0.0844289884, 0.3880383074, -0.0403469466, 0.1266814917, -0.2439862639, -0.0744038522, -0.2096193433, -0.5341181755, 0.1785611957, -0.1322654784, -0.311395973, -0.0278486367, -0.053532742, 0.1170226783, -0.4517551064, 0.1408915371, 0.2340205312, 0.2509391308, -0.3069441617, -0.0698819757, 0.1471458375, -0.0289604329, 0.0071960338, 0.1242603362, 0.4291484952, -0.2824301422, 0.4524761438, 0.2389160544, -0.1856772155, -0.4897386432, -0.4018841088, 0.0115547851, -0.1668282598, -0.1153612956, 0.0861761943, -0.0717044175, 0.1023176908, -0.401612252, -0.3951958418, 0.0295078922, -0.3599407971, -0.1393553913, 0.0470686667, 0.1184691191, -0.2150190026, -0.0969456658, -0.2935731709, -0.2871156633, 0.5013284087, -0.0580234416, 0.0385896452, 0.0112076271, -0.2732456625, -0.1094526052, 0.1394193172, 0.0409913287, -0.0648903027, -0.3088234365, -0.0299696531, 0.0454311818, -0.0143893873, 0.368963629, 0.2126246095, -0.3675787747, 0.0550749078, -0.350450635, -0.1397126317, -0.0122180469, 0.4691388905, 0.256077528, -0.1587453038, 0.0662926659, 0.0626281053, -0.1768465936, 0.1262467802, -0.1262247413, 0.1179754212, 0.3565621078, 0.3317129016, -0.0136891427, 0.1207261309, 0.0874625519, 0.6525163054, 0.3680907488, -0.0682478175, 0.1437117904, 0.2640963793, 0.0372981504, 0.0415912867, -0.2894337177, 0.0679146126, -0.0695572942, -0.0514505655, 0.0428000949, -0.1358909458, -0.1156823337, -0.0192327965, -0.4392817616, 0.0292560495, -0.4280707836, -0.212833792, -0.3319002986, 0.1305010617, -0.0154377855, -0.4608305693, 0.1475661546, -0.0283782165, 0.2772078216, 0.2418593913, 0.1750047207, 0.1717233062, 0.0286009591, -0.0267298147, -0.143258512, -0.0784367099, -0.0277465973, 0.2193704545, 0.0662960187, -0.120667249, 0.0654256046, 0.0472218953, 0.401168257, -0.0122205056, 0.1574847549, -0.2568204701, -0.3890761137, 0.6179253459, -0.2597557604, 0.1685838103, 0.3741835654, 0.5948965549, 0.4432282746, -0.3229280412, -0.1968980581, 0.2175525427, -0.0058352049, 0.1632378548, 0.1841427237, 0.0639553592, 0.2376962006, -0.4858786464, 0.2991431355, 0.2369734645, -0.2511768043, -0.0432059951, -0.0785255134, -0.1137046441, 0.0831007659, -0.0332846567, -0.2697017193, 0.0042523337, -0.0428405702, 0.1484801471, 0.103806518, 0.1191856787, 0.3641275465, 0.5810796022, 0.2270472646, -0.4135166109, -0.0292455852, -0.1834749579, -0.0771063045, 0.3103395998, 0.1818852574, 0.2265654951, 0.0643974394, 0.2080049366, -0.1813084334, -0.2263067961, -0.2212891281, 0.0309540853, -0.2094345242, -0.0052669551, 0.1052183583, 0.0515394434, -0.0904067382, 0.0824889988, 0.0987536013, -0.3212070465, 0.1318824291, 0.5714728832, 0.955177784, 0.3502957225, 0.1090738475, -0.2922923863, -0.2720266581, 0.3813621998, -0.357526511, -0.1286929101, -0.3113082349, -0.1811920255, -0.1677663922, -0.3074550629, -0.0780642331, -0.4934645891, -0.3175655603, 0.1523682475, -0.1961845458, 0.5375774503, 0.0177650489, 0.1167705655, 0.1282786429, -0.038145341, 0.2970950305, 0.1892168671, 0.0111535219, 0.1593013853, -0.0028083171, -0.4545554519, -0.0279463418, 0.0025342032, -0.4306589961, 0.0386116318, -0.3405902982, 0.0399823673, -0.2339083552, -0.2824401855, 0.1117530316, -0.1104251817, 0.6192416549, 0.2143154591, -0.0984719917, -0.0485647954, 0.2703552842, 0.3980438113, -0.197127685, -0.196609512, 0.5138126016, -0.2046020627, -0.1562071592, -0.0987637788, -0.0285022315, -0.3348375857, -0.2822057903, -0.0767591447, -0.3614266813, 0.0732668266, -0.0306378119, 0.2732182145, -0.0691128522, -0.1619696319, 0.1780715436, 0.111415118, -0.1410685033, -0.1422604918, -0.1091866344, -0.2943277955, -0.0380600765, 0.1902545691, 0.2271509767, -0.1096624061, -0.0836395845, 0.0573430769, -0.1975595355, -0.2153514922, -0.2259288728, 0.1200701594, -0.1281341463, 0.0691441, -0.4934980571, -0.3398421407, 0.1174373701, 0.1943581998, 0.2834068835, 0.3471649885, 0.07340087, -0.165871352, -0.2640971243, 0.2091121227, -0.3319115043, 0.1677211374, 0.0679885969, 0.2423418313, -0.0730114356, 0.0273042507, -0.3893203735, 0.1249633506, -0.1246866807, -0.0371800624, -0.1938935816, -0.076455161, 0.002154053, -0.4198532403, 0.0430044867, 0.0236390047, -0.1842414141, -0.2793491185, 0.0818327814, 0.0688198656, 0.0645905882, 0.0382995978, -0.0577248856, -0.1069227234, 0.1288665682, 0.3231302798, 0.2298199683, -0.0998132899, 0.1544985622, -0.0540686958, 0.1755025834, 0.0916104764, -0.0348069631, 0.1178810969, -0.012650379, -0.2803532481, -0.1100896522, 0.3647060692, -0.1755682975, -0.1734805107, -0.3497366011, 0.1640637666, 0.0974830911, 0.6140381098, 0.110363245, 0.1082694158, -0.4196391404, 0.2307030708, -0.0214151721, -0.0301906541, -0.1783225387, -0.1215486825, -0.0753639936, 0.2950595319, -0.0994521976, -0.3054563999, 0.2349793315, 0.1782335341, 0.0241322219, 0.0836851299, 0.5049234629, 0.1231228486, -0.2381349504, 0.4243248105, 0.2228861451, -0.1286406517, 0.455909878, 0.5233042836, -0.1415461004, -0.0785631537, -0.0360233933, 0.0871152431, 0.1805791706, -0.1823303849, 0.0883068964, 0.3238530457, 0.6459390521, -0.1694083512, 0.3705488145, 0.0255201813, 0.3059286177, 0.2132881433, 0.0270452425, -0.2294175178, 0.4330947399, 0.2575822473, 0.3352282941, -0.5901472569, 0.1695657074, 0.5056748986, -0.023568213, 0.2167177498, -0.3594747484, -0.0223750621, -0.0552352853, -0.0159900282, -0.0719330311, 0.1218386665, 0.1490119845, 0.2901292443, -0.0673369542, -0.0273434464, -0.0467063077, 0.2230517119, 0.2663088441, -0.1428412646, -0.2008356899, 0.2622175515, -0.2484770417, 0.0786395818, 0.2177159339, 0.1616025418, -0.0978315324, -0.0521366596, 0.1798922271, 0.4497513771, -0.1746967882, -0.039889738, 0.0317630544, -0.1530031413, 0.1404958814, 0.0627516881, 0.2746909261, -0.0635648817, 0.1233454049, 0.0005846465, -0.383130908, -0.0437247008, 0.4243560433, 0.4585390389, -0.3600539863, 0.41664958, 0.174680531, 0.2586427629, -0.0644906461, 0.4355578721, -0.0931281298, 0.1283278465, -0.0560730807, 0.1473985761, 0.0403031036, 0.217051357, 0.0914419889, -0.0287602842, -0.0969899297, 0.0412180498, -0.2160513252, 0.2098333389, 0.3064318895, 0.1730033755, 0.4223076701, -0.3031860292, 0.1374098659, 0.1526105702, -0.0731561556, -0.2435802221, -0.047290422, 0.1329396963, -0.3592749536, 0.0106856637, 0.2144466639, -0.0846365243, 0.01132154, 0.064479664, 0.4179263711, 0.262011826, 0.1000918522, 0.0653353333, -0.0138661312, 0.2816164494, -0.3647170663, 0.2353287637, 0.1579896212, -0.1405763328, -0.2575822473, -0.0880536586, -0.0056584454, -0.0124874227, -0.4783657789, -0.0724288374, -0.1397930533, 0.4400902689, -0.1443308294, 0.0493659228, -0.3884942234, 0.0546305478, -0.0210841242, 0.2141258866, -0.3707188964, 0.1099852324, 0.0246811155, 0.0773969591, 0.0523463786, 0.1700744331, 0.0661983937, 0.2172149122, -0.2984472513, -0.1805216223, 0.3678478599, 0.0187848061, 0.0980769023, -0.15001674, 0.4350650012, 0.5103737712, -0.2477454543, -0.3580597639, -0.2498808056, -0.0220319424, -0.2263912112, -0.4824006557, 0.2833116651, 0.0979687423, 0.2627729475, -0.0858350545, 0.0814130977, -0.069908455, -0.2276804298, 0.164998427, -0.2625057101 ]
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.1553194672, -0.1002306268, -0.070321016, -0.0798171908, -0.1042534709, -0.1879874468, 0.0104035577, 0.2728635967, -0.0098489737, -0.0841399208, 0.2926148772, -0.0778751224, -0.1324572563, 0.2158903182, -0.0562292449, 0.1705456823, 0.2003232092, -0.0407981202, -0.0923330337, 0.0279233586, 0.0226084664, -0.0687029436, 0.0832000151, 0.0436301306, -0.1837819666, 0.0054013738, -0.0148117775, 0.1564962417, -0.4397666156, -0.4695702493, 0.1452465504, 0.2322402596, 0.0251065325, 0.570535183, -0.0001043637, -0.0003454557, 0.1694866419, -0.0406010039, -0.1401022524, -0.2154636681, -0.4901072085, -0.4447958767, -0.07006336, -0.0083542913, 0.1288067251, 0.0528678969, -0.132499963, 0.0238457564, 0.3848451674, 0.1055523977, 0.2386109382, -0.1028517336, 0.1812405735, 0.0137694413, 0.392008841, 0.5474528074, -0.066634573, 0.3031997979, 0.0540179275, 0.0006757497, 0.0611058585, 0.1741086096, -0.0823729113, -0.2866700888, 0.2270194292, -0.1779912561, 0.5181742311, -0.4243531227, -0.2415838391, -0.0831176639, 0.0523793846, -0.1781465262, -0.4089041948, -0.2419367433, -0.1499476582, 0.0076339091, 0.0677802935, 0.2468644679, 0.039739579, 0.0036496122, -0.3773649931, -0.2718090415, -0.004407926, 0.0492040403, 0.141940549, -0.1626293063, 0.0664263666, -0.1270385236, 0.2942230105, -0.0473279878, -0.1469833106, -0.3676346838, -0.2413333207, -0.0125874653, -0.1026133746, -0.1957468837, -0.2462065965, -0.3248277903, 0.4251304567, 0.3889683783, -0.3832727969, 0.0137396995, -0.0304892361, -0.0810169131, 0.2071851492, 0.1178578511, -0.0104900496, 0.0584886484, 0.530713141, 0.3144408166, 0.0051584225, 0.3255857527, 0.3015701473, 0.0030471815, 0.0344459116, 0.574118197, 0.4289444685, -0.26292032, 0.1276476383, 0.1959735751, -0.3412007391, -0.3845081031, 0.0711311549, -0.0861726329, 0.1103260964, 0.0271337908, -0.1147114784, 0.0668015406, 0.0451908335, -0.0380863659, -0.3079027534, -0.141485557, -0.3744001687, -0.0685305148, 0.1860401928, -0.4571051598, 0.1491677761, 0.4325242639, -0.0680372268, -0.1992845535, 0.0445522442, 0.1292257011, 0.0555874184, 0.2961196899, -0.1537979692, -0.4526284337, 0.2235967368, 0.1313333064, -0.0668994114, 0.1940043122, -0.1598993689, -0.2616221011, -0.1049757376, 0.2977656722, -0.1482721567, 0.3071561158, -0.5237665772, 0.0363732092, -0.0044837268, 0.3506707847, 0.4910375476, 0.3025480509, 0.3280785084, -0.1685939282, 0.0617566295, 0.1903455257, 0.3235116601, -0.0516864397, 0.0623045377, -0.2877363563, 0.1095039099, 0.1450733244, -0.3121602237, 0.0175557248, -0.0052360594, -0.1312822402, 0.0107761566, -0.0714070052, -0.1119878516, -0.0989294425, -0.3666853309, 0.0694030076, -0.0407375731, -0.1007770002, 0.2079568803, -0.3201756477, -0.0947941095, 0.2050814927, -0.1481231451, 0.0208985135, -0.2919872105, -0.6061385274, -0.1636558473, -0.06343887, 0.1249144152, 0.2275642306, 0.3607693315, -0.0050310493, -0.0283617247, -0.1714023799, -0.0093972106, 0.1125069708, 0.3421364129, -0.1496780068, -0.2415423691, 0.1322465539, -0.3545884192, 0.0911409035, -0.0785121024, -0.0097747799, 0.0344485678, -0.3157884181, 0.3412798941, -0.0440529883, -0.1208016798, -0.1141509414, 0.2415172756, 0.095951654, -0.1747335494, -0.2039210498, -0.2074069828, 0.2601909339, -0.2408306301, 0.3018657863, 0.1300136894, 0.1026374176, -0.1411807239, -0.0364533328, -0.0250960924, 0.36193645, 0.2363044769, -0.0899174288, -0.0591584407, 0.1687609404, -0.0490626656, 0.2035702467, 0.2246947736, 0.4252423346, 0.3736152053, -0.1026815102, 0.0626009405, -0.0917925984, -0.0787246898, 0.0245947056, -0.3291273713, 0.3280371726, 0.073694557, -0.1394644678, -0.1740321219, -0.1033326834, -0.1740740985, -0.2202692628, -0.1707722992, -0.012951361, -0.1690982729, 0.1943652332, -0.3365918398, 0.2223692834, -0.2772080004, 0.148579374, 0.0150526064, -0.2516064942, -0.1024010181, 0.0682980418, -0.0059674503, -0.1327149123, 0.1241709664, 0.3773829341, 0.1278743744, 0.1701000035, 0.0042741634, 0.0201513059, 0.2572831213, -0.1164359227, 0.353325963, 0.1443069726, -0.1054452285, 0.054064367, 0.3364559114, 0.1812186539, 0.0643318817, 0.346919328, -0.0033243245, 0.0352581739, -0.2084068358, -0.0459848903, -0.2602106631, -0.5283415914, 0.2192376256, -0.110637784, -0.3552163243, -0.0085041393, -0.0453661792, 0.047418233, -0.5248722434, 0.136029914, 0.1835808307, 0.2905260623, -0.3178029358, -0.1199780703, 0.1263155937, -0.0225951802, 0.0123441136, 0.1285599768, 0.3631602824, -0.2266809344, 0.45945099, 0.2389809936, -0.1695563644, -0.4726397991, -0.3434132934, 0.0191301201, -0.2039363831, -0.1179748252, 0.0098189935, -0.0989309773, 0.0921538174, -0.3585401177, -0.3257124722, -0.018773742, -0.3730046451, -0.1600959152, 0.0695955083, 0.0628860295, -0.2346176803, -0.114040032, -0.386590004, -0.2821527123, 0.4793556035, -0.0164330266, 0.1156589612, -0.0431727543, -0.2923772335, -0.0459178463, 0.0874827728, 0.1366390288, -0.0000448525, -0.3609322906, 0.0325667374, -0.0406603813, -0.0293471292, 0.352609843, 0.1854910851, -0.4302407205, 0.0712517202, -0.3217604458, -0.1558190286, -0.0520843901, 0.4864443243, 0.3141199946, -0.0973737389, 0.0710799471, 0.1035510823, -0.1919001341, 0.0550895296, -0.1816118211, 0.1472238153, 0.3454884887, 0.2857186198, 0.0378993787, 0.1458674669, 0.0254973993, 0.7140879035, 0.3778497577, -0.059657298, 0.210337624, 0.3106974065, -0.0277180839, 0.0039902786, -0.2601569593, 0.065046832, -0.1012431234, -0.0000209612, 0.0867039785, -0.1295782924, -0.1229653433, -0.0112106856, -0.4777139425, 0.0091558872, -0.4146761596, -0.2396630496, -0.3181839585, 0.1842502356, -0.0225256812, -0.4854888022, 0.1313801706, 0.0537709594, 0.2305762768, 0.2159709483, 0.2142065167, 0.1812160015, -0.0202590171, -0.0510845743, -0.1200738922, -0.067726247, -0.0043309759, 0.145250544, 0.0905801877, -0.1670407504, 0.0318057276, 0.0695502236, 0.3299908936, -0.0148684094, 0.1402913779, -0.1708071232, -0.5094846487, 0.6086307168, -0.3185944259, 0.1394028515, 0.2990989089, 0.5112247467, 0.4397634268, -0.2954540849, -0.1953165382, 0.2071224451, 0.0325558819, 0.1978364438, 0.1773502678, 0.1449773014, 0.2783072591, -0.4903811812, 0.2887739539, 0.1548331976, -0.2504818439, -0.1551757604, -0.0039056637, -0.0270501971, 0.1264622211, -0.0263037495, -0.2453983575, 0.0091275191, -0.1094373837, 0.1734458208, 0.1329204887, 0.0698278099, 0.4152193964, 0.594658792, 0.1349339038, -0.3891987503, -0.0482011773, -0.1750733256, -0.0742834732, 0.3271439075, 0.1983511001, 0.24822779, 0.0203486141, 0.1776862442, -0.1234726384, -0.2662384808, -0.2033664733, -0.038491372, -0.0767425969, 0.0075890222, 0.0873292238, -0.0458977483, -0.0909918919, 0.0130487047, 0.1399983913, -0.3661002219, 0.1637848169, 0.6180499792, 0.9825440049, 0.3975676596, 0.0890336856, -0.2546566427, -0.3273829818, 0.3259905577, -0.340107888, -0.1664507836, -0.2470169514, -0.1235878542, -0.1842461079, -0.3403116167, -0.0386944152, -0.4898471832, -0.3528554738, 0.1351124644, -0.2180551142, 0.5279191732, 0.008177679, 0.1233861297, 0.1910188198, -0.12231455, 0.2551510632, 0.1982705742, 0.061811205, 0.104095228, -0.0040276642, -0.4687906206, -0.0022327867, 0.0205386523, -0.3772695959, 0.0891471654, -0.3437781334, 0.0388470143, -0.2063531876, -0.3160520196, 0.115827091, -0.0870479271, 0.6059409976, 0.1666302532, -0.0794522315, -0.0446208119, 0.2913893759, 0.4645246863, -0.2288517058, -0.219530493, 0.5223725438, -0.2133638412, -0.1302172095, -0.2047614008, -0.0803344026, -0.2370928973, -0.2609480619, -0.1280429661, -0.3282325566, 0.0795017928, 0.041714251, 0.2636537552, -0.0910693035, -0.1676060557, 0.1859930903, 0.1154857874, -0.1075729132, -0.118584998, -0.1695205718, -0.2610394955, -0.0678159222, 0.2016011029, 0.161605835, -0.1206071749, -0.0767639652, 0.099657312, -0.2443365902, -0.2207894772, -0.2072923779, 0.105987981, -0.1394685954, 0.0929813311, -0.5486782193, -0.32993415, 0.0517466478, 0.2461933494, 0.279415518, 0.3304983079, 0.1179999709, -0.0997705981, -0.2244495153, 0.2186434418, -0.3279267251, 0.1686490178, 0.0235842206, 0.1588117927, -0.0260097533, 0.0404301658, -0.3905956745, 0.160315454, -0.1254802048, -0.0211261567, -0.2255206406, -0.1017537564, -0.000630246, -0.3081870973, 0.0324874744, 0.0234331191, -0.1957566142, -0.2830150425, 0.0926690474, 0.0656956136, 0.0647893623, -0.0570135079, -0.0574608184, -0.1081577986, 0.0827530622, 0.2720321715, 0.2396921068, -0.1584913284, 0.1097129956, -0.0322248675, 0.1710882336, 0.1105851158, -0.0247724894, 0.0892416015, 0.0146322586, -0.2658016682, -0.0353747047, 0.267159909, -0.1817460209, -0.2171436995, -0.2685393691, 0.1888355613, 0.1056337059, 0.5840907693, 0.2028801143, 0.1442169249, -0.405082494, 0.1754089892, -0.0531977862, -0.0036356284, -0.1692355126, -0.0969402716, -0.0849622712, 0.2793601751, -0.0867193192, -0.3035972714, 0.2713837624, 0.1881819069, 0.0007486099, 0.1049711928, 0.5280760527, 0.1296208501, -0.1896519363, 0.4221355915, 0.2712435424, -0.0876758322, 0.494900018, 0.470233053, -0.1131819189, -0.0203250889, -0.082736142, 0.116614446, 0.2306870967, -0.2540961802, 0.1284718663, 0.2962196171, 0.6462965012, -0.1688840091, 0.3935549557, -0.0330962837, 0.3437395692, 0.1979931891, 0.0587407239, -0.2460495532, 0.3927094042, 0.2117075175, 0.3301511109, -0.6189893484, 0.1363731921, 0.4914032817, 0.0492829382, 0.1995816529, -0.400105536, -0.0492327139, -0.0584757105, -0.0483128205, -0.0781826749, 0.1634954214, 0.1237376407, 0.2829664946, 0.0065842085, -0.088377893, -0.043440666, 0.1850482225, 0.2415616512, -0.1169977486, -0.1811731756, 0.357754916, -0.2761978507, 0.0664936379, 0.215460062, 0.1350683123, -0.074716486, -0.0686341003, 0.1802342385, 0.4503947198, -0.1699341387, 0.0225111321, 0.0557496101, -0.1625677198, 0.1577177346, 0.0801470727, 0.2580322921, -0.0533408038, 0.1128025502, 0.0354268774, -0.4152979553, -0.025322238, 0.4330811501, 0.5564644337, -0.3377302289, 0.4601393938, 0.1192681268, 0.2847007811, -0.0326848105, 0.4374352098, -0.0471260622, 0.1163921505, -0.0051536481, 0.143078804, 0.02808984, 0.2575880587, 0.1414998174, -0.0333454311, -0.1592887938, 0.0301065128, -0.1215411872, 0.127435267, 0.2968399227, 0.17307055, 0.419888705, -0.2947140038, 0.1275687069, 0.1282345057, -0.0875694603, -0.3413968384, 0.0095217237, 0.0940847918, -0.3605292141, 0.0042476766, 0.2224816233, -0.0694397017, -0.0241943654, 0.1189339831, 0.4094779193, 0.1927902848, 0.1120927632, 0.1051306576, -0.0493477993, 0.3209429979, -0.3918459415, 0.2249616981, 0.1892230064, -0.1029298455, -0.2218884081, -0.0510987751, 0.0073658284, 0.0212806091, -0.4355088174, -0.1401801854, -0.162226066, 0.4209837019, -0.1355972886, 0.0682982057, -0.3722180128, 0.0687672645, -0.0371344872, 0.2683559954, -0.3000992239, 0.0864084363, 0.0525472984, 0.017337583, 0.088370651, 0.1305798739, 0.068434529, 0.2528506517, -0.3523156941, -0.1248895153, 0.3586619198, -0.0194706563, 0.0910360888, -0.2172687799, 0.4182040691, 0.4654460251, -0.1480811983, -0.3321150839, -0.2635183036, -0.0111563709, -0.2798339725, -0.542089045, 0.2986377478, 0.1378680468, 0.1974387169, -0.1058711782, 0.0366066247, -0.0743264556, -0.1527637988, 0.0611719489, -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.3049958348, 0.1243880838, -0.0465583764, 0.2368971109, 0.1517290324, -0.0666598156, -0.0069413707, 0.3285393715, 0.1737383604, 0.0293814819, -0.2313861847, 0.3581927419, -0.1503304988, 0.2527370155, -0.2977862358, -0.1378120482, 0.0444693454, 0.0321247876, -0.0614953265, 0.166412577, -0.1239175051, 0.4988580644, -0.1957765073, 0.0070795678, 0.2221652865, 0.0513210297, 0.1091236398, 0.138566196, 0.0798620358, -0.3392693698, 0.5981172919, 0.1064069718, -0.0348691642, 0.498096019, -0.0001213098, 0.099867776, 0.4398066998, -0.1073976383, -0.4579497874, -0.3686879575, -0.192854017, 0.1319934726, 0.2131137848, 0.0811629742, -0.0715122968, 0.1143416911, -0.303493619, -0.346046567, 0.2488765419, 0.1989328116, 0.2267285585, 0.2136144787, 0.2657418847, 0.066587165, 0.170179069, 0.0826525018, 0.0259718653, -0.0490864292, 0.2940285802, 0.014261202, 0.043685697, 0.4806104004, -0.3283523321, -0.2146463245, 0.3046185374, -0.2982533276, 0.1030709222, -0.3957037926, 0.2999309897, 0.0781370997, 0.1462642252, -0.255518198, -0.5773367882, -0.3483263254, -0.5121472478, -0.2868291736, 0.4164735079, -0.216358915, -0.2009968162, 0.2200830877, -0.3342647851, -0.0270038545, 0.0934983194, 0.0535101071, -0.0584819205, 0.2941842079, -0.1318320185, -0.0048626242, 0.0149830757, -0.132900551, 0.1924084276, -0.2750048339, -0.1968749017, 0.1725800484, -0.0155595224, -0.0546131916, 0.0954222009, 0.3323281705, 0.140570581, 0.0356287211, 0.0192098524, 0.0845401734, -0.0409641638, 0.0536773168, 0.1373275816, 0.475378722, 0.4901195765, 0.2467906624, 0.2727875113, 0.2854887545, -0.0078853024, -0.0013800253, 0.5281852484, -0.1666412055, 0.0747071281, 0.1517307162, 0.196695298, -0.4048683643, -0.3602132797, 0.1689626127, -0.0769995078, -0.1250401586, 0.2207264006, 0.0534940958, 0.1005648673, 0.2142349631, 0.1320811808, 0.0338568501, -0.1964725256, 0.0612344779, -0.1725096703, -0.1739457697, 0.0011616903, -0.1112991124, -0.0473052748, -0.89977777, 0.1747701168, 0.0482602492, 0.0063488153, 0.1058098748, -0.0697732121, 0.207434997, 0.1730166823, 0.5229284167, -0.2213587761, 0.0839003325, 0.1671907902, -0.548327744, -0.1386865377, 0.0125284484, -0.2415378094, -0.1112066656, 0.2085879147, 0.1735862345, -0.3296715915, 0.0126515068, -0.17029953, 0.4515431225, 0.2592140436, -0.5466870666, -0.0779574588, -0.213380143, -0.4382343888, -0.1997140199, 0.0971902013, 0.4131370485, -0.5942543149, -0.3216674924, 0.0216870401, 0.0319067985, 0.0399160981, -0.1229341999, -0.063439101, -0.2444722205, -0.1077689156, -0.1384182572, 0.3606542647, -0.3195546865, -0.733892858, 0.1537256837, 0.2360213548, 0.5342661738, -0.0709591061, -0.1374839246, 0.2813950479, -0.2578290701, 0.1459920853, 0.0848445743, -0.1649033576, -0.0079940017, -0.3409692049, -0.2346946597, 0.2238697708, -0.1502910852, 0.0904174298, 0.3348585963, 0.0790057704, -0.2542206049, 0.0502917804, 0.0350500681, 0.1049243882, 0.1990925223, 0.2453232259, 0.2237652242, 0.2863062918, -0.4365186989, -0.2801407278, 0.2506181598, 0.2141302824, -0.0600011088, -0.1524066925, -0.1982273012, -0.2678262889, -0.0884182155, -0.1589775681, -0.3044096231, 0.0788738504, 0.0225765873, 0.3843636513, -0.0385034606, -0.1145259663, 0.6218649745, 0.3084535897, 0.0944804996, -0.5049411654, 0.229641512, -0.0548514128, 0.0051691518, -0.0591857955, 0.0377827175, 0.2939595878, -0.0685256049, -0.2895757854, 0.407875061, 0.0392592028, 0.084168233, -0.0276337974, 0.1937460154, 0.1773459613, 0.2105839252, 0.0639338642, 0.2741822898, -0.0148837138, 0.2087214142, -0.195456177, 0.557248354, 0.0293753464, 0.3240505159, 0.1208347678, 0.148756206, 0.3702490628, 0.1305633932, -0.2189950645, -0.1370786875, 0.3204495311, -0.4587228, 0.0626674443, 0.0123394234, -0.1297932267, 0.3776263595, 0.0716826022, 0.0755119473, -0.0334524736, 0.3119212389, -0.1593657285, -0.042190969, 0.1813624054, 0.4024861157, 0.4014509916, 0.2088322341, 0.0507172868, 0.0758817792, -0.1615392268, -0.0248774402, 0.2082498521, 0.1293462515, -0.1696399748, 0.1535750628, 0.3034210205, 0.2732039392, -0.3061974645, 0.0933934823, -0.2356239706, 0.1195331365, -0.270581305, 0.3616366684, -0.2810101509, -0.2280866951, 0.076141715, -0.1678324938, -0.2615140676, -0.3875222206, 0.089899376, 0.3934392929, -0.086219281, 0.2567750216, 0.0147161586, 0.2445412278, 0.136167407, -0.1996820718, -0.4005717337, -0.2078815252, -0.3476482034, 0.0053976052, 0.2051323503, -0.1568491161, 0.2970358729, -0.0763099566, -0.2066247612, -0.390294075, -0.9079098701, -0.0486286655, -0.123964861, 0.6180298328, 0.3176228106, -0.0916265026, -0.1352719367, -0.2327560335, 0.1665794849, -0.0413150303, -0.4310828745, 0.1568385363, 0.0666227341, 0.1682221591, -0.2003851682, -0.2270279974, -0.1135412008, -0.1458190233, 0.0079398574, -0.1276904047, 0.0849654675, 0.3094039559, 0.1123534068, -0.3165157139, -0.0872011557, 0.1330857426, -0.3335401416, -0.0773374513, 0.0739419162, -0.054162316, -0.2302434891, -0.034139622, -0.0319806486, 0.0831893757, 0.3736632466, -0.4069587886, -0.3791774213, -0.2713731527, -0.0048744264, 0.2311773747, 0.068360962, 0.2319667786, 0.1899949759, 0.0391035639, -0.2794680893, -0.4342857301, -0.0886206329, -0.2365958691, 0.1095489264, 0.1482250243, 0.6309939027, 0.0345636867, 0.4764270186, 0.2947264612, 0.0489611253, 0.1398259848, 0.1815548688, 0.4972691238, -0.3258462548, -0.4095653892, -0.0467088632, -0.0461938493, 0.0505124666, -0.1531914324, 0.1795819253, -0.1120608747, -0.3487883806, 0.000088976, -0.2515632212, -0.2498103678, -0.2386271805, -0.0136443963, 0.2690052986, 0.3906219602, 0.1407706589, -0.3225954771, -0.1763848662, -0.0081372689, 0.4007481039, 0.1035773978, 0.2502198517, -0.1815419495, -0.0471423045, -0.4509257674, 0.492559284, 0.2151459008, 0.2648919821, -0.1177540421, -0.1629662067, -0.3294481337, -0.0492410697, 0.5928120017, -0.3631767035, 0.0443488397, 0.1019544229, -0.2081836015, -0.382881999, 0.0511292815, 0.0076627661, 0.3649113178, 0.0543546379, 0.3508075774, -0.0821149051, -0.0730158612, -0.0869157314, 0.2223753035, -0.1245945767, 0.0196017139, -0.2743616104, -0.2049434334, -0.143308565, 0.0314200111, -0.1528896391, 0.1650674194, -0.1800080687, -0.0685375854, -0.1131430715, -0.0563930348, 0.1153809577, 0.1347035617, 0.2945029438, -0.1000063792, 0.1187398955, 0.1441811323, 0.2405287623, 0.04236985, 0.458391726, -0.2755981982, -0.2780961096, -0.0670714304, 0.1208044589, -0.114640221, 0.3437377512, -0.2040164918, -0.0173406545, -0.0444572084, -0.1020425931, -0.0212400388, -0.1411033124, -0.001939329, 0.3703025281, -0.204925105, -0.2889373302, 0.2329640687, 0.2390516698, -0.2043491751, 0.436775893, 0.3422557414, -0.2809350789, 0.1687894613, -0.1999594271, 0.7136852741, 0.1521688104, -0.0298533011, 0.0877994671, -0.1695175022, 0.4524547458, 0.3125461042, 0.1559776068, -0.0667682663, -0.2370487005, -0.0655061752, -0.0347471349, 0.1580221951, -0.1110610664, -0.2036339194, 0.5631492734, -0.0592185557, -0.0353867561, 0.1755868793, -0.1173290387, -0.2023077309, 0.0190884974, -0.4372626245, 0.099125281, -0.0213232394, 0.2521654963, 0.0010581244, -0.0767222121, 0.0552208163, -0.3087654114, -0.2637814581, -0.0523921177, -0.3992073536, -0.0659277439, 0.2081235945, -0.433280319, 0.0089732604, 0.0526266396, 0.2566778362, -0.0081807002, -0.0373007692, -0.0075372811, 0.0702684447, 0.4977722168, 0.2345933914, 0.0250330679, 0.2863307297, 0.0890943483, 0.1867841035, 0.0195984095, -0.1420115829, -0.3608390987, -0.0186531637, 0.0038103643, 0.1180328727, -0.1588664055, 0.0288226064, -0.2428553104, 0.0213073175, -0.364861697, 0.0650937036, -0.0898337811, -0.0098389015, 0.0943212733, -0.0165627208, -0.226817742, -0.0053528175, 0.6357886791, -0.1438153237, -0.4367529452, 0.127720207, -0.0055662361, -0.2235843986, 0.0353587158, -0.2044414431, 0.0274193734, -0.2750842869, 0.2978782654, -0.2511248887, -0.1071279123, 0.2691295445, 0.3227922022, 0.1886078864, 0.2146122009, -0.1516674459, -0.3945676982, -0.1370823681, 0.2854580283, 0.0442744903, 0.0549807698, -0.0311486106, -0.3236714602, -0.1444216073, -0.2066645175, -0.2257885635, 0.0087526664, 0.3313151598, 0.0712086409, 0.1904872656, 0.2205638587, 0.1548970491, -0.1995647997, -0.0134116681, 0.0725863725, -0.203820318, -0.102092959, -0.093345888, 0.0935418084, -0.0911601558, -0.2648990452, -0.1546195447, -0.0057543651, 0.0614032373, -0.1646934003, 0.4182681739, 0.3214158118, -0.1182498485, -0.0536907464, -0.0327779986, 0.0472252741, 0.3035388887, 0.1383125186, 0.0185656752, 0.0326717421, 0.0427048579, 0.1994483471, -0.1875816137, 0.014096451, 0.082016468, 0.0423960686, -0.2510475516, 0.0270903334, 0.3569348454, -0.295296222, -0.0216397811, 0.5987740755, 0.3562681079, 0.2437597811, -0.1398067921, 0.1138302758, -0.0777392983, 0.1533572823, -0.2739046812, -0.3326784968, 0.205778718, 0.2732258439, 0.0609572381, 0.1860822588, -0.0021066871, 0.0291597173, 0.6171163917, 0.2176484168, 0.4478169084, -0.1253162473, 0.3508082032, 0.5271652937, 0.2326287627, 0.1843764484, 0.241720289, 0.0737254471, 0.0160929821, 0.5080396533, -0.0660088882, 0.2586891651, 0.2197473645, 0.1287705451, -0.0355183855, -0.4662743509, -0.1656748652, 0.0283220075, -0.0797490031, 0.2506761551, 0.1661577374, 0.0856602341, -0.2232845426, -0.3345984221, 0.0114881797, 0.024897946, -0.193626374, -0.2161095738, 0.1446396858, -0.3639173806, -0.0571490377, 0.013486567, -0.1208442077, 0.0703997388, 0.4529311359, -0.2469489723, -0.128362909, -0.4731904268, -0.3793772757, 0.0500456095, 0.1747638434, -0.0140105868, 0.4047631919, 0.258780688, -0.2298548669, 0.2219883502, 0.2503442466, 0.4856500924, 0.2468240112, 0.027692223, 0.0133466832, -0.1420494765, -0.0540064909, -0.0907230228, 0.3356420696, -0.0870835707, 0.0305686034, 0.1879348457, 0.1134100109, 0.0007339246, 0.2053903639, -0.0408540145, 0.3989400268, -0.4661819339, 0.0895344913, -0.2369527221, 0.2848792076, 0.0150147714, 0.1000138745, -0.2490254641, -0.1181152612, 0.171215117, 0.2318110913, 0.2039028108, -0.1064854339, 0.0748107806, 0.1348544508, 0.0739088506, 0.4687882364, -0.0930132717, -0.0892460048, -0.1464888304, -0.653509438, -0.0558623448, 0.1423008889, 0.1280672401, -0.0635151789, 0.0375300944, 0.0490150824, 0.1846857667, 0.0434734374, -0.1836016178, 0.1054587811, -0.2515150607, -0.2000013739, -0.1759469211, 0.2301196903, -0.2421481013, 0.0548487157, -0.2659107745, 0.0627719611, -0.0416926146, 0.0269530844, -0.005927782, -0.0628840253, 0.0675144792, 0.3473338187, -0.1370735615, 0.3493901491, 0.2663169801, 0.03349353, -0.0034476253, -0.2782979906, -0.1931354105, -0.2683142722, 0.0700851008, -0.2921240628, 0.4918605983, -0.4018596709, -0.3019634485, -0.1804217845, 0.2724736333, 0.1233783066, -0.1268284917, -0.4767788649, 0.1658581197, -0.0587571412, 0.0838124454, 0.0044377646, 0.508733511, 0.059986867, 0.3379509747, -0.2266310304, -0.3412219286, 0.5358169079, -0.4137625992, -0.2617653012, -0.1319275051, -0.0639740229, 0.6073155403, -0.4836450815, -0.3043731153, -0.2037671804, 0.2719914615, -0.1200053543, -0.1490247399, 0.1555725485, -0.2652980089, 0.1745556146, -0.1892018616, -0.0870604515, 0.4393822849, -0.0882679075, 0.2773536742, -0.1299419552 ]
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.3049958348, 0.1243880838, -0.0465583764, 0.2368971109, 0.1517290324, -0.0666598156, -0.0069413707, 0.3285393715, 0.1737383604, 0.0293814819, -0.2313861847, 0.3581927419, -0.1503304988, 0.2527370155, -0.2977862358, -0.1378120482, 0.0444693454, 0.0321247876, -0.0614953265, 0.166412577, -0.1239175051, 0.4988580644, -0.1957765073, 0.0070795678, 0.2221652865, 0.0513210297, 0.1091236398, 0.138566196, 0.0798620358, -0.3392693698, 0.5981172919, 0.1064069718, -0.0348691642, 0.498096019, -0.0001213098, 0.099867776, 0.4398066998, -0.1073976383, -0.4579497874, -0.3686879575, -0.192854017, 0.1319934726, 0.2131137848, 0.0811629742, -0.0715122968, 0.1143416911, -0.303493619, -0.346046567, 0.2488765419, 0.1989328116, 0.2267285585, 0.2136144787, 0.2657418847, 0.066587165, 0.170179069, 0.0826525018, 0.0259718653, -0.0490864292, 0.2940285802, 0.014261202, 0.043685697, 0.4806104004, -0.3283523321, -0.2146463245, 0.3046185374, -0.2982533276, 0.1030709222, -0.3957037926, 0.2999309897, 0.0781370997, 0.1462642252, -0.255518198, -0.5773367882, -0.3483263254, -0.5121472478, -0.2868291736, 0.4164735079, -0.216358915, -0.2009968162, 0.2200830877, -0.3342647851, -0.0270038545, 0.0934983194, 0.0535101071, -0.0584819205, 0.2941842079, -0.1318320185, -0.0048626242, 0.0149830757, -0.132900551, 0.1924084276, -0.2750048339, -0.1968749017, 0.1725800484, -0.0155595224, -0.0546131916, 0.0954222009, 0.3323281705, 0.140570581, 0.0356287211, 0.0192098524, 0.0845401734, -0.0409641638, 0.0536773168, 0.1373275816, 0.475378722, 0.4901195765, 0.2467906624, 0.2727875113, 0.2854887545, -0.0078853024, -0.0013800253, 0.5281852484, -0.1666412055, 0.0747071281, 0.1517307162, 0.196695298, -0.4048683643, -0.3602132797, 0.1689626127, -0.0769995078, -0.1250401586, 0.2207264006, 0.0534940958, 0.1005648673, 0.2142349631, 0.1320811808, 0.0338568501, -0.1964725256, 0.0612344779, -0.1725096703, -0.1739457697, 0.0011616903, -0.1112991124, -0.0473052748, -0.89977777, 0.1747701168, 0.0482602492, 0.0063488153, 0.1058098748, -0.0697732121, 0.207434997, 0.1730166823, 0.5229284167, -0.2213587761, 0.0839003325, 0.1671907902, -0.548327744, -0.1386865377, 0.0125284484, -0.2415378094, -0.1112066656, 0.2085879147, 0.1735862345, -0.3296715915, 0.0126515068, -0.17029953, 0.4515431225, 0.2592140436, -0.5466870666, -0.0779574588, -0.213380143, -0.4382343888, -0.1997140199, 0.0971902013, 0.4131370485, -0.5942543149, -0.3216674924, 0.0216870401, 0.0319067985, 0.0399160981, -0.1229341999, -0.063439101, -0.2444722205, -0.1077689156, -0.1384182572, 0.3606542647, -0.3195546865, -0.733892858, 0.1537256837, 0.2360213548, 0.5342661738, -0.0709591061, -0.1374839246, 0.2813950479, -0.2578290701, 0.1459920853, 0.0848445743, -0.1649033576, -0.0079940017, -0.3409692049, -0.2346946597, 0.2238697708, -0.1502910852, 0.0904174298, 0.3348585963, 0.0790057704, -0.2542206049, 0.0502917804, 0.0350500681, 0.1049243882, 0.1990925223, 0.2453232259, 0.2237652242, 0.2863062918, -0.4365186989, -0.2801407278, 0.2506181598, 0.2141302824, -0.0600011088, -0.1524066925, -0.1982273012, -0.2678262889, -0.0884182155, -0.1589775681, -0.3044096231, 0.0788738504, 0.0225765873, 0.3843636513, -0.0385034606, -0.1145259663, 0.6218649745, 0.3084535897, 0.0944804996, -0.5049411654, 0.229641512, -0.0548514128, 0.0051691518, -0.0591857955, 0.0377827175, 0.2939595878, -0.0685256049, -0.2895757854, 0.407875061, 0.0392592028, 0.084168233, -0.0276337974, 0.1937460154, 0.1773459613, 0.2105839252, 0.0639338642, 0.2741822898, -0.0148837138, 0.2087214142, -0.195456177, 0.557248354, 0.0293753464, 0.3240505159, 0.1208347678, 0.148756206, 0.3702490628, 0.1305633932, -0.2189950645, -0.1370786875, 0.3204495311, -0.4587228, 0.0626674443, 0.0123394234, -0.1297932267, 0.3776263595, 0.0716826022, 0.0755119473, -0.0334524736, 0.3119212389, -0.1593657285, -0.042190969, 0.1813624054, 0.4024861157, 0.4014509916, 0.2088322341, 0.0507172868, 0.0758817792, -0.1615392268, -0.0248774402, 0.2082498521, 0.1293462515, -0.1696399748, 0.1535750628, 0.3034210205, 0.2732039392, -0.3061974645, 0.0933934823, -0.2356239706, 0.1195331365, -0.270581305, 0.3616366684, -0.2810101509, -0.2280866951, 0.076141715, -0.1678324938, -0.2615140676, -0.3875222206, 0.089899376, 0.3934392929, -0.086219281, 0.2567750216, 0.0147161586, 0.2445412278, 0.136167407, -0.1996820718, -0.4005717337, -0.2078815252, -0.3476482034, 0.0053976052, 0.2051323503, -0.1568491161, 0.2970358729, -0.0763099566, -0.2066247612, -0.390294075, -0.9079098701, -0.0486286655, -0.123964861, 0.6180298328, 0.3176228106, -0.0916265026, -0.1352719367, -0.2327560335, 0.1665794849, -0.0413150303, -0.4310828745, 0.1568385363, 0.0666227341, 0.1682221591, -0.2003851682, -0.2270279974, -0.1135412008, -0.1458190233, 0.0079398574, -0.1276904047, 0.0849654675, 0.3094039559, 0.1123534068, -0.3165157139, -0.0872011557, 0.1330857426, -0.3335401416, -0.0773374513, 0.0739419162, -0.054162316, -0.2302434891, -0.034139622, -0.0319806486, 0.0831893757, 0.3736632466, -0.4069587886, -0.3791774213, -0.2713731527, -0.0048744264, 0.2311773747, 0.068360962, 0.2319667786, 0.1899949759, 0.0391035639, -0.2794680893, -0.4342857301, -0.0886206329, -0.2365958691, 0.1095489264, 0.1482250243, 0.6309939027, 0.0345636867, 0.4764270186, 0.2947264612, 0.0489611253, 0.1398259848, 0.1815548688, 0.4972691238, -0.3258462548, -0.4095653892, -0.0467088632, -0.0461938493, 0.0505124666, -0.1531914324, 0.1795819253, -0.1120608747, -0.3487883806, 0.000088976, -0.2515632212, -0.2498103678, -0.2386271805, -0.0136443963, 0.2690052986, 0.3906219602, 0.1407706589, -0.3225954771, -0.1763848662, -0.0081372689, 0.4007481039, 0.1035773978, 0.2502198517, -0.1815419495, -0.0471423045, -0.4509257674, 0.492559284, 0.2151459008, 0.2648919821, -0.1177540421, -0.1629662067, -0.3294481337, -0.0492410697, 0.5928120017, -0.3631767035, 0.0443488397, 0.1019544229, -0.2081836015, -0.382881999, 0.0511292815, 0.0076627661, 0.3649113178, 0.0543546379, 0.3508075774, -0.0821149051, -0.0730158612, -0.0869157314, 0.2223753035, -0.1245945767, 0.0196017139, -0.2743616104, -0.2049434334, -0.143308565, 0.0314200111, -0.1528896391, 0.1650674194, -0.1800080687, -0.0685375854, -0.1131430715, -0.0563930348, 0.1153809577, 0.1347035617, 0.2945029438, -0.1000063792, 0.1187398955, 0.1441811323, 0.2405287623, 0.04236985, 0.458391726, -0.2755981982, -0.2780961096, -0.0670714304, 0.1208044589, -0.114640221, 0.3437377512, -0.2040164918, -0.0173406545, -0.0444572084, -0.1020425931, -0.0212400388, -0.1411033124, -0.001939329, 0.3703025281, -0.204925105, -0.2889373302, 0.2329640687, 0.2390516698, -0.2043491751, 0.436775893, 0.3422557414, -0.2809350789, 0.1687894613, -0.1999594271, 0.7136852741, 0.1521688104, -0.0298533011, 0.0877994671, -0.1695175022, 0.4524547458, 0.3125461042, 0.1559776068, -0.0667682663, -0.2370487005, -0.0655061752, -0.0347471349, 0.1580221951, -0.1110610664, -0.2036339194, 0.5631492734, -0.0592185557, -0.0353867561, 0.1755868793, -0.1173290387, -0.2023077309, 0.0190884974, -0.4372626245, 0.099125281, -0.0213232394, 0.2521654963, 0.0010581244, -0.0767222121, 0.0552208163, -0.3087654114, -0.2637814581, -0.0523921177, -0.3992073536, -0.0659277439, 0.2081235945, -0.433280319, 0.0089732604, 0.0526266396, 0.2566778362, -0.0081807002, -0.0373007692, -0.0075372811, 0.0702684447, 0.4977722168, 0.2345933914, 0.0250330679, 0.2863307297, 0.0890943483, 0.1867841035, 0.0195984095, -0.1420115829, -0.3608390987, -0.0186531637, 0.0038103643, 0.1180328727, -0.1588664055, 0.0288226064, -0.2428553104, 0.0213073175, -0.364861697, 0.0650937036, -0.0898337811, -0.0098389015, 0.0943212733, -0.0165627208, -0.226817742, -0.0053528175, 0.6357886791, -0.1438153237, -0.4367529452, 0.127720207, -0.0055662361, -0.2235843986, 0.0353587158, -0.2044414431, 0.0274193734, -0.2750842869, 0.2978782654, -0.2511248887, -0.1071279123, 0.2691295445, 0.3227922022, 0.1886078864, 0.2146122009, -0.1516674459, -0.3945676982, -0.1370823681, 0.2854580283, 0.0442744903, 0.0549807698, -0.0311486106, -0.3236714602, -0.1444216073, -0.2066645175, -0.2257885635, 0.0087526664, 0.3313151598, 0.0712086409, 0.1904872656, 0.2205638587, 0.1548970491, -0.1995647997, -0.0134116681, 0.0725863725, -0.203820318, -0.102092959, -0.093345888, 0.0935418084, -0.0911601558, -0.2648990452, -0.1546195447, -0.0057543651, 0.0614032373, -0.1646934003, 0.4182681739, 0.3214158118, -0.1182498485, -0.0536907464, -0.0327779986, 0.0472252741, 0.3035388887, 0.1383125186, 0.0185656752, 0.0326717421, 0.0427048579, 0.1994483471, -0.1875816137, 0.014096451, 0.082016468, 0.0423960686, -0.2510475516, 0.0270903334, 0.3569348454, -0.295296222, -0.0216397811, 0.5987740755, 0.3562681079, 0.2437597811, -0.1398067921, 0.1138302758, -0.0777392983, 0.1533572823, -0.2739046812, -0.3326784968, 0.205778718, 0.2732258439, 0.0609572381, 0.1860822588, -0.0021066871, 0.0291597173, 0.6171163917, 0.2176484168, 0.4478169084, -0.1253162473, 0.3508082032, 0.5271652937, 0.2326287627, 0.1843764484, 0.241720289, 0.0737254471, 0.0160929821, 0.5080396533, -0.0660088882, 0.2586891651, 0.2197473645, 0.1287705451, -0.0355183855, -0.4662743509, -0.1656748652, 0.0283220075, -0.0797490031, 0.2506761551, 0.1661577374, 0.0856602341, -0.2232845426, -0.3345984221, 0.0114881797, 0.024897946, -0.193626374, -0.2161095738, 0.1446396858, -0.3639173806, -0.0571490377, 0.013486567, -0.1208442077, 0.0703997388, 0.4529311359, -0.2469489723, -0.128362909, -0.4731904268, -0.3793772757, 0.0500456095, 0.1747638434, -0.0140105868, 0.4047631919, 0.258780688, -0.2298548669, 0.2219883502, 0.2503442466, 0.4856500924, 0.2468240112, 0.027692223, 0.0133466832, -0.1420494765, -0.0540064909, -0.0907230228, 0.3356420696, -0.0870835707, 0.0305686034, 0.1879348457, 0.1134100109, 0.0007339246, 0.2053903639, -0.0408540145, 0.3989400268, -0.4661819339, 0.0895344913, -0.2369527221, 0.2848792076, 0.0150147714, 0.1000138745, -0.2490254641, -0.1181152612, 0.171215117, 0.2318110913, 0.2039028108, -0.1064854339, 0.0748107806, 0.1348544508, 0.0739088506, 0.4687882364, -0.0930132717, -0.0892460048, -0.1464888304, -0.653509438, -0.0558623448, 0.1423008889, 0.1280672401, -0.0635151789, 0.0375300944, 0.0490150824, 0.1846857667, 0.0434734374, -0.1836016178, 0.1054587811, -0.2515150607, -0.2000013739, -0.1759469211, 0.2301196903, -0.2421481013, 0.0548487157, -0.2659107745, 0.0627719611, -0.0416926146, 0.0269530844, -0.005927782, -0.0628840253, 0.0675144792, 0.3473338187, -0.1370735615, 0.3493901491, 0.2663169801, 0.03349353, -0.0034476253, -0.2782979906, -0.1931354105, -0.2683142722, 0.0700851008, -0.2921240628, 0.4918605983, -0.4018596709, -0.3019634485, -0.1804217845, 0.2724736333, 0.1233783066, -0.1268284917, -0.4767788649, 0.1658581197, -0.0587571412, 0.0838124454, 0.0044377646, 0.508733511, 0.059986867, 0.3379509747, -0.2266310304, -0.3412219286, 0.5358169079, -0.4137625992, -0.2617653012, -0.1319275051, -0.0639740229, 0.6073155403, -0.4836450815, -0.3043731153, -0.2037671804, 0.2719914615, -0.1200053543, -0.1490247399, 0.1555725485, -0.2652980089, 0.1745556146, -0.1892018616, -0.0870604515, 0.4393822849, -0.0882679075, 0.2773536742, -0.1299419552 ]
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.3049958348, 0.1243880838, -0.0465583764, 0.2368971109, 0.1517290324, -0.0666598156, -0.0069413707, 0.3285393715, 0.1737383604, 0.0293814819, -0.2313861847, 0.3581927419, -0.1503304988, 0.2527370155, -0.2977862358, -0.1378120482, 0.0444693454, 0.0321247876, -0.0614953265, 0.166412577, -0.1239175051, 0.4988580644, -0.1957765073, 0.0070795678, 0.2221652865, 0.0513210297, 0.1091236398, 0.138566196, 0.0798620358, -0.3392693698, 0.5981172919, 0.1064069718, -0.0348691642, 0.498096019, -0.0001213098, 0.099867776, 0.4398066998, -0.1073976383, -0.4579497874, -0.3686879575, -0.192854017, 0.1319934726, 0.2131137848, 0.0811629742, -0.0715122968, 0.1143416911, -0.303493619, -0.346046567, 0.2488765419, 0.1989328116, 0.2267285585, 0.2136144787, 0.2657418847, 0.066587165, 0.170179069, 0.0826525018, 0.0259718653, -0.0490864292, 0.2940285802, 0.014261202, 0.043685697, 0.4806104004, -0.3283523321, -0.2146463245, 0.3046185374, -0.2982533276, 0.1030709222, -0.3957037926, 0.2999309897, 0.0781370997, 0.1462642252, -0.255518198, -0.5773367882, -0.3483263254, -0.5121472478, -0.2868291736, 0.4164735079, -0.216358915, -0.2009968162, 0.2200830877, -0.3342647851, -0.0270038545, 0.0934983194, 0.0535101071, -0.0584819205, 0.2941842079, -0.1318320185, -0.0048626242, 0.0149830757, -0.132900551, 0.1924084276, -0.2750048339, -0.1968749017, 0.1725800484, -0.0155595224, -0.0546131916, 0.0954222009, 0.3323281705, 0.140570581, 0.0356287211, 0.0192098524, 0.0845401734, -0.0409641638, 0.0536773168, 0.1373275816, 0.475378722, 0.4901195765, 0.2467906624, 0.2727875113, 0.2854887545, -0.0078853024, -0.0013800253, 0.5281852484, -0.1666412055, 0.0747071281, 0.1517307162, 0.196695298, -0.4048683643, -0.3602132797, 0.1689626127, -0.0769995078, -0.1250401586, 0.2207264006, 0.0534940958, 0.1005648673, 0.2142349631, 0.1320811808, 0.0338568501, -0.1964725256, 0.0612344779, -0.1725096703, -0.1739457697, 0.0011616903, -0.1112991124, -0.0473052748, -0.89977777, 0.1747701168, 0.0482602492, 0.0063488153, 0.1058098748, -0.0697732121, 0.207434997, 0.1730166823, 0.5229284167, -0.2213587761, 0.0839003325, 0.1671907902, -0.548327744, -0.1386865377, 0.0125284484, -0.2415378094, -0.1112066656, 0.2085879147, 0.1735862345, -0.3296715915, 0.0126515068, -0.17029953, 0.4515431225, 0.2592140436, -0.5466870666, -0.0779574588, -0.213380143, -0.4382343888, -0.1997140199, 0.0971902013, 0.4131370485, -0.5942543149, -0.3216674924, 0.0216870401, 0.0319067985, 0.0399160981, -0.1229341999, -0.063439101, -0.2444722205, -0.1077689156, -0.1384182572, 0.3606542647, -0.3195546865, -0.733892858, 0.1537256837, 0.2360213548, 0.5342661738, -0.0709591061, -0.1374839246, 0.2813950479, -0.2578290701, 0.1459920853, 0.0848445743, -0.1649033576, -0.0079940017, -0.3409692049, -0.2346946597, 0.2238697708, -0.1502910852, 0.0904174298, 0.3348585963, 0.0790057704, -0.2542206049, 0.0502917804, 0.0350500681, 0.1049243882, 0.1990925223, 0.2453232259, 0.2237652242, 0.2863062918, -0.4365186989, -0.2801407278, 0.2506181598, 0.2141302824, -0.0600011088, -0.1524066925, -0.1982273012, -0.2678262889, -0.0884182155, -0.1589775681, -0.3044096231, 0.0788738504, 0.0225765873, 0.3843636513, -0.0385034606, -0.1145259663, 0.6218649745, 0.3084535897, 0.0944804996, -0.5049411654, 0.229641512, -0.0548514128, 0.0051691518, -0.0591857955, 0.0377827175, 0.2939595878, -0.0685256049, -0.2895757854, 0.407875061, 0.0392592028, 0.084168233, -0.0276337974, 0.1937460154, 0.1773459613, 0.2105839252, 0.0639338642, 0.2741822898, -0.0148837138, 0.2087214142, -0.195456177, 0.557248354, 0.0293753464, 0.3240505159, 0.1208347678, 0.148756206, 0.3702490628, 0.1305633932, -0.2189950645, -0.1370786875, 0.3204495311, -0.4587228, 0.0626674443, 0.0123394234, -0.1297932267, 0.3776263595, 0.0716826022, 0.0755119473, -0.0334524736, 0.3119212389, -0.1593657285, -0.042190969, 0.1813624054, 0.4024861157, 0.4014509916, 0.2088322341, 0.0507172868, 0.0758817792, -0.1615392268, -0.0248774402, 0.2082498521, 0.1293462515, -0.1696399748, 0.1535750628, 0.3034210205, 0.2732039392, -0.3061974645, 0.0933934823, -0.2356239706, 0.1195331365, -0.270581305, 0.3616366684, -0.2810101509, -0.2280866951, 0.076141715, -0.1678324938, -0.2615140676, -0.3875222206, 0.089899376, 0.3934392929, -0.086219281, 0.2567750216, 0.0147161586, 0.2445412278, 0.136167407, -0.1996820718, -0.4005717337, -0.2078815252, -0.3476482034, 0.0053976052, 0.2051323503, -0.1568491161, 0.2970358729, -0.0763099566, -0.2066247612, -0.390294075, -0.9079098701, -0.0486286655, -0.123964861, 0.6180298328, 0.3176228106, -0.0916265026, -0.1352719367, -0.2327560335, 0.1665794849, -0.0413150303, -0.4310828745, 0.1568385363, 0.0666227341, 0.1682221591, -0.2003851682, -0.2270279974, -0.1135412008, -0.1458190233, 0.0079398574, -0.1276904047, 0.0849654675, 0.3094039559, 0.1123534068, -0.3165157139, -0.0872011557, 0.1330857426, -0.3335401416, -0.0773374513, 0.0739419162, -0.054162316, -0.2302434891, -0.034139622, -0.0319806486, 0.0831893757, 0.3736632466, -0.4069587886, -0.3791774213, -0.2713731527, -0.0048744264, 0.2311773747, 0.068360962, 0.2319667786, 0.1899949759, 0.0391035639, -0.2794680893, -0.4342857301, -0.0886206329, -0.2365958691, 0.1095489264, 0.1482250243, 0.6309939027, 0.0345636867, 0.4764270186, 0.2947264612, 0.0489611253, 0.1398259848, 0.1815548688, 0.4972691238, -0.3258462548, -0.4095653892, -0.0467088632, -0.0461938493, 0.0505124666, -0.1531914324, 0.1795819253, -0.1120608747, -0.3487883806, 0.000088976, -0.2515632212, -0.2498103678, -0.2386271805, -0.0136443963, 0.2690052986, 0.3906219602, 0.1407706589, -0.3225954771, -0.1763848662, -0.0081372689, 0.4007481039, 0.1035773978, 0.2502198517, -0.1815419495, -0.0471423045, -0.4509257674, 0.492559284, 0.2151459008, 0.2648919821, -0.1177540421, -0.1629662067, -0.3294481337, -0.0492410697, 0.5928120017, -0.3631767035, 0.0443488397, 0.1019544229, -0.2081836015, -0.382881999, 0.0511292815, 0.0076627661, 0.3649113178, 0.0543546379, 0.3508075774, -0.0821149051, -0.0730158612, -0.0869157314, 0.2223753035, -0.1245945767, 0.0196017139, -0.2743616104, -0.2049434334, -0.143308565, 0.0314200111, -0.1528896391, 0.1650674194, -0.1800080687, -0.0685375854, -0.1131430715, -0.0563930348, 0.1153809577, 0.1347035617, 0.2945029438, -0.1000063792, 0.1187398955, 0.1441811323, 0.2405287623, 0.04236985, 0.458391726, -0.2755981982, -0.2780961096, -0.0670714304, 0.1208044589, -0.114640221, 0.3437377512, -0.2040164918, -0.0173406545, -0.0444572084, -0.1020425931, -0.0212400388, -0.1411033124, -0.001939329, 0.3703025281, -0.204925105, -0.2889373302, 0.2329640687, 0.2390516698, -0.2043491751, 0.436775893, 0.3422557414, -0.2809350789, 0.1687894613, -0.1999594271, 0.7136852741, 0.1521688104, -0.0298533011, 0.0877994671, -0.1695175022, 0.4524547458, 0.3125461042, 0.1559776068, -0.0667682663, -0.2370487005, -0.0655061752, -0.0347471349, 0.1580221951, -0.1110610664, -0.2036339194, 0.5631492734, -0.0592185557, -0.0353867561, 0.1755868793, -0.1173290387, -0.2023077309, 0.0190884974, -0.4372626245, 0.099125281, -0.0213232394, 0.2521654963, 0.0010581244, -0.0767222121, 0.0552208163, -0.3087654114, -0.2637814581, -0.0523921177, -0.3992073536, -0.0659277439, 0.2081235945, -0.433280319, 0.0089732604, 0.0526266396, 0.2566778362, -0.0081807002, -0.0373007692, -0.0075372811, 0.0702684447, 0.4977722168, 0.2345933914, 0.0250330679, 0.2863307297, 0.0890943483, 0.1867841035, 0.0195984095, -0.1420115829, -0.3608390987, -0.0186531637, 0.0038103643, 0.1180328727, -0.1588664055, 0.0288226064, -0.2428553104, 0.0213073175, -0.364861697, 0.0650937036, -0.0898337811, -0.0098389015, 0.0943212733, -0.0165627208, -0.226817742, -0.0053528175, 0.6357886791, -0.1438153237, -0.4367529452, 0.127720207, -0.0055662361, -0.2235843986, 0.0353587158, -0.2044414431, 0.0274193734, -0.2750842869, 0.2978782654, -0.2511248887, -0.1071279123, 0.2691295445, 0.3227922022, 0.1886078864, 0.2146122009, -0.1516674459, -0.3945676982, -0.1370823681, 0.2854580283, 0.0442744903, 0.0549807698, -0.0311486106, -0.3236714602, -0.1444216073, -0.2066645175, -0.2257885635, 0.0087526664, 0.3313151598, 0.0712086409, 0.1904872656, 0.2205638587, 0.1548970491, -0.1995647997, -0.0134116681, 0.0725863725, -0.203820318, -0.102092959, -0.093345888, 0.0935418084, -0.0911601558, -0.2648990452, -0.1546195447, -0.0057543651, 0.0614032373, -0.1646934003, 0.4182681739, 0.3214158118, -0.1182498485, -0.0536907464, -0.0327779986, 0.0472252741, 0.3035388887, 0.1383125186, 0.0185656752, 0.0326717421, 0.0427048579, 0.1994483471, -0.1875816137, 0.014096451, 0.082016468, 0.0423960686, -0.2510475516, 0.0270903334, 0.3569348454, -0.295296222, -0.0216397811, 0.5987740755, 0.3562681079, 0.2437597811, -0.1398067921, 0.1138302758, -0.0777392983, 0.1533572823, -0.2739046812, -0.3326784968, 0.205778718, 0.2732258439, 0.0609572381, 0.1860822588, -0.0021066871, 0.0291597173, 0.6171163917, 0.2176484168, 0.4478169084, -0.1253162473, 0.3508082032, 0.5271652937, 0.2326287627, 0.1843764484, 0.241720289, 0.0737254471, 0.0160929821, 0.5080396533, -0.0660088882, 0.2586891651, 0.2197473645, 0.1287705451, -0.0355183855, -0.4662743509, -0.1656748652, 0.0283220075, -0.0797490031, 0.2506761551, 0.1661577374, 0.0856602341, -0.2232845426, -0.3345984221, 0.0114881797, 0.024897946, -0.193626374, -0.2161095738, 0.1446396858, -0.3639173806, -0.0571490377, 0.013486567, -0.1208442077, 0.0703997388, 0.4529311359, -0.2469489723, -0.128362909, -0.4731904268, -0.3793772757, 0.0500456095, 0.1747638434, -0.0140105868, 0.4047631919, 0.258780688, -0.2298548669, 0.2219883502, 0.2503442466, 0.4856500924, 0.2468240112, 0.027692223, 0.0133466832, -0.1420494765, -0.0540064909, -0.0907230228, 0.3356420696, -0.0870835707, 0.0305686034, 0.1879348457, 0.1134100109, 0.0007339246, 0.2053903639, -0.0408540145, 0.3989400268, -0.4661819339, 0.0895344913, -0.2369527221, 0.2848792076, 0.0150147714, 0.1000138745, -0.2490254641, -0.1181152612, 0.171215117, 0.2318110913, 0.2039028108, -0.1064854339, 0.0748107806, 0.1348544508, 0.0739088506, 0.4687882364, -0.0930132717, -0.0892460048, -0.1464888304, -0.653509438, -0.0558623448, 0.1423008889, 0.1280672401, -0.0635151789, 0.0375300944, 0.0490150824, 0.1846857667, 0.0434734374, -0.1836016178, 0.1054587811, -0.2515150607, -0.2000013739, -0.1759469211, 0.2301196903, -0.2421481013, 0.0548487157, -0.2659107745, 0.0627719611, -0.0416926146, 0.0269530844, -0.005927782, -0.0628840253, 0.0675144792, 0.3473338187, -0.1370735615, 0.3493901491, 0.2663169801, 0.03349353, -0.0034476253, -0.2782979906, -0.1931354105, -0.2683142722, 0.0700851008, -0.2921240628, 0.4918605983, -0.4018596709, -0.3019634485, -0.1804217845, 0.2724736333, 0.1233783066, -0.1268284917, -0.4767788649, 0.1658581197, -0.0587571412, 0.0838124454, 0.0044377646, 0.508733511, 0.059986867, 0.3379509747, -0.2266310304, -0.3412219286, 0.5358169079, -0.4137625992, -0.2617653012, -0.1319275051, -0.0639740229, 0.6073155403, -0.4836450815, -0.3043731153, -0.2037671804, 0.2719914615, -0.1200053543, -0.1490247399, 0.1555725485, -0.2652980089, 0.1745556146, -0.1892018616, -0.0870604515, 0.4393822849, -0.0882679075, 0.2773536742, -0.1299419552 ]
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.3049958348, 0.1243880838, -0.0465583764, 0.2368971109, 0.1517290324, -0.0666598156, -0.0069413707, 0.3285393715, 0.1737383604, 0.0293814819, -0.2313861847, 0.3581927419, -0.1503304988, 0.2527370155, -0.2977862358, -0.1378120482, 0.0444693454, 0.0321247876, -0.0614953265, 0.166412577, -0.1239175051, 0.4988580644, -0.1957765073, 0.0070795678, 0.2221652865, 0.0513210297, 0.1091236398, 0.138566196, 0.0798620358, -0.3392693698, 0.5981172919, 0.1064069718, -0.0348691642, 0.498096019, -0.0001213098, 0.099867776, 0.4398066998, -0.1073976383, -0.4579497874, -0.3686879575, -0.192854017, 0.1319934726, 0.2131137848, 0.0811629742, -0.0715122968, 0.1143416911, -0.303493619, -0.346046567, 0.2488765419, 0.1989328116, 0.2267285585, 0.2136144787, 0.2657418847, 0.066587165, 0.170179069, 0.0826525018, 0.0259718653, -0.0490864292, 0.2940285802, 0.014261202, 0.043685697, 0.4806104004, -0.3283523321, -0.2146463245, 0.3046185374, -0.2982533276, 0.1030709222, -0.3957037926, 0.2999309897, 0.0781370997, 0.1462642252, -0.255518198, -0.5773367882, -0.3483263254, -0.5121472478, -0.2868291736, 0.4164735079, -0.216358915, -0.2009968162, 0.2200830877, -0.3342647851, -0.0270038545, 0.0934983194, 0.0535101071, -0.0584819205, 0.2941842079, -0.1318320185, -0.0048626242, 0.0149830757, -0.132900551, 0.1924084276, -0.2750048339, -0.1968749017, 0.1725800484, -0.0155595224, -0.0546131916, 0.0954222009, 0.3323281705, 0.140570581, 0.0356287211, 0.0192098524, 0.0845401734, -0.0409641638, 0.0536773168, 0.1373275816, 0.475378722, 0.4901195765, 0.2467906624, 0.2727875113, 0.2854887545, -0.0078853024, -0.0013800253, 0.5281852484, -0.1666412055, 0.0747071281, 0.1517307162, 0.196695298, -0.4048683643, -0.3602132797, 0.1689626127, -0.0769995078, -0.1250401586, 0.2207264006, 0.0534940958, 0.1005648673, 0.2142349631, 0.1320811808, 0.0338568501, -0.1964725256, 0.0612344779, -0.1725096703, -0.1739457697, 0.0011616903, -0.1112991124, -0.0473052748, -0.89977777, 0.1747701168, 0.0482602492, 0.0063488153, 0.1058098748, -0.0697732121, 0.207434997, 0.1730166823, 0.5229284167, -0.2213587761, 0.0839003325, 0.1671907902, -0.548327744, -0.1386865377, 0.0125284484, -0.2415378094, -0.1112066656, 0.2085879147, 0.1735862345, -0.3296715915, 0.0126515068, -0.17029953, 0.4515431225, 0.2592140436, -0.5466870666, -0.0779574588, -0.213380143, -0.4382343888, -0.1997140199, 0.0971902013, 0.4131370485, -0.5942543149, -0.3216674924, 0.0216870401, 0.0319067985, 0.0399160981, -0.1229341999, -0.063439101, -0.2444722205, -0.1077689156, -0.1384182572, 0.3606542647, -0.3195546865, -0.733892858, 0.1537256837, 0.2360213548, 0.5342661738, -0.0709591061, -0.1374839246, 0.2813950479, -0.2578290701, 0.1459920853, 0.0848445743, -0.1649033576, -0.0079940017, -0.3409692049, -0.2346946597, 0.2238697708, -0.1502910852, 0.0904174298, 0.3348585963, 0.0790057704, -0.2542206049, 0.0502917804, 0.0350500681, 0.1049243882, 0.1990925223, 0.2453232259, 0.2237652242, 0.2863062918, -0.4365186989, -0.2801407278, 0.2506181598, 0.2141302824, -0.0600011088, -0.1524066925, -0.1982273012, -0.2678262889, -0.0884182155, -0.1589775681, -0.3044096231, 0.0788738504, 0.0225765873, 0.3843636513, -0.0385034606, -0.1145259663, 0.6218649745, 0.3084535897, 0.0944804996, -0.5049411654, 0.229641512, -0.0548514128, 0.0051691518, -0.0591857955, 0.0377827175, 0.2939595878, -0.0685256049, -0.2895757854, 0.407875061, 0.0392592028, 0.084168233, -0.0276337974, 0.1937460154, 0.1773459613, 0.2105839252, 0.0639338642, 0.2741822898, -0.0148837138, 0.2087214142, -0.195456177, 0.557248354, 0.0293753464, 0.3240505159, 0.1208347678, 0.148756206, 0.3702490628, 0.1305633932, -0.2189950645, -0.1370786875, 0.3204495311, -0.4587228, 0.0626674443, 0.0123394234, -0.1297932267, 0.3776263595, 0.0716826022, 0.0755119473, -0.0334524736, 0.3119212389, -0.1593657285, -0.042190969, 0.1813624054, 0.4024861157, 0.4014509916, 0.2088322341, 0.0507172868, 0.0758817792, -0.1615392268, -0.0248774402, 0.2082498521, 0.1293462515, -0.1696399748, 0.1535750628, 0.3034210205, 0.2732039392, -0.3061974645, 0.0933934823, -0.2356239706, 0.1195331365, -0.270581305, 0.3616366684, -0.2810101509, -0.2280866951, 0.076141715, -0.1678324938, -0.2615140676, -0.3875222206, 0.089899376, 0.3934392929, -0.086219281, 0.2567750216, 0.0147161586, 0.2445412278, 0.136167407, -0.1996820718, -0.4005717337, -0.2078815252, -0.3476482034, 0.0053976052, 0.2051323503, -0.1568491161, 0.2970358729, -0.0763099566, -0.2066247612, -0.390294075, -0.9079098701, -0.0486286655, -0.123964861, 0.6180298328, 0.3176228106, -0.0916265026, -0.1352719367, -0.2327560335, 0.1665794849, -0.0413150303, -0.4310828745, 0.1568385363, 0.0666227341, 0.1682221591, -0.2003851682, -0.2270279974, -0.1135412008, -0.1458190233, 0.0079398574, -0.1276904047, 0.0849654675, 0.3094039559, 0.1123534068, -0.3165157139, -0.0872011557, 0.1330857426, -0.3335401416, -0.0773374513, 0.0739419162, -0.054162316, -0.2302434891, -0.034139622, -0.0319806486, 0.0831893757, 0.3736632466, -0.4069587886, -0.3791774213, -0.2713731527, -0.0048744264, 0.2311773747, 0.068360962, 0.2319667786, 0.1899949759, 0.0391035639, -0.2794680893, -0.4342857301, -0.0886206329, -0.2365958691, 0.1095489264, 0.1482250243, 0.6309939027, 0.0345636867, 0.4764270186, 0.2947264612, 0.0489611253, 0.1398259848, 0.1815548688, 0.4972691238, -0.3258462548, -0.4095653892, -0.0467088632, -0.0461938493, 0.0505124666, -0.1531914324, 0.1795819253, -0.1120608747, -0.3487883806, 0.000088976, -0.2515632212, -0.2498103678, -0.2386271805, -0.0136443963, 0.2690052986, 0.3906219602, 0.1407706589, -0.3225954771, -0.1763848662, -0.0081372689, 0.4007481039, 0.1035773978, 0.2502198517, -0.1815419495, -0.0471423045, -0.4509257674, 0.492559284, 0.2151459008, 0.2648919821, -0.1177540421, -0.1629662067, -0.3294481337, -0.0492410697, 0.5928120017, -0.3631767035, 0.0443488397, 0.1019544229, -0.2081836015, -0.382881999, 0.0511292815, 0.0076627661, 0.3649113178, 0.0543546379, 0.3508075774, -0.0821149051, -0.0730158612, -0.0869157314, 0.2223753035, -0.1245945767, 0.0196017139, -0.2743616104, -0.2049434334, -0.143308565, 0.0314200111, -0.1528896391, 0.1650674194, -0.1800080687, -0.0685375854, -0.1131430715, -0.0563930348, 0.1153809577, 0.1347035617, 0.2945029438, -0.1000063792, 0.1187398955, 0.1441811323, 0.2405287623, 0.04236985, 0.458391726, -0.2755981982, -0.2780961096, -0.0670714304, 0.1208044589, -0.114640221, 0.3437377512, -0.2040164918, -0.0173406545, -0.0444572084, -0.1020425931, -0.0212400388, -0.1411033124, -0.001939329, 0.3703025281, -0.204925105, -0.2889373302, 0.2329640687, 0.2390516698, -0.2043491751, 0.436775893, 0.3422557414, -0.2809350789, 0.1687894613, -0.1999594271, 0.7136852741, 0.1521688104, -0.0298533011, 0.0877994671, -0.1695175022, 0.4524547458, 0.3125461042, 0.1559776068, -0.0667682663, -0.2370487005, -0.0655061752, -0.0347471349, 0.1580221951, -0.1110610664, -0.2036339194, 0.5631492734, -0.0592185557, -0.0353867561, 0.1755868793, -0.1173290387, -0.2023077309, 0.0190884974, -0.4372626245, 0.099125281, -0.0213232394, 0.2521654963, 0.0010581244, -0.0767222121, 0.0552208163, -0.3087654114, -0.2637814581, -0.0523921177, -0.3992073536, -0.0659277439, 0.2081235945, -0.433280319, 0.0089732604, 0.0526266396, 0.2566778362, -0.0081807002, -0.0373007692, -0.0075372811, 0.0702684447, 0.4977722168, 0.2345933914, 0.0250330679, 0.2863307297, 0.0890943483, 0.1867841035, 0.0195984095, -0.1420115829, -0.3608390987, -0.0186531637, 0.0038103643, 0.1180328727, -0.1588664055, 0.0288226064, -0.2428553104, 0.0213073175, -0.364861697, 0.0650937036, -0.0898337811, -0.0098389015, 0.0943212733, -0.0165627208, -0.226817742, -0.0053528175, 0.6357886791, -0.1438153237, -0.4367529452, 0.127720207, -0.0055662361, -0.2235843986, 0.0353587158, -0.2044414431, 0.0274193734, -0.2750842869, 0.2978782654, -0.2511248887, -0.1071279123, 0.2691295445, 0.3227922022, 0.1886078864, 0.2146122009, -0.1516674459, -0.3945676982, -0.1370823681, 0.2854580283, 0.0442744903, 0.0549807698, -0.0311486106, -0.3236714602, -0.1444216073, -0.2066645175, -0.2257885635, 0.0087526664, 0.3313151598, 0.0712086409, 0.1904872656, 0.2205638587, 0.1548970491, -0.1995647997, -0.0134116681, 0.0725863725, -0.203820318, -0.102092959, -0.093345888, 0.0935418084, -0.0911601558, -0.2648990452, -0.1546195447, -0.0057543651, 0.0614032373, -0.1646934003, 0.4182681739, 0.3214158118, -0.1182498485, -0.0536907464, -0.0327779986, 0.0472252741, 0.3035388887, 0.1383125186, 0.0185656752, 0.0326717421, 0.0427048579, 0.1994483471, -0.1875816137, 0.014096451, 0.082016468, 0.0423960686, -0.2510475516, 0.0270903334, 0.3569348454, -0.295296222, -0.0216397811, 0.5987740755, 0.3562681079, 0.2437597811, -0.1398067921, 0.1138302758, -0.0777392983, 0.1533572823, -0.2739046812, -0.3326784968, 0.205778718, 0.2732258439, 0.0609572381, 0.1860822588, -0.0021066871, 0.0291597173, 0.6171163917, 0.2176484168, 0.4478169084, -0.1253162473, 0.3508082032, 0.5271652937, 0.2326287627, 0.1843764484, 0.241720289, 0.0737254471, 0.0160929821, 0.5080396533, -0.0660088882, 0.2586891651, 0.2197473645, 0.1287705451, -0.0355183855, -0.4662743509, -0.1656748652, 0.0283220075, -0.0797490031, 0.2506761551, 0.1661577374, 0.0856602341, -0.2232845426, -0.3345984221, 0.0114881797, 0.024897946, -0.193626374, -0.2161095738, 0.1446396858, -0.3639173806, -0.0571490377, 0.013486567, -0.1208442077, 0.0703997388, 0.4529311359, -0.2469489723, -0.128362909, -0.4731904268, -0.3793772757, 0.0500456095, 0.1747638434, -0.0140105868, 0.4047631919, 0.258780688, -0.2298548669, 0.2219883502, 0.2503442466, 0.4856500924, 0.2468240112, 0.027692223, 0.0133466832, -0.1420494765, -0.0540064909, -0.0907230228, 0.3356420696, -0.0870835707, 0.0305686034, 0.1879348457, 0.1134100109, 0.0007339246, 0.2053903639, -0.0408540145, 0.3989400268, -0.4661819339, 0.0895344913, -0.2369527221, 0.2848792076, 0.0150147714, 0.1000138745, -0.2490254641, -0.1181152612, 0.171215117, 0.2318110913, 0.2039028108, -0.1064854339, 0.0748107806, 0.1348544508, 0.0739088506, 0.4687882364, -0.0930132717, -0.0892460048, -0.1464888304, -0.653509438, -0.0558623448, 0.1423008889, 0.1280672401, -0.0635151789, 0.0375300944, 0.0490150824, 0.1846857667, 0.0434734374, -0.1836016178, 0.1054587811, -0.2515150607, -0.2000013739, -0.1759469211, 0.2301196903, -0.2421481013, 0.0548487157, -0.2659107745, 0.0627719611, -0.0416926146, 0.0269530844, -0.005927782, -0.0628840253, 0.0675144792, 0.3473338187, -0.1370735615, 0.3493901491, 0.2663169801, 0.03349353, -0.0034476253, -0.2782979906, -0.1931354105, -0.2683142722, 0.0700851008, -0.2921240628, 0.4918605983, -0.4018596709, -0.3019634485, -0.1804217845, 0.2724736333, 0.1233783066, -0.1268284917, -0.4767788649, 0.1658581197, -0.0587571412, 0.0838124454, 0.0044377646, 0.508733511, 0.059986867, 0.3379509747, -0.2266310304, -0.3412219286, 0.5358169079, -0.4137625992, -0.2617653012, -0.1319275051, -0.0639740229, 0.6073155403, -0.4836450815, -0.3043731153, -0.2037671804, 0.2719914615, -0.1200053543, -0.1490247399, 0.1555725485, -0.2652980089, 0.1745556146, -0.1892018616, -0.0870604515, 0.4393822849, -0.0882679075, 0.2773536742, -0.1299419552 ]
https://github.com/huggingface/datasets/issues/2943
Backwards compatibility broken for cached datasets that use `.filter()`
Definitely works on several manual cases with our dummy datasets, thank you @lhoestq !
## 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
14
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 Definitely works on several manual cases with our dummy datasets, thank you @lhoestq !
[ -0.3049958348, 0.1243880838, -0.0465583764, 0.2368971109, 0.1517290324, -0.0666598156, -0.0069413707, 0.3285393715, 0.1737383604, 0.0293814819, -0.2313861847, 0.3581927419, -0.1503304988, 0.2527370155, -0.2977862358, -0.1378120482, 0.0444693454, 0.0321247876, -0.0614953265, 0.166412577, -0.1239175051, 0.4988580644, -0.1957765073, 0.0070795678, 0.2221652865, 0.0513210297, 0.1091236398, 0.138566196, 0.0798620358, -0.3392693698, 0.5981172919, 0.1064069718, -0.0348691642, 0.498096019, -0.0001213098, 0.099867776, 0.4398066998, -0.1073976383, -0.4579497874, -0.3686879575, -0.192854017, 0.1319934726, 0.2131137848, 0.0811629742, -0.0715122968, 0.1143416911, -0.303493619, -0.346046567, 0.2488765419, 0.1989328116, 0.2267285585, 0.2136144787, 0.2657418847, 0.066587165, 0.170179069, 0.0826525018, 0.0259718653, -0.0490864292, 0.2940285802, 0.014261202, 0.043685697, 0.4806104004, -0.3283523321, -0.2146463245, 0.3046185374, -0.2982533276, 0.1030709222, -0.3957037926, 0.2999309897, 0.0781370997, 0.1462642252, -0.255518198, -0.5773367882, -0.3483263254, -0.5121472478, -0.2868291736, 0.4164735079, -0.216358915, -0.2009968162, 0.2200830877, -0.3342647851, -0.0270038545, 0.0934983194, 0.0535101071, -0.0584819205, 0.2941842079, -0.1318320185, -0.0048626242, 0.0149830757, -0.132900551, 0.1924084276, -0.2750048339, -0.1968749017, 0.1725800484, -0.0155595224, -0.0546131916, 0.0954222009, 0.3323281705, 0.140570581, 0.0356287211, 0.0192098524, 0.0845401734, -0.0409641638, 0.0536773168, 0.1373275816, 0.475378722, 0.4901195765, 0.2467906624, 0.2727875113, 0.2854887545, -0.0078853024, -0.0013800253, 0.5281852484, -0.1666412055, 0.0747071281, 0.1517307162, 0.196695298, -0.4048683643, -0.3602132797, 0.1689626127, -0.0769995078, -0.1250401586, 0.2207264006, 0.0534940958, 0.1005648673, 0.2142349631, 0.1320811808, 0.0338568501, -0.1964725256, 0.0612344779, -0.1725096703, -0.1739457697, 0.0011616903, -0.1112991124, -0.0473052748, -0.89977777, 0.1747701168, 0.0482602492, 0.0063488153, 0.1058098748, -0.0697732121, 0.207434997, 0.1730166823, 0.5229284167, -0.2213587761, 0.0839003325, 0.1671907902, -0.548327744, -0.1386865377, 0.0125284484, -0.2415378094, -0.1112066656, 0.2085879147, 0.1735862345, -0.3296715915, 0.0126515068, -0.17029953, 0.4515431225, 0.2592140436, -0.5466870666, -0.0779574588, -0.213380143, -0.4382343888, -0.1997140199, 0.0971902013, 0.4131370485, -0.5942543149, -0.3216674924, 0.0216870401, 0.0319067985, 0.0399160981, -0.1229341999, -0.063439101, -0.2444722205, -0.1077689156, -0.1384182572, 0.3606542647, -0.3195546865, -0.733892858, 0.1537256837, 0.2360213548, 0.5342661738, -0.0709591061, -0.1374839246, 0.2813950479, -0.2578290701, 0.1459920853, 0.0848445743, -0.1649033576, -0.0079940017, -0.3409692049, -0.2346946597, 0.2238697708, -0.1502910852, 0.0904174298, 0.3348585963, 0.0790057704, -0.2542206049, 0.0502917804, 0.0350500681, 0.1049243882, 0.1990925223, 0.2453232259, 0.2237652242, 0.2863062918, -0.4365186989, -0.2801407278, 0.2506181598, 0.2141302824, -0.0600011088, -0.1524066925, -0.1982273012, -0.2678262889, -0.0884182155, -0.1589775681, -0.3044096231, 0.0788738504, 0.0225765873, 0.3843636513, -0.0385034606, -0.1145259663, 0.6218649745, 0.3084535897, 0.0944804996, -0.5049411654, 0.229641512, -0.0548514128, 0.0051691518, -0.0591857955, 0.0377827175, 0.2939595878, -0.0685256049, -0.2895757854, 0.407875061, 0.0392592028, 0.084168233, -0.0276337974, 0.1937460154, 0.1773459613, 0.2105839252, 0.0639338642, 0.2741822898, -0.0148837138, 0.2087214142, -0.195456177, 0.557248354, 0.0293753464, 0.3240505159, 0.1208347678, 0.148756206, 0.3702490628, 0.1305633932, -0.2189950645, -0.1370786875, 0.3204495311, -0.4587228, 0.0626674443, 0.0123394234, -0.1297932267, 0.3776263595, 0.0716826022, 0.0755119473, -0.0334524736, 0.3119212389, -0.1593657285, -0.042190969, 0.1813624054, 0.4024861157, 0.4014509916, 0.2088322341, 0.0507172868, 0.0758817792, -0.1615392268, -0.0248774402, 0.2082498521, 0.1293462515, -0.1696399748, 0.1535750628, 0.3034210205, 0.2732039392, -0.3061974645, 0.0933934823, -0.2356239706, 0.1195331365, -0.270581305, 0.3616366684, -0.2810101509, -0.2280866951, 0.076141715, -0.1678324938, -0.2615140676, -0.3875222206, 0.089899376, 0.3934392929, -0.086219281, 0.2567750216, 0.0147161586, 0.2445412278, 0.136167407, -0.1996820718, -0.4005717337, -0.2078815252, -0.3476482034, 0.0053976052, 0.2051323503, -0.1568491161, 0.2970358729, -0.0763099566, -0.2066247612, -0.390294075, -0.9079098701, -0.0486286655, -0.123964861, 0.6180298328, 0.3176228106, -0.0916265026, -0.1352719367, -0.2327560335, 0.1665794849, -0.0413150303, -0.4310828745, 0.1568385363, 0.0666227341, 0.1682221591, -0.2003851682, -0.2270279974, -0.1135412008, -0.1458190233, 0.0079398574, -0.1276904047, 0.0849654675, 0.3094039559, 0.1123534068, -0.3165157139, -0.0872011557, 0.1330857426, -0.3335401416, -0.0773374513, 0.0739419162, -0.054162316, -0.2302434891, -0.034139622, -0.0319806486, 0.0831893757, 0.3736632466, -0.4069587886, -0.3791774213, -0.2713731527, -0.0048744264, 0.2311773747, 0.068360962, 0.2319667786, 0.1899949759, 0.0391035639, -0.2794680893, -0.4342857301, -0.0886206329, -0.2365958691, 0.1095489264, 0.1482250243, 0.6309939027, 0.0345636867, 0.4764270186, 0.2947264612, 0.0489611253, 0.1398259848, 0.1815548688, 0.4972691238, -0.3258462548, -0.4095653892, -0.0467088632, -0.0461938493, 0.0505124666, -0.1531914324, 0.1795819253, -0.1120608747, -0.3487883806, 0.000088976, -0.2515632212, -0.2498103678, -0.2386271805, -0.0136443963, 0.2690052986, 0.3906219602, 0.1407706589, -0.3225954771, -0.1763848662, -0.0081372689, 0.4007481039, 0.1035773978, 0.2502198517, -0.1815419495, -0.0471423045, -0.4509257674, 0.492559284, 0.2151459008, 0.2648919821, -0.1177540421, -0.1629662067, -0.3294481337, -0.0492410697, 0.5928120017, -0.3631767035, 0.0443488397, 0.1019544229, -0.2081836015, -0.382881999, 0.0511292815, 0.0076627661, 0.3649113178, 0.0543546379, 0.3508075774, -0.0821149051, -0.0730158612, -0.0869157314, 0.2223753035, -0.1245945767, 0.0196017139, -0.2743616104, -0.2049434334, -0.143308565, 0.0314200111, -0.1528896391, 0.1650674194, -0.1800080687, -0.0685375854, -0.1131430715, -0.0563930348, 0.1153809577, 0.1347035617, 0.2945029438, -0.1000063792, 0.1187398955, 0.1441811323, 0.2405287623, 0.04236985, 0.458391726, -0.2755981982, -0.2780961096, -0.0670714304, 0.1208044589, -0.114640221, 0.3437377512, -0.2040164918, -0.0173406545, -0.0444572084, -0.1020425931, -0.0212400388, -0.1411033124, -0.001939329, 0.3703025281, -0.204925105, -0.2889373302, 0.2329640687, 0.2390516698, -0.2043491751, 0.436775893, 0.3422557414, -0.2809350789, 0.1687894613, -0.1999594271, 0.7136852741, 0.1521688104, -0.0298533011, 0.0877994671, -0.1695175022, 0.4524547458, 0.3125461042, 0.1559776068, -0.0667682663, -0.2370487005, -0.0655061752, -0.0347471349, 0.1580221951, -0.1110610664, -0.2036339194, 0.5631492734, -0.0592185557, -0.0353867561, 0.1755868793, -0.1173290387, -0.2023077309, 0.0190884974, -0.4372626245, 0.099125281, -0.0213232394, 0.2521654963, 0.0010581244, -0.0767222121, 0.0552208163, -0.3087654114, -0.2637814581, -0.0523921177, -0.3992073536, -0.0659277439, 0.2081235945, -0.433280319, 0.0089732604, 0.0526266396, 0.2566778362, -0.0081807002, -0.0373007692, -0.0075372811, 0.0702684447, 0.4977722168, 0.2345933914, 0.0250330679, 0.2863307297, 0.0890943483, 0.1867841035, 0.0195984095, -0.1420115829, -0.3608390987, -0.0186531637, 0.0038103643, 0.1180328727, -0.1588664055, 0.0288226064, -0.2428553104, 0.0213073175, -0.364861697, 0.0650937036, -0.0898337811, -0.0098389015, 0.0943212733, -0.0165627208, -0.226817742, -0.0053528175, 0.6357886791, -0.1438153237, -0.4367529452, 0.127720207, -0.0055662361, -0.2235843986, 0.0353587158, -0.2044414431, 0.0274193734, -0.2750842869, 0.2978782654, -0.2511248887, -0.1071279123, 0.2691295445, 0.3227922022, 0.1886078864, 0.2146122009, -0.1516674459, -0.3945676982, -0.1370823681, 0.2854580283, 0.0442744903, 0.0549807698, -0.0311486106, -0.3236714602, -0.1444216073, -0.2066645175, -0.2257885635, 0.0087526664, 0.3313151598, 0.0712086409, 0.1904872656, 0.2205638587, 0.1548970491, -0.1995647997, -0.0134116681, 0.0725863725, -0.203820318, -0.102092959, -0.093345888, 0.0935418084, -0.0911601558, -0.2648990452, -0.1546195447, -0.0057543651, 0.0614032373, -0.1646934003, 0.4182681739, 0.3214158118, -0.1182498485, -0.0536907464, -0.0327779986, 0.0472252741, 0.3035388887, 0.1383125186, 0.0185656752, 0.0326717421, 0.0427048579, 0.1994483471, -0.1875816137, 0.014096451, 0.082016468, 0.0423960686, -0.2510475516, 0.0270903334, 0.3569348454, -0.295296222, -0.0216397811, 0.5987740755, 0.3562681079, 0.2437597811, -0.1398067921, 0.1138302758, -0.0777392983, 0.1533572823, -0.2739046812, -0.3326784968, 0.205778718, 0.2732258439, 0.0609572381, 0.1860822588, -0.0021066871, 0.0291597173, 0.6171163917, 0.2176484168, 0.4478169084, -0.1253162473, 0.3508082032, 0.5271652937, 0.2326287627, 0.1843764484, 0.241720289, 0.0737254471, 0.0160929821, 0.5080396533, -0.0660088882, 0.2586891651, 0.2197473645, 0.1287705451, -0.0355183855, -0.4662743509, -0.1656748652, 0.0283220075, -0.0797490031, 0.2506761551, 0.1661577374, 0.0856602341, -0.2232845426, -0.3345984221, 0.0114881797, 0.024897946, -0.193626374, -0.2161095738, 0.1446396858, -0.3639173806, -0.0571490377, 0.013486567, -0.1208442077, 0.0703997388, 0.4529311359, -0.2469489723, -0.128362909, -0.4731904268, -0.3793772757, 0.0500456095, 0.1747638434, -0.0140105868, 0.4047631919, 0.258780688, -0.2298548669, 0.2219883502, 0.2503442466, 0.4856500924, 0.2468240112, 0.027692223, 0.0133466832, -0.1420494765, -0.0540064909, -0.0907230228, 0.3356420696, -0.0870835707, 0.0305686034, 0.1879348457, 0.1134100109, 0.0007339246, 0.2053903639, -0.0408540145, 0.3989400268, -0.4661819339, 0.0895344913, -0.2369527221, 0.2848792076, 0.0150147714, 0.1000138745, -0.2490254641, -0.1181152612, 0.171215117, 0.2318110913, 0.2039028108, -0.1064854339, 0.0748107806, 0.1348544508, 0.0739088506, 0.4687882364, -0.0930132717, -0.0892460048, -0.1464888304, -0.653509438, -0.0558623448, 0.1423008889, 0.1280672401, -0.0635151789, 0.0375300944, 0.0490150824, 0.1846857667, 0.0434734374, -0.1836016178, 0.1054587811, -0.2515150607, -0.2000013739, -0.1759469211, 0.2301196903, -0.2421481013, 0.0548487157, -0.2659107745, 0.0627719611, -0.0416926146, 0.0269530844, -0.005927782, -0.0628840253, 0.0675144792, 0.3473338187, -0.1370735615, 0.3493901491, 0.2663169801, 0.03349353, -0.0034476253, -0.2782979906, -0.1931354105, -0.2683142722, 0.0700851008, -0.2921240628, 0.4918605983, -0.4018596709, -0.3019634485, -0.1804217845, 0.2724736333, 0.1233783066, -0.1268284917, -0.4767788649, 0.1658581197, -0.0587571412, 0.0838124454, 0.0044377646, 0.508733511, 0.059986867, 0.3379509747, -0.2266310304, -0.3412219286, 0.5358169079, -0.4137625992, -0.2617653012, -0.1319275051, -0.0639740229, 0.6073155403, -0.4836450815, -0.3043731153, -0.2037671804, 0.2719914615, -0.1200053543, -0.1490247399, 0.1555725485, -0.2652980089, 0.1745556146, -0.1892018616, -0.0870604515, 0.4393822849, -0.0882679075, 0.2773536742, -0.1299419552 ]
https://github.com/huggingface/datasets/issues/2943
Backwards compatibility broken for cached datasets that use `.filter()`
Fixed by #2947.
## 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
3
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 Fixed by #2947.
[ -0.3049958348, 0.1243880838, -0.0465583764, 0.2368971109, 0.1517290324, -0.0666598156, -0.0069413707, 0.3285393715, 0.1737383604, 0.0293814819, -0.2313861847, 0.3581927419, -0.1503304988, 0.2527370155, -0.2977862358, -0.1378120482, 0.0444693454, 0.0321247876, -0.0614953265, 0.166412577, -0.1239175051, 0.4988580644, -0.1957765073, 0.0070795678, 0.2221652865, 0.0513210297, 0.1091236398, 0.138566196, 0.0798620358, -0.3392693698, 0.5981172919, 0.1064069718, -0.0348691642, 0.498096019, -0.0001213098, 0.099867776, 0.4398066998, -0.1073976383, -0.4579497874, -0.3686879575, -0.192854017, 0.1319934726, 0.2131137848, 0.0811629742, -0.0715122968, 0.1143416911, -0.303493619, -0.346046567, 0.2488765419, 0.1989328116, 0.2267285585, 0.2136144787, 0.2657418847, 0.066587165, 0.170179069, 0.0826525018, 0.0259718653, -0.0490864292, 0.2940285802, 0.014261202, 0.043685697, 0.4806104004, -0.3283523321, -0.2146463245, 0.3046185374, -0.2982533276, 0.1030709222, -0.3957037926, 0.2999309897, 0.0781370997, 0.1462642252, -0.255518198, -0.5773367882, -0.3483263254, -0.5121472478, -0.2868291736, 0.4164735079, -0.216358915, -0.2009968162, 0.2200830877, -0.3342647851, -0.0270038545, 0.0934983194, 0.0535101071, -0.0584819205, 0.2941842079, -0.1318320185, -0.0048626242, 0.0149830757, -0.132900551, 0.1924084276, -0.2750048339, -0.1968749017, 0.1725800484, -0.0155595224, -0.0546131916, 0.0954222009, 0.3323281705, 0.140570581, 0.0356287211, 0.0192098524, 0.0845401734, -0.0409641638, 0.0536773168, 0.1373275816, 0.475378722, 0.4901195765, 0.2467906624, 0.2727875113, 0.2854887545, -0.0078853024, -0.0013800253, 0.5281852484, -0.1666412055, 0.0747071281, 0.1517307162, 0.196695298, -0.4048683643, -0.3602132797, 0.1689626127, -0.0769995078, -0.1250401586, 0.2207264006, 0.0534940958, 0.1005648673, 0.2142349631, 0.1320811808, 0.0338568501, -0.1964725256, 0.0612344779, -0.1725096703, -0.1739457697, 0.0011616903, -0.1112991124, -0.0473052748, -0.89977777, 0.1747701168, 0.0482602492, 0.0063488153, 0.1058098748, -0.0697732121, 0.207434997, 0.1730166823, 0.5229284167, -0.2213587761, 0.0839003325, 0.1671907902, -0.548327744, -0.1386865377, 0.0125284484, -0.2415378094, -0.1112066656, 0.2085879147, 0.1735862345, -0.3296715915, 0.0126515068, -0.17029953, 0.4515431225, 0.2592140436, -0.5466870666, -0.0779574588, -0.213380143, -0.4382343888, -0.1997140199, 0.0971902013, 0.4131370485, -0.5942543149, -0.3216674924, 0.0216870401, 0.0319067985, 0.0399160981, -0.1229341999, -0.063439101, -0.2444722205, -0.1077689156, -0.1384182572, 0.3606542647, -0.3195546865, -0.733892858, 0.1537256837, 0.2360213548, 0.5342661738, -0.0709591061, -0.1374839246, 0.2813950479, -0.2578290701, 0.1459920853, 0.0848445743, -0.1649033576, -0.0079940017, -0.3409692049, -0.2346946597, 0.2238697708, -0.1502910852, 0.0904174298, 0.3348585963, 0.0790057704, -0.2542206049, 0.0502917804, 0.0350500681, 0.1049243882, 0.1990925223, 0.2453232259, 0.2237652242, 0.2863062918, -0.4365186989, -0.2801407278, 0.2506181598, 0.2141302824, -0.0600011088, -0.1524066925, -0.1982273012, -0.2678262889, -0.0884182155, -0.1589775681, -0.3044096231, 0.0788738504, 0.0225765873, 0.3843636513, -0.0385034606, -0.1145259663, 0.6218649745, 0.3084535897, 0.0944804996, -0.5049411654, 0.229641512, -0.0548514128, 0.0051691518, -0.0591857955, 0.0377827175, 0.2939595878, -0.0685256049, -0.2895757854, 0.407875061, 0.0392592028, 0.084168233, -0.0276337974, 0.1937460154, 0.1773459613, 0.2105839252, 0.0639338642, 0.2741822898, -0.0148837138, 0.2087214142, -0.195456177, 0.557248354, 0.0293753464, 0.3240505159, 0.1208347678, 0.148756206, 0.3702490628, 0.1305633932, -0.2189950645, -0.1370786875, 0.3204495311, -0.4587228, 0.0626674443, 0.0123394234, -0.1297932267, 0.3776263595, 0.0716826022, 0.0755119473, -0.0334524736, 0.3119212389, -0.1593657285, -0.042190969, 0.1813624054, 0.4024861157, 0.4014509916, 0.2088322341, 0.0507172868, 0.0758817792, -0.1615392268, -0.0248774402, 0.2082498521, 0.1293462515, -0.1696399748, 0.1535750628, 0.3034210205, 0.2732039392, -0.3061974645, 0.0933934823, -0.2356239706, 0.1195331365, -0.270581305, 0.3616366684, -0.2810101509, -0.2280866951, 0.076141715, -0.1678324938, -0.2615140676, -0.3875222206, 0.089899376, 0.3934392929, -0.086219281, 0.2567750216, 0.0147161586, 0.2445412278, 0.136167407, -0.1996820718, -0.4005717337, -0.2078815252, -0.3476482034, 0.0053976052, 0.2051323503, -0.1568491161, 0.2970358729, -0.0763099566, -0.2066247612, -0.390294075, -0.9079098701, -0.0486286655, -0.123964861, 0.6180298328, 0.3176228106, -0.0916265026, -0.1352719367, -0.2327560335, 0.1665794849, -0.0413150303, -0.4310828745, 0.1568385363, 0.0666227341, 0.1682221591, -0.2003851682, -0.2270279974, -0.1135412008, -0.1458190233, 0.0079398574, -0.1276904047, 0.0849654675, 0.3094039559, 0.1123534068, -0.3165157139, -0.0872011557, 0.1330857426, -0.3335401416, -0.0773374513, 0.0739419162, -0.054162316, -0.2302434891, -0.034139622, -0.0319806486, 0.0831893757, 0.3736632466, -0.4069587886, -0.3791774213, -0.2713731527, -0.0048744264, 0.2311773747, 0.068360962, 0.2319667786, 0.1899949759, 0.0391035639, -0.2794680893, -0.4342857301, -0.0886206329, -0.2365958691, 0.1095489264, 0.1482250243, 0.6309939027, 0.0345636867, 0.4764270186, 0.2947264612, 0.0489611253, 0.1398259848, 0.1815548688, 0.4972691238, -0.3258462548, -0.4095653892, -0.0467088632, -0.0461938493, 0.0505124666, -0.1531914324, 0.1795819253, -0.1120608747, -0.3487883806, 0.000088976, -0.2515632212, -0.2498103678, -0.2386271805, -0.0136443963, 0.2690052986, 0.3906219602, 0.1407706589, -0.3225954771, -0.1763848662, -0.0081372689, 0.4007481039, 0.1035773978, 0.2502198517, -0.1815419495, -0.0471423045, -0.4509257674, 0.492559284, 0.2151459008, 0.2648919821, -0.1177540421, -0.1629662067, -0.3294481337, -0.0492410697, 0.5928120017, -0.3631767035, 0.0443488397, 0.1019544229, -0.2081836015, -0.382881999, 0.0511292815, 0.0076627661, 0.3649113178, 0.0543546379, 0.3508075774, -0.0821149051, -0.0730158612, -0.0869157314, 0.2223753035, -0.1245945767, 0.0196017139, -0.2743616104, -0.2049434334, -0.143308565, 0.0314200111, -0.1528896391, 0.1650674194, -0.1800080687, -0.0685375854, -0.1131430715, -0.0563930348, 0.1153809577, 0.1347035617, 0.2945029438, -0.1000063792, 0.1187398955, 0.1441811323, 0.2405287623, 0.04236985, 0.458391726, -0.2755981982, -0.2780961096, -0.0670714304, 0.1208044589, -0.114640221, 0.3437377512, -0.2040164918, -0.0173406545, -0.0444572084, -0.1020425931, -0.0212400388, -0.1411033124, -0.001939329, 0.3703025281, -0.204925105, -0.2889373302, 0.2329640687, 0.2390516698, -0.2043491751, 0.436775893, 0.3422557414, -0.2809350789, 0.1687894613, -0.1999594271, 0.7136852741, 0.1521688104, -0.0298533011, 0.0877994671, -0.1695175022, 0.4524547458, 0.3125461042, 0.1559776068, -0.0667682663, -0.2370487005, -0.0655061752, -0.0347471349, 0.1580221951, -0.1110610664, -0.2036339194, 0.5631492734, -0.0592185557, -0.0353867561, 0.1755868793, -0.1173290387, -0.2023077309, 0.0190884974, -0.4372626245, 0.099125281, -0.0213232394, 0.2521654963, 0.0010581244, -0.0767222121, 0.0552208163, -0.3087654114, -0.2637814581, -0.0523921177, -0.3992073536, -0.0659277439, 0.2081235945, -0.433280319, 0.0089732604, 0.0526266396, 0.2566778362, -0.0081807002, -0.0373007692, -0.0075372811, 0.0702684447, 0.4977722168, 0.2345933914, 0.0250330679, 0.2863307297, 0.0890943483, 0.1867841035, 0.0195984095, -0.1420115829, -0.3608390987, -0.0186531637, 0.0038103643, 0.1180328727, -0.1588664055, 0.0288226064, -0.2428553104, 0.0213073175, -0.364861697, 0.0650937036, -0.0898337811, -0.0098389015, 0.0943212733, -0.0165627208, -0.226817742, -0.0053528175, 0.6357886791, -0.1438153237, -0.4367529452, 0.127720207, -0.0055662361, -0.2235843986, 0.0353587158, -0.2044414431, 0.0274193734, -0.2750842869, 0.2978782654, -0.2511248887, -0.1071279123, 0.2691295445, 0.3227922022, 0.1886078864, 0.2146122009, -0.1516674459, -0.3945676982, -0.1370823681, 0.2854580283, 0.0442744903, 0.0549807698, -0.0311486106, -0.3236714602, -0.1444216073, -0.2066645175, -0.2257885635, 0.0087526664, 0.3313151598, 0.0712086409, 0.1904872656, 0.2205638587, 0.1548970491, -0.1995647997, -0.0134116681, 0.0725863725, -0.203820318, -0.102092959, -0.093345888, 0.0935418084, -0.0911601558, -0.2648990452, -0.1546195447, -0.0057543651, 0.0614032373, -0.1646934003, 0.4182681739, 0.3214158118, -0.1182498485, -0.0536907464, -0.0327779986, 0.0472252741, 0.3035388887, 0.1383125186, 0.0185656752, 0.0326717421, 0.0427048579, 0.1994483471, -0.1875816137, 0.014096451, 0.082016468, 0.0423960686, -0.2510475516, 0.0270903334, 0.3569348454, -0.295296222, -0.0216397811, 0.5987740755, 0.3562681079, 0.2437597811, -0.1398067921, 0.1138302758, -0.0777392983, 0.1533572823, -0.2739046812, -0.3326784968, 0.205778718, 0.2732258439, 0.0609572381, 0.1860822588, -0.0021066871, 0.0291597173, 0.6171163917, 0.2176484168, 0.4478169084, -0.1253162473, 0.3508082032, 0.5271652937, 0.2326287627, 0.1843764484, 0.241720289, 0.0737254471, 0.0160929821, 0.5080396533, -0.0660088882, 0.2586891651, 0.2197473645, 0.1287705451, -0.0355183855, -0.4662743509, -0.1656748652, 0.0283220075, -0.0797490031, 0.2506761551, 0.1661577374, 0.0856602341, -0.2232845426, -0.3345984221, 0.0114881797, 0.024897946, -0.193626374, -0.2161095738, 0.1446396858, -0.3639173806, -0.0571490377, 0.013486567, -0.1208442077, 0.0703997388, 0.4529311359, -0.2469489723, -0.128362909, -0.4731904268, -0.3793772757, 0.0500456095, 0.1747638434, -0.0140105868, 0.4047631919, 0.258780688, -0.2298548669, 0.2219883502, 0.2503442466, 0.4856500924, 0.2468240112, 0.027692223, 0.0133466832, -0.1420494765, -0.0540064909, -0.0907230228, 0.3356420696, -0.0870835707, 0.0305686034, 0.1879348457, 0.1134100109, 0.0007339246, 0.2053903639, -0.0408540145, 0.3989400268, -0.4661819339, 0.0895344913, -0.2369527221, 0.2848792076, 0.0150147714, 0.1000138745, -0.2490254641, -0.1181152612, 0.171215117, 0.2318110913, 0.2039028108, -0.1064854339, 0.0748107806, 0.1348544508, 0.0739088506, 0.4687882364, -0.0930132717, -0.0892460048, -0.1464888304, -0.653509438, -0.0558623448, 0.1423008889, 0.1280672401, -0.0635151789, 0.0375300944, 0.0490150824, 0.1846857667, 0.0434734374, -0.1836016178, 0.1054587811, -0.2515150607, -0.2000013739, -0.1759469211, 0.2301196903, -0.2421481013, 0.0548487157, -0.2659107745, 0.0627719611, -0.0416926146, 0.0269530844, -0.005927782, -0.0628840253, 0.0675144792, 0.3473338187, -0.1370735615, 0.3493901491, 0.2663169801, 0.03349353, -0.0034476253, -0.2782979906, -0.1931354105, -0.2683142722, 0.0700851008, -0.2921240628, 0.4918605983, -0.4018596709, -0.3019634485, -0.1804217845, 0.2724736333, 0.1233783066, -0.1268284917, -0.4767788649, 0.1658581197, -0.0587571412, 0.0838124454, 0.0044377646, 0.508733511, 0.059986867, 0.3379509747, -0.2266310304, -0.3412219286, 0.5358169079, -0.4137625992, -0.2617653012, -0.1319275051, -0.0639740229, 0.6073155403, -0.4836450815, -0.3043731153, -0.2037671804, 0.2719914615, -0.1200053543, -0.1490247399, 0.1555725485, -0.2652980089, 0.1745556146, -0.1892018616, -0.0870604515, 0.4393822849, -0.0882679075, 0.2773536742, -0.1299419552 ]
https://github.com/huggingface/datasets/issues/2941
OSCAR unshuffled_original_ko: NonMatchingSplitsSizesError
I tried `unshuffled_original_da` and it is also not working
## Describe the bug Cannot download OSCAR `unshuffled_original_ko` due to `NonMatchingSplitsSizesError`. ## Steps to reproduce the bug ```python >>> dataset = datasets.load_dataset('oscar', 'unshuffled_original_ko') NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='train', num_bytes=25292102197, num_examples=7345075, dataset_name='oscar'), 'recorded': SplitInfo(name='train', num_bytes=25284578514, num_examples=7344907, dataset_name='oscar')}] ``` ## Expected results Loading is successful. ## Actual results Loading throws above error. ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.4.0-81-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 5.0.0
9
OSCAR unshuffled_original_ko: NonMatchingSplitsSizesError ## Describe the bug Cannot download OSCAR `unshuffled_original_ko` due to `NonMatchingSplitsSizesError`. ## Steps to reproduce the bug ```python >>> dataset = datasets.load_dataset('oscar', 'unshuffled_original_ko') NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='train', num_bytes=25292102197, num_examples=7345075, dataset_name='oscar'), 'recorded': SplitInfo(name='train', num_bytes=25284578514, num_examples=7344907, dataset_name='oscar')}] ``` ## Expected results Loading is successful. ## Actual results Loading throws above error. ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.4.0-81-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 5.0.0 I tried `unshuffled_original_da` and it is also not working
[ -0.2700701952, -0.3562059104, 0.0761256963, 0.3269021809, 0.2630259991, -0.0228649452, -0.0282609034, 0.4201454818, -0.0057781218, 0.2675718367, -0.2937448621, 0.3795824349, -0.175184533, 0.0020705916, -0.1521454006, -0.3282049894, 0.0055401283, 0.0813263729, 0.0597292781, 0.0331693552, -0.2423605472, 0.2973343432, -0.3931003809, 0.0419516861, -0.2768164873, -0.0585272759, -0.0746447295, 0.1445952952, -0.1675010622, -0.2716379166, 0.3857498765, -0.0588463284, 0.232816115, 0.5122596025, -0.0001237657, 0.0590177849, 0.4652545154, -0.3251428604, -0.0443532206, -0.3920538425, -0.0886344537, -0.0983479768, -0.0657844767, -0.3845169842, -0.0129822195, 0.146921888, 0.0608098917, -0.0645650402, 0.5164781213, 0.3238581419, 0.120624736, 0.0500490926, 0.0403883979, -0.2224902213, 0.3106618822, -0.2548942566, -0.3315367401, 0.0346963368, -0.0179840401, -0.1685461998, 0.1427149326, 0.1541062146, -0.0700180754, 0.1261722445, -0.1210525259, -0.0195195898, -0.0040011993, -0.0904255956, 0.2117808163, 0.374551028, 0.3375654519, -0.3247810006, -0.3132323921, -0.3029401302, 0.0337986127, -0.3283481598, 0.3009405434, 0.1460143775, -0.2429262847, 0.2017060965, -0.0670581907, 0.0023002515, -0.1089840308, 0.1734156609, 0.0992210284, 0.2540248334, 0.068739228, 0.1693916321, 0.1453325152, 0.1248955354, 0.3683691025, -0.164793402, 0.1000258476, 0.0660203919, -0.2375979722, -0.1042992249, -0.1702269167, 0.0275418647, 0.1742199361, 0.299749881, 0.3533665538, -0.050712835, 0.23539868, 0.0687230006, 0.1073275581, 0.1424306631, -0.1735071242, 0.4756015539, -0.038373746, 0.4154306054, -0.1177193224, -0.0899807885, 0.0127301393, -0.0728332028, 0.0770530924, 0.0638824552, 0.3465489149, -0.1475606412, -0.5405621529, -0.0646340847, -0.4408827126, -0.2136350721, -0.1520271748, 0.3651462495, -0.2901136577, 0.1182295531, -0.1973749697, 0.2700160146, -0.1282483786, 0.043910075, -0.2218047082, 0.1398160458, -0.1717366427, 0.1828228682, 0.1118824482, -0.204669714, 0.495223105, -0.0624024421, 0.2177726328, -0.1745524108, 0.2678282857, -0.0713035017, -0.2555179, 0.0733668804, 0.0693256706, 0.2275202274, -0.0512226708, -0.1955409944, -0.1835986227, 0.1897325665, -0.1677214205, -0.5662183762, 0.1641817391, 0.1281939894, -0.3114531338, -0.0909331217, 0.2412121892, -0.06287238, 0.0155445421, -0.1351996511, -0.0021220825, -0.0958602279, 0.1657218486, -0.2155779004, 0.2271082997, 0.3483718336, -0.1850482076, -0.1841768026, 0.006626484, -0.2098627985, 0.5653936863, 0.3381557167, 0.0346748829, -0.0691285431, -0.3662846684, -0.035242945, 0.2375092804, -0.1608842909, -0.6755478978, 0.0946134478, 0.0492238738, 0.5803261995, 0.346126765, -0.0058211032, 0.2652187347, 0.1256498843, 0.2001138926, 0.2200994045, -0.2519147992, -0.3296817243, -0.4716974497, -0.4451117814, 0.1734127849, 0.1898487657, 0.3207941949, 0.1099775285, -0.058488369, 0.2988939583, 0.3775659204, 0.0346811637, 0.0107769752, -0.0222215783, 0.1482665092, 0.3807443678, -0.076375179, -0.3940159082, -0.2746164203, 0.2904383838, -0.1236760765, -0.156783849, -0.2122336924, -0.527250886, -0.5870789289, -0.165048629, -0.1906133443, -0.162727192, 0.0038345398, 0.0500118583, 0.4496047795, 0.1891618371, -0.1783928275, 0.2574459016, 0.0525147803, 0.1223757267, -0.1573136151, 0.4813087285, -0.2699065506, -0.4087940454, 0.1640718877, 0.1615529507, 0.2917622626, -0.2825148404, -0.1289041787, 0.5438861251, -0.0126622617, 0.1553732008, -0.0856645703, -0.2544069886, 0.1181099713, -0.167449981, -0.1110598743, 0.3721723258, 0.0395096019, 0.0105408933, -0.0509868823, 0.5377941132, -0.0667465031, -0.0382976942, 0.066784896, 0.0064676078, 0.2481441945, -0.1786244661, 0.0006179169, -0.1696993709, 0.3078433871, -0.0635774508, -0.0126545299, -0.1987084448, -0.5619574189, -0.1079929173, 0.7206522226, -0.0952707604, 0.0389066115, 0.0032789083, -0.1174628735, 0.1458038688, -0.0419397578, 0.1237870455, 0.2527246773, 0.3046537042, -0.0554859377, 0.1650494337, -0.0884823874, -0.2226391435, 0.1139543355, 0.0752876177, 0.3927039802, 0.5039468408, -0.1236994937, 0.0763900355, -0.4040017426, -0.1757810861, -0.0385836139, 0.3962652385, -0.0995420963, -0.251657933, -0.3585939407, -0.0895016566, -0.3763104379, 0.0013211808, -0.1984645426, -0.1646792293, 0.0933002308, 0.4677838087, 0.03062311, 0.456158936, -0.2225827277, 0.0516182445, -0.0948610157, 0.0804057792, -0.2349837869, -0.2070280761, -0.2165757865, -0.0062309718, 0.1760603487, -0.1895347685, 0.4101438522, -0.1628828794, -0.1106793508, 0.0016370228, -0.2100382894, -0.0284292269, 0.0802166983, -0.1457641721, 0.1499073058, 0.1545280069, 0.0492399521, -0.2327251136, 0.3539457917, -0.253189683, -0.12509799, -0.0579356998, 0.3628317118, 0.1966164857, -0.0150078526, -0.6001400352, -0.3433532715, -0.2735929787, 0.1192297861, 0.171149075, 0.2071451992, -0.4059786499, 0.2124399543, 0.0293269083, 0.0146261109, -0.108423464, -0.1782411635, -0.2187789083, 0.4179231524, -0.0541067719, -0.2413789183, -0.0135591552, -0.0757790357, -0.207618624, 0.1081376076, -0.2254442275, -0.2374272496, -0.1528240591, 0.0388922058, 0.0000410417, -0.1447942406, 0.4625220001, -0.0406659842, 0.0200901981, -0.087360315, -0.2536268234, 0.0319263563, -0.0870750993, 0.4643537402, -0.0956633613, 0.5923442245, 0.1564027518, 1.0513212681, 0.3848242462, 0.4277364314, 0.2050092816, -0.2445764095, -0.0273402222, -0.1820255518, -0.1257591844, -0.0314858034, -0.1415696144, 0.1885153949, 0.1321771443, -0.0758097246, -0.1143291369, -0.2025897503, 0.0363576189, -0.4454913139, -0.1845194995, -0.050208386, 0.0200488307, -0.0743915215, 0.2265842706, 0.1607146412, 0.0683756843, -0.0109747304, 0.1947402656, 0.2533482909, -0.095236063, 0.0733086839, -0.1778615266, 0.0034823706, -0.4660815597, 0.4068314433, 0.1445844173, 0.155201152, 0.105390504, -0.2482506037, 0.2122097313, -0.2690775096, 0.8391341567, -0.3196516037, 0.021446595, -0.0050391215, -0.1162589341, -0.2233094126, -0.3100708723, -0.2493042648, 0.0977460891, 0.5004122257, 0.401702255, -0.3936049342, 0.1048643887, 0.1261661202, -0.0172707625, -0.1737206727, -0.1427190602, -0.3067505658, -0.416105777, -0.521835506, 0.0087642455, -0.10390421, 0.4622172713, -0.103750132, -0.1932160407, -0.2216338515, -0.0615733713, 0.1528482884, 0.0589452758, 0.1914952844, 0.0529781282, 0.2729120851, 0.0143474173, 0.5659828782, 0.3270242512, 0.433042109, -0.0510436259, -0.2842541039, -0.2222711891, -0.2774918079, -0.0777949691, 0.3124807179, 0.0741247982, 0.0557200424, -0.2258193046, 0.0286223143, -0.0232267417, -0.0609401241, 0.2382368445, -0.074377045, -0.4884041846, -0.4397383332, 0.2568946183, 0.2011566609, -0.084970735, 0.2157151252, 0.1666444838, -0.1530286074, 0.3322291672, -0.311853826, 1.0656917095, -0.0349132605, -0.0590303577, 0.1567310691, -0.4327569604, 0.4600604773, 0.2230525613, 0.2934070528, -0.3985666931, -0.5422777534, -0.0626290441, -0.0495161489, 0.2620194554, -0.0702634975, -0.2358459234, 0.3924998343, -0.1383437216, 0.059872508, -0.0403107777, 0.0872835815, -0.0655479878, 0.2615909278, -0.2137582153, -0.0282094814, -0.0062475386, 0.6459135413, 0.0490520187, -0.1735088825, -0.3161623478, -0.1341487914, -0.2399571091, 0.2692095339, -0.0620518588, 0.1432400197, -0.1940255165, -0.3515720665, -0.0938458592, -0.0665402114, 0.1554252207, -0.3038245738, -0.1423941851, 0.2567335367, -0.0502586178, -0.3049413562, 0.0468185209, 0.0734311789, 0.1184430718, -0.2098308355, -0.1948067993, 0.2171829045, 0.081996724, -0.2234715521, 0.2245999873, -0.344912529, 0.4029507935, -0.2193651795, -0.3630694151, -0.1238867566, 0.053775616, -0.4139072001, 0.0482330695, -0.3476900756, -0.1793532968, 0.0908351913, -0.0968465805, -0.1877360195, -0.2056991607, 0.6468623877, 0.2441388518, 0.0889284089, 0.4455735385, -0.1392742097, -0.1209909022, -0.0694017634, -0.0522745661, -0.0961838588, -0.6258867979, 0.2478279322, -0.2725172639, 0.2561436892, 0.0560390577, 0.1203305498, 0.5102044344, 0.1091660559, -0.0226831455, -0.315593183, -0.1827117205, -0.006129405, 0.3605924249, 0.2034677416, -0.2084128559, 0.3939769268, 0.0435558408, 0.1410049051, -0.2295722514, 0.1756058782, -0.0111234821, 0.0903083682, -0.0150688291, -0.0624070913, 0.0482578315, 0.1309499592, 0.0656671524, 0.2593142688, -0.107485652, -0.1093422994, -0.1164527461, 0.217103675, -0.0287401099, -0.0509174541, -0.0877763107, 0.0597584993, -0.014149596, 0.0015855627, -0.0073475796, 0.3024415374, 0.0025629182, 0.1959821284, 0.2877029181, 0.0203361772, -0.3707616925, -0.0546788871, -0.1704271585, 0.4047979116, -0.0256696772, 0.2317973226, -0.0267457049, -0.0181804169, -0.0715063438, -0.3175280988, -0.0306168441, 0.2115057111, 0.3874916732, -0.347990185, -0.0214854032, 0.3729046881, 0.2182453871, 0.5003054142, -0.1019885391, -0.1947451532, 0.2794112563, 0.132047534, -0.5035033822, 0.1693591028, 0.6532273293, -0.0279648732, 0.0474482439, 0.2889039218, -0.0722825229, -0.0049079503, -0.2585618496, 0.0728518143, 0.311209619, 0.0896963254, 0.3967244029, 0.6500381827, 0.2969564795, 0.0609108508, 0.1803033948, 0.0377423726, 0.3314584792, 0.4642525315, -0.348226279, 0.2353744805, -0.3763629198, 0.2772921026, -0.0461748801, -0.2185561657, -0.2172773033, 0.3019171655, -0.263828367, 0.2700886428, 0.147561118, 0.2971718013, -0.0907789618, -0.0566396452, -0.2395830452, 0.0068022935, 0.0361580849, -0.1487154663, -0.23768875, -0.3082600832, -0.3154895604, 0.1420746595, 0.0483601578, 0.2234884501, 0.4846854806, -0.0899223089, -0.0839001238, -0.261703372, -0.1129587889, 0.1009543613, 0.4807308614, -0.359243691, 0.002184781, 0.1473571062, -0.2205985636, 0.0831326023, 0.3578595817, 0.2714527547, 0.2029879987, -0.224526599, 0.0407990441, 0.2606113255, 0.0910466984, 0.1569049805, 0.3494497836, 0.3068242073, -0.0663663, 0.2790664434, 0.0528981723, -0.1823626012, 0.1601461917, 0.0584523901, -0.1115810052, -0.2788190246, 0.3917230964, -0.2243009657, 0.102521576, 0.057680171, 0.0891512558, -0.4057340622, -0.2379486412, -0.2201809883, 0.0126067307, 0.231259793, 0.0904681012, 0.0248190816, -0.3940022886, 0.1682776958, 0.2681089044, -0.1561311036, -0.1225692406, -0.2420620918, -0.5433617234, 0.2975563407, -0.2807193995, 0.0935659185, 0.0746108741, 0.3382504284, -0.3834771514, -0.0064511839, 0.1178494468, 0.5332386494, 0.0087339627, 0.4412532747, -0.2814124823, -0.1415888518, -0.226051569, -0.0913680568, 0.1125744134, -0.3669516146, 0.0487546846, -0.2756848037, -0.0543771461, -0.0466812104, -0.121877186, -0.0234336779, -0.1646656841, 0.2823671103, 0.2395053953, 0.2693460882, -0.1665234864, -0.0291301347, 0.1338399649, -0.1567696631, -0.065012753, 0.3058659434, 0.3186143041, 0.2530109882, -0.0928714797, 0.2424036115, -0.1774176359, 0.5707028508, 0.1469569206, -0.1631754786, -0.10322088, -0.1555235088, -0.0427126624, 0.0198512953, 0.0677086264, 0.4105406106, -0.1185427532, 0.1515361816, -0.2512541115, -0.2376576364, 0.6050724983, -0.1785651296, -0.1379883289, -0.1678245664, 0.2456205785, 0.3388739526, 0.0138582885, -0.3756624758, 0.1801710874, 0.4207406342, 0.0298809856, -0.0401440747, 0.1496393681, -0.3060053885, -0.1257539541, 0.0442536511, 0.0996872783, 0.149877876, -0.3360651135, 0.4139497876, -0.1505003273 ]
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.2289305478, 0.3834535182, 0.040345341, 0.2550398409, -0.0121113108, 0.2622572184, 0.5036683083, 0.1329532564, 0.3442817032, 0.1357175708, -0.1089743897, 0.0772839189, 0.073150374, -0.0056987684, -0.1256225109, 0.0789283216, 0.0364452153, -0.0053882273, 0.214949578, 0.1039548293, -0.4238833189, 0.1072954684, -0.172855407, 0.1861151755, 0.0260949377, -0.1363423616, 0.1212603897, 0.3607298434, -0.0307886619, -0.3922062814, 0.3530231118, 0.0634532124, 0.4639182985, 0.2582460642, -0.000119246, -0.0137069086, 0.2306841165, 0.1244994402, -0.0737274736, 0.0870998204, -0.1839853674, -0.1409676671, 0.1652300805, -0.0976862535, 0.1767440438, 0.3634920418, -0.1021372527, -0.2009297311, -0.0130413789, 0.379034102, 0.1573001444, -0.0381855965, -0.1186785623, -0.0752038136, 0.4933359921, -0.1592982262, -0.133179754, 0.2798380852, 0.0790250301, -0.11457026, -0.0989914164, 0.1995727867, -0.1621495485, 0.1471577436, 0.0186581202, 0.0311292373, 0.2162310332, -0.4581103027, 0.3521417677, 0.1512579024, 0.9656507373, -0.1955735534, -0.1914045215, -0.0887490958, 0.0133037586, -0.0330028497, 0.4326035678, 0.4286232889, -0.3245685697, 0.2523709536, 0.0659693852, 0.0835653022, -0.0825510696, -0.0019090191, 0.0712853372, 0.1486521512, -0.0504703857, 0.1195566207, -0.1147312596, -0.0834005401, 0.3863353431, -0.2138270736, -0.254601866, 0.191666767, -0.3394370973, 0.2898705602, 0.0534532256, 0.7778053284, 0.157877773, 0.3155301809, 0.1250241548, -0.0540518314, 0.2136244029, 0.0651903003, 0.0085929586, 0.3214896023, -0.1122384295, -0.0169230793, 0.4271060824, 0.1174419895, -0.0816169605, -0.0089906445, -0.0200457647, -0.4294741154, 0.3538792133, 0.1054070443, 0.4081188738, -0.2856419981, -0.1217012107, -0.0002951851, 0.1581317037, -0.0239709932, 0.0588830411, 0.5011533499, -0.2717713416, 0.0426839963, 0.0682517141, 0.1794451177, 0.0186107904, 0.0977605507, -0.0877998695, -0.0890028104, -0.2667180896, -0.0514384918, 0.408646673, -0.3225747645, 0.0955644995, 0.2566769719, 0.0270482041, -0.1792946011, 0.1918320805, -0.0414977111, -0.0328572541, 0.3576870263, 0.397295326, 0.3376339078, 0.174932614, -0.2122963965, -0.0349953882, 0.1863114685, -0.4872902334, -0.4025040567, -0.0336632058, 0.1213277355, -0.0833240524, 0.0632052422, -0.1980368942, -0.0482573472, 0.3823129535, -0.3008547723, -0.0618359111, -0.0137255481, -0.2206203043, -0.5042767525, 0.040707428, 0.4012890756, -0.3596991003, 0.1303672194, -0.0915537477, -0.2640866041, 0.1504325122, 0.0056375656, 0.0056341127, 0.3616814017, -0.2812198102, 0.0156073133, 0.2774584889, -0.3938943148, -1.0015972853, -0.0210030079, 0.0730995089, 0.1660424769, 0.2444063723, 0.1191371009, 0.3659378588, -0.0303458292, 0.1704769284, 0.3187128901, 0.1300752312, 0.1119742319, -0.0629962236, -0.2038549483, 0.2796608508, 0.1339266002, 0.0883391201, 0.3009034991, 0.312600106, -0.0569339506, 0.251095593, -0.1872612089, 0.116804406, 0.1925157905, 0.0114956526, -0.0351362228, 0.1375146806, -0.1277379841, -0.420409292, 0.3514482081, -0.00811728, 0.0851668194, 0.0759790465, -0.2027431279, -0.3184642494, 0.0913407728, -0.5447552204, -0.2889970243, 0.0851063654, 0.2938987911, 0.2124249339, 0.0236818604, 0.1891641766, 0.3374149799, -0.2082268894, 0.1271959245, -0.1811406165, 0.0386061855, -0.1883375496, -0.1364492327, -0.2122476399, 0.0469153933, 0.2001280636, 0.2527483404, -0.2134325951, 0.1961012632, 0.151213333, 0.0374986753, -0.3785572946, -0.0595560744, -0.0223776083, 0.1217297763, 0.1568485051, 0.1381781846, 0.1483232975, -0.0443943143, -0.1922187656, 0.1377540231, -0.1596345007, 0.14373146, -0.3266511559, 0.2430362701, 0.2447061241, 0.0900503173, 0.0856966749, 0.0344529897, 0.3054705858, 0.0241174567, 0.0745961443, -0.2858042717, 0.1012615561, -0.0778078139, 0.0593021847, 0.0225473158, 0.0812815726, 0.2497533113, -0.1746012717, 0.0168862902, 0.2869935334, 0.349679023, 0.5377136469, -0.0409865156, 0.0515500903, 0.0667970031, 0.0479120463, 0.0896691009, 0.1192515045, 0.0857714713, -0.0702273324, 0.2634492815, 0.1284338385, 0.2241659462, -0.0647975802, -0.1138611957, -0.107541278, 0.4194297791, -0.4875138104, -0.084387593, 0.1000552922, 0.0748399198, 0.1812013388, -0.2428474277, -0.0887820199, -0.1460988075, -0.2430461347, 0.3116364777, 0.0940705463, 0.0835373625, -0.511957705, 0.164441213, 0.0075377976, -0.2018063366, -0.1137571484, 0.1238797531, -0.1658339351, -0.0141071854, 0.1862449348, -0.1799398512, 0.1873875707, -0.2951588631, 0.2437517196, -0.3901760876, -0.1954325885, 0.0151099013, 0.0578858256, 0.4098414481, 0.1254311204, 0.1551068723, 0.1864105314, -0.3417646587, 0.0566025972, -0.1075194404, -0.1510609835, 0.2333712131, -0.0550265461, 0.0938554928, 0.0341966748, -0.2493757308, -0.5408244133, -0.2501789927, -0.0095754005, 0.3858899772, 0.0983009189, -0.0028510524, -0.1126530915, 0.0033437847, 0.267029494, 0.3937678933, -0.2108280957, -0.2492020875, 0.2102492452, -0.2092680335, -0.3346993625, 0.0819493756, -0.1042304859, 0.0445711389, 0.2523835003, -0.4788489342, -0.0906342939, -0.3600659072, 0.4096082449, -0.232615903, 0.0938282236, 0.3463047147, 0.0892930999, 0.1463989317, -0.0417488404, -0.2757158875, -0.0651353374, -0.2946413159, -0.068232581, 0.3381980062, 0.4274490774, -0.0575702377, 0.3770318925, 0.3002279699, 0.3604496717, 0.3344713151, 0.04584153, 0.3711133003, 0.0542609356, -0.2594737113, 0.1087757051, -0.1943459958, -0.140160799, 0.3007430136, 0.0889823362, -0.1952640116, -0.052531682, -0.3804523051, -0.2807892859, -0.2852858603, -0.0992422476, -0.2463323325, 0.2537561357, 0.1191406399, 0.1100426763, -0.4462445676, -0.3691142201, 0.0288443286, 0.5546328425, -0.3098391891, 0.1115756556, -0.3508035243, 0.1366987079, -0.6549720168, 0.2522459924, 0.0340248011, 0.4958057404, -0.1741242707, 0.1266969591, -0.0015080259, -0.1074288562, 0.5570681095, -0.6522978544, 0.4618299305, 0.0581227317, 0.1157312021, 0.0101971151, -0.2243451625, -0.0922563747, 0.2416802943, 0.1369419247, 0.2145550996, 0.1639221013, 0.0440419056, 0.0762091056, 0.1665931493, -0.2001322806, -0.279057771, -0.2271348834, -0.3418877125, -0.3903853595, 0.128006041, 0.0421996191, 0.1854700744, -0.1517433375, 0.1171616763, -0.4046885669, 0.2369778156, 0.1301799268, 0.1602822691, 0.187791869, 0.0645751134, 0.2181593776, -0.0480453596, 0.0753483474, -0.1291563809, 0.5240867138, -0.2804769576, -0.328379035, -0.0524905957, -0.199985683, -0.1171171516, 0.1122419834, -0.3265575469, -0.0500914566, -0.1384819001, -0.1327372044, -0.3143305779, 0.117074959, 0.0426035039, -0.1354341507, -0.3776838183, -0.3201939762, 0.3641437292, 0.2117004246, -0.4467277825, 0.3404740095, 0.1198474169, -0.4280630946, 0.1824693233, 0.0517599583, 0.7466567159, 0.0798895434, 0.2780212462, 0.0972766355, -0.1122953147, 0.2001173049, 0.1161781773, 0.0565570518, -0.3728869557, -0.4541019201, -0.0988719016, -0.2205425799, -0.134537518, -0.0249406099, -0.2337937057, 0.2817453742, -0.1129783094, 0.3188050985, 0.274310261, 0.048037339, -0.3741956651, -0.3764992654, -0.1209942549, 0.1251865476, -0.1938239634, 0.1358688474, -0.2274900377, 0.0911153406, 0.0849043131, -0.1673949957, -0.439121902, 0.1967898756, -0.4114460945, 0.1381170154, -0.2974178493, -0.3836832643, 0.0877998993, 0.5960645676, 0.2849669755, 0.3604593873, -0.1543026865, 0.0600666888, 0.0793892592, 0.1179443896, 0.024958102, 0.0074552288, 0.1962639689, -0.0806936249, -0.2981881797, -0.0151690254, -0.2781275809, -0.3215303123, -0.1055536345, 0.2862682045, 0.4039052129, -0.3201119602, -0.2076887786, -0.3106458187, 0.0849739909, -0.2798955739, 0.0937029347, 0.0470425822, -0.0756008551, 0.3795401752, -0.3368881643, -0.425712347, -0.1475177705, 0.5242761374, -0.079077132, -0.1337566078, 0.5711378455, -0.0485029556, -0.1785390973, -0.0130321439, 0.1454919577, -0.1009839401, -0.462458998, -0.1003440917, -0.1225365251, 0.1078282446, -0.029106807, 0.1698505282, 0.2787975669, -0.0963102505, 0.0534037836, -0.7581394315, -0.2621001899, -0.1129847094, -0.2311439961, 0.1716352552, 0.1831110716, -0.4405415952, -0.1353047937, -0.2840806246, -0.203002885, 0.0441007577, -0.2147331834, -0.1294415742, 0.2779014409, 0.154557094, -0.001340596, 0.1245135888, -0.0026244703, 0.0926584527, 0.1227548569, -0.1713698655, -0.1237100959, 0.1475240737, 0.1037818864, -0.0917996764, 0.0267537702, -0.3284253776, -0.0735971555, -0.0984259099, 0.3940449953, 0.2593082786, -0.0281576384, 0.0679169372, -0.1276832074, 0.2894711792, -0.2827050388, 0.4151190817, -0.3472835422, -0.0251300745, -0.0133727901, 0.3347693682, -0.1413164884, 0.0541265719, -0.11745359, -0.0824945197, 0.1532541662, 0.0678972974, 0.0646063909, -0.3769121468, 0.085026145, 0.1787576079, 0.0593337528, 0.0623646304, -0.23318322, 0.0148412948, 0.2450501472, 0.1589923799, -0.0922699794, -0.1294877678, -0.0120077264, -0.3234773874, -0.1790443361, 0.3004153967, 0.1639576256, -0.3836256266, 0.1359916031, -0.0324052311, 0.5581638813, -0.2246947289, -0.0577207766, 0.4813490808, -0.2174006104, 0.2738089263, 0.218585968, 0.2596439123, -0.0843797997, 0.5514788032, 0.1820428967, 0.1367382705, -0.0058679264, -0.1720480621, -0.1030526981, -0.6628072858, 0.28002882, 0.0652534962, -0.0736904144, 0.0509437881, -0.0296167657, -0.0086359354, -0.3041151464, -0.0021537442, -0.4382816255, -0.2168946117, -0.1808834672, -0.283659488, 0.0684353933, -0.2338435054, 0.1725392044, 0.0927761719, -0.1707766503, -0.14519687, -0.069977276, -0.0427515879, -0.3035758734, -0.268468231, 0.1116327941, 0.4133677781, -0.2662928104, -0.1926916391, 0.0890493989, 0.0064425515, 0.2395810932, 0.0886423066, 0.0961362123, 0.7200041413, 0.3696607947, -0.186706394, -0.0827123448, 0.2043794394, 0.08498016, -0.1013351902, 0.3095628321, 0.1992664337, 0.1772322208, 0.3453566134, 0.1196848005, -0.124466449, 0.0374585725, 0.0380601026, -0.008947121, -0.0834797546, 0.1873595268, -0.1764346659, -0.168423444, 0.1405667216, 0.1980234534, -0.0727778077, 0.1700269282, 0.2323683053, 0.0627374277, 0.1945085675, -0.1900534481, 0.0200616512, 0.1487799883, 0.3155461252, 0.3503623307, 0.0980699509, -0.2335534841, -0.068358846, -0.5775797367, 0.2545953691, -0.0182250105, -0.3800154626, -0.0322349034, -0.1324881017, -0.3368008435, 0.1061356142, 0.1619229615, -0.1090964749, 0.0555578545, 0.2668960989, -0.1567609012, -0.2936111093, 0.3894377947, -0.0377689339, -0.0781006962, -0.6786634922, 0.0366012938, -0.0887601152, 0.0320076123, -0.1506992131, -0.1666385084, 0.0341500044, -0.0260742661, 0.5437771082, 0.2644129097, 0.4555599689, 0.0078377938, 0.0918127969, -0.562205255, -0.0687982887, -0.1452899277, -0.0336945578, -0.077826038, 0.271348238, -0.2275042981, 0.0414364263, -0.1241922826, 0.1670939773, 0.2662992477, 0.3795417845, -0.0054561738, 0.2279049158, 0.1809432358, 0.1571899056, 0.3478443921, 0.0699722916, -0.0961795077, 0.4460362792, -0.2409338355, -0.342048198, 0.2109487653, -0.3941510618, -0.3340475857, -0.0192074794, 0.3251572549, -0.2549189031, -0.1531336755, -0.2379637361, 0.2061088979, 0.2478395253, -0.1434804201, -0.3868976235, 0.1413453221, -0.1570352912, 0.140291512, -0.0227520186, 0.0342236757, 0.0101351459, -0.225390628, 0.1708674133, -0.2374369949 ]
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.2289305478, 0.3834535182, 0.040345341, 0.2550398409, -0.0121113108, 0.2622572184, 0.5036683083, 0.1329532564, 0.3442817032, 0.1357175708, -0.1089743897, 0.0772839189, 0.073150374, -0.0056987684, -0.1256225109, 0.0789283216, 0.0364452153, -0.0053882273, 0.214949578, 0.1039548293, -0.4238833189, 0.1072954684, -0.172855407, 0.1861151755, 0.0260949377, -0.1363423616, 0.1212603897, 0.3607298434, -0.0307886619, -0.3922062814, 0.3530231118, 0.0634532124, 0.4639182985, 0.2582460642, -0.000119246, -0.0137069086, 0.2306841165, 0.1244994402, -0.0737274736, 0.0870998204, -0.1839853674, -0.1409676671, 0.1652300805, -0.0976862535, 0.1767440438, 0.3634920418, -0.1021372527, -0.2009297311, -0.0130413789, 0.379034102, 0.1573001444, -0.0381855965, -0.1186785623, -0.0752038136, 0.4933359921, -0.1592982262, -0.133179754, 0.2798380852, 0.0790250301, -0.11457026, -0.0989914164, 0.1995727867, -0.1621495485, 0.1471577436, 0.0186581202, 0.0311292373, 0.2162310332, -0.4581103027, 0.3521417677, 0.1512579024, 0.9656507373, -0.1955735534, -0.1914045215, -0.0887490958, 0.0133037586, -0.0330028497, 0.4326035678, 0.4286232889, -0.3245685697, 0.2523709536, 0.0659693852, 0.0835653022, -0.0825510696, -0.0019090191, 0.0712853372, 0.1486521512, -0.0504703857, 0.1195566207, -0.1147312596, -0.0834005401, 0.3863353431, -0.2138270736, -0.254601866, 0.191666767, -0.3394370973, 0.2898705602, 0.0534532256, 0.7778053284, 0.157877773, 0.3155301809, 0.1250241548, -0.0540518314, 0.2136244029, 0.0651903003, 0.0085929586, 0.3214896023, -0.1122384295, -0.0169230793, 0.4271060824, 0.1174419895, -0.0816169605, -0.0089906445, -0.0200457647, -0.4294741154, 0.3538792133, 0.1054070443, 0.4081188738, -0.2856419981, -0.1217012107, -0.0002951851, 0.1581317037, -0.0239709932, 0.0588830411, 0.5011533499, -0.2717713416, 0.0426839963, 0.0682517141, 0.1794451177, 0.0186107904, 0.0977605507, -0.0877998695, -0.0890028104, -0.2667180896, -0.0514384918, 0.408646673, -0.3225747645, 0.0955644995, 0.2566769719, 0.0270482041, -0.1792946011, 0.1918320805, -0.0414977111, -0.0328572541, 0.3576870263, 0.397295326, 0.3376339078, 0.174932614, -0.2122963965, -0.0349953882, 0.1863114685, -0.4872902334, -0.4025040567, -0.0336632058, 0.1213277355, -0.0833240524, 0.0632052422, -0.1980368942, -0.0482573472, 0.3823129535, -0.3008547723, -0.0618359111, -0.0137255481, -0.2206203043, -0.5042767525, 0.040707428, 0.4012890756, -0.3596991003, 0.1303672194, -0.0915537477, -0.2640866041, 0.1504325122, 0.0056375656, 0.0056341127, 0.3616814017, -0.2812198102, 0.0156073133, 0.2774584889, -0.3938943148, -1.0015972853, -0.0210030079, 0.0730995089, 0.1660424769, 0.2444063723, 0.1191371009, 0.3659378588, -0.0303458292, 0.1704769284, 0.3187128901, 0.1300752312, 0.1119742319, -0.0629962236, -0.2038549483, 0.2796608508, 0.1339266002, 0.0883391201, 0.3009034991, 0.312600106, -0.0569339506, 0.251095593, -0.1872612089, 0.116804406, 0.1925157905, 0.0114956526, -0.0351362228, 0.1375146806, -0.1277379841, -0.420409292, 0.3514482081, -0.00811728, 0.0851668194, 0.0759790465, -0.2027431279, -0.3184642494, 0.0913407728, -0.5447552204, -0.2889970243, 0.0851063654, 0.2938987911, 0.2124249339, 0.0236818604, 0.1891641766, 0.3374149799, -0.2082268894, 0.1271959245, -0.1811406165, 0.0386061855, -0.1883375496, -0.1364492327, -0.2122476399, 0.0469153933, 0.2001280636, 0.2527483404, -0.2134325951, 0.1961012632, 0.151213333, 0.0374986753, -0.3785572946, -0.0595560744, -0.0223776083, 0.1217297763, 0.1568485051, 0.1381781846, 0.1483232975, -0.0443943143, -0.1922187656, 0.1377540231, -0.1596345007, 0.14373146, -0.3266511559, 0.2430362701, 0.2447061241, 0.0900503173, 0.0856966749, 0.0344529897, 0.3054705858, 0.0241174567, 0.0745961443, -0.2858042717, 0.1012615561, -0.0778078139, 0.0593021847, 0.0225473158, 0.0812815726, 0.2497533113, -0.1746012717, 0.0168862902, 0.2869935334, 0.349679023, 0.5377136469, -0.0409865156, 0.0515500903, 0.0667970031, 0.0479120463, 0.0896691009, 0.1192515045, 0.0857714713, -0.0702273324, 0.2634492815, 0.1284338385, 0.2241659462, -0.0647975802, -0.1138611957, -0.107541278, 0.4194297791, -0.4875138104, -0.084387593, 0.1000552922, 0.0748399198, 0.1812013388, -0.2428474277, -0.0887820199, -0.1460988075, -0.2430461347, 0.3116364777, 0.0940705463, 0.0835373625, -0.511957705, 0.164441213, 0.0075377976, -0.2018063366, -0.1137571484, 0.1238797531, -0.1658339351, -0.0141071854, 0.1862449348, -0.1799398512, 0.1873875707, -0.2951588631, 0.2437517196, -0.3901760876, -0.1954325885, 0.0151099013, 0.0578858256, 0.4098414481, 0.1254311204, 0.1551068723, 0.1864105314, -0.3417646587, 0.0566025972, -0.1075194404, -0.1510609835, 0.2333712131, -0.0550265461, 0.0938554928, 0.0341966748, -0.2493757308, -0.5408244133, -0.2501789927, -0.0095754005, 0.3858899772, 0.0983009189, -0.0028510524, -0.1126530915, 0.0033437847, 0.267029494, 0.3937678933, -0.2108280957, -0.2492020875, 0.2102492452, -0.2092680335, -0.3346993625, 0.0819493756, -0.1042304859, 0.0445711389, 0.2523835003, -0.4788489342, -0.0906342939, -0.3600659072, 0.4096082449, -0.232615903, 0.0938282236, 0.3463047147, 0.0892930999, 0.1463989317, -0.0417488404, -0.2757158875, -0.0651353374, -0.2946413159, -0.068232581, 0.3381980062, 0.4274490774, -0.0575702377, 0.3770318925, 0.3002279699, 0.3604496717, 0.3344713151, 0.04584153, 0.3711133003, 0.0542609356, -0.2594737113, 0.1087757051, -0.1943459958, -0.140160799, 0.3007430136, 0.0889823362, -0.1952640116, -0.052531682, -0.3804523051, -0.2807892859, -0.2852858603, -0.0992422476, -0.2463323325, 0.2537561357, 0.1191406399, 0.1100426763, -0.4462445676, -0.3691142201, 0.0288443286, 0.5546328425, -0.3098391891, 0.1115756556, -0.3508035243, 0.1366987079, -0.6549720168, 0.2522459924, 0.0340248011, 0.4958057404, -0.1741242707, 0.1266969591, -0.0015080259, -0.1074288562, 0.5570681095, -0.6522978544, 0.4618299305, 0.0581227317, 0.1157312021, 0.0101971151, -0.2243451625, -0.0922563747, 0.2416802943, 0.1369419247, 0.2145550996, 0.1639221013, 0.0440419056, 0.0762091056, 0.1665931493, -0.2001322806, -0.279057771, -0.2271348834, -0.3418877125, -0.3903853595, 0.128006041, 0.0421996191, 0.1854700744, -0.1517433375, 0.1171616763, -0.4046885669, 0.2369778156, 0.1301799268, 0.1602822691, 0.187791869, 0.0645751134, 0.2181593776, -0.0480453596, 0.0753483474, -0.1291563809, 0.5240867138, -0.2804769576, -0.328379035, -0.0524905957, -0.199985683, -0.1171171516, 0.1122419834, -0.3265575469, -0.0500914566, -0.1384819001, -0.1327372044, -0.3143305779, 0.117074959, 0.0426035039, -0.1354341507, -0.3776838183, -0.3201939762, 0.3641437292, 0.2117004246, -0.4467277825, 0.3404740095, 0.1198474169, -0.4280630946, 0.1824693233, 0.0517599583, 0.7466567159, 0.0798895434, 0.2780212462, 0.0972766355, -0.1122953147, 0.2001173049, 0.1161781773, 0.0565570518, -0.3728869557, -0.4541019201, -0.0988719016, -0.2205425799, -0.134537518, -0.0249406099, -0.2337937057, 0.2817453742, -0.1129783094, 0.3188050985, 0.274310261, 0.048037339, -0.3741956651, -0.3764992654, -0.1209942549, 0.1251865476, -0.1938239634, 0.1358688474, -0.2274900377, 0.0911153406, 0.0849043131, -0.1673949957, -0.439121902, 0.1967898756, -0.4114460945, 0.1381170154, -0.2974178493, -0.3836832643, 0.0877998993, 0.5960645676, 0.2849669755, 0.3604593873, -0.1543026865, 0.0600666888, 0.0793892592, 0.1179443896, 0.024958102, 0.0074552288, 0.1962639689, -0.0806936249, -0.2981881797, -0.0151690254, -0.2781275809, -0.3215303123, -0.1055536345, 0.2862682045, 0.4039052129, -0.3201119602, -0.2076887786, -0.3106458187, 0.0849739909, -0.2798955739, 0.0937029347, 0.0470425822, -0.0756008551, 0.3795401752, -0.3368881643, -0.425712347, -0.1475177705, 0.5242761374, -0.079077132, -0.1337566078, 0.5711378455, -0.0485029556, -0.1785390973, -0.0130321439, 0.1454919577, -0.1009839401, -0.462458998, -0.1003440917, -0.1225365251, 0.1078282446, -0.029106807, 0.1698505282, 0.2787975669, -0.0963102505, 0.0534037836, -0.7581394315, -0.2621001899, -0.1129847094, -0.2311439961, 0.1716352552, 0.1831110716, -0.4405415952, -0.1353047937, -0.2840806246, -0.203002885, 0.0441007577, -0.2147331834, -0.1294415742, 0.2779014409, 0.154557094, -0.001340596, 0.1245135888, -0.0026244703, 0.0926584527, 0.1227548569, -0.1713698655, -0.1237100959, 0.1475240737, 0.1037818864, -0.0917996764, 0.0267537702, -0.3284253776, -0.0735971555, -0.0984259099, 0.3940449953, 0.2593082786, -0.0281576384, 0.0679169372, -0.1276832074, 0.2894711792, -0.2827050388, 0.4151190817, -0.3472835422, -0.0251300745, -0.0133727901, 0.3347693682, -0.1413164884, 0.0541265719, -0.11745359, -0.0824945197, 0.1532541662, 0.0678972974, 0.0646063909, -0.3769121468, 0.085026145, 0.1787576079, 0.0593337528, 0.0623646304, -0.23318322, 0.0148412948, 0.2450501472, 0.1589923799, -0.0922699794, -0.1294877678, -0.0120077264, -0.3234773874, -0.1790443361, 0.3004153967, 0.1639576256, -0.3836256266, 0.1359916031, -0.0324052311, 0.5581638813, -0.2246947289, -0.0577207766, 0.4813490808, -0.2174006104, 0.2738089263, 0.218585968, 0.2596439123, -0.0843797997, 0.5514788032, 0.1820428967, 0.1367382705, -0.0058679264, -0.1720480621, -0.1030526981, -0.6628072858, 0.28002882, 0.0652534962, -0.0736904144, 0.0509437881, -0.0296167657, -0.0086359354, -0.3041151464, -0.0021537442, -0.4382816255, -0.2168946117, -0.1808834672, -0.283659488, 0.0684353933, -0.2338435054, 0.1725392044, 0.0927761719, -0.1707766503, -0.14519687, -0.069977276, -0.0427515879, -0.3035758734, -0.268468231, 0.1116327941, 0.4133677781, -0.2662928104, -0.1926916391, 0.0890493989, 0.0064425515, 0.2395810932, 0.0886423066, 0.0961362123, 0.7200041413, 0.3696607947, -0.186706394, -0.0827123448, 0.2043794394, 0.08498016, -0.1013351902, 0.3095628321, 0.1992664337, 0.1772322208, 0.3453566134, 0.1196848005, -0.124466449, 0.0374585725, 0.0380601026, -0.008947121, -0.0834797546, 0.1873595268, -0.1764346659, -0.168423444, 0.1405667216, 0.1980234534, -0.0727778077, 0.1700269282, 0.2323683053, 0.0627374277, 0.1945085675, -0.1900534481, 0.0200616512, 0.1487799883, 0.3155461252, 0.3503623307, 0.0980699509, -0.2335534841, -0.068358846, -0.5775797367, 0.2545953691, -0.0182250105, -0.3800154626, -0.0322349034, -0.1324881017, -0.3368008435, 0.1061356142, 0.1619229615, -0.1090964749, 0.0555578545, 0.2668960989, -0.1567609012, -0.2936111093, 0.3894377947, -0.0377689339, -0.0781006962, -0.6786634922, 0.0366012938, -0.0887601152, 0.0320076123, -0.1506992131, -0.1666385084, 0.0341500044, -0.0260742661, 0.5437771082, 0.2644129097, 0.4555599689, 0.0078377938, 0.0918127969, -0.562205255, -0.0687982887, -0.1452899277, -0.0336945578, -0.077826038, 0.271348238, -0.2275042981, 0.0414364263, -0.1241922826, 0.1670939773, 0.2662992477, 0.3795417845, -0.0054561738, 0.2279049158, 0.1809432358, 0.1571899056, 0.3478443921, 0.0699722916, -0.0961795077, 0.4460362792, -0.2409338355, -0.342048198, 0.2109487653, -0.3941510618, -0.3340475857, -0.0192074794, 0.3251572549, -0.2549189031, -0.1531336755, -0.2379637361, 0.2061088979, 0.2478395253, -0.1434804201, -0.3868976235, 0.1413453221, -0.1570352912, 0.140291512, -0.0227520186, 0.0342236757, 0.0101351459, -0.225390628, 0.1708674133, -0.2374369949 ]
End of preview.
YAML Metadata Error: "language[0]" must only contain lowercase characters
YAML Metadata Error: "language[0]" with value "en-US" is not valid. It must be an ISO 639-1, 639-2 or 639-3 code (two/three letters), or a special value like "code", "multilingual". If you want to use BCP-47 identifiers, you can specify them in language_bcp47.

Dataset Card for GitHub Issues

Dataset Description

this was an example dataset made from the huggingface course

Downloads last month
47