url
stringlengths
61
61
repository_url
stringclasses
1 value
labels_url
stringlengths
75
75
comments_url
stringlengths
70
70
events_url
stringlengths
68
68
html_url
stringlengths
49
51
id
int64
778M
1.87B
node_id
stringlengths
18
32
number
int64
1.68k
6.18k
title
stringlengths
1
290
user
dict
labels
listlengths
0
4
state
stringclasses
2 values
locked
bool
1 class
assignee
dict
assignees
listlengths
0
4
milestone
dict
comments
sequencelengths
0
30
created_at
unknown
updated_at
unknown
closed_at
unknown
author_association
stringclasses
3 values
active_lock_reason
float64
body
stringlengths
0
228k
reactions
dict
timeline_url
stringlengths
70
70
performed_via_github_app
float64
state_reason
stringclasses
3 values
draft
float64
0
1
pull_request
dict
is_pull_request
bool
2 classes
https://api.github.com/repos/huggingface/datasets/issues/6178
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6178/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6178/comments
https://api.github.com/repos/huggingface/datasets/issues/6178/events
https://github.com/huggingface/datasets/issues/6178
1,866,610,102
I_kwDODunzps5vQjW2
6,178
'import datasets' throws "invalid syntax error"
{ "avatar_url": "https://avatars.githubusercontent.com/u/128580829?v=4", "events_url": "https://api.github.com/users/elia-ashraf/events{/privacy}", "followers_url": "https://api.github.com/users/elia-ashraf/followers", "following_url": "https://api.github.com/users/elia-ashraf/following{/other_user}", "gists_url": "https://api.github.com/users/elia-ashraf/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/elia-ashraf", "id": 128580829, "login": "elia-ashraf", "node_id": "U_kgDOB6n83Q", "organizations_url": "https://api.github.com/users/elia-ashraf/orgs", "received_events_url": "https://api.github.com/users/elia-ashraf/received_events", "repos_url": "https://api.github.com/users/elia-ashraf/repos", "site_admin": false, "starred_url": "https://api.github.com/users/elia-ashraf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/elia-ashraf/subscriptions", "type": "User", "url": "https://api.github.com/users/elia-ashraf" }
[]
open
false
null
[]
null
[]
"2023-08-25T08:35:14"
"2023-08-25T08:36:15"
null
NONE
null
### Describe the bug Hi, I have been trying to import the datasets library but I keep gtting this error. `Traceback (most recent call last): File /opt/local/jupyterhub/lib64/python3.9/site-packages/IPython/core/interactiveshell.py:3508 in run_code exec(code_obj, self.user_global_ns, self.user_ns) Cell In[2], line 1 import datasets File /opt/local/jupyterhub/lib64/python3.9/site-packages/datasets/__init__.py:22 from .arrow_dataset import Dataset File /opt/local/jupyterhub/lib64/python3.9/site-packages/datasets/arrow_dataset.py:67 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/local/jupyterhub/lib64/python3.9/site-packages/datasets/arrow_writer.py:27 from .features import Features, Image, Value File /opt/local/jupyterhub/lib64/python3.9/site-packages/datasets/features/__init__.py:17 from .audio import Audio File /opt/local/jupyterhub/lib64/python3.9/site-packages/datasets/features/audio.py:11 from ..download.streaming_download_manager import xopen, xsplitext File /opt/local/jupyterhub/lib64/python3.9/site-packages/datasets/download/__init__.py:10 from .streaming_download_manager import StreamingDownloadManager File /opt/local/jupyterhub/lib64/python3.9/site-packages/datasets/download/streaming_download_manager.py:18 from aiohttp.client_exceptions import ClientError File /opt/local/jupyterhub/lib64/python3.9/site-packages/aiohttp/__init__.py:7 from .connector import * # noqa File /opt/local/jupyterhub/lib64/python3.9/site-packages/aiohttp/connector.py:12 from .client import ClientRequest File /opt/local/jupyterhub/lib64/python3.9/site-packages/aiohttp/client.py:144 yield from asyncio.async(resp.release(), loop=loop) ^ SyntaxError: invalid syntax` I have simply used these commands: `import datasets` and `from datasets import load_dataset` ### Environment info The library has been installed a virtual machine on JupyterHub. Although I have used this library multiple times (on the same VM) before, to train/test an ASR or other ML models, I had never encountered this error.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6178/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6178/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6177
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6177/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6177/comments
https://api.github.com/repos/huggingface/datasets/issues/6177/events
https://github.com/huggingface/datasets/pull/6177
1,865,490,962
PR_kwDODunzps5Ytky-
6,177
Use object detection images from `huggingface/documentation-images`
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
open
false
null
[]
null
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6177). All of your documentation changes will be reflected on that endpoint.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.005847 / 0.011353 (-0.005506) | 0.003488 / 0.011008 (-0.007521) | 0.079545 / 0.038508 (0.041037) | 0.055114 / 0.023109 (0.032005) | 0.312694 / 0.275898 (0.036796) | 0.338808 / 0.323480 (0.015329) | 0.004573 / 0.007986 (-0.003413) | 0.002818 / 0.004328 (-0.001510) | 0.062102 / 0.004250 (0.057852) | 0.044072 / 0.037052 (0.007019) | 0.317682 / 0.258489 (0.059192) | 0.354139 / 0.293841 (0.060298) | 0.026905 / 0.128546 (-0.101641) | 0.007990 / 0.075646 (-0.067656) | 0.260071 / 0.419271 (-0.159201) | 0.043658 / 0.043533 (0.000125) | 0.313828 / 0.255139 (0.058689) | 0.339678 / 0.283200 (0.056478) | 0.020076 / 0.141683 (-0.121607) | 1.446321 / 1.452155 (-0.005834) | 1.527046 / 1.492716 (0.034330) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.197801 / 0.018006 (0.179795) | 0.432874 / 0.000490 (0.432385) | 0.004093 / 0.000200 (0.003893) | 0.000069 / 0.000054 (0.000014) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.023505 / 0.037411 (-0.013906) | 0.072377 / 0.014526 (0.057852) | 0.081058 / 0.176557 (-0.095498) | 0.141628 / 0.737135 (-0.595507) | 0.081622 / 0.296338 (-0.214716) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.395005 / 0.215209 (0.179795) | 3.949006 / 2.077655 (1.871352) | 1.934028 / 1.504120 (0.429908) | 1.756065 / 1.541195 (0.214871) | 1.778719 / 1.468490 (0.310229) | 0.501279 / 4.584777 (-4.083498) | 3.032120 / 3.745712 (-0.713592) | 2.859751 / 5.269862 (-2.410110) | 1.885924 / 4.565676 (-2.679753) | 0.057236 / 0.424275 (-0.367039) | 0.006704 / 0.007607 (-0.000903) | 0.465794 / 0.226044 (0.239750) | 4.648622 / 2.268929 (2.379694) | 2.345649 / 55.444624 (-53.098975) | 1.981122 / 6.876477 (-4.895355) | 2.148235 / 2.142072 (0.006163) | 0.591466 / 4.805227 (-4.213761) | 0.125262 / 6.500664 (-6.375402) | 0.061305 / 0.075469 (-0.014164) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.243932 / 1.841788 (-0.597856) | 17.912110 / 8.074308 (9.837802) | 13.662097 / 10.191392 (3.470705) | 0.148051 / 0.680424 (-0.532373) | 0.016778 / 0.534201 (-0.517423) | 0.340342 / 0.579283 (-0.238941) | 0.351720 / 0.434364 (-0.082644) | 0.377837 / 0.540337 (-0.162501) | 0.521163 / 1.386936 (-0.865774) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006011 / 0.011353 (-0.005342) | 0.003549 / 0.011008 (-0.007459) | 0.063579 / 0.038508 (0.025071) | 0.056196 / 0.023109 (0.033087) | 0.448879 / 0.275898 (0.172981) | 0.491542 / 0.323480 (0.168062) | 0.004597 / 0.007986 (-0.003389) | 0.002790 / 0.004328 (-0.001539) | 0.063257 / 0.004250 (0.059006) | 0.045653 / 0.037052 (0.008600) | 0.459714 / 0.258489 (0.201225) | 0.491371 / 0.293841 (0.197530) | 0.028124 / 0.128546 (-0.100422) | 0.008016 / 0.075646 (-0.067630) | 0.069418 / 0.419271 (-0.349853) | 0.040393 / 0.043533 (-0.003140) | 0.450978 / 0.255139 (0.195839) | 0.472075 / 0.283200 (0.188875) | 0.020006 / 0.141683 (-0.121677) | 1.451946 / 1.452155 (-0.000209) | 1.513557 / 1.492716 (0.020840) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.225416 / 0.018006 (0.207410) | 0.412287 / 0.000490 (0.411797) | 0.004075 / 0.000200 (0.003875) | 0.000073 / 0.000054 (0.000019) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.025949 / 0.037411 (-0.011463) | 0.080633 / 0.014526 (0.066108) | 0.089960 / 0.176557 (-0.086597) | 0.144530 / 0.737135 (-0.592606) | 0.091427 / 0.296338 (-0.204911) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.462311 / 0.215209 (0.247102) | 4.605063 / 2.077655 (2.527408) | 2.541083 / 1.504120 (1.036963) | 2.356341 / 1.541195 (0.815147) | 2.389824 / 1.468490 (0.921334) | 0.507397 / 4.584777 (-4.077380) | 3.079023 / 3.745712 (-0.666689) | 2.792025 / 5.269862 (-2.477837) | 1.846931 / 4.565676 (-2.718746) | 0.058422 / 0.424275 (-0.365853) | 0.006409 / 0.007607 (-0.001199) | 0.530648 / 0.226044 (0.304604) | 5.321030 / 2.268929 (3.052101) | 2.978335 / 55.444624 (-52.466289) | 2.641188 / 6.876477 (-4.235288) | 2.780450 / 2.142072 (0.638378) | 0.593864 / 4.805227 (-4.211363) | 0.125394 / 6.500664 (-6.375270) | 0.061432 / 0.075469 (-0.014037) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.337142 / 1.841788 (-0.504646) | 18.841575 / 8.074308 (10.767267) | 14.678622 / 10.191392 (4.487230) | 0.144491 / 0.680424 (-0.535933) | 0.018145 / 0.534201 (-0.516056) | 0.339376 / 0.579283 (-0.239907) | 0.339129 / 0.434364 (-0.095235) | 0.394842 / 0.540337 (-0.145495) | 0.547924 / 1.386936 (-0.839012) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#57af0ab30796df59d28bf933e756ffbe5f34db1e \"CML watermark\")\n", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006478 / 0.011353 (-0.004875) | 0.003845 / 0.011008 (-0.007163) | 0.084179 / 0.038508 (0.045671) | 0.071327 / 0.023109 (0.048217) | 0.315206 / 0.275898 (0.039308) | 0.353477 / 0.323480 (0.029997) | 0.005267 / 0.007986 (-0.002719) | 0.003282 / 0.004328 (-0.001046) | 0.064062 / 0.004250 (0.059811) | 0.051940 / 0.037052 (0.014888) | 0.332004 / 0.258489 (0.073515) | 0.363199 / 0.293841 (0.069358) | 0.030546 / 0.128546 (-0.098000) | 0.008453 / 0.075646 (-0.067193) | 0.287636 / 0.419271 (-0.131636) | 0.051999 / 0.043533 (0.008466) | 0.325220 / 0.255139 (0.070081) | 0.355324 / 0.283200 (0.072125) | 0.023417 / 0.141683 (-0.118266) | 1.473370 / 1.452155 (0.021215) | 1.596903 / 1.492716 (0.104186) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.212645 / 0.018006 (0.194638) | 0.463766 / 0.000490 (0.463276) | 0.002834 / 0.000200 (0.002634) | 0.000079 / 0.000054 (0.000024) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.028424 / 0.037411 (-0.008987) | 0.082188 / 0.014526 (0.067662) | 0.777186 / 0.176557 (0.600629) | 0.218290 / 0.737135 (-0.518845) | 0.099098 / 0.296338 (-0.197240) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.387138 / 0.215209 (0.171929) | 3.845655 / 2.077655 (1.768000) | 1.929812 / 1.504120 (0.425692) | 1.718263 / 1.541195 (0.177069) | 1.760933 / 1.468490 (0.292443) | 0.475171 / 4.584777 (-4.109606) | 3.523366 / 3.745712 (-0.222346) | 3.167322 / 5.269862 (-2.102540) | 1.975164 / 4.565676 (-2.590513) | 0.056106 / 0.424275 (-0.368169) | 0.007448 / 0.007607 (-0.000159) | 0.459824 / 0.226044 (0.233779) | 4.590566 / 2.268929 (2.321638) | 2.377968 / 55.444624 (-53.066656) | 2.034052 / 6.876477 (-4.842425) | 2.224976 / 2.142072 (0.082904) | 0.575901 / 4.805227 (-4.229326) | 0.131546 / 6.500664 (-6.369118) | 0.059266 / 0.075469 (-0.016203) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.254783 / 1.841788 (-0.587005) | 19.497795 / 8.074308 (11.423487) | 13.937672 / 10.191392 (3.746280) | 0.164092 / 0.680424 (-0.516332) | 0.017915 / 0.534201 (-0.516286) | 0.391430 / 0.579283 (-0.187853) | 0.403681 / 0.434364 (-0.030683) | 0.457711 / 0.540337 (-0.082626) | 0.620395 / 1.386936 (-0.766541) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006793 / 0.011353 (-0.004560) | 0.004101 / 0.011008 (-0.006907) | 0.064780 / 0.038508 (0.026272) | 0.071087 / 0.023109 (0.047977) | 0.401963 / 0.275898 (0.126065) | 0.433085 / 0.323480 (0.109605) | 0.005348 / 0.007986 (-0.002638) | 0.003289 / 0.004328 (-0.001039) | 0.065209 / 0.004250 (0.060958) | 0.054202 / 0.037052 (0.017150) | 0.405629 / 0.258489 (0.147140) | 0.440326 / 0.293841 (0.146485) | 0.032283 / 0.128546 (-0.096263) | 0.008510 / 0.075646 (-0.067137) | 0.071144 / 0.419271 (-0.348127) | 0.047414 / 0.043533 (0.003881) | 0.402065 / 0.255139 (0.146926) | 0.421217 / 0.283200 (0.138017) | 0.021924 / 0.141683 (-0.119759) | 1.490067 / 1.452155 (0.037913) | 1.539134 / 1.492716 (0.046417) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.280072 / 0.018006 (0.262066) | 0.456130 / 0.000490 (0.455641) | 0.020926 / 0.000200 (0.020726) | 0.000107 / 0.000054 (0.000053) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.032040 / 0.037411 (-0.005371) | 0.092343 / 0.014526 (0.077817) | 0.104866 / 0.176557 (-0.071690) | 0.156631 / 0.737135 (-0.580505) | 0.107203 / 0.296338 (-0.189136) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.426268 / 0.215209 (0.211059) | 4.255539 / 2.077655 (2.177884) | 2.285077 / 1.504120 (0.780957) | 2.114277 / 1.541195 (0.573083) | 2.159242 / 1.468490 (0.690752) | 0.489421 / 4.584777 (-4.095356) | 3.630797 / 3.745712 (-0.114915) | 3.205238 / 5.269862 (-2.064624) | 1.985846 / 4.565676 (-2.579830) | 0.057436 / 0.424275 (-0.366839) | 0.007154 / 0.007607 (-0.000454) | 0.507294 / 0.226044 (0.281250) | 5.050105 / 2.268929 (2.781176) | 2.750474 / 55.444624 (-52.694151) | 2.404116 / 6.876477 (-4.472360) | 2.576483 / 2.142072 (0.434411) | 0.584909 / 4.805227 (-4.220318) | 0.130695 / 6.500664 (-6.369969) | 0.059743 / 0.075469 (-0.015726) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.352702 / 1.841788 (-0.489086) | 19.687944 / 8.074308 (11.613636) | 14.991847 / 10.191392 (4.800455) | 0.185164 / 0.680424 (-0.495260) | 0.020314 / 0.534201 (-0.513887) | 0.395162 / 0.579283 (-0.184121) | 0.408917 / 0.434364 (-0.025447) | 0.467049 / 0.540337 (-0.073288) | 0.649209 / 1.386936 (-0.737727) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#885518608ceab83b7ed8ceba7a0b72bc68096026 \"CML watermark\")\n" ]
"2023-08-24T16:16:09"
"2023-08-24T16:25:25"
null
CONTRIBUTOR
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6177/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6177/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6177.diff", "html_url": "https://github.com/huggingface/datasets/pull/6177", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6177.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6177" }
true
https://api.github.com/repos/huggingface/datasets/issues/6176
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6176/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6176/comments
https://api.github.com/repos/huggingface/datasets/issues/6176/events
https://github.com/huggingface/datasets/issues/6176
1,864,436,408
I_kwDODunzps5vIQq4
6,176
how to limit the size of memory mapped file?
{ "avatar_url": "https://avatars.githubusercontent.com/u/47763855?v=4", "events_url": "https://api.github.com/users/williamium3000/events{/privacy}", "followers_url": "https://api.github.com/users/williamium3000/followers", "following_url": "https://api.github.com/users/williamium3000/following{/other_user}", "gists_url": "https://api.github.com/users/williamium3000/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/williamium3000", "id": 47763855, "login": "williamium3000", "node_id": "MDQ6VXNlcjQ3NzYzODU1", "organizations_url": "https://api.github.com/users/williamium3000/orgs", "received_events_url": "https://api.github.com/users/williamium3000/received_events", "repos_url": "https://api.github.com/users/williamium3000/repos", "site_admin": false, "starred_url": "https://api.github.com/users/williamium3000/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/williamium3000/subscriptions", "type": "User", "url": "https://api.github.com/users/williamium3000" }
[]
open
false
null
[]
null
[ "Hi! Can you share the error this reproducer throws in your environment? `streaming=True` streams the dataset as it's iterated over without creating a memory-map file.", "The trace of the error. Streaming works but is slower.\r\n```\r\nRoot Cause (first observed failure):\r\n[0]:\r\n time : 2023-08-24_06:06:01\r\n host : compute-126.cm.cluster\r\n rank : 0 (local_rank: 0)\r\n exitcode : 1 (pid: 48442)\r\n error_file: /tmp/torchelastic_4fqzcuuz/none_rx2470jl/attempt_0/0/error.json\r\n traceback : Traceback (most recent call last):\r\n File \"/users/yli7/.conda/envs/pytorch2.0/lib/python3.8/site-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py\", line 346, in wrapper\r\n return f(*args, **kwargs)\r\n File \"Pretrain.py\", line 214, in main\r\n pair_dataset, c4_dataset = create_dataset('pretrain', config)\r\n File \"/dcs05/qiao/data/william/project/DaVinci/dataset/__init__.py\", line 109, in create_dataset\r\n c4_dataset = load_dataset(\"c4\", \"en\", split=\"train\").to_iterable_dataset(num_shards=1024).map(pre_caption_huggingface)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/load.py\", line 1810, in load_dataset\r\n ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/builder.py\", line 1145, in as_dataset\r\n datasets = map_nested(\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/utils/py_utils.py\", line 436, in map_nested\r\n return function(data_struct)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/builder.py\", line 1175, in _build_single_dataset\r\n ds = self._as_dataset(\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/builder.py\", line 1246, in _as_dataset\r\n dataset_kwargs = ArrowReader(cache_dir, self.info).read(\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/arrow_reader.py\", line 244, in read\r\n return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/arrow_reader.py\", line 265, in read_files\r\n pa_table = self._read_files(files, in_memory=in_memory)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/arrow_reader.py\", line 200, in _read_files\r\n pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/arrow_reader.py\", line 336, in _get_table_from_filename\r\n table = ArrowReader.read_table(filename, in_memory=in_memory)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/arrow_reader.py\", line 357, in read_table\r\n return table_cls.from_file(filename)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/table.py\", line 1059, in from_file\r\n table = _memory_mapped_arrow_table_from_file(filename)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/table.py\", line 65, in _memory_mapped_arrow_table_from_file\r\n opened_stream = _memory_mapped_record_batch_reader_from_file(filename)\r\n File \"/users/yli7/.local/lib/python3.8/site-packages/datasets/table.py\", line 50, in _memory_mapped_record_batch_reader_from_file\r\n memory_mapped_stream = pa.memory_map(filename)\r\n File \"pyarrow/io.pxi\", line 1009, in pyarrow.lib.memory_map\r\n File \"pyarrow/io.pxi\", line 956, in pyarrow.lib.MemoryMappedFile._open\r\n File \"pyarrow/error.pxi\", line 144, in pyarrow.lib.pyarrow_internal_check_status\r\n File \"pyarrow/error.pxi\", line 115, in pyarrow.lib.check_status\r\n OSError: Memory mapping file failed: Cannot allocate memory\r\n```" ]
"2023-08-24T05:33:45"
"2023-08-24T17:32:00"
null
NONE
null
### Describe the bug Huggingface datasets use memory-mapped file to map large datasets in memory for fast access. However, it seems like huggingface will occupy all the memory for memory-mapped files, which makes a troublesome situation since we cluster will distribute a small portion of memory to me (once it's over the limit, memory cannot be allocated), however, when the dataset checks the total memory, all of the memory will be taken into account which makes huggingface dataset try to allocate more memory than allowed. So is there a way to explicitly limit the size of memory mapped file? ### Steps to reproduce the bug python >>> from datasets import load_dataset >>> dataset = load_dataset("c4", "en", streaming=True) ### Expected behavior In a normal environment, this will not have any problem. However, when the system allocates a portion of the memory to the program and when the dataset checks the total memory, all of the memory will be taken into account which makes huggingface dataset try to allocate more memory than allowed. ### Environment info linux cluster with SGE(Sun Grid Engine)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6176/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6176/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6175
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6175/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6175/comments
https://api.github.com/repos/huggingface/datasets/issues/6175/events
https://github.com/huggingface/datasets/pull/6175
1,863,592,678
PR_kwDODunzps5YnKlx
6,175
PyArrow 13 CI fixes
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
open
false
null
[]
null
[ "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006095 / 0.011353 (-0.005258) | 0.003580 / 0.011008 (-0.007429) | 0.080146 / 0.038508 (0.041638) | 0.063445 / 0.023109 (0.040336) | 0.321930 / 0.275898 (0.046032) | 0.397933 / 0.323480 (0.074453) | 0.003455 / 0.007986 (-0.004531) | 0.002856 / 0.004328 (-0.001472) | 0.062938 / 0.004250 (0.058687) | 0.048896 / 0.037052 (0.011843) | 0.333070 / 0.258489 (0.074581) | 0.404485 / 0.293841 (0.110644) | 0.027156 / 0.128546 (-0.101390) | 0.007974 / 0.075646 (-0.067672) | 0.261505 / 0.419271 (-0.157766) | 0.045328 / 0.043533 (0.001795) | 0.311203 / 0.255139 (0.056064) | 0.390006 / 0.283200 (0.106806) | 0.023650 / 0.141683 (-0.118033) | 1.468856 / 1.452155 (0.016701) | 1.503867 / 1.492716 (0.011151) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.202110 / 0.018006 (0.184103) | 0.436433 / 0.000490 (0.435944) | 0.002278 / 0.000200 (0.002078) | 0.000070 / 0.000054 (0.000016) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.024575 / 0.037411 (-0.012836) | 0.073005 / 0.014526 (0.058479) | 0.083609 / 0.176557 (-0.092947) | 0.144881 / 0.737135 (-0.592254) | 0.083495 / 0.296338 (-0.212844) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.398911 / 0.215209 (0.183702) | 3.994035 / 2.077655 (1.916381) | 2.056768 / 1.504120 (0.552649) | 1.913242 / 1.541195 (0.372047) | 1.932934 / 1.468490 (0.464444) | 0.498953 / 4.584777 (-4.085824) | 3.031107 / 3.745712 (-0.714605) | 2.817165 / 5.269862 (-2.452696) | 1.858886 / 4.565676 (-2.706790) | 0.056977 / 0.424275 (-0.367299) | 0.006634 / 0.007607 (-0.000973) | 0.472580 / 0.226044 (0.246536) | 4.738301 / 2.268929 (2.469372) | 2.373938 / 55.444624 (-53.070686) | 2.021057 / 6.876477 (-4.855420) | 2.195419 / 2.142072 (0.053346) | 0.585182 / 4.805227 (-4.220045) | 0.124260 / 6.500664 (-6.376405) | 0.060250 / 0.075469 (-0.015219) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.227350 / 1.841788 (-0.614438) | 18.496525 / 8.074308 (10.422216) | 13.946658 / 10.191392 (3.755266) | 0.140024 / 0.680424 (-0.540399) | 0.017077 / 0.534201 (-0.517124) | 0.334415 / 0.579283 (-0.244868) | 0.351118 / 0.434364 (-0.083246) | 0.379556 / 0.540337 (-0.160782) | 0.525064 / 1.386936 (-0.861872) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006176 / 0.011353 (-0.005177) | 0.003648 / 0.011008 (-0.007360) | 0.063461 / 0.038508 (0.024953) | 0.062770 / 0.023109 (0.039660) | 0.448786 / 0.275898 (0.172888) | 0.486490 / 0.323480 (0.163010) | 0.005527 / 0.007986 (-0.002458) | 0.002860 / 0.004328 (-0.001469) | 0.063803 / 0.004250 (0.059553) | 0.049657 / 0.037052 (0.012604) | 0.449625 / 0.258489 (0.191136) | 0.489378 / 0.293841 (0.195537) | 0.028406 / 0.128546 (-0.100140) | 0.008062 / 0.075646 (-0.067584) | 0.068417 / 0.419271 (-0.350854) | 0.040854 / 0.043533 (-0.002678) | 0.461670 / 0.255139 (0.206531) | 0.481622 / 0.283200 (0.198423) | 0.021018 / 0.141683 (-0.120665) | 1.450328 / 1.452155 (-0.001826) | 1.501283 / 1.492716 (0.008567) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.269824 / 0.018006 (0.251817) | 0.412296 / 0.000490 (0.411807) | 0.039582 / 0.000200 (0.039382) | 0.000266 / 0.000054 (0.000211) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.026436 / 0.037411 (-0.010976) | 0.080633 / 0.014526 (0.066107) | 0.089786 / 0.176557 (-0.086770) | 0.145020 / 0.737135 (-0.592115) | 0.092327 / 0.296338 (-0.204012) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.464349 / 0.215209 (0.249140) | 4.630631 / 2.077655 (2.552976) | 2.560527 / 1.504120 (1.056407) | 2.374195 / 1.541195 (0.833000) | 2.424774 / 1.468490 (0.956284) | 0.510428 / 4.584777 (-4.074349) | 3.099805 / 3.745712 (-0.645907) | 2.781096 / 5.269862 (-2.488765) | 1.854276 / 4.565676 (-2.711400) | 0.058102 / 0.424275 (-0.366173) | 0.006365 / 0.007607 (-0.001242) | 0.534082 / 0.226044 (0.308038) | 5.355003 / 2.268929 (3.086074) | 3.012546 / 55.444624 (-52.432078) | 2.665222 / 6.876477 (-4.211255) | 2.821014 / 2.142072 (0.678942) | 0.597733 / 4.805227 (-4.207494) | 0.125433 / 6.500664 (-6.375231) | 0.060802 / 0.075469 (-0.014667) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.345699 / 1.841788 (-0.496088) | 18.836083 / 8.074308 (10.761774) | 14.895458 / 10.191392 (4.704066) | 0.146843 / 0.680424 (-0.533581) | 0.018082 / 0.534201 (-0.516119) | 0.335729 / 0.579283 (-0.243554) | 0.351013 / 0.434364 (-0.083351) | 0.388435 / 0.540337 (-0.151902) | 0.543826 / 1.386936 (-0.843110) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#d0c7e8c4808a1fb6ee7234b4caa25aa9fcfdc88f \"CML watermark\")\n", "_The documentation is not available anymore as the PR was closed or merged._", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006593 / 0.011353 (-0.004760) | 0.004089 / 0.011008 (-0.006919) | 0.084753 / 0.038508 (0.046245) | 0.079899 / 0.023109 (0.056790) | 0.311528 / 0.275898 (0.035630) | 0.349722 / 0.323480 (0.026243) | 0.004288 / 0.007986 (-0.003698) | 0.004552 / 0.004328 (0.000224) | 0.065896 / 0.004250 (0.061646) | 0.053813 / 0.037052 (0.016760) | 0.316958 / 0.258489 (0.058469) | 0.367011 / 0.293841 (0.073170) | 0.031082 / 0.128546 (-0.097464) | 0.008684 / 0.075646 (-0.066963) | 0.288003 / 0.419271 (-0.131268) | 0.052560 / 0.043533 (0.009027) | 0.305589 / 0.255139 (0.050450) | 0.349656 / 0.283200 (0.066457) | 0.023857 / 0.141683 (-0.117826) | 1.462360 / 1.452155 (0.010205) | 1.568170 / 1.492716 (0.075454) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.272342 / 0.018006 (0.254336) | 0.585108 / 0.000490 (0.584618) | 0.003427 / 0.000200 (0.003227) | 0.000078 / 0.000054 (0.000023) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.030347 / 0.037411 (-0.007064) | 0.086325 / 0.014526 (0.071799) | 0.100958 / 0.176557 (-0.075598) | 0.156534 / 0.737135 (-0.580601) | 0.102506 / 0.296338 (-0.193832) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.406625 / 0.215209 (0.191416) | 4.065957 / 2.077655 (1.988302) | 2.075867 / 1.504120 (0.571747) | 1.914390 / 1.541195 (0.373196) | 2.013321 / 1.468490 (0.544831) | 0.486832 / 4.584777 (-4.097945) | 3.545940 / 3.745712 (-0.199772) | 3.323226 / 5.269862 (-1.946635) | 2.067742 / 4.565676 (-2.497934) | 0.057884 / 0.424275 (-0.366391) | 0.007751 / 0.007607 (0.000144) | 0.484923 / 0.226044 (0.258878) | 4.844885 / 2.268929 (2.575956) | 2.569828 / 55.444624 (-52.874796) | 2.224058 / 6.876477 (-4.652419) | 2.485587 / 2.142072 (0.343515) | 0.584311 / 4.805227 (-4.220916) | 0.134984 / 6.500664 (-6.365680) | 0.062164 / 0.075469 (-0.013305) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.247182 / 1.841788 (-0.594605) | 20.107500 / 8.074308 (12.033192) | 14.194444 / 10.191392 (4.003052) | 0.147134 / 0.680424 (-0.533290) | 0.018062 / 0.534201 (-0.516138) | 0.392029 / 0.579283 (-0.187254) | 0.402991 / 0.434364 (-0.031373) | 0.457600 / 0.540337 (-0.082737) | 0.632553 / 1.386936 (-0.754383) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006920 / 0.011353 (-0.004433) | 0.004257 / 0.011008 (-0.006751) | 0.065233 / 0.038508 (0.026725) | 0.078151 / 0.023109 (0.055042) | 0.389141 / 0.275898 (0.113243) | 0.431518 / 0.323480 (0.108038) | 0.005752 / 0.007986 (-0.002234) | 0.003584 / 0.004328 (-0.000745) | 0.065173 / 0.004250 (0.060922) | 0.059113 / 0.037052 (0.022060) | 0.398225 / 0.258489 (0.139736) | 0.430980 / 0.293841 (0.137139) | 0.032802 / 0.128546 (-0.095744) | 0.008702 / 0.075646 (-0.066945) | 0.071345 / 0.419271 (-0.347926) | 0.048269 / 0.043533 (0.004736) | 0.389264 / 0.255139 (0.134125) | 0.416008 / 0.283200 (0.132809) | 0.024845 / 0.141683 (-0.116838) | 1.499100 / 1.452155 (0.046945) | 1.576397 / 1.492716 (0.083681) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.296674 / 0.018006 (0.278668) | 0.540108 / 0.000490 (0.539619) | 0.004293 / 0.000200 (0.004093) | 0.000151 / 0.000054 (0.000096) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.034108 / 0.037411 (-0.003303) | 0.092747 / 0.014526 (0.078221) | 0.112203 / 0.176557 (-0.064354) | 0.162728 / 0.737135 (-0.574407) | 0.109955 / 0.296338 (-0.186383) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.432006 / 0.215209 (0.216797) | 4.297591 / 2.077655 (2.219937) | 2.379645 / 1.504120 (0.875525) | 2.218680 / 1.541195 (0.677485) | 2.314608 / 1.468490 (0.846117) | 0.495562 / 4.584777 (-4.089215) | 3.589787 / 3.745712 (-0.155925) | 3.349593 / 5.269862 (-1.920268) | 2.119893 / 4.565676 (-2.445783) | 0.057976 / 0.424275 (-0.366299) | 0.007612 / 0.007607 (0.000005) | 0.509422 / 0.226044 (0.283378) | 5.101444 / 2.268929 (2.832515) | 2.794532 / 55.444624 (-52.650092) | 2.459033 / 6.876477 (-4.417444) | 2.714424 / 2.142072 (0.572352) | 0.588444 / 4.805227 (-4.216784) | 0.135763 / 6.500664 (-6.364901) | 0.062593 / 0.075469 (-0.012876) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.361415 / 1.841788 (-0.480372) | 20.940684 / 8.074308 (12.866376) | 15.161364 / 10.191392 (4.969972) | 0.154243 / 0.680424 (-0.526181) | 0.020305 / 0.534201 (-0.513896) | 0.397438 / 0.579283 (-0.181845) | 0.415047 / 0.434364 (-0.019317) | 0.473250 / 0.540337 (-0.067088) | 0.740681 / 1.386936 (-0.646255) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#6e84937af4f24194bf61f09244ebef6528fb7c4c \"CML watermark\")\n" ]
"2023-08-23T15:45:53"
"2023-08-24T12:37:41"
null
CONTRIBUTOR
null
Fixes: * bumps the PyArrow version check in the `cast_array_to_feature` to avoid the offset bug (still not fixed) * aligns the Pandas formatting tests with the Numpy ones (the current test fails due to https://github.com/apache/arrow/pull/35656, which requires `.to_pandas(coerce_temporal_nanoseconds=True)` to always return `datetime [ns]` objects) Fix #6173
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6175/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6175/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6175.diff", "html_url": "https://github.com/huggingface/datasets/pull/6175", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6175.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6175" }
true
https://api.github.com/repos/huggingface/datasets/issues/6173
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6173/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6173/comments
https://api.github.com/repos/huggingface/datasets/issues/6173/events
https://github.com/huggingface/datasets/issues/6173
1,863,422,065
I_kwDODunzps5vEZBx
6,173
Fix CI for pyarrow 13.0.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
open
false
null
[]
null
[]
"2023-08-23T14:11:20"
"2023-08-23T14:45:42"
null
MEMBER
null
pyarrow 13.0.0 just came out ``` FAILED tests/test_formatting.py::ArrowExtractorTest::test_pandas_extractor - AssertionError: Attributes of Series are different Attribute "dtype" are different [left]: datetime64[us, UTC] [right]: datetime64[ns, UTC] ``` ``` FAILED tests/test_table.py::test_cast_sliced_fixed_size_array_to_features - TypeError: Couldn't cast array of type fixed_size_list<item: int32>[3] to Sequence(feature=Value(dtype='int64', id=None), length=3, id=None) ``` e.g. in https://github.com/huggingface/datasets/actions/runs/5952253963/job/16143847230 first error may be related to https://github.com/apache/arrow/issues/33321 second one maybe because `feature.length * len(array) == len(array_values)` is not satisfied anymore somehow ?
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 1, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/6173/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6173/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6172
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6172/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6172/comments
https://api.github.com/repos/huggingface/datasets/issues/6172/events
https://github.com/huggingface/datasets/issues/6172
1,863,318,027
I_kwDODunzps5vD_oL
6,172
Make Dataset streaming queries retryable
{ "avatar_url": "https://avatars.githubusercontent.com/u/42299342?v=4", "events_url": "https://api.github.com/users/rojagtap/events{/privacy}", "followers_url": "https://api.github.com/users/rojagtap/followers", "following_url": "https://api.github.com/users/rojagtap/following{/other_user}", "gists_url": "https://api.github.com/users/rojagtap/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rojagtap", "id": 42299342, "login": "rojagtap", "node_id": "MDQ6VXNlcjQyMjk5MzQy", "organizations_url": "https://api.github.com/users/rojagtap/orgs", "received_events_url": "https://api.github.com/users/rojagtap/received_events", "repos_url": "https://api.github.com/users/rojagtap/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rojagtap/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rojagtap/subscriptions", "type": "User", "url": "https://api.github.com/users/rojagtap" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
open
false
null
[]
null
[ "Hi! The streaming mode also retries requests - `datasets.config.STREAMING_READ_MAX_RETRIES` (20 sec by default) controls the number of retries and `datasets.config.STREAMING_READ_RETRY_INTERVAL` (5 sec) the sleep time between retries.\r\n\r\n> At step 1800 I got a 504 HTTP status code error from Huggingface hub for my pytorch dataloader\r\n\r\nA minor Hub outage that we experienced yesterday could be the cause." ]
"2023-08-23T13:15:38"
"2023-08-24T14:29:27"
null
NONE
null
### Feature request Streaming datasets, as intended, do not load the entire dataset in memory or disk. However, while querying the next data chunk from the remote, sometimes it is possible that the service is down or there might be other issues that may cause the query to fail. In such a scenario, it would be nice to make these queries retryable (perhaps with a backoff strategy). ### Motivation I was working on a model and the model checkpoints after every 1000 steps. At step 1800 I got a 504 HTTP status code error from Huggingface hub for my pytorch `dataloader`. Given the size of my model and data, it took around 2 hours to reach 1800 steps and now it will take about an hour to recover the lost 800. It would be better to get a retryable querying strategy. ### Your contribution It would be better if someone having experience in this area takes this up as this would require some testing.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6172/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6172/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6171
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6171/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6171/comments
https://api.github.com/repos/huggingface/datasets/issues/6171/events
https://github.com/huggingface/datasets/pull/6171
1,862,922,767
PR_kwDODunzps5Yk4AS
6,171
Fix typo in about_mapstyle_vs_iterable.mdx
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6171). All of your documentation changes will be reflected on that endpoint.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.009315 / 0.011353 (-0.002038) | 0.004931 / 0.011008 (-0.006077) | 0.100534 / 0.038508 (0.062026) | 0.089270 / 0.023109 (0.066161) | 0.394995 / 0.275898 (0.119097) | 0.440244 / 0.323480 (0.116764) | 0.006026 / 0.007986 (-0.001959) | 0.004252 / 0.004328 (-0.000077) | 0.078828 / 0.004250 (0.074577) | 0.066770 / 0.037052 (0.029718) | 0.411152 / 0.258489 (0.152663) | 0.445616 / 0.293841 (0.151775) | 0.048344 / 0.128546 (-0.080203) | 0.013700 / 0.075646 (-0.061946) | 0.361205 / 0.419271 (-0.058066) | 0.072085 / 0.043533 (0.028552) | 0.399173 / 0.255139 (0.144034) | 0.439334 / 0.283200 (0.156134) | 0.035815 / 0.141683 (-0.105868) | 1.779023 / 1.452155 (0.326868) | 1.865099 / 1.492716 (0.372383) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.275978 / 0.018006 (0.257972) | 0.588850 / 0.000490 (0.588360) | 0.004953 / 0.000200 (0.004754) | 0.000109 / 0.000054 (0.000055) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031329 / 0.037411 (-0.006082) | 0.095435 / 0.014526 (0.080910) | 0.111182 / 0.176557 (-0.065375) | 0.177692 / 0.737135 (-0.559444) | 0.113345 / 0.296338 (-0.182993) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.577882 / 0.215209 (0.362673) | 5.865872 / 2.077655 (3.788217) | 2.664218 / 1.504120 (1.160098) | 2.383354 / 1.541195 (0.842159) | 2.336821 / 1.468490 (0.868331) | 0.834585 / 4.584777 (-3.750192) | 5.418720 / 3.745712 (1.673008) | 4.551790 / 5.269862 (-0.718072) | 2.921874 / 4.565676 (-1.643803) | 0.095738 / 0.424275 (-0.328537) | 0.009625 / 0.007607 (0.002018) | 0.688317 / 0.226044 (0.462273) | 6.831826 / 2.268929 (4.562897) | 3.482607 / 55.444624 (-51.962017) | 2.633482 / 6.876477 (-4.242995) | 2.878786 / 2.142072 (0.736714) | 0.971615 / 4.805227 (-3.833613) | 0.208661 / 6.500664 (-6.292003) | 0.080271 / 0.075469 (0.004802) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.661193 / 1.841788 (-0.180594) | 24.223041 / 8.074308 (16.148733) | 21.621791 / 10.191392 (11.430399) | 0.243809 / 0.680424 (-0.436614) | 0.031630 / 0.534201 (-0.502571) | 0.501408 / 0.579283 (-0.077875) | 0.600002 / 0.434364 (0.165638) | 0.572066 / 0.540337 (0.031728) | 0.791992 / 1.386936 (-0.594944) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.009410 / 0.011353 (-0.001943) | 0.005255 / 0.011008 (-0.005753) | 0.079202 / 0.038508 (0.040693) | 0.078973 / 0.023109 (0.055863) | 0.557416 / 0.275898 (0.281518) | 0.560417 / 0.323480 (0.236937) | 0.007066 / 0.007986 (-0.000920) | 0.004560 / 0.004328 (0.000232) | 0.080359 / 0.004250 (0.076109) | 0.060071 / 0.037052 (0.023019) | 0.538441 / 0.258489 (0.279952) | 0.592486 / 0.293841 (0.298645) | 0.053221 / 0.128546 (-0.075325) | 0.014056 / 0.075646 (-0.061591) | 0.094084 / 0.419271 (-0.325188) | 0.066721 / 0.043533 (0.023188) | 0.521873 / 0.255139 (0.266734) | 0.579637 / 0.283200 (0.296437) | 0.041476 / 0.141683 (-0.100206) | 1.829681 / 1.452155 (0.377527) | 1.948418 / 1.492716 (0.455702) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.347594 / 0.018006 (0.329588) | 0.606906 / 0.000490 (0.606417) | 0.035413 / 0.000200 (0.035213) | 0.000371 / 0.000054 (0.000317) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031987 / 0.037411 (-0.005425) | 0.096985 / 0.014526 (0.082459) | 0.109275 / 0.176557 (-0.067282) | 0.175340 / 0.737135 (-0.561795) | 0.110763 / 0.296338 (-0.185575) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.634823 / 0.215209 (0.419614) | 6.527172 / 2.077655 (4.449517) | 3.135709 / 1.504120 (1.631589) | 2.634357 / 1.541195 (1.093162) | 2.670583 / 1.468490 (1.202093) | 0.888686 / 4.584777 (-3.696091) | 5.382289 / 3.745712 (1.636577) | 4.701189 / 5.269862 (-0.568673) | 3.161290 / 4.565676 (-1.404386) | 0.112414 / 0.424275 (-0.311861) | 0.009443 / 0.007607 (0.001836) | 0.774703 / 0.226044 (0.548658) | 7.905334 / 2.268929 (5.636405) | 3.689548 / 55.444624 (-51.755076) | 3.087263 / 6.876477 (-3.789214) | 3.366568 / 2.142072 (1.224496) | 1.185951 / 4.805227 (-3.619277) | 0.248638 / 6.500664 (-6.252026) | 0.104598 / 0.075469 (0.029129) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.820667 / 1.841788 (-0.021120) | 24.536703 / 8.074308 (16.462395) | 23.083964 / 10.191392 (12.892572) | 0.252897 / 0.680424 (-0.427527) | 0.032954 / 0.534201 (-0.501247) | 0.482467 / 0.579283 (-0.096816) | 0.602247 / 0.434364 (0.167883) | 0.600563 / 0.540337 (0.060225) | 0.824013 / 1.386936 (-0.562923) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#c07a54ed4d570c5842d7bbe467025805be16ef51 \"CML watermark\")\n", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.009242 / 0.011353 (-0.002111) | 0.005244 / 0.011008 (-0.005764) | 0.112678 / 0.038508 (0.074170) | 0.089176 / 0.023109 (0.066067) | 0.405823 / 0.275898 (0.129925) | 0.465703 / 0.323480 (0.142223) | 0.005227 / 0.007986 (-0.002758) | 0.004296 / 0.004328 (-0.000032) | 0.082961 / 0.004250 (0.078711) | 0.063144 / 0.037052 (0.026092) | 0.422369 / 0.258489 (0.163880) | 0.478185 / 0.293841 (0.184344) | 0.049770 / 0.128546 (-0.078776) | 0.016561 / 0.075646 (-0.059086) | 0.380172 / 0.419271 (-0.039100) | 0.068698 / 0.043533 (0.025165) | 0.397773 / 0.255139 (0.142634) | 0.461284 / 0.283200 (0.178084) | 0.036907 / 0.141683 (-0.104775) | 1.828017 / 1.452155 (0.375862) | 2.028385 / 1.492716 (0.535669) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.291245 / 0.018006 (0.273239) | 0.605519 / 0.000490 (0.605030) | 0.003790 / 0.000200 (0.003590) | 0.000094 / 0.000054 (0.000040) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029269 / 0.037411 (-0.008142) | 0.087014 / 0.014526 (0.072488) | 0.116984 / 0.176557 (-0.059573) | 0.170644 / 0.737135 (-0.566491) | 0.109011 / 0.296338 (-0.187328) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.603045 / 0.215209 (0.387836) | 6.125308 / 2.077655 (4.047653) | 2.637127 / 1.504120 (1.133007) | 2.468636 / 1.541195 (0.927441) | 2.383773 / 1.468490 (0.915283) | 0.838139 / 4.584777 (-3.746638) | 5.355777 / 3.745712 (1.610065) | 4.753015 / 5.269862 (-0.516846) | 3.097486 / 4.565676 (-1.468191) | 0.094749 / 0.424275 (-0.329526) | 0.009040 / 0.007607 (0.001433) | 0.699987 / 0.226044 (0.473942) | 7.111671 / 2.268929 (4.842742) | 3.297798 / 55.444624 (-52.146827) | 2.614578 / 6.876477 (-4.261898) | 2.927717 / 2.142072 (0.785645) | 1.037292 / 4.805227 (-3.767935) | 0.218025 / 6.500664 (-6.282639) | 0.086306 / 0.075469 (0.010836) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.645146 / 1.841788 (-0.196642) | 24.191875 / 8.074308 (16.117567) | 21.844371 / 10.191392 (11.652979) | 0.245369 / 0.680424 (-0.435055) | 0.031776 / 0.534201 (-0.502425) | 0.465634 / 0.579283 (-0.113649) | 0.565498 / 0.434364 (0.131134) | 0.497409 / 0.540337 (-0.042929) | 0.748048 / 1.386936 (-0.638889) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.009239 / 0.011353 (-0.002114) | 0.005345 / 0.011008 (-0.005663) | 0.072732 / 0.038508 (0.034224) | 0.099880 / 0.023109 (0.076770) | 0.466933 / 0.275898 (0.191035) | 0.471730 / 0.323480 (0.148250) | 0.006164 / 0.007986 (-0.001821) | 0.004486 / 0.004328 (0.000158) | 0.075475 / 0.004250 (0.071224) | 0.068291 / 0.037052 (0.031238) | 0.465925 / 0.258489 (0.207436) | 0.469198 / 0.293841 (0.175357) | 0.047304 / 0.128546 (-0.081242) | 0.013368 / 0.075646 (-0.062278) | 0.083563 / 0.419271 (-0.335708) | 0.063204 / 0.043533 (0.019671) | 0.457422 / 0.255139 (0.202283) | 0.478793 / 0.283200 (0.195593) | 0.036120 / 0.141683 (-0.105563) | 1.841209 / 1.452155 (0.389054) | 1.955984 / 1.492716 (0.463267) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.369160 / 0.018006 (0.351154) | 0.607140 / 0.000490 (0.606650) | 0.047253 / 0.000200 (0.047054) | 0.000475 / 0.000054 (0.000420) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.040226 / 0.037411 (0.002815) | 0.107361 / 0.014526 (0.092835) | 0.122424 / 0.176557 (-0.054133) | 0.186447 / 0.737135 (-0.550688) | 0.127060 / 0.296338 (-0.169279) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.706737 / 0.215209 (0.491528) | 6.791287 / 2.077655 (4.713632) | 3.194471 / 1.504120 (1.690352) | 2.928145 / 1.541195 (1.386950) | 2.829078 / 1.468490 (1.360588) | 0.929797 / 4.584777 (-3.654980) | 5.484638 / 3.745712 (1.738926) | 4.841570 / 5.269862 (-0.428292) | 2.995247 / 4.565676 (-1.570430) | 0.104709 / 0.424275 (-0.319566) | 0.009543 / 0.007607 (0.001936) | 0.817605 / 0.226044 (0.591561) | 7.879234 / 2.268929 (5.610305) | 3.838073 / 55.444624 (-51.606551) | 3.189728 / 6.876477 (-3.686749) | 3.483775 / 2.142072 (1.341703) | 1.092823 / 4.805227 (-3.712404) | 0.227660 / 6.500664 (-6.273004) | 0.082452 / 0.075469 (0.006983) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.750413 / 1.841788 (-0.091374) | 27.078082 / 8.074308 (19.003774) | 23.968038 / 10.191392 (13.776646) | 0.248065 / 0.680424 (-0.432359) | 0.029961 / 0.534201 (-0.504240) | 0.508630 / 0.579283 (-0.070653) | 0.608707 / 0.434364 (0.174343) | 0.611062 / 0.540337 (0.070725) | 0.830797 / 1.386936 (-0.556139) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#9d793220dd8cbaa099a3928c2132c94c9f7453bc \"CML watermark\")\n" ]
"2023-08-23T09:21:11"
"2023-08-23T09:32:59"
"2023-08-23T09:21:19"
MEMBER
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6171/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6171/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6171.diff", "html_url": "https://github.com/huggingface/datasets/pull/6171", "merged_at": "2023-08-23T09:21:19Z", "patch_url": "https://github.com/huggingface/datasets/pull/6171.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6171" }
true
https://api.github.com/repos/huggingface/datasets/issues/6170
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6170/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6170/comments
https://api.github.com/repos/huggingface/datasets/issues/6170/events
https://github.com/huggingface/datasets/pull/6170
1,862,705,731
PR_kwDODunzps5YkJOV
6,170
feat: Return the name of the currently loaded file
{ "avatar_url": "https://avatars.githubusercontent.com/u/124021133?v=4", "events_url": "https://api.github.com/users/Amitesh-Patel/events{/privacy}", "followers_url": "https://api.github.com/users/Amitesh-Patel/followers", "following_url": "https://api.github.com/users/Amitesh-Patel/following{/other_user}", "gists_url": "https://api.github.com/users/Amitesh-Patel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Amitesh-Patel", "id": 124021133, "login": "Amitesh-Patel", "node_id": "U_kgDOB2RpjQ", "organizations_url": "https://api.github.com/users/Amitesh-Patel/orgs", "received_events_url": "https://api.github.com/users/Amitesh-Patel/received_events", "repos_url": "https://api.github.com/users/Amitesh-Patel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Amitesh-Patel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Amitesh-Patel/subscriptions", "type": "User", "url": "https://api.github.com/users/Amitesh-Patel" }
[]
open
false
null
[]
null
[]
"2023-08-23T07:08:17"
"2023-08-23T07:09:48"
null
NONE
null
Added an optional parameter return_file_name in the load_dataset function. When it is set to True, the function will include the name of the file corresponding to the current line as a feature in the returned output. I added this here https://github.com/huggingface/datasets/blob/main/src/datasets/packaged_modules/json/json.py#L92. fixes #5806
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6170/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6170/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6170.diff", "html_url": "https://github.com/huggingface/datasets/pull/6170", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6170.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6170" }
true
https://api.github.com/repos/huggingface/datasets/issues/6169
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6169/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6169/comments
https://api.github.com/repos/huggingface/datasets/issues/6169/events
https://github.com/huggingface/datasets/issues/6169
1,862,360,199
I_kwDODunzps5vAVyH
6,169
Configurations in yaml not working
{ "avatar_url": "https://avatars.githubusercontent.com/u/45085098?v=4", "events_url": "https://api.github.com/users/tsor13/events{/privacy}", "followers_url": "https://api.github.com/users/tsor13/followers", "following_url": "https://api.github.com/users/tsor13/following{/other_user}", "gists_url": "https://api.github.com/users/tsor13/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tsor13", "id": 45085098, "login": "tsor13", "node_id": "MDQ6VXNlcjQ1MDg1MDk4", "organizations_url": "https://api.github.com/users/tsor13/orgs", "received_events_url": "https://api.github.com/users/tsor13/received_events", "repos_url": "https://api.github.com/users/tsor13/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tsor13/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tsor13/subscriptions", "type": "User", "url": "https://api.github.com/users/tsor13" }
[]
open
false
null
[]
null
[ "Unfortunately, I cannot reproduce this behavior on my machine or Colab - the reproducer returns `['main_data', 'additional_data']` as expected.", "Thank you for looking into this, Mario. Is this on [my repository](https://huggingface.co/datasets/tsor13/test), or on another one that you have reproduced? Would you mind pointing me to it if so?", "Whoa, in colab I received the correct behavior using my dataset. It must have something to do with my local copy of `datasets` (which again just failed).\r\n\r\nI've tried uninstalling/reinstnalling to no avail", "hi @tsor13 , I haven't been able to reproduce your issue on `tsor13/test` dataset locally either. reinstalling doesn't help?" ]
"2023-08-23T00:13:22"
"2023-08-23T15:35:31"
null
NONE
null
### Dataset configurations cannot be created in YAML/README Hello! I'm trying to follow the docs here in order to create structure in my dataset as added from here (#5331): https://github.com/huggingface/datasets/blob/8b8e6ee067eb74e7965ca2a6768f15f9398cb7c8/docs/source/repository_structure.mdx#L110-L118 I have the exact example in my config file for [my data repo](https://huggingface.co/datasets/tsor13/test): ``` configs: - config_name: main_data data_files: "main_data.csv" - config_name: additional_data data_files: "additional_data.csv" ``` Yet, I'm unable to load different configurations: ``` from datasets import get_dataset_config_names get_dataset_config_names('tsor13/test', use_auth_token=True) ``` returns a single split, `['tsor13--test']` Does anyone have any insights? @polinaeterna thank you for adding this feature, it is super useful. Do you happen to have any ideas? ### Steps to reproduce the bug from datasets import get_dataset_config_names get_dataset_config_names('tsor13/test') ### Expected behavior I would expect there to be two splits, `main_data` and `additional_data`. However, only `['tsor13--test']` test is returned. ### Environment info - `datasets` version: 2.14.4 - Platform: macOS-13.4-arm64-arm-64bit - Python version: 3.11.4 - Huggingface_hub version: 0.16.4 - PyArrow version: 12.0.1 - Pandas version: 1.5.1
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6169/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6169/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6168
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6168/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6168/comments
https://api.github.com/repos/huggingface/datasets/issues/6168/events
https://github.com/huggingface/datasets/pull/6168
1,861,867,274
PR_kwDODunzps5YhT7Y
6,168
Fix ArrayXD YAML conversion
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
open
false
null
[]
null
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6168). All of your documentation changes will be reflected on that endpoint.", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.009350 / 0.011353 (-0.002003) | 0.005658 / 0.011008 (-0.005350) | 0.123173 / 0.038508 (0.084664) | 0.096354 / 0.023109 (0.073244) | 0.464398 / 0.275898 (0.188500) | 0.544455 / 0.323480 (0.220975) | 0.007337 / 0.007986 (-0.000648) | 0.004424 / 0.004328 (0.000096) | 0.089715 / 0.004250 (0.085465) | 0.072462 / 0.037052 (0.035410) | 0.460601 / 0.258489 (0.202112) | 0.544384 / 0.293841 (0.250543) | 0.052994 / 0.128546 (-0.075552) | 0.014459 / 0.075646 (-0.061187) | 0.464368 / 0.419271 (0.045096) | 0.072889 / 0.043533 (0.029356) | 0.471387 / 0.255139 (0.216248) | 0.560982 / 0.283200 (0.277783) | 0.041398 / 0.141683 (-0.100285) | 1.964688 / 1.452155 (0.512533) | 2.240727 / 1.492716 (0.748011) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.308524 / 0.018006 (0.290518) | 0.669306 / 0.000490 (0.668816) | 0.006644 / 0.000200 (0.006444) | 0.000108 / 0.000054 (0.000053) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.037395 / 0.037411 (-0.000016) | 0.111303 / 0.014526 (0.096777) | 0.158988 / 0.176557 (-0.017569) | 0.236155 / 0.737135 (-0.500980) | 0.134775 / 0.296338 (-0.161564) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.648830 / 0.215209 (0.433621) | 6.614794 / 2.077655 (4.537139) | 2.867526 / 1.504120 (1.363407) | 2.472967 / 1.541195 (0.931772) | 2.488419 / 1.468490 (1.019929) | 0.915785 / 4.584777 (-3.668992) | 6.010754 / 3.745712 (2.265042) | 5.468873 / 5.269862 (0.199011) | 3.446535 / 4.565676 (-1.119141) | 0.118592 / 0.424275 (-0.305684) | 0.012005 / 0.007607 (0.004398) | 0.808467 / 0.226044 (0.582423) | 8.152122 / 2.268929 (5.883193) | 3.751282 / 55.444624 (-51.693342) | 3.009569 / 6.876477 (-3.866908) | 3.282613 / 2.142072 (1.140540) | 1.152727 / 4.805227 (-3.652500) | 0.240224 / 6.500664 (-6.260440) | 0.097871 / 0.075469 (0.022402) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.824944 / 1.841788 (-0.016843) | 27.840842 / 8.074308 (19.766533) | 24.368669 / 10.191392 (14.177277) | 0.260621 / 0.680424 (-0.419803) | 0.033730 / 0.534201 (-0.500471) | 0.552494 / 0.579283 (-0.026789) | 0.666921 / 0.434364 (0.232557) | 0.648812 / 0.540337 (0.108475) | 0.912602 / 1.386936 (-0.474334) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.011688 / 0.011353 (0.000335) | 0.005794 / 0.011008 (-0.005215) | 0.093466 / 0.038508 (0.054958) | 0.102583 / 0.023109 (0.079474) | 0.593572 / 0.275898 (0.317674) | 0.614351 / 0.323480 (0.290871) | 0.007006 / 0.007986 (-0.000980) | 0.005557 / 0.004328 (0.001229) | 0.087779 / 0.004250 (0.083529) | 0.072639 / 0.037052 (0.035586) | 0.577464 / 0.258489 (0.318975) | 0.628240 / 0.293841 (0.334399) | 0.053876 / 0.128546 (-0.074670) | 0.015383 / 0.075646 (-0.060263) | 0.110633 / 0.419271 (-0.308639) | 0.067467 / 0.043533 (0.023934) | 0.613457 / 0.255139 (0.358318) | 0.604939 / 0.283200 (0.321739) | 0.041738 / 0.141683 (-0.099945) | 1.967167 / 1.452155 (0.515012) | 2.121009 / 1.492716 (0.628293) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.449937 / 0.018006 (0.431930) | 0.694410 / 0.000490 (0.693921) | 0.064051 / 0.000200 (0.063851) | 0.000810 / 0.000054 (0.000756) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.045138 / 0.037411 (0.007727) | 0.116831 / 0.014526 (0.102306) | 0.131906 / 0.176557 (-0.044651) | 0.202421 / 0.737135 (-0.534714) | 0.132568 / 0.296338 (-0.163770) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.698046 / 0.215209 (0.482837) | 7.112591 / 2.077655 (5.034936) | 3.332679 / 1.504120 (1.828559) | 2.946384 / 1.541195 (1.405189) | 3.074484 / 1.468490 (1.605994) | 0.970917 / 4.584777 (-3.613859) | 6.143506 / 3.745712 (2.397794) | 5.572496 / 5.269862 (0.302634) | 3.602673 / 4.565676 (-0.963004) | 0.115068 / 0.424275 (-0.309207) | 0.009971 / 0.007607 (0.002364) | 0.891090 / 0.226044 (0.665046) | 8.761788 / 2.268929 (6.492859) | 4.362685 / 55.444624 (-51.081939) | 3.612893 / 6.876477 (-3.263583) | 3.797948 / 2.142072 (1.655876) | 1.202890 / 4.805227 (-3.602337) | 0.238120 / 6.500664 (-6.262544) | 0.095612 / 0.075469 (0.020143) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.958880 / 1.841788 (0.117092) | 28.216454 / 8.074308 (20.142146) | 25.361424 / 10.191392 (15.170032) | 0.308203 / 0.680424 (-0.372221) | 0.032903 / 0.534201 (-0.501298) | 0.539714 / 0.579283 (-0.039569) | 0.688278 / 0.434364 (0.253914) | 0.644818 / 0.540337 (0.104481) | 0.905694 / 1.386936 (-0.481242) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#a5289345e5b23548fee680a0bbc047c0b9a5ee8c \"CML watermark\")\n" ]
"2023-08-22T17:02:54"
"2023-08-22T17:14:15"
null
CONTRIBUTOR
null
Replace the `shape` tuple with a list in the `ArrayXD` YAML conversion. Fix #6112
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 1, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/6168/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6168/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6168.diff", "html_url": "https://github.com/huggingface/datasets/pull/6168", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6168.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6168" }
true
https://api.github.com/repos/huggingface/datasets/issues/6167
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6167/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6167/comments
https://api.github.com/repos/huggingface/datasets/issues/6167/events
https://github.com/huggingface/datasets/pull/6167
1,861,474,327
PR_kwDODunzps5Yf9-t
6,167
Allow hyphen in split name
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
[ "_The documentation is not available anymore as the PR was closed or merged._", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.007342 / 0.011353 (-0.004011) | 0.004586 / 0.011008 (-0.006422) | 0.100430 / 0.038508 (0.061922) | 0.081053 / 0.023109 (0.057944) | 0.368130 / 0.275898 (0.092232) | 0.402852 / 0.323480 (0.079372) | 0.004504 / 0.007986 (-0.003482) | 0.003824 / 0.004328 (-0.000505) | 0.075326 / 0.004250 (0.071076) | 0.063329 / 0.037052 (0.026277) | 0.372837 / 0.258489 (0.114348) | 0.437857 / 0.293841 (0.144017) | 0.035512 / 0.128546 (-0.093034) | 0.009756 / 0.075646 (-0.065890) | 0.341035 / 0.419271 (-0.078236) | 0.060503 / 0.043533 (0.016970) | 0.362555 / 0.255139 (0.107416) | 0.409216 / 0.283200 (0.126017) | 0.030093 / 0.141683 (-0.111590) | 1.751550 / 1.452155 (0.299395) | 1.848676 / 1.492716 (0.355959) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.229448 / 0.018006 (0.211442) | 0.500300 / 0.000490 (0.499811) | 0.005195 / 0.000200 (0.004995) | 0.000092 / 0.000054 (0.000037) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031753 / 0.037411 (-0.005658) | 0.096075 / 0.014526 (0.081549) | 0.111476 / 0.176557 (-0.065081) | 0.179236 / 0.737135 (-0.557899) | 0.113599 / 0.296338 (-0.182739) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.472817 / 0.215209 (0.257608) | 4.715029 / 2.077655 (2.637374) | 2.417934 / 1.504120 (0.913814) | 2.235014 / 1.541195 (0.693819) | 2.323588 / 1.468490 (0.855098) | 0.553751 / 4.584777 (-4.031026) | 4.153467 / 3.745712 (0.407755) | 3.858836 / 5.269862 (-1.411025) | 2.377499 / 4.565676 (-2.188178) | 0.066528 / 0.424275 (-0.357747) | 0.008979 / 0.007607 (0.001372) | 0.561076 / 0.226044 (0.335032) | 5.609817 / 2.268929 (3.340888) | 3.011098 / 55.444624 (-52.433526) | 2.594162 / 6.876477 (-4.282314) | 2.863597 / 2.142072 (0.721525) | 0.681135 / 4.805227 (-4.124092) | 0.158863 / 6.500664 (-6.341801) | 0.072551 / 0.075469 (-0.002918) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.492230 / 1.841788 (-0.349558) | 23.028828 / 8.074308 (14.954519) | 16.663265 / 10.191392 (6.471873) | 0.173146 / 0.680424 (-0.507278) | 0.021635 / 0.534201 (-0.512566) | 0.478919 / 0.579283 (-0.100364) | 0.472908 / 0.434364 (0.038544) | 0.547248 / 0.540337 (0.006910) | 0.770288 / 1.386936 (-0.616648) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.007728 / 0.011353 (-0.003625) | 0.004477 / 0.011008 (-0.006531) | 0.074858 / 0.038508 (0.036350) | 0.084266 / 0.023109 (0.061157) | 0.420280 / 0.275898 (0.144382) | 0.466835 / 0.323480 (0.143356) | 0.005980 / 0.007986 (-0.002006) | 0.003600 / 0.004328 (-0.000729) | 0.074941 / 0.004250 (0.070691) | 0.066414 / 0.037052 (0.029361) | 0.425949 / 0.258489 (0.167460) | 0.473236 / 0.293841 (0.179395) | 0.037213 / 0.128546 (-0.091333) | 0.009743 / 0.075646 (-0.065903) | 0.083758 / 0.419271 (-0.335513) | 0.057916 / 0.043533 (0.014383) | 0.423031 / 0.255139 (0.167892) | 0.451107 / 0.283200 (0.167907) | 0.028577 / 0.141683 (-0.113106) | 1.810509 / 1.452155 (0.358354) | 1.875579 / 1.492716 (0.382863) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.296052 / 0.018006 (0.278046) | 0.496618 / 0.000490 (0.496128) | 0.028667 / 0.000200 (0.028467) | 0.000140 / 0.000054 (0.000086) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.036694 / 0.037411 (-0.000717) | 0.110873 / 0.014526 (0.096347) | 0.126550 / 0.176557 (-0.050007) | 0.182924 / 0.737135 (-0.554212) | 0.123793 / 0.296338 (-0.172545) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.509881 / 0.215209 (0.294672) | 5.067402 / 2.077655 (2.989747) | 2.696028 / 1.504120 (1.191908) | 2.489861 / 1.541195 (0.948666) | 2.563400 / 1.468490 (1.094910) | 0.571184 / 4.584777 (-4.013593) | 4.154231 / 3.745712 (0.408519) | 3.891004 / 5.269862 (-1.378858) | 2.435290 / 4.565676 (-2.130387) | 0.065825 / 0.424275 (-0.358450) | 0.008460 / 0.007607 (0.000853) | 0.597579 / 0.226044 (0.371534) | 5.914954 / 2.268929 (3.646025) | 3.219305 / 55.444624 (-52.225319) | 2.843548 / 6.876477 (-4.032929) | 3.070300 / 2.142072 (0.928228) | 0.686018 / 4.805227 (-4.119209) | 0.160077 / 6.500664 (-6.340587) | 0.074058 / 0.075469 (-0.001411) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.598748 / 1.841788 (-0.243039) | 23.475685 / 8.074308 (15.401377) | 17.257831 / 10.191392 (7.066439) | 0.176539 / 0.680424 (-0.503885) | 0.021969 / 0.534201 (-0.512232) | 0.473565 / 0.579283 (-0.105718) | 0.465471 / 0.434364 (0.031107) | 0.567107 / 0.540337 (0.026769) | 0.783757 / 1.386936 (-0.603179) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#2f6bb450b4a3065a7d5fc50ea67711082749a337 \"CML watermark\")\n", "Note that the https://github.com/huggingface/datasets-server/ explicitly relies on the fact that a split cannot contain a hyphen. cc @lhoestq ", "We can't enable this that easily unfortunately because it could make arrow file names ambiguous in the cache.\r\n\r\ne.g. dataset_name-train-0000-of-0008.arrow", "Oh, this would indeed make the caching for the multi-proc case ambiguous. Implementing this is only worth it if we get more requests, so I'm closing this PR for now." ]
"2023-08-22T13:30:59"
"2023-08-22T15:39:24"
"2023-08-22T15:38:53"
CONTRIBUTOR
null
To fix https://discuss.huggingface.co/t/error-when-setting-up-the-dataset-viewer-streamingrowserror/51276.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6167/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6167/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6167.diff", "html_url": "https://github.com/huggingface/datasets/pull/6167", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6167.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6167" }
true
https://api.github.com/repos/huggingface/datasets/issues/6166
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6166/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6166/comments
https://api.github.com/repos/huggingface/datasets/issues/6166/events
https://github.com/huggingface/datasets/pull/6166
1,861,259,055
PR_kwDODunzps5YfOt0
6,166
Document BUILDER_CONFIG_CLASS
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "followers_url": "https://api.github.com/users/lhoestq/followers", "following_url": "https://api.github.com/users/lhoestq/following{/other_user}", "gists_url": "https://api.github.com/users/lhoestq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
[ "_The documentation is not available anymore as the PR was closed or merged._", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.009036 / 0.011353 (-0.002317) | 0.004564 / 0.011008 (-0.006444) | 0.114958 / 0.038508 (0.076449) | 0.087329 / 0.023109 (0.064220) | 0.440111 / 0.275898 (0.164213) | 0.486056 / 0.323480 (0.162576) | 0.006580 / 0.007986 (-0.001406) | 0.004257 / 0.004328 (-0.000072) | 0.093458 / 0.004250 (0.089208) | 0.063380 / 0.037052 (0.026328) | 0.469455 / 0.258489 (0.210966) | 0.521630 / 0.293841 (0.227790) | 0.053496 / 0.128546 (-0.075050) | 0.013466 / 0.075646 (-0.062181) | 0.361629 / 0.419271 (-0.057642) | 0.068095 / 0.043533 (0.024562) | 0.472440 / 0.255139 (0.217301) | 0.508682 / 0.283200 (0.225483) | 0.034648 / 0.141683 (-0.107035) | 1.820117 / 1.452155 (0.367962) | 1.933448 / 1.492716 (0.440732) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.276543 / 0.018006 (0.258537) | 0.563380 / 0.000490 (0.562890) | 0.005345 / 0.000200 (0.005146) | 0.000107 / 0.000054 (0.000053) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029230 / 0.037411 (-0.008181) | 0.095613 / 0.014526 (0.081087) | 0.106178 / 0.176557 (-0.070378) | 0.181095 / 0.737135 (-0.556040) | 0.107789 / 0.296338 (-0.188550) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.612051 / 0.215209 (0.396842) | 6.065008 / 2.077655 (3.987353) | 2.720911 / 1.504120 (1.216791) | 2.495218 / 1.541195 (0.954023) | 2.423351 / 1.468490 (0.954860) | 0.835571 / 4.584777 (-3.749205) | 5.438230 / 3.745712 (1.692518) | 4.550301 / 5.269862 (-0.719561) | 2.919889 / 4.565676 (-1.645788) | 0.097748 / 0.424275 (-0.326527) | 0.009285 / 0.007607 (0.001678) | 0.741968 / 0.226044 (0.515923) | 7.285394 / 2.268929 (5.016466) | 3.433634 / 55.444624 (-52.010991) | 2.680823 / 6.876477 (-4.195654) | 2.931149 / 2.142072 (0.789076) | 1.012852 / 4.805227 (-3.792375) | 0.224899 / 6.500664 (-6.275765) | 0.089411 / 0.075469 (0.013942) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.622759 / 1.841788 (-0.219029) | 23.690030 / 8.074308 (15.615721) | 21.034451 / 10.191392 (10.843059) | 0.241504 / 0.680424 (-0.438920) | 0.030109 / 0.534201 (-0.504092) | 0.472536 / 0.579283 (-0.106747) | 0.631396 / 0.434364 (0.197032) | 0.598997 / 0.540337 (0.058659) | 0.798680 / 1.386936 (-0.588256) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.008696 / 0.011353 (-0.002657) | 0.005032 / 0.011008 (-0.005977) | 0.087369 / 0.038508 (0.048861) | 0.078105 / 0.023109 (0.054996) | 0.464861 / 0.275898 (0.188963) | 0.509620 / 0.323480 (0.186140) | 0.006399 / 0.007986 (-0.001587) | 0.004276 / 0.004328 (-0.000052) | 0.081643 / 0.004250 (0.077393) | 0.062560 / 0.037052 (0.025508) | 0.495377 / 0.258489 (0.236888) | 0.484885 / 0.293841 (0.191044) | 0.054354 / 0.128546 (-0.074193) | 0.013851 / 0.075646 (-0.061795) | 0.089531 / 0.419271 (-0.329740) | 0.068732 / 0.043533 (0.025199) | 0.455842 / 0.255139 (0.200703) | 0.528775 / 0.283200 (0.245575) | 0.039646 / 0.141683 (-0.102037) | 1.733600 / 1.452155 (0.281445) | 1.879074 / 1.492716 (0.386358) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.369616 / 0.018006 (0.351610) | 0.607426 / 0.000490 (0.606936) | 0.055540 / 0.000200 (0.055341) | 0.000543 / 0.000054 (0.000488) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.036026 / 0.037411 (-0.001385) | 0.103968 / 0.014526 (0.089442) | 0.114852 / 0.176557 (-0.061705) | 0.187313 / 0.737135 (-0.549822) | 0.116839 / 0.296338 (-0.179500) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.614018 / 0.215209 (0.398809) | 6.139914 / 2.077655 (4.062259) | 2.826246 / 1.504120 (1.322126) | 2.524133 / 1.541195 (0.982938) | 2.606981 / 1.468490 (1.138491) | 0.844604 / 4.584777 (-3.740173) | 5.537178 / 3.745712 (1.791465) | 4.594624 / 5.269862 (-0.675237) | 3.032145 / 4.565676 (-1.533532) | 0.094771 / 0.424275 (-0.329504) | 0.008132 / 0.007607 (0.000525) | 0.714287 / 0.226044 (0.488242) | 7.296733 / 2.268929 (5.027804) | 3.698066 / 55.444624 (-51.746558) | 2.862781 / 6.876477 (-4.013696) | 3.114502 / 2.142072 (0.972429) | 0.986612 / 4.805227 (-3.818616) | 0.214438 / 6.500664 (-6.286226) | 0.076201 / 0.075469 (0.000732) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.747728 / 1.841788 (-0.094060) | 24.159845 / 8.074308 (16.085537) | 23.553485 / 10.191392 (13.362093) | 0.248387 / 0.680424 (-0.432037) | 0.029850 / 0.534201 (-0.504351) | 0.526416 / 0.579283 (-0.052867) | 0.625681 / 0.434364 (0.191317) | 0.619690 / 0.540337 (0.079352) | 0.827485 / 1.386936 (-0.559451) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#75639f9064dab9549add79fd5ee7de2a4429992c \"CML watermark\")\n", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006728 / 0.011353 (-0.004625) | 0.003960 / 0.011008 (-0.007048) | 0.085569 / 0.038508 (0.047061) | 0.077463 / 0.023109 (0.054354) | 0.343112 / 0.275898 (0.067214) | 0.379128 / 0.323480 (0.055648) | 0.004087 / 0.007986 (-0.003899) | 0.003357 / 0.004328 (-0.000972) | 0.065570 / 0.004250 (0.061320) | 0.056259 / 0.037052 (0.019207) | 0.368595 / 0.258489 (0.110106) | 0.402672 / 0.293841 (0.108831) | 0.030946 / 0.128546 (-0.097600) | 0.008509 / 0.075646 (-0.067137) | 0.288552 / 0.419271 (-0.130719) | 0.052134 / 0.043533 (0.008601) | 0.344653 / 0.255139 (0.089514) | 0.374199 / 0.283200 (0.090999) | 0.026251 / 0.141683 (-0.115432) | 1.488258 / 1.452155 (0.036103) | 1.567119 / 1.492716 (0.074402) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.218740 / 0.018006 (0.200734) | 0.465483 / 0.000490 (0.464994) | 0.003959 / 0.000200 (0.003759) | 0.000083 / 0.000054 (0.000029) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029860 / 0.037411 (-0.007551) | 0.087968 / 0.014526 (0.073442) | 0.098257 / 0.176557 (-0.078299) | 0.155478 / 0.737135 (-0.581657) | 0.100696 / 0.296338 (-0.195642) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.384642 / 0.215209 (0.169432) | 3.821692 / 2.077655 (1.744038) | 1.838012 / 1.504120 (0.333892) | 1.677554 / 1.541195 (0.136360) | 1.764284 / 1.468490 (0.295794) | 0.487512 / 4.584777 (-4.097265) | 3.614572 / 3.745712 (-0.131141) | 3.300740 / 5.269862 (-1.969122) | 2.079044 / 4.565676 (-2.486632) | 0.057392 / 0.424275 (-0.366883) | 0.007642 / 0.007607 (0.000035) | 0.456161 / 0.226044 (0.230117) | 4.554124 / 2.268929 (2.285196) | 2.319288 / 55.444624 (-53.125336) | 1.972024 / 6.876477 (-4.904452) | 2.210598 / 2.142072 (0.068526) | 0.588442 / 4.805227 (-4.216785) | 0.134474 / 6.500664 (-6.366191) | 0.062682 / 0.075469 (-0.012787) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.243548 / 1.841788 (-0.598239) | 20.267230 / 8.074308 (12.192922) | 14.872096 / 10.191392 (4.680704) | 0.165164 / 0.680424 (-0.515260) | 0.018985 / 0.534201 (-0.515216) | 0.394526 / 0.579283 (-0.184757) | 0.413918 / 0.434364 (-0.020446) | 0.467130 / 0.540337 (-0.073208) | 0.627055 / 1.386936 (-0.759881) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006940 / 0.011353 (-0.004412) | 0.004203 / 0.011008 (-0.006805) | 0.065828 / 0.038508 (0.027320) | 0.076604 / 0.023109 (0.053495) | 0.401781 / 0.275898 (0.125883) | 0.434838 / 0.323480 (0.111358) | 0.005626 / 0.007986 (-0.002359) | 0.003409 / 0.004328 (-0.000920) | 0.064702 / 0.004250 (0.060452) | 0.057525 / 0.037052 (0.020473) | 0.405032 / 0.258489 (0.146543) | 0.440906 / 0.293841 (0.147065) | 0.032713 / 0.128546 (-0.095833) | 0.008723 / 0.075646 (-0.066923) | 0.071448 / 0.419271 (-0.347823) | 0.048186 / 0.043533 (0.004653) | 0.403950 / 0.255139 (0.148811) | 0.419506 / 0.283200 (0.136307) | 0.023532 / 0.141683 (-0.118150) | 1.496435 / 1.452155 (0.044280) | 1.567236 / 1.492716 (0.074519) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.229194 / 0.018006 (0.211188) | 0.451363 / 0.000490 (0.450873) | 0.003651 / 0.000200 (0.003451) | 0.000108 / 0.000054 (0.000053) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.033674 / 0.037411 (-0.003737) | 0.097521 / 0.014526 (0.082995) | 0.108806 / 0.176557 (-0.067751) | 0.161002 / 0.737135 (-0.576133) | 0.108594 / 0.296338 (-0.187745) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.436638 / 0.215209 (0.221429) | 4.348844 / 2.077655 (2.271189) | 2.341737 / 1.504120 (0.837617) | 2.195850 / 1.541195 (0.654656) | 2.332147 / 1.468490 (0.863657) | 0.496180 / 4.584777 (-4.088597) | 3.680987 / 3.745712 (-0.064725) | 3.332203 / 5.269862 (-1.937659) | 2.099541 / 4.565676 (-2.466136) | 0.058629 / 0.424275 (-0.365646) | 0.007363 / 0.007607 (-0.000245) | 0.517658 / 0.226044 (0.291614) | 5.175321 / 2.268929 (2.906392) | 2.858660 / 55.444624 (-52.585964) | 2.540557 / 6.876477 (-4.335920) | 2.755360 / 2.142072 (0.613288) | 0.595488 / 4.805227 (-4.209739) | 0.134265 / 6.500664 (-6.366399) | 0.062033 / 0.075469 (-0.013436) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.389950 / 1.841788 (-0.451838) | 20.800274 / 8.074308 (12.725966) | 15.314531 / 10.191392 (5.123139) | 0.166822 / 0.680424 (-0.513602) | 0.021099 / 0.534201 (-0.513102) | 0.400388 / 0.579283 (-0.178895) | 0.419981 / 0.434364 (-0.014383) | 0.474259 / 0.540337 (-0.066078) | 0.731678 / 1.386936 (-0.655258) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#4566827557acbeba0d4cb66449bb70367e341b05 \"CML watermark\")\n" ]
"2023-08-22T11:27:41"
"2023-08-23T14:01:25"
"2023-08-23T13:52:36"
MEMBER
null
Related to https://github.com/huggingface/datasets/issues/6130
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6166/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6166/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6166.diff", "html_url": "https://github.com/huggingface/datasets/pull/6166", "merged_at": "2023-08-23T13:52:36Z", "patch_url": "https://github.com/huggingface/datasets/pull/6166.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6166" }
true
https://api.github.com/repos/huggingface/datasets/issues/6165
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6165/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6165/comments
https://api.github.com/repos/huggingface/datasets/issues/6165/events
https://github.com/huggingface/datasets/pull/6165
1,861,124,284
PR_kwDODunzps5YexBL
6,165
Fix multiprocessing with spawn in iterable datasets
{ "avatar_url": "https://avatars.githubusercontent.com/u/48770768?v=4", "events_url": "https://api.github.com/users/Hubert-Bonisseur/events{/privacy}", "followers_url": "https://api.github.com/users/Hubert-Bonisseur/followers", "following_url": "https://api.github.com/users/Hubert-Bonisseur/following{/other_user}", "gists_url": "https://api.github.com/users/Hubert-Bonisseur/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Hubert-Bonisseur", "id": 48770768, "login": "Hubert-Bonisseur", "node_id": "MDQ6VXNlcjQ4NzcwNzY4", "organizations_url": "https://api.github.com/users/Hubert-Bonisseur/orgs", "received_events_url": "https://api.github.com/users/Hubert-Bonisseur/received_events", "repos_url": "https://api.github.com/users/Hubert-Bonisseur/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Hubert-Bonisseur/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Hubert-Bonisseur/subscriptions", "type": "User", "url": "https://api.github.com/users/Hubert-Bonisseur" }
[]
open
false
null
[]
null
[ "The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6165). All of your documentation changes will be reflected on that endpoint.", "@lhoestq \r\nA test is failing, but I don't think it is due to my changes", "Good catch ! Could you add a test to make sure transformed IterableDataset objects are still picklable ?\r\n\r\nSomething like `test_pickle_after_many_transforms` in in `test_iterable_dataset.py` that does a bunch or rename, map, take on a dataset and checks that the dataset can be pickled at the end and the reloaded dataset returns the same elements", "@lhoestq \r\nI added the test and fixed one last method" ]
"2023-08-22T10:07:23"
"2023-08-25T09:22:49"
null
CONTRIBUTOR
null
The "Spawn" method is preferred when multiprocessing on macOS or Windows systems, instead of the "Fork" method on linux systems. This causes some methods of Iterable Datasets to break when using a dataloader with more than 0 workers. I fixed the issue by replacing lambda and local methods which are not pickle-able. See the example below: ```python from datasets import load_dataset from torch.utils.data import DataLoader if __name__ == "__main__": dataset = load_dataset("lhoestq/demo1", split="train") dataset = dataset.to_iterable_dataset(num_shards=3) dataset = dataset.remove_columns(["package_name"]) dataset = dataset.rename_columns({ "review": "review1" }) dataset = dataset.rename_column("date", "date1") for sample in DataLoader(dataset, batch_size=None, num_workers=3): print(sample) ``` To notice the fix on a linux system, adding these lines should do the trick: ```python import multiprocessing multiprocessing.set_start_method('spawn') ``` I also removed what looks like code duplication between rename_colums and rename_column
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6165/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6165/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6165.diff", "html_url": "https://github.com/huggingface/datasets/pull/6165", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6165.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6165" }
true
https://api.github.com/repos/huggingface/datasets/issues/6164
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6164/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6164/comments
https://api.github.com/repos/huggingface/datasets/issues/6164/events
https://github.com/huggingface/datasets/pull/6164
1,859,560,007
PR_kwDODunzps5YZZAJ
6,164
Fix: Missing a MetadataConfigs init when the repo has a `datasets_info.json` but no README
{ "avatar_url": "https://avatars.githubusercontent.com/u/22726840?v=4", "events_url": "https://api.github.com/users/clefourrier/events{/privacy}", "followers_url": "https://api.github.com/users/clefourrier/followers", "following_url": "https://api.github.com/users/clefourrier/following{/other_user}", "gists_url": "https://api.github.com/users/clefourrier/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/clefourrier", "id": 22726840, "login": "clefourrier", "node_id": "MDQ6VXNlcjIyNzI2ODQw", "organizations_url": "https://api.github.com/users/clefourrier/orgs", "received_events_url": "https://api.github.com/users/clefourrier/received_events", "repos_url": "https://api.github.com/users/clefourrier/repos", "site_admin": false, "starred_url": "https://api.github.com/users/clefourrier/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/clefourrier/subscriptions", "type": "User", "url": "https://api.github.com/users/clefourrier" }
[]
closed
false
null
[]
null
[ "_The documentation is not available anymore as the PR was closed or merged._", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006874 / 0.011353 (-0.004479) | 0.004276 / 0.011008 (-0.006732) | 0.085198 / 0.038508 (0.046690) | 0.084281 / 0.023109 (0.061171) | 0.344767 / 0.275898 (0.068869) | 0.377798 / 0.323480 (0.054318) | 0.005656 / 0.007986 (-0.002330) | 0.003601 / 0.004328 (-0.000727) | 0.065486 / 0.004250 (0.061235) | 0.056191 / 0.037052 (0.019139) | 0.351412 / 0.258489 (0.092923) | 0.398591 / 0.293841 (0.104750) | 0.031662 / 0.128546 (-0.096884) | 0.008901 / 0.075646 (-0.066745) | 0.290423 / 0.419271 (-0.128849) | 0.053793 / 0.043533 (0.010260) | 0.347968 / 0.255139 (0.092829) | 0.376978 / 0.283200 (0.093778) | 0.026745 / 0.141683 (-0.114938) | 1.514119 / 1.452155 (0.061964) | 1.580920 / 1.492716 (0.088203) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.273648 / 0.018006 (0.255642) | 0.575176 / 0.000490 (0.574686) | 0.003557 / 0.000200 (0.003357) | 0.000093 / 0.000054 (0.000038) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031714 / 0.037411 (-0.005697) | 0.089166 / 0.014526 (0.074640) | 0.101525 / 0.176557 (-0.075032) | 0.161855 / 0.737135 (-0.575281) | 0.101391 / 0.296338 (-0.194947) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.380947 / 0.215209 (0.165738) | 3.800527 / 2.077655 (1.722873) | 1.820789 / 1.504120 (0.316669) | 1.657327 / 1.541195 (0.116132) | 1.776242 / 1.468490 (0.307752) | 0.486954 / 4.584777 (-4.097823) | 3.688340 / 3.745712 (-0.057372) | 3.354453 / 5.269862 (-1.915409) | 2.119995 / 4.565676 (-2.445682) | 0.057446 / 0.424275 (-0.366829) | 0.007752 / 0.007607 (0.000145) | 0.461907 / 0.226044 (0.235862) | 4.617870 / 2.268929 (2.348942) | 2.337025 / 55.444624 (-53.107599) | 1.964770 / 6.876477 (-4.911707) | 2.252066 / 2.142072 (0.109993) | 0.591585 / 4.805227 (-4.213642) | 0.134655 / 6.500664 (-6.366009) | 0.060646 / 0.075469 (-0.014823) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.263271 / 1.841788 (-0.578517) | 20.822286 / 8.074308 (12.747978) | 14.710256 / 10.191392 (4.518864) | 0.167285 / 0.680424 (-0.513139) | 0.018302 / 0.534201 (-0.515899) | 0.401023 / 0.579283 (-0.178260) | 0.428956 / 0.434364 (-0.005407) | 0.466120 / 0.540337 (-0.074218) | 0.637868 / 1.386936 (-0.749069) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.007174 / 0.011353 (-0.004179) | 0.004418 / 0.011008 (-0.006590) | 0.065731 / 0.038508 (0.027223) | 0.090457 / 0.023109 (0.067348) | 0.387306 / 0.275898 (0.111408) | 0.427178 / 0.323480 (0.103698) | 0.005699 / 0.007986 (-0.002286) | 0.003662 / 0.004328 (-0.000666) | 0.066190 / 0.004250 (0.061940) | 0.062860 / 0.037052 (0.025808) | 0.388855 / 0.258489 (0.130366) | 0.427853 / 0.293841 (0.134012) | 0.032770 / 0.128546 (-0.095776) | 0.008780 / 0.075646 (-0.066866) | 0.071156 / 0.419271 (-0.348116) | 0.050174 / 0.043533 (0.006641) | 0.385254 / 0.255139 (0.130115) | 0.405069 / 0.283200 (0.121869) | 0.025561 / 0.141683 (-0.116122) | 1.506907 / 1.452155 (0.054752) | 1.543270 / 1.492716 (0.050554) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.304651 / 0.018006 (0.286645) | 0.577269 / 0.000490 (0.576780) | 0.004479 / 0.000200 (0.004279) | 0.000127 / 0.000054 (0.000073) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.034070 / 0.037411 (-0.003341) | 0.097664 / 0.014526 (0.083138) | 0.106969 / 0.176557 (-0.069588) | 0.163093 / 0.737135 (-0.574043) | 0.109384 / 0.296338 (-0.186955) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.414823 / 0.215209 (0.199614) | 4.148390 / 2.077655 (2.070735) | 2.114038 / 1.504120 (0.609918) | 1.959316 / 1.541195 (0.418121) | 2.098138 / 1.468490 (0.629648) | 0.486338 / 4.584777 (-4.098439) | 3.642850 / 3.745712 (-0.102863) | 3.458311 / 5.269862 (-1.811551) | 2.185662 / 4.565676 (-2.380014) | 0.057555 / 0.424275 (-0.366720) | 0.007522 / 0.007607 (-0.000085) | 0.497975 / 0.226044 (0.271931) | 4.971528 / 2.268929 (2.702600) | 2.614087 / 55.444624 (-52.830537) | 2.288406 / 6.876477 (-4.588070) | 2.564067 / 2.142072 (0.421995) | 0.582248 / 4.805227 (-4.222979) | 0.134931 / 6.500664 (-6.365733) | 0.062689 / 0.075469 (-0.012780) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.343331 / 1.841788 (-0.498457) | 21.398950 / 8.074308 (13.324642) | 14.620971 / 10.191392 (4.429579) | 0.169779 / 0.680424 (-0.510644) | 0.018683 / 0.534201 (-0.515518) | 0.396152 / 0.579283 (-0.183131) | 0.409596 / 0.434364 (-0.024768) | 0.482875 / 0.540337 (-0.057463) | 0.659977 / 1.386936 (-0.726959) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#1fd2234b8c802d47db5a5aa939148f98c9c49350 \"CML watermark\")\n", "<details>\n<summary>Show benchmarks</summary>\n\nPyArrow==8.0.0\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006662 / 0.011353 (-0.004691) | 0.003959 / 0.011008 (-0.007049) | 0.084447 / 0.038508 (0.045939) | 0.070267 / 0.023109 (0.047158) | 0.310301 / 0.275898 (0.034403) | 0.339866 / 0.323480 (0.016386) | 0.004008 / 0.007986 (-0.003977) | 0.003270 / 0.004328 (-0.001058) | 0.064997 / 0.004250 (0.060746) | 0.053151 / 0.037052 (0.016099) | 0.327867 / 0.258489 (0.069378) | 0.368560 / 0.293841 (0.074719) | 0.031436 / 0.128546 (-0.097111) | 0.008547 / 0.075646 (-0.067099) | 0.288513 / 0.419271 (-0.130758) | 0.051833 / 0.043533 (0.008300) | 0.312660 / 0.255139 (0.057521) | 0.347180 / 0.283200 (0.063980) | 0.024982 / 0.141683 (-0.116701) | 1.472487 / 1.452155 (0.020333) | 1.550138 / 1.492716 (0.057422) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.208443 / 0.018006 (0.190437) | 0.451927 / 0.000490 (0.451437) | 0.004452 / 0.000200 (0.004252) | 0.000082 / 0.000054 (0.000027) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.029164 / 0.037411 (-0.008247) | 0.085801 / 0.014526 (0.071275) | 0.096229 / 0.176557 (-0.080327) | 0.153063 / 0.737135 (-0.584072) | 0.097712 / 0.296338 (-0.198626) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.383969 / 0.215209 (0.168760) | 3.829216 / 2.077655 (1.751561) | 1.854466 / 1.504120 (0.350346) | 1.684149 / 1.541195 (0.142954) | 1.759422 / 1.468490 (0.290932) | 0.480229 / 4.584777 (-4.104548) | 3.653363 / 3.745712 (-0.092349) | 3.264456 / 5.269862 (-2.005406) | 2.020579 / 4.565676 (-2.545097) | 0.056920 / 0.424275 (-0.367355) | 0.007625 / 0.007607 (0.000018) | 0.458559 / 0.226044 (0.232515) | 4.580288 / 2.268929 (2.311359) | 2.353783 / 55.444624 (-53.090841) | 1.967223 / 6.876477 (-4.909253) | 2.182707 / 2.142072 (0.040634) | 0.631341 / 4.805227 (-4.173886) | 0.141656 / 6.500664 (-6.359008) | 0.059918 / 0.075469 (-0.015551) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.279635 / 1.841788 (-0.562153) | 19.725763 / 8.074308 (11.651455) | 14.477946 / 10.191392 (4.286554) | 0.164360 / 0.680424 (-0.516064) | 0.018286 / 0.534201 (-0.515915) | 0.394935 / 0.579283 (-0.184348) | 0.419638 / 0.434364 (-0.014726) | 0.460366 / 0.540337 (-0.079972) | 0.636876 / 1.386936 (-0.750060) |\n\n</details>\nPyArrow==latest\n\n<details>\n<summary>Show updated benchmarks!</summary>\n\n### Benchmark: benchmark_array_xd.json\n\n| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.006568 / 0.011353 (-0.004785) | 0.004270 / 0.011008 (-0.006738) | 0.065522 / 0.038508 (0.027014) | 0.071597 / 0.023109 (0.048487) | 0.394929 / 0.275898 (0.119031) | 0.427548 / 0.323480 (0.104068) | 0.005320 / 0.007986 (-0.002665) | 0.003366 / 0.004328 (-0.000962) | 0.065780 / 0.004250 (0.061530) | 0.055390 / 0.037052 (0.018338) | 0.397950 / 0.258489 (0.139461) | 0.435800 / 0.293841 (0.141959) | 0.031816 / 0.128546 (-0.096730) | 0.008555 / 0.075646 (-0.067091) | 0.072110 / 0.419271 (-0.347161) | 0.049077 / 0.043533 (0.005544) | 0.390065 / 0.255139 (0.134926) | 0.410294 / 0.283200 (0.127094) | 0.023389 / 0.141683 (-0.118294) | 1.491491 / 1.452155 (0.039336) | 1.551057 / 1.492716 (0.058341) |\n\n### Benchmark: benchmark_getitem\\_100B.json\n\n| metric | get_batch_of\\_1024\\_random_rows | get_batch_of\\_1024\\_rows | get_first_row | get_last_row |\n|--------|---|---|---|---|\n| new / old (diff) | 0.243869 / 0.018006 (0.225862) | 0.451961 / 0.000490 (0.451471) | 0.019834 / 0.000200 (0.019634) | 0.000114 / 0.000054 (0.000059) |\n\n### Benchmark: benchmark_indices_mapping.json\n\n| metric | select | shard | shuffle | sort | train_test_split |\n|--------|---|---|---|---|---|\n| new / old (diff) | 0.031031 / 0.037411 (-0.006380) | 0.088189 / 0.014526 (0.073663) | 0.101743 / 0.176557 (-0.074814) | 0.155236 / 0.737135 (-0.581899) | 0.101245 / 0.296338 (-0.195094) |\n\n### Benchmark: benchmark_iterating.json\n\n| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |\n|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 0.422178 / 0.215209 (0.206969) | 4.199989 / 2.077655 (2.122334) | 2.228816 / 1.504120 (0.724696) | 2.057172 / 1.541195 (0.515978) | 2.162651 / 1.468490 (0.694161) | 0.491186 / 4.584777 (-4.093591) | 3.666221 / 3.745712 (-0.079491) | 3.289531 / 5.269862 (-1.980331) | 2.050027 / 4.565676 (-2.515650) | 0.057464 / 0.424275 (-0.366811) | 0.007379 / 0.007607 (-0.000228) | 0.506532 / 0.226044 (0.280487) | 5.066385 / 2.268929 (2.797456) | 2.694405 / 55.444624 (-52.750219) | 2.372200 / 6.876477 (-4.504277) | 2.562724 / 2.142072 (0.420652) | 0.615474 / 4.805227 (-4.189753) | 0.148284 / 6.500664 (-6.352380) | 0.061380 / 0.075469 (-0.014089) |\n\n### Benchmark: benchmark_map_filter.json\n\n| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |\n|--------|---|---|---|---|---|---|---|---|---|\n| new / old (diff) | 1.332649 / 1.841788 (-0.509139) | 20.591063 / 8.074308 (12.516755) | 14.105253 / 10.191392 (3.913861) | 0.151886 / 0.680424 (-0.528537) | 0.018200 / 0.534201 (-0.516001) | 0.395278 / 0.579283 (-0.184005) | 0.407113 / 0.434364 (-0.027251) | 0.473168 / 0.540337 (-0.067170) | 0.660766 / 1.386936 (-0.726170) |\n\n</details>\n</details>\n\n![](https://cml.dev/watermark.png#8b8e6ee067eb74e7965ca2a6768f15f9398cb7c8 \"CML watermark\")\n" ]
"2023-08-21T14:57:54"
"2023-08-21T16:27:05"
"2023-08-21T16:18:26"
CONTRIBUTOR
null
When I try to push to an arrow repo (can provide the link on Slack), it uploads the files but fails to update the metadata, with ``` File "app.py", line 123, in add_new_eval eval_results[level].push_to_hub(my_repo, token=TOKEN, split=SPLIT) File "blabla_my_env_path/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 5501, in push_to_hub if not metadata_configs: UnboundLocalError: local variable 'metadata_configs' referenced before assignment ``` This fixes it.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6164/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6164/timeline
null
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6164.diff", "html_url": "https://github.com/huggingface/datasets/pull/6164", "merged_at": "2023-08-21T16:18:26Z", "patch_url": "https://github.com/huggingface/datasets/pull/6164.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6164" }
true
https://api.github.com/repos/huggingface/datasets/issues/6163
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6163/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6163/comments
https://api.github.com/repos/huggingface/datasets/issues/6163/events
https://github.com/huggingface/datasets/issues/6163
1,857,682,241
I_kwDODunzps5uuftB
6,163
Error type: ArrowInvalid Details: Failed to parse string: '[254,254]' as a scalar of type int32
{ "avatar_url": "https://avatars.githubusercontent.com/u/90616801?v=4", "events_url": "https://api.github.com/users/shishirCTC/events{/privacy}", "followers_url": "https://api.github.com/users/shishirCTC/followers", "following_url": "https://api.github.com/users/shishirCTC/following{/other_user}", "gists_url": "https://api.github.com/users/shishirCTC/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/shishirCTC", "id": 90616801, "login": "shishirCTC", "node_id": "MDQ6VXNlcjkwNjE2ODAx", "organizations_url": "https://api.github.com/users/shishirCTC/orgs", "received_events_url": "https://api.github.com/users/shishirCTC/received_events", "repos_url": "https://api.github.com/users/shishirCTC/repos", "site_admin": false, "starred_url": "https://api.github.com/users/shishirCTC/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shishirCTC/subscriptions", "type": "User", "url": "https://api.github.com/users/shishirCTC" }
[]
open
false
null
[]
null
[ "Answered on the forum [here](https://discuss.huggingface.co/t/error-type-arrowinvalid-details-failed-to-parse-string-254-254-as-a-scalar-of-type-int32/51323)." ]
"2023-08-19T11:34:40"
"2023-08-21T13:28:16"
null
NONE
null
### Describe the bug I am getting the following error while I am trying to upload the CSV sheet to train a model. My CSV sheet content is exactly same as shown in the example CSV file in the Auto Train page. Attaching screenshot of error for reference. I have also tried converting the index of the answer that are integer into string by placing inverted commas and also without inverted commas. Can anyone please help me out? FYI : I am using Chrome browser. Error type: ArrowInvalid Details: Failed to parse string: '[254,254]' as a scalar of type int32 ![Screenshot 2023-08-19 165827](https://github.com/huggingface/datasets/assets/90616801/95fad96e-7dce-4bb5-9f83-9f1659a32891) ### Steps to reproduce the bug Kindly let me know how to fix this? ### Expected behavior Kindly let me know how to fix this? ### Environment info Kindly let me know how to fix this?
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6163/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6163/timeline
null
null
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6162
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6162/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6162/comments
https://api.github.com/repos/huggingface/datasets/issues/6162/events
https://github.com/huggingface/datasets/issues/6162
1,856,198,342
I_kwDODunzps5uo1bG
6,162
load_dataset('json',...) from togethercomputer/RedPajama-Data-1T errors when jsonl rows contains different data fields
{ "avatar_url": "https://avatars.githubusercontent.com/u/82971690?v=4", "events_url": "https://api.github.com/users/rbrugaro/events{/privacy}", "followers_url": "https://api.github.com/users/rbrugaro/followers", "following_url": "https://api.github.com/users/rbrugaro/following{/other_user}", "gists_url": "https://api.github.com/users/rbrugaro/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rbrugaro", "id": 82971690, "login": "rbrugaro", "node_id": "MDQ6VXNlcjgyOTcxNjkw", "organizations_url": "https://api.github.com/users/rbrugaro/orgs", "received_events_url": "https://api.github.com/users/rbrugaro/received_events", "repos_url": "https://api.github.com/users/rbrugaro/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rbrugaro/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rbrugaro/subscriptions", "type": "User", "url": "https://api.github.com/users/rbrugaro" }
[]
open
false
null
[]
null
[ "Hi ! Feel free to open a discussion at https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T/discussions to ask the file to be fixed (or directly open a PR with the fixed file)\r\n\r\n`datasets` expects all the examples to have the same fields", "@lhoestq I think the problem is caused by the fact that hugging face datasets writes a copy of data to the local cache using pyarrow. And the data scheme is inferred from the first few data blocks as can be seen [here](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_writer.py#L570). Maybe setting `streaming=True` can workaround this problem. Would you agree with my statement? ", "> @lhoestq I think the problem is caused by the fact that hugging face datasets writes a copy of data to the local cache using pyarrow. And the data scheme is inferred from the first few data blocks as can be seen [here](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_writer.py#L570).\r\n\r\nCorrect. Therefore any example that doesn't follow the inferred schema will make the code fail.\r\n\r\n> Maybe setting streaming=True can workaround this problem. Would you agree with my statement?\r\n\r\nYou'll meet the same problem but later - when streaming and arriving at the problematic example", "@lhoestq I just run below test with streaming=True and is not failing at the problematic example\r\n```python\r\nds = load_dataset('json', data_files='/path_to_local_RedPajamaData/filtered_27f05c041a1c401783f90b9415e40e4b.sampled.jsonl', streaming=True)\r\ncount = 0\r\nfor i in ds['train']:\r\n count += 1\r\n print(count)\r\n```\r\n\r\nand completes the 262241 samples successfully. It does error our when streaming is not used " ]
"2023-08-18T07:19:39"
"2023-08-18T17:00:35"
null
NONE
null
### Describe the bug When loading some jsonl from redpajama-data-1T github source [togethercomputer/RedPajama-Data-1T](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T) fails due to one row of the file containing an extra field called **symlink_target: string>**. When deleting that line the loading is successful. We also tried loading this file with the discrepancy using this function and it is successful ```python os.environ["RED_PAJAMA_DATA_DIR"] ="/path_to_local_copy_of_RedPajama-Data-1T" ds = load_dataset('togethercomputer/RedPajama-Data-1T', 'github',cache_dir="/path_to_folder_with_jsonl",streaming=True)['train'] ``` ### Steps to reproduce the bug Steps to reproduce the behavior: 1. Load one jsonl from the redpajama-data-1T ```bash wget https://data.together.xyz/redpajama-data-1T/v1.0.0/github/filtered_27f05c041a1c401783f90b9415e40e4b.sampled.jsonl ``` 2.Load dataset will give error: ```python from datasets import load_dataset ds = load_dataset('json', data_files='/path_to/filtered_27f05c041a1c401783f90b9415e40e4b.sampled.jsonl') ``` _TypeError: Couldn't cast array of type Struct <content_hash: string, timestamp: string, source: string, line_count: int64, max_line_length: int64, avg_line_length: double, alnum_prop: double, repo_name: string, id: string, size: string, binary: bool, copies: string, ref: string, path: string, mode: string, license: string, language: list<item: struct<name: string, bytes: string>>, **symlink_target: string>** to {'content_hash': Value(dtype='string', id=None), 'timestamp': Value(dtype='string', id=None), 'source': Value(dtype='string', id=None), 'line_count': Value(dtype='int64', id=None), 'max_line_length': Value(dtype='int64', id=None), 'avg_line_length': Value(dtype='float64', id=None), 'alnum_prop': Value(dtype='float64', id=None), 'repo_name': Value(dtype='string', id=None), 'id': Value(dtype='string', id=None), 'size': Value(dtype='string', id=None), 'binary': Value(dtype='bool', id=None), 'copies': Value(dtype='string', id=None), 'ref': Value(dtype='string', id=None), 'path': Value(dtype='string', id=None), 'mode': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'language': [{'name': Value(dtype='string', id=None), 'bytes': Value(dtype='string', id=None)}]}_ 3. To remove the line causing the problem that includes the **symlink_target: string>** do: ```bash sed -i '112252d' filtered_27f05c041a1c401783f90b9415e40e4b.sampled.jsonl ``` 4. Rerun the loading function now is succesful: ```python from datasets import load_dataset ds = load_dataset('json', data_files='/path_to/filtered_27f05c041a1c401783f90b9415e40e4b.sampled.jsonl') ``` ### Expected behavior Have a clean dataset without discrepancies on the jsonl fields or have the load_dataset('json',...) method not error out. ### Environment info - `datasets` version: 2.14.1 - Platform: Linux-4.18.0-425.13.1.el8_7.x86_64-x86_64-with-glibc2.28 - Python version: 3.9.17 - Huggingface_hub version: 0.16.4 - PyArrow version: 12.0.1 - Pandas version: 2.0.3
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6162/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6162/timeline
null
null
null
null
false

Dataset Card for "github-issues"

More Information needed

Downloads last month
43